small frontend changed

This commit is contained in:
2025-09-16 13:52:16 -04:00
parent bd95e14bb3
commit 827debd1cc
4 changed files with 183 additions and 116 deletions

View File

@@ -159,7 +159,7 @@
<div class="bg-base-100 rounded-lg p-5">
<h2 class="text-2xl font-bold mb-4">Gallons Delivered</h2>
<div class="text-center">
<div class="text-4xl font-bold text-primary">{{ gallonsDelivered || '0.00' }}</div>
<div class="text-4xl font-bold text-success">{{ gallonsDelivered || '0.00' }}</div>
<div class="text-sm opacity-70">gallons</div>
</div>
</div>
@@ -392,9 +392,14 @@ export default defineComponent({
}
})
.catch((error: any) => {
notify({ title: "Error", text: "No pre-authorized transaction found", type: "error" });
console.error("Error fetching transaction:", error);
this.$router.push({ name: 'finalizeTicket', params: { id: this.$route.params.id } });
if (error.response && error.response.status === 404) {
notify({ title: "Info", text: "No pre-authorization found. Redirecting to customer profile to update payment method.", type: "info" });
console.log("No transaction found for delivery - redirecting to customer profile");
this.$router.push({ name: 'customerProfile', params: { id: this.customer.id } });
} else {
notify({ title: "Error", text: "No pre-authorized transaction found", type: "error" });
this.$router.push({ name: 'finalizeTicket', params: { id: this.$route.params.id } });
}
});
},