diff --git a/src/views/EditPackagingModal.vue b/src/views/EditPackagingModal.vue index 86d4e684..1df768a5 100644 --- a/src/views/EditPackagingModal.vue +++ b/src/views/EditPackagingModal.vue @@ -7,9 +7,6 @@ {{ translate("Edit packaging") }} - - {{ translate("Save") }} - @@ -17,46 +14,45 @@
- + - NN10584 + {{ order.orderName }}
- Darooty Magwood -

{{ translate("Ordered") }} 27th January 2020 9:24 PM EST

+ {{ order.customerName }} +

{{ translate("Ordered") }} {{ formatUtcDate(order.orderDate, 'dd MMMM yyyy t a ZZZZ') }}

-
+
- + -

WJ06-XL-PURPLE

- Juno Jacket -

Blue XL

+

{{ getProductIdentificationValue(productIdentificationPref.secondaryId, getProduct(item.productId)) }}

+ {{ getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(item.productId)) ? getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(item.productId)) : item.productName }} +

{{ getFeature(getProduct(item.productId).featureHierarchy, '1/COLOR/')}} {{ getFeature(getProduct(item.productId).featureHierarchy, '1/SIZE/')}}

@@ -66,29 +62,35 @@ {{ translate('Boxes') }} - + {{ translate("Add") }} - - - Type 1 - Type 2 - Type 3 + + + {{ boxTypeDesc(boxType) }} + + + + + + - \ No newline at end of file + + + \ No newline at end of file diff --git a/src/views/InProgress.vue b/src/views/InProgress.vue index 043ea8eb..ec2def3c 100644 --- a/src/views/InProgress.vue +++ b/src/views/InProgress.vue @@ -139,7 +139,7 @@ - + {{ getProductStock(item.productId).quantityOnHandTotal }} {{ translate('pieces in stock') }} @@ -176,7 +176,7 @@
{{ translate("Pack using default packaging") }} - + @@ -310,6 +310,8 @@ import ShipmentBoxPopover from '@/components/ShipmentBoxPopover.vue' import QRCodeModal from '@/components/QRCodeModal.vue' import { useAuthStore } from '@hotwax/dxp-components' import ScanOrderItemModal from "@/components/ScanOrderItemModal.vue"; +import EditPackagingModal from '@/views/EditPackagingModal.vue' +import ReportIssueModal from '@/views/ReportIssueModal.vue' export default defineComponent({ @@ -441,13 +443,34 @@ export default defineComponent({ getInProgressOrders() { return JSON.parse(JSON.stringify(this.inProgressOrders.list)).splice(0, (this.inProgressOrders.query.viewIndex + 1) * (process.env.VUE_APP_VIEW_SIZE as any)); }, - async packagingPopover(ev: Event) { + async packagingPopover(ev: Event, order: any) { const popover = await popoverController.create({ component: PackagingPopover, + componentProps: { order }, event: ev, translucent: true, showBackdrop: false, }); + + popover.onDidDismiss().then(async(result) => { + if(result.data?.dismissed) { + const selectedAction = result.data.selectedAction; + + const modal = await modalController.create({ + component: selectedAction === 'editPackaging' ? EditPackagingModal : ReportIssueModal, + componentProps: selectedAction === 'editPackaging' ? { order, addingBoxForOrderIds: this.addingBoxForOrderIds, addShipmentBox: this.addShipmentBox } : { order } + }) + + modal.onDidDismiss().then((result) => { + if(result.data?.updatedOrder) { + this.save(result.data.updatedOrder); + } + }) + + modal.present(); + } + }) + return popover.present(); }, async packOrder(order: any) { @@ -1290,8 +1313,15 @@ ion-segment > ion-segment-button > ion-skeleton-text, ion-item > ion-skeleton-te height: 30px; } -.order-item { - grid-template-columns: repeat(3, 1fr); +.product-metadata { + display: flex; + align-items: center; +} + +@media (min-width: 991px) { + .order-item { + grid-template-columns: repeat(3, 1fr); + } } diff --git a/src/views/OrderDetail.vue b/src/views/OrderDetail.vue index b7b8a974..fbc1d970 100644 --- a/src/views/OrderDetail.vue +++ b/src/views/OrderDetail.vue @@ -151,7 +151,7 @@
{{ translate("Pack using default packaging") }} - + @@ -347,6 +347,8 @@ import ReportIssuePopover from '@/components/ReportIssuePopover.vue' import ShippingDetails from '@/views/ShippingDetails.vue'; import { isKit } from '@/utils/order' import ScanOrderItemModal from "@/components/ScanOrderItemModal.vue"; +import EditPackagingModal from '@/views/EditPackagingModal.vue'; +import ReportIssueModal from '@/views/ReportIssueModal.vue'; export default defineComponent({ name: "OrderDetail", @@ -699,13 +701,34 @@ export default defineComponent({ inProgressOrdersQuery.viewIndex = 0 // If the size changes, list index should be reintialised await this.store.dispatch('order/updateInProgressQuery', { ...inProgressOrdersQuery }) }, - async packagingPopover(ev: Event) { + async packagingPopover(ev: Event, order: any) { const popover = await popoverController.create({ component: PackagingPopover, + componentProps: { order }, event: ev, translucent: true, showBackdrop: false, }); + + popover.onDidDismiss().then(async(result) => { + if(result.data?.dismissed) { + const selectedAction = result.data.selectedAction; + + const modal = await modalController.create({ + component: selectedAction === 'editPackaging' ? EditPackagingModal : ReportIssueModal, + componentProps: selectedAction === 'editPackaging' ? { order, addingBoxForOrderIds: this.addingBoxForOrderIds, addShipmentBox: this.addShipmentBox } : { order } + }) + + modal.onDidDismiss().then((result) => { + if(result.data?.updatedOrder) { + this.save(result.data.updatedOrder); + } + }) + + modal.present(); + } + }) + return popover.present(); }, async openRejectReasonPopover(ev: Event, item: any, order: any, kitProducts?: any) { @@ -1373,8 +1396,10 @@ ion-segment > ion-segment-button > ion-skeleton-text, ion-item > ion-skeleton-te height: 30px; } -.order-item { - grid-template-columns: repeat(3, 1fr); +@media (min-width: 991px) { + .order-item { + grid-template-columns: repeat(3, 1fr); + } } .other-shipment-actions { diff --git a/src/views/PackagingPopover.vue b/src/views/PackagingPopover.vue index 4e0cadd4..7b589b3d 100644 --- a/src/views/PackagingPopover.vue +++ b/src/views/PackagingPopover.vue @@ -1,18 +1,14 @@ @@ -23,11 +19,9 @@ import { IonIcon, IonItem, IonList, - modalController, + popoverController } from "@ionic/vue"; import { defineComponent } from "vue"; -import EditPackagingModal from '@/views/EditPackagingModal.vue' -import ReportIssueModal from '@/views/ReportIssueModal.vue' import { pencil, warning, refresh } from 'ionicons/icons' import { translate } from "@hotwax/dxp-components"; @@ -40,17 +34,8 @@ export default defineComponent({ IonList, }, methods: { - async editPackaging() { - const editmodal = await modalController.create({ - component: EditPackagingModal - }); - return editmodal.present(); - }, - async reportIssue() { - const reportmodal = await modalController.create({ - component: ReportIssueModal - }); - return reportmodal.present(); + closePopover(selectedAction: string) { + popoverController.dismiss({ dismissed: true, selectedAction }) } }, setup() { diff --git a/src/views/ReportIssueModal.vue b/src/views/ReportIssueModal.vue index 4894d84e..0040a6ad 100644 --- a/src/views/ReportIssueModal.vue +++ b/src/views/ReportIssueModal.vue @@ -7,75 +7,82 @@ {{ translate("Report an issue") }} - - {{ translate("Save") }} - - - -
-
- - - NN10584 - -
+ + +
+
+ + + {{ order.orderName }} + +
-
- - Darooty Magwood -

{{ translate("Ordered") }} 27th January 2020 9:24 PM EST

-
-
+
+ + {{ order.customerName }} +

{{ translate("Ordered") }} {{ formatUtcDate(order.orderDate, 'dd MMMM yyyy t a ZZZZ') }}

+
+
- -
+ +
- +
- + -

WJ06-XL-PURPLE

- Juno Jacket -

Blue XL

+

{{ getProductIdentificationValue(productIdentificationPref.secondaryId, getProduct(item.productId)) }}

+ {{ getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(item.productId)) ? getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(item.productId)) : item.productName }} +

{{ getFeature(getProduct(item.productId).featureHierarchy, '1/COLOR/')}} {{ getFeature(getProduct(item.productId).featureHierarchy, '1/SIZE/')}}

- - Out of stock - Worn display + + {{ reason.description ? translate(reason.description) : reason.enumId }}
+ + + + + + -