Compare commits
4 Commits
fix/revisi
...
feat/sync-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
154b7f40df | ||
|
|
59e9431b2d | ||
|
|
074edc607d | ||
|
|
625d182d81 |
@@ -6,6 +6,7 @@ use App\Enums\ImportDatasourceStatus;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\PbgTaskMultiStepRequest;
|
||||
use App\Http\Resources\PbgTaskResource;
|
||||
use App\Models\DataSetting;
|
||||
use App\Models\ImportDatasource;
|
||||
use App\Models\PbgTask;
|
||||
use App\Models\PbgTaskGoogleSheet;
|
||||
@@ -109,17 +110,54 @@ class PbgTaskController extends Controller
|
||||
}
|
||||
|
||||
public function syncPbgFromGoogleSheet(){
|
||||
try{
|
||||
$totalRowCount = $this->googleSheetService->getLastRowByColumn("C");
|
||||
$sheetData = $this->googleSheetService->getSheetDataCollection($totalRowCount);
|
||||
$mapToUpsert = [];
|
||||
$count = 0;
|
||||
|
||||
$import_datasource = ImportDatasource::create([
|
||||
"message" => "initialization",
|
||||
"response_body" => null,
|
||||
"status" => ImportDatasourceStatus::Processing->value,
|
||||
]);
|
||||
try{
|
||||
$totalRowCount = $this->googleSheetService->getLastRowByColumn("C");
|
||||
$sheetData = $this->googleSheetService->getSheetDataCollection($totalRowCount);
|
||||
$sheet_big_data = $this->googleSheetService->get_data_by_sheet();
|
||||
$data_setting_result = []; // Initialize result storage
|
||||
|
||||
$found_section = null; // Track which section is found
|
||||
|
||||
foreach ($sheet_big_data as $row) {
|
||||
// Check for section headers
|
||||
if (in_array("•PROSES PENERBITAN:", $row)) {
|
||||
$found_section = "MENUNGGU_KLIK_DPMPTSP";
|
||||
} elseif (in_array("•BERKAS AKTUAL TERVERIFIKASI DINAS TEKNIS 2024:", $row)) {
|
||||
$found_section = "REALISASI_TERBIT_PBG";
|
||||
} elseif (in_array("•TERPROSES DI DPUTR: belum selesai rekomtek'", $row)) {
|
||||
$found_section = "PROSES_DINAS_TEKNIS";
|
||||
}
|
||||
|
||||
// If a section is found and we reach "Grand Total", save the corresponding values
|
||||
if ($found_section && isset($row[0]) && trim($row[0]) === "Grand Total") {
|
||||
if ($found_section === "MENUNGGU_KLIK_DPMPTSP") {
|
||||
$data_setting_result["MENUNGGU_KLIK_DPMPTSP_COUNT"] = $row[2] ?? null;
|
||||
$data_setting_result["MENUNGGU_KLIK_DPMPTSP_SUM"] = $row[3] ?? null;
|
||||
} elseif ($found_section === "REALISASI_TERBIT_PBG") {
|
||||
$data_setting_result["REALISASI_TERBIT_PBG_COUNT"] = $row[2] ?? null;
|
||||
$data_setting_result["REALISASI_TERBIT_PBG_SUM"] = $row[4] ?? null;
|
||||
} elseif ($found_section === "PROSES_DINAS_TEKNIS") {
|
||||
$data_setting_result["PROSES_DINAS_TEKNIS_COUNT"] = $row[2] ?? null;
|
||||
$data_setting_result["PROSES_DINAS_TEKNIS_SUM"] = $row[3] ?? null;
|
||||
}
|
||||
|
||||
// Reset section tracking after capturing "Grand Total"
|
||||
$found_section = null;
|
||||
}
|
||||
}
|
||||
foreach ($data_setting_result as $key => $value) {
|
||||
DataSetting::updateOrInsert(
|
||||
["key" => $key], // Find by key
|
||||
["value" => $value] // Update or insert value
|
||||
);
|
||||
}
|
||||
$mapToUpsert = [];
|
||||
$count = 0;
|
||||
|
||||
foreach($sheetData as $data){
|
||||
$mapToUpsert[] =
|
||||
@@ -242,7 +280,7 @@ class PbgTaskController extends Controller
|
||||
$total_data = count($mapToUpsert);
|
||||
|
||||
$import_datasource->update([
|
||||
"message" => "Successfully imported {$total_data}",
|
||||
"message" => "Successfully processed: {$total_data}",
|
||||
"status" => ImportDatasourceStatus::Success->value,
|
||||
]);
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Http\Requests\MenuRequest;
|
||||
use App\Models\Menu;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -28,24 +29,12 @@ class MenusController extends Controller
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request)
|
||||
public function store(MenuRequest $request)
|
||||
{
|
||||
try{
|
||||
$request->validate([
|
||||
'name' => 'required|string|max:255',
|
||||
'url' => 'nullable|string|max:255',
|
||||
'icon' => 'nullable|string|max:255',
|
||||
'parent_id' => 'nullable|exists:menus,id', // Ensures it's either null or a valid menu ID
|
||||
'sort_order' => 'required|integer',
|
||||
]);
|
||||
$validated_menu = $request->validated();
|
||||
DB::beginTransaction();
|
||||
Menu::create([
|
||||
'name' => $request->name,
|
||||
'url' => $request->url,
|
||||
'icon' => $request->icon,
|
||||
'parent_id' => $request->parent_id ?? null,
|
||||
'sort_order' => $request->sort_order,
|
||||
]);
|
||||
Menu::create($validated_menu);
|
||||
DB::commit();
|
||||
return response()->json(['message' => 'Successfully created'], 200);
|
||||
}catch(\Exception $e){
|
||||
@@ -77,21 +66,13 @@ class MenusController extends Controller
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, string $id)
|
||||
public function update(MenuRequest $request, string $id)
|
||||
{
|
||||
try{
|
||||
$validateData = $request->validate([
|
||||
'name' => 'required',
|
||||
'url'=> 'required',
|
||||
'icon'=> 'nullable',
|
||||
'parent_id' => 'nullable',
|
||||
'sort_order' => 'required',
|
||||
]);
|
||||
|
||||
$validate_menu = $request->validated();
|
||||
$menu = Menu::findOrFail($id);
|
||||
|
||||
DB::beginTransaction();
|
||||
$menu->update($validateData);
|
||||
$menu->update($validate_menu);
|
||||
DB::commit();
|
||||
return response()->json(['message' => 'Successfully updated'], 200);
|
||||
}catch(\Exception $e){
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Http\Requests\RoleRequest;
|
||||
use App\Models\Menu;
|
||||
use App\Models\Role;
|
||||
use App\Models\RoleMenu;
|
||||
@@ -31,16 +32,13 @@ class RolesController extends Controller
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request)
|
||||
public function store(RoleRequest $request)
|
||||
{
|
||||
try{
|
||||
$request->validate([
|
||||
"name" => "required|unique:roles,name",
|
||||
"description" => "nullable",
|
||||
]);
|
||||
$validate_role = $request->validated();
|
||||
|
||||
DB::beginTransaction();
|
||||
Role::create($request->all());
|
||||
Role::create($validate_role);
|
||||
DB::commit();
|
||||
return response()->json(['message' => 'Role created successfully'], 201);
|
||||
}
|
||||
@@ -70,18 +68,14 @@ class RolesController extends Controller
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, string $id)
|
||||
public function update(RoleRequest $request, string $id)
|
||||
{
|
||||
try{
|
||||
$validate_role = $request->validated();
|
||||
$role = Role::findOrFail($id);
|
||||
// Validate request data
|
||||
$validatedData = $request->validate([
|
||||
'name' => 'required|string|max:255|unique:roles,name,' . $id, // Ensure name is unique except for the current role
|
||||
'description' => 'nullable|string|max:500',
|
||||
]);
|
||||
|
||||
DB::beginTransaction();
|
||||
$role->update($validatedData);
|
||||
$role->update($validate_role);
|
||||
DB::commit();
|
||||
return response()->json(['message' => 'Role updated successfully'], 200);
|
||||
}catch(\Exception $e){
|
||||
@@ -97,7 +91,7 @@ class RolesController extends Controller
|
||||
{
|
||||
try{
|
||||
DB::beginTransaction();
|
||||
$deleted = Role::findOrFail($id)->delete();
|
||||
Role::findOrFail($id)->delete();
|
||||
DB::commit();
|
||||
return response()->json(['success' => true, "message" => "Successfully deleted"]);
|
||||
}catch(\Exception $e){
|
||||
|
||||
32
app/Http/Requests/MenuRequest.php
Normal file
32
app/Http/Requests/MenuRequest.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class MenuRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'name' => ['required','string','max:255'],
|
||||
'url' => ['nullable','string','max:255'],
|
||||
'icon' => ['nullable','string','max:255'],
|
||||
'parent_id' => ['nullable','exists:menus,id'],
|
||||
'sort_order' => ['required','integer'],
|
||||
];
|
||||
}
|
||||
}
|
||||
30
app/Http/Requests/RoleRequest.php
Normal file
30
app/Http/Requests/RoleRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class RoleRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
$roleId = $this->route('role');
|
||||
return [
|
||||
'name' => 'required|string|max:255|unique:roles,name,' . ($roleId ?? 'NULL') . ',id',
|
||||
'description' => 'nullable|string',
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,7 @@ class GoogleSheetService
|
||||
|
||||
public function getLastRowByColumn($column = "A")
|
||||
{
|
||||
try{
|
||||
// Ambil spreadsheet
|
||||
$spreadsheet = $this->service->spreadsheets->get($this->spreadsheetID);
|
||||
$sheets = $spreadsheet->getSheets();
|
||||
@@ -63,9 +64,13 @@ class GoogleSheetService
|
||||
}
|
||||
|
||||
return 0;
|
||||
}catch(\Exception $e){
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
public function getHeader()
|
||||
{
|
||||
try{
|
||||
$spreadsheet = $this->service->spreadsheets->get($this->spreadsheetID);
|
||||
$sheets = $spreadsheet->getSheets();
|
||||
|
||||
@@ -79,6 +84,9 @@ class GoogleSheetService
|
||||
|
||||
// Kembalikan header (baris pertama)
|
||||
return !empty($values) ? $values[0] : [];
|
||||
}catch(\Exception $e){
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
public function getLastColumn()
|
||||
@@ -99,6 +107,7 @@ class GoogleSheetService
|
||||
}
|
||||
|
||||
public function getSheetDataCollection($totalRow = 10){
|
||||
try{
|
||||
$spreadsheet = $this->service->spreadsheets->get($this->spreadsheetID);
|
||||
$sheets = $spreadsheet->getSheets();
|
||||
$firstSheetTitle = $sheets[0]->getProperties()->getTitle();
|
||||
@@ -127,5 +136,17 @@ class GoogleSheetService
|
||||
}
|
||||
|
||||
return $mappedData;
|
||||
}catch(\Exception $e){
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
public function get_data_by_sheet($no_sheet = 1){
|
||||
$spreadsheet = $this->service->spreadsheets->get($this->spreadsheetID);
|
||||
$sheets = $spreadsheet->getSheets();
|
||||
$sheetTitle = $sheets[$no_sheet]->getProperties()->getTitle();
|
||||
$range = "{$sheetTitle}";
|
||||
$response = $this->service->spreadsheets_values->get($this->spreadsheetID, $range);
|
||||
$values = $response->getValues();
|
||||
return!empty($values)? $values : [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,10 +29,15 @@ class ServiceSIMBG
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->email = trim((string) GlobalSetting::where('key','SIMBG_EMAIL')->firstOrFail()->value);
|
||||
$this->password = trim((string) GlobalSetting::where('key','SIMBG_PASSWORD')->firstOrFail()->value);
|
||||
$this->simbg_host = trim((string)GlobalSetting::where('key','SIMBG_HOST')->firstOrFail()->value);
|
||||
$this->fetch_per_page = trim((string)GlobalSetting::where('key','FETCH_PER_PAGE')->firstOrFail()->value);
|
||||
$settings = GlobalSetting::whereIn('key', [
|
||||
'SIMBG_EMAIL', 'SIMBG_PASSWORD', 'SIMBG_HOST', 'FETCH_PER_PAGE'
|
||||
])->pluck('value', 'key');
|
||||
|
||||
$this->email = trim((string) ($settings['SIMBG_EMAIL'] ?? ""));
|
||||
$this->password = trim((string) ($settings['SIMBG_PASSWORD'] ?? ""));
|
||||
$this->simbg_host = trim((string) ($settings['SIMBG_HOST'] ?? ""));
|
||||
$this->fetch_per_page = trim((string) ($settings['FETCH_PER_PAGE'] ?? ""));
|
||||
|
||||
$this->service_client = new ServiceClient($this->simbg_host);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,37 @@ class DataSettingSeeder extends Seeder
|
||||
"key" => "TATA_RUANG",
|
||||
"value" => "10000000000",
|
||||
"type" => "integer"
|
||||
]
|
||||
],
|
||||
[
|
||||
"key" => "REALISASI_TERBIT_PBG_SUM",
|
||||
"value" => "1507253788",
|
||||
"type" => "integer"
|
||||
],
|
||||
[
|
||||
"key" => "REALISASI_TERBIT_PBG_COUNT",
|
||||
"value" => "88",
|
||||
"type" => "integer"
|
||||
],
|
||||
[
|
||||
"key" => "MENUNGGU_KLIK_DPMPTSP_SUM",
|
||||
"value" => "83457536",
|
||||
"type" => "integer"
|
||||
],
|
||||
[
|
||||
"key" => "MENUNGGU_KLIK_DPMPTSP_COUNT",
|
||||
"value" => "266",
|
||||
"type" => "integer"
|
||||
],
|
||||
[
|
||||
"key" => "PROSES_DINAS_TEKNIS_SUM",
|
||||
"value" => "83457536",
|
||||
"type" => "integer"
|
||||
],
|
||||
[
|
||||
"key" => "PROSES_DINAS_TEKNIS_COUNT",
|
||||
"value" => "11",
|
||||
"type" => "integer"
|
||||
],
|
||||
];
|
||||
|
||||
foreach ($data_settings as $setting) {
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
"__commonjsHelpers-C4iS2aBk.js"
|
||||
]
|
||||
},
|
||||
"_dropzone-B5tMhgFp.js": {
|
||||
"file": "assets/dropzone-B5tMhgFp.js",
|
||||
"name": "dropzone"
|
||||
},
|
||||
"_global-config-9uDKFQ8j.js": {
|
||||
"file": "assets/global-config-9uDKFQ8j.js",
|
||||
"name": "global-config"
|
||||
@@ -58,6 +62,10 @@
|
||||
"src": "node_modules/quill/dist/quill.snow.css",
|
||||
"isEntry": true
|
||||
},
|
||||
"public/images/bg-dashboard.jpg": {
|
||||
"file": "assets/bg-dashboard-CUwt8_jP.jpg",
|
||||
"src": "public/images/bg-dashboard.jpg"
|
||||
},
|
||||
"resources/fonts/boxicons.eot": {
|
||||
"file": "assets/boxicons-0t2gX1vj.eot",
|
||||
"src": "resources/fonts/boxicons.eot"
|
||||
@@ -94,7 +102,7 @@
|
||||
"isEntry": true
|
||||
},
|
||||
"resources/js/dashboards/bigdata.js": {
|
||||
"file": "assets/bigdata-DBp18hcY.js",
|
||||
"file": "assets/bigdata-Cyb9tZIY.js",
|
||||
"name": "bigdata",
|
||||
"src": "resources/js/dashboards/bigdata.js",
|
||||
"isEntry": true,
|
||||
@@ -112,7 +120,7 @@
|
||||
"isEntry": true
|
||||
},
|
||||
"resources/js/data-settings/index.js": {
|
||||
"file": "assets/index-Bm5aE3Il.js",
|
||||
"file": "assets/index-BOfsbw53.js",
|
||||
"name": "index",
|
||||
"src": "resources/js/data-settings/index.js",
|
||||
"isEntry": true,
|
||||
@@ -148,6 +156,15 @@
|
||||
"_global-config-9uDKFQ8j.js"
|
||||
]
|
||||
},
|
||||
"resources/js/data/advertisements/form-upload.js": {
|
||||
"file": "assets/form-upload-Ci7Kyzc7.js",
|
||||
"name": "form-upload",
|
||||
"src": "resources/js/data/advertisements/form-upload.js",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_dropzone-B5tMhgFp.js"
|
||||
]
|
||||
},
|
||||
"resources/js/master/users/create.js": {
|
||||
"file": "assets/create-RO4xgm-f.js",
|
||||
"name": "create",
|
||||
@@ -161,7 +178,7 @@
|
||||
"isEntry": true
|
||||
},
|
||||
"resources/js/master/users/users.js": {
|
||||
"file": "assets/users-uzXjZCws.js",
|
||||
"file": "assets/users-jfWUOWyP.js",
|
||||
"name": "users",
|
||||
"src": "resources/js/master/users/users.js",
|
||||
"isEntry": true,
|
||||
@@ -178,7 +195,7 @@
|
||||
"isEntry": true
|
||||
},
|
||||
"resources/js/menus/index.js": {
|
||||
"file": "assets/index-qw4Wj-LG.js",
|
||||
"file": "assets/index-C4xA1kYa.js",
|
||||
"name": "index",
|
||||
"src": "resources/js/menus/index.js",
|
||||
"isEntry": true,
|
||||
@@ -216,10 +233,13 @@
|
||||
]
|
||||
},
|
||||
"resources/js/pages/form-fileupload.js": {
|
||||
"file": "assets/form-fileupload-mrxZaoHv.js",
|
||||
"file": "assets/form-fileupload-DGbdX8GT.js",
|
||||
"name": "form-fileupload",
|
||||
"src": "resources/js/pages/form-fileupload.js",
|
||||
"isEntry": true
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_dropzone-B5tMhgFp.js"
|
||||
]
|
||||
},
|
||||
"resources/js/pages/form-flatepicker.js": {
|
||||
"file": "assets/form-flatepicker-ChSlk6xC.js",
|
||||
@@ -293,7 +313,7 @@
|
||||
]
|
||||
},
|
||||
"resources/js/pbg-task/index.js": {
|
||||
"file": "assets/index-BW29TEbh.js",
|
||||
"file": "assets/index-CqcfkvSL.js",
|
||||
"name": "index",
|
||||
"src": "resources/js/pbg-task/index.js",
|
||||
"isEntry": true,
|
||||
@@ -310,7 +330,7 @@
|
||||
"isEntry": true
|
||||
},
|
||||
"resources/js/roles/index.js": {
|
||||
"file": "assets/index-B9clkWIC.js",
|
||||
"file": "assets/index-C_kI_q7O.js",
|
||||
"name": "index",
|
||||
"src": "resources/js/roles/index.js",
|
||||
"isEntry": true,
|
||||
@@ -366,17 +386,22 @@
|
||||
]
|
||||
},
|
||||
"resources/scss/components/_circle.scss": {
|
||||
"file": "assets/_circle-ByHaR-XI.css",
|
||||
"file": "assets/_circle-DgPqpfJw.css",
|
||||
"src": "resources/scss/components/_circle.scss",
|
||||
"isEntry": true
|
||||
},
|
||||
"resources/scss/dashboards/_bigdata.scss": {
|
||||
"file": "assets/_bigdata-Syu0AGbZ.css",
|
||||
"src": "resources/scss/dashboards/_bigdata.scss",
|
||||
"isEntry": true
|
||||
},
|
||||
"resources/scss/icons.scss": {
|
||||
"file": "assets/icons-CHxf0fE3.css",
|
||||
"src": "resources/scss/icons.scss",
|
||||
"isEntry": true
|
||||
},
|
||||
"resources/scss/style.scss": {
|
||||
"file": "assets/style-DF7fxh2D.css",
|
||||
"file": "assets/style-H92i7DXd.css",
|
||||
"src": "resources/scss/style.scss",
|
||||
"isEntry": true
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
643
pupr_app.sql
643
pupr_app.sql
File diff suppressed because one or more lines are too long
@@ -49,13 +49,31 @@ class BigData {
|
||||
}
|
||||
async updateData(year) {
|
||||
try {
|
||||
this.totalTargetPAD = await this.getTargetPAD(year);
|
||||
this.totalTargetPAD = await this.getDataSettings("TARGET_PAD");
|
||||
this.resultDataTotal = await this.getDataTotalPotensi(year);
|
||||
this.dataVerification = await this.getDataVerfication(year);
|
||||
this.dataNonVerification = await this.getDataNonVerfication(year);
|
||||
this.dataBusiness = await this.getDataBusiness(year);
|
||||
this.dataNonBusiness = await this.getDataNonBusiness(year);
|
||||
this.dataTataRuang = await this.getDataTataRuang(year);
|
||||
this.dataTataRuang = await this.getDataSettings("TATA_RUANG");
|
||||
this.dataSumRealisasiTerbit = await this.getDataSettings(
|
||||
"REALISASI_TERBIT_PBG_SUM"
|
||||
);
|
||||
this.dataCountRealisasiTerbit = await this.getDataSettings(
|
||||
"REALISASI_TERBIT_PBG_COUNT"
|
||||
);
|
||||
this.dataSumMenungguKlikDPMPTSP = await this.getDataSettings(
|
||||
"MENUNGGU_KLIK_DPMPTSP_SUM"
|
||||
);
|
||||
this.dataCountMenungguKlikDPMPTSP = await this.getDataSettings(
|
||||
"MENUNGGU_KLIK_DPMPTSP_COUNT"
|
||||
);
|
||||
this.dataSumProsesDinasTeknis = await this.getDataSettings(
|
||||
"PROSES_DINAS_TEKNIS_SUM"
|
||||
);
|
||||
this.dataCountProsesDinasTeknis = await this.getDataSettings(
|
||||
"PROSES_DINAS_TEKNIS_COUNT"
|
||||
);
|
||||
|
||||
// total potensi
|
||||
this.bigTargetPAD = new Big(this.totalTargetPAD ?? 0);
|
||||
@@ -190,38 +208,6 @@ class BigData {
|
||||
}
|
||||
}
|
||||
|
||||
async getTargetPAD(year) {
|
||||
try {
|
||||
const response = await fetch(
|
||||
`${GlobalConfig.apiHost}/api/api-data-settings?search=target_pad`,
|
||||
{
|
||||
credentials: "include",
|
||||
headers: {
|
||||
Authorization: `Bearer ${
|
||||
document.querySelector("meta[name='api-token']")
|
||||
.content
|
||||
}`,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
console.error("Network response was not ok", response);
|
||||
return 0;
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
const valueTargetPAD = data.data[0]?.value ?? 0;
|
||||
const currentMonth = new Date().getMonth() + 1;
|
||||
let result = (currentMonth / 12) * valueTargetPAD;
|
||||
return result;
|
||||
} catch (error) {
|
||||
console.error("Error fetching chart data:", error);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
async getDataVerfication(year) {
|
||||
try {
|
||||
const response = await fetch(
|
||||
@@ -346,10 +332,10 @@ class BigData {
|
||||
}
|
||||
}
|
||||
|
||||
async getDataTataRuang() {
|
||||
async getDataSettings(string_key) {
|
||||
try {
|
||||
const response = await fetch(
|
||||
`${GlobalConfig.apiHost}/api/api-data-settings?search=tata_ruang`,
|
||||
`${GlobalConfig.apiHost}/api/api-data-settings?search=${string_key}`,
|
||||
{
|
||||
credentials: "include",
|
||||
headers: {
|
||||
@@ -519,12 +505,14 @@ class BigData {
|
||||
document
|
||||
.querySelectorAll(".document-count.chart-realisasi-tebit-pbg")
|
||||
.forEach((element) => {
|
||||
element.innerText = `0`;
|
||||
element.innerText = `${this.dataCountRealisasiTerbit}`;
|
||||
});
|
||||
document
|
||||
.querySelectorAll(".document-total.chart-realisasi-tebit-pbg")
|
||||
.forEach((element) => {
|
||||
element.innerText = `Rp.${addThousandSeparators("0.00")}`;
|
||||
element.innerText = `Rp.${addThousandSeparators(
|
||||
this.dataSumRealisasiTerbit
|
||||
)}`;
|
||||
});
|
||||
document
|
||||
.querySelectorAll(".small-percentage.chart-realisasi-tebit-pbg")
|
||||
@@ -536,12 +524,14 @@ class BigData {
|
||||
document
|
||||
.querySelectorAll(".document-count.chart-menunggu-klik-dpmptsp")
|
||||
.forEach((element) => {
|
||||
element.innerText = `${0}`;
|
||||
element.innerText = `${this.dataCountMenungguKlikDPMPTSP}`;
|
||||
});
|
||||
document
|
||||
.querySelectorAll(".document-total.chart-menunggu-klik-dpmptsp")
|
||||
.forEach((element) => {
|
||||
element.innerText = `Rp.${addThousandSeparators("0.00")}`;
|
||||
element.innerText = `Rp.${addThousandSeparators(
|
||||
this.dataSumMenungguKlikDPMPTSP
|
||||
)}`;
|
||||
});
|
||||
document
|
||||
.querySelectorAll(".small-percentage.chart-menunggu-klik-dpmptsp")
|
||||
@@ -553,12 +543,14 @@ class BigData {
|
||||
document
|
||||
.querySelectorAll(".document-count.chart-proses-dinas-teknis")
|
||||
.forEach((element) => {
|
||||
element.innerText = `${0}`;
|
||||
element.innerText = `${this.dataCountProsesDinasTeknis}`;
|
||||
});
|
||||
document
|
||||
.querySelectorAll(".document-total.chart-proses-dinas-teknis")
|
||||
.forEach((element) => {
|
||||
element.innerText = `Rp.${addThousandSeparators("0.00")}`;
|
||||
element.innerText = `Rp.${addThousandSeparators(
|
||||
this.dataSumProsesDinasTeknis
|
||||
)}`;
|
||||
});
|
||||
document
|
||||
.querySelectorAll(".small-percentage.chart-proses-dinas-teknis")
|
||||
|
||||
@@ -41,9 +41,10 @@
|
||||
}
|
||||
|
||||
#dashboard-fixed-wrapper {
|
||||
background-image: url("../../../public/images/bg-dashboard.jpg");
|
||||
background-image: url("/public/images/bg-dashboard.jpg");
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
max-width: 100vw; /* Ensures it doesn't exceed viewport */
|
||||
}
|
||||
|
||||
#dashboard-fixed-wrapper::before {
|
||||
@@ -62,10 +63,6 @@
|
||||
); /* Black overlay with 50% opacity */
|
||||
}
|
||||
|
||||
#dashboard-fixed-wrapper {
|
||||
max-width: 100vw; /* Ensures it doesn't exceed viewport */
|
||||
}
|
||||
|
||||
#dashboard-fixed-container {
|
||||
min-width: 1110px;
|
||||
max-width: unset; /* Allow it to grow if needed */
|
||||
|
||||
@@ -21,7 +21,7 @@ class="authentication-bg"
|
||||
<img src="/images/dputr-kab-bandung.png" height="auto" width="100%" alt="logo light">
|
||||
</a>
|
||||
</div>
|
||||
<h4 class="fw-bold text-dark mb-2">Welcome Back!</h3>
|
||||
<h4 class="fw-bold text-dark mb-2">Welcome Back!</h4>
|
||||
<p class="text-muted">Sign in to your account to continue</p>
|
||||
</div>
|
||||
<form method="POST" action="{{ route('login') }}" class="mt-4">
|
||||
@@ -39,25 +39,14 @@ class="authentication-bg"
|
||||
<input type="email" class="form-control" id="email" name="email" value="user@demo.com" placeholder="Enter your email">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
{{-- <div class="d-flex justify-content-between align-items-center">
|
||||
<label for="password" class="form-label">Password</label>
|
||||
<a href="{{ route ('password.request') }}" class="text-decoration-none small text-muted">Forgot password?</a>
|
||||
</div> --}}
|
||||
<input type="password" class="form-control" id="password" name="password" value="password" placeholder="Enter your password">
|
||||
</div>
|
||||
{{-- <div class="form-check mb-3">
|
||||
<input type="checkbox" class="form-check-input" id="remember-me">
|
||||
<label class="form-check-label" for="remember-me">Remember me</label>
|
||||
</div> --}}
|
||||
<div class="d-grid">
|
||||
<button class="btn btn-dark btn-lg fw-medium" type="submit">Sign In</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{{-- <p class="text-center mt-4 text-white text-opacity-50">Don't have an account?
|
||||
<a href="{{ route ('register') }}" class="text-decoration-none text-white fw-bold">Sign Up</a>
|
||||
</p> --}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
@props(['buttonText' => 'Confirm', 'confirmationMessage' => 'Are you sure?'])
|
||||
|
||||
<div class="modal fade" id="modalConfirmation" tabindex="-1"
|
||||
aria-labelledby="modalConfirmationTitle" aria-hidden="true">
|
||||
<div class="modal fade" id="modalConfirmation" tabindex="-1" aria-labelledby="modalConfirmationTitle">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-end">
|
||||
<!-- item-->
|
||||
<h6 class="dropdown-header">Welcome!</h6>
|
||||
<h6 class="dropdown-header">{{ Auth::user()->email }}</h6>
|
||||
|
||||
<!-- <a class="dropdown-item" href="#">
|
||||
<iconify-icon icon="solar:user-outline"
|
||||
|
||||
@@ -8,35 +8,9 @@
|
||||
@include('layouts.partials/page-title', ['title' => 'Data', 'subtitle' => 'PBG'])
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<ul class="nav nav-tabs nav-justified">
|
||||
<li class="nav-item">
|
||||
<a href="#pbgTask" data-bs-toggle="tab" aria-expanded="true" class="nav-link active">
|
||||
<span class="d-none d-sm-block">PBG Task</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#pbgTaskRetributions" data-bs-toggle="tab" aria-expanded="false"
|
||||
class="nav-link">
|
||||
<span class="d-none d-sm-block">PBG Task Retributions</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#pbgTaskIntegration" data-bs-toggle="tab" aria-expanded="false" class="nav-link">
|
||||
<span class="d-none d-sm-block">PBG Task Index Integrations</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#pbgTaskPrasarana" data-bs-toggle="tab" aria-expanded="false" class="nav-link">
|
||||
<span class="d-none d-sm-block">PBG Task Prasarana</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="pbgTask">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="mb-3">
|
||||
@@ -63,15 +37,15 @@
|
||||
<dt>Document Number</dt>
|
||||
<dd>{{$data->document_number}}</dd>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<dt>Address</dt>
|
||||
<dd>{{$data->address}}</dd>
|
||||
<div>
|
||||
<dt>Status Name</dt>
|
||||
<dd>{{$data->status_name}}</dd>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="mb-3">
|
||||
<dt>Status Name</dt>
|
||||
<dd>{{$data->status_name}}</dd>
|
||||
<dt>Address</dt>
|
||||
<dd>{{$data->address}}</dd>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<dt>SLF Status Name</dt>
|
||||
@@ -89,14 +63,40 @@
|
||||
<dt>Due Date</dt>
|
||||
<dd>{{$data->due_date}}</dd>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<div>
|
||||
<dt>Task Created At</dt>
|
||||
<dd>{{$data->task_created_at}}</dd>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="pbgTaskRetributions">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<ul class="nav nav-tabs nav-justified">
|
||||
<li class="nav-item">
|
||||
<a href="#pbgTaskRetributions" data-bs-toggle="tab" aria-expanded="false"
|
||||
class="nav-link active">
|
||||
<span class="d-none d-sm-block">PBG Task Retributions</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#pbgTaskIntegration" data-bs-toggle="tab" aria-expanded="false" class="nav-link">
|
||||
<span class="d-none d-sm-block">PBG Task Index Integrations</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#pbgTaskPrasarana" data-bs-toggle="tab" aria-expanded="false" class="nav-link">
|
||||
<span class="d-none d-sm-block">PBG Task Prasarana</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="pbgTaskRetributions">
|
||||
@if ($data->pbg_task_retributions)
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
@@ -250,6 +250,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
|
||||
966
sibedas.sql
Normal file
966
sibedas.sql
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user