Updated office
This commit is contained in:
@@ -71,9 +71,19 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Card 4: This Week's Stats -->
|
||||
<!-- Card 4: Customer Search Keys -->
|
||||
<div class="bg-neutral rounded-lg p-5">
|
||||
<h3 class="text-xl font-bold mb-4">Customer Search Keys</h3>
|
||||
<div class="space-y-2 text-sm">
|
||||
<div><span class="font-mono font-bold">@</span> - Searches customer last name only</div>
|
||||
<div><span class="font-mono font-bold">!</span> - Searches customer address only</div>
|
||||
<div><span class="font-mono font-bold">#</span> - Searches phone number only</div>
|
||||
<div><span class="font-mono font-bold">$</span> - Searches account number only</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Card 5: This Week's Stats -->
|
||||
<!-- <div class="bg-neutral rounded-lg p-5 xl:col-span-4">
|
||||
<h3 class="text-xl font-bold mb-4">This Week's Stats</h3>
|
||||
<div class="stats stats-vertical lg:stats-horizontal shadow bg-base-100 w-full">
|
||||
@@ -296,4 +306,4 @@ export default defineComponent({
|
||||
|
||||
<style scoped></style>
|
||||
<script setup lang="ts">
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -94,10 +94,7 @@
|
||||
<div class="font-bold">When Delivered</div>
|
||||
<div class="opacity-80">{{ deliveryOrder.when_delivered }}</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="font-bold">Driver</div>
|
||||
<div class="opacity-80">{{ deliveryOrder.driver_first_name }} {{ deliveryOrder.driver_last_name }}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -192,22 +189,9 @@
|
||||
<input v-model="FinalizeOilOrderForm.check_number" class="input input-bordered input-sm w-full max-w-xs" type="text" placeholder="Check Number" />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="label"><span class="label-text font-bold">Delivery Status</span></label>
|
||||
<select class="select select-bordered select-sm w-full max-w-xs" v-model="FinalizeOilOrderForm.delivery_status">
|
||||
<option class="text-white" v-for="(delivery, index) in deliveryStatus" :key="index"
|
||||
:value="delivery['value']">
|
||||
{{ delivery['text'] }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-control">
|
||||
<label class="label cursor-pointer justify-start gap-4">
|
||||
<span class="label-text font-bold">Customer Tank Filled</span>
|
||||
<input v-model="FinalizeOilOrderForm.customer_filled" type="checkbox" class="checkbox checkbox-sm" />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="pt-2">
|
||||
<button type="submit" class="btn btn-secondary btn-sm">Finalize Delivery</button>
|
||||
@@ -248,7 +232,6 @@ export default defineComponent({
|
||||
loaded: false,
|
||||
user: { id: 0 },
|
||||
userCardfound: false,
|
||||
deliveryStatus: [],
|
||||
userCards: [],
|
||||
deliveryNotesDriver: [],
|
||||
total_amount: 0,
|
||||
@@ -258,11 +241,9 @@ export default defineComponent({
|
||||
cash_recieved: '',
|
||||
fill_location: 0,
|
||||
check_number: 0,
|
||||
delivery_status: 10,
|
||||
credit_card_id: 0,
|
||||
driver: 0,
|
||||
gallons_delivered: '',
|
||||
customer_filled: false,
|
||||
},
|
||||
userCard: {
|
||||
date_added: '',
|
||||
@@ -339,12 +320,11 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
mounted() {
|
||||
const deliveryId = this.$route.params.id;
|
||||
this.sumdelivery(deliveryId);
|
||||
this.getOilOrder(deliveryId);
|
||||
this.getOilPricing();
|
||||
this.getDeliveryStatusList();
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -364,10 +344,8 @@ export default defineComponent({
|
||||
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;
|
||||
this.FinalizeOilOrderForm.customer_filled = response.data.delivery.customer_filled == 1;
|
||||
this.FinalizeOilOrderForm.gallons_delivered = response.data.delivery.gallons_delivered || '';
|
||||
this.FinalizeOilOrderForm.driver = response.data.delivery.driver_employee_id || 0;
|
||||
this.FinalizeOilOrderForm.delivery_status = 10; // Finalization status - hardcoded for finalizing action
|
||||
} else {
|
||||
console.error("API Error:", response.data.error || "Failed to fetch delivery data.");
|
||||
}
|
||||
@@ -445,14 +423,7 @@ export default defineComponent({
|
||||
});
|
||||
},
|
||||
|
||||
getDeliveryStatusList() {
|
||||
const path = `${import.meta.env.VITE_BASE_URL}/query/deliverystatus`;
|
||||
axios.get(path, { withCredentials: true })
|
||||
.then((response: any) => {
|
||||
this.deliveryStatus = response.data;
|
||||
})
|
||||
.catch((error: any) => console.error("Error fetching delivery status list:", error));
|
||||
},
|
||||
|
||||
|
||||
CreateTransaction() {
|
||||
const path = `${import.meta.env.VITE_MONEY_URL}/delivery/add/${this.deliveryOrder.id}`;
|
||||
@@ -496,10 +467,8 @@ async onSubmit() {
|
||||
const payload = {
|
||||
cash_recieved: this.FinalizeOilOrderForm.cash_recieved,
|
||||
check_number: this.FinalizeOilOrderForm.check_number,
|
||||
delivery_status: this.FinalizeOilOrderForm.delivery_status,
|
||||
driver_employee_id: this.FinalizeOilOrderForm.driver,
|
||||
gallons_delivered: this.FinalizeOilOrderForm.gallons_delivered,
|
||||
customer_filled: this.FinalizeOilOrderForm.customer_filled,
|
||||
fill_location: this.FinalizeOilOrderForm.fill_location,
|
||||
};
|
||||
|
||||
|
||||
@@ -204,9 +204,9 @@ export default defineComponent({
|
||||
},
|
||||
getSourceText(transaction: any) {
|
||||
if (transaction.delivery_id) {
|
||||
return 'Delivery'
|
||||
return 'Delivery - ' + transaction.delivery_id
|
||||
} else if (transaction.service_id) {
|
||||
return 'Service'
|
||||
return 'Service - ' + transaction.service_id
|
||||
} else {
|
||||
return 'Other'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user