Skip to content

Commit

Permalink
Merge pull request hotwax#361 from ymaheshwari1/hotwax#349
Browse files Browse the repository at this point in the history
Implemented: support to display order details for completed orders(hotwax#349)
  • Loading branch information
ymaheshwari1 authored Jan 10, 2024
2 parents c3350b1 + 7f52286 commit 9e5bff4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
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 @@ const actions: ActionTree<OrderState , RootState> ={
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 actions: ActionTree<OrderState , RootState> ={
const orderQueryPayload = prepareOrderQuery({
...payload,
shipmentMethodTypeId: !store.state.user.preference.showShippingOrders ? 'STOREPICKUP' : '',
'-fulfillmentStatus': '(Cancelled OR Rejected)',
orderTypeId: 'SALES_ORDER'
})

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

0 comments on commit 9e5bff4

Please sign in to comment.