partial update create crud pbg
This commit is contained in:
90
app/Http/Controllers/Api/PbgTaskController.php
Normal file
90
app/Http/Controllers/Api/PbgTaskController.php
Normal file
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\PbgTaskMultiStepRequest;
|
||||
use App\Models\PbgTask;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class PbgTaskController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(PbgTaskMultiStepRequest $request)
|
||||
{
|
||||
try {
|
||||
$data = PbgTask::create([
|
||||
"uuid" => $request->input("step1Form.uuid"),
|
||||
"name" => $request->input("step1Form.name"),
|
||||
"owner_name" => $request->input("step1Form.owner_name"),
|
||||
"application_type" => $request->input("step1Form.application_type"),
|
||||
"application_type_name" => $request->input("step1Form.application_type_name"),
|
||||
"condition" => $request->input("step1Form.condition"),
|
||||
"registration_number" => $request->input("step1Form.registration_number"),
|
||||
"document_number" => $request->input("step1Form.document_number"),
|
||||
"address" => $request->input("step1Form.address"),
|
||||
"status" => $request->input("step1Form.status"),
|
||||
"status_name" => $request->input("step1Form.status_name"),
|
||||
"slf_status" => $request->input("step1Form.slf_status"),
|
||||
"slf_status_name" => $request->input("step1Form.slf_status_name"),
|
||||
"function_type" => $request->input("step1Form.function_type"),
|
||||
"consultation_type" => $request->input("step1Form.consultation_type"),
|
||||
"due_date" => $request->input("step1Form.due_date"),
|
||||
"land_certificate_phase" => $request->input("step1Form.land_certificate_phase"),
|
||||
"task_created_at" => $request->input("step1Form.task_created_at"),
|
||||
]);
|
||||
|
||||
return response()->json([
|
||||
"success" => true,
|
||||
"message" => "Step 1 berhasil disimpan!",
|
||||
"data" => $data
|
||||
], 201);
|
||||
} catch (\Exception $e) {
|
||||
return response()->json([
|
||||
"success" => false,
|
||||
"message" => "Gagal menyimpan data",
|
||||
"error" => $e->getMessage()
|
||||
], 500);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*/
|
||||
public function show(string $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, string $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy(string $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
protected function validatePbgTask(Request $request){
|
||||
return $request->validate([
|
||||
"uuid" => $request->input("step1Form.uuid"),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ class RequestAssignmentController extends Controller
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
$query = PbgTask::query();
|
||||
$query = PbgTask::query()->orderBy('id', 'desc');
|
||||
if($request->has('search') && !empty($request->get("search"))){
|
||||
$query->where('name', 'LIKE', '%'.$request->get('search').'%');
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ class PbgTaskController extends Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return view('request-assignment.index');
|
||||
return view('pbg_task.index');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -20,7 +20,7 @@ class PbgTaskController extends Controller
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
return view("pbg_task.create");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -28,7 +28,7 @@ class PbgTaskController extends Controller
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -36,7 +36,7 @@ class PbgTaskController extends Controller
|
||||
*/
|
||||
public function show(string $id)
|
||||
{
|
||||
//
|
||||
return view("pbg_task.show");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -44,7 +44,7 @@ class PbgTaskController extends Controller
|
||||
*/
|
||||
public function edit(string $id)
|
||||
{
|
||||
//
|
||||
return view("pbg_task.edit");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
62
app/Http/Requests/PbgTaskMultiStepRequest.php
Normal file
62
app/Http/Requests/PbgTaskMultiStepRequest.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class PbgTaskMultiStepRequest 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()
|
||||
{
|
||||
return [
|
||||
// rules step 1
|
||||
"step1Form.uuid" => "required",
|
||||
"step1Form.name" => "nullable|string|max:255",
|
||||
"step1Form.owner_name" => "nullable|string|max:255",
|
||||
"step1Form.application_type" => "nullable|string|max:255",
|
||||
"step1Form.application_type_name" => "nullable|string|max:255",
|
||||
"step1Form.condition" => "nullable|string|max:255",
|
||||
"step1Form.registration_number" => "nullable|string|max:255",
|
||||
"step1Form.document_number" => "nullable|string|max:255",
|
||||
"step1Form.address" => "nullable|string|max:255",
|
||||
"step1Form.status" => "nullable|integer",
|
||||
"step1Form.status_name" => "nullable|string|max:255",
|
||||
"step1Form.slf_status" => "nullable|string|max:255",
|
||||
"step1Form.slf_status_name" => "nullable|string|max:255",
|
||||
"step1Form.function_type" => "nullable|string|max:255",
|
||||
"step1Form.consultation_type" => "nullable|string|max:255",
|
||||
"step1Form.due_date" => "nullable|date",
|
||||
"step1Form.land_certificate_phase" => "nullable|boolean",
|
||||
"step1Form.task_created_at" => "nullable|date",
|
||||
];
|
||||
}
|
||||
|
||||
public function messages()
|
||||
{
|
||||
return [
|
||||
// message step 1
|
||||
"step1Form.uuid.required" => "UUID wajib diisi.",
|
||||
"step1Form.uuid.uuid" => "Format UUID tidak valid.",
|
||||
"step1Form.name.max" => "Nama tidak boleh lebih dari 255 karakter.",
|
||||
"step1Form.owner_name.max" => "Nama pemilik tidak boleh lebih dari 255 karakter.",
|
||||
"step1Form.registration_number.max" => "Nomor registrasi tidak boleh lebih dari 255 karakter.",
|
||||
"step1Form.document_number.max" => "Nomor dokumen tidak boleh lebih dari 255 karakter.",
|
||||
"step1Form.status.integer" => "Status harus berupa angka.",
|
||||
"step1Form.due_date.date" => "Tanggal jatuh tempo tidak valid.",
|
||||
"step1Form.land_certificate_phase.boolean" => "Fase sertifikat tanah harus berupa true/false.",
|
||||
];
|
||||
}
|
||||
}
|
||||
132
resources/js/pbg-task/create.js
Normal file
132
resources/js/pbg-task/create.js
Normal file
@@ -0,0 +1,132 @@
|
||||
import GlobalConfig from "../global-config.js";
|
||||
|
||||
class MultiFormCreatePBG {
|
||||
constructor() {
|
||||
this.currentStep = 1;
|
||||
this.totalSteps = 4;
|
||||
this.formData = {}; // Menyimpan data dari semua langkah
|
||||
}
|
||||
|
||||
init() {
|
||||
document
|
||||
.getElementById("nextStep")
|
||||
.addEventListener("click", () => this.nextStep());
|
||||
|
||||
document
|
||||
.getElementById("prevStep")
|
||||
.addEventListener("click", () => this.prevStep());
|
||||
}
|
||||
|
||||
nextStep() {
|
||||
if (!this.validateStep()) return;
|
||||
|
||||
this.saveStepData();
|
||||
|
||||
if (this.currentStep < this.totalSteps) {
|
||||
document
|
||||
.getElementById(`step${this.currentStep}`)
|
||||
.classList.add("d-none");
|
||||
|
||||
this.currentStep++;
|
||||
document
|
||||
.getElementById(`step${this.currentStep}`)
|
||||
.classList.remove("d-none");
|
||||
|
||||
document.getElementById(
|
||||
"stepTitle"
|
||||
).innerText = `Step ${this.currentStep}`;
|
||||
document.getElementById("prevStep").disabled = false;
|
||||
document.getElementById("nextStep").innerText =
|
||||
this.currentStep === this.totalSteps ? "Submit" : "Next →";
|
||||
} else {
|
||||
this.submitForm(); // Submit ke API jika sudah step terakhir
|
||||
}
|
||||
}
|
||||
|
||||
prevStep() {
|
||||
if (this.currentStep > 1) {
|
||||
document
|
||||
.getElementById(`step${this.currentStep}`)
|
||||
.classList.add("d-none");
|
||||
|
||||
this.currentStep--;
|
||||
document
|
||||
.getElementById(`step${this.currentStep}`)
|
||||
.classList.remove("d-none");
|
||||
|
||||
document.getElementById(
|
||||
"stepTitle"
|
||||
).innerText = `Step ${this.currentStep}`;
|
||||
document.getElementById("prevStep").disabled =
|
||||
this.currentStep === 1;
|
||||
document.getElementById("nextStep").innerText = "Next →";
|
||||
}
|
||||
}
|
||||
|
||||
saveStepData() {
|
||||
const stepForm = document.querySelector(`#step${this.currentStep}Form`);
|
||||
const formDataObj = new FormData(stepForm);
|
||||
|
||||
if (!this.formData) {
|
||||
this.formData = {};
|
||||
}
|
||||
|
||||
const stepKey = `step${this.currentStep}Form`;
|
||||
this.formData[stepKey] = {};
|
||||
|
||||
for (const [key, value] of formDataObj.entries()) {
|
||||
this.formData[stepKey][key] = value;
|
||||
}
|
||||
|
||||
console.log("form data", this.formData);
|
||||
}
|
||||
|
||||
validateStep() {
|
||||
const stepForm = document.querySelector(`#step${this.currentStep}Form`);
|
||||
const inputs = stepForm.querySelectorAll(
|
||||
"input[required], select[required]"
|
||||
);
|
||||
let isValid = true;
|
||||
|
||||
inputs.forEach((input) => {
|
||||
if (!input.value) {
|
||||
input.classList.add("is-invalid");
|
||||
isValid = false;
|
||||
} else {
|
||||
input.classList.remove("is-invalid");
|
||||
}
|
||||
});
|
||||
|
||||
return isValid;
|
||||
}
|
||||
|
||||
async submitForm() {
|
||||
try {
|
||||
const response = await fetch(
|
||||
`${GlobalConfig.apiHost}/api/api-pbg-task`,
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: `Bearer ${
|
||||
document.querySelector("meta[name='api-token']")
|
||||
.content
|
||||
}`,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify(this.formData),
|
||||
}
|
||||
);
|
||||
|
||||
const result = await response.json();
|
||||
alert(result.message);
|
||||
window.location.href = "/pbg-task";
|
||||
} catch (error) {
|
||||
console.error("Error submitting form:", error);
|
||||
alert("Terjadi kesalahan saat mengirim data.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
new MultiFormCreatePBG().init();
|
||||
});
|
||||
69
resources/js/pbg-task/index.js
Normal file
69
resources/js/pbg-task/index.js
Normal file
@@ -0,0 +1,69 @@
|
||||
import { Grid } from "gridjs/dist/gridjs.umd.js";
|
||||
import "gridjs/dist/gridjs.umd.js";
|
||||
import GlobalConfig from "../global-config";
|
||||
|
||||
class PbgTasks {
|
||||
init() {
|
||||
this.initTableRequestAssignment();
|
||||
}
|
||||
|
||||
initTableRequestAssignment() {
|
||||
new Grid({
|
||||
columns: [
|
||||
"ID",
|
||||
{ name: "Name", width: "15%" },
|
||||
{ name: "Condition", width: "7%" },
|
||||
"Registration Number",
|
||||
"Document Number",
|
||||
{ name: "Address", width: "30%" },
|
||||
"Status",
|
||||
"Function Type",
|
||||
"Consultation Type",
|
||||
{ name: "Due Date", width: "7%" },
|
||||
],
|
||||
search: {
|
||||
server: {
|
||||
url: (prev, keyword) => `${prev}?search=${keyword}`,
|
||||
},
|
||||
},
|
||||
pagination: {
|
||||
limit: 15,
|
||||
server: {
|
||||
url: (prev, page) =>
|
||||
`${prev}${prev.includes("?") ? "&" : "?"}page=${
|
||||
page + 1
|
||||
}`,
|
||||
},
|
||||
},
|
||||
sort: true,
|
||||
server: {
|
||||
url: `${GlobalConfig.apiHost}/api/request-assignments`,
|
||||
credentials: "include",
|
||||
headers: {
|
||||
Authorization: `Bearer ${document
|
||||
.querySelector('meta[name="api-token"]')
|
||||
.getAttribute("content")}`,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
then: (data) =>
|
||||
data.data.map((item) => [
|
||||
item.id,
|
||||
item.name,
|
||||
item.condition,
|
||||
item.registration_number,
|
||||
item.document_number,
|
||||
item.address,
|
||||
item.status_name,
|
||||
item.function_type,
|
||||
item.consultation_type,
|
||||
item.due_date,
|
||||
]),
|
||||
total: (data) => data.meta.total,
|
||||
},
|
||||
}).render(document.getElementById("table-pbg-tasks"));
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function (e) {
|
||||
new PbgTasks().init();
|
||||
});
|
||||
@@ -106,7 +106,7 @@
|
||||
<div class="collapse" id="data">
|
||||
<ul class="nav sub-navbar-nav">
|
||||
<li class="sub-nav-item">
|
||||
<a class="sub-nav-link" href="{{ route ('request-assignments.index' ) }}">PBG</a>
|
||||
<a class="sub-nav-link" href="{{ route ('pbg-task.index' ) }}">PBG</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -116,7 +116,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="animated-stars">
|
||||
<div class="animated-stars">
|
||||
<div class="shooting-star"></div>
|
||||
<div class="shooting-star"></div>
|
||||
<div class="shooting-star"></div>
|
||||
@@ -137,4 +137,4 @@
|
||||
<div class="shooting-star"></div>
|
||||
<div class="shooting-star"></div>
|
||||
<div class="shooting-star"></div>
|
||||
</div> -->
|
||||
</div>
|
||||
80
resources/views/pbg_task/_form_pbg_task.blade.php
Normal file
80
resources/views/pbg_task/_form_pbg_task.blade.php
Normal file
@@ -0,0 +1,80 @@
|
||||
<div class="card">
|
||||
<form id="step1Form">
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<h5 class="card-title mb-2">PBG Task</h5>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="uuid">UUID</label>
|
||||
<input type="string" id="uuid" name="uuid" class="form-control" placeholder="Enter UUID">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="name">Name</label>
|
||||
<input type="string" id="name" name="name" class="form-control" placeholder="Enter name">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="owner_name">Owner Name</label>
|
||||
<input type="string" id="owner_name" name="owner_name" class="form-control" placeholder="Enter ornwe name">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="application_type">Application Type</label>
|
||||
<input type="number" id="application_type" name="application_type" class="form-control" placeholder="Enter application type">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="application_type_name">Application Type Name</label>
|
||||
<input type="string" id="application_type_name" name="application_type_name" class="form-control" placeholder="Enter application type name">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="condition">Condition</label>
|
||||
<input type="string" id="condition" name="condition" class="form-control" placeholder="Enter condition">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="registration_number">Registration Number</label>
|
||||
<input type="string" id="registration_number" name="registration_number" class="form-control" placeholder="Enter registration number">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="document_number">Document Number</label>
|
||||
<input type="string" id="document_number" name="document_number" class="form-control" placeholder="Enter document number">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="address">Address</label>
|
||||
<input type="string" id="address" name="address" class="form-control" placeholder="Enter address">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="status">Status</label>
|
||||
<input type="number" id="status" name="status" class="form-control" placeholder="Enter status">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="status_name">Status Name</label>
|
||||
<input type="string" id="status_name" name="status_name" class="form-control" placeholder="Enter status name">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="slf_status">SLF Status</label>
|
||||
<input type="string" id="slf_status" name="slf_status" class="form-control" placeholder="Enter slf status">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="slf_status_name">SLF Status Name</label>
|
||||
<input type="string" id="slf_status_name" name="slf_status_name" class="form-control" placeholder="Enter slf status name">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="function_type">Function Type</label>
|
||||
<input type="string" id="function_type" name="function_type" class="form-control" placeholder="Enter function type">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="consultation_type">Consultation Type</label>
|
||||
<input type="string" id="consultation_type" name="consultation_type" class="form-control" placeholder="Enter cosultation type">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="due_date">Due Date</label>
|
||||
<input type="string" id="due_date" name="due_date" class="form-control" placeholder="Enter due date">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="land_certificate_phase">Land Certificate Phase</label>
|
||||
<input type="boolean" id="land_certificate_phase" name="land_certificate_phase" class="form-control" placeholder="Enter land certificate phase">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="task_created_at">Task Created At</label>
|
||||
<input type="string" id="task_created_at" name="task_created_at" class="form-control" placeholder="Enter task created at">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -0,0 +1,40 @@
|
||||
<div class="card">
|
||||
<form id="step3Form">
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<h5 class="card-title mb-2">PBG Task Indeks Integration</h5>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="pbg_task_uid">PBG Task UID</label>
|
||||
<input type="string" id="pbg_task_uid" name="pbg_task_uid" class="form-control" placeholder="Enter pbg task uid">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="indeks_fungsi_bangunan">Indeks Fungsi Bangunan</label>
|
||||
<input type="string" id="indeks_fungsi_bangunan" name="indeks_fungsi_bangunan" class="form-control" placeholder="Enter indeks fungsi bangunan">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="indeks_parameter_kompleksitas">Indeks parameter kompleksitas</label>
|
||||
<input type="string" id="indeks_parameter_kompleksitas" name="indeks_parameter_kompleksitas" class="form-control" placeholder="Enter detail updated at">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="indeks_parameter_permanensi">Indeks Parameter Permanensi</label>
|
||||
<input type="string" id="indeks_parameter_permanensi" name="indeks_parameter_permanensi" class="form-control" placeholder="Enter indeks parameter permanensi">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="indeks_parameter_ketinggian">Indeks Parameter Ketinggian</label>
|
||||
<input type="string" id="indeks_parameter_ketinggian" name="indeks_parameter_ketinggian" class="form-control" placeholder="Enter indeks parameter ketinggian">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="faktor_kepemilikan">Faktor Kepemilikan</label>
|
||||
<input type="string" id="faktor_kepemilikan" name="faktor_kepemilikan" class="form-control" placeholder="Enter faktor kepemilikan">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="indeks_terintegrasi">Indeks Terintegrasi</label>
|
||||
<input type="number" id="indeks_terintegrasi" name="indeks_terintegrasi" class="form-control" placeholder="Enter indeks terintegrasi">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="total">Total</label>
|
||||
<input type="string" id="total" name="total" class="form-control" placeholder="Enter total">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
40
resources/views/pbg_task/_form_pbg_task_prasarana.blade.php
Normal file
40
resources/views/pbg_task/_form_pbg_task_prasarana.blade.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<div class="card">
|
||||
<form id="step4Form">
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<h5 class="card-title mb-2">PBG Task Prasarana</h5>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="pbg_task_uid">PBG Task UID</label>
|
||||
<input type="string" id="pbg_task_uid" name="pbg_task_uid" class="form-control" placeholder="Enter pbg task uid">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="prasarana_id">Prasarana ID</label>
|
||||
<input type="string" id="prasarana_id" name="prasarana_id" class="form-control" placeholder="Enter prasarana id">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="prasarana_type">Prasarana Type</label>
|
||||
<input type="string" id="prasarana_type" name="prasarana_type" class="form-control" placeholder="Enter prasarana type">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="building_type">Building Type</label>
|
||||
<input type="string" id="building_type" name="building_type" class="form-control" placeholder="Enter building type">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="total">Total</label>
|
||||
<input type="string" id="total" name="total" class="form-control" placeholder="Enter total">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="quantity">Quantity</label>
|
||||
<input type="string" id="quantity" name="quantity" class="form-control" placeholder="Enter quantity">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="unit">Unit</label>
|
||||
<input type="number" id="unit" name="unit" class="form-control" placeholder="Enter unit">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="index_prasarana">Index Prasarana</label>
|
||||
<input type="string" id="index_prasarana" name="index_prasarana" class="form-control" placeholder="Enter indeks prasarana">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -0,0 +1,80 @@
|
||||
<div class="card">
|
||||
<form id="step2Form">
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<h5 class="card-title mb-2">PBG Task Retribution</h5>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="detail_id">Detail ID</label>
|
||||
<input type="string" id="detail_id" name="detail_id" class="form-control" placeholder="Enter detail id">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="detail_created_at">Detail Created At</label>
|
||||
<input type="string" id="detail_created_at" name="detail_created_at" class="form-control" placeholder="Enter detail created at">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="detail_updated_at">Detail Updated At</label>
|
||||
<input type="string" id="detail_updated_at" name="detail_updated_at" class="form-control" placeholder="Enter detail updated at">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="detail_uid">Detail UID</label>
|
||||
<input type="string" id="detail_uid" name="detail_uid" class="form-control" placeholder="Enter detail uid">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="luas_bangunan">Luas Bangunan</label>
|
||||
<input type="string" id="luas_bangunan" name="luas_bangunan" class="form-control" placeholder="Enter luas bangunan">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="indeks_lokalitas">Indeks Lokalitas</label>
|
||||
<input type="string" id="indeks_lokalitas" name="indeks_lokalitas" class="form-control" placeholder="Enter indeks lokalitas">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="wilayah_shst">Wilayah SHST</label>
|
||||
<input type="number" id="wilayah_shst" name="wilayah_shst" class="form-control" placeholder="Enter wilayah SHST">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="kegiatan_id">Kegiatan ID</label>
|
||||
<input type="string" id="kegiatan_id" name="kegiatan_id" class="form-control" placeholder="Enter kegiatan id">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="kegiatan_name">Kegiatan Name</label>
|
||||
<input type="string" id="kegiatan_name" name="kegiatan_name" class="form-control" placeholder="Enter kegiatan name">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="nilai_shst">Nilai SHST</label>
|
||||
<input type="string" id="nilai_shst" name="nilai_shst" class="form-control" placeholder="Enter nilai shst">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="nilai_retribusi_bangunan">Indeks Retribusi Terbangun</label>
|
||||
<input type="string" id="nilai_retribusi_bangunan" name="nilai_retribusi_bangunan" class="form-control" placeholder="Enter indeks retribusi terbangun">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="nilai_prasarana">Nilai Prasarana</label>
|
||||
<input type="string" id="nilai_prasarana" name="nilai_prasarana" class="form-control" placeholder="Enter nilai_prasarana">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="created_by">Created By</label>
|
||||
<input type="string" id="created_by" name="created_by" class="form-control" placeholder="Enter created_by">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="pbg_document">PBG Document</label>
|
||||
<input type="string" id="pbg_document" name="pbg_document" class="form-control" placeholder="Enter pbg document">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="underpayment">Underpayment</label>
|
||||
<input type="string" id="underpayment" name="underpayment" class="form-control" placeholder="Enter underpayment">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="function_type">Function Type</label>
|
||||
<input type="string" id="function_type" name="function_type" class="form-control" placeholder="Enter function type">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="skrd_amount">SKRD Amount</label>
|
||||
<input type="string" id="skrd_amount" name="skrd_amount" class="form-control" placeholder="Enter skrd amount">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="pbg_task_uid">PBG Task UID</label>
|
||||
<input type="string" id="pbg_task_uid" name="pbg_task_uid" class="form-control" placeholder="Enter due date">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
44
resources/views/pbg_task/create.blade.php
Normal file
44
resources/views/pbg_task/create.blade.php
Normal file
@@ -0,0 +1,44 @@
|
||||
@extends('layouts.vertical', ['subtitle' => 'PBG'])
|
||||
|
||||
@section('content')
|
||||
|
||||
@include('layouts.partials/page-title', ['title' => 'Create', 'subtitle' => 'PBG'])
|
||||
|
||||
<div class="row">
|
||||
<!-- Navigasi Step -->
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<button class="btn btn-outline-secondary" id="prevStep" disabled>
|
||||
← Back
|
||||
</button>
|
||||
<h4 id="stepTitle">Step 1</h4>
|
||||
<button class="btn btn-primary" id="nextStep">
|
||||
Next →
|
||||
</button>
|
||||
</div>
|
||||
<div class="row d-flex justify-content-center">
|
||||
<div class="col-md-8 col-lg-8 col-sm-8" id="step1">
|
||||
@include("pbg_task._form_pbg_task")
|
||||
</div>
|
||||
</div>
|
||||
<div class="row d-flex justify-content-center">
|
||||
<div id="step2" class="step-content d-none col-md-8 col-lg-8 col-sm-8">
|
||||
@include("pbg_task._form_pbg_task_retribution")
|
||||
</div>
|
||||
</div>
|
||||
<div class="row d-flex justify-content-center">
|
||||
<div id="step3" class="step-content d-none col-md-8 col-lg-8 col-sm-8">
|
||||
@include("pbg_task._form_pbg_task_index_integration")
|
||||
</div>
|
||||
</div>
|
||||
<div class="row d-flex justify-content-center">
|
||||
<div id="step4" class="step-content d-none col-md-8 col-lg-8 col-sm-8">
|
||||
@include("pbg_task._form_pbg_task_prasarana")
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
@vite(['resources/js/pbg-task/create.js'])
|
||||
@endsection
|
||||
3
resources/views/pbg_task/edit.blade.php
Normal file
3
resources/views/pbg_task/edit.blade.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- Because you are alive, everything is possible. - Thich Nhat Hanh -->
|
||||
</div>
|
||||
24
resources/views/pbg_task/index.blade.php
Normal file
24
resources/views/pbg_task/index.blade.php
Normal file
@@ -0,0 +1,24 @@
|
||||
@extends('layouts.vertical', ['subtitle' => 'Data'])
|
||||
|
||||
@section('css')
|
||||
@vite(['node_modules/gridjs/dist/theme/mermaid.min.css'])
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
|
||||
@include('layouts.partials/page-title', ['title' => 'Data', 'subtitle' => 'PBG'])
|
||||
|
||||
<div class="row">
|
||||
<div class="d-flex justify-content-end pb-3">
|
||||
<a href="{{ route('pbg-task.create')}}" class="btn btn-success width-lg">Create</a>
|
||||
</div>
|
||||
<div>
|
||||
<div id="table-pbg-tasks"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
@vite(['resources/js/pbg-task/index.js'])
|
||||
@endsection
|
||||
@@ -9,6 +9,9 @@
|
||||
@include('layouts.partials/page-title', ['title' => 'Data', 'subtitle' => 'PBG'])
|
||||
|
||||
<div class="row">
|
||||
<div class="d-flex justify-content-end pb-3">
|
||||
<a href="{{ route('data-settings.create')}}" class="btn btn-success width-lg">Create</a>
|
||||
</div>
|
||||
<div>
|
||||
<div id="table-request-assignment"></div>
|
||||
</div>
|
||||
|
||||
@@ -4,6 +4,7 @@ use App\Http\Controllers\Api\DashboardController;
|
||||
use App\Http\Controllers\Api\DataSettingController;
|
||||
use App\Http\Controllers\Api\GlobalSettingsController;
|
||||
use App\Http\Controllers\Api\ImportDatasourceController;
|
||||
use App\Http\Controllers\Api\PbgTaskController;
|
||||
use App\Http\Controllers\Api\RequestAssignmentController;
|
||||
use App\Http\Controllers\Api\ScrapingController;
|
||||
use App\Http\Controllers\Api\UsersController;
|
||||
@@ -43,6 +44,8 @@ Route::group(['middleware' => 'auth:sanctum'], function (){
|
||||
|
||||
// data-settings
|
||||
Route::apiResource('/api-data-settings', DataSettingController::class);
|
||||
|
||||
Route::apiResource('/api-pbg-task', PbgTaskController::class);
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -34,12 +34,8 @@ Route::group(['middleware' => 'auth'], function(){
|
||||
Route::get('/all-users', [UsersController::class, 'allUsers'])->name('users.all');
|
||||
});
|
||||
|
||||
// request assignments
|
||||
Route::group(['prefix' => '/request-assignments'], function(){
|
||||
Route::controller(PbgTaskController::class)->group(function(){
|
||||
Route::get('/index', 'index')->name('request-assignments.index');
|
||||
});
|
||||
});
|
||||
// data - PBG
|
||||
Route::resource('/pbg-task', PbgTaskController::class);
|
||||
|
||||
// data settings
|
||||
Route::resource('/data-settings', DataSettingController::class);
|
||||
|
||||
Reference in New Issue
Block a user