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
- Tersisa {{ 255 - payload.description.length }} karakter + Tersisa {{ 255 - instructionNote.length }} karakter
@@ -293,6 +279,7 @@ export default { }, icon: {}, typeAduan, + instructionNote: '', } }, async fetch() { @@ -354,6 +341,10 @@ export default { if (this.payload.coverage_of_affairs) { this.$fetch() } + if (this.payload.description) { + this.descriptionLength = + this.descriptionLength - this.payload.description.length + } }, }, methods: { @@ -398,6 +389,7 @@ export default { coverage_of_affairs: '', opd_pemprov_id: '', } + this.instructionNote = '' this.$store.commit('create-ikp/setIsTruncate', false) this.$refs.form.reset() }, @@ -422,10 +414,11 @@ export default { this.isShowPopupConfirmation = false this.isShowPopupLoading = true try { - this.payload.deadline_at = formatDate( - this.payload.deadline_at, - 'yyyy-MM-dd' - ) + this.payload = { + ...this.payload, + deadline_at: formatDate(this.payload.deadline_at, 'yyyy-MM-dd'), + description: this.instructionNote, + } const response = await this.$axios.post('/warga/ikp', { ...this.payload, user_id: this.$auth?.user?.identifier, diff --git a/components/Aduan/Dialog/FollowupComplaint/index.vue b/components/Aduan/Dialog/FollowupComplaint/index.vue index f2972e3a..9c4f829c 100644 --- a/components/Aduan/Dialog/FollowupComplaint/index.vue +++ b/components/Aduan/Dialog/FollowupComplaint/index.vue @@ -311,25 +311,27 @@ export default { this.isShowPopupIkpNarrative = true }, showPopupCreateIkp() { + const { + opd_name: opdName, + deadline_date: deadlineDate, + coverage_of_affairs: coverageOfAffairs, + } = this.dataDialog.dataComplaint if ( this.complaintType === typeAduan.instruksiKewenanganNonPemprov.props ) { - const { - coverage_of_affairs: coverageOfAffairs, - opd_name: opdName, - deadline_date: deadlineDate, - opd_pemprov_id: opdPemprovId, - } = this.dataDialog.dataComplaint - this.$store.commit('create-ikp/setPayload', { ...this.payload, - coverage_of_affairs: coverageOfAffairs, - opd_name: opdName, - deadline_at: deadlineDate, - opd_pemprov_id: opdPemprovId, + opd_pemprov_id: this.dataDialog.dataComplaint.opd_pemprov_id, }) } + this.$store.commit('create-ikp/setPayload', { + ...this.payload, + opd_name: opdName, + deadline_at: deadlineDate, + coverage_of_affairs: coverageOfAffairs, + }) + this.$store.commit('followup-complaint/setIsShowPopup', false) this.$store.commit( 'create-ikp/setIkpNarrative', diff --git a/components/Aduan/DialogViewImage/index.vue b/components/Aduan/DialogViewImage/index.vue index 06fc9a59..432691d4 100644 --- a/components/Aduan/DialogViewImage/index.vue +++ b/components/Aduan/DialogViewImage/index.vue @@ -32,7 +32,7 @@ alt="photo" class="h-full w-full rounded-[4px]" :class="{ 'opacity-20': index !== swiperRef?.activeIndex }" - > + />