From ef90e453258d20dbb8f979f08f2554ba610bb82c Mon Sep 17 00:00:00 2001 From: Aqqil Azman Date: Tue, 30 Jul 2024 17:56:38 +0800 Subject: [PATCH] parsing remark component content to remark tabble --- .../AdminWorkFlowSectionComponent.vue | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/resources/assets/vue/components/general/sections/AdminWorkFlowSectionComponent.vue b/resources/assets/vue/components/general/sections/AdminWorkFlowSectionComponent.vue index 677f87fc..2fd622fa 100644 --- a/resources/assets/vue/components/general/sections/AdminWorkFlowSectionComponent.vue +++ b/resources/assets/vue/components/general/sections/AdminWorkFlowSectionComponent.vue @@ -239,7 +239,7 @@ What issues did you encounter?
- +
@@ -523,6 +523,16 @@ export default { stopTimer() { clearInterval(this.timer); this.timer = null; }, startWork() { this.startTimer(); }, endWork() { this.stopTimer(); console.log("work is ended"); }, + handleRemarkSubmitted(remarkContent) { + this.callApi(this.route('api.admin_work_flow.create_issue_remark'), 'post', 'section', { + 'booking_id': this.currentOrder.booking_id, + 'remark': remarkContent, + 'user_id': this.$store.getters.getUserId, + }, false, false); + + alert('Remark has been submitted'); + }, + selectAnswer(nextQuestionId, goBack = false) { if (nextQuestionId === 'refresh_page') return window.location.reload(); if (this.currentQuestionId === 'issue_po') { @@ -547,18 +557,17 @@ export default { if (nextQuestionId === 'refund_request') { this.callApi(this.route('api.admin_work_flow.create_issue_remark'), 'post', 'section', { 'booking_id': this.currentOrder.booking_id, - 'remark': 'Order Cancelled', + 'remark': nextQuestionId, 'user_id': this.$store.getters.getUserId, }, false, false); nextQuestionId = 'refund_request'; } else if(nextQuestionId === '1688_issue_others') { - this.callApi(this.route('api.admin_work_flow.create_issue_remark'), 'post', 'section', { - 'booking_id': this.currentOrder.booking_id, - 'remark': '1688 Others', - 'user_id': this.$store.getters.getUserId, - }, false, false); - nextQuestionId = '1688_issue_others'; + // this.callApi(this.route('api.admin_work_flow.create_issue_remark'), 'post', 'section', { + // 'booking_id': this.currentOrder.booking_id, + // 'remark': nextQuestionId, + // 'user_id': this.$store.getters.getUserId, + // }, false, false); } else { this.callApi(this.route('api.admin_work_flow.create_issue_remark'), 'post', 'section', {