Merge remote-tracking branch 'origin/tender' into staging
# Conflicts: # module.json
This commit is contained in:
@@ -53,23 +53,25 @@
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="jenis_kantor" class="select w-full @error('jenis_kantor') border-danger @enderror"
|
||||
name="jenis_kantor">
|
||||
<option value="">Pilih Jenis Kantor</option>
|
||||
@if (isset($branch))
|
||||
@if (isset($kjpp))
|
||||
@foreach ($branch as $branches)
|
||||
<option value="{{ $branches->name }}"
|
||||
{{ old('jenis_kantor', $kjpp->jenis_kantor) == $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
|
||||
@if (isset($kjpp->id))
|
||||
<option value="">Pilih Jenis Kantor</option>
|
||||
<option value="Kantor Pusat"
|
||||
{{ old('jenis_kantor', $kjpp->jenis_kantor) == 'Kantor Pusat' ? 'selected' : '' }}>
|
||||
Kantor Pusat
|
||||
</option>
|
||||
<option value="Kantor Cabang"
|
||||
{{ old('jenis_kantor', $kjpp->jenis_kantor) == 'Kantor Cabang' ? 'selected' : '' }}>
|
||||
Kantor Cabang
|
||||
</option>
|
||||
@else
|
||||
<option value="">Pilih Jenis Kantor</option>
|
||||
<option value="Kantor Pusat"
|
||||
{{ old('jenis_kantor') == 'Kantor Pusat' ? 'selected' : '' }}>Kantor Pusat
|
||||
</option>
|
||||
<option value="Kantor Cabang"
|
||||
{{ old('jenis_kantor') == 'Kantor Cabang' ? 'selected' : '' }}>Kantor
|
||||
Cabang
|
||||
</option>
|
||||
@endif
|
||||
</select>
|
||||
@error('jenis_kantor')
|
||||
|
||||
@@ -36,9 +36,7 @@
|
||||
<label class="form-label max-w-56">Jenis Kantor</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
@foreach ($branches as $branch)
|
||||
{{ $branch->name }}
|
||||
@endforeach
|
||||
{{ $kjpp->jenis_kantor }}
|
||||
</p>
|
||||
</div>
|
||||
<label class="form-label max-w-56">Nomor Ijin Usaha</label>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" value="{{ $penawaran->nomor_registrasi ?? '-' }}" name="nomor_registrasi"
|
||||
class="flex w-full text-gray-600 font-medium text-sm" readonly>
|
||||
class="flex w-full text-gray-600 font-medium text-sm input-custom" readonly>
|
||||
@error('nomor_registrasi')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
@@ -40,7 +40,7 @@
|
||||
Nomor Penawaran
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('code') border-danger @enderror" type="text" name="code"
|
||||
<input class="input @error('code') border-danger @enderror" type="text" name="code"
|
||||
value="{{ old('code') }}">
|
||||
@error('code')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@@ -170,18 +170,22 @@
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Status</label>
|
||||
<select id="status" class="select w-full @error('status') border-danger @enderror"
|
||||
name="status">
|
||||
<option value="">Pilih Status</option>
|
||||
@if (isset($status))
|
||||
@foreach ($status as $s)
|
||||
<option value="{{ $s->name }}"
|
||||
{{ old('status') == $s->name ? 'selected' : '' }}>
|
||||
{{ $s->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select class="select w-full @error('status') border-danger @enderror" name="status">
|
||||
<option value="">Pilih Status</option>
|
||||
@if (isset($status))
|
||||
@foreach ($status as $s)
|
||||
<option value="{{ $s->name }}"
|
||||
{{ old('status') == $s->name ? 'selected' : '' }}>
|
||||
{{ $s->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
@error('status')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-end">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
@@ -193,3 +197,12 @@
|
||||
</form>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('styles')
|
||||
<style>
|
||||
input.input-custom:focus {
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@@ -90,38 +90,6 @@
|
||||
1];
|
||||
}
|
||||
</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(`tender/penawaran/${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('#penawaran-table');
|
||||
const searchInput = document.getElementById('search');
|
||||
@@ -146,10 +114,26 @@
|
||||
},
|
||||
nama_kjpp_sebelumnya: {
|
||||
title: 'Nama KJPP Sebelumnya',
|
||||
render: (item, data) => {
|
||||
let nama = data.nama_kjpp_sebelumnya;
|
||||
if (typeof nama === 'string') {
|
||||
nama = JSON.parse(nama);
|
||||
}
|
||||
if (nama.length === 0) {
|
||||
return `<span class="badge badge-danger badge-xs">Tidak Ada</span>`;
|
||||
}
|
||||
return nama.map(n => `<span class="badge badge-primary badge-xs">${n}</span>`).join(' ');
|
||||
}
|
||||
},
|
||||
tanggal_penilaian_sebelumnya: {
|
||||
title: 'Tanggal Penilaian Sebelumnya',
|
||||
render: (item, data) => formatDate(new Date(data.tanggal_penilaian_sebelumnya))
|
||||
render: (item, data) => {
|
||||
const tanggal = data.tanggal_penilaian_sebelumnya;
|
||||
if (!tanggal) {
|
||||
return 'Tidak ada';
|
||||
}
|
||||
return formatDate(new Date(tanggal));
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
title: 'Action',
|
||||
|
||||
@@ -28,8 +28,60 @@
|
||||
{{ $penawaran->nomor_registrasi }}
|
||||
</p>
|
||||
</div>
|
||||
<label class="form-label max-w-56">
|
||||
No. Penawaran
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
{{ $penawaran->code }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Nama KJPP Sebelumnya
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
@if (isset($penawaran->nama_kjpp_sebelumnya) && !empty(json_decode($penawaran->nama_kjpp_sebelumnya, true)))
|
||||
<div class="flex flex-row space-x-4 text-gray-600 font-medium text-sm gap-1">
|
||||
@foreach (json_decode($penawaran->nama_kjpp_sebelumnya, true) as $penawaran_code)
|
||||
@php
|
||||
$kjpp = $kjpps->firstWhere('name', $penawaran_code);
|
||||
@endphp
|
||||
@if ($kjpp)
|
||||
<div
|
||||
class="flex flex-row space-x-4 text-white font-medium text-sm badge badge-dark dark-mode:badge dark-mode:text-gray-600 badge-xs">
|
||||
{{ $kjpp->name }}
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
<div class="flex flex-row space-x-4 text-gray-600 font-medium text-sm">
|
||||
Tidak ada
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<label class="form-label max-w-56">
|
||||
Biaya KJPP Sebelumnya
|
||||
</label>
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
@php
|
||||
function formatRupiah($number)
|
||||
{
|
||||
// Convert to float if the input is a string
|
||||
$number = (float) $number;
|
||||
|
||||
return 'Rp ' . number_format($number, 2, ',', '.');
|
||||
}
|
||||
@endphp
|
||||
@if (isset($penawaran->biaya_kjpp_sebelumnya))
|
||||
{{ formatRupiah($penawaran->biaya_kjpp_sebelumnya) }}
|
||||
@else
|
||||
{{ formatRupiah(0) }}
|
||||
@endif
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user