Compare commits
5 Commits
bug-fix/to
...
fix/dashbo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
006c008542 | ||
|
|
39bb8e6d5f | ||
|
|
7994a62cea | ||
|
|
3a09e2e68a | ||
|
|
116dc1c8c7 |
@@ -199,7 +199,7 @@ class AdvertisementController extends Controller
|
|||||||
|
|
||||||
public function downloadExcelAdvertisement()
|
public function downloadExcelAdvertisement()
|
||||||
{
|
{
|
||||||
$filePath = public_path('templates/template_reklame.xlsx');
|
$filePath = storage_path('app/public/templates/template_reklame.xlsx');
|
||||||
|
|
||||||
// Cek apakah file ada
|
// Cek apakah file ada
|
||||||
if (!file_exists($filePath)) {
|
if (!file_exists($filePath)) {
|
||||||
|
|||||||
@@ -1,146 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Controllers\Api;
|
|
||||||
|
|
||||||
use App\Models\SpatialPlanning;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use App\Http\Requests\SpatialPlanningRequest;
|
|
||||||
use Illuminate\Http\Response;
|
|
||||||
use App\Http\Controllers\Controller;
|
|
||||||
use App\Http\Resources\SpatialPlanningResource;
|
|
||||||
use Illuminate\Support\Facades\DB;
|
|
||||||
use Illuminate\Support\Facades\Validator;
|
|
||||||
use Maatwebsite\Excel\Facades\Excel;
|
|
||||||
use App\Imports\SpatialPlanningImport;
|
|
||||||
use Illuminate\Support\Facades\Storage;
|
|
||||||
|
|
||||||
class SpatialPlanningController extends Controller
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Display a listing of the resource.
|
|
||||||
*/
|
|
||||||
public function index(Request $request)
|
|
||||||
{
|
|
||||||
info($request);
|
|
||||||
$perPage = $request->input('per_page', 15);
|
|
||||||
$search = $request->input('search', '');
|
|
||||||
|
|
||||||
$query = SpatialPlanning::query();
|
|
||||||
if ($search) {
|
|
||||||
$query->where(function ($q) use ($search) {
|
|
||||||
$q->where('name', 'like', "%$search%")
|
|
||||||
->orWhere('kbli', 'like', "%$search%")
|
|
||||||
->orWhere('activities', 'like', "%$search%")
|
|
||||||
->orWhere('area', 'like', "%$search%")
|
|
||||||
->orWhere('location', 'like', "%$search%")
|
|
||||||
->orWhere('number', 'like', "%$search%");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$spatialPlannings = $query->paginate($perPage);
|
|
||||||
|
|
||||||
// Menambhakan nomor urut (No)
|
|
||||||
$start = ($spatialPlannings->currentPage()-1) * $perPage + 1;
|
|
||||||
|
|
||||||
// Tambahkan nomor urut ke dalam data
|
|
||||||
$data = $spatialPlannings->map(function ($item, $index) use ($start) {
|
|
||||||
return array_merge($item->toArray(), ['no' => $start + $index]);
|
|
||||||
});
|
|
||||||
|
|
||||||
info($data);
|
|
||||||
|
|
||||||
return response()->json([
|
|
||||||
'data' => $data,
|
|
||||||
'meta' => [
|
|
||||||
'total' => $spatialPlannings->total(),
|
|
||||||
'per_page' => $spatialPlannings->perPage(),
|
|
||||||
'current_page' => $spatialPlannings->currentPage(),
|
|
||||||
'last_page'=>$spatialPlannings->lastPage(),
|
|
||||||
]
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Store a newly created resource in storage.
|
|
||||||
*/
|
|
||||||
public function store(SpatialPlanningRequest $request): SpatialPlanning
|
|
||||||
{
|
|
||||||
$data = $request->validated();
|
|
||||||
return SpatialPlanning::create($data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* import spatial planning from excel
|
|
||||||
*/
|
|
||||||
public function importFromFile(Request $request)
|
|
||||||
{
|
|
||||||
info($request);
|
|
||||||
//validasi file
|
|
||||||
$validator = Validator::make($request->all(), [
|
|
||||||
'file' => 'required|mimes:xlsx, xls|max:10240'
|
|
||||||
]);
|
|
||||||
|
|
||||||
if ($validator->fails()) {
|
|
||||||
return response()->json([
|
|
||||||
'message'=>'File vaildation failed.',
|
|
||||||
"errors"=>$validator->errors()
|
|
||||||
], 400);
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
$file = $request->file('file');
|
|
||||||
Excel::import(new SpatialPlanningImport, $file);
|
|
||||||
return response()->json([
|
|
||||||
'message'=>'File uploaded and imported successfully!'
|
|
||||||
], 200);
|
|
||||||
} catch (\Exception $e) {
|
|
||||||
return response()->json([
|
|
||||||
'message'=>'Error during file import.',
|
|
||||||
'error'=>$e->getMessage()
|
|
||||||
], 500);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display the specified resource.
|
|
||||||
*/
|
|
||||||
public function show(SpatialPlanning $spatialPlanning): SpatialPlanning
|
|
||||||
{
|
|
||||||
return $spatialPlanning;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update the specified resource in storage.
|
|
||||||
*/
|
|
||||||
public function update(SpatialPlanningRequest $request, SpatialPlanning $spatialPlanning): SpatialPlanning
|
|
||||||
{
|
|
||||||
info($request);
|
|
||||||
$data = $request->validated();
|
|
||||||
info($data);
|
|
||||||
|
|
||||||
$spatialPlanning->update($data);
|
|
||||||
|
|
||||||
return $spatialPlanning;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function destroy(SpatialPlanning $spatialPlanning): Response
|
|
||||||
{
|
|
||||||
$spatialPlanning->delete();
|
|
||||||
|
|
||||||
return response()->noContent();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function downloadExcelSpatialPlanning()
|
|
||||||
{
|
|
||||||
$filePath = public_path('templates/template_spatial_planning.xlsx');
|
|
||||||
info(sprintf("File Path: %s | Exists: %s", $filePath, file_exists($filePath) ? 'Yes' : 'No'));
|
|
||||||
|
|
||||||
// Cek apakah file ada
|
|
||||||
if (!file_exists($filePath)) {
|
|
||||||
return response()-> json(['message' => 'File tidak ditemukan!'], Response::HTTP_NOT_FOUND);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return file to download
|
|
||||||
return response()->download($filePath);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -25,13 +25,6 @@ class TourismController extends Controller
|
|||||||
$search = $request->input('search', '');
|
$search = $request->input('search', '');
|
||||||
|
|
||||||
$query = Tourism::query();
|
$query = Tourism::query();
|
||||||
if ($search) {
|
|
||||||
$query->where(function ($q) use ($search) {
|
|
||||||
$q->where('business_name', 'like', "%$search%")
|
|
||||||
->orWhere('project_name', 'like', "%$search%")
|
|
||||||
->orWhere('business_address', 'like', "%$search%");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
$tourisms = $query->paginate($perPage);
|
$tourisms = $query->paginate($perPage);
|
||||||
|
|
||||||
$tourisms->getCollection()->transform(function ($tourisms) {
|
$tourisms->getCollection()->transform(function ($tourisms) {
|
||||||
@@ -43,14 +36,8 @@ class TourismController extends Controller
|
|||||||
return $tourisms;
|
return $tourisms;
|
||||||
});
|
});
|
||||||
|
|
||||||
$start = ($tourisms->currentPage()-1) * $perPage + 1;
|
|
||||||
|
|
||||||
$data = $tourisms->map(function ($item, $index) use ($start) {
|
|
||||||
return array_merge($item->toArray(), ['no' => $start + $index]);
|
|
||||||
});
|
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'data' => $data,
|
'data' => TourismResource::collection($tourisms),
|
||||||
'meta' => [
|
'meta' => [
|
||||||
'total' => $tourisms->total(),
|
'total' => $tourisms->total(),
|
||||||
'per_page' => $tourisms->perPage(),
|
'per_page' => $tourisms->perPage(),
|
||||||
@@ -140,18 +127,4 @@ class TourismController extends Controller
|
|||||||
|
|
||||||
return response()->noContent();
|
return response()->noContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function downloadExcelTourism()
|
|
||||||
{
|
|
||||||
$filePath = public_path('templates/template_pariwisata.xlsx');
|
|
||||||
info(sprintf("File Path: %s | Exists: %s", $filePath, file_exists($filePath) ? 'Yes' : 'No'));
|
|
||||||
|
|
||||||
// Cek apakah file ada
|
|
||||||
if (!file_exists($filePath)) {
|
|
||||||
return response()-> json(['message' => 'File tidak ditemukan!'], Response::HTTP_NOT_FOUND);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return file to download
|
|
||||||
return response()->download($filePath);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,17 +27,6 @@ class UmkmController extends Controller
|
|||||||
|
|
||||||
$query = Umkm::query();
|
$query = Umkm::query();
|
||||||
|
|
||||||
if ($search) {
|
|
||||||
$query->where(function ($q) use ($search) {
|
|
||||||
$q->where('business_name', 'like', "%$search%")
|
|
||||||
->orWhere('business_address', 'like', "%$search%")
|
|
||||||
->orWhere('business_desc', 'like', "%$search%")
|
|
||||||
->orWhere('business_id_number', 'like', "%$search%")
|
|
||||||
->orWhere('owner_id', 'like', "%$search%")
|
|
||||||
->orWhere('owner_name', 'like', "%$search%");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$umkm = $query->paginate($perPage);
|
$umkm = $query->paginate($perPage);
|
||||||
|
|
||||||
$umkm->getCollection()->transform(function ($umkm) {
|
$umkm->getCollection()->transform(function ($umkm) {
|
||||||
@@ -58,14 +47,8 @@ class UmkmController extends Controller
|
|||||||
return $umkm;
|
return $umkm;
|
||||||
});
|
});
|
||||||
|
|
||||||
$start = ($umkm->currentPage()-1) * $perPage + 1;
|
|
||||||
|
|
||||||
$data = $umkm->map(function ($item, $index) use ($start) {
|
|
||||||
return array_merge($item->toArray(), ['no' => $start + $index]);
|
|
||||||
});
|
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'data' => $data,
|
'data' => UmkmResource::collection($umkm),
|
||||||
'meta' => [
|
'meta' => [
|
||||||
'total' => $umkm->total(),
|
'total' => $umkm->total(),
|
||||||
'per_page' => $umkm->perPage(),
|
'per_page' => $umkm->perPage(),
|
||||||
@@ -193,7 +176,7 @@ class UmkmController extends Controller
|
|||||||
|
|
||||||
public function downloadExcelUmkm()
|
public function downloadExcelUmkm()
|
||||||
{
|
{
|
||||||
$filePath = public_path('templates/template_umkm.xlsx');
|
$filePath = storage_path('app/public/templates/template_umkm.xlsx');
|
||||||
|
|
||||||
// Cek apakah file ada
|
// Cek apakah file ada
|
||||||
if (!file_exists($filePath)) {
|
if (!file_exists($filePath)) {
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Dashboards;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class LackOfPotentialController extends Controller
|
||||||
|
{
|
||||||
|
public function lack_of_potential(){
|
||||||
|
return view('dashboards.lack_of_potential');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,125 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Controllers\Data;
|
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
|
||||||
use App\Models\SpatialPlanning;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
|
|
||||||
class SpatialPlanningController extends Controller
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Display a listing of the resource.
|
|
||||||
*/
|
|
||||||
public function index()
|
|
||||||
{
|
|
||||||
return view('data.spatialPlannings.index');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* show the form for creating a new resource.
|
|
||||||
*/
|
|
||||||
public function bulkCreate()
|
|
||||||
{
|
|
||||||
return view('data.spatialPlannings.form-upload');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show the form for creating a new resource.
|
|
||||||
*/
|
|
||||||
public function create()
|
|
||||||
{
|
|
||||||
$title = 'Rencana Tata Ruang';
|
|
||||||
$subtitle = "Create Data";
|
|
||||||
|
|
||||||
// Mengambil data untuk dropdown
|
|
||||||
$dropdownOptions = [];
|
|
||||||
|
|
||||||
$fields = $this->getFields();
|
|
||||||
$fieldTypes = $this->getFieldTypes();
|
|
||||||
|
|
||||||
$apiUrl = url('/api/spatial-plannings');
|
|
||||||
return view('data.spatialPlannings.form', compact('title', 'subtitle', 'fields', 'fieldTypes', 'apiUrl', 'dropdownOptions'));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Store a newly created resource in storage.
|
|
||||||
*/
|
|
||||||
public function store(Request $request)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display the specified resource.
|
|
||||||
*/
|
|
||||||
public function show(string $id)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show the form for editing the specified resource.
|
|
||||||
*/
|
|
||||||
public function edit(string $id)
|
|
||||||
{
|
|
||||||
$title = 'Rencana Tata Ruang';
|
|
||||||
$subtitle = 'Update Data';
|
|
||||||
|
|
||||||
$modelInstance = SpatialPlanning::find($id);
|
|
||||||
// Pastikan model ditemukan
|
|
||||||
if (!$modelInstance) {
|
|
||||||
return redirect()->route('spatialPlanning.index') ->with('error', 'Rencana tata ruang tidak ditemukan');
|
|
||||||
}
|
|
||||||
|
|
||||||
$dropdownOptions = [];
|
|
||||||
|
|
||||||
$fields = $this->getFields();
|
|
||||||
$fieldTypes = $this->getFieldTypes();
|
|
||||||
|
|
||||||
$apiUrl = url('/api/spatial-plannings');
|
|
||||||
return view('data.spatialPlannings.form', compact('title', 'subtitle', 'modelInstance', 'fields', 'fieldTypes', 'apiUrl', 'dropdownOptions'));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update the specified resource in storage.
|
|
||||||
*/
|
|
||||||
public function update(Request $request, string $id)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove the specified resource from storage.
|
|
||||||
*/
|
|
||||||
public function destroy(string $id)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getFields()
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
"name"=> "Nama",
|
|
||||||
"kbli"=> "KBLI",
|
|
||||||
"activities"=> "Kegiatan",
|
|
||||||
"area"=> "Luas (m2)",
|
|
||||||
"location"=> "Lokasi",
|
|
||||||
"number"=> "Nomor",
|
|
||||||
"date"=> "Tanggal",
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getFieldTypes()
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
"name"=> "text",
|
|
||||||
"kbli"=> "text",
|
|
||||||
"activities"=> "text",
|
|
||||||
"area"=> "text",
|
|
||||||
"location"=> "text",
|
|
||||||
"number"=> "text",
|
|
||||||
"date"=> "date",
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -53,7 +53,7 @@ class TourismController extends Controller
|
|||||||
public function edit($id)
|
public function edit($id)
|
||||||
{
|
{
|
||||||
$title = 'Pariwisata';
|
$title = 'Pariwisata';
|
||||||
$subtitle = 'Update Data';
|
$subtitle = 'Create Data';
|
||||||
|
|
||||||
$modelInstance = Tourism::find($id);
|
$modelInstance = Tourism::find($id);
|
||||||
// Pastikan model ditemukan
|
// Pastikan model ditemukan
|
||||||
|
|||||||
@@ -40,40 +40,4 @@ class AdvertisementRequest extends FormRequest
|
|||||||
'contact' => 'required|string',
|
'contact' => 'required|string',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* pesan error validasi
|
|
||||||
*/
|
|
||||||
public function messages(): array
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
'no.required' => 'Nomor harus diisi.',
|
|
||||||
'business_name.required' => 'Nama usaha harus diisi.',
|
|
||||||
'business_name.string' => 'Nama usaha harus berupa teks.',
|
|
||||||
'npwpd.required' => 'NPWPD harus diisi.',
|
|
||||||
'npwpd.string' => 'NPWPD harus berupa teks.',
|
|
||||||
'advertisement_type.required' => 'Jenis reklame harus diisi.',
|
|
||||||
'advertisement_type.string' => 'Jenis reklame harus berupa teks.',
|
|
||||||
'advertisement_content.required' => 'Isi reklame harus diisi.',
|
|
||||||
'advertisement_content.string' => 'Isi reklame harus berupa teks.',
|
|
||||||
'business_address.required' => 'Alamat usaha harus diisi.',
|
|
||||||
'business_address.string' => 'Alamat usaha harus berupa teks.',
|
|
||||||
'advertisement_location.required' => 'Lokasi reklame harus diisi.',
|
|
||||||
'advertisement_location.string' => 'Lokasi reklame harus berupa teks.',
|
|
||||||
'village_name.required' => 'Nama desa harus diisi.',
|
|
||||||
'district_name.required' => 'Nama kecamatan harus diisi.',
|
|
||||||
'length.required' => 'Panjang harus diisi.',
|
|
||||||
'width.required' => 'Lebar harus diisi.',
|
|
||||||
'viewing_angle.required' => 'Sudut pandang harus diisi.',
|
|
||||||
'viewing_angle.string' => 'Sudut pandang harus berupa teks.',
|
|
||||||
'face.required' => 'Jumlah sisi harus diisi.',
|
|
||||||
'face.string' => 'Jumlah sisi harus berupa teks.',
|
|
||||||
'area.required' => 'Luas harus diisi.',
|
|
||||||
'area.string' => 'Luas harus berupa teks.',
|
|
||||||
'angle.required' => 'Sudut harus diisi.',
|
|
||||||
'angle.string' => 'Sudut harus berupa teks.',
|
|
||||||
'contact.required' => 'Kontak harus diisi.',
|
|
||||||
'contact.string' => 'Kontak harus berupa teks.',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,52 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Requests;
|
|
||||||
|
|
||||||
use Illuminate\Foundation\Http\FormRequest;
|
|
||||||
|
|
||||||
class SpatialPlanningRequest 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' => 'string',
|
|
||||||
'kbli' => 'string',
|
|
||||||
'activities' => 'string',
|
|
||||||
'area' => 'string',
|
|
||||||
'location' => 'string',
|
|
||||||
'number' => 'string',
|
|
||||||
'date' => 'date_format:Y-m-d',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the validation messages for the defined validation rules.
|
|
||||||
*
|
|
||||||
* @return array<string, string>
|
|
||||||
*/
|
|
||||||
public function messages(): array
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
'name.string' => 'Kolom Nama harus berupa teks.',
|
|
||||||
'kbli.string' => 'Kolom KBLI harus berupa teks.',
|
|
||||||
'activities.string' => 'Kolom Kegiatan harus berupa teks.',
|
|
||||||
'area.string' => 'Kolom Area harus berupa teks.',
|
|
||||||
'location.string' => 'Kolom Lokasi harus berupa teks.',
|
|
||||||
'number.string' => 'Kolom Nomor harus berupa teks.',
|
|
||||||
'date.date_format' => 'Format tanggal tidak valid, gunakan format Y-m-d H:i:s.',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -49,85 +49,4 @@ class TourismRequest extends FormRequest
|
|||||||
'tki' => 'required|string',
|
'tki' => 'required|string',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the validation messages for the defined validation rules.
|
|
||||||
*
|
|
||||||
* @return array<string, string>
|
|
||||||
*/
|
|
||||||
public function messages(): array
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
'project_id.required' => 'ID proyek harus diisi.',
|
|
||||||
'project_id.string' => 'ID proyek harus berupa teks.',
|
|
||||||
|
|
||||||
'project_type_id.required' => 'ID tipe proyek harus diisi.',
|
|
||||||
'project_type_id.string' => 'ID tipe proyek harus berupa teks.',
|
|
||||||
|
|
||||||
'nib.required' => 'NIB harus diisi.',
|
|
||||||
'nib.string' => 'NIB harus berupa teks.',
|
|
||||||
|
|
||||||
'business_name.required' => 'Nama usaha harus diisi.',
|
|
||||||
'business_name.string' => 'Nama usaha harus berupa teks.',
|
|
||||||
|
|
||||||
'oss_publication_date.required' => 'Tanggal publikasi OSS harus diisi.',
|
|
||||||
|
|
||||||
'investment_status_description.required' => 'Deskripsi status investasi harus diisi.',
|
|
||||||
'investment_status_description.string' => 'Deskripsi status investasi harus berupa teks.',
|
|
||||||
|
|
||||||
'business_form.required' => 'Bentuk usaha harus diisi.',
|
|
||||||
'business_form.string' => 'Bentuk usaha harus berupa teks.',
|
|
||||||
|
|
||||||
'project_risk.required' => 'Risiko proyek harus diisi.',
|
|
||||||
'project_risk.string' => 'Risiko proyek harus berupa teks.',
|
|
||||||
|
|
||||||
'project_name.required' => 'Nama proyek harus diisi.',
|
|
||||||
'project_name.string' => 'Nama proyek harus berupa teks.',
|
|
||||||
|
|
||||||
'business_scale.required' => 'Skala usaha harus diisi.',
|
|
||||||
'business_scale.string' => 'Skala usaha harus berupa teks.',
|
|
||||||
|
|
||||||
'business_address.required' => 'Alamat usaha harus diisi.',
|
|
||||||
'business_address.string' => 'Alamat usaha harus berupa teks.',
|
|
||||||
|
|
||||||
'district_name.required' => 'Nama kecamatan harus diisi.',
|
|
||||||
|
|
||||||
'village_name.required' => 'Nama desa harus diisi.',
|
|
||||||
|
|
||||||
'longitude.required' => 'Garis bujur harus diisi.',
|
|
||||||
'longitude.string' => 'Garis bujur harus berupa teks.',
|
|
||||||
|
|
||||||
'latitude.required' => 'Garis lintang harus diisi.',
|
|
||||||
'latitude.string' => 'Garis lintang harus berupa teks.',
|
|
||||||
|
|
||||||
'project_submission_date.required' => 'Tanggal pengajuan proyek harus diisi.',
|
|
||||||
|
|
||||||
'kbli.required' => 'Kode KBLI harus diisi.',
|
|
||||||
'kbli.string' => 'Kode KBLI harus berupa teks.',
|
|
||||||
|
|
||||||
'kbli_title.required' => 'Judul KBLI harus diisi.',
|
|
||||||
'kbli_title.string' => 'Judul KBLI harus berupa teks.',
|
|
||||||
|
|
||||||
'supervisory_sector.required' => 'Sektor pengawasan harus diisi.',
|
|
||||||
'supervisory_sector.string' => 'Sektor pengawasan harus berupa teks.',
|
|
||||||
|
|
||||||
'user_name.required' => 'Nama pengguna harus diisi.',
|
|
||||||
'user_name.string' => 'Nama pengguna harus berupa teks.',
|
|
||||||
|
|
||||||
'email.required' => 'Email harus diisi.',
|
|
||||||
'email.string' => 'Email harus berupa teks.',
|
|
||||||
|
|
||||||
'contact.required' => 'Kontak harus diisi.',
|
|
||||||
'contact.string' => 'Kontak harus berupa teks.',
|
|
||||||
|
|
||||||
'land_area_in_m2.required' => 'Luas lahan dalam m² harus diisi.',
|
|
||||||
'land_area_in_m2.string' => 'Luas lahan dalam m² harus berupa teks.',
|
|
||||||
|
|
||||||
'investment_amount.required' => 'Jumlah investasi harus diisi.',
|
|
||||||
'investment_amount.string' => 'Jumlah investasi harus berupa teks.',
|
|
||||||
|
|
||||||
'tki.required' => 'Jumlah tenaga kerja Indonesia harus diisi.',
|
|
||||||
'tki.string' => 'Jumlah tenaga kerja Indonesia harus berupa teks.',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Resources;
|
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Http\Resources\Json\JsonResource;
|
|
||||||
|
|
||||||
class SpatialPlanningResource extends JsonResource
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Transform the resource into an array.
|
|
||||||
*
|
|
||||||
* @return array<string, mixed>
|
|
||||||
*/
|
|
||||||
public function toArray(Request $request): array
|
|
||||||
{
|
|
||||||
return parent::toArray($request);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Imports;
|
|
||||||
|
|
||||||
use App\Models\SpatialPlanning;
|
|
||||||
use Illuminate\Support\Collection;
|
|
||||||
use Maatwebsite\Excel\Concerns\ToCollection;
|
|
||||||
use Illuminate\Support\Facades\DB;
|
|
||||||
use DateTime;
|
|
||||||
use Carbon\Carbon;
|
|
||||||
|
|
||||||
class SpatialPlanningImport implements ToCollection
|
|
||||||
{
|
|
||||||
protected static $processed = false;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Process each row in the file
|
|
||||||
*/
|
|
||||||
public function collection(Collection $rows)
|
|
||||||
{
|
|
||||||
if (self::$processed) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
self::$processed = true;
|
|
||||||
|
|
||||||
if ($rows->isEmpty())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//cari header secara otomatis
|
|
||||||
$header = $rows->first();
|
|
||||||
$headerIndex = collect($header)->search(fn($value) => !empty($value));
|
|
||||||
|
|
||||||
// Pastikan header ditemukan
|
|
||||||
if ($headerIndex === false) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($rows->skip(1) as $row) {
|
|
||||||
$dateValue = trim($row[7]);
|
|
||||||
info($dateValue);
|
|
||||||
$parsedDate = Carbon::createFromFormat('Y-m-d', $dateValue)->format('Y-m-d');
|
|
||||||
info($parsedDate);
|
|
||||||
|
|
||||||
$dataToInsert[] = [
|
|
||||||
'name'=>$row[1],
|
|
||||||
'kbli'=>$row[2],
|
|
||||||
'activities'=>$row[3],
|
|
||||||
'area'=>$row[4],
|
|
||||||
'location'=>$row[5],
|
|
||||||
'number'=>$row[6],
|
|
||||||
'date'=>$parsedDate,
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($dataToInsert)) {
|
|
||||||
SpatialPlanning::insert($dataToInsert);
|
|
||||||
} else {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -65,6 +65,13 @@ class TourismImport implements ToCollection
|
|||||||
// ambill village code yang village_name sama dengan $villageName
|
// ambill village code yang village_name sama dengan $villageName
|
||||||
$villageCode = $listTrueVillage[$villageName]['village_code'] ?? '000000';
|
$villageCode = $listTrueVillage[$villageName]['village_code'] ?? '000000';
|
||||||
|
|
||||||
|
|
||||||
|
// if (empty($row[16])) {
|
||||||
|
// info("Data kosong");
|
||||||
|
// } else {
|
||||||
|
// info("Baris ke- | Nilai: " . $row[16]);
|
||||||
|
// }
|
||||||
|
|
||||||
$excelSerialDate = $row[16];
|
$excelSerialDate = $row[16];
|
||||||
if (is_numeric($excelSerialDate)) {
|
if (is_numeric($excelSerialDate)) {
|
||||||
$projectSubmissionDate = Carbon::createFromFormat('Y-m-d', '1899-12-30')
|
$projectSubmissionDate = Carbon::createFromFormat('Y-m-d', '1899-12-30')
|
||||||
@@ -75,6 +82,8 @@ class TourismImport implements ToCollection
|
|||||||
->format('Y-m-d H:i:s');
|
->format('Y-m-d H:i:s');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
info("Tanggal dikonversi: " . $projectSubmissionDate);
|
||||||
|
|
||||||
$dataToInsert[] = [
|
$dataToInsert[] = [
|
||||||
'project_id' => $row[1],
|
'project_id' => $row[1],
|
||||||
'project_type_id' => $row[2],
|
'project_type_id' => $row[2],
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Models;
|
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class SpatialPlanning
|
|
||||||
*
|
|
||||||
* @property $id
|
|
||||||
* @property $created_at
|
|
||||||
* @property $updated_at
|
|
||||||
* @property $name
|
|
||||||
* @property $kbli
|
|
||||||
* @property $activities
|
|
||||||
* @property $area
|
|
||||||
* @property $location
|
|
||||||
* @property $number
|
|
||||||
* @property $date
|
|
||||||
*
|
|
||||||
* @package App
|
|
||||||
* @mixin \Illuminate\Database\Eloquent\Builder
|
|
||||||
*/
|
|
||||||
class SpatialPlanning extends Model
|
|
||||||
{
|
|
||||||
|
|
||||||
protected $perPage = 20;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The attributes that are mass assignable.
|
|
||||||
*
|
|
||||||
* @var array<int, string>
|
|
||||||
*/
|
|
||||||
protected $fillable = ['name', 'kbli', 'activities', 'area', 'location', 'number', 'date'];
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
26
app/View/Components/CustomCircle.php
Normal file
26
app/View/Components/CustomCircle.php
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\View\Components;
|
||||||
|
|
||||||
|
use Closure;
|
||||||
|
use Illuminate\Contracts\View\View;
|
||||||
|
use Illuminate\View\Component;
|
||||||
|
|
||||||
|
class CustomCircle extends Component
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Create a new component instance.
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the view / contents that represent the component.
|
||||||
|
*/
|
||||||
|
public function render(): View|Closure|string
|
||||||
|
{
|
||||||
|
return view('components.custom-circle');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
return new class extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*/
|
|
||||||
public function up(): void
|
|
||||||
{
|
|
||||||
Schema::create('spatial_planning', function (Blueprint $table) {
|
|
||||||
$table->id();
|
|
||||||
$table->timestamp('created_at')->default(DB::raw('CURRENT_TIMESTAMP'));
|
|
||||||
$table->timestamp('updated_at')->default(DB::raw('CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'));
|
|
||||||
$table->string('name')->nullable();
|
|
||||||
$table->string('kbli')->nullable();
|
|
||||||
$table->string('activities')->nullable();
|
|
||||||
$table->string('area')->nullable();
|
|
||||||
$table->string('location')->nullable();
|
|
||||||
$table->string('number')->nullable();
|
|
||||||
$table->dateTime('date')->nullable();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*/
|
|
||||||
public function down(): void
|
|
||||||
{
|
|
||||||
Schema::dropIfExists('spatial_planning');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
return new class extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*/
|
|
||||||
public function up(): void
|
|
||||||
{
|
|
||||||
Schema::rename('spatial_planning', 'spatial_plannings');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*/
|
|
||||||
public function down(): void
|
|
||||||
{
|
|
||||||
Schema::rename('spatial_plannings', 'spatial_planning');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -109,6 +109,13 @@ class UsersRoleMenuSeeder extends Seeder
|
|||||||
"parent_id" => $dashboard->id,
|
"parent_id" => $dashboard->id,
|
||||||
"sort_order" => 2,
|
"sort_order" => 2,
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
"name" => "Dashboard Potensi",
|
||||||
|
"url" => "dashboard.lack_of_potential",
|
||||||
|
"icon" => null,
|
||||||
|
"parent_id" => $dashboard->id,
|
||||||
|
"sort_order" => 3,
|
||||||
|
],
|
||||||
[
|
[
|
||||||
"name" => "Users",
|
"name" => "Users",
|
||||||
"url" => "users.index",
|
"url" => "users.index",
|
||||||
@@ -205,6 +212,7 @@ class UsersRoleMenuSeeder extends Seeder
|
|||||||
$pariwisata = Menu::where('name', 'Pariwisata')->first();
|
$pariwisata = Menu::where('name', 'Pariwisata')->first();
|
||||||
$laporan_pariwisata = Menu::where('name', 'Lap Pariwisata')->first();
|
$laporan_pariwisata = Menu::where('name', 'Lap Pariwisata')->first();
|
||||||
$umkm = Menu::where('name', 'UMKM')->first();
|
$umkm = Menu::where('name', 'UMKM')->first();
|
||||||
|
$lack_of_potentials = Menu::where('name', 'Dashboard Potensi')->first();
|
||||||
|
|
||||||
// Superadmin gets all menus
|
// Superadmin gets all menus
|
||||||
$superadmin->menus()->sync([
|
$superadmin->menus()->sync([
|
||||||
@@ -229,6 +237,7 @@ class UsersRoleMenuSeeder extends Seeder
|
|||||||
$pariwisata->id => ["allow_show" => true, "allow_create" => true, "allow_update" => true, "allow_destroy" => true],
|
$pariwisata->id => ["allow_show" => true, "allow_create" => true, "allow_update" => true, "allow_destroy" => true],
|
||||||
$laporan_pariwisata->id => ["allow_show" => true, "allow_create" => true, "allow_update" => true, "allow_destroy" => true],
|
$laporan_pariwisata->id => ["allow_show" => true, "allow_create" => true, "allow_update" => true, "allow_destroy" => true],
|
||||||
$umkm->id => ["allow_show" => true, "allow_create" => true, "allow_update" => true, "allow_destroy" => true],
|
$umkm->id => ["allow_show" => true, "allow_create" => true, "allow_update" => true, "allow_destroy" => true],
|
||||||
|
$lack_of_potentials->id => ["allow_show" => true, "allow_create" => true, "allow_update" => true, "allow_destroy" => true],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Admin gets limited menus
|
// Admin gets limited menus
|
||||||
|
|||||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "sibedas-pbg-web",
|
"name": "sibedas-pbg",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
|
|||||||
@@ -1,516 +0,0 @@
|
|||||||
{
|
|
||||||
"__commonjsHelpers-C4iS2aBk.js": {
|
|
||||||
"file": "assets/_commonjsHelpers-C4iS2aBk.js",
|
|
||||||
"name": "_commonjsHelpers"
|
|
||||||
},
|
|
||||||
"_apexcharts.common-7mov3gaG.js": {
|
|
||||||
"file": "assets/apexcharts.common-7mov3gaG.js",
|
|
||||||
"name": "apexcharts.common",
|
|
||||||
"imports": [
|
|
||||||
"__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"
|
|
||||||
},
|
|
||||||
"_gridjs.umd-BiCNXlqL.js": {
|
|
||||||
"file": "assets/gridjs.umd-BiCNXlqL.js",
|
|
||||||
"name": "gridjs.umd",
|
|
||||||
"imports": [
|
|
||||||
"__commonjsHelpers-C4iS2aBk.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"_table-generator-DPFVsCqk.js": {
|
|
||||||
"file": "assets/table-generator-DPFVsCqk.js",
|
|
||||||
"name": "table-generator",
|
|
||||||
"imports": [
|
|
||||||
"_gridjs.umd-BiCNXlqL.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"_world-BH8KG5u4.js": {
|
|
||||||
"file": "assets/world-BH8KG5u4.js",
|
|
||||||
"name": "world",
|
|
||||||
"imports": [
|
|
||||||
"__commonjsHelpers-C4iS2aBk.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"node_modules/flatpickr/dist/flatpickr.min.css": {
|
|
||||||
"file": "assets/flatpickr-CksuuEqD.css",
|
|
||||||
"src": "node_modules/flatpickr/dist/flatpickr.min.css",
|
|
||||||
"isEntry": true
|
|
||||||
},
|
|
||||||
"node_modules/flatpickr/dist/themes/dark.css": {
|
|
||||||
"file": "assets/dark-CLxH30By.css",
|
|
||||||
"src": "node_modules/flatpickr/dist/themes/dark.css",
|
|
||||||
"isEntry": true
|
|
||||||
},
|
|
||||||
"node_modules/gridjs/dist/theme/mermaid.css": {
|
|
||||||
"file": "assets/mermaid-B5wPN5RC.css",
|
|
||||||
"src": "node_modules/gridjs/dist/theme/mermaid.css",
|
|
||||||
"isEntry": true
|
|
||||||
},
|
|
||||||
"node_modules/gridjs/dist/theme/mermaid.min.css": {
|
|
||||||
"file": "assets/mermaid-1KsrsKla.css",
|
|
||||||
"src": "node_modules/gridjs/dist/theme/mermaid.min.css",
|
|
||||||
"isEntry": true
|
|
||||||
},
|
|
||||||
"node_modules/quill/dist/quill.bubble.css": {
|
|
||||||
"file": "assets/quill-BzaoboQ1.css",
|
|
||||||
"src": "node_modules/quill/dist/quill.bubble.css",
|
|
||||||
"isEntry": true
|
|
||||||
},
|
|
||||||
"node_modules/quill/dist/quill.snow.css": {
|
|
||||||
"file": "assets/quill-D-Ncpkvi.css",
|
|
||||||
"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"
|
|
||||||
},
|
|
||||||
"resources/fonts/boxicons.svg": {
|
|
||||||
"file": "assets/boxicons-KSR1BgPC.svg",
|
|
||||||
"src": "resources/fonts/boxicons.svg"
|
|
||||||
},
|
|
||||||
"resources/fonts/boxicons.ttf": {
|
|
||||||
"file": "assets/boxicons-BEZXjQG5.ttf",
|
|
||||||
"src": "resources/fonts/boxicons.ttf"
|
|
||||||
},
|
|
||||||
"resources/fonts/boxicons.woff": {
|
|
||||||
"file": "assets/boxicons-CEgI8ccS.woff",
|
|
||||||
"src": "resources/fonts/boxicons.woff"
|
|
||||||
},
|
|
||||||
"resources/fonts/boxicons.woff2": {
|
|
||||||
"file": "assets/boxicons-C7pETWQJ.woff2",
|
|
||||||
"src": "resources/fonts/boxicons.woff2"
|
|
||||||
},
|
|
||||||
"resources/js/app.js": {
|
|
||||||
"file": "assets/app-Wz_4hh3O.js",
|
|
||||||
"name": "app",
|
|
||||||
"src": "resources/js/app.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"__commonjsHelpers-C4iS2aBk.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/business-industries/create.js": {
|
|
||||||
"file": "assets/create-CiRhiWZV.js",
|
|
||||||
"name": "create",
|
|
||||||
"src": "resources/js/business-industries/create.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"_dropzone-B5tMhgFp.js",
|
|
||||||
"_global-config-9uDKFQ8j.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/business-industries/index.js": {
|
|
||||||
"file": "assets/index-BIXijOG8.js",
|
|
||||||
"name": "index",
|
|
||||||
"src": "resources/js/business-industries/index.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"_gridjs.umd-BiCNXlqL.js",
|
|
||||||
"_global-config-9uDKFQ8j.js",
|
|
||||||
"__commonjsHelpers-C4iS2aBk.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/business-industries/update.js": {
|
|
||||||
"file": "assets/update-C8VOvIbF.js",
|
|
||||||
"name": "update",
|
|
||||||
"src": "resources/js/business-industries/update.js",
|
|
||||||
"isEntry": true
|
|
||||||
},
|
|
||||||
"resources/js/config.js": {
|
|
||||||
"file": "assets/config-DqV4EBmE.js",
|
|
||||||
"name": "config",
|
|
||||||
"src": "resources/js/config.js",
|
|
||||||
"isEntry": true
|
|
||||||
},
|
|
||||||
"resources/js/dashboards/bigdata.js": {
|
|
||||||
"file": "assets/bigdata-BGlke4DN.js",
|
|
||||||
"name": "bigdata",
|
|
||||||
"src": "resources/js/dashboards/bigdata.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"_global-config-9uDKFQ8j.js"
|
|
||||||
],
|
|
||||||
"css": [
|
|
||||||
"assets/flatpickr-CksuuEqD.css"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/data-settings/create.js": {
|
|
||||||
"file": "assets/create-C1IbeTHP.js",
|
|
||||||
"name": "create",
|
|
||||||
"src": "resources/js/data-settings/create.js",
|
|
||||||
"isEntry": true
|
|
||||||
},
|
|
||||||
"resources/js/data-settings/index.js": {
|
|
||||||
"file": "assets/index-C4raIbBK.js",
|
|
||||||
"name": "index",
|
|
||||||
"src": "resources/js/data-settings/index.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"_gridjs.umd-BiCNXlqL.js",
|
|
||||||
"_global-config-9uDKFQ8j.js",
|
|
||||||
"__commonjsHelpers-C4iS2aBk.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/data-settings/update.js": {
|
|
||||||
"file": "assets/update-nNw3P4hj.js",
|
|
||||||
"name": "update",
|
|
||||||
"src": "resources/js/data-settings/update.js",
|
|
||||||
"isEntry": true
|
|
||||||
},
|
|
||||||
"resources/js/data/advertisements/data-advertisements.js": {
|
|
||||||
"file": "assets/data-advertisements-ckr1EtLP.js",
|
|
||||||
"name": "data-advertisements",
|
|
||||||
"src": "resources/js/data/advertisements/data-advertisements.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"_gridjs.umd-BiCNXlqL.js",
|
|
||||||
"_global-config-9uDKFQ8j.js",
|
|
||||||
"_table-generator-DPFVsCqk.js",
|
|
||||||
"__commonjsHelpers-C4iS2aBk.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/data/advertisements/form-create-update.js": {
|
|
||||||
"file": "assets/form-create-update-CyN97GsU.js",
|
|
||||||
"name": "form-create-update",
|
|
||||||
"src": "resources/js/data/advertisements/form-create-update.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"_global-config-9uDKFQ8j.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/data/advertisements/form-upload.js": {
|
|
||||||
"file": "assets/form-upload-tA9zPESO.js",
|
|
||||||
"name": "form-upload",
|
|
||||||
"src": "resources/js/data/advertisements/form-upload.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"_dropzone-B5tMhgFp.js",
|
|
||||||
"_global-config-9uDKFQ8j.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/data/tourisms/data-tourisms.js": {
|
|
||||||
"file": "assets/data-tourisms-Db9aMSJn.js",
|
|
||||||
"name": "data-tourisms",
|
|
||||||
"src": "resources/js/data/tourisms/data-tourisms.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"_gridjs.umd-BiCNXlqL.js",
|
|
||||||
"_global-config-9uDKFQ8j.js",
|
|
||||||
"_table-generator-DPFVsCqk.js",
|
|
||||||
"__commonjsHelpers-C4iS2aBk.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/data/tourisms/form-create-update.js": {
|
|
||||||
"file": "assets/form-create-update-SviVezNW.js",
|
|
||||||
"name": "form-create-update",
|
|
||||||
"src": "resources/js/data/tourisms/form-create-update.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"_global-config-9uDKFQ8j.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/data/tourisms/form-upload.js": {
|
|
||||||
"file": "assets/form-upload-BtbLOLpA.js",
|
|
||||||
"name": "form-upload",
|
|
||||||
"src": "resources/js/data/tourisms/form-upload.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"_dropzone-B5tMhgFp.js",
|
|
||||||
"_global-config-9uDKFQ8j.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/data/umkm/data-umkm.js": {
|
|
||||||
"file": "assets/data-umkm-CLB33rMj.js",
|
|
||||||
"name": "data-umkm",
|
|
||||||
"src": "resources/js/data/umkm/data-umkm.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"_gridjs.umd-BiCNXlqL.js",
|
|
||||||
"_global-config-9uDKFQ8j.js",
|
|
||||||
"_table-generator-DPFVsCqk.js",
|
|
||||||
"__commonjsHelpers-C4iS2aBk.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/data/umkm/form-create-update.js": {
|
|
||||||
"file": "assets/form-create-update-BrB0xTMN.js",
|
|
||||||
"name": "form-create-update",
|
|
||||||
"src": "resources/js/data/umkm/form-create-update.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"_global-config-9uDKFQ8j.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/data/umkm/form-upload.js": {
|
|
||||||
"file": "assets/form-upload-BDyAWo4b.js",
|
|
||||||
"name": "form-upload",
|
|
||||||
"src": "resources/js/data/umkm/form-upload.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"_dropzone-B5tMhgFp.js",
|
|
||||||
"_global-config-9uDKFQ8j.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/master/users/create.js": {
|
|
||||||
"file": "assets/create-BfiYISiN.js",
|
|
||||||
"name": "create",
|
|
||||||
"src": "resources/js/master/users/create.js",
|
|
||||||
"isEntry": true
|
|
||||||
},
|
|
||||||
"resources/js/master/users/update.js": {
|
|
||||||
"file": "assets/update-DhoG4v8r.js",
|
|
||||||
"name": "update",
|
|
||||||
"src": "resources/js/master/users/update.js",
|
|
||||||
"isEntry": true
|
|
||||||
},
|
|
||||||
"resources/js/master/users/users.js": {
|
|
||||||
"file": "assets/users-jfWUOWyP.js",
|
|
||||||
"name": "users",
|
|
||||||
"src": "resources/js/master/users/users.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"_gridjs.umd-BiCNXlqL.js",
|
|
||||||
"_global-config-9uDKFQ8j.js",
|
|
||||||
"__commonjsHelpers-C4iS2aBk.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/menus/create.js": {
|
|
||||||
"file": "assets/create-ChUgh-yc.js",
|
|
||||||
"name": "create",
|
|
||||||
"src": "resources/js/menus/create.js",
|
|
||||||
"isEntry": true
|
|
||||||
},
|
|
||||||
"resources/js/menus/index.js": {
|
|
||||||
"file": "assets/index-C4xA1kYa.js",
|
|
||||||
"name": "index",
|
|
||||||
"src": "resources/js/menus/index.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"_gridjs.umd-BiCNXlqL.js",
|
|
||||||
"_global-config-9uDKFQ8j.js",
|
|
||||||
"__commonjsHelpers-C4iS2aBk.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/menus/update.js": {
|
|
||||||
"file": "assets/update-8JQOGES4.js",
|
|
||||||
"name": "update",
|
|
||||||
"src": "resources/js/menus/update.js",
|
|
||||||
"isEntry": true
|
|
||||||
},
|
|
||||||
"resources/js/pages/chart.js": {
|
|
||||||
"file": "assets/chart-DQBoD9wk.js",
|
|
||||||
"name": "chart",
|
|
||||||
"src": "resources/js/pages/chart.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"_apexcharts.common-7mov3gaG.js",
|
|
||||||
"__commonjsHelpers-C4iS2aBk.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/pages/dashboard.js": {
|
|
||||||
"file": "assets/dashboard-nkb3Omy9.js",
|
|
||||||
"name": "dashboard",
|
|
||||||
"src": "resources/js/pages/dashboard.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"_apexcharts.common-7mov3gaG.js",
|
|
||||||
"_world-BH8KG5u4.js",
|
|
||||||
"__commonjsHelpers-C4iS2aBk.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/pages/form-fileupload.js": {
|
|
||||||
"file": "assets/form-fileupload-DGbdX8GT.js",
|
|
||||||
"name": "form-fileupload",
|
|
||||||
"src": "resources/js/pages/form-fileupload.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"_dropzone-B5tMhgFp.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/pages/form-flatepicker.js": {
|
|
||||||
"file": "assets/form-flatepicker-ChSlk6xC.js",
|
|
||||||
"name": "form-flatepicker",
|
|
||||||
"src": "resources/js/pages/form-flatepicker.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"__commonjsHelpers-C4iS2aBk.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/pages/form-quilljs.js": {
|
|
||||||
"file": "assets/form-quilljs-pSObT4Ti.js",
|
|
||||||
"name": "form-quilljs",
|
|
||||||
"src": "resources/js/pages/form-quilljs.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"__commonjsHelpers-C4iS2aBk.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/pages/maps-canada.js": {
|
|
||||||
"file": "assets/maps-canada-Btz07hSk.js",
|
|
||||||
"name": "maps-canada",
|
|
||||||
"src": "resources/js/pages/maps-canada.js",
|
|
||||||
"isEntry": true
|
|
||||||
},
|
|
||||||
"resources/js/pages/maps-google.js": {
|
|
||||||
"file": "assets/maps-google-KamR_rNw.js",
|
|
||||||
"name": "maps-google",
|
|
||||||
"src": "resources/js/pages/maps-google.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"__commonjsHelpers-C4iS2aBk.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/pages/maps-iraq.js": {
|
|
||||||
"file": "assets/maps-iraq-Blhf9V_8.js",
|
|
||||||
"name": "maps-iraq",
|
|
||||||
"src": "resources/js/pages/maps-iraq.js",
|
|
||||||
"isEntry": true
|
|
||||||
},
|
|
||||||
"resources/js/pages/maps-russia.js": {
|
|
||||||
"file": "assets/maps-russia-C3XucoMP.js",
|
|
||||||
"name": "maps-russia",
|
|
||||||
"src": "resources/js/pages/maps-russia.js",
|
|
||||||
"isEntry": true
|
|
||||||
},
|
|
||||||
"resources/js/pages/maps-spain.js": {
|
|
||||||
"file": "assets/maps-spain-CdBIHB66.js",
|
|
||||||
"name": "maps-spain",
|
|
||||||
"src": "resources/js/pages/maps-spain.js",
|
|
||||||
"isEntry": true
|
|
||||||
},
|
|
||||||
"resources/js/pages/maps-vector.js": {
|
|
||||||
"file": "assets/maps-vector-C2WpvMU7.js",
|
|
||||||
"name": "maps-vector",
|
|
||||||
"src": "resources/js/pages/maps-vector.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"_world-BH8KG5u4.js",
|
|
||||||
"__commonjsHelpers-C4iS2aBk.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/pages/table-gridjs.js": {
|
|
||||||
"file": "assets/table-gridjs-BQh80cFh.js",
|
|
||||||
"name": "table-gridjs",
|
|
||||||
"src": "resources/js/pages/table-gridjs.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"_gridjs.umd-BiCNXlqL.js",
|
|
||||||
"__commonjsHelpers-C4iS2aBk.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/pbg-task/index.js": {
|
|
||||||
"file": "assets/index-CqcfkvSL.js",
|
|
||||||
"name": "index",
|
|
||||||
"src": "resources/js/pbg-task/index.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"_gridjs.umd-BiCNXlqL.js",
|
|
||||||
"_global-config-9uDKFQ8j.js",
|
|
||||||
"__commonjsHelpers-C4iS2aBk.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/report/tourisms/index.js": {
|
|
||||||
"file": "assets/index-DlxOSPEG.js",
|
|
||||||
"name": "index",
|
|
||||||
"src": "resources/js/report/tourisms/index.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"_gridjs.umd-BiCNXlqL.js",
|
|
||||||
"__commonjsHelpers-C4iS2aBk.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/roles/create.js": {
|
|
||||||
"file": "assets/create-Dd-lHOwF.js",
|
|
||||||
"name": "create",
|
|
||||||
"src": "resources/js/roles/create.js",
|
|
||||||
"isEntry": true
|
|
||||||
},
|
|
||||||
"resources/js/roles/index.js": {
|
|
||||||
"file": "assets/index-C_kI_q7O.js",
|
|
||||||
"name": "index",
|
|
||||||
"src": "resources/js/roles/index.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"_gridjs.umd-BiCNXlqL.js",
|
|
||||||
"_global-config-9uDKFQ8j.js",
|
|
||||||
"__commonjsHelpers-C4iS2aBk.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/roles/role_menu.js": {
|
|
||||||
"file": "assets/role_menu-BuFAi1wM.js",
|
|
||||||
"name": "role_menu",
|
|
||||||
"src": "resources/js/roles/role_menu.js",
|
|
||||||
"isEntry": true
|
|
||||||
},
|
|
||||||
"resources/js/roles/update.js": {
|
|
||||||
"file": "assets/update-CapXnAP8.js",
|
|
||||||
"name": "update",
|
|
||||||
"src": "resources/js/roles/update.js",
|
|
||||||
"isEntry": true
|
|
||||||
},
|
|
||||||
"resources/js/settings/general/general-settings.js": {
|
|
||||||
"file": "assets/general-settings-BoJeYQk1.js",
|
|
||||||
"name": "general-settings",
|
|
||||||
"src": "resources/js/settings/general/general-settings.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"_gridjs.umd-BiCNXlqL.js",
|
|
||||||
"_global-config-9uDKFQ8j.js",
|
|
||||||
"__commonjsHelpers-C4iS2aBk.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/settings/syncronize/syncronize.js": {
|
|
||||||
"file": "assets/syncronize-DjtcngRb.js",
|
|
||||||
"name": "syncronize",
|
|
||||||
"src": "resources/js/settings/syncronize/syncronize.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"_gridjs.umd-BiCNXlqL.js",
|
|
||||||
"_global-config-9uDKFQ8j.js",
|
|
||||||
"__commonjsHelpers-C4iS2aBk.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/js/tables/common-table.js": {
|
|
||||||
"file": "assets/common-table-KF_NVAIE.js",
|
|
||||||
"name": "common-table",
|
|
||||||
"src": "resources/js/tables/common-table.js",
|
|
||||||
"isEntry": true,
|
|
||||||
"imports": [
|
|
||||||
"_gridjs.umd-BiCNXlqL.js",
|
|
||||||
"_global-config-9uDKFQ8j.js",
|
|
||||||
"__commonjsHelpers-C4iS2aBk.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resources/scss/components/_circle.scss": {
|
|
||||||
"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-CnBzxVPJ.css",
|
|
||||||
"src": "resources/scss/style.scss",
|
|
||||||
"isEntry": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Binary file not shown.
Binary file not shown.
@@ -118,7 +118,7 @@ class BigData {
|
|||||||
this.dataNonVerification.total
|
this.dataNonVerification.total
|
||||||
);
|
);
|
||||||
this.percentageResultNonVerification =
|
this.percentageResultNonVerification =
|
||||||
this.bigTotalNonVerification <= 0 || this.bigTotalPotensi
|
this.bigTotalNonVerification <= 0 || this.bigTotalPotensi <= 0
|
||||||
? 0
|
? 0
|
||||||
: this.bigTotalNonVerification
|
: this.bigTotalNonVerification
|
||||||
.div(this.bigTotalPotensi)
|
.div(this.bigTotalPotensi)
|
||||||
|
|||||||
119
resources/js/dashboards/lack-of-potential.js
Normal file
119
resources/js/dashboards/lack-of-potential.js
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
import Big from "big.js";
|
||||||
|
import GlobalConfig, { addThousandSeparators } from "../global-config.js";
|
||||||
|
|
||||||
|
class LackOfPotential {
|
||||||
|
async init() {
|
||||||
|
this.bigTotalLackPotential = 0;
|
||||||
|
this.totalPotensi = await this.getDataTotalPotensi(2025);
|
||||||
|
this.totalTargetPAD = await this.getDataSettings("TARGET_PAD");
|
||||||
|
|
||||||
|
this.bigTargetPAD = new Big(this.totalTargetPAD ?? 0);
|
||||||
|
this.bigTotalPotensi = new Big(this.totalPotensi.totalData ?? 0);
|
||||||
|
this.bigTotalLackPotential = this.bigTargetPAD - this.bigTotalPotensi;
|
||||||
|
this.initChartKekuranganPotensi();
|
||||||
|
}
|
||||||
|
async getDataTotalPotensi(year) {
|
||||||
|
try {
|
||||||
|
const response = await fetch(
|
||||||
|
`${GlobalConfig.apiHost}/api/all-task-documents?year=${year}`,
|
||||||
|
{
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
const data = await response.json();
|
||||||
|
return {
|
||||||
|
countData: data.data.count,
|
||||||
|
totalData: data.data.total,
|
||||||
|
};
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Error fetching chart data:", error);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async getDataSettings(string_key) {
|
||||||
|
try {
|
||||||
|
const response = await fetch(
|
||||||
|
`${GlobalConfig.apiHost}/api/api-data-settings?search=${string_key}`,
|
||||||
|
{
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
const data = await response.json();
|
||||||
|
return data.data[0].value;
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Error fetching chart data:", error);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
initChartKekuranganPotensi() {
|
||||||
|
document
|
||||||
|
.querySelectorAll(".document-count.chart-lack-of-potential")
|
||||||
|
.forEach((element) => {
|
||||||
|
element.innerText = ``;
|
||||||
|
});
|
||||||
|
document
|
||||||
|
.querySelectorAll(".document-total.chart-lack-of-potential")
|
||||||
|
.forEach((element) => {
|
||||||
|
element.innerText = `Rp.${addThousandSeparators(
|
||||||
|
this.bigTotalLackPotential.toString()
|
||||||
|
)}`;
|
||||||
|
});
|
||||||
|
document
|
||||||
|
.querySelectorAll(".small-percentage.chart-lack-of-potential")
|
||||||
|
.forEach((element) => {
|
||||||
|
element.innerText = ``;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
document.addEventListener("DOMContentLoaded", async function (e) {
|
||||||
|
await new LackOfPotential().init();
|
||||||
|
});
|
||||||
|
|
||||||
|
function resizeDashboard() {
|
||||||
|
let targetElement = document.getElementById("lack-of-potential-wrapper");
|
||||||
|
let dashboardElement = document.getElementById(
|
||||||
|
"lack-of-potential-fixed-container"
|
||||||
|
);
|
||||||
|
|
||||||
|
let targetWidth = targetElement.offsetWidth;
|
||||||
|
let dashboardWidth = 1400;
|
||||||
|
|
||||||
|
let scaleFactor = (targetWidth / dashboardWidth).toFixed(2);
|
||||||
|
|
||||||
|
// Prevent scaling beyond 1 (100%) to avoid overflow
|
||||||
|
scaleFactor = Math.min(scaleFactor, 1);
|
||||||
|
|
||||||
|
dashboardElement.style.transformOrigin = "left top";
|
||||||
|
dashboardElement.style.transition = "transform 0.2s ease-in-out";
|
||||||
|
dashboardElement.style.transform = `scale(${scaleFactor})`;
|
||||||
|
|
||||||
|
// Ensure horizontal scrolling is allowed if necessary
|
||||||
|
document.body.style.overflowX = "auto";
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener("load", resizeDashboard);
|
||||||
|
window.addEventListener("resize", resizeDashboard);
|
||||||
@@ -28,7 +28,12 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
data[key] = value;
|
data[key] = value;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Log semua data dalam FormData
|
||||||
|
for (let pair of formData.entries()) {
|
||||||
|
console.log(pair[0] + ": " + pair[1]);
|
||||||
|
}
|
||||||
const url = form.getAttribute("action");
|
const url = form.getAttribute("action");
|
||||||
|
console.log("Ini adalah url dari form action", url);
|
||||||
|
|
||||||
const method = isEdit ? "PUT" : "POST";
|
const method = isEdit ? "PUT" : "POST";
|
||||||
|
|
||||||
@@ -44,6 +49,7 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
})
|
})
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
|
console.log("Response data:", data);
|
||||||
if (!data.errors) {
|
if (!data.errors) {
|
||||||
// Remove existing icon (if any) before adding the new one
|
// Remove existing icon (if any) before adding the new one
|
||||||
if (authLogo) {
|
if (authLogo) {
|
||||||
@@ -68,11 +74,11 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
toast.classList.add('show'); // Show the toast
|
toast.classList.add('show'); // Show the toast
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
toast.classList.remove('show'); // Hide the toast after 3 seconds
|
toast.classList.remove('show'); // Hide the toast after 3 seconds
|
||||||
}, 2000);
|
}, 3000);
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.location.href = '/data/advertisements';
|
window.location.href = '/data/advertisements';
|
||||||
}, 1000);
|
}, 3000);
|
||||||
} else {
|
} else {
|
||||||
if (authLogo) {
|
if (authLogo) {
|
||||||
// Hapus ikon yang sudah ada jika ada
|
// Hapus ikon yang sudah ada jika ada
|
||||||
@@ -90,21 +96,21 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
// Tambahkan ikon ke dalam auth-logo
|
// Tambahkan ikon ke dalam auth-logo
|
||||||
authLogo.appendChild(icon);
|
authLogo.appendChild(icon);
|
||||||
}
|
}
|
||||||
|
// Set error message for the toast
|
||||||
|
toastBody.textContent = "Error: " + (responseData.message || "Something went wrong");
|
||||||
|
toast.classList.add('show'); // Show the toast
|
||||||
|
|
||||||
// Enable button and reset its text on error
|
// Enable button and reset its text on error
|
||||||
modalButton.disabled = false;
|
modalButton.disabled = false;
|
||||||
modalButton.innerHTML = isEdit ? "Update" : "Create";
|
modalButton.innerHTML = isEdit ? "Update" : "Create";
|
||||||
|
|
||||||
// Set error message for the toast
|
|
||||||
toastBody.textContent = "Failed: " + (data.message || "Something went wrong");
|
|
||||||
toast.classList.add('show'); // Show the toast
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
toast.classList.remove('show'); // Hide the toast after 3 seconds
|
toast.classList.remove('show'); // Hide the toast after 3 seconds
|
||||||
}, 3000);
|
}, 3000);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(errors => {
|
.catch(error => {
|
||||||
|
console.error("Error:", error);
|
||||||
if (authLogo) {
|
if (authLogo) {
|
||||||
// Hapus ikon yang sudah ada jika ada
|
// Hapus ikon yang sudah ada jika ada
|
||||||
const existingIcon = authLogo.querySelector('.bx');
|
const existingIcon = authLogo.querySelector('.bx');
|
||||||
@@ -121,14 +127,14 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
// Tambahkan ikon ke dalam auth-logo
|
// Tambahkan ikon ke dalam auth-logo
|
||||||
authLogo.appendChild(icon);
|
authLogo.appendChild(icon);
|
||||||
}
|
}
|
||||||
// Enable button and reset its text on error
|
|
||||||
modalButton.disabled = false;
|
|
||||||
modalButton.innerHTML = isEdit ? "Update" : "Create";
|
|
||||||
|
|
||||||
// Set error message for the toast
|
// Set error message for the toast
|
||||||
toastBody.textContent = "An error occurred while processing your request.";
|
toastBody.textContent = "An error occurred while processing your request.";
|
||||||
toast.classList.add('show'); // Show the toast
|
toast.classList.add('show'); // Show the toast
|
||||||
|
|
||||||
|
// Enable button and reset its text on error
|
||||||
|
modalButton.disabled = false;
|
||||||
|
modalButton.innerHTML = isEdit ? "Update" : "Create";
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
toast.classList.remove('show'); // Hide the toast after 3 seconds
|
toast.classList.remove('show'); // Hide the toast after 3 seconds
|
||||||
}, 3000);
|
}, 3000);
|
||||||
@@ -138,6 +144,7 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
// Fungsi fetchOptions untuk autocomplete server-side
|
// Fungsi fetchOptions untuk autocomplete server-side
|
||||||
window.fetchOptions = function (field) {
|
window.fetchOptions = function (field) {
|
||||||
let inputValue = document.getElementById(field).value;
|
let inputValue = document.getElementById(field).value;
|
||||||
|
console.log("Query Value:", inputValue); // Debugging log
|
||||||
if (inputValue.length < 2) return;
|
if (inputValue.length < 2) return;
|
||||||
let districtValue = document.getElementById("district_name").value; // Ambil kecamatan terpilih
|
let districtValue = document.getElementById("district_name").value; // Ambil kecamatan terpilih
|
||||||
|
|
||||||
|
|||||||
@@ -1,63 +0,0 @@
|
|||||||
import { Grid } from "gridjs/dist/gridjs.umd.js";
|
|
||||||
import gridjs from "gridjs/dist/gridjs.umd.js";
|
|
||||||
import "gridjs/dist/gridjs.umd.js";
|
|
||||||
import GlobalConfig from "../../global-config.js";
|
|
||||||
import GeneralTable from "../../table-generator.js";
|
|
||||||
|
|
||||||
const dataSpatialPlanningColumns = [
|
|
||||||
"No",
|
|
||||||
"Nama",
|
|
||||||
"KBLI",
|
|
||||||
"Kegiatan",
|
|
||||||
"Luas",
|
|
||||||
"Lokasi",
|
|
||||||
"Nomor",
|
|
||||||
"Tanggal",
|
|
||||||
{
|
|
||||||
name: "Actions",
|
|
||||||
widht: "120px",
|
|
||||||
formatter: function (cell, row) {
|
|
||||||
const id = row.cells[8].data;
|
|
||||||
const model = "data/spatial-plannings";
|
|
||||||
return gridjs.html(`
|
|
||||||
<div class="d-flex justify-items-end gap-10">
|
|
||||||
<button class="btn btn-warning me-2 btn-edit"
|
|
||||||
data-id="${id}"
|
|
||||||
data-model="${model}">
|
|
||||||
<i class='bx bx-edit'></i></button>
|
|
||||||
|
|
||||||
<button class="btn btn-red btn-delete"
|
|
||||||
data-id="${id}">
|
|
||||||
<i class='bx bxs-trash'></i></button>
|
|
||||||
</div>
|
|
||||||
`);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", () => {
|
|
||||||
const table = new GeneralTable(
|
|
||||||
"spatial-planning-data-table",
|
|
||||||
`${GlobalConfig.apiHost}/api/spatial-plannings`,
|
|
||||||
`${GlobalConfig.apiHost}`,
|
|
||||||
dataSpatialPlanningColumns
|
|
||||||
);
|
|
||||||
|
|
||||||
table.processData = function (data) {
|
|
||||||
return data.data.map((item) => {
|
|
||||||
return [
|
|
||||||
item.no,
|
|
||||||
item.name,
|
|
||||||
item.kbli,
|
|
||||||
item.activities,
|
|
||||||
item.area,
|
|
||||||
item.location,
|
|
||||||
item.number,
|
|
||||||
item.date,
|
|
||||||
item.id,
|
|
||||||
];
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
table.init();
|
|
||||||
});
|
|
||||||
@@ -1,185 +0,0 @@
|
|||||||
import GlobalConfig from "../../global-config";
|
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", function () {
|
|
||||||
const saveButton = document.querySelector(".modal-footer .btn-primary");
|
|
||||||
const modalButton = document.querySelector(".btn-modal");
|
|
||||||
const form = document.querySelector("form#create-update-form");
|
|
||||||
var authLogo = document.querySelector(".auth-logo");
|
|
||||||
|
|
||||||
if (!saveButton || !form) return;
|
|
||||||
|
|
||||||
saveButton.addEventListener("click", function () {
|
|
||||||
// Disable tombol dan tampilkan spinner
|
|
||||||
modalButton.disabled = true;
|
|
||||||
modalButton.innerHTML = `
|
|
||||||
<span class="spinner-border spinner-border-sm me-1" role="status" aria-hidden="true"></span>
|
|
||||||
Loading...
|
|
||||||
`;
|
|
||||||
const isEdit = saveButton.classList.contains("btn-edit");
|
|
||||||
const formData = new FormData(form);
|
|
||||||
const toast = document.getElementById("toastEditUpdate");
|
|
||||||
const toastBody = toast.querySelector(".toast-body");
|
|
||||||
const toastHeader = toast.querySelector(".toast-header small");
|
|
||||||
|
|
||||||
const data = {};
|
|
||||||
|
|
||||||
// Mengonversi FormData ke dalam JSON
|
|
||||||
formData.forEach((value, key) => {
|
|
||||||
data[key] = value;
|
|
||||||
});
|
|
||||||
|
|
||||||
const url = form.getAttribute("action");
|
|
||||||
|
|
||||||
const method = isEdit ? "PUT" : "POST";
|
|
||||||
|
|
||||||
fetch(url, {
|
|
||||||
method: method,
|
|
||||||
body: JSON.stringify(data),
|
|
||||||
headers: {
|
|
||||||
Authorization: `Bearer ${document
|
|
||||||
.querySelector('meta[name="api-token"]')
|
|
||||||
.getAttribute("content")}`,
|
|
||||||
"Content-Type": "application/json",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
.then((response) => response.json())
|
|
||||||
.then((data) => {
|
|
||||||
if (!data.errors) {
|
|
||||||
// Remove existing icon (if any) before adding the new one
|
|
||||||
if (authLogo) {
|
|
||||||
// Hapus ikon yang sudah ada jika ada
|
|
||||||
const existingIcon = authLogo.querySelector(".bx");
|
|
||||||
if (existingIcon) {
|
|
||||||
authLogo.removeChild(existingIcon);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Buat ikon baru
|
|
||||||
const icon = document.createElement("i");
|
|
||||||
icon.classList.add("bx", "bxs-check-square");
|
|
||||||
icon.style.fontSize = "25px";
|
|
||||||
icon.style.color = "green"; // Pastikan 'green' dalam bentuk string
|
|
||||||
|
|
||||||
// Tambahkan ikon ke dalam auth-logo
|
|
||||||
authLogo.appendChild(icon);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set success message for the toast
|
|
||||||
toastBody.textContent = isEdit
|
|
||||||
? "Data updated successfully!"
|
|
||||||
: "Data created successfully!";
|
|
||||||
toast.classList.add("show"); // Show the toast
|
|
||||||
setTimeout(() => {
|
|
||||||
toast.classList.remove("show"); // Hide the toast after 3 seconds
|
|
||||||
}, 3000);
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
window.location.href = "/data/spatial-plannings";
|
|
||||||
}, 3000);
|
|
||||||
} else {
|
|
||||||
if (authLogo) {
|
|
||||||
// Hapus ikon yang sudah ada jika ada
|
|
||||||
const existingIcon = authLogo.querySelector(".bx");
|
|
||||||
if (existingIcon) {
|
|
||||||
authLogo.removeChild(existingIcon);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Buat ikon baru
|
|
||||||
const icon = document.createElement("i");
|
|
||||||
icon.classList.add("bx", "bxs-error-alt");
|
|
||||||
icon.style.fontSize = "25px";
|
|
||||||
icon.style.color = "red"; // Pastikan 'green' dalam bentuk string
|
|
||||||
|
|
||||||
// Tambahkan ikon ke dalam auth-logo
|
|
||||||
authLogo.appendChild(icon);
|
|
||||||
}
|
|
||||||
// Set error message for the toast
|
|
||||||
toastBody.textContent =
|
|
||||||
"Error: " + (data.message || "Something went wrong");
|
|
||||||
toast.classList.add("show"); // Show the toast
|
|
||||||
|
|
||||||
// Enable button and reset its text on error
|
|
||||||
modalButton.disabled = false;
|
|
||||||
modalButton.innerHTML = isEdit ? "Update" : "Create";
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
toast.classList.remove("show"); // Hide the toast after 3 seconds
|
|
||||||
}, 3000);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
if (authLogo) {
|
|
||||||
// Hapus ikon yang sudah ada jika ada
|
|
||||||
const existingIcon = authLogo.querySelector(".bx");
|
|
||||||
if (existingIcon) {
|
|
||||||
authLogo.removeChild(existingIcon);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Buat ikon baru
|
|
||||||
const icon = document.createElement("i");
|
|
||||||
icon.classList.add("bx", "bxs-error-alt");
|
|
||||||
icon.style.fontSize = "25px";
|
|
||||||
icon.style.color = "red"; // Pastikan 'green' dalam bentuk string
|
|
||||||
|
|
||||||
// Tambahkan ikon ke dalam auth-logo
|
|
||||||
authLogo.appendChild(icon);
|
|
||||||
}
|
|
||||||
// Set error message for the toast
|
|
||||||
toastBody.textContent =
|
|
||||||
"An error occurred while processing your request.";
|
|
||||||
toast.classList.add("show"); // Show the toast
|
|
||||||
|
|
||||||
// Enable button and reset its text on error
|
|
||||||
modalButton.disabled = false;
|
|
||||||
modalButton.innerHTML = isEdit ? "Update" : "Create";
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
toast.classList.remove("show"); // Hide the toast after 3 seconds
|
|
||||||
}, 3000);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// Fungsi fetchOptions untuk autocomplete server-side
|
|
||||||
window.fetchOptions = function (field) {
|
|
||||||
let inputValue = document.getElementById(field).value;
|
|
||||||
if (inputValue.length < 2) return;
|
|
||||||
let districtValue = document.getElementById("district_name").value; // Ambil kecamatan terpilih
|
|
||||||
|
|
||||||
let url = `${
|
|
||||||
GlobalConfig.apiHost
|
|
||||||
}/api/combobox/search-options?query=${encodeURIComponent(
|
|
||||||
inputValue
|
|
||||||
)}&field=${field}`;
|
|
||||||
|
|
||||||
// Jika field desa, tambahkan kecamatan sebagai filter
|
|
||||||
if (field === "village_name") {
|
|
||||||
url += `&district=${encodeURIComponent(districtValue)}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
fetch(url, {
|
|
||||||
method: "GET",
|
|
||||||
headers: {
|
|
||||||
Authorization: `Bearer ${document
|
|
||||||
.querySelector('meta[name="api-token"]')
|
|
||||||
.getAttribute("content")}`,
|
|
||||||
"Content-Type": "application/json",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
.then((response) => response.json())
|
|
||||||
.then((data) => {
|
|
||||||
let dataList = document.getElementById(field + "Options");
|
|
||||||
dataList.innerHTML = "";
|
|
||||||
|
|
||||||
data.forEach((item) => {
|
|
||||||
let option = document.createElement("option");
|
|
||||||
option.value = item.name;
|
|
||||||
option.dataset.code = item.code;
|
|
||||||
dataList.appendChild(option);
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch((error) => console.error("Error fetching options:", error));
|
|
||||||
};
|
|
||||||
|
|
||||||
document.querySelector(".btn-back").addEventListener("click", function () {
|
|
||||||
window.history.back();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,150 +0,0 @@
|
|||||||
import { Dropzone } from "dropzone";
|
|
||||||
import GlobalConfig from "../../global-config.js";
|
|
||||||
|
|
||||||
Dropzone.autoDiscover = false;
|
|
||||||
|
|
||||||
var previewTemplate,
|
|
||||||
dropzone,
|
|
||||||
dropzonePreviewNode = document.querySelector("#dropzone-preview-list");
|
|
||||||
console.log(previewTemplate);
|
|
||||||
console.log(dropzone);
|
|
||||||
console.log(dropzonePreviewNode);
|
|
||||||
|
|
||||||
(dropzonePreviewNode.id = ""),
|
|
||||||
dropzonePreviewNode &&
|
|
||||||
((previewTemplate = dropzonePreviewNode.parentNode.innerHTML),
|
|
||||||
dropzonePreviewNode.parentNode.removeChild(dropzonePreviewNode),
|
|
||||||
(dropzone = new Dropzone(".dropzone", {
|
|
||||||
url: `${GlobalConfig.apiHost}/api/spatial-plannings/import`,
|
|
||||||
// url: "https://httpbin.org/post",
|
|
||||||
method: "post",
|
|
||||||
acceptedFiles: ".xls,.xlsx", // Use acceptedFiles for better validation
|
|
||||||
previewTemplate: previewTemplate,
|
|
||||||
previewsContainer: "#dropzone-preview",
|
|
||||||
autoProcessQueue: false, // Disable auto post
|
|
||||||
headers: {
|
|
||||||
Authorization: `Bearer ${document
|
|
||||||
.querySelector('meta[name="api-token"]')
|
|
||||||
.getAttribute("content")}`
|
|
||||||
},
|
|
||||||
init: function() {
|
|
||||||
// Listen for the success event
|
|
||||||
this.on("success", function(file, response) {
|
|
||||||
console.log("File successfully uploaded:", file);
|
|
||||||
console.log("API Response:", response);
|
|
||||||
|
|
||||||
// Show success toast
|
|
||||||
showToast('bxs-check-square', 'green', response.message);
|
|
||||||
document.getElementById("submit-upload").innerHTML = "Upload Files";
|
|
||||||
// Tunggu sebentar lalu reload halaman
|
|
||||||
setTimeout(() => {
|
|
||||||
window.location.href = "/data/spatial-plannings";
|
|
||||||
}, 2000);
|
|
||||||
});
|
|
||||||
// Listen for the error event
|
|
||||||
this.on("error", function(file, errorMessage) {
|
|
||||||
console.error("Error uploading file:", file);
|
|
||||||
console.error("Error message:", errorMessage);
|
|
||||||
// Handle the error response
|
|
||||||
|
|
||||||
// Show error toast
|
|
||||||
showToast('bxs-error-alt', 'red', errorMessage.message);
|
|
||||||
document.getElementById("submit-upload").innerHTML = "Upload Files";
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})));
|
|
||||||
|
|
||||||
// Add event listener to control the submission manually
|
|
||||||
document.querySelector("#submit-upload").addEventListener("click", function() {
|
|
||||||
console.log("Ini adalah value dropzone", dropzone.files[0]);
|
|
||||||
const formData = new FormData()
|
|
||||||
console.log("Dropzonefiles",dropzone.files);
|
|
||||||
|
|
||||||
this.innerHTML = '<span class="spinner-border spinner-border-sm me-1" role="status" aria-hidden="true"></span>Loading...';
|
|
||||||
|
|
||||||
// Pastikan ada file dalam queue sebelum memprosesnya
|
|
||||||
if (dropzone.files.length > 0) {
|
|
||||||
formData.append('file', dropzone.files[0])
|
|
||||||
console.log("ini adalah form data on submit", ...formData);
|
|
||||||
dropzone.processQueue(); // Ini akan manual memicu upload
|
|
||||||
} else {
|
|
||||||
// Show error toast when no file is selected
|
|
||||||
showToast('bxs-error-alt', 'red', "Please add a file first.");
|
|
||||||
document.getElementById("submit-upload").innerHTML = "Upload Files";
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Optional: Listen for the 'addedfile' event to log or control file add behavior
|
|
||||||
dropzone.on("addedfile", function (file) {
|
|
||||||
console.log("File ditambahkan:", file);
|
|
||||||
console.log("Nama File:", file.name);
|
|
||||||
console.log("Tipe File:", file.type);
|
|
||||||
console.log("Ukuran File:", (file.size / 1024).toFixed(2) + " KB");
|
|
||||||
});
|
|
||||||
|
|
||||||
dropzone.on("complete", function(file) {
|
|
||||||
dropzone.removeFile(file);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Add event listener to download file template
|
|
||||||
document.getElementById('downloadtempspatialPlannings').addEventListener('click', function() {
|
|
||||||
var url = `${GlobalConfig.apiHost}/api/download-template-spatialPlannings`;
|
|
||||||
fetch(url, {
|
|
||||||
method: 'GET',
|
|
||||||
headers: {
|
|
||||||
Authorization: `Bearer ${document
|
|
||||||
.querySelector('meta[name="api-token"]')
|
|
||||||
.getAttribute("content")}`
|
|
||||||
},
|
|
||||||
})
|
|
||||||
.then(response => {
|
|
||||||
if (response.ok) {
|
|
||||||
return response.blob(); // Jika respons OK, konversi menjadi blob
|
|
||||||
} else {
|
|
||||||
return response.json(); // Jika respons gagal, konversi menjadi JSON untuk menangani pesan error
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.then((blob) => {
|
|
||||||
console.log(blob);
|
|
||||||
const url = window.URL.createObjectURL(blob);
|
|
||||||
const a = document.createElement('a');
|
|
||||||
a.style.display = 'none';
|
|
||||||
a.href = url;
|
|
||||||
a.download = 'template_rencana_tata_ruang.xlsx';
|
|
||||||
document.body.appendChild(a);
|
|
||||||
a.click();
|
|
||||||
window.URL.revokeObjectURL(url);
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
console.error("Gagal mendownload file:", error);
|
|
||||||
showToast('bxs-error-alt', 'red', "Template file is not already exist.");
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
// Function to show toast
|
|
||||||
function showToast(iconClass, iconColor, message) {
|
|
||||||
const toastElement = document.getElementById('toastUploadSpatialPlannings');
|
|
||||||
const toastBody = toastElement.querySelector('.toast-body');
|
|
||||||
const toastHeader = toastElement.querySelector('.toast-header');
|
|
||||||
|
|
||||||
// Remove existing icon (if any) before adding the new one
|
|
||||||
const existingIcon = toastHeader.querySelector('.bx');
|
|
||||||
if (existingIcon) {
|
|
||||||
toastHeader.querySelector('.auth-logo').removeChild(existingIcon); // Remove the existing icon
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add the new icon to the toast header
|
|
||||||
const icon = document.createElement('i');
|
|
||||||
icon.classList.add('bx', iconClass);
|
|
||||||
icon.style.fontSize = '25px';
|
|
||||||
icon.style.color = iconColor;
|
|
||||||
toastHeader.querySelector('.auth-logo').appendChild(icon);
|
|
||||||
|
|
||||||
// Set the toast message
|
|
||||||
toastBody.textContent = message;
|
|
||||||
|
|
||||||
// Show the toast
|
|
||||||
const toast = new bootstrap.Toast(toastElement); // Inisialisasi Bootstrap Toast
|
|
||||||
toast.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -5,7 +5,6 @@ import GlobalConfig from "../../global-config.js";
|
|||||||
import GeneralTable from "../../table-generator.js";
|
import GeneralTable from "../../table-generator.js";
|
||||||
|
|
||||||
const dataTourismsColumns = [
|
const dataTourismsColumns = [
|
||||||
"No",
|
|
||||||
"Nama Perusahaan",
|
"Nama Perusahaan",
|
||||||
"Nama Proyek",
|
"Nama Proyek",
|
||||||
"Alamat Usaha",
|
"Alamat Usaha",
|
||||||
@@ -55,7 +54,6 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
table.processData = function (data) {
|
table.processData = function (data) {
|
||||||
return data.data.map((item) => {
|
return data.data.map((item) => {
|
||||||
return [
|
return [
|
||||||
item.no,
|
|
||||||
item.business_name,
|
item.business_name,
|
||||||
item.project_name,
|
item.project_name,
|
||||||
item.business_address,
|
item.business_address,
|
||||||
|
|||||||
@@ -28,7 +28,12 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
data[key] = value;
|
data[key] = value;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Log semua data dalam FormData
|
||||||
|
for (let pair of formData.entries()) {
|
||||||
|
console.log(pair[0] + ": " + pair[1]);
|
||||||
|
}
|
||||||
const url = form.getAttribute("action");
|
const url = form.getAttribute("action");
|
||||||
|
console.log("Ini adalah url dari form action", url);
|
||||||
|
|
||||||
const method = isEdit ? "PUT" : "POST";
|
const method = isEdit ? "PUT" : "POST";
|
||||||
|
|
||||||
@@ -44,6 +49,7 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
})
|
})
|
||||||
.then((response) => response.json())
|
.then((response) => response.json())
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
|
console.log("Response data:", data);
|
||||||
if (!data.errors) {
|
if (!data.errors) {
|
||||||
// Remove existing icon (if any) before adding the new one
|
// Remove existing icon (if any) before adding the new one
|
||||||
if (authLogo) {
|
if (authLogo) {
|
||||||
@@ -107,6 +113,7 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
console.error("Error:", error);
|
||||||
if (authLogo) {
|
if (authLogo) {
|
||||||
// Hapus ikon yang sudah ada jika ada
|
// Hapus ikon yang sudah ada jika ada
|
||||||
const existingIcon = authLogo.querySelector(".bx");
|
const existingIcon = authLogo.querySelector(".bx");
|
||||||
@@ -141,6 +148,7 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
// Fungsi fetchOptions untuk autocomplete server-side
|
// Fungsi fetchOptions untuk autocomplete server-side
|
||||||
window.fetchOptions = function (field) {
|
window.fetchOptions = function (field) {
|
||||||
let inputValue = document.getElementById(field).value;
|
let inputValue = document.getElementById(field).value;
|
||||||
|
console.log("Query Value:", inputValue); // Debugging log
|
||||||
if (inputValue.length < 2) return;
|
if (inputValue.length < 2) return;
|
||||||
let districtValue = document.getElementById("district_name").value; // Ambil kecamatan terpilih
|
let districtValue = document.getElementById("district_name").value; // Ambil kecamatan terpilih
|
||||||
|
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ dropzone.on("complete", function(file) {
|
|||||||
|
|
||||||
// Add event listener to download file template
|
// Add event listener to download file template
|
||||||
document.getElementById('downloadtemptourisms').addEventListener('click', function() {
|
document.getElementById('downloadtemptourisms').addEventListener('click', function() {
|
||||||
var url = `${GlobalConfig.apiHost}/api/download-template-tourism`;
|
var url = `${GlobalConfig.apiHost}/api/download-template-umkm`;
|
||||||
fetch(url, {
|
fetch(url, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
@@ -105,12 +105,11 @@ document.getElementById('downloadtemptourisms').addEventListener('click', functi
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then((blob) => {
|
.then((blob) => {
|
||||||
console.log(blob);
|
|
||||||
const url = window.URL.createObjectURL(blob);
|
const url = window.URL.createObjectURL(blob);
|
||||||
const a = document.createElement('a');
|
const a = document.createElement('a');
|
||||||
a.style.display = 'none';
|
a.style.display = 'none';
|
||||||
a.href = url;
|
a.href = url;
|
||||||
a.download = 'template_pariwisata.xlsx';
|
a.download = 'template_tourisms.xlsx';
|
||||||
document.body.appendChild(a);
|
document.body.appendChild(a);
|
||||||
a.click();
|
a.click();
|
||||||
window.URL.revokeObjectURL(url);
|
window.URL.revokeObjectURL(url);
|
||||||
@@ -123,7 +122,7 @@ document.getElementById('downloadtemptourisms').addEventListener('click', functi
|
|||||||
|
|
||||||
// Function to show toast
|
// Function to show toast
|
||||||
function showToast(iconClass, iconColor, message) {
|
function showToast(iconClass, iconColor, message) {
|
||||||
const toastElement = document.getElementById('toastUploadTourisms');
|
const toastElement = document.getElementById('toastUploadUmkm');
|
||||||
const toastBody = toastElement.querySelector('.toast-body');
|
const toastBody = toastElement.querySelector('.toast-body');
|
||||||
const toastHeader = toastElement.querySelector('.toast-header');
|
const toastHeader = toastElement.querySelector('.toast-header');
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import GlobalConfig from "../../global-config.js";
|
|||||||
import GeneralTable from "../../table-generator.js";
|
import GeneralTable from "../../table-generator.js";
|
||||||
|
|
||||||
const dataUMKMColumns = [
|
const dataUMKMColumns = [
|
||||||
"No",
|
|
||||||
"Nama Usaha",
|
"Nama Usaha",
|
||||||
"Alamat Usaha",
|
"Alamat Usaha",
|
||||||
"Deskripsi Usaha",
|
"Deskripsi Usaha",
|
||||||
@@ -55,7 +54,6 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
table.processData = function (data) {
|
table.processData = function (data) {
|
||||||
return data.data.map((item) => {
|
return data.data.map((item) => {
|
||||||
return [
|
return [
|
||||||
item.no,
|
|
||||||
item.business_name,
|
item.business_name,
|
||||||
item.business_address,
|
item.business_address,
|
||||||
item.business_desc,
|
item.business_desc,
|
||||||
|
|||||||
@@ -28,7 +28,12 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
data[key] = value;
|
data[key] = value;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Log semua data dalam FormData
|
||||||
|
for (let pair of formData.entries()) {
|
||||||
|
console.log(pair[0] + ": " + pair[1]);
|
||||||
|
}
|
||||||
const url = form.getAttribute("action");
|
const url = form.getAttribute("action");
|
||||||
|
console.log("Ini adalah url dari form action", url);
|
||||||
|
|
||||||
const method = isEdit ? "PUT" : "POST";
|
const method = isEdit ? "PUT" : "POST";
|
||||||
|
|
||||||
@@ -69,11 +74,11 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
toast.classList.add('show'); // Show the toast
|
toast.classList.add('show'); // Show the toast
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
toast.classList.remove('show'); // Hide the toast after 3 seconds
|
toast.classList.remove('show'); // Hide the toast after 3 seconds
|
||||||
}, 2000);
|
}, 3000);
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.location.href = '/data/umkm';
|
window.location.href = '/data/umkm';
|
||||||
}, 1000);
|
}, 3000);
|
||||||
} else {
|
} else {
|
||||||
if (authLogo) {
|
if (authLogo) {
|
||||||
// Hapus ikon yang sudah ada jika ada
|
// Hapus ikon yang sudah ada jika ada
|
||||||
@@ -91,16 +96,14 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
// Tambahkan ikon ke dalam auth-logo
|
// Tambahkan ikon ke dalam auth-logo
|
||||||
authLogo.appendChild(icon);
|
authLogo.appendChild(icon);
|
||||||
}
|
}
|
||||||
|
// Set error message for the toast
|
||||||
|
toastBody.textContent = "Error: " + (data.message || "Something went wrong");
|
||||||
|
toast.classList.add('show'); // Show the toast
|
||||||
|
|
||||||
// Enable button and reset its text on error
|
// Enable button and reset its text on error
|
||||||
modalButton.disabled = false;
|
modalButton.disabled = false;
|
||||||
modalButton.innerHTML = isEdit ? "Update" : "Create";
|
modalButton.innerHTML = isEdit ? "Update" : "Create";
|
||||||
|
|
||||||
|
|
||||||
// Set error message for the toast
|
|
||||||
toastBody.textContent = "Error: " + (data.message || "Something went wrong");
|
|
||||||
toast.classList.add('show'); // Show the toast
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
toast.classList.remove('show'); // Hide the toast after 3 seconds
|
toast.classList.remove('show'); // Hide the toast after 3 seconds
|
||||||
}, 3000);
|
}, 3000);
|
||||||
@@ -124,15 +127,14 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
// Tambahkan ikon ke dalam auth-logo
|
// Tambahkan ikon ke dalam auth-logo
|
||||||
authLogo.appendChild(icon);
|
authLogo.appendChild(icon);
|
||||||
}
|
}
|
||||||
|
// Set error message for the toast
|
||||||
|
toastBody.textContent = "An error occurred while processing your request.";
|
||||||
|
toast.classList.add('show'); // Show the toast
|
||||||
|
|
||||||
// Enable button and reset its text on error
|
// Enable button and reset its text on error
|
||||||
modalButton.disabled = false;
|
modalButton.disabled = false;
|
||||||
modalButton.innerHTML = isEdit ? "Update" : "Create";
|
modalButton.innerHTML = isEdit ? "Update" : "Create";
|
||||||
|
|
||||||
// Set error message for the toast
|
|
||||||
toastBody.textContent = "An error occurred while processing your request.";
|
|
||||||
toast.classList.add('show'); // Show the toast
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
toast.classList.remove('show'); // Hide the toast after 3 seconds
|
toast.classList.remove('show'); // Hide the toast after 3 seconds
|
||||||
}, 3000);
|
}, 3000);
|
||||||
@@ -142,6 +144,7 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
// Fungsi fetchOptions untuk autocomplete server-side
|
// Fungsi fetchOptions untuk autocomplete server-side
|
||||||
window.fetchOptions = function (field) {
|
window.fetchOptions = function (field) {
|
||||||
let inputValue = document.getElementById(field).value;
|
let inputValue = document.getElementById(field).value;
|
||||||
|
console.log("Query Value:", inputValue); // Debugging log
|
||||||
if (inputValue.length < 2) return;
|
if (inputValue.length < 2) return;
|
||||||
let districtValue = document.getElementById("district_name").value; // Ambil kecamatan terpilih
|
let districtValue = document.getElementById("district_name").value; // Ambil kecamatan terpilih
|
||||||
|
|
||||||
|
|||||||
53
resources/scss/components/_custom_circle.scss
Normal file
53
resources/scss/components/_custom_circle.scss
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
//
|
||||||
|
// custom_circle.scss
|
||||||
|
//
|
||||||
|
|
||||||
|
.custom-circle-wrapper {
|
||||||
|
width: 100px; // Default width
|
||||||
|
height: 100px; // Default height
|
||||||
|
border: 4px solid white;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background-color: rgb(1, 44, 124);
|
||||||
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Efek bayangan */
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
&.large {
|
||||||
|
width: 150px;
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.small {
|
||||||
|
width: 95px;
|
||||||
|
height: 95px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-circle-content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-circle-text {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: white;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-circle-data {
|
||||||
|
font-size: 12px;
|
||||||
|
color: white;
|
||||||
|
background-color: #f0195b;
|
||||||
|
padding: 0 5px;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-circle-data-type {
|
||||||
|
font-size: 12px;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
234
resources/scss/dashboards/_lack-of-potential.scss
Normal file
234
resources/scss/dashboards/_lack-of-potential.scss
Normal file
@@ -0,0 +1,234 @@
|
|||||||
|
//
|
||||||
|
// lack-of-potential.scss
|
||||||
|
//
|
||||||
|
|
||||||
|
.square {
|
||||||
|
height: 100px;
|
||||||
|
width: 100px;
|
||||||
|
position: absolute;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dia-top-left-bottom-right:after {
|
||||||
|
content: "";
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
background: linear-gradient(
|
||||||
|
to top right,
|
||||||
|
transparent calc(50% - 2px),
|
||||||
|
black,
|
||||||
|
transparent calc(50% + 2px)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dia-top-right-bottom-left:after {
|
||||||
|
content: "";
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
background: linear-gradient(
|
||||||
|
to top left,
|
||||||
|
transparent calc(50% - 2px),
|
||||||
|
black,
|
||||||
|
transparent calc(50% + 2px)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
.lack-of-potential-wrapper {
|
||||||
|
background-image: url("/public/images/bg-dashboard.jpg");
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
|
background-color: rgba(255, 255, 255, 0.7);
|
||||||
|
max-width: 100vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lack-of-potential-wrapper::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
pointer-events: none; /* Prevents the overlay from blocking interaction */
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-color: rgba(255, 255, 255, 0.7);
|
||||||
|
}
|
||||||
|
// #lack-of-potential-fixed-container {
|
||||||
|
// min-width: 1110px;
|
||||||
|
// max-width: unset; /* Allow it to grow if needed */
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @media (max-width: 768px) {
|
||||||
|
// #lack-of-potential-fixed-container {
|
||||||
|
// transform: scale(0.8); /* Adjust the scale as needed */
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// line degrees
|
||||||
|
.line {
|
||||||
|
background-color: black;
|
||||||
|
position: absolute;
|
||||||
|
height: 3px;
|
||||||
|
}
|
||||||
|
.home-to-non-usaha {
|
||||||
|
width: 100px;
|
||||||
|
top: 13%;
|
||||||
|
left: 38%;
|
||||||
|
transform: rotate(90deg);
|
||||||
|
}
|
||||||
|
.restoran-to-bapenda {
|
||||||
|
width: 110px;
|
||||||
|
top: 14%;
|
||||||
|
left: 60%;
|
||||||
|
transform: rotate(40deg);
|
||||||
|
}
|
||||||
|
.pbb-to-bapenda {
|
||||||
|
width: 80px;
|
||||||
|
top: 21%;
|
||||||
|
left: 80%;
|
||||||
|
}
|
||||||
|
.reklame-to-bapenda {
|
||||||
|
width: 120px;
|
||||||
|
left: 75%;
|
||||||
|
top: 30%;
|
||||||
|
transform: rotateZ(142deg);
|
||||||
|
}
|
||||||
|
.non-usaha-to-bapenda {
|
||||||
|
width: 116px;
|
||||||
|
left: 18%;
|
||||||
|
top: 33%;
|
||||||
|
transform: rotateZ(124deg);
|
||||||
|
}
|
||||||
|
.non-usaha-to-pdam {
|
||||||
|
width: 100px;
|
||||||
|
left: 38%;
|
||||||
|
top: 34%;
|
||||||
|
transform: rotateZ(90deg);
|
||||||
|
}
|
||||||
|
.non-usaha-to-kecamatan {
|
||||||
|
width: 140px;
|
||||||
|
left: 55%;
|
||||||
|
top: 33%;
|
||||||
|
transform: rotateZ(237deg);
|
||||||
|
}
|
||||||
|
.bapenda-to-usaha {
|
||||||
|
width: 114px;
|
||||||
|
left: 18%;
|
||||||
|
top: 49%;
|
||||||
|
transform: rotateZ(56deg);
|
||||||
|
}
|
||||||
|
.pdam-to-usaha {
|
||||||
|
width: 88px;
|
||||||
|
left: 39%;
|
||||||
|
top: 49%;
|
||||||
|
transform: rotateZ(90deg);
|
||||||
|
}
|
||||||
|
.kecamatan-to-usaha {
|
||||||
|
width: 118px;
|
||||||
|
left: 56%;
|
||||||
|
top: 50%;
|
||||||
|
transform: rotateZ(117deg);
|
||||||
|
}
|
||||||
|
.usaha-to-villa {
|
||||||
|
width: 100px;
|
||||||
|
left: 10%;
|
||||||
|
top: 63%;
|
||||||
|
transform: rotateZ(143deg);
|
||||||
|
}
|
||||||
|
.usaha-to-pabrik {
|
||||||
|
width: 150px;
|
||||||
|
left: 15%;
|
||||||
|
top: 70%;
|
||||||
|
transform: rotateZ(143deg);
|
||||||
|
}
|
||||||
|
.usaha-to-pariwisata {
|
||||||
|
width: 150px;
|
||||||
|
left: 43%;
|
||||||
|
top: 70%;
|
||||||
|
transform: rotateZ(38deg);
|
||||||
|
}
|
||||||
|
.usaha-to-protocol {
|
||||||
|
width: 106px;
|
||||||
|
left: 36%;
|
||||||
|
top: 71%;
|
||||||
|
transform: rotateZ(86deg);
|
||||||
|
}
|
||||||
|
.pariwisata-to-disbudpar {
|
||||||
|
width: 86px;
|
||||||
|
left: 54%;
|
||||||
|
top: 83%;
|
||||||
|
transform: rotateZ(150deg);
|
||||||
|
}
|
||||||
|
.non-usaha-to-wasdal {
|
||||||
|
width: 300px;
|
||||||
|
left: -32%;
|
||||||
|
top: 34%;
|
||||||
|
transform: rotateZ(226deg);
|
||||||
|
}
|
||||||
|
.usaha-to-wasdal {
|
||||||
|
width: 300px;
|
||||||
|
left: -34%;
|
||||||
|
top: 50%;
|
||||||
|
transform: rotateZ(129deg);
|
||||||
|
}
|
||||||
|
.wasdal-to-upt {
|
||||||
|
width: 155px;
|
||||||
|
left: 3%;
|
||||||
|
top: -67%;
|
||||||
|
transform: rotateZ(127deg);
|
||||||
|
}
|
||||||
|
.wasdal-to-satpol {
|
||||||
|
width: 155px;
|
||||||
|
left: 19%;
|
||||||
|
top: -52%;
|
||||||
|
transform: rotateZ(76deg);
|
||||||
|
}
|
||||||
|
.wasdal-to-kejari {
|
||||||
|
width: 182px;
|
||||||
|
left: 25%;
|
||||||
|
top: -55%;
|
||||||
|
transform: rotateZ(51deg);
|
||||||
|
}
|
||||||
|
.wasdal-to-tni {
|
||||||
|
width: 260px;
|
||||||
|
left: 29%;
|
||||||
|
top: -62%;
|
||||||
|
transform: rotateZ(30deg);
|
||||||
|
}
|
||||||
|
.wasdal-to-potential {
|
||||||
|
width: 50px;
|
||||||
|
left: 28%;
|
||||||
|
top: 41%;
|
||||||
|
}
|
||||||
|
.potential-to-tata-ruang {
|
||||||
|
width: 50px;
|
||||||
|
left: 72%;
|
||||||
|
top: 41%;
|
||||||
|
}
|
||||||
|
.tata-ruang-to-non-usaha {
|
||||||
|
width: 220px;
|
||||||
|
left: 0%;
|
||||||
|
top: 30%;
|
||||||
|
transform: rotateZ(144deg);
|
||||||
|
}
|
||||||
|
.tata-ruang-to-usaha {
|
||||||
|
width: 280px;
|
||||||
|
left: 0%;
|
||||||
|
top: 52%;
|
||||||
|
transform: rotateZ(224deg);
|
||||||
|
}
|
||||||
|
.tata-ruang-to-peta {
|
||||||
|
width: 122px;
|
||||||
|
left: 8%;
|
||||||
|
top: 41%;
|
||||||
|
}
|
||||||
|
.peta-to-tapak {
|
||||||
|
width: 30px;
|
||||||
|
left: 47%;
|
||||||
|
top: 41%;
|
||||||
|
}
|
||||||
@@ -45,6 +45,8 @@
|
|||||||
@import "components/tooltip";
|
@import "components/tooltip";
|
||||||
@import "components/widgets";
|
@import "components/widgets";
|
||||||
@import "components/circle";
|
@import "components/circle";
|
||||||
|
@import "components/custom_circle";
|
||||||
|
@import "dashboards/lack-of-potential";
|
||||||
|
|
||||||
// Plugin
|
// Plugin
|
||||||
@import "plugins/simplebar";
|
@import "plugins/simplebar";
|
||||||
|
|||||||
@@ -36,10 +36,10 @@ class="authentication-bg"
|
|||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="email" class="form-label">Email Address</label>
|
<label for="email" class="form-label">Email Address</label>
|
||||||
<input type="email" class="form-control" id="email" name="email" value="user@demo.com" placeholder="Enter your email">
|
<input type="email" class="form-control" id="email" name="email" placeholder="Enter your email">
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<input type="password" class="form-control" id="password" name="password" value="password" placeholder="Enter your password">
|
<input type="password" class="form-control" id="password" name="password" placeholder="Enter your password">
|
||||||
</div>
|
</div>
|
||||||
<div class="d-grid">
|
<div class="d-grid">
|
||||||
<button class="btn btn-dark btn-lg fw-medium" type="submit">Sign In</button>
|
<button class="btn btn-dark btn-lg fw-medium" type="submit">Sign In</button>
|
||||||
|
|||||||
30
resources/views/components/custom-circle.blade.php
Normal file
30
resources/views/components/custom-circle.blade.php
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
@props(['title' => 'title component', 'visible_data' => false, 'data' => 'data text', 'visible_data_type' => false,
|
||||||
|
'data_type' => '','style' => '', 'size' => '', 'line' => []])
|
||||||
|
|
||||||
|
@section('css')
|
||||||
|
@vite(['resources/scss/components/_custom_circle.scss'])
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
<div class="custom-circle-wrapper {{ $size }}" style="{{ $style }}">
|
||||||
|
<div class="custom-circle-content">
|
||||||
|
<p class="custom-circle-text">{{ $title }}</p>
|
||||||
|
@if ($visible_data === "true")
|
||||||
|
<div class="custom-circle-data">{{ $data }}</div>
|
||||||
|
@endif
|
||||||
|
@if ($visible_data_type === "true")
|
||||||
|
<div class="custom-circle-data-type">{{ $data_type }}</div>
|
||||||
|
@endif
|
||||||
|
@if (!empty($lines))
|
||||||
|
<svg class="absolute w-full h-full" viewBox="0 0 100 100" preserveAspectRatio="none">
|
||||||
|
@foreach ($lines as $line)
|
||||||
|
<line
|
||||||
|
x1="{{ $line['x1'] }}" y1="{{ $line['y1'] }}"
|
||||||
|
x2="{{ $line['x2'] }}" y2="{{ $line['y2'] }}"
|
||||||
|
stroke="{{ $line['color'] ?? 'black' }}"
|
||||||
|
stroke-width="{{ $line['width'] ?? 2 }}"
|
||||||
|
/>
|
||||||
|
@endforeach
|
||||||
|
</svg>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<div id="dashboard-fixed-container" class="row" style="width:1110px;height:770px;position:relative;margin:auto;">
|
<div id="dashboard-fixed-container" class="row" style="width:1110px;height:770px;position:relative;margin:auto;">
|
||||||
@component('components.circle', [
|
@component('components.circle', [
|
||||||
'document_title' => 'Kekurangan Potensi',
|
'document_title' => 'Kekurangan Potensi',
|
||||||
'document_color' => '#911701',
|
'document_color' => '#ff5757',
|
||||||
'document_type' => '',
|
'document_type' => '',
|
||||||
'document_id' => 'chart-kekurangan-potensi',
|
'document_id' => 'chart-kekurangan-potensi',
|
||||||
'visible_small_circle' => true,
|
'visible_small_circle' => true,
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
@component('components.circle', [
|
@component('components.circle', [
|
||||||
'document_title' => 'Target PAD 2024',
|
'document_title' => 'Target PAD 2024',
|
||||||
'document_color' => '#020e42',
|
'document_color' => '#204f6b',
|
||||||
'document_type' => '',
|
'document_type' => '',
|
||||||
'document_id' => 'chart-target-pad',
|
'document_id' => 'chart-target-pad',
|
||||||
'visible_small_circle' => true,
|
'visible_small_circle' => true,
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
|
|
||||||
@component('components.circle', [
|
@component('components.circle', [
|
||||||
'document_title' => 'Total Potensi Berkas',
|
'document_title' => 'Total Potensi Berkas',
|
||||||
'document_color' => '#02acfa',
|
'document_color' => '#0097b3',
|
||||||
'document_type' => 'Pemohon',
|
'document_type' => 'Pemohon',
|
||||||
'document_id' => 'chart-total-potensi',
|
'document_id' => 'chart-total-potensi',
|
||||||
'visible_small_circle' => true,
|
'visible_small_circle' => true,
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
|
|
||||||
@component('components.circle', [
|
@component('components.circle', [
|
||||||
'document_title' => 'Perkiraan Potensi PBG Dari Tata Ruang',
|
'document_title' => 'Perkiraan Potensi PBG Dari Tata Ruang',
|
||||||
'document_color' => '#bf04bc',
|
'document_color' => '#ed9d2e',
|
||||||
'document_type' => '',
|
'document_type' => '',
|
||||||
'document_id' => 'chart-potensi-tata-ruang',
|
'document_id' => 'chart-potensi-tata-ruang',
|
||||||
'visible_small_circle' => true,
|
'visible_small_circle' => true,
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
|
|
||||||
@component('components.circle', [
|
@component('components.circle', [
|
||||||
'document_title' => 'Non Usaha',
|
'document_title' => 'Non Usaha',
|
||||||
'document_color' => '#028399',
|
'document_color' => '#399787',
|
||||||
'document_type' => 'Berkas',
|
'document_type' => 'Berkas',
|
||||||
'document_id' => 'chart-non-business',
|
'document_id' => 'chart-non-business',
|
||||||
'visible_small_circle' => true,
|
'visible_small_circle' => true,
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
|
|
||||||
@component('components.circle', [
|
@component('components.circle', [
|
||||||
'document_title' => 'Usaha',
|
'document_title' => 'Usaha',
|
||||||
'document_color' => '#616b7d',
|
'document_color' => '#5e7c89',
|
||||||
'document_type' => 'Berkas',
|
'document_type' => 'Berkas',
|
||||||
'document_id' => 'chart-business',
|
'document_id' => 'chart-business',
|
||||||
'visible_small_circle' => true,
|
'visible_small_circle' => true,
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
|
|
||||||
@component('components.circle', [
|
@component('components.circle', [
|
||||||
'document_title' => 'Berkas Terverifikasi',
|
'document_title' => 'Berkas Terverifikasi',
|
||||||
'document_color' => '#0561f5',
|
'document_color' => '#5170ff',
|
||||||
'document_type' => 'Berkas',
|
'document_type' => 'Berkas',
|
||||||
'document_id' => 'chart-berkas-terverifikasi',
|
'document_id' => 'chart-berkas-terverifikasi',
|
||||||
'visible_small_circle' => true,
|
'visible_small_circle' => true,
|
||||||
@@ -126,7 +126,7 @@
|
|||||||
|
|
||||||
@component('components.circle', [
|
@component('components.circle', [
|
||||||
'document_title' => 'Berkas Belum Terverifikasi',
|
'document_title' => 'Berkas Belum Terverifikasi',
|
||||||
'document_color' => '#b973ff',
|
'document_color' => '#5170ff',
|
||||||
'document_type' => 'Berkas',
|
'document_type' => 'Berkas',
|
||||||
'document_id' => 'chart-berkas-belum-terverifikasi',
|
'document_id' => 'chart-berkas-belum-terverifikasi',
|
||||||
'visible_small_circle' => true,
|
'visible_small_circle' => true,
|
||||||
@@ -143,7 +143,7 @@
|
|||||||
|
|
||||||
@component('components.circle',[
|
@component('components.circle',[
|
||||||
'document_title' => 'Realisasi Terbit PBG',
|
'document_title' => 'Realisasi Terbit PBG',
|
||||||
'document_color' => '#09ab5a',
|
'document_color' => '#8cc540',
|
||||||
'document_type' => 'Berkas',
|
'document_type' => 'Berkas',
|
||||||
'document_id' => 'chart-realisasi-tebit-pbg',
|
'document_id' => 'chart-realisasi-tebit-pbg',
|
||||||
'visible_small_circle' => true,
|
'visible_small_circle' => true,
|
||||||
@@ -156,7 +156,7 @@
|
|||||||
|
|
||||||
@component('components.circle',[
|
@component('components.circle',[
|
||||||
'document_title' => 'Menunggu Klik DPMPTSP',
|
'document_title' => 'Menunggu Klik DPMPTSP',
|
||||||
'document_color' => '#0294ad',
|
'document_color' => '#00bf61',
|
||||||
'document_type' => 'Berkas',
|
'document_type' => 'Berkas',
|
||||||
'document_id' => 'chart-menunggu-klik-dpmptsp',
|
'document_id' => 'chart-menunggu-klik-dpmptsp',
|
||||||
'visible_small_circle' => true,
|
'visible_small_circle' => true,
|
||||||
@@ -169,7 +169,7 @@
|
|||||||
|
|
||||||
@component('components.circle',[
|
@component('components.circle',[
|
||||||
'document_title' => 'Berproses Di Dinas Teknis',
|
'document_title' => 'Berproses Di Dinas Teknis',
|
||||||
'document_color' => '#422519',
|
'document_color' => '#737373',
|
||||||
'document_type' => 'Berkas',
|
'document_type' => 'Berkas',
|
||||||
'document_id' => 'chart-proses-dinas-teknis',
|
'document_id' => 'chart-proses-dinas-teknis',
|
||||||
'visible_small_circle' => true,
|
'visible_small_circle' => true,
|
||||||
|
|||||||
119
resources/views/dashboards/lack_of_potential.blade.php
Normal file
119
resources/views/dashboards/lack_of_potential.blade.php
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
@extends('layouts.vertical', ['subtitle' => 'Dashboards'])
|
||||||
|
|
||||||
|
@section('css')
|
||||||
|
@vite(['resources/scss/dashboards/_lack-of-potential.scss'])
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
@include('layouts.partials.page-title', ['title' => 'Dashboards', 'subtitle' => 'Lack Of Potential'])
|
||||||
|
|
||||||
|
<div class="lack-of-potential-wrapper">
|
||||||
|
<div class="row" id="lack-of-potential-wrapper">
|
||||||
|
<div class="col-12">
|
||||||
|
<h3 class="mt-3 ms-2 text-danger">
|
||||||
|
ANALISA BIG DATA MELALUI APLIKASI SIBEDAS PBG
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="">
|
||||||
|
<div class="">
|
||||||
|
<div id="lack-of-potential-fixed-container" class="" style="width:1400px;height:770px;position:relative;margin:auto;z-index:1;">
|
||||||
|
<div style="position: absolute; top: 200px; left: 50px;">
|
||||||
|
<x-custom-circle title="Restoran" size="small" style="background-color: #0e4753;" />
|
||||||
|
<div class="square dia-top-left-bottom-right" style="top:30px;left:50px;width:150px;height:120px;"></div>
|
||||||
|
<x-custom-circle title="PBB Bangunan" visible_data="true" data="649.157" size="small" style="background-color: #0e4753;" />
|
||||||
|
<div class="square" style="width:150px;height:2px;background-color:black;left:50px;top:150px;"></div>
|
||||||
|
<x-custom-circle title="Reklame" visible_data="true" data="2.428" size="small" style="background-color: #0e4753;" />
|
||||||
|
<div class="square dia-top-right-bottom-left" style="top:140px;left:50px;width:150px;height:120px;"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="position: absolute; top: 300px; left: 200px;">
|
||||||
|
<div class="square dia-top-right-bottom-left" style="top:-100px;left:30px;width:150px;height:120px;"></div>
|
||||||
|
<div class="square dia-top-left-bottom-right" style="top:-100px;left:120px;width:120px;height:120px;"></div>
|
||||||
|
<x-custom-circle title="BAPENDA" size="small" style="float:left;background-color: #234f6c;" />
|
||||||
|
<x-custom-circle title="PDAM" visible_data="true" data="9.022" visible_data_type="true" data_type="Pelanggan" size="small" style="float:left;background-color: #234f6c;" />
|
||||||
|
<x-custom-circle title="KECAMATAN" size="small" style="float:left;background-color: #234f6c;" />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="position: absolute; top: 0px; left: 270px;">
|
||||||
|
<div class="square" style="width:5px;height:600px;background-color:black;left:70px;top:50px;"></div>
|
||||||
|
<div class="square dia-top-left-bottom-right" style="top:350px;left:-50px;width:120px;height:120px;"></div>
|
||||||
|
<div class="square dia-top-right-bottom-left" style="top:350px;left:70px;width:120px;height:120px;"></div>
|
||||||
|
<x-custom-circle title="Rumah Tinggal" size="small" style="background-color: #234f6c;margin:auto;" />
|
||||||
|
<x-custom-circle title="Non Usaha" size="large" style="background-color: #3a968b;margin-top:20px;" />
|
||||||
|
<x-custom-circle title="USAHA" size="large" style="background-color: #627c8b;margin-top:150px;" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="position: absolute; top: 650px; left: 110px;">
|
||||||
|
<div class="square dia-top-right-bottom-left" style="top:-110px;left:40px;width:200px;height:120px;"></div>
|
||||||
|
<div class="square dia-top-right-bottom-left" style="top:-110px;left:90px;width:150px;height:170px;"></div>
|
||||||
|
<div class="square dia-top-left-bottom-right" style="top:-110px;left:230px;width:150px;height:170px;"></div>
|
||||||
|
<div class="square dia-top-left-bottom-right" style="top:-110px;left:260px;width:200px;height:180px;"></div>
|
||||||
|
<x-custom-circle title="Villa" size="small" style="float:left;background-color: #234f6c;" />
|
||||||
|
<x-custom-circle title="Pabrik" size="small" style="float:left;background-color: #234f6c;" />
|
||||||
|
<x-custom-circle title="Jalan Protocol" size="small" style="float:left;background-color: #234f6c;" />
|
||||||
|
<x-custom-circle title="Ruko" size="small" style="float:left;background-color: #234f6c;" />
|
||||||
|
<x-custom-circle title="Pariwisata" size="small" style="float:left;background-color: #234f6c; margin-right: 20px;" />
|
||||||
|
<div class="square" style="width:150px;height:2px;background-color:black;left:350px;top:50px;"></div>
|
||||||
|
<x-custom-circle title="DISBUDPAR" size="small" style="background-color: #3a968b;" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="position: absolute; top: 280px; left: 550px;">
|
||||||
|
<div class="square dia-top-left-bottom-right" style="top:-110px;left:-150px;width:200px;height:180px;"></div>
|
||||||
|
<div class="square dia-top-right-bottom-left" style="top:70px;left:-150px;width:200px;height:130px;"></div>
|
||||||
|
<x-custom-circle title="Tim Wasdal Gabungan" size="large" style="background-color: #da6635;float:left" />
|
||||||
|
<div class="square" style="width:650px;height:5px;background-color:black;left:100px;top:75px;"></div>
|
||||||
|
@component('components.circle', [
|
||||||
|
'document_title' => 'Kekurangan Potensi',
|
||||||
|
'document_color' => '#ff5757',
|
||||||
|
'document_type' => '',
|
||||||
|
'document_id' => 'chart-lack-of-potential',
|
||||||
|
'visible_small_circle' => false,
|
||||||
|
'style' => 'margin-left:180px;top:-20px;'
|
||||||
|
])
|
||||||
|
@endcomponent
|
||||||
|
|
||||||
|
<x-custom-circle title="Tata Ruang" size="large" style="background-color: #da6635;float:left;margin-left:250px;" />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="position: absolute; top: 310px; left: 1150px;">
|
||||||
|
<div class="square dia-top-left-bottom-right" style="top:90px;left:-100px;width:100px;height:100px;"></div>
|
||||||
|
<div class="square dia-top-right-bottom-left" style="top:-110px;left:-100px;width:100px;height:100px;"></div>
|
||||||
|
<x-custom-circle title="Peta" visible_data_type="true" data_type="1:5000" size="small" style="background-color: #224f6d;float:left;" />
|
||||||
|
<x-custom-circle title="Tapak Bangunan" size="small" style="background-color: #2390af;float:left;margin-left:20px;" />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<x-custom-circle title="UUCK" size="small" style="background-color: #2390af;position:absolute;left:1270px;top:440px;" />
|
||||||
|
|
||||||
|
<div style="position: absolute; top: 470px; left: 430px;">
|
||||||
|
<div class="square dia-top-right-bottom-left" style="top:-80px;left:20px;width:150px;height:120px;"></div>
|
||||||
|
<div class="square dia-top-right-bottom-left" style="top:-50px;left:100px;width:100px;height:100px;"></div>
|
||||||
|
<div class="square dia-top-left-bottom-right" style="top:-50px;left:180px;width:100px;height:100px;"></div>
|
||||||
|
<div class="square dia-top-left-bottom-right" style="top:-60px;left:240px;width:120px;height:120px;"></div>
|
||||||
|
<x-custom-circle title="UPT Wasdal" size="small" style="background-color: #0f4853;float:left;" />
|
||||||
|
<x-custom-circle title="Satpol PP" size="small" style="background-color: #0f4853;float:left;" />
|
||||||
|
<x-custom-circle title="KEJARI" size="small" style="background-color: #0f4853;float:left;" />
|
||||||
|
<x-custom-circle title="TNI & POLRI" size="small" style="background-color: #0f4853;float:left;" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<x-custom-circle title="UUCK" size="small" style="background-color: #2390af;position:absolute;left:980px;top:500px;" />
|
||||||
|
|
||||||
|
<div style="position: absolute; top: 50px; left: 1100px;">
|
||||||
|
<x-custom-circle title="Non Usaha" size="large" style="background-color: #3a968b;margin-top:20px;" />
|
||||||
|
<x-custom-circle title="USAHA" size="large" style="background-color: #627c8b;margin-top:260px;" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('scripts')
|
||||||
|
@vite(['resources/js/dashboards/lack-of-potential.js'])
|
||||||
|
@endsection
|
||||||
|
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
@extends('layouts.vertical', ['subtitle' => 'File Upload'])
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
@include('layouts.partials/page-title', ['title' => 'Form', 'subtitle' => 'File Uploads'])
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xl-12">
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-header">
|
|
||||||
<div class="d-flex justify-content-between align-items-center">
|
|
||||||
<h5 class="card-title mb-0">Upload Data Pariwisata</h5>
|
|
||||||
<button id="downloadtempspatialPlannings" class="btn btn-secondary">Download Template</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card-body">
|
|
||||||
|
|
||||||
<div class="mb-3">
|
|
||||||
|
|
||||||
<div class="dropzone">
|
|
||||||
<form action="" method="post" enctype="multipart/form-data">
|
|
||||||
<div class="fallback">
|
|
||||||
<input id="file-dropzone"type="file" name="file" multiple/>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
<div class="dz-message needsclick">
|
|
||||||
<i class="h1 bx bx-cloud-upload"></i>
|
|
||||||
<h3>Drop files here or click to upload.</h3>
|
|
||||||
<p class="card-subtitle">
|
|
||||||
Please upload a file with the extension <strong>.xls or .xlsx</strong> with a maximum size of <strong>10 MB</strong>.
|
|
||||||
<br>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<ul class="list-unstyled mb-0" id="dropzone-preview">
|
|
||||||
<li class="mt-2" id="dropzone-preview-list">
|
|
||||||
<!-- This is used as the file preview template -->
|
|
||||||
<div class="border rounded">
|
|
||||||
<div class="d-flex align-items-center p-2">
|
|
||||||
<div class="flex-shrink-0 me-3">
|
|
||||||
<div class="avatar-sm bg-light rounded">
|
|
||||||
<img data-dz-thumbnail class="img-fluid rounded d-block" src="#"
|
|
||||||
alt="" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex-grow-1">
|
|
||||||
<div class="pt-1">
|
|
||||||
<h5 class="fs-14 mb-1" data-dz-name>
|
|
||||||
</h5>
|
|
||||||
<p class="fs-13 text-muted mb-0" data-dz-size></p>
|
|
||||||
<strong class="error text-danger" data-dz-errormessage></strong>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex-shrink-0 ms-3">
|
|
||||||
<button data-dz-remove class="btn btn-sm btn-danger">Delete</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<!-- end dropzon-preview -->
|
|
||||||
</div>
|
|
||||||
<div class="d-flex justify-content-end">
|
|
||||||
<button id="submit-upload" class="btn btn-primary">Upload Files</button>
|
|
||||||
</div>
|
|
||||||
</div> <!-- end card body -->
|
|
||||||
</div> <!-- end card -->
|
|
||||||
</div> <!-- end col -->
|
|
||||||
</div> <!-- end row -->
|
|
||||||
|
|
||||||
<div class="toast-container position-fixed end-0 top-0 p-3">
|
|
||||||
<div id="toastUploadSpatialPlannings" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
|
|
||||||
<div class="toast-header">
|
|
||||||
<div class="auth-logo me-auto">
|
|
||||||
</div>
|
|
||||||
<small class="text-muted"></small>
|
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="toast"
|
|
||||||
aria-label="Close"></button>
|
|
||||||
</div>
|
|
||||||
<div class="toast-body">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
|
|
||||||
@section('scripts')
|
|
||||||
@vite(['resources/js/data/spatialPlannings/form-upload.js'])
|
|
||||||
@endsection
|
|
||||||
@@ -1,130 +0,0 @@
|
|||||||
@extends('layouts.vertical', ['subtitle' => $subtitle]) <!-- Menggunakan subtitle dari controller -->
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
@include('layouts.partials/page-title', ['title' => $title, 'subtitle' => $subtitle]) <!-- Menggunakan title dan subtitle dari controller -->
|
|
||||||
|
|
||||||
<div class="row d-flex justify-content-center">
|
|
||||||
@if (session('error'))
|
|
||||||
<div class="alert alert-danger">
|
|
||||||
{{ session('error') }}
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@if ($errors->any())
|
|
||||||
<div class="alert alert-danger">
|
|
||||||
<ul>
|
|
||||||
@foreach ($errors->all() as $error)
|
|
||||||
<li>{{ $error }}</li>
|
|
||||||
@endforeach
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
<div class="col-lg-12 col-md-12">
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-header">
|
|
||||||
<button class="btn btn-danger float-end btn-back">
|
|
||||||
<i class='bx bx-arrow-back'></i>
|
|
||||||
Back
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="card-body">
|
|
||||||
<form id="create-update-form" action="{{ isset($modelInstance) && $modelInstance->id ? $apiUrl . '/' . $modelInstance->id : $apiUrl }}" method="POST">
|
|
||||||
@csrf
|
|
||||||
@if(isset($modelInstance))
|
|
||||||
@method('PUT')
|
|
||||||
@endif
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
@foreach($fields as $field => $label)
|
|
||||||
<div class="col-md-6 form-group mb-3">
|
|
||||||
<label for="{{ $field }}">{{ $label }}</label>
|
|
||||||
@php
|
|
||||||
$fieldType = $fieldTypes[$field] ?? 'text'; // Default text jika tidak ditemukan tipe
|
|
||||||
@endphp
|
|
||||||
|
|
||||||
@if($fieldType == 'textarea')
|
|
||||||
<textarea id="{{ $field }}" name="{{ $field }}" class="form-control">{{ old($field, isset($modelInstance) ? $modelInstance->{$field} : '') }}</textarea>
|
|
||||||
@elseif($fieldType == 'select' && isset($dropdownOptions[$field]))
|
|
||||||
<select id="{{ $field }}" name="{{ $field }}" class="form-control">
|
|
||||||
@foreach($dropdownOptions[$field] as $code => $name)
|
|
||||||
@php
|
|
||||||
// $selectedValue = old($field, $modelInstance->{$field});
|
|
||||||
$selectedValue = old($field, $modelInstance->$field ?? '');
|
|
||||||
$isSelected = strval($selectedValue) === strval($code);
|
|
||||||
@endphp
|
|
||||||
<option value="{{ $code }}" class="{{ $isSelected ? 'selected' : '' }}" {{ $isSelected ? 'selected' : '' }}>
|
|
||||||
{{ $name }}
|
|
||||||
</option>
|
|
||||||
@endforeach
|
|
||||||
</select>
|
|
||||||
@elseif($fieldType == 'combobox' && isset($dropdownOptions[$field]))
|
|
||||||
<input class="form-control" list="{{ $field }}Options" id="{{ $field }}" name="{{ $field }}"
|
|
||||||
value="{{ old($field, isset($modelInstance) ? $modelInstance->{$field} : '') }}" placeholder="Type to search..." oninput="fetchOptions('{{ $field }}')">
|
|
||||||
<datalist id="{{ $field }}Options"></datalist>
|
|
||||||
@elseif($fieldType == 'date')
|
|
||||||
<input type="date" id="{{ $field }}" name="{{ $field }}" class="form-control"
|
|
||||||
value="{{ old($field, isset($modelInstance) && $modelInstance->{$field} ? \Carbon\Carbon::parse($modelInstance->{$field})->format('Y-m-d') : '') }}">
|
|
||||||
@else
|
|
||||||
<input type="{{ $fieldType }}" id="{{ $field }}" name="{{ $field }}" class="form-control" value="{{ old($field, isset($modelInstance) ? $modelInstance->{$field} : '') }}">
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
@endforeach
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="d-flex justify-content-end">
|
|
||||||
<button type="button" class="btn {{ isset($modelInstance) ? 'btn-warning' : 'btn-success' }} width-lg btn-modal" data-bs-toggle="modal" data-bs-target="#confirmationModalCenter">
|
|
||||||
{{ isset($modelInstance) ? 'Update' : 'Create' }}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Modal -->
|
|
||||||
<div class="modal fade" id="confirmationModalCenter" tabindex="-1"
|
|
||||||
aria-labelledby="confirmationModalCenterTitle" aria-hidden="true">
|
|
||||||
<div class="modal-dialog modal-dialog-centered">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h5 class="modal-title" id="confirmationModalCenterTitle">
|
|
||||||
{{ isset($modelInstance) ? 'Update Confirmation' : 'Create Confirmation' }}
|
|
||||||
</h5>
|
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="modal"
|
|
||||||
aria-label="Close"></button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<p>{{ isset($modelInstance) ? 'Are you sure you want to save the data changes?' : 'Are you sure you want to create new data based on the form contents?' }}</p>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-secondary"
|
|
||||||
data-bs-dismiss="modal">Close</button>
|
|
||||||
<button type="button" class="btn btn-primary {{ isset($modelInstance) ? 'btn-edit' : 'btn-create' }}" data-bs-dismiss="modal">Save changes</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="toast-container position-fixed end-0 top-0 p-3">
|
|
||||||
<div id="toastEditUpdate" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
|
|
||||||
<div class="toast-header">
|
|
||||||
<div class="auth-logo me-auto">
|
|
||||||
</div>
|
|
||||||
<small class="text-muted"></small>
|
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="toast"
|
|
||||||
aria-label="Close"></button>
|
|
||||||
</div>
|
|
||||||
<div class="toast-body">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
|
|
||||||
@section('scripts')
|
|
||||||
@vite(['resources/js/data/spatialPlannings/form-create-update.js'])
|
|
||||||
@endsection
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
@extends('layouts.vertical', ['subtitle' => 'Rencana Tata Ruang'])
|
|
||||||
|
|
||||||
@section('css')
|
|
||||||
@vite(['node_modules/gridjs/dist/theme/mermaid.min.css'])
|
|
||||||
@endsection
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
@include('layouts.partials/page-title', ['title' => 'Data', 'subtitle' => 'Rencana Tata Ruang'])
|
|
||||||
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-header">
|
|
||||||
<h5 class="card-title">Daftar Rencana Tata Ruang</h5>
|
|
||||||
</div>
|
|
||||||
<div class="card-body">
|
|
||||||
<div class="row">
|
|
||||||
<div class="d-flex justify-content-end gap-10 pb-3">
|
|
||||||
<button class="btn btn-success me-2 width-lg btn-create" data-model="data/spatial-plannings">
|
|
||||||
<i class='bx bxs-file-plus'></i>
|
|
||||||
Create</button>
|
|
||||||
<button class="btn btn-primary width-lg btn-bulk-create" data-model="data/spatial-plannings">
|
|
||||||
<i class='bx bx-upload' ></i>
|
|
||||||
Bulk Create
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div id="spatial-planning-data-table"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{-- <div id="alert-container"></div> --}}
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
|
|
||||||
@section('scripts')
|
|
||||||
@vite(['resources/js/data/spatialPlannings/data-spatialPlannings.js'])
|
|
||||||
@endsection
|
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
</div> <!-- end row -->
|
</div> <!-- end row -->
|
||||||
|
|
||||||
<div class="toast-container position-fixed end-0 top-0 p-3">
|
<div class="toast-container position-fixed end-0 top-0 p-3">
|
||||||
<div id="toastUploadTourisms" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
|
<div id="toastUploadUmkm" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
|
||||||
<div class="toast-header">
|
<div class="toast-header">
|
||||||
<div class="auth-logo me-auto">
|
<div class="auth-logo me-auto">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ use App\Http\Controllers\Settings\SyncronizeController;
|
|||||||
use App\Http\Controllers\Api\AdvertisementController;
|
use App\Http\Controllers\Api\AdvertisementController;
|
||||||
use App\Http\Controllers\Api\UmkmController;
|
use App\Http\Controllers\Api\UmkmController;
|
||||||
use App\Http\Controllers\Api\TourismController;
|
use App\Http\Controllers\Api\TourismController;
|
||||||
use App\Http\Controllers\Api\SpatialPlanningController;
|
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
Route::post('/login', [UsersController::class, 'login'])->name('api.user.login');
|
Route::post('/login', [UsersController::class, 'login'])->name('api.user.login');
|
||||||
@@ -66,11 +65,7 @@ Route::group(['middleware' => 'auth:sanctum'], function (){
|
|||||||
//tourism
|
//tourism
|
||||||
Route::apiResource('tourisms', TourismController::class);
|
Route::apiResource('tourisms', TourismController::class);
|
||||||
Route::post('/tourisms/import', [TourismController::class, 'importFromFile']);
|
Route::post('/tourisms/import', [TourismController::class, 'importFromFile']);
|
||||||
Route::get('/download-template-tourism', [TourismController::class, 'downloadExcelTourism']);
|
|
||||||
|
|
||||||
Route::apiResource('spatial-plannings', SpatialPlanningController::class);
|
|
||||||
Route::post('/spatial-plannings/import', [SpatialPlanningController::class, 'importFromFile']);
|
|
||||||
Route::get('/download-template-spatialPlannings', [SpatialPlanningController::class, 'downloadExcelSpatialPlanning']);
|
|
||||||
|
|
||||||
// data-settings
|
// data-settings
|
||||||
Route::apiResource('/api-data-settings', DataSettingController::class);
|
Route::apiResource('/api-data-settings', DataSettingController::class);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use App\Http\Controllers\BusinessOrIndustriesController;
|
use App\Http\Controllers\BusinessOrIndustriesController;
|
||||||
|
use App\Http\Controllers\Dashboards\LackOfPotentialController;
|
||||||
use App\Http\Controllers\DataSettingController;
|
use App\Http\Controllers\DataSettingController;
|
||||||
use App\Http\Controllers\Dashboards\BigDataController;
|
use App\Http\Controllers\Dashboards\BigDataController;
|
||||||
use App\Http\Controllers\Home\HomeController;
|
use App\Http\Controllers\Home\HomeController;
|
||||||
@@ -13,7 +14,6 @@ use App\Http\Controllers\Settings\SyncronizeController;
|
|||||||
use App\Http\Controllers\Data\AdvertisementController;
|
use App\Http\Controllers\Data\AdvertisementController;
|
||||||
use App\Http\Controllers\Data\UmkmController;
|
use App\Http\Controllers\Data\UmkmController;
|
||||||
use App\Http\Controllers\Data\TourismController;
|
use App\Http\Controllers\Data\TourismController;
|
||||||
use App\Http\Controllers\Data\SpatialPlanningController;
|
|
||||||
use App\Http\Controllers\Report\ReportTourismController;
|
use App\Http\Controllers\Report\ReportTourismController;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
@@ -28,6 +28,7 @@ Route::group(['middleware' => 'auth'], function(){
|
|||||||
Route::group(['prefix' => '/dashboards'], function(){
|
Route::group(['prefix' => '/dashboards'], function(){
|
||||||
Route::get('/bigdata', [BigDataController::class, 'index'])->name('dashboard.home');
|
Route::get('/bigdata', [BigDataController::class, 'index'])->name('dashboard.home');
|
||||||
Route::get('/dashboard-pbg', [BigDataController::class, 'pbg'])->name('dashboard.pbg');
|
Route::get('/dashboard-pbg', [BigDataController::class, 'pbg'])->name('dashboard.pbg');
|
||||||
|
Route::get('/lack-of-potential', [LackOfPotentialController::class, 'lack_of_potential'])->name('dashboard.lack_of_potential');
|
||||||
});
|
});
|
||||||
|
|
||||||
// settings
|
// settings
|
||||||
@@ -80,14 +81,6 @@ Route::group(['middleware' => 'auth'], function(){
|
|||||||
// Rute khusus untuk create dan bulk-create
|
// Rute khusus untuk create dan bulk-create
|
||||||
Route::get('/tourisms/create', [TourismController::class, 'create'])->name('tourisms.create');
|
Route::get('/tourisms/create', [TourismController::class, 'create'])->name('tourisms.create');
|
||||||
Route::get('/tourisms/bulk-create', [TourismController::class, 'bulkCreate'])->name('tourisms.bulk-create');
|
Route::get('/tourisms/bulk-create', [TourismController::class, 'bulkCreate'])->name('tourisms.bulk-create');
|
||||||
|
|
||||||
// Resource route, kecuali create karena dibuat terpisah
|
|
||||||
Route::resource('/spatial-plannings', SpatialPlanningController::class)->except(['create', 'show']);
|
|
||||||
// Rute khusus untuk create dan bulk-create
|
|
||||||
Route::get('/spatial-plannings/create', [SpatialPlanningController::class, 'create'])->name('tourisms.create');
|
|
||||||
Route::get('/spatial-plannings/bulk-create', [SpatialPlanningController::class, 'bulkCreate'])->name('tourisms.bulk-create');
|
|
||||||
|
|
||||||
|
|
||||||
Route::resource('/business-industries',BusinessOrIndustriesController::class);
|
Route::resource('/business-industries',BusinessOrIndustriesController::class);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ export default defineConfig({
|
|||||||
"resources/scss/style.scss",
|
"resources/scss/style.scss",
|
||||||
"resources/scss/components/_circle.scss",
|
"resources/scss/components/_circle.scss",
|
||||||
"resources/scss/dashboards/_bigdata.scss",
|
"resources/scss/dashboards/_bigdata.scss",
|
||||||
|
"resources/scss/dashboards/_lack-of-potential.scss",
|
||||||
|
"resources/scss/components/_custom_circle.scss",
|
||||||
|
|
||||||
"node_modules/quill/dist/quill.snow.css",
|
"node_modules/quill/dist/quill.snow.css",
|
||||||
"node_modules/quill/dist/quill.bubble.css",
|
"node_modules/quill/dist/quill.bubble.css",
|
||||||
@@ -49,11 +51,14 @@ export default defineConfig({
|
|||||||
"resources/js/data/advertisements/form-upload.js",
|
"resources/js/data/advertisements/form-upload.js",
|
||||||
|
|
||||||
//js-additional
|
//js-additional
|
||||||
"resources/js/dashboards/bigdata.js",
|
|
||||||
"resources/js/settings/syncronize/syncronize.js",
|
"resources/js/settings/syncronize/syncronize.js",
|
||||||
"resources/js/pbg-task/index.js",
|
"resources/js/pbg-task/index.js",
|
||||||
"resources/js/settings/general/general-settings.js",
|
"resources/js/settings/general/general-settings.js",
|
||||||
"resources/js/tables/common-table.js",
|
"resources/js/tables/common-table.js",
|
||||||
|
|
||||||
|
// dashboards
|
||||||
|
"resources/js/dashboards/bigdata.js",
|
||||||
|
"resources/js/dashboards/lack-of-potential.js",
|
||||||
// roles
|
// roles
|
||||||
"resources/js/roles/index.js",
|
"resources/js/roles/index.js",
|
||||||
"resources/js/roles/create.js",
|
"resources/js/roles/create.js",
|
||||||
|
|||||||
Reference in New Issue
Block a user