diff --git a/components/Aduan/DaftarIKP/TableDetail/index.vue b/components/Aduan/DaftarIKP/TableDetail/index.vue index 055cf455..81d99252 100644 --- a/components/Aduan/DaftarIKP/TableDetail/index.vue +++ b/components/Aduan/DaftarIKP/TableDetail/index.vue @@ -4,31 +4,29 @@ Detail Instruksi Aduan
- - + + - Narasi Instruksi - - - - - - Jumlah Aduan - - {{ dataDetail?.complaints_count }} - - - - Status + {{ field.name }} - + +
- - - - Keterangan + + {{ formatDate(dataDetail[field.key] || '') || '-' }} - {{ dataDetail?.description || '-' }} + {{ dataDetail[field.key] || '' || '-' }} -
- - - - - Tanggal Dibuat - - {{ dataDetail?.created_at || '-' }} - - - - Tanggal Deadline - - {{ dataDetail?.deadline_at || '-' }} - - - - - - - Indikator Nilai - - {{ dataDetail?.indicator_value || '-' }} - - - - Indikator Satuan - - {{ dataDetail?.indicator_unit || '-' }} - - - - - - - Cakupan urusan - - {{ dataDetail?.scope_of_affairs || '-' }} - - - - Instansi Penanggung Jawab - - {{ dataDetail?.responsible_agency || '-' }} - - - - OPD Pemprov Penanggung Jawab - - {{ dataDetail?.responsible_provincial_government_opd || '-' }} - - -
- - - - + + + + +
diff --git a/components/Aduan/Detail/Table/Complaint/index.vue b/components/Aduan/Detail/Table/Complaint/index.vue index e15afccf..2fe3f11d 100644 --- a/components/Aduan/Detail/Table/Complaint/index.vue +++ b/components/Aduan/Detail/Table/Complaint/index.vue @@ -271,7 +271,7 @@ {{ detailComplaint?.description || '-' }} - Lokasi Kejadian + Lokasi Kejadian Kabupaten / Kota @@ -575,6 +575,7 @@ export default { switch (this.typeAduanPage) { case this.typeAduan.aduanDialihkanSpanLapor.props: case this.typeAduan.instruksiKewenanganNonPemprov.props: + case this.typeAduan.instruksiNonPemprov.props: return true case this.typeAduan.penentuanKewenangan.props: { diff --git a/components/Aduan/Dialog/CreateIkp/index.vue b/components/Aduan/Dialog/CreateIkp/index.vue index 1403a02e..8a26182d 100644 --- a/components/Aduan/Dialog/CreateIkp/index.vue +++ b/components/Aduan/Dialog/CreateIkp/index.vue @@ -33,10 +33,7 @@ placeholder="Pilih Cakupan Urusan" :options="listAuthority" :error-message="errors[0]" - :disabled=" - complaintType === - typeAduan.instruksiKewenanganNonPemprov.props - " + disabled /> @@ -73,10 +67,7 @@ placeholder="Pilih OPD Pemprov Penanggungjawab" helper-text="OPD Pemprov penanggungjawab bertugas untuk memeriksa tindaklanjut aduan di kota/kabupaten atau kementerian/lembaga." :error-message="errors[0]" - :disabled=" - complaintType === - typeAduan.instruksiKewenanganNonPemprov.props - " + disabled :options="listGovResponsible" /> @@ -98,6 +89,7 @@ placeholder="Pilih Perangkat Daerah" :options="listDisposition" :error-message="errors[0]" + disabled />
@@ -136,15 +128,9 @@ placeholder="Pilih Tanggal Deadline" :class="{ 'mx-datepicker--error': errors[0], - 'mx-datepicker--disabled': - complaintType === - typeAduan.instruksiKewenanganNonPemprov.props, }" - class="!w-full disabled:!bg-green-500" - :disabled=" - complaintType === - typeAduan.instruksiKewenanganNonPemprov.props - " + class="mx-datepicker--disabled !w-full" + disabled > @@ -241,6 +247,10 @@ import { typeAduan, complaintSource, } from '~/constant/aduan-masuk' +import { + ENDPOINT_ADUAN, + ENDPOINT_ADUAN_NON_PEMPROV, +} from '~/constant/endpoint-api' import popupAduanMasuk from '~/mixins/popup-aduan-masuk' export default { @@ -360,32 +370,28 @@ export default { }, async fetch() { try { - let apiPath = 'complaints' + const urlApi = + this.typeAduanPage === typeAduan.instruksiKewenanganNonPemprov.props + ? ENDPOINT_ADUAN_NON_PEMPROV + : ENDPOINT_ADUAN if ( !JSON.stringify(Object.keys(this.query)).match('complaint_status_id') ) { this.query = this.addComplaintStatusFilterHandle() } - if ( - this.typeAduanPage === typeAduan.instruksiKewenanganNonPemprov.props - ) { - apiPath = 'non-pemprov-complaints' - } - if (this.typeAduan.aduanDariSpanLapor.props === this.typeAduanPage) { this.setQuery({ complaint_source: 'sp4n' }) } // default sort by updated date - if (this.checkPropsSortByUpdatedDate() && !this.query.sort_by) { - this.setQuery({ sort_by: 'updated_at' }) - } + this.setQuery({ sort_by: 'updated_at' }) // handle list data complaint - const responseListComplaint = await this.$axios.get(`/warga/${apiPath}`, { + const responseListComplaint = await this.$axios.get(urlApi, { params: { ...this.query, is_admin: 1 }, }) + const { data } = responseListComplaint.data this.listDataComplaint = data?.data || [] if (this.listDataComplaint.length) { @@ -578,6 +584,7 @@ export default { complaint_category_id: null, 'complaint_category_id[0]': null, }) + this.query.page = 1 if (value) { this.query['complaint_category_id[0]'] = value } @@ -585,13 +592,11 @@ export default { }, filterNonGovComplaintStatusHandle(value) { this.query.complaint_status_id = null + this.query.page = 1 if (value) { this.query.complaint_status_id = value } this.$fetch() - if (value === '') { - this.query.complaint_status_id = '' - } }, goToPageDetailHandle(item) { this.$router.push({ @@ -816,32 +821,28 @@ export default { } - diff --git a/components/Base/Tab/index.vue b/components/Base/Tab/index.vue index 365673b6..4a8f690b 100644 --- a/components/Base/Tab/index.vue +++ b/components/Base/Tab/index.vue @@ -1,7 +1,13 @@