+
+
{{ order.pickers ? translate("Picked by", { pickers: order.pickers }) : translate("No picker assigned.") }}
+
+ {{ translate("Change") }}
+
@@ -170,6 +173,8 @@ import ShipToCustomerModal from "@/components/ShipToCustomerModal.vue";
import { OrderService } from "@/services/OrderService";
import RejectOrderModal from "@/components/RejectOrderModal.vue";
import { translate } from "@hotwax/dxp-components";
+import EditPickerModal from "@/components/EditPickerModal.vue";
+import emitter from '@/event-bus'
export default defineComponent({
name: "OrderDetail",
@@ -218,6 +223,23 @@ export default defineComponent({
});
return assignPickerModal.present();
},
+ async editPicker(order: any) {
+ const editPickerModal = await modalController.create({
+ component: EditPickerModal,
+ componentProps: { order }
+ });
+
+ editPickerModal.onDidDismiss().then((result) => {
+ if(result.data?.selectedPicker){
+ const selectedPicker = result.data.selectedPicker
+ this.order.pickers = selectedPicker.name
+ this.order.pickerIds = [selectedPicker.id]
+ this.store.dispatch('order/updateCurrent', { order: this.order })
+ }
+ })
+
+ return editPickerModal.present();
+ },
async deliverShipment(order: any) {
await this.store.dispatch('order/deliverShipment', order)
},
@@ -361,6 +383,7 @@ export default defineComponent({
}
},
async mounted() {
+ emitter.emit("presentLoader")
await this.getOrderDetail(this.orderId, this.orderPartSeqId, this.orderType);
// fetch customer details and rejection reasons only when we get the orders information
@@ -368,6 +391,7 @@ export default defineComponent({
await this.getCustomerContactDetails()
await this.fetchRejectReasons();
}
+ emitter.emit("dismissLoader")
},
setup() {
const store = useStore();