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

Fixed: old tracking details going for printing label post generation on packing (#764) #765

Merged
merged 2 commits into from
Sep 17, 2024
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
15 changes: 8 additions & 7 deletions src/components/GenerateTrackingCodeModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,15 @@
</ion-button>
</ion-item>
</ion-list>

<div class="empty-state" v-if="isGeneratingShippingLabel">
<ion-spinner name="crescent" />
<ion-label>{{ translate("Generating label") }}</ion-label>
</div>
</ion-content>

<ion-fab vertical="bottom" horizontal="end" slot="fixed">
<ion-fab-button :disabled="isTrackingRequired ? !shipmentMethodTypeId: false" @click="confirmSave()">
<ion-fab-button :disabled="isGeneratingShippingLabel ? true : isTrackingRequired ? !shipmentMethodTypeId : false" @click="confirmSave()">
<ion-icon :icon="isForceScanEnabled ? barcodeOutline : saveOutline" />
</ion-fab-button>
</ion-fab>
Expand All @@ -71,6 +76,7 @@ import {
IonList,
IonSelect,
IonSelectOption,
IonSpinner,
IonTitle,
IonToolbar,
modalController,
Expand Down Expand Up @@ -100,6 +106,7 @@ export default defineComponent({
IonList,
IonSelect,
IonSelectOption,
IonSpinner,
IonTitle,
IonToolbar,
},
Expand Down Expand Up @@ -152,12 +159,6 @@ export default defineComponent({
let order = this.order
let isRegenerated = false as any;

// if the request to print shipping label is not yet completed, then clicking multiple times on the button
// should not do anything
if(this.isGeneratingShippingLabel) {
return;
}

this.isGeneratingShippingLabel = true;

const isUpdated = await this.updateCarrierAndShippingMethod(this.carrierPartyId, this.shipmentMethodTypeId)
Expand Down
1 change: 1 addition & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@
"Generate packing slip": "Generate packing slip",
"Generate QR code": "Generate QR code",
"Generate shipping label": "Generate shipping label",
"Generating label": "Generating label",
"Gift card": "Gift card",
"Gift card activated successfully.": "Gift card activated successfully.",
"Gift card activation": "Gift card activation",
Expand Down
1 change: 1 addition & 0 deletions src/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@
"Generate packing slip": "Generar documento de embalaje",
"Generate QR code": "Generar código QR",
"Generate shipping label": "Generar etiqueta de envío",
"Generating label": "Generating label",
"Gift card": "Gift card",
"Gift card activated successfully.": "Gift card activated successfully.",
"Gift card activation": "Gift card activation",
Expand Down
1 change: 1 addition & 0 deletions src/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@
"Gift card activation": "Gift card activation",
"Generate Label": "Generate Label",
"Generate packing slip": "梱包スリップを生成",
"Generating label": "Generating label",
"Generate QR code": "QRコードを生成",
"Generate shipping label": "配送ラベルを生成",
"Go to OMS": "OMSに移動",
Expand Down
6 changes: 4 additions & 2 deletions src/views/InProgress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1288,8 +1288,10 @@ export default defineComponent({

modal.onDidDismiss().then((result: any) => {
if(result.data?.moveToNext) {
if(this.isForceScanEnabled) this.scanOrder(order);
else this.packOrder(order);
const inProgressOrders = this.getInProgressOrders()
const updatedOrder = inProgressOrders.find((currentOrder: any) => currentOrder.orderId === order.orderId);
if(this.isForceScanEnabled) this.scanOrder(updatedOrder);
else this.packOrder(updatedOrder);
}
})

Expand Down
Loading