mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-22 22:13:59 +00:00
Finish 1688 Front end workflow, added if else condition for unqiue issues for login, issues and others
This commit is contained in:
+147
-39
@@ -76,8 +76,7 @@
|
||||
{{ externalApiResponse.data.booking.marking }}
|
||||
</a>
|
||||
</h3>
|
||||
<div v-if="externalApiResponse.data"
|
||||
class="row bg-master-light m-t-15 m-b-15 rounded padding-30 justify-content-center">
|
||||
<div v-if="externalApiResponse.data" class="row bg-master-light m-t-15 m-b-15 rounded padding-30 justify-content-center">
|
||||
<div class="col-auto text-left">
|
||||
<h3>
|
||||
<span class="bold d-inline-block m-r-15">ORDER Reference(s): </span>
|
||||
@@ -97,6 +96,71 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="currentQuestionId === 'order_verify'">
|
||||
<h3>
|
||||
<span class="bold d-inline-block m-r-15">ORDER Marking: </span>
|
||||
<a :href="route('booking.details', externalApiResponse.data.booking.marking)"
|
||||
target="_blank">
|
||||
{{ externalApiResponse.data.booking.marking }}
|
||||
</a>
|
||||
</h3>
|
||||
<div v-if="externalApiResponse.data" class="row bg-master-light m-t-15 m-b-15 rounded padding-30 justify-content-center">
|
||||
<div class="col-auto text-left">
|
||||
<h3>
|
||||
<span class="bold d-inline-block m-r-15">ORDER Reference(s): </span>
|
||||
</h3>
|
||||
<div v-for="(attribute, index) in externalApiResponse.data.booking_attributes"
|
||||
:key="index">
|
||||
<h2>
|
||||
{{ index + 1 + '. #' + attribute.value }}
|
||||
</h2>
|
||||
</div>
|
||||
<div class="col-auto text-center">
|
||||
<h4>
|
||||
Total CNY: <!-- {{ attribute.cost }} -->
|
||||
</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="row bg-danger-light m-t-15 m-b-15 rounded padding-30">
|
||||
<div class="col">
|
||||
<h1 class="text-white">Api Failed. Please contact Tech Support</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="currentQuestionId === '1688_submit'">
|
||||
<div v-if="externalApiResponse.data" class="row">
|
||||
<div class="col">
|
||||
<div class="row b-a b-primary padding-30 bg-white m-t-25">
|
||||
<div class="col">
|
||||
<h2>
|
||||
Upload the English PO
|
||||
</h2>
|
||||
<file-upload-component :data="externalApiResponse.data" section="section"></file-upload-component>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h2>
|
||||
Upload the China PO
|
||||
</h2>
|
||||
<file-upload-component :data="externalApiResponse.data" section="section"></file-upload-component>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h2>
|
||||
Upload Bank Slip
|
||||
</h2>
|
||||
<file-upload-component :data="externalApiResponse.data" section="section"></file-upload-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="row bg-danger-light m-t-15 m-b-15 rounded padding-30">
|
||||
<div class="col">
|
||||
<h1 class="text-white">Api Failed. Please contact Tech Support</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="currentQuestionId === 'approve_po'">
|
||||
<div v-if="externalApiResponse.data" class="row">
|
||||
<div class="col">
|
||||
@@ -143,6 +207,31 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="currentQuestionId === '1688_issue_others'">
|
||||
<div v-if="externalApiResponse.data" class="row">
|
||||
<div class="col">
|
||||
<div class="row b-a b-primary padding-30 bg-white m-t-25">
|
||||
<div class="col">
|
||||
<h2>
|
||||
What issues did you encounter?
|
||||
</h2>
|
||||
<div class="m-t-25">
|
||||
<remark-comment-form-component></remark-comment-form-component>
|
||||
</div>
|
||||
<div class="m-t-25">
|
||||
<file-upload-component :data="externalApiResponse.data" section="section"></file-upload-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="row bg-danger-light m-t-15 m-b-15 rounded padding-30">
|
||||
<div class="col">
|
||||
<h1 class="text-white">Api Failed. Please contact Tech Support</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" v-if="currentQuestion.answers">
|
||||
<div class="col">
|
||||
<div class="w-100 d-block text-center">
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user