@@ -219,31 +308,31 @@ export default {
"login_issue": {
"text": "Login Issues",
"answers": [
- { "text": "Need TAC", "next": "Need TAC" },
- { "text": "Wrong login details", "next": "Wrong login details" },
- { "text": "Others", "next": "Others" },
- { "text": "Order Cancelled", "next": "Order Cancelled" }
+ { "text": "Need TAC", "next": "Need Tac" },
+ { "text": "Wrong login details", "next": "Wrong Login Details" },
+ { "text": "Others", "next": "1688_issue_others" },
+ { "text": "Order Cancelled", "next": "refund_request" }
]
},
"login_successful": {
"load_api": 'fetch_model_attributes',
"answers": [
- { "text": "Can't verify order?", "next": "issue_order" },
+ { "text": "Can't verify order?", "next": "1688_issue_order" },
{ "text": "Order Verified", "next": "order_verify" },
]
},
- "issue_order": {
+ "1688_issue_order": {
"answers": [
- { "text": "Amount not found", "next": "issue_submit" },
- { "text": "Plus Member", "next": "issue_submit" },
- { "text": "Others", "next": "po_others" },
- { "text": "Customer Did not verify 1688 account", "next": "issue_submit" },
- { "text": "WorldFirst account linked another account", "next": "issue_submit" },
+ { "text": "Amount not found", "next": "1688_issue_submit" },
+ { "text": "Plus Member", "next": "1688_issue_submit" },
+ { "text": "Others", "next": "1688_issue_others" },
+ { "text": "Customer Did not verify 1688 account", "next": "1688_issue_submit" },
+ { "text": "WorldFirst account linked another account", "next": "1688_issue_submit" },
]
},
"order_verify": {
// fetch order amount
- "load_api": this.route("api.admin_work_flow.fetch_model_attributes"),
+ "load_api": 'fetch_model_attributes',
"answers": [
{ "text": "Yes", "next": "order_verification" }
]
@@ -251,8 +340,8 @@ export default {
"order_verification": {
"text": "Are You Sure this is the correct amount?",
"answers": [
- { "text": "Yes", "next": "proceed_order" },
- { "text": "No", "next": "insufficient_order" }
+ { "text": "No", "next": "insufficient_order" },
+ { "text": "Yes", "next": "proceed_order" }
]
},
"proceed_order": {
@@ -264,15 +353,25 @@ export default {
},
"1688_order_issue": {
"answers": [
- { "text": "Wrong Pin Number", "next": "1688_issue_submit" },
- { "text": "Not Enough Stock", "next": "1688_issue_submit" },
- { "text": "Others", "next": "1688_others" },
- { "text": "No CrossBoarder", "next": "1688_issue_submit" },
- { "text": "AngPau", "next": "1688_issue_submit" }
+ { "text": "Wrong Pin Number", "next": "Wrong Pin Number" },
+ { "text": "Not Enough Stock", "next": "Not Enough Stock" },
+ { "text": "Others", "next": "1688_issue_others" },
+ { "text": "No CrossBoarder", "next": "No CrossBoarder" },
+ { "text": "AngPau", "next": "AngPau" }
+ ]
+ },
+ "1688_issue_others": {
+ "text": "Others",
+ "answers": [
+ { "text": "Submit Issue", "next": "1688_issue_submit"}
+ ]
+ },
+ "1688_submit": {
+ "answers": [
+ { "text": "Stop Working", "next": "stop_working"},
+ { "text": "Proceed to next order", "next": "1688"}
]
},
- "1688_others": {},
- "1688_submit": {},
"1688_issue_submit": {
"text": "Issue has been submitted",
"answers": [
@@ -284,7 +383,7 @@ export default {
"text": "Refund Request sent",
"answers": [
{ "text": "Stop Working", "next": "stop_working" },
- { "text": "Next PO", "next": "approve_po" }
+ { "text": "Next PO", "next": "1688" }
]
},
"approve_po": {
@@ -343,13 +442,6 @@ export default {
{ "text": "Next Order", "next": "approve_po" }
]
},
- "1688_issue_submitted": {
- "text": "Issue has been submitted",
- "answers": [
- { "text": "Stop Working", "next": "stop_working" },
- { "text": "Next Order", "next": "1688" }
- ]
- },
"stop_working": {
"text": "Thank you for your work!",
"answers": [
@@ -403,16 +495,32 @@ export default {
endWork() { this.stopTimer(); console.log("work is ended"); },
selectAnswer(nextQuestionId, goBack = false) {
if (nextQuestionId === 'refresh_page') return window.location.reload();
- if (this.currentQuestionId === 'login_issue') {
+ if (this.currentQuestionId === 'login_issue' || this.currentQuestionId === '1688_order_issue') {
+ if (nextQuestionId === 'refund_request') {
+ this.callApi(this.route('api.admin_work_flow.create_1688_login_issue_remark'), 'post', 'section', {
+ 'booking_id': this.currentOrder.booking_id,
+ 'remark': nextQuestionId,
+ 'user_id': this.$store.getters.getUserId,
+ }, false, false);
+ nextQuestionId = 'refund_request';
- this.callApi(this.route('api.admin_work_flow.create_1688_login_issue_remark'), 'post', 'section', {
- 'booking_id': this.currentOrder.booking_id,
- 'remark': nextQuestionId,
- 'user_id': this.$store.getters.getUserId,
- }, false, false);
+ } else if(nextQuestionId === '1688_issue_others') {
+ this.callApi(this.route('api.admin_work_flow.create_1688_login_issue_remark'), 'post', 'section', {
+ 'booking_id': this.currentOrder.booking_id,
+ 'remark': nextQuestionId,
+ 'user_id': this.$store.getters.getUserId,
+ }, false, false);
+ nextQuestionId = '1688_issue_others';
- nextQuestionId = 'issue_submit'
- }
+ } else {
+ this.callApi(this.route('api.admin_work_flow.create_1688_login_issue_remark'), 'post', 'section', {
+ 'booking_id': this.currentOrder.booking_id,
+ 'remark': nextQuestionId,
+ 'user_id': this.$store.getters.getUserId,
+ }, false, false);
+ nextQuestionId = '1688_issue_submit';
+ }
+ }
if (!Object.keys(this.questions[nextQuestionId]).length) this.endWork();
if (nextQuestionId === 'start_work') this.startWork();
if (nextQuestionId === 'stop_working') this.stopTimer();