Merge branch 'staging' of https://git.putrakuningan.com/daengdeni/lpj into tender
This commit is contained in:
@@ -258,12 +258,7 @@
|
||||
Alamat Jaminan:
|
||||
</h3>
|
||||
<span class="text-2sm text-gray-700">
|
||||
{{ $dokumen->pemilik->address ?? '' }},
|
||||
<br> {{ $dokumen->pemilik->village->name ?? '' }},
|
||||
{{ $dokumen->pemilik->district->name ?? '' }},
|
||||
{{ $dokumen->pemilik->city->name ?? '' }},
|
||||
{{ $dokumen->pemilik->province->name ?? '' }} -
|
||||
{{ $dokumen->pemilik->village->postal_code ?? '' }}
|
||||
{{ formatAlamat($dokumen) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -262,7 +262,16 @@
|
||||
<label class="form-label max-w-56 font-bold">
|
||||
{{ $n + 1 }}. {{ $detail->jenisLegalitasJaminan->name }}
|
||||
</label>
|
||||
<input type="hidden" name="jenis_legalitas_jaminan_id[]" value=" {{ $detail->jenis_legalitas_jaminan_id }}">
|
||||
<input type="hidden" name="jenis_legalitas_jaminan_id[]" value="{{ $detail->jenis_legalitas_jaminan_id }}">
|
||||
<button type="button" class="btn btn-danger btn-sm" onclick="clearDetail({{ $detail->id }})">
|
||||
<i class="ki-duotone ki-trash-square fs-2">
|
||||
<span class="path1"></span>
|
||||
<span class="path2"></span>
|
||||
<span class="path3"></span>
|
||||
<span class="path4"></span>
|
||||
</i>
|
||||
Reset
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
@@ -713,5 +722,75 @@
|
||||
return `<input class="input" type="text" name="custom_field[${itemId}][${fieldName}]" value="${value}">`;
|
||||
}
|
||||
}
|
||||
|
||||
function clearDetail(detailId) {
|
||||
Swal.fire({
|
||||
title: 'Apakah Anda yakin?',
|
||||
text: "Anda akan menghapus detail ini!",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Ya, yakin!',
|
||||
cancelButtonText: 'Batal'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
Swal.fire({
|
||||
title: 'Apakah Anda yakin?',
|
||||
text: "Data yang telah di hapus tidak dapat di kembalikan",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Ya, hapus!',
|
||||
cancelButtonText: 'Batal'
|
||||
}).then((result2) => {
|
||||
if (result2.isConfirmed) {
|
||||
// Hapus input fields
|
||||
$(`input[name="detail_dokumen_jaminan_id[]"][value="${detailId}"]`).closest('.grid.gap-5').remove();
|
||||
|
||||
// Kirim request AJAX untuk menghapus data dari database
|
||||
$.ajax({
|
||||
url: '{{ route("debitur.jaminan.clearDetail", $debitur->id ) }}',
|
||||
type: 'POST',
|
||||
data: {
|
||||
_token: '{{ csrf_token() }}',
|
||||
detail_id: detailId
|
||||
},
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
Swal.fire({
|
||||
title: 'Berhasil!',
|
||||
text: 'Detail berhasil dihapus',
|
||||
icon: 'success',
|
||||
confirmButtonText: 'OK'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: 'Gagal!',
|
||||
text: 'Detail gagal dihapus',
|
||||
icon: 'error',
|
||||
confirmButtonText: 'OK'
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
Swal.fire({
|
||||
title: 'Gagal!',
|
||||
text: 'Terjadi kesalahan saat menghapus detail',
|
||||
icon: 'error',
|
||||
confirmButtonText: 'OK'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
@endphp
|
||||
@section('content')
|
||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||
<div class="card border border-agi-100 pb-2.5">
|
||||
@php
|
||||
$buttonProses='';
|
||||
$buttonProses='<a href="'. route('otorisasitender.penawaran.edit', $id) .'" class="btn btn-xs btn-primary" title="Otorisasi Penawaran"><i class="ki-outline ki-arrow-circle-right"></i> Otorisasi Penawaran</a>';
|
||||
@@ -22,7 +21,6 @@
|
||||
])
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
<a href="/tender/penawaran/${nomor_registrasi}/edit" class="btn btn-sm btn-icon btn-clear btn-info" title="Penawaran">
|
||||
<i class="ki-outline ki-arrow-circle-right"></i>
|
||||
</a>
|
||||
<a href="/tender/penawaran/${nomor_registrasi}/showKirimEmail" class="btn btn-sm btn-icon btn-clear btn-success" title="Kirim Email">
|
||||
<a href="/tender/penawaran/${nomor_registrasi}/showKirimEmail" class="btn btn-sm btn-icon btn-clear btn-success hidden" title="Kirim Email">
|
||||
<i class="ki-filled ki-paper-plane"></i>
|
||||
</a>
|
||||
`;
|
||||
|
||||
@@ -72,15 +72,7 @@
|
||||
<em id="{{$route[0]}}_catatan_msg" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="{{ $route[0] }}_div_sla" class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
SLA (dalam satuan hari)
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="inputku input" name="{{$route[0]}}_sla" id="{{$route[0]}}_sla" placeholder="dalam satuan hari" type="text" />
|
||||
<em id="{{$route[0]}}_sla_msg" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="{{ $route[0] }}_div_region" class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Region
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@push('scripts')
|
||||
@include('lpj::assetsku.includenya')
|
||||
<script type="module">
|
||||
|
||||
<script type="module">
|
||||
|
||||
$(document).ready(function() {
|
||||
prepareForm();
|
||||
});
|
||||
@@ -13,7 +13,6 @@
|
||||
$("#{{ $route[0] }}_div_jenis_pilihan").show();
|
||||
$("#{{ $route[0] }}_div_catatan").hide();
|
||||
$("#{{ $route[0] }}_div_region").hide();
|
||||
$("#{{ $route[0] }}_div_sla").hide();
|
||||
$("#{{ $route[0] }}_div_catatan2").show();
|
||||
// prepare data
|
||||
setData();
|
||||
@@ -40,7 +39,7 @@
|
||||
// }
|
||||
},
|
||||
success: function(response) {
|
||||
|
||||
|
||||
if ('success' == response.status)
|
||||
{
|
||||
$("#textReg").text(response.datas.nomor_registrasi);
|
||||
@@ -50,7 +49,7 @@
|
||||
// success
|
||||
// var message = response.message;
|
||||
// toastrku("success", message);
|
||||
|
||||
|
||||
}
|
||||
else if('error' == response.status)
|
||||
{
|
||||
@@ -96,7 +95,7 @@
|
||||
$("#{{ $route[0] }}_div_jenis_pilihan").show();
|
||||
$("#{{ $route[0] }}_catatan").val('');
|
||||
$("#{{ $route[0] }}_div_catatan").hide();
|
||||
|
||||
|
||||
$("#{{ $route[0] }}_div_catatan2").show();
|
||||
}
|
||||
else
|
||||
@@ -105,7 +104,6 @@
|
||||
$("#{{ $route[0] }}_div_jenis_pilihan").hide();
|
||||
$("#{{ $route[0] }}_div_catatan").show();
|
||||
$("#{{ $route[0] }}_div_catatan2").hide();
|
||||
$("#{{ $route[0] }}_div_sla").hide();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -122,7 +120,6 @@
|
||||
let region = $("#{{$route[0]}}_region").val();
|
||||
let catatan = $("#{{$route[0]}}_catatan").val();
|
||||
let catatan2 = $("#{{$route[0]}}_catatan2").val();
|
||||
let sla = $("#{{$route[0]}}_sla").val();
|
||||
|
||||
if(jenis_penilaian==0)
|
||||
jenis_penilaian='';
|
||||
@@ -138,7 +135,6 @@
|
||||
input_data.region= region;
|
||||
input_data.catatan = catatan;
|
||||
input_data.catatan2 = catatan2;
|
||||
input_data.sla = sla;
|
||||
|
||||
let useURL= '{{ route($route[0].'.update', $id) }}';
|
||||
$.ajax({
|
||||
@@ -169,11 +165,7 @@
|
||||
$("#{{$route[0]}}_region").addClass(" border-danger");
|
||||
$("#{{$route[0]}}_region_msg").text(value);
|
||||
}
|
||||
|
||||
if ("sla" === index) {
|
||||
$("#{{$route[0]}}_sla").addClass(" border-danger");
|
||||
$("#{{$route[0]}}_sla_msg").text(value);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
else
|
||||
@@ -182,7 +174,7 @@
|
||||
var message = response.message;
|
||||
toastrku("success", message);
|
||||
|
||||
setTimeout(function () {
|
||||
setTimeout(function () {
|
||||
var url = "{{ route('registrasi.index') }}";
|
||||
$(location).attr('href',url);
|
||||
// window.location.href = "https://www.newurl.com";
|
||||
@@ -214,18 +206,15 @@
|
||||
{
|
||||
// INTERNAL, show region
|
||||
$("#{{ $route[0] }}_div_region").show();
|
||||
$("#{{ $route[0] }}_div_sla").hide();
|
||||
}
|
||||
else if('2' == idNya)
|
||||
{
|
||||
$("#{{ $route[0] }}_div_sla").show();
|
||||
$("#{{ $route[0] }}_div_region").hide();
|
||||
}
|
||||
else if('0' == idNya)
|
||||
{
|
||||
// selain INTERNAL, hide region
|
||||
$("#{{ $route[0] }}_div_region").hide();
|
||||
$("#{{ $route[0] }}_div_sla").hide();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -68,16 +68,7 @@
|
||||
<em id="{{ $route[0] }}_catatan_msg" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="{{ $route[0] }}_div_sla" class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
SLA (dalam satuan hari)
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="inputku input" name="{{ $route[0] }}_sla" id="{{ $route[0] }}_sla"
|
||||
placeholder="dalam satuan hari" type="text" />
|
||||
<em id="{{ $route[0] }}_sla_msg" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="{{ $route[0] }}_div_region"
|
||||
class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
|
||||
@@ -207,9 +207,13 @@
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Alamat</label>
|
||||
<div class="w-full">
|
||||
|
||||
@foreach ($permohonan->documents as $dokumen)
|
||||
@php
|
||||
$alamat = $dokumen;
|
||||
@endphp
|
||||
@endforeach
|
||||
<span class="text-2sm text-gray-700">
|
||||
{{ formatAlamat($permohonan->debiture) }}
|
||||
{{ formatAlamat($dokumen) }}
|
||||
</span>
|
||||
|
||||
|
||||
@@ -481,43 +485,43 @@
|
||||
<label for="address" class="form-label max-w-56">Terletak di.</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="address" name="address" class="input w-full "
|
||||
value="{{ isset($permohonan->debiture->address) ? $permohonan->debiture->address : old('address') }}">
|
||||
value="{{ isset($alamat->address) ? $alamat->address : old('address') }}">
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="province_code"
|
||||
value="{{ isset($permohonan->debiture->province) ? $permohonan->debiture->province->code : '' }}">
|
||||
value="{{ isset($alamat->province) ? $alamat->province->code : '' }}">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="province" class="form-label max-w-56">Provinsi</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="province" class="input w-full cursor-not-allowed" readonly
|
||||
value="{{ isset($permohonan->debiture->province) ? $permohonan->debiture->province->name : '' }}">
|
||||
value="{{ isset($alamat->province) ? $alamat->province->name : '' }}">
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="city_code"
|
||||
value="{{ isset($permohonan->debiture->city) ? $permohonan->debiture->city->code : '' }}">
|
||||
value="{{ isset($alamat->city) ? $alamat->city->code : '' }}">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="city" class="form-label max-w-56">Kabupaten/Kota</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="city" class="input w-full cursor-not-allowed" readonly
|
||||
value="{{ isset($permohonan->debiture->city) ? $permohonan->debiture->city->name : '' }}">
|
||||
value="{{ isset($alamat->city) ? $alamat->city->name : '' }}">
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="district_code"
|
||||
value="{{ isset($permohonan->debiture->district) ? $permohonan->debiture->district->code : '' }}">
|
||||
value="{{ isset($alamat->district) ? $alamat->district->code : '' }}">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="district" class="form-label max-w-56">Kecamatan</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="district" class="input w-full cursor-not-allowed" readonly
|
||||
value="{{ isset($permohonan->debiture->district) ? $permohonan->debiture->district->name : '' }}">
|
||||
value="{{ isset($alamat->district) ? $alamat->district->name : '' }}">
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="village_code"
|
||||
value="{{ isset($permohonan->debiture->village) ? $permohonan->debiture->village->code : '' }}">
|
||||
value="{{ isset($alamat->village) ? $alamat->village->code : '' }}">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="village" class="form-label max-w-56">Desa/Kelurahan</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="village" class="input w-full cursor-not-allowed" readonly
|
||||
value="{{ isset($permohonan->debiture->village) ? $permohonan->debiture->village->name : '' }}">
|
||||
value="{{ isset($alamat->village) ? $alamat->village->name : '' }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user