added promo. fixed bugs
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user