Merge branch 'staging' into feature/senior-officer

This commit is contained in:
majid
2024-09-26 09:45:07 +07:00
26 changed files with 2194 additions and 183 deletions

View 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

View 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

View File

@@ -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

View 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

View 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

View 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

View 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

View 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

View 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