small fixes routing
This commit is contained in:
@@ -622,7 +622,6 @@ export default defineComponent({
|
||||
text: "Confirmed Transaction",
|
||||
type: "success",
|
||||
})
|
||||
this.$router.push({ name: "deliveryOutForDelivery" });
|
||||
}
|
||||
else {
|
||||
notify({
|
||||
@@ -660,8 +659,14 @@ export default defineComponent({
|
||||
type: "success",
|
||||
});
|
||||
this.CreateTransaction()
|
||||
this.$router.push({ name: "deliveryOutForDelivery" });
|
||||
|
||||
// Navigate to delivery view page with proper error handling
|
||||
if (this.deliveryOrder && this.deliveryOrder.id) {
|
||||
this.$router.push({ name: "deliveryOrder", params: { id: this.deliveryOrder.id } });
|
||||
} else {
|
||||
// Fallback if delivery ID is not available
|
||||
this.$router.push({ name: "delivery" });
|
||||
}
|
||||
|
||||
}
|
||||
if (response.data.error) {
|
||||
notify({
|
||||
@@ -669,7 +674,7 @@ export default defineComponent({
|
||||
text: "Could not finalize ticket",
|
||||
type: "error",
|
||||
});
|
||||
this.$router.push("delivery");
|
||||
this.$router.push({ name: "delivery" });
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user