42 lines
1.2 KiB
C#
42 lines
1.2 KiB
C#
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace BpsRwApp.Controllers
|
|
{
|
|
[Route("[controller]/[action]")]
|
|
public class DataSudinChecklistHarianController : AppControllerBase
|
|
{
|
|
public IActionResult Index()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult Table()
|
|
{
|
|
var data = Enumerable.Range(0, 100)
|
|
.Select(index =>
|
|
{
|
|
var wilayah = ControllerSampleData.WilayahSeeds[index % ControllerSampleData.WilayahSeeds.Length];
|
|
var totalChecklist = 18 + (index * 4 % 90);
|
|
var checklistTerverifikasi = totalChecklist - (index % 6);
|
|
|
|
return new
|
|
{
|
|
kecamatan = $"{wilayah.Kecamatan}, {wilayah.Kota}",
|
|
total_checklist = totalChecklist,
|
|
checklist_terverifikasi = checklistTerverifikasi,
|
|
belum_terverifikasi = totalChecklist - checklistTerverifikasi,
|
|
};
|
|
})
|
|
.ToArray();
|
|
|
|
var response = new
|
|
{
|
|
data = data
|
|
};
|
|
|
|
return Json(response);
|
|
}
|
|
}
|
|
}
|