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: Print Picklist PDF from order detail page. #325

Merged
merged 2 commits into from
Oct 20, 2023
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
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
Loading