Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented: support to display order details for completed orders(#349) #361

Merged
merged 3 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions src/store/modules/order/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,17 @@
return resp;
},

async getOrderDetail( { dispatch, state }, { payload, orderType } ) {
async getOrderDetail({ dispatch, state }, { payload, orderType }) {
if(orderType === 'open') {
payload['orderStatusId']= "ORDER_APPROVED"
payload['-shipmentStatusId']= "*"
payload['orderStatusId'] = "ORDER_APPROVED"
payload['-shipmentStatusId'] = "*"
payload['-fulfillmentStatus'] = '(Cancelled OR Rejected)'
} else if(orderType === 'packed') {
payload['shipmentStatusId']= "SHIPMENT_PACKED"
payload['shipmentStatusId'] = "SHIPMENT_PACKED"
payload['-fulfillmentStatus'] = '(Cancelled OR Rejected)'
} else if(orderType === 'completed') {
payload['orderItemStatusId'] = "ITEM_COMPLETED"
payload['docType'] = "ORDER"
} else {
dispatch('updateCurrent', { order: {} })
return;
Expand All @@ -129,7 +134,6 @@
const orderQueryPayload = prepareOrderQuery({
...payload,
shipmentMethodTypeId: !store.state.user.preference.showShippingOrders ? 'STOREPICKUP' : '',
'-fulfillmentStatus': '(Cancelled OR Rejected)',
orderTypeId: 'SALES_ORDER'
})

Expand Down Expand Up @@ -408,7 +412,7 @@
return resp;
},

async packDeliveryItems ({ commit }, shipmentId) {

Check warning on line 415 in src/store/modules/order/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (18.x)

'commit' is defined but never used

Check warning on line 415 in src/store/modules/order/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (20.x)

'commit' is defined but never used
const params = {
shipmentId: shipmentId,
statusId: 'SHIPMENT_PACKED'
Expand Down Expand Up @@ -524,7 +528,7 @@
}).catch(err => err);
},

async rejectOrderItems ({ commit }, order) {

Check warning on line 531 in src/store/modules/order/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (18.x)

'commit' is defined but never used

Check warning on line 531 in src/store/modules/order/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (20.x)

'commit' is defined but never used
const payload = {
'orderId': order.orderId
}
Expand Down
2 changes: 1 addition & 1 deletion src/views/Orders.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
</div>
<div v-if="segmentSelected === 'completed'">
<div v-for="(order, index) in getOrdersByPart(completedOrders)" :key="index" v-show="order.parts.length > 0">
<ion-card>
<ion-card button @click.prevent="viewOrder(order, order.part, 'completed')">
<ion-item lines="none">
<ion-label class="ion-text-wrap">
<h1>{{ order.customer.name }}</h1>
Expand Down
Loading