Fixed page layout and edit delivery
This commit is contained in:
@@ -413,8 +413,8 @@ export default defineComponent({
|
||||
headers: authHeader(),
|
||||
})
|
||||
.then((response: any) => {
|
||||
if (response.data) {
|
||||
this.deliveryOrder = response.data
|
||||
if (response.data && response.data.ok) {
|
||||
this.deliveryOrder = response.data.delivery
|
||||
this.getCustomer(this.deliveryOrder.customer_id)
|
||||
|
||||
if (this.deliveryOrder.payment_type === 1) {
|
||||
@@ -427,14 +427,15 @@ export default defineComponent({
|
||||
this.getPaymentCard(this.deliveryOrder.payment_card_id);
|
||||
}
|
||||
|
||||
this.FinalizeOilOrderForm.cash_recieved = response.data.cash_recieved;
|
||||
this.FinalizeOilOrderForm.check_number = response.data.check_number;
|
||||
this.FinalizeOilOrderForm.credit_card_id = response.data.payment_card_id;
|
||||
this.FinalizeOilOrderForm.cash_recieved = response.data.delivery.cash_recieved;
|
||||
this.FinalizeOilOrderForm.check_number = response.data.delivery.check_number;
|
||||
this.FinalizeOilOrderForm.credit_card_id = response.data.delivery.payment_card_id;
|
||||
|
||||
if (response.data.customer_filled == 1) {
|
||||
if (response.data.delivery.customer_filled == 1) {
|
||||
this.FinalizeOilOrderForm.customer_filled = true
|
||||
}
|
||||
|
||||
} else {
|
||||
console.error("API Error:", response.data.error || "Failed to fetch delivery data.");
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -698,4 +699,4 @@ export default defineComponent({
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
<style scoped></style>
|
||||
|
||||
@@ -397,13 +397,17 @@ export default defineComponent({
|
||||
withCredentials: true,
|
||||
})
|
||||
.then((response: any) => {
|
||||
this.delivery = response.data;
|
||||
this.getCustomer(this.delivery.customer_id)
|
||||
this.getCreditCards(this.delivery.customer_id)
|
||||
if (this.delivery.promo_id != null) {
|
||||
this.getPromo(this.delivery.promo_id);
|
||||
this.promo_active = true;
|
||||
}
|
||||
if (response.data && response.data.ok) {
|
||||
this.delivery = response.data.delivery;
|
||||
this.getCustomer(this.delivery.customer_id)
|
||||
this.getCreditCards(this.delivery.customer_id)
|
||||
if (this.delivery.promo_id != null) {
|
||||
this.getPromo(this.delivery.promo_id);
|
||||
this.promo_active = true;
|
||||
}
|
||||
} else {
|
||||
console.error("API Error:", response.data.error || "Failed to fetch delivery data.");
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
notify({
|
||||
@@ -489,4 +493,4 @@ export default defineComponent({
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
<style scoped></style>
|
||||
|
||||
@@ -5,19 +5,19 @@ import Ticket from "../ticket/ticket.vue";
|
||||
import TicketAuto from "../ticket/ticketauto.vue";
|
||||
|
||||
|
||||
const payRoutes = [
|
||||
const ticketRoutes = [
|
||||
{
|
||||
path: '/ticket/:id',
|
||||
path: ':id',
|
||||
name: 'Ticket',
|
||||
component: Ticket,
|
||||
},
|
||||
{
|
||||
path: '/ticket/auto/:id',
|
||||
path: 'auto/:id',
|
||||
name: 'TicketAuto',
|
||||
component: TicketAuto,
|
||||
},
|
||||
|
||||
|
||||
]
|
||||
|
||||
export default payRoutes
|
||||
export default ticketRoutes
|
||||
//sourceMappingURL=index.ts.map
|
||||
|
||||
@@ -285,14 +285,17 @@ export default defineComponent({
|
||||
withCredentials: true,
|
||||
})
|
||||
.then((response: any) => {
|
||||
this.delivery = response.data;
|
||||
this.getCustomer(this.delivery.customer_id)
|
||||
if (this.delivery.promo_id != null) {
|
||||
this.getPromo(this.delivery.promo_id);
|
||||
this.promo_active = true;
|
||||
this.getPrice(delivery_id)
|
||||
if (response.data && response.data.ok) {
|
||||
this.delivery = response.data.delivery;
|
||||
this.getCustomer(this.delivery.customer_id)
|
||||
if (this.delivery.promo_id != null) {
|
||||
this.getPromo(this.delivery.promo_id);
|
||||
this.promo_active = true;
|
||||
this.getPrice(delivery_id)
|
||||
}
|
||||
} else {
|
||||
console.error("API Error:", response.data.error || "Failed to fetch delivery data.");
|
||||
}
|
||||
|
||||
})
|
||||
.catch(() => {
|
||||
notify({
|
||||
|
||||
Reference in New Issue
Block a user