Skip to content

Commit

Permalink
Merge pull request #325 from hotwax/312_order_detail_shipping_info
Browse files Browse the repository at this point in the history
Implemented: Print Picklist PDF from order detail page.
  • Loading branch information
ravilodhi authored Oct 20, 2023
2 parents fda6d49 + 92b8df5 commit 8b6e6a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/store/modules/order/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ const actions: ActionTree<OrderState, RootState> = {
orderName: orderItem.orderName,
groupValue: order.groupValue,
picklistBinId: orderItem.picklistBinId,
picklistId: orderItem.picklistId,
items: order.doclist.docs,
shipmentMethodTypeId: orderItem.shipmentMethodTypeId,
shipmentMethodTypeDesc: orderItem.shipmentMethodTypeDesc,
Expand Down Expand Up @@ -450,6 +451,7 @@ const actions: ActionTree<OrderState, RootState> = {
reservedDatetime: orderItem.reservedDatetime,
groupValue: order.groupValue,
picklistBinId: orderItem.picklistBinId,
picklistId: orderItem.picklistId,
items: order.doclist.docs,
shipmentId: orderItem.shipmentId,
shipmentMethodTypeId: orderItem.shipmentMethodTypeId,
Expand Down Expand Up @@ -634,7 +636,7 @@ const actions: ActionTree<OrderState, RootState> = {
shipGroups = payload.shipGroups.map((shipGroup: any) => {
const reservedShipGroupForOrder = shipGroups.find((group: any) => shipGroup.shipGroupSeqId === group.doclist.docs[0].shipGroupSeqId)

const reservedShipGroup = reservedShipGroupForOrder.groupValue ? reservedShipGroupForOrder.doclist.docs[0] : ''
const reservedShipGroup = reservedShipGroupForOrder?.groupValue ? reservedShipGroupForOrder.doclist.docs[0] : ''

return reservedShipGroup ? {
...shipGroup,
Expand Down
7 changes: 5 additions & 2 deletions src/views/OrderDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<ion-icon :icon="pricetagOutline" />
<ion-label>{{ order.orderId }}</ion-label>
</ion-chip>
<ion-chip v-if="orderCategory !== 'Open'" outline>
<ion-chip v-if="orderCategory !== 'Open'" outline @click="printPicklist(order)">
<ion-icon :icon="documentTextOutline" />
<ion-label>{{ translate('Linked picklist') }}: {{ order.picklistBinId }}</ion-label>
<ion-label>{{ translate('Linked picklist') }}: {{ order.picklistId }}</ion-label>
</ion-chip>
<!-- <ion-chip outline>
<ion-icon :icon="cashOutline" />
Expand Down Expand Up @@ -328,6 +328,9 @@ export default defineComponent({
this.orderCategory = getOrderCategory(this.order.items[0])
},
methods: {
async printPicklist (order: any) {
await OrderService.printPicklist(order.picklistId)
},
async openShipmentBoxPopover(ev: Event, item: any, order: any) {
const popover = await popoverController.create({
component: ShipmentBoxPopover,
Expand Down

0 comments on commit 8b6e6a5

Please sign in to comment.