added promo. fixed bugs

This commit is contained in:
2024-10-07 17:34:38 -04:00
parent 7832e40bf3
commit e8ffae3b01
16 changed files with 1359 additions and 394 deletions

View File

@@ -852,6 +852,34 @@ export default defineComponent({
.catch(() => {
});
},
CreateTransaction() {
let path = import.meta.env.VITE_MONEY_URL + "/delivery/add/" + this.deliveryOrder.id;
axios({
method: "post",
url: path,
withCredentials: true,
headers: authHeader(),
})
.then((response: any) => {
if (response.status == 201) {
notify({
message: 'Confirmed Transaction',
type: 'positive',
position: 'top'
})
this.$router.push({ name: "today" });
}
else {
notify({
message: 'Form Error',
type: 'negative',
position: 'top'
})
}
})
},
FinalizeOrder(payload: {
cash: boolean,
card: boolean,
@@ -885,8 +913,9 @@ export default defineComponent({
text: "Ticket is finalized",
type: "success",
});
this.CreateTransaction()
this.$router.push({ name: "delivery" });
console.log("here")
}
if (response.data.error) {
notify({