added cancel button
This commit is contained in:
@@ -137,7 +137,28 @@
|
||||
@edit-card="editCard"
|
||||
@remove-card="removeCard"
|
||||
/>
|
||||
|
||||
|
||||
<!-- Automatic Delivery Actions Box -->
|
||||
<div v-if="automatic_status === 1 && autodeliveries.length > 0" class="bg-base-100 rounded-lg p-4 border">
|
||||
<h3 class="font-semibold mb-4">Automatic Delivery Actions</h3>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<router-link v-if="autodeliveries[0].auto_status != 3"
|
||||
:to="{ name: 'payAutoAuthorize', params: { id: autodeliveries[0].id } }">
|
||||
<button class="btn btn-primary btn-sm">Preauthorize</button>
|
||||
</router-link>
|
||||
<router-link :to="{ name: 'finalizeTicketAutoNocc', params: { id: autodeliveries[0].id } }">
|
||||
<button class="btn btn-secondary btn-sm">Finalize</button>
|
||||
</router-link>
|
||||
<router-link v-if="autodeliveries[0].auto_status == 3"
|
||||
:to="{ name: 'finalizeTicketAuto', params: { id: autodeliveries[0].open_ticket_id || autodeliveries[0].id } }">
|
||||
<button class="btn btn-secondary btn-sm">Finalize</button>
|
||||
</router-link>
|
||||
<router-link :to="{ name: 'TicketAuto', params: { id: autodeliveries[0].id } }">
|
||||
<button class="btn btn-success btn-sm">Print Ticket</button>
|
||||
</router-link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -305,6 +326,8 @@ interface AutomaticDelivery {
|
||||
customer_full_name: string;
|
||||
gallons_delivered: number | string;
|
||||
fill_date: string;
|
||||
auto_status: number | string;
|
||||
open_ticket_id: number | string;
|
||||
}
|
||||
|
||||
interface CreditCard {
|
||||
@@ -600,13 +623,14 @@ export default defineComponent({
|
||||
})
|
||||
},
|
||||
getCustomerAutoDelivery(userid: any) {
|
||||
let path = import.meta.env.VITE_AUTO_URL + '/delivery/all/profile/profile/' + userid ;
|
||||
let path = import.meta.env.VITE_AUTO_URL + '/delivery/auto/customer/' + userid ;
|
||||
axios({
|
||||
method: 'get',
|
||||
url: path,
|
||||
headers: authHeader(),
|
||||
}).then((response: any) => {
|
||||
this.autodeliveries = response.data
|
||||
// Handle the case where response.data might be null (no auto delivery found)
|
||||
this.autodeliveries = response.data ? [response.data] : []
|
||||
})
|
||||
},
|
||||
getCustomerDelivery(userid: any, delivery_page: any) {
|
||||
|
||||
Reference in New Issue
Block a user