Merge remote-tracking branch 'origin/tender' into staging
# Conflicts: # module.json # routes/breadcrumbs.php # routes/web.php
This commit is contained in:
47
app/Exports/IjinUsahaExport.php
Normal file
47
app/Exports/IjinUsahaExport.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Exports;
|
||||
|
||||
use Maatwebsite\Excel\Concerns\FromCollection;
|
||||
use Maatwebsite\Excel\Concerns\WithColumnFormatting;
|
||||
use Maatwebsite\Excel\Concerns\WithHeadings;
|
||||
use Maatwebsite\Excel\Concerns\WithMapping;
|
||||
use Modules\Lpj\Models\IjinUsaha;
|
||||
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
|
||||
|
||||
class IjinUsahaExport implements WithColumnFormatting, WithHeadings, FromCollection, withMapping
|
||||
{
|
||||
public function collection()
|
||||
{
|
||||
return IjinUsaha::all();
|
||||
}
|
||||
|
||||
public function map($row): array
|
||||
{
|
||||
return [
|
||||
$row->id,
|
||||
$row->code,
|
||||
$row->name,
|
||||
$row->created_at
|
||||
];
|
||||
}
|
||||
|
||||
public function headings(): array
|
||||
{
|
||||
return [
|
||||
'ID',
|
||||
'Code',
|
||||
'Name',
|
||||
'Created At'
|
||||
];
|
||||
}
|
||||
|
||||
public function columnFormats(): array
|
||||
{
|
||||
return [
|
||||
'A' => NumberFormat::FORMAT_NUMBER,
|
||||
'B' => NumberFormat::FORMAT_NUMBER,
|
||||
'E' => NumberFormat::FORMAT_DATE_DATETIME
|
||||
];
|
||||
}
|
||||
}
|
||||
49
app/Exports/KJPPExport.php
Normal file
49
app/Exports/KJPPExport.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Exports;
|
||||
|
||||
use Maatwebsite\Excel\Concerns\FromCollection;
|
||||
use Maatwebsite\Excel\Concerns\WithColumnFormatting;
|
||||
use Maatwebsite\Excel\Concerns\WithHeadings;
|
||||
use Maatwebsite\Excel\Concerns\WithMapping;
|
||||
use Modules\Lpj\Models\IjinUsaha;
|
||||
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
|
||||
|
||||
class KJPPExport implements WithColumnFormatting, WithHeadings, FromCollection, withMapping
|
||||
{
|
||||
public function collection()
|
||||
{
|
||||
return IjinUsaha::all();
|
||||
}
|
||||
|
||||
public function map($row): array
|
||||
{
|
||||
return [
|
||||
$row->id,
|
||||
$row->code,
|
||||
$row->name,
|
||||
$row->jenis_kantor,
|
||||
$row->created_at
|
||||
];
|
||||
}
|
||||
|
||||
public function headings(): array
|
||||
{
|
||||
return [
|
||||
'ID',
|
||||
'Code',
|
||||
'Name',
|
||||
'Jenis Kantor / Cabang',
|
||||
'Created At'
|
||||
];
|
||||
}
|
||||
|
||||
public function columnFormats(): array
|
||||
{
|
||||
return [
|
||||
'A' => NumberFormat::FORMAT_NUMBER,
|
||||
'B' => NumberFormat::FORMAT_NUMBER,
|
||||
'E' => NumberFormat::FORMAT_DATE_DATETIME
|
||||
];
|
||||
}
|
||||
}
|
||||
174
app/Http/Controllers/IjinUsahaController.php
Normal file
174
app/Http/Controllers/IjinUsahaController.php
Normal file
@@ -0,0 +1,174 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Exception;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
use Modules\Lpj\Exports\IjinUsahaExport;
|
||||
use Modules\Lpj\Http\Requests\IjinUsahaRequest;
|
||||
use Modules\Lpj\Models\IjinUsaha;
|
||||
|
||||
class IjinUsahaController extends Controller
|
||||
{
|
||||
public $user;
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return view('lpj::Ijin_usaha.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
return view('lpj::Ijin_usaha.create');
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(IjinUsahaRequest $request)
|
||||
{
|
||||
$validate = $request->validated();
|
||||
|
||||
if ($validate) {
|
||||
try {
|
||||
IjinUsaha::create($validate);
|
||||
return redirect()
|
||||
->route('basicdata.ijin_usaha.index')
|
||||
->with('success', 'Ijin Usaha created successfully');
|
||||
} catch (Exception $e) {
|
||||
return redirect()
|
||||
->route('basicdata.ijin_usaha.create')
|
||||
->with('error', 'Failed to create ijin Usaha');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
// return view('lpj::show');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
$ijin_usaha = IjinUsaha::find($id);
|
||||
return view('lpj::Ijin_usaha.create', compact('ijin_usaha'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(IjinUsahaRequest $request, $id)
|
||||
{
|
||||
$validate = $request->validated();
|
||||
|
||||
if ($validate) {
|
||||
try {
|
||||
// Update in database
|
||||
$ijin_usaha = IjinUsaha::find($id);
|
||||
$ijin_usaha->update($validate);
|
||||
return redirect()
|
||||
->route('basicdata.ijin_usaha.index')
|
||||
->with('success', 'Ijin Usaha updated successfully');
|
||||
} catch (Exception $e) {
|
||||
return redirect()
|
||||
->route('basicdata.ijin_usaha.edit', $id)
|
||||
->with('error', 'Failed to update ijin$ijin_usaha');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
try {
|
||||
$ijin_usaha = IjinUsaha::find($id);
|
||||
$ijin_usaha->delete();
|
||||
|
||||
echo json_encode(['success' => true, 'message' => 'Ijin Usaha deleted successfully']);
|
||||
} catch (Exception $e) {
|
||||
echo json_encode(['success' => false, 'message' => 'Failed to delete Ijin Usaha']);
|
||||
}
|
||||
}
|
||||
|
||||
public function dataForDatatables(Request $request)
|
||||
{
|
||||
if (is_null($this->user) || !$this->user->can('Ijin_usaha.view')) {
|
||||
//abort(403, 'Sorry! You are not allowed to view users.');
|
||||
}
|
||||
|
||||
// Retrieve data from the database
|
||||
$query = IjinUsaha::query();
|
||||
|
||||
// Apply search filter if provided
|
||||
if ($request->has('search') && !empty($request->get('search'))) {
|
||||
$search = $request->get('search');
|
||||
$query->where(function ($q) use ($search) {
|
||||
$q->where('code', 'LIKE', "%$search%");
|
||||
$q->orWhere('name', 'LIKE', "%$search%");
|
||||
});
|
||||
}
|
||||
|
||||
// Apply sorting if provided
|
||||
if ($request->has('sortOrder') && !empty($request->get('sortOrder'))) {
|
||||
$order = $request->get('sortOrder');
|
||||
$column = $request->get('sortField');
|
||||
$query->orderBy($column, $order);
|
||||
}
|
||||
|
||||
// Get the total count of records
|
||||
$totalRecords = $query->count();
|
||||
|
||||
// Apply pagination if provided
|
||||
if ($request->has('page') && $request->has('size')) {
|
||||
$page = $request->get('page');
|
||||
$size = $request->get('size');
|
||||
$offset = ($page - 1) * $size; // Calculate the offset
|
||||
|
||||
$query->skip($offset)->take($size);
|
||||
}
|
||||
|
||||
// Get the filtered count of records
|
||||
$filteredRecords = $query->count();
|
||||
|
||||
// Get the data for the current page
|
||||
$data = $query->get();
|
||||
|
||||
// Calculate the page count
|
||||
$pageCount = ceil($totalRecords / $request->get('size'));
|
||||
|
||||
// Calculate the current page number
|
||||
$currentPage = 0 + 1;
|
||||
|
||||
// Return the response data as a JSON object
|
||||
return response()->json([
|
||||
'draw' => $request->get('draw'),
|
||||
'recordsTotal' => $totalRecords,
|
||||
'recordsFiltered' => $filteredRecords,
|
||||
'pageCount' => $pageCount,
|
||||
'page' => $currentPage,
|
||||
'totalCount' => $totalRecords,
|
||||
'data' => $data,
|
||||
]);
|
||||
}
|
||||
|
||||
public function export()
|
||||
{
|
||||
return Excel::download(new IjinUsahaExport, 'ijin_usaha.xlsx');
|
||||
}
|
||||
}
|
||||
166
app/Http/Controllers/KJPPController.php
Normal file
166
app/Http/Controllers/KJPPController.php
Normal file
@@ -0,0 +1,166 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Modules\Lpj\Models\KJPP;
|
||||
use Illuminate\Http\Response;
|
||||
use Modules\Lpj\Models\Branch;
|
||||
use Modules\Lpj\Models\IjinUsaha;
|
||||
use Modules\Lpj\Exports\KJPPExport;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
use Modules\Lpj\Models\JenisJaminan;
|
||||
use Modules\Location\Models\Province;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Modules\Lpj\Http\Requests\KJPPRequest;
|
||||
|
||||
class KJPPController extends Controller
|
||||
{
|
||||
public $user;
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return view('lpj::kjpp.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$branch = Branch::all();
|
||||
$ijin_usaha = IjinUsaha::all();
|
||||
$jenis_aset = JenisJaminan::all();
|
||||
$provinces = Province::all();
|
||||
|
||||
return view('lpj::kjpp.create', compact('branch', 'ijin_usaha', 'jenis_aset', 'provinces'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(KJPPRequest $request)
|
||||
{
|
||||
$validate = $request->validated();
|
||||
|
||||
|
||||
if ($validate) {
|
||||
$file = $request->file('attachment');
|
||||
$filename = $file ? time() . '.' . $file->getClientOriginalExtension() : 'default.pdf';
|
||||
|
||||
if ($file) {
|
||||
$file->storeAs('uploads_pdf', $filename, 'public');
|
||||
} else {
|
||||
Storage::copy('/home/bagi/Downloads/default.pdf', 'public/uploads_pdf/' . $filename);
|
||||
}
|
||||
|
||||
dd($validate);
|
||||
KJPP::create($validate);
|
||||
return redirect()
|
||||
->route('basicdata.kjpp.index')
|
||||
->with('success', 'Ijin Usaha created successfully');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
return view('lpj::show');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
return view('lpj::edit');
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(KJPP $request, $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
public function dataForDatatables(Request $request)
|
||||
{
|
||||
if (is_null($this->user) || !$this->user->can('kjpp.view')) {
|
||||
//abort(403, 'Sorry! You are not allowed to view users.');
|
||||
}
|
||||
|
||||
// Retrieve data from the database
|
||||
$query = KJPP::query();
|
||||
|
||||
// Apply search filter if provided
|
||||
if ($request->has('search') && !empty($request->get('search'))) {
|
||||
$search = $request->get('search');
|
||||
$query->where(function ($q) use ($search) {
|
||||
$q->where('code', 'LIKE', "%$search%");
|
||||
$q->orWhere('name', 'LIKE', "%$search%");
|
||||
$q->orWhere('jenis_kantor', 'LIKE', "%$search%");
|
||||
});
|
||||
}
|
||||
|
||||
// Apply sorting if provided
|
||||
if ($request->has('sortOrder') && !empty($request->get('sortOrder'))) {
|
||||
$order = $request->get('sortOrder');
|
||||
$column = $request->get('sortField');
|
||||
$query->orderBy($column, $order);
|
||||
}
|
||||
|
||||
// Get the total count of records
|
||||
$totalRecords = $query->count();
|
||||
|
||||
// Apply pagination if provided
|
||||
if ($request->has('page') && $request->has('size')) {
|
||||
$page = $request->get('page');
|
||||
$size = $request->get('size');
|
||||
$offset = ($page - 1) * $size; // Calculate the offset
|
||||
|
||||
$query->skip($offset)->take($size);
|
||||
}
|
||||
|
||||
// Get the filtered count of records
|
||||
$filteredRecords = $query->count();
|
||||
|
||||
// Get the data for the current page
|
||||
$data = $query->get();
|
||||
|
||||
// Calculate the page count
|
||||
$pageCount = ceil($totalRecords / $request->get('size'));
|
||||
|
||||
// Calculate the current page number
|
||||
$currentPage = 0 + 1;
|
||||
|
||||
// Return the response data as a JSON object
|
||||
return response()->json([
|
||||
'draw' => $request->get('draw'),
|
||||
'recordsTotal' => $totalRecords,
|
||||
'recordsFiltered' => $filteredRecords,
|
||||
'pageCount' => $pageCount,
|
||||
'page' => $currentPage,
|
||||
'totalCount' => $totalRecords,
|
||||
'data' => $data,
|
||||
]);
|
||||
}
|
||||
|
||||
public function export()
|
||||
{
|
||||
return Excel::download(new KJPPExport, 'currency.xlsx');
|
||||
}
|
||||
}
|
||||
94
app/Http/Controllers/TenderController.php
Normal file
94
app/Http/Controllers/TenderController.php
Normal file
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Modules\Lpj\Models\Penawaran;
|
||||
|
||||
class TenderController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function penawaran_index()
|
||||
{
|
||||
return view('lpj::penawaran/index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function penawaran_create()
|
||||
{
|
||||
return view('lpj::penawaran/create');
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function penawaran_store(Request $request): RedirectResponse
|
||||
{
|
||||
// $validated = $request->validate([
|
||||
// 'nama_kjpp_sebelumnya' => 'required|string',
|
||||
// 'biaya_kjpp_sebelumnya' => 'required|numeric',
|
||||
// 'tgl_penilaian_sebelumnya' => 'required|date',
|
||||
// 'nama_kjpp_1' => 'required|exists:kjpps,id',
|
||||
// 'nama_kjpp_2' => 'required|exists:kjpps,id',
|
||||
// 'nama_kjpp_3' => 'required|exists:kjpps,id',
|
||||
// 'data_jaminan_legalitas' => 'required|string',
|
||||
// 'tujuan_penilaian' => 'required|in:Penjaminan Hutang,Lelang,Revaluasi Aset',
|
||||
// 'jenis_laporan' => 'required|in:Short report,Full report',
|
||||
// 'batas_waktu' => 'required|date',
|
||||
// 'catatan' => 'nullable|string'
|
||||
// ]);
|
||||
|
||||
// Penawaran::create($validated);
|
||||
|
||||
// return redirect()->back()->with('success', 'Data berhasil disimpan!');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
*/
|
||||
public function penawaran_show($id)
|
||||
{
|
||||
return view('lpj::show');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
return view('lpj::edit');
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, $id): RedirectResponse
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
public function proses_penawaran_index()
|
||||
{
|
||||
return view('lpj::proses_penawaran/index');
|
||||
}
|
||||
|
||||
public function penawaran_ulang_index()
|
||||
{
|
||||
return view('lpj::penawaran_ulang/index');
|
||||
}
|
||||
}
|
||||
46
app/Http/Requests/IjinUsahaRequest.php
Normal file
46
app/Http/Requests/IjinUsahaRequest.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class IjinUsahaRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
$rules = [
|
||||
'name' => 'required|string|not_regex:/^\d+$/|max:255'
|
||||
];
|
||||
|
||||
if ($this->method() == 'PUT') {
|
||||
$rules['code'] = 'required|max:50|unique:ijin_usaha,code,' . $this->id;
|
||||
} else {
|
||||
$rules['code'] = 'required|max:50|unique:ijin_usaha,code';
|
||||
}
|
||||
|
||||
return $rules;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'code.required' => 'Kode Ijin Usaha harus diisi!',
|
||||
'code.max' => 'Kode Ijin Usaha maksimal 255 huruf!',
|
||||
'code.unique' => 'Kode Ijin Usaha tidak boleh sama!',
|
||||
'name.required' => 'Nama Ijin Usaha harus diisi!',
|
||||
'name.not_regex' => 'Nama Ijin Usaha harus berupa huruf!',
|
||||
'name.max' => 'Nama Ijin Usaha maksimal 255 huruf!'
|
||||
];
|
||||
}
|
||||
}
|
||||
122
app/Http/Requests/KJPPRequest.php
Normal file
122
app/Http/Requests/KJPPRequest.php
Normal file
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use daengdeni\LaravelIdGenerator\IdGenerator;
|
||||
|
||||
class KJPPRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
$rules = [
|
||||
'name' => 'required|string|not_regex:/^\d+$/|max:255',
|
||||
'jenis_kantor' => 'required',
|
||||
'nomor_ijin_usaha' => 'required',
|
||||
'province_code' => 'required',
|
||||
'city_code' => 'required',
|
||||
'district_code' => 'required',
|
||||
'village_code' => 'required',
|
||||
'address' => 'required',
|
||||
'postal_code' => 'required|numeric',
|
||||
'nomor_telepon_kantor' => 'required|numeric|digits_between:8,15',
|
||||
'email_kantor' => 'required|email',
|
||||
'nama_pimpinan' => 'required|string|not_regex:/^\d+$/|max:255',
|
||||
'nomor_hp_pimpinan' => 'required|numeric|digits_between:10,15',
|
||||
'nama_pic_reviewer' => 'required|string|not_regex:/^\d+$/|max:255',
|
||||
'nomor_hp_pic_reviewer' => 'required|numeric|digits_between:10,15',
|
||||
'nama_pic_admin' => 'required|string|not_regex:/^\d+$/|max:255',
|
||||
'nomor_hp_pic_admin' => 'required|numeric|digits_between:10,15',
|
||||
'nama_pic_marketing' => 'required|string|not_regex:/^\d+$/|max:255',
|
||||
'nomor_hp_pic_marketing' => 'required|numeric|digits_between:10,15',
|
||||
'ijin_usaha.*' => 'nullable',
|
||||
'jenis_jaminan.*' => 'nullable',
|
||||
'attachment' => 'nullable|mimes:pdf|max:1024'
|
||||
];
|
||||
|
||||
if ($this->method() == 'PUT') {
|
||||
$rules['code'] = 'required|max:50|unique:kjpp,code,' . $this->id;
|
||||
} else {
|
||||
$rules['code'] = 'required|max:50|unique:kjpp,code';
|
||||
}
|
||||
|
||||
return $rules;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function prepareForValidation(): void
|
||||
{
|
||||
if ($this->method() == 'POST') {
|
||||
$this->merge([
|
||||
'code' => IdGenerator::generate(
|
||||
['table' => 'ijin_usaha', 'length' => 5, 'prefix' => 'IU', 'field' => 'code'],
|
||||
['table' => 'jenis_jaminan', 'length' => 5, 'prefix' => 'JJ', 'field' => 'code'],
|
||||
)
|
||||
]);
|
||||
}
|
||||
|
||||
$this->merge([
|
||||
'ijin_usaha_id' => json_encode($this->ijin_usaha_id),
|
||||
'jenis_aset_id' => json_encode($this->jenis_aset_id)
|
||||
]);
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'code.required' => 'Kode KJPP Wajib diisi!',
|
||||
'code.max' => 'Kode KJPP maksimal 255 huruf!',
|
||||
'code.unique' => 'Kode KJPP tidak boleh sama!',
|
||||
'name.required' => 'Nama KJPP Wajib diisi!',
|
||||
'name.not_regex' => 'Nama KJPP harus berupa huruf!',
|
||||
'name.max' => 'Nama KJPP maksimal 255 huruf!',
|
||||
'jenis_kantor.required' => 'Jenis Kantor Wajib diisi!',
|
||||
'nomor_ijin_usaha.required' => 'Nomor Ijin Usaha Wajib diisi!',
|
||||
'nomor_ijin_usaha.max' => 'Nomor Ijin Usaha maksimal 255 huruf!',
|
||||
'province_code.required' => 'Provinsi Wajib diisi!',
|
||||
'city_code.required' => 'Kota / Kabupaten Wajib diisi!',
|
||||
'district_code.required' => 'Kecamatan Wajib diisi!',
|
||||
'village_code.required' => 'Kelurahan Wajib diisi!',
|
||||
'postal_code.required' => 'Kode Pos Wajib diisi!',
|
||||
'postal_code.numeric' => 'Kode Pos harus berupa angka!',
|
||||
'address.required' => 'Alamat Kantor Wajib diisi!',
|
||||
'nomor_telepon_kantor.required' => 'Nomor Telepon Kantor Wajib diisi!',
|
||||
'nomor_telepon_kantor.numeric' => 'Nomor Telepon Kantor harus berupa angka!',
|
||||
'nomor_telepon_kantor.digits_between' => 'Nomor Telepon Kantor minimum 8 digit dan maksimum 15 digit!',
|
||||
'email_kantor.required' => 'Email Kantor Wajib diisi!',
|
||||
'email_kantor.email' => 'Email Kantor tidak valid!',
|
||||
'nama_pimpinan.required' => 'Nama Pimpinan Wajib diisi!',
|
||||
'nama_pimpinan.not_regex' => 'Nama Pimpinan harus berupa huruf!',
|
||||
'nomor_hp_pimpinan.required' => 'Nomor HP Pimpinan Wajib diisi!',
|
||||
'nomor_hp_pimpinan.numeric' => 'Nomor HP Pimpinan harus berupa angka!',
|
||||
'nomor_hp_pimpinan.digits_between' => 'Nomor HP Pimpinan minimum 10 digit dan maksimum 15 digit!',
|
||||
'nama_pic_reviewer.required' => 'Nama PIC Reviewer Wajib diisi!',
|
||||
'nama_pic_reviewer.not_regex' => 'Nama PIC Reviewer harus berupa huruf!',
|
||||
'nomor_hp_pic_reviewer.required' => 'Nomor HP PIC Reviewer Wajib diisi!',
|
||||
'nomor_hp_pic_reviewer.numeric' => 'Nomor HP PIC Reviewer harus berupa angka!',
|
||||
'nomor_hp_pic_reviewer.digits_between' => 'Nomor HP PIC Reviewer minimum 10 digit dan maksimum 15 digit!',
|
||||
'nama_pic_admin.required' => 'Nama PIC Admin Wajib diisi!',
|
||||
'nama_pic_admin.not_regex' => 'Nama PIC Admin harus berupa huruf!',
|
||||
'nomor_hp_pic_admin.required' => 'Nomor HP PIC Admin Wajib diisi!',
|
||||
'nomor_hp_pic_admin.numeric' => 'Nomor HP PIC Admin harus berupa angka!',
|
||||
'nomor_hp_pic_admin.digits_between' => 'Nomor HP PIC Admin minimum 10 digit dan maksimum 15 digit!',
|
||||
'nama_pic_marketing.required' => 'Nama PIC Marketing Wajib diisi!',
|
||||
'nama_pic_marketing.not_regex' => 'Nama PIC Marketing harus berupa huruf!',
|
||||
'nomor_hp_pic_marketing.required' => 'Nomor HP PIC Marketing Wajib diisi!',
|
||||
'nomor_hp_pic_marketing.numeric' => 'Nomor HP PIC Marketing harus berupa angka!',
|
||||
'nomor_hp_pic_marketing.digits_between' => 'Nomor HP PIC Marketing minimum 10 digit dan maksimum 15 digit!',
|
||||
'attachment.mimes' => 'Attachment harus berformat pdf!',
|
||||
'attachment.max' => 'Attachment berukuran maksimum 1 MB!',
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Models;
|
||||
namespace Modules\Lpj\Models;
|
||||
|
||||
use Modules\Lpj\Database\Factories\BranchFactory;
|
||||
use Modules\Lpj\Database\Factories\BranchFactory;
|
||||
|
||||
class Branch extends Base
|
||||
class Branch extends Base
|
||||
{
|
||||
protected $table = 'branches';
|
||||
protected $fillable = ['code', 'name', 'status', 'authorized_at', 'authorized_status', 'authorized_by'];
|
||||
|
||||
public function debitures()
|
||||
{
|
||||
protected $table = 'branches';
|
||||
protected $fillable = ['code', 'name', 'status', 'authorized_at', 'authorized_status', 'authorized_by'];
|
||||
|
||||
public function debitures()
|
||||
{
|
||||
return $this->hasMany(Debiture::class, 'branch_id', 'id');
|
||||
}
|
||||
return $this->hasMany(Debiture::class, 'branch_id', 'id');
|
||||
}
|
||||
|
||||
public function kjpp()
|
||||
{
|
||||
return $this->belongsTo(KJPP::class);
|
||||
}
|
||||
}
|
||||
|
||||
24
app/Models/IjinUsaha.php
Normal file
24
app/Models/IjinUsaha.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
class IjinUsaha extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'ijin_usaha';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = ['code', 'name'];
|
||||
|
||||
// relasi ke kjpp
|
||||
public function kjpp()
|
||||
{
|
||||
return $this->belongsTo(KJPP::class);
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Models;
|
||||
namespace Modules\Lpj\Models;
|
||||
|
||||
use Modules\Lpj\Database\Factories\JenisAsetFactory;
|
||||
use Modules\Lpj\Database\Factories\JenisAsetFactory;
|
||||
|
||||
class JenisAset extends Base
|
||||
{
|
||||
protected $table = 'jenis_aset';
|
||||
protected $fillable = ['code', 'name'];
|
||||
}
|
||||
class JenisAset extends Base
|
||||
{
|
||||
protected $table = 'jenis_aset';
|
||||
protected $fillable = ['code', 'name'];
|
||||
}
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Models;
|
||||
namespace Modules\Lpj\Models;
|
||||
|
||||
class JenisJaminan extends Base
|
||||
class JenisJaminan extends Base
|
||||
{
|
||||
protected $table = 'jenis_jaminan';
|
||||
protected $fillable = ['code', 'name', 'slug', 'jenis_legalitas_jaminan_id'];
|
||||
|
||||
// relasi ke kjpp
|
||||
public function kjpp()
|
||||
{
|
||||
protected $table = 'jenis_jaminan';
|
||||
protected $fillable = ['code', 'name','slug','jenis_legalitas_jaminan_id'];
|
||||
return $this->belongsTo(KJPP::class);
|
||||
}
|
||||
}
|
||||
|
||||
62
app/Models/KJPP.php
Normal file
62
app/Models/KJPP.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
// use Modules\Lpj\Database\Factories\KJPPFactory;
|
||||
|
||||
class KJPP extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
// Define the table if not using default table naming
|
||||
protected $table = 'kjpp';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = [
|
||||
'code',
|
||||
'name',
|
||||
'jenis_kantor',
|
||||
'nomor_ijin_usaha',
|
||||
'province_code',
|
||||
'city_code',
|
||||
'district_code',
|
||||
'village_code',
|
||||
'address',
|
||||
'postal_code',
|
||||
'nomor_telepon_kantor',
|
||||
'email_kantor',
|
||||
'nama_pimpinan',
|
||||
'nomor_hp_pimpinan',
|
||||
'nama_pic_reviewer',
|
||||
'nomor_hp_pic_reviewer',
|
||||
'nama_pic_admin',
|
||||
'nomor_hp_pic_admin',
|
||||
'nama_pic_marketing',
|
||||
'nomor_hp_pic_marketing',
|
||||
'ijin_usaha_id',
|
||||
'jenis_aset_id',
|
||||
'attachment'
|
||||
];
|
||||
|
||||
// relasi ke branch
|
||||
public function branch()
|
||||
{
|
||||
return $this->hasOne(Branch::class, 'jenis_kantor');
|
||||
}
|
||||
|
||||
// relasi ke jenis aset
|
||||
public function jenis_aset()
|
||||
{
|
||||
return $this->hasMany(JenisJaminan::class, 'jenis_aset_id');
|
||||
}
|
||||
|
||||
// relasi ke ijin usaha
|
||||
public function ijin_usaha()
|
||||
{
|
||||
return $this->hasMany(IjinUsaha::class, 'ijin_usaha_id');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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('ijin_usaha', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('code')->unique()->index();
|
||||
$table->string('name');
|
||||
$table->boolean('status')->default(true)->nullable();
|
||||
$table->char('authorized_status', 1)->nullable();
|
||||
$table->timestamp('authorized_at')->nullable();
|
||||
$table->unsignedBigInteger('authorized_by')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->unsignedBigInteger('deleted_by')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('ijin_usaha');
|
||||
}
|
||||
};
|
||||
57
database/migrations/2024_09_18_084905_create_kjpp_table.php
Normal file
57
database/migrations/2024_09_18_084905_create_kjpp_table.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?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('kjpp', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('code');
|
||||
$table->string('name');
|
||||
$table->string('jenis_kantor');
|
||||
$table->string('nomor_ijin_usaha');
|
||||
$table->string('province_code');
|
||||
$table->string('city_code');
|
||||
$table->string('district_code');
|
||||
$table->string('village_code');
|
||||
$table->string('address');
|
||||
$table->string('postal_code');
|
||||
$table->string('nomor_telepon_kantor');
|
||||
$table->string('email_kantor');
|
||||
$table->string('nama_pimpinan');
|
||||
$table->string('nomor_hp_pimpinan');
|
||||
$table->string('nama_pic_reviewer');
|
||||
$table->string('nomor_hp_pic_reviewer');
|
||||
$table->string('nama_pic_admin');
|
||||
$table->string('nomor_hp_pic_admin');
|
||||
$table->string('nama_pic_marketing');
|
||||
$table->string('nomor_hp_pic_marketing');
|
||||
$table->string('ijin_usaha_id')->nullable();
|
||||
$table->string('jenis_aset_id')->nullable();
|
||||
$table->string('attachment')->nullable();
|
||||
$table->boolean('status')->default(true)->nullable();
|
||||
$table->char('authorized_status', 1)->nullable();
|
||||
$table->timestamp('authorized_at')->nullable();
|
||||
$table->unsignedBigInteger('authorized_by')->nullable();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->unsignedBigInteger('deleted_by')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('kjpp');
|
||||
}
|
||||
};
|
||||
87
module.json
87
module.json
@@ -19,8 +19,44 @@
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"Administrator"
|
||||
|
||||
"administrator"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Tender",
|
||||
"path": "tender",
|
||||
"icon": "ki-filled ki-category text-lg",
|
||||
"classes": "",
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator"
|
||||
],
|
||||
"sub": [
|
||||
{
|
||||
"title": "Data Penawaran",
|
||||
"path": "tender.penawaran",
|
||||
"classes": "",
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": []
|
||||
},
|
||||
{
|
||||
"title": "Data Proses Penawaran",
|
||||
"path": "tender.proses_penawaran",
|
||||
"classes": "",
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": []
|
||||
},
|
||||
{
|
||||
"title": "Data Penawaran Ulang",
|
||||
"path": "tender.penawaran_ulang",
|
||||
"classes": "",
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -31,7 +67,7 @@
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"Administrator"
|
||||
"administrator"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -42,7 +78,7 @@
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"Administrator"
|
||||
"administrator"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -53,29 +89,7 @@
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"Administrator"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Assignment",
|
||||
"path": "penilaian",
|
||||
"icon": "ki-filled ki-badge",
|
||||
"classes": "",
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"Administrator"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Activity",
|
||||
"path": "activity",
|
||||
"icon": "ki-filled ki-some-files text-lg",
|
||||
"classes": "",
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"Administrator"
|
||||
"administrator"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -86,7 +100,7 @@
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"Administrator"
|
||||
"administrator"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -221,8 +235,23 @@
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": []
|
||||
},
|
||||
{
|
||||
"title": "KJPP",
|
||||
"path": "basicdata.kjpp",
|
||||
"classes": "",
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": []
|
||||
},
|
||||
{
|
||||
"title": "Ijin Usaha",
|
||||
"path": "basicdata.ijin_usaha",
|
||||
"classes": "",
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": []
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
77
resources/views/Ijin_usaha/create.blade.php
Normal file
77
resources/views/Ijin_usaha/create.blade.php
Normal file
@@ -0,0 +1,77 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumbs')
|
||||
{{ Breadcrumbs::render(request()->route()->getName()) }}
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||
@if (isset($ijin_usaha->id))
|
||||
<form action="{{ route('basicdata.ijin_usaha.update', $ijin_usaha->id) }}" method="POST">
|
||||
<input type="hidden" name="id" value="{{ $ijin_usaha->id }}">
|
||||
@method('PUT')
|
||||
@else
|
||||
<form method="POST" action="{{ route('basicdata.ijin_usaha.store') }}">
|
||||
@endif
|
||||
@csrf
|
||||
<div class="card pb-2.5">
|
||||
<div class="card-header" id="basic_settings">
|
||||
<h3 class="card-title">
|
||||
{{ isset($ijin_usaha->id) ? 'Edit' : 'Tambah' }} Ijin Usaha
|
||||
</h3>
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="{{ route('basicdata.ijin_usaha.index') }}" class="btn btn-xs btn-info"><i
|
||||
class="ki-filled ki-exit-left"></i> Back</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body grid gap-5">
|
||||
@if (isset($ijin_usaha->id))
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Kode Ijin Usaha
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input readonly
|
||||
class="input border-warning bg-warning-light @error('code') border-danger bg-danger-light @enderror"
|
||||
type="text" name="code" value="{{ $ijin_usaha->code ?? old('code') }}">
|
||||
@error('code')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Kode Ijin Usaha
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('code') border-danger bg-danger-light @enderror" type="text"
|
||||
name="code" value="{{ $ijin_usaha->code ?? old('code') }}">
|
||||
@error('code')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Nama Ijin Usaha
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('name') border-danger bg-danger-light @enderror" type="text"
|
||||
name="name" value="{{ $ijin_usaha->name ?? old('name') }}">
|
||||
@error('name')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-end">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@endsection
|
||||
152
resources/views/Ijin_usaha/index.blade.php
Normal file
152
resources/views/Ijin_usaha/index.blade.php
Normal file
@@ -0,0 +1,152 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumbs')
|
||||
{{ Breadcrumbs::render('basicdata.ijin_usaha') }}
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="grid">
|
||||
<div class="card card-grid min-w-full" data-datatable="false" data-datatable-page-size="5"
|
||||
data-datatable-state-save="false" id="ijin-table" data-api-url="{{ route('basicdata.ijin_usaha.datatables') }}">
|
||||
<div class="card-header py-5 flex-wrap">
|
||||
<h3 class="card-title">
|
||||
Ijin Usaha
|
||||
</h3>
|
||||
<div class="flex flex-wrap gap-2 lg:gap-5">
|
||||
<div class="flex">
|
||||
<label class="input input-sm"> <i class="ki-filled ki-magnifier"> </i>
|
||||
<input placeholder="Search Ijin Usaha" id="search" type="text" value="">
|
||||
</label>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2.5">
|
||||
<div class="h-[24px] border border-r-gray-200"></div>
|
||||
<a class="btn btn-sm btn-light" href="{{ route('basicdata.ijin_usaha.export') }}"> Export to Excel
|
||||
</a>
|
||||
<a class="btn btn-sm btn-primary" href="{{ route('basicdata.ijin_usaha.create') }}"> Tambah Ijin
|
||||
Usaha
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="scrollable-x-auto">
|
||||
<table class="table table-auto table-border align-middle text-gray-700 font-medium text-sm"
|
||||
data-datatable-table="true">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w-14">
|
||||
<input class="checkbox checkbox-sm" data-datatable-check="true" type="checkbox" />
|
||||
</th>
|
||||
<th class="min-w-[250px]" data-datatable-column="code">
|
||||
<span class="sort"> <span class="sort-label"> Kode Ijin Usaha </span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
<th class="min-w-[250px]" data-datatable-column="name">
|
||||
<span class="sort"> <span class="sort-label"> Nama Ijin Usaha </span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
<th class="min-w-[50px] text-center" data-datatable-column="actions">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<div
|
||||
class="card-footer justify-center md:justify-between flex-col md:flex-row gap-3 text-gray-600 text-2sm font-medium">
|
||||
<div class="flex items-center gap-2">
|
||||
Show
|
||||
<select class="select select-sm w-16" data-datatable-size="true" name="perpage"> </select> per page
|
||||
</div>
|
||||
<div class="flex items-center gap-4">
|
||||
<span data-datatable-info="true"> </span>
|
||||
<div class="pagination" data-datatable-pagination="true">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
<script type="text/javascript">
|
||||
function deleteData(data) {
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: "You won't be able to revert this!",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, delete it!'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax(`basic-data/ijin_usaha/${data}`, {
|
||||
type: 'DELETE'
|
||||
}).then((response) => {
|
||||
swal.fire('Deleted!', 'Ijin Usaha has been deleted.', 'success').then(() => {
|
||||
window.location.reload();
|
||||
});
|
||||
}).catch((error) => {
|
||||
console.error('Error:', error);
|
||||
Swal.fire('Error!', 'An error occurred while deleting the file.', 'error');
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<script type="module">
|
||||
const element = document.querySelector('#ijin-table');
|
||||
const searchInput = document.getElementById('search');
|
||||
|
||||
const apiUrl = element.getAttribute('data-api-url');
|
||||
const dataTableOptions = {
|
||||
apiEndpoint: apiUrl,
|
||||
pageSize: 5,
|
||||
columns: {
|
||||
select: {
|
||||
render: (item, data, context) => {
|
||||
const checkbox = document.createElement('input');
|
||||
checkbox.className = 'checkbox checkbox-sm';
|
||||
checkbox.type = 'checkbox';
|
||||
checkbox.value = data.id.toString();
|
||||
checkbox.setAttribute('data-datatable-row-check', 'true');
|
||||
return checkbox.outerHTML.trim();
|
||||
},
|
||||
},
|
||||
code: {
|
||||
title: 'Kode Ijin Usaha',
|
||||
},
|
||||
name: {
|
||||
title: 'Nama Ijin Usaha',
|
||||
},
|
||||
actions: {
|
||||
title: 'Status',
|
||||
render: (item, data) => {
|
||||
return `<div class="flex flex-nowrap justify-center">
|
||||
<a class="btn btn-sm btn-icon btn-clear btn-info" href="basic-data/ijin_usaha/${data.id}/edit">
|
||||
<i class="ki-outline ki-notepad-edit"></i>
|
||||
</a>
|
||||
<a onclick="deleteData(${data.id})" class="delete btn btn-sm btn-icon btn-clear btn-danger">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</a>
|
||||
</div>`;
|
||||
},
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
let dataTable = new KTDataTable(element, dataTableOptions);
|
||||
// Custom search functionality
|
||||
searchInput.addEventListener('input', function() {
|
||||
const searchValue = this.value.trim();
|
||||
dataTable.search(searchValue, true);
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@@ -6,75 +6,94 @@
|
||||
|
||||
@section('content')
|
||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||
@if(isset($jenisJaminan->id))
|
||||
@if (isset($jenisJaminan->id))
|
||||
<form action="{{ route('basicdata.jenis-jaminan.update', $jenisJaminan->id) }}" method="POST">
|
||||
<input type="hidden" name="id" value="{{ $jenisJaminan->id }}">
|
||||
@method('PUT')
|
||||
@else
|
||||
<form method="POST" action="{{ route('basicdata.jenis-jaminan.store') }}">
|
||||
@endif
|
||||
@csrf
|
||||
<div class="card pb-2.5">
|
||||
<div class="card-header" id="basic_settings">
|
||||
<h3 class="card-title">
|
||||
{{ isset($jenisJaminan->id) ? 'Edit' : 'Tambah' }} Jenis Jaminan
|
||||
</h3>
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="{{ route('basicdata.jenis-jaminan.index') }}" class="btn btn-xs btn-info"><i class="ki-filled ki-exit-left"></i> Back</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body grid gap-5">
|
||||
@if(isset($jenisJaminan->id))
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Code
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input readonly class="input border-warning bg-warning-light @error('code') border-danger bg-danger-light @enderror" type="text" name="code" value="{{ $jenisJaminan->code ?? '' }}">
|
||||
@error('code')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Name
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('name') border-danger bg-danger-light @enderror" type="text" name="name" value="{{ $jenisJaminan->name ?? '' }}">
|
||||
@error('name')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Jenis Legalitas Jaminan
|
||||
</label>
|
||||
<div class="grid grid-cols-3 lg:grid-cols-4 w-full gap-2.5">
|
||||
@foreach($jenisLegalitasJaminan as $row)
|
||||
<label class="switch">
|
||||
@if(isset($jenisJaminan->jenis_legalitas_jaminan_id))
|
||||
<input type="checkbox" @if(in_array($row->code,json_decode($jenisJaminan->jenis_legalitas_jaminan_id,true))) {{ "checked" }} @endif value="{{ $row->code }}" name="jenis_legalitas_jaminan_id[]"/>
|
||||
@else
|
||||
<input type="checkbox" value="{{ $row->code }}" name="jenis_legalitas_jaminan_id[]"/>
|
||||
@endif
|
||||
<span class="switch-label">
|
||||
{{ $row->name }}
|
||||
</span>
|
||||
</label>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-end">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<form method="POST" action="{{ route('basicdata.jenis-jaminan.store') }}">
|
||||
@endif
|
||||
@csrf
|
||||
<div class="card pb-2.5">
|
||||
<div class="card-header" id="basic_settings">
|
||||
<h3 class="card-title">
|
||||
{{ isset($jenisJaminan->id) ? 'Edit' : 'Tambah' }} Jenis Jaminan
|
||||
</h3>
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="{{ route('basicdata.jenis-jaminan.index') }}" class="btn btn-xs btn-info"><i
|
||||
class="ki-filled ki-exit-left"></i> Back</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body grid gap-5">
|
||||
@if (isset($jenisJaminan->id))
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Code
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input readonly
|
||||
class="input border-warning bg-warning-light @error('code') border-danger bg-danger-light @enderror"
|
||||
type="text" name="code" value="{{ $jenisJaminan->code ?? '' }}">
|
||||
@error('code')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@else
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Code
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('code') border-danger bg-danger-light @enderror" type="text"
|
||||
name="code" value="{{ $ijin_usaha->code ?? old('code') }}">
|
||||
@error('code')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Name
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('name') border-danger bg-danger-light @enderror" type="text"
|
||||
name="name" value="{{ $jenisJaminan->name ?? '' }}">
|
||||
@error('name')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Jenis Legalitas Jaminan
|
||||
</label>
|
||||
<div class="grid grid-cols-3 lg:grid-cols-4 w-full gap-2.5">
|
||||
@foreach ($jenisLegalitasJaminan as $row)
|
||||
<label class="switch">
|
||||
@if (isset($jenisJaminan->jenis_legalitas_jaminan_id))
|
||||
<input type="checkbox" @if (in_array($row->code, json_decode($jenisJaminan->jenis_legalitas_jaminan_id, true))) {{ 'checked' }} @endif
|
||||
value="{{ $row->code }}" name="jenis_legalitas_jaminan_id[]" />
|
||||
@else
|
||||
<input type="checkbox" value="{{ $row->code }}"
|
||||
name="jenis_legalitas_jaminan_id[]" />
|
||||
@endif
|
||||
<span class="switch-label">
|
||||
{{ $row->name }}
|
||||
</span>
|
||||
</label>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-end">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
411
resources/views/kjpp/create.blade.php
Normal file
411
resources/views/kjpp/create.blade.php
Normal file
@@ -0,0 +1,411 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumbs')
|
||||
{{ Breadcrumbs::render(request()->route()->getName()) }}
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||
<form action="{{ isset($kjpp->id) ? route('basicdata.kjpp.update', $kjpp->id) : route('basicdata.kjpp.store') }}"
|
||||
method="POST" enctype="multipart/form-data">
|
||||
@if (isset($kjpp->id))
|
||||
<input type="hidden" name="id" value="{{ $kjpp->id }}">
|
||||
@method('PUT')
|
||||
@endif
|
||||
@csrf
|
||||
|
||||
<div class="card pb-2.5">
|
||||
<div class="card-header" id="basic_settings">
|
||||
<h3 class="card-title">
|
||||
{{ isset($kjpp->id) ? 'Edit' : 'Tambah' }} KJPP
|
||||
</h3>
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="{{ route('basicdata.kjpp.index') }}" class="btn btn-xs btn-info"><i
|
||||
class="ki-filled ki-exit-left"></i>
|
||||
Back</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body grid gap-5">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Nomor KJPP
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('code') border-danger @enderror" type="text" name="code"
|
||||
value="{{ $kjpp->code ?? old('code') }}">
|
||||
@error('code')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<label class="form-label max-w-56">
|
||||
Nama KJPP
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('name') border-danger @enderror" type="text" name="name"
|
||||
value="{{ $kjpp->name ?? old('name') }}">
|
||||
@error('name')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Jenis Kantor / Cabang</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select class="input tomselect @error('jenis_kantor') border-danger @enderror"
|
||||
name="jenis_kantor">
|
||||
<option value="">Pilih Jenis Kantor / Cabang</option>
|
||||
@if (isset($branch))
|
||||
@if (isset($kjpp))
|
||||
@foreach ($branch as $branches)
|
||||
<option value="{{ $branches->name }}"
|
||||
{{ old('jenis_kantor', $branches->name) == $branches->name ? 'selected' : '' }}>
|
||||
{{ $branches->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
@else
|
||||
@foreach ($branch as $branches)
|
||||
<option value="{{ $branches->name }}"
|
||||
{{ old('jenis_kantor') == $branches->name ? 'selected' : '' }}>
|
||||
{{ $branches->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
@endif
|
||||
@endif
|
||||
</select>
|
||||
@error('jenis_kantor')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<label class="form-label max-w-56">Nomor Ijin Usaha</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select class="input tomselect @error('nomor_ijin_usaha') border-danger @enderror"
|
||||
name="nomor_ijin_usaha">
|
||||
<option value="">Pilih Nomor Ijin Usaha</option>
|
||||
@if (isset($ijin_usaha))
|
||||
@if (isset($kjpp))
|
||||
@foreach ($ijin_usaha as $branches)
|
||||
<option value="{{ $branches->code }}"
|
||||
{{ old('nomor_ijin_usaha', $branches->code) == $branches->code ? 'selected' : '' }}>
|
||||
{{ $branches->code }}
|
||||
</option>
|
||||
@endforeach
|
||||
@else
|
||||
@foreach ($ijin_usaha as $branches)
|
||||
<option value="{{ $branches->code }}"
|
||||
{{ old('nomor_ijin_usaha') == $branches->code ? 'selected' : '' }}>
|
||||
{{ $branches->code }}
|
||||
</option>
|
||||
@endforeach
|
||||
@endif
|
||||
@endif
|
||||
</select>
|
||||
@error('nomor_ijin_usaha')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Alamat Kantor
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<div class="flex flex-col lg:flex-row gap-2 w-full">
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="province_code" name="province_code"
|
||||
class="select w-full @error('province_code') border-danger @enderror">
|
||||
<option value="">Pilih Provinsi</option>
|
||||
@foreach ($provinces as $province)
|
||||
@if (isset($kjpp))
|
||||
<option value="{{ $province->code }}"
|
||||
{{ old('province_code', $kjpp->province_code) == $province->code ? 'selected' : '' }}>
|
||||
{{ $province->name }}
|
||||
</option>
|
||||
@else
|
||||
<option value="{{ $province->code }}"
|
||||
{{ old('province_code') == $province->code ? 'selected' : '' }}>
|
||||
{{ $province->name }}
|
||||
</option>
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
@error('province_code')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="city_code" name="city_code"
|
||||
class="select w-full @error('city_code') border-danger @enderror">
|
||||
<option value="">Pilih Kota / Kabupaten</option>
|
||||
@if (isset($cities))
|
||||
@foreach ($cities as $city)
|
||||
@if (isset($kjpp))
|
||||
<option value="{{ $city->code }}"
|
||||
{{ old('city_code', $kjpp->city_code) == $city->code ? 'selected' : '' }}>
|
||||
{{ $city->name }}
|
||||
</option>
|
||||
@else
|
||||
<option value="{{ $city->code }}"
|
||||
{{ old('city_code') == $city->code ? 'selected' : '' }}>
|
||||
{{ $city->name }}
|
||||
</option>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
@error('city_code')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col lg:flex-row gap-2 w-full mt-2 lg:mt-5">
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="district_code" name="district_code"
|
||||
class="select w-full @error('district_code') border-danger @enderror">
|
||||
<option value="">Pilih Kecamatan</option>
|
||||
@if (isset($districts))
|
||||
@foreach ($districts as $district)
|
||||
@if (isset($kjpp))
|
||||
<option value="{{ $district->code }}"
|
||||
{{ old('district_code', $kjpp->district_code) == $district->code ? 'selected' : '' }}>
|
||||
{{ $district->name }}
|
||||
</option>
|
||||
@else
|
||||
<option value="{{ $district->code }}"
|
||||
{{ old('district_code') == $district->code ? 'selected' : '' }}>
|
||||
{{ $district->name }}
|
||||
</option>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
@error('district_code')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="village_code" name="village_code"
|
||||
class="select w-full @error('village_code') border-danger @enderror">
|
||||
<option value="">Pilih Kelurahan</option>
|
||||
@if (isset($villages))
|
||||
@foreach ($villages as $village)
|
||||
@if (isset($kjpp))
|
||||
<option value="{{ $village->code }}"
|
||||
{{ old('village_code', $kjpp->village_code) == $village->code ? 'selected' : '' }}>
|
||||
{{ $village->name }}
|
||||
</option>
|
||||
@else
|
||||
<option value="{{ $village->code }}"
|
||||
{{ old('village_code') == $village->code ? 'selected' : '' }}>
|
||||
{{ $village->name }}
|
||||
</option>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
@error('village_code')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('postal_code') border-danger @enderror" type="number"
|
||||
id="postal_code" name="postal_code"
|
||||
value="{{ $kjpp->postal_code ?? old('postal_code') }}" placeholder="Kode Pos">
|
||||
@error('postal_code')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col w-full mt-2 lg:mt-5">
|
||||
<textarea class="textarea @error('address') border-danger @enderror" rows="3" type="number" id="address"
|
||||
name="address">{{ $kjpp->address ?? old('address') }}</textarea>
|
||||
@error('address')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Nomor Telepon Kantor
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('nomor_telepon_kantor') border-danger @enderror" type="text"
|
||||
name="nomor_telepon_kantor"
|
||||
value="{{ $kjpp->nomor_telepon_kantor ?? old('nomor_telepon_kantor') }}">
|
||||
@error('nomor_telepon_kantor')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<label class="form-label max-w-56">
|
||||
Email Kantor
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('email_kantor') border-danger @enderror" type="text"
|
||||
name="email_kantor" value="{{ $kjpp->email_kantor ?? old('email_kantor') }}">
|
||||
@error('email_kantor')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Nama Pimpinan
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('nama_pimpinan') border-danger @enderror" type="text"
|
||||
name="nama_pimpinan" value="{{ $kjpp->nama_pimpinan ?? old('nama_pimpinan') }}">
|
||||
@error('nama_pimpinan')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP Pimpinan
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('nomor_hp_pimpinan') border-danger @enderror" type="text"
|
||||
name="nomor_hp_pimpinan"
|
||||
value="{{ $kjpp->nomor_hp_pimpinan ?? old('nomor_hp_pimpinan') }}">
|
||||
@error('nomor_hp_pimpinan')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Nama PIC Reviewer
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('nama_pic_reviewer') border-danger @enderror" type="text"
|
||||
name="nama_pic_reviewer"
|
||||
value="{{ $kjpp->nama_pic_reviewer ?? old('nama_pic_reviewer') }}">
|
||||
@error('nama_pic_reviewer')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP PIC Reviewer
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('nomor_hp_pic_reviewer') border-danger @enderror" type="text"
|
||||
name="nomor_hp_pic_reviewer"
|
||||
value="{{ $kjpp->nomor_hp_pic_reviewer ?? old('nomor_hp_pic_reviewer') }}">
|
||||
@error('nomor_hp_pic_reviewer')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Nama PIC Admin
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('nama_pic_admin') border-danger @enderror" type="text"
|
||||
name="nama_pic_admin" value="{{ $kjpp->nama_pic_admin ?? old('nama_pic_admin') }}">
|
||||
@error('nama_pic_admin')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP PIC Admin
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('nomor_hp_pic_admin') border-danger @enderror" type="text"
|
||||
name="nomor_hp_pic_admin"
|
||||
value="{{ $kjpp->nomor_hp_pic_admin ?? old('nomor_hp_pic_admin') }}">
|
||||
@error('nomor_hp_pic_admin')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Nama PIC Marketing
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('nama_pic_marketing') border-danger @enderror" type="text"
|
||||
name="nama_pic_marketing"
|
||||
value="{{ $kjpp->nama_pic_marketing ?? old('nama_pic_marketing') }}">
|
||||
@error('nama_pic_marketing')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP PIC Marketing
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('nomor_hp_pic_marketing') border-danger @enderror"
|
||||
type="text" name="nomor_hp_pic_marketing"
|
||||
value="{{ $kjpp->nomor_hp_pic_marketing ?? old('nomor_hp_pic_marketing') }}">
|
||||
@error('nomor_hp_pic_marketing')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Ijin Usaha
|
||||
</label>
|
||||
<div class="grid grid-cols-3 lg:grid-cols-4 w-full gap-2.5">
|
||||
@foreach ($ijin_usaha as $row)
|
||||
<label class="switch">
|
||||
@if (isset($kjpp->ijin_usaha_id))
|
||||
<input type="checkbox"
|
||||
@if (in_array($row->code, old('ijin_usaha_id', json_decode($kjpp->ijin_usaha_id, true)))) {{ 'checked' }} @endif
|
||||
value="{{ $row->code }}" name="ijin_usaha[]" />
|
||||
@else
|
||||
<input type="checkbox"
|
||||
@if (in_array($row->code, old('ijin_usaha_id', []))) {{ 'checked' }} @endif
|
||||
value="{{ $row->code }}" name="ijin_usaha[]" />
|
||||
@endif
|
||||
<span class="switch-label">
|
||||
{{ $row->name }}
|
||||
</span>
|
||||
</label>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Jenis Jaminan
|
||||
</label>
|
||||
<div class="grid grid-cols-3 lg:grid-cols-4 w-full gap-2.5">
|
||||
@foreach ($jenis_aset as $row)
|
||||
<label class="switch">
|
||||
@if (isset($kjpp->jenis_aset_id))
|
||||
<input type="checkbox"
|
||||
@if (in_array($row->code, old('jenis_aset_id', json_decode($kjpp->jenis_aset_id, true)))) {{ 'checked' }} @endif
|
||||
value="{{ $row->code }}" name="jenis_jaminan[]" />
|
||||
@else
|
||||
<input type="checkbox"
|
||||
@if (in_array($row->code, old('jenis_aset_id', []))) {{ 'checked' }} @endif
|
||||
value="{{ $row->code }}" name="jenis_jaminan[]" />
|
||||
@endif
|
||||
<span class="switch-label">
|
||||
{{ $row->name }}
|
||||
</span>
|
||||
</label>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Attachment
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="file-input @error('attachment') border-danger @enderror" name="attachment"
|
||||
type="file" />
|
||||
@error('attachment')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-end">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@endsection
|
||||
162
resources/views/kjpp/index.blade.php
Normal file
162
resources/views/kjpp/index.blade.php
Normal file
@@ -0,0 +1,162 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumbs')
|
||||
{{ Breadcrumbs::render('basicdata.kjpp') }}
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="grid">
|
||||
<div class="card card-grid min-w-full" data-datatable="false" data-datatable-page-size="5"
|
||||
data-datatable-state-save="false" id="kjpp-table" data-api-url="{{ route('basicdata.kjpp.datatables') }}">
|
||||
<div class="card-header py-5 flex-wrap">
|
||||
<h3 class="card-title">
|
||||
KJPP
|
||||
</h3>
|
||||
<div class="flex flex-wrap gap-2 lg:gap-5">
|
||||
<div class="flex">
|
||||
<label class="input input-sm"> <i class="ki-filled ki-magnifier"> </i>
|
||||
<input placeholder="Search KJPP" id="search" type="text" value="">
|
||||
</label>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2.5">
|
||||
<div class="h-[24px] border border-r-gray-200"></div>
|
||||
<a class="btn btn-sm btn-light" href="{{ route('basicdata.kjpp.export') }}"> Export to Excel
|
||||
</a>
|
||||
<a class="btn btn-sm btn-primary" href="{{ route('basicdata.kjpp.create') }}"> Tambah KJPP
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="scrollable-x-auto">
|
||||
<table class="table table-auto table-border align-middle text-gray-700 font-medium text-sm"
|
||||
data-datatable-table="true">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w-14">
|
||||
<input class="checkbox checkbox-sm" data-datatable-check="true" type="checkbox" />
|
||||
</th>
|
||||
<th class="min-w-[250px]" data-datatable-column="code">
|
||||
<span class="sort"> <span class="sort-label"> Nomor KJPP </span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
<th class="min-w-[250px]" data-datatable-column="name">
|
||||
<span class="sort"> <span class="sort-label"> Nama KJPP </span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
<th class="min-w-[50px]" data-datatable-column="jenis_kantor">
|
||||
<span class="sort"> <span class="sort-label"> Jenis Kantor / Cabang </span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
<th class="min-w-[50px] text-center" data-datatable-column="actions">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<div
|
||||
class="card-footer justify-center md:justify-between flex-col md:flex-row gap-3 text-gray-600 text-2sm font-medium">
|
||||
<div class="flex items-center gap-2">
|
||||
Show
|
||||
<select class="select select-sm w-16" data-datatable-size="true" name="perpage"> </select> per page
|
||||
</div>
|
||||
<div class="flex items-center gap-4">
|
||||
<span data-datatable-info="true"> </span>
|
||||
<div class="pagination" data-datatable-pagination="true">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
<script type="text/javascript">
|
||||
function deleteData(data) {
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: "You won't be able to revert this!",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, delete it!'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax(`basic-data/kjpp/${data}`, {
|
||||
type: 'DELETE'
|
||||
}).then((response) => {
|
||||
swal.fire('Deleted!', 'User has been deleted.', 'success').then(() => {
|
||||
window.location.reload();
|
||||
});
|
||||
}).catch((error) => {
|
||||
console.error('Error:', error);
|
||||
Swal.fire('Error!', 'An error occurred while deleting the file.', 'error');
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<script type="module">
|
||||
const element = document.querySelector('#kjpp-table');
|
||||
const searchInput = document.getElementById('search');
|
||||
|
||||
const apiUrl = element.getAttribute('data-api-url');
|
||||
const dataTableOptions = {
|
||||
apiEndpoint: apiUrl,
|
||||
pageSize: 5,
|
||||
columns: {
|
||||
select: {
|
||||
render: (item, data, context) => {
|
||||
const checkbox = document.createElement('input');
|
||||
checkbox.className = 'checkbox checkbox-sm';
|
||||
checkbox.type = 'checkbox';
|
||||
checkbox.value = data.id.toString();
|
||||
checkbox.setAttribute('data-datatable-row-check', 'true');
|
||||
return checkbox.outerHTML.trim();
|
||||
},
|
||||
},
|
||||
code: {
|
||||
title: 'Nomor KJPP',
|
||||
},
|
||||
name: {
|
||||
title: 'Nama KJPP',
|
||||
},
|
||||
jenis_kantor: {
|
||||
title: 'Jenis Kantor / Cabang',
|
||||
},
|
||||
actions: {
|
||||
title: 'Action',
|
||||
render: (item, data) => {
|
||||
return `<div class="flex flex-nowrap justify-center">
|
||||
<a class="btn btn-sm btn-icon btn-clear btn-primary" href="basic-data/kjpp/${data.id}/show">
|
||||
<i class="ki-filled ki-eye"></i>
|
||||
</a>
|
||||
<a class="btn btn-sm btn-icon btn-clear btn-info" href="basic-data/kjpp/${data.id}/edit">
|
||||
<i class="ki-outline ki-notepad-edit"></i>
|
||||
</a>
|
||||
<a onclick="deleteData(${data.id})" class="delete btn btn-sm btn-icon btn-clear btn-danger">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</a>
|
||||
</div>`;
|
||||
},
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
let dataTable = new KTDataTable(element, dataTableOptions);
|
||||
// Custom search functionality
|
||||
searchInput.addEventListener('input', function() {
|
||||
const searchValue = this.value.trim();
|
||||
dataTable.search(searchValue, true);
|
||||
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
22
resources/views/penawaran/create.blade.php
Normal file
22
resources/views/penawaran/create.blade.php
Normal file
@@ -0,0 +1,22 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumbs')
|
||||
{{ Breadcrumbs::render('tender.penawaran') }}
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||
|
||||
<div class="card pb-2.5">
|
||||
<div class="card-header" id="basic_settings">
|
||||
<h3 class="card-title">
|
||||
Tambah Data Penawaran
|
||||
</h3>
|
||||
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{{-- @include('lpj::debitur.form') --}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
21
resources/views/penawaran/index.blade.php
Normal file
21
resources/views/penawaran/index.blade.php
Normal file
@@ -0,0 +1,21 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumbs')
|
||||
{{ Breadcrumbs::render('tender.penawaran') }}
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||
|
||||
<div class="card pb-2.5" data-datatable="false" data-datatable-page-size="5" data-datatable-state-save="false"
|
||||
id="currency-table" data-api-url="{{ route('basicdata.currency.datatables') }}">
|
||||
<div class="card-header py-5 flex-wrap" id="basic_settings">
|
||||
<h3 class="card-title">
|
||||
Data Penawaran
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
22
resources/views/penawaran_ulang/index.blade.php
Normal file
22
resources/views/penawaran_ulang/index.blade.php
Normal file
@@ -0,0 +1,22 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumbs')
|
||||
{{ Breadcrumbs::render('tender.penawaran.ulang') }}
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||
|
||||
<div class="card pb-2.5">
|
||||
<div class="card-header" id="basic_settings">
|
||||
<h3 class="card-title">
|
||||
Data Penawaran Ulang
|
||||
</h3>
|
||||
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{{-- @include('lpj::debitur.form') --}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
22
resources/views/proses_penawaran/index.blade.php
Normal file
22
resources/views/proses_penawaran/index.blade.php
Normal file
@@ -0,0 +1,22 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumbs')
|
||||
{{ Breadcrumbs::render('tender.proses.penawaran') }}
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||
|
||||
<div class="card pb-2.5">
|
||||
<div class="card-header" id="basic_settings">
|
||||
<h3 class="card-title">
|
||||
Data Proses Penawaran
|
||||
</h3>
|
||||
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{{-- @include('lpj::debitur.form') --}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -188,6 +188,36 @@
|
||||
$trail->push('Edit Status Permohonan');
|
||||
});
|
||||
|
||||
Breadcrumbs::for('basicdata.kjpp', function (BreadcrumbTrail $trail) {
|
||||
$trail->parent('basicdata');
|
||||
$trail->push('KJPP', route('basicdata.kjpp.index'));
|
||||
});
|
||||
|
||||
Breadcrumbs::for('basicdata.kjpp.create', function (BreadcrumbTrail $trail) {
|
||||
$trail->parent('basicdata.kjpp');
|
||||
$trail->push('Tambah KJPP', route('basicdata.kjpp.create'));
|
||||
});
|
||||
|
||||
Breadcrumbs::for('basicdata.kjpp.edit', function (BreadcrumbTrail $trail) {
|
||||
$trail->parent('basicdata.kjpp');
|
||||
$trail->push('Edit KJPP');
|
||||
});
|
||||
|
||||
Breadcrumbs::for('basicdata.ijin_usaha', function (BreadcrumbTrail $trail) {
|
||||
$trail->parent('basicdata');
|
||||
$trail->push('Ijin Usaha', route('basicdata.ijin_usaha.index'));
|
||||
});
|
||||
|
||||
Breadcrumbs::for('basicdata.ijin_usaha.create', function (BreadcrumbTrail $trail) {
|
||||
$trail->parent('basicdata.ijin_usaha');
|
||||
$trail->push('Tambah Ijin Usaha', route('basicdata.ijin_usaha.create'));
|
||||
});
|
||||
|
||||
Breadcrumbs::for('basicdata.ijin_usaha.edit', function (BreadcrumbTrail $trail) {
|
||||
$trail->parent('basicdata.ijin_usaha');
|
||||
$trail->push('Edit Ijin Usaha');
|
||||
});
|
||||
|
||||
Breadcrumbs::for('debitur', function (BreadcrumbTrail $trail) {
|
||||
$trail->push('Debitur', route('debitur.index'));
|
||||
});
|
||||
@@ -294,7 +324,6 @@
|
||||
$trail->push('Edit Jenis Penilaian');
|
||||
});
|
||||
|
||||
|
||||
Breadcrumbs::for('penilaian', function (BreadcrumbTrail $trail) {
|
||||
$trail->push('Penilaian', route('penilaian.index'));
|
||||
});
|
||||
@@ -312,7 +341,6 @@
|
||||
$trail->push('Detail Permohonan');
|
||||
});
|
||||
|
||||
|
||||
Breadcrumbs::for('activity', function (BreadcrumbTrail $trail) {
|
||||
$trail->push('Activity', route('activity.index'));
|
||||
});
|
||||
@@ -321,3 +349,22 @@
|
||||
$trail->parent('activity');
|
||||
$trail->push('Activity activity');
|
||||
});
|
||||
|
||||
Breadcrumbs::for('tender', function (BreadcrumbTrail $trail) {
|
||||
$trail->push('Tender');
|
||||
});
|
||||
|
||||
Breadcrumbs::for('tender.penawaran', function (BreadcrumbTrail $trail) {
|
||||
$trail->parent('tender');
|
||||
$trail->push('Data Penawaran', route('tender.penawaran.index'));
|
||||
});
|
||||
|
||||
Breadcrumbs::for('tender.proses.penawaran', function (BreadcrumbTrail $trail) {
|
||||
$trail->parent('tender');
|
||||
$trail->push('Data Proses Penawaran', route('tender.proses_penawaran.index'));
|
||||
});
|
||||
|
||||
Breadcrumbs::for('tender.penawaran.ulang', function (BreadcrumbTrail $trail) {
|
||||
$trail->parent('tender');
|
||||
$trail->push('Data Penawaran Ulang', route('tender.penawaran_ulang.index'));
|
||||
});
|
||||
|
||||
200
routes/web.php
200
routes/web.php
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Modules\Lpj\Http\Controllers\ActivityController;
|
||||
use Modules\Lpj\Http\Controllers\ArahMataAnginController;
|
||||
use Modules\Lpj\Http\Controllers\BranchController;
|
||||
use Modules\Lpj\Http\Controllers\CurrencyController;
|
||||
@@ -8,12 +9,13 @@
|
||||
use Modules\Lpj\Http\Controllers\DokumenJaminanController;
|
||||
use Modules\Lpj\Http\Controllers\HubunganPemilikJaminanController;
|
||||
use Modules\Lpj\Http\Controllers\HubunganPenghuniJaminanController;
|
||||
use Modules\Lpj\Http\Controllers\JenisAsetController;
|
||||
use Modules\Lpj\Http\Controllers\IjinUsahaController;
|
||||
use Modules\Lpj\Http\Controllers\JenisDokumenController;
|
||||
use Modules\Lpj\Http\Controllers\JenisFasilitasKreditController;
|
||||
use Modules\Lpj\Http\Controllers\JenisJaminanController;
|
||||
use Modules\Lpj\Http\Controllers\JenisLegalitasJaminanController;
|
||||
use Modules\Lpj\Http\Controllers\JenisPenilaianController;
|
||||
use Modules\Lpj\Http\Controllers\KJPPController;
|
||||
use Modules\Lpj\Http\Controllers\NilaiPlafondController;
|
||||
use Modules\Lpj\Http\Controllers\PemilikJaminanController;
|
||||
use Modules\Lpj\Http\Controllers\PenilaianController;
|
||||
@@ -21,19 +23,19 @@
|
||||
use Modules\Lpj\Http\Controllers\RegionController;
|
||||
use Modules\Lpj\Http\Controllers\StatusPermohonanController;
|
||||
use Modules\Lpj\Http\Controllers\TeamsController;
|
||||
use Modules\Lpj\Http\Controllers\TenderController;
|
||||
use Modules\Lpj\Http\Controllers\TujuanPenilaianController;
|
||||
use Modules\Lpj\Http\Controllers\ActivityController;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Web Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register web routes for your application. These
|
||||
| routes are loaded by the RouteServiceProvider within a group which
|
||||
| contains the "web" middleware group. Now create something great!
|
||||
|
|
||||
*/
|
||||
|--------------------------------------------------------------------------
|
||||
| Web Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register web routes for your application. These
|
||||
| routes are loaded by the RouteServiceProvider within a group which
|
||||
| contains the "web" middleware group. Now create something great!
|
||||
|
|
||||
*/
|
||||
|
||||
Route::middleware(['auth'])->group(function () {
|
||||
Route::name('basicdata.')->prefix('basic-data')->group(function () {
|
||||
@@ -77,7 +79,6 @@
|
||||
Route::get('export', [JenisDokumenController::class, 'export'])->name('export');
|
||||
});
|
||||
Route::resource('jenis-dokumen', JenisDokumenController::class);
|
||||
|
||||
Route::name('currency.')->prefix('mata-uang')->group(function () {
|
||||
Route::get('restore/{id}', [CurrencyController::class, 'restore'])->name('restore');
|
||||
Route::get('datatables', [CurrencyController::class, 'dataForDatatables'])
|
||||
@@ -214,6 +215,139 @@
|
||||
'destroy' => 'jenis-penilaian.destroy',
|
||||
],
|
||||
]);
|
||||
|
||||
Route::resource('mata-uang', CurrencyController::class, [
|
||||
'names' => [
|
||||
'index' => 'currency.index',
|
||||
'show' => 'currency.show',
|
||||
'create' => 'currency.create',
|
||||
'store' => 'currency.store',
|
||||
'edit' => 'currency.edit',
|
||||
'update' => 'currency.update',
|
||||
'destroy' => 'currency.destroy',
|
||||
],
|
||||
]);
|
||||
|
||||
Route::name('branch.')->prefix('cabang')->group(function () {
|
||||
Route::get('restore/{id}', [BranchController::class, 'restore'])->name('restore');
|
||||
Route::get('datatables', [BranchController::class, 'dataForDatatables'])
|
||||
->name('datatables');
|
||||
Route::get('export', [BranchController::class, 'export'])->name('export');
|
||||
});
|
||||
|
||||
Route::resource('cabang', BranchController::class, [
|
||||
'names' => [
|
||||
'index' => 'branch.index',
|
||||
'show' => 'branch.show',
|
||||
'create' => 'branch.create',
|
||||
'store' => 'branch.store',
|
||||
'edit' => 'branch.edit',
|
||||
'update' => 'branch.update',
|
||||
'destroy' => 'branch.destroy',
|
||||
],
|
||||
]);
|
||||
|
||||
Route::name('nilai-plafond.')->prefix('nilai-plafond')->group(function () {
|
||||
Route::get('restore/{id}', [NilaiPlafondController::class, 'restore'])->name('restore');
|
||||
Route::get('datatables', [NilaiPlafondController::class, 'dataForDatatables'])
|
||||
->name('datatables');
|
||||
Route::get('export', [NilaiPlafondController::class, 'export'])->name('export');
|
||||
});
|
||||
Route::resource('nilai-plafond', NilaiPlafondController::class);
|
||||
|
||||
Route::name('hubungan-pemilik-jaminan.')->prefix('hubungan-pemilik-jaminan')->group(function () {
|
||||
Route::get('restore/{id}', [HubunganPemilikJaminanController::class, 'restore'])->name('restore');
|
||||
Route::get('datatables', [HubunganPemilikJaminanController::class, 'dataForDatatables'])
|
||||
->name('datatables');
|
||||
Route::get('export', [HubunganPemilikJaminanController::class, 'export'])->name('export');
|
||||
});
|
||||
Route::resource('hubungan-pemilik-jaminan', HubunganPemilikJaminanController::class);
|
||||
|
||||
Route::name('hubungan-penghuni-jaminan.')->prefix('hubungan-penghuni-jaminan')->group(function () {
|
||||
Route::get('restore/{id}', [HubunganPenghuniJaminanController::class, 'restore'])->name('restore');
|
||||
Route::get('datatables', [HubunganPenghuniJaminanController::class, 'dataForDatatables'])
|
||||
->name('datatables');
|
||||
Route::get('export', [HubunganPenghuniJaminanController::class, 'export'])->name('export');
|
||||
});
|
||||
Route::resource('hubungan-penghuni-jaminan', HubunganPenghuniJaminanController::class);
|
||||
|
||||
Route::name('arah-mata-angin.')->prefix('arah-mata-angin')->group(function () {
|
||||
Route::get('restore/{id}', [ArahMataAnginController::class, 'restore'])->name('restore');
|
||||
Route::get('datatables', [ArahMataAnginController::class, 'dataForDatatables'])
|
||||
->name('datatables');
|
||||
Route::get('export', [ArahMataAnginController::class, 'export'])->name('export');
|
||||
});
|
||||
Route::resource('arah-mata-angin', ArahMataAnginController::class);
|
||||
|
||||
Route::name('jaminan.')->prefix('{id}/jaminan')->group(function () {
|
||||
Route::get('download/{dokumen}', [DokumenJaminanController::class, 'download'])->name('download');
|
||||
Route::get('/', [DokumenJaminanController::class, 'index'])->name('index');
|
||||
Route::get('create', [DokumenJaminanController::class, 'create'])->name('create');
|
||||
Route::get('{jaminan}/edit', [DokumenJaminanController::class, 'edit'])->name('edit');
|
||||
Route::put('{jaminan}', [DokumenJaminanController::class, 'update'])->name('update');
|
||||
Route::post('store', [DokumenJaminanController::class, 'store'])->name('store');
|
||||
Route::delete('{jaminan}', [DokumenJaminanController::class, 'destroy'])->name('destroy');
|
||||
});
|
||||
|
||||
Route::name('pemilik.')->prefix('{id}/pemilik')->group(function () {
|
||||
Route::get('/', [PemilikJaminanController::class, 'index'])->name('index');
|
||||
Route::get('create', [PemilikJaminanController::class, 'create'])->name('create');
|
||||
Route::get('{pemilik}/edit', [PemilikJaminanController::class, 'edit'])->name('edit');
|
||||
Route::put('{pemilik}', [PemilikJaminanController::class, 'update'])->name('update');
|
||||
Route::post('store', [PemilikJaminanController::class, 'store'])->name('store');
|
||||
Route::delete('{pemilik}', [PemilikJaminanController::class, 'destroy'])->name('destroy');
|
||||
});
|
||||
|
||||
Route::name('status-permohonan.')->prefix('status-permohonan')->group(function () {
|
||||
Route::get('restore/{id}', [StatusPermohonanController::class, 'restore'])->name('restore');
|
||||
Route::get('datatables', [StatusPermohonanController::class, 'dataForDatatables'])
|
||||
->name('datatables');
|
||||
Route::get('export', [StatusPermohonanController::class, 'export'])->name('export');
|
||||
});
|
||||
Route::resource('status-permohonan', StatusPermohonanController::class);
|
||||
|
||||
Route::name('kjpp.')->prefix('kjpp')->group(function () {
|
||||
Route::get('datatables', [KJPPController::class, 'dataForDatatables'])
|
||||
->name('datatables');
|
||||
Route::get('export', [KJPPController::class, 'export'])->name('export');
|
||||
});
|
||||
|
||||
Route::resource('kjpp', KJPPController::class);
|
||||
|
||||
Route::name('ijin_usaha.')->prefix('ijin_usaha')->group(function () {
|
||||
Route::get('datatables', [IjinUsahaController::class, 'dataForDatatables'])
|
||||
->name('datatables');
|
||||
Route::get('export', [IjinUsahaController::class, 'export'])->name('export');
|
||||
});
|
||||
|
||||
Route::resource('ijin_usaha', IjinUsahaController::class);
|
||||
});
|
||||
|
||||
Route::resource('debitur', DebitureController::class);
|
||||
|
||||
Route::name('penilaian.')->prefix('penilaian')->group(function () {
|
||||
Route::get('restore/{id}', [PenilaianController::class, 'restore'])->name('restore');
|
||||
Route::get('datatables', [PenilaianController::class, 'dataForDatatables'])->name('datatables');
|
||||
Route::get('export', [PenilaianController::class, 'export'])->name('export');
|
||||
Route::get('/getUserTeams/{id}', [PenilaianController::class, 'getUserTeams']);
|
||||
|
||||
Route::get('/', [PenilaianController::class, 'index'])->name('index');
|
||||
Route::get('{id}/assignment', [PenilaianController::class, 'assignment'])->name('assignment');
|
||||
Route::put('{id}', [PenilaianController::class, 'update'])->name('update');
|
||||
Route::put('revisi/{nomor_registrasi}', [PenilaianController::class, 'revisi'])->name('revisi');
|
||||
Route::post('create', [PenilaianController::class, 'create'])->name('create');
|
||||
Route::post('store', [PenilaianController::class, 'store'])->name('store');
|
||||
});
|
||||
|
||||
|
||||
Route::name('activity.')->prefix('activity')->group(function () {
|
||||
Route::get('restore/{id}', [ActivityController::class, 'restore'])->name('restore');
|
||||
Route::get('datatables', [ActivityController::class, 'dataForDatatables'])->name('datatables');
|
||||
Route::get('export', [ActivityController::class, 'export'])->name('export');
|
||||
Route::get('/', [ActivityController::class, 'index'])->name('index');
|
||||
|
||||
Route::get('/{id}/show', [ActivityController::class, 'show'])->name('show');
|
||||
Route::get('download/{id}', [ActivityController::class, 'download'])->name('download');
|
||||
});
|
||||
|
||||
Route::name('permohonan.')->prefix('permohonan')->group(function () {
|
||||
@@ -230,8 +364,12 @@
|
||||
Route::get('authorization', [PermohonanController::class, 'authorization'])->name('authorization.index');
|
||||
Route::get('authorization/datatables', [PermohonanController::class, 'dataForAuthorization'])
|
||||
->name('authorization.datatables');
|
||||
Route::get('authorization/{id}/edit', [PermohonanController::class, 'showAuthorization'])->name('authorization.show');
|
||||
Route::put('authorization/{id}', [PermohonanController::class, 'updateAuthorization'])->name('authorization.update');
|
||||
Route::get('authorization/{id}/edit', [PermohonanController::class, 'showAuthorization'])->name(
|
||||
'authorization.show',
|
||||
);
|
||||
Route::put('authorization/{id}', [PermohonanController::class, 'updateAuthorization'])->name(
|
||||
'authorization.update',
|
||||
);
|
||||
|
||||
Route::name('debitur.')->prefix('debitur')->group(function () {
|
||||
Route::get('restore/{id}', [DebitureController::class, 'restore'])->name('restore');
|
||||
@@ -262,29 +400,19 @@
|
||||
|
||||
Route::resource('debitur', DebitureController::class);
|
||||
|
||||
Route::name('penilaian.')->prefix('penilaian')->group(function () {
|
||||
Route::get('restore/{id}', [PenilaianController::class, 'restore'])->name('restore');
|
||||
Route::get('datatables', [PenilaianController::class, 'dataForDatatables'])->name('datatables');
|
||||
Route::get('export', [PenilaianController::class, 'export'])->name('export');
|
||||
Route::get('/getUserTeams/{id}', [PenilaianController::class, 'getUserTeams']);
|
||||
Route::name('tender.')->prefix('tender')->group(function () {
|
||||
// Penawaran
|
||||
Route::get('penawaran', [TenderController::class, 'penawaran_index'])->name('penawaran.index');
|
||||
Route::get('penawaran/create', [TenderController::class, 'penawaran_create'])->name('penawaran.create');
|
||||
|
||||
Route::get('/', [PenilaianController::class, 'index'])->name('index');
|
||||
Route::get('{id}/assignment', [PenilaianController::class, 'assignment'])->name('assignment');
|
||||
Route::put('{id}', [PenilaianController::class, 'update'])->name('update');
|
||||
Route::put('revisi/{nomor_registrasi}', [PenilaianController::class, 'revisi'])->name('revisi');
|
||||
Route::post('create', [PenilaianController::class, 'create'])->name('create');
|
||||
Route::post('store', [PenilaianController::class, 'store'])->name('store');
|
||||
// Proses Penawaran
|
||||
Route::get('proses_penawaran', [TenderController::class, 'proses_penawaran_index'])->name(
|
||||
'proses_penawaran.index',
|
||||
);
|
||||
|
||||
});
|
||||
|
||||
|
||||
Route::name('activity.')->prefix('activity')->group(function () {
|
||||
Route::get('restore/{id}', [ActivityController::class, 'restore'])->name('restore');
|
||||
Route::get('datatables', [ActivityController::class, 'dataForDatatables'])->name('datatables');
|
||||
Route::get('export', [ActivityController::class, 'export'])->name('export');
|
||||
Route::get('/', [ActivityController::class, 'index'])->name('index');
|
||||
|
||||
Route::get('/{id}/show', [ActivityController::class, 'show'])->name('show');
|
||||
Route::get('download/{id}', [ActivityController::class, 'download'])->name('download');
|
||||
// Penawaran Ulang
|
||||
Route::get('penawaran_ulang', [TenderController::class, 'penawaran_ulang_index'])->name(
|
||||
'penawaran_ulang.index',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user