update
parent
c599242bc8
commit
c2a902bd52
|
|
@ -88,24 +88,6 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="form-group mt-4">
|
|
||||||
<label class="label-title bold" for="jenis_aksi">
|
|
||||||
Jenis Aksi
|
|
||||||
</label>
|
|
||||||
<select class="form-control select-button select2" name="jenis_aksi" id="jenisaksi-dropdown" data-placeholder="Pilih Jenis Aksi">
|
|
||||||
<option value="">Pilih Jenis Aksi</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group mt-4">
|
|
||||||
<label class="label-title bold" for="aksi">
|
|
||||||
Aksi
|
|
||||||
</label>
|
|
||||||
<select class="form-control select-button select2" name="aksi" id="aksi-dropdown" data-placeholder="Pilih Jenis Aksi">
|
|
||||||
<option value="">Pilih Aksi</option>
|
|
||||||
</select>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<div class="form-group mt-4">
|
<div class="form-group mt-4">
|
||||||
<label class="label-title bold" for="pelaksana_kegiatan">
|
<label class="label-title bold" for="pelaksana_kegiatan">
|
||||||
Pelaksana Kegiatan
|
Pelaksana Kegiatan
|
||||||
|
|
@ -445,33 +427,6 @@
|
||||||
.catch(() => alert('gagal memuat data Kategori Aksi'));
|
.catch(() => alert('gagal memuat data Kategori Aksi'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// function loadJenisAksi(sector, subSector, kategori, selectedValue = null) {
|
|
||||||
// return $.get(base_url+'/adaptasi/form-adaptasi-jenisaksi-dropdown', { sub_sector: subSector, sector: sector, kategori: kategori })
|
|
||||||
// .then(data => {
|
|
||||||
// const $dropdown = $('#jenisaksi-dropdown').empty();
|
|
||||||
// $dropdown.append('<option value="">Pilih Jenis Aksi</option>');
|
|
||||||
// data.forEach(item => {
|
|
||||||
// const selected = item === selectedValue ? 'selected' : '';
|
|
||||||
// $dropdown.append(`<option value="${item}" ${selected}>${item}</option>`);
|
|
||||||
// });
|
|
||||||
// })
|
|
||||||
// .catch(() => alert('gagal memuat data Jenis Aksi'));
|
|
||||||
// }
|
|
||||||
|
|
||||||
// function loadAksi(sector, subSector, kategori, jenis, selectedValue = null) {
|
|
||||||
// return $.get(base_url+'/adaptasi/form-adaptasi-aksi-dropdown', { sub_sector: subSector, sector: sector, kategori: kategori, jenis: jenis })
|
|
||||||
// .then(data => {
|
|
||||||
// const $dropdown = $('#aksi-dropdown').empty();
|
|
||||||
// $dropdown.append('<option value="">Pilih Aksi</option>');
|
|
||||||
// data.forEach(item => {
|
|
||||||
// const selected = item.aksi === selectedValue ? 'selected' : '';
|
|
||||||
// $dropdown.append(`<option value="${item.aksi}" data-id="${item.id}" ${selected}>${item.aksi}</option>`);
|
|
||||||
// });
|
|
||||||
// })
|
|
||||||
// .catch(() => alert('gagal memuat data Aksi'));
|
|
||||||
// }
|
|
||||||
|
|
||||||
$(document).ready(async function() {
|
$(document).ready(async function() {
|
||||||
let adaptationId;
|
let adaptationId;
|
||||||
attachNumberFormatting('#alokasi_apbn');
|
attachNumberFormatting('#alokasi_apbn');
|
||||||
|
|
@ -510,11 +465,6 @@
|
||||||
await loadKategoriAksi(sessionSektor, sessionSubSektor, sessionKategori);
|
await loadKategoriAksi(sessionSektor, sessionSubSektor, sessionKategori);
|
||||||
if(sessionKategori) {
|
if(sessionKategori) {
|
||||||
$('#kategoriaksi-dropdown').val(sessionKategori).trigger('change');
|
$('#kategoriaksi-dropdown').val(sessionKategori).trigger('change');
|
||||||
// await loadJenisAksi(sessionSektor, sessionSubSektor, sessionKategori, sessionJenis);
|
|
||||||
// if(sessionJenis) {
|
|
||||||
// $('#jenisaksi-dropdown').val(sessionJenis).trigger('change');
|
|
||||||
// await loadAksi(sessionSektor, sessionSubSektor, sessionKategori, sessionJenis, sessionAksi);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -555,21 +505,6 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// $('#jenisaksi-dropdown').on('change', async function() {
|
|
||||||
// jenis = $(this).val();
|
|
||||||
// if(jenis) {
|
|
||||||
// await loadAksi(sector, subSector, kategori, jenis);
|
|
||||||
// } else {
|
|
||||||
// $('#aksi-dropdown').empty().append('<option value="">Pilih Aksi</option>');
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
// $('#aksi-dropdown').on('change', async function() {
|
|
||||||
// let selectedOption = $(this).find(':selected');
|
|
||||||
// let adaptation_id = selectedOption.data('id');
|
|
||||||
// adaptationId = adaptation_id;
|
|
||||||
// });
|
|
||||||
|
|
||||||
// Form validation & accordion auto-open on invalid input
|
// Form validation & accordion auto-open on invalid input
|
||||||
$('form').on('submit', function(e) {
|
$('form').on('submit', function(e) {
|
||||||
if(!this.checkValidity()){
|
if(!this.checkValidity()){
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,6 @@
|
||||||
<script>
|
<script>
|
||||||
var activitiesTable = null;
|
var activitiesTable = null;
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
// Initialize Select2 for year and unit code dropdowns
|
|
||||||
$('#inventoryYear').select2({
|
$('#inventoryYear').select2({
|
||||||
placeholder: 'Pilih Tahun',
|
placeholder: 'Pilih Tahun',
|
||||||
}).on('change', function() {
|
}).on('change', function() {
|
||||||
|
|
@ -75,7 +74,6 @@
|
||||||
placeholder: 'Pilih Unit',
|
placeholder: 'Pilih Unit',
|
||||||
});
|
});
|
||||||
|
|
||||||
// Handle metadata form submission via AJAX
|
|
||||||
$('#metadataForm').on('submit', function(e) {
|
$('#metadataForm').on('submit', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var formData = new FormData(this);
|
var formData = new FormData(this);
|
||||||
|
|
@ -131,7 +129,6 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Event listener for unit code change
|
|
||||||
$('.unit-code').on('change', function() {
|
$('.unit-code').on('change', function() {
|
||||||
var activityCode = $(this).data('activity-code');
|
var activityCode = $(this).data('activity-code');
|
||||||
var fromUnitCode = $(this).data('current-unit');
|
var fromUnitCode = $(this).data('current-unit');
|
||||||
|
|
@ -162,7 +159,6 @@
|
||||||
.then(data => {
|
.then(data => {
|
||||||
if (data.success) {
|
if (data.success) {
|
||||||
input.val(data.convertedValue);
|
input.val(data.convertedValue);
|
||||||
// numberFormat(input);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => console.error('Error converting value:', error));
|
.catch(error => console.error('Error converting value:', error));
|
||||||
|
|
@ -279,7 +275,6 @@
|
||||||
storage_path: storagePath
|
storage_path: storagePath
|
||||||
},
|
},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
// Swal.fire('Deleted!', 'Data berhasil dihapus.', 'success');
|
|
||||||
$('#metadata-' + metadataId).slideUp(500, function() {
|
$('#metadata-' + metadataId).slideUp(500, function() {
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
reorderMetadata();
|
reorderMetadata();
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
{{ $detail->activity ? $detail->activity->name : 'N/A' }} - ({{ $detail->unit_code }})
|
{{ $detail->activity ? $detail->activity->name : 'N/A' }} - ({{ $detail->unit_code }})
|
||||||
|
|
||||||
@if ($unitCategory)
|
@if ($unitCategory)
|
||||||
{{-- <select name="unit_code[{{ $detail->activity_code }}]" class="form-control unit-code"
|
<select name="unit_code[{{ $detail->activity_code }}]" class="form-control unit-code"
|
||||||
data-activity-code="{{ $detail->activity_code }}"
|
data-activity-code="{{ $detail->activity_code }}"
|
||||||
data-current-unit="{{ $unitCode }}">
|
data-current-unit="{{ $unitCode }}">
|
||||||
@foreach ($unitsByCategory[$unitCategory] as $unit)
|
@foreach ($unitsByCategory[$unitCategory] as $unit)
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
{{ $unit->code }}
|
{{ $unit->code }}
|
||||||
</option>
|
</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select> --}}
|
</select>
|
||||||
@else
|
@else
|
||||||
{{ $unitCode }}
|
{{ $unitCode }}
|
||||||
@endif
|
@endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue