added emergency price/ checks info

This commit is contained in:
2024-09-26 08:49:14 -04:00
parent d927f71a55
commit c7907bed8d
8 changed files with 89 additions and 12 deletions

BIN
src/assets/images/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@@ -3,7 +3,10 @@
<div class="navbar bg-primary border-b border-bottom-500 border-gray-500">
<div class="basis-1/4 md:basis-1/4">
<router-link :to="{ name: 'home' }">
<div class="text-3xl"> {{ company.company_name }}</div>
<div class="text-3xl">
<img src="../../assets/images/1.png" alt="" width="250" height="250" />
</div>
</router-link>
</div>
<div class="basis-1/4 md:basis-1/2 justify-center text-center">
@@ -55,6 +58,7 @@ export default defineComponent({
user_id: 0,
user_name: '',
},
company_id: 0,
company: {
creation_date: "",
account_prefix: "",
@@ -204,6 +208,7 @@ export default defineComponent({
})
.then((response: any) => {
this.company = response.data;
this.company_id = import.meta.env.VITE_COMPANY_ID
})

View File

@@ -33,7 +33,7 @@
<div class="col-span-12 py-2"> Price / Gallon: ${{ today_oil_price }}</div>
<div class="col-span-12 py-2"> Same Day: ${{ price_same_day }}</div>
<div class="col-span-12 py-2"> Prime: ${{ price_prime }}</div>
<div class="col-span-12 py-2"> Emergency: ${{ price_emergency }}</div>
</div>
</div>
<div class="col-span-6 bg-secondary">
@@ -78,6 +78,7 @@ export default defineComponent({
price_for_employee: 0,
price_same_day: 0,
price_prime: 0,
price_emergency: 0,
user: {
user_id: 0,
user_name: '',
@@ -184,7 +185,7 @@ export default defineComponent({
this.price_for_employee = response.data.price_for_employee;
this.price_same_day = response.data.price_same_day;
this.price_prime = response.data.price_prime;
this.price_emergency = response.data.price_emergency;
})
},

View File

@@ -56,7 +56,12 @@
class="input input-bordered input-sm w-full max-w-xs"
id="title" type="text" placeholder="Price Same Day"/>
</div>
<div class="mb-4">
<label class="block text-white text-sm font-bold mb-2">Price Emergency Call (After Hours)</label>
<input v-model="CreateOilForm.basicInfo.price_emergency"
class="input input-bordered input-sm w-full max-w-xs"
id="title" type="text" placeholder="Price After hours same day call"/>
</div>
<div class="mb-4">
<label class="block text-white text-sm font-bold mb-2">Price Prime</label>
<input v-model="CreateOilForm.basicInfo.price_prime"
@@ -110,6 +115,7 @@
price_for_employee: '',
price_same_day: '',
price_prime: '',
price_emergency: '',
},
},
}
@@ -160,6 +166,7 @@
this.CreateOilForm.basicInfo.price_for_employee = response.data.price_for_employee;
this.CreateOilForm.basicInfo.price_same_day = response.data.price_same_day;
this.CreateOilForm.basicInfo.price_prime = response.data.price_prime;
this.CreateOilForm.basicInfo.price_emergency = response.data.price_emergency;
}
})
},
@@ -169,6 +176,7 @@
price_for_employee: string;
price_same_day: string;
price_prime: string;
price_emergency: string;
}) {
let path = import.meta.env.VITE_BASE_URL + "/admin/oil/create";
@@ -186,7 +194,7 @@
text: "Prices have been updated!",
type: "success",
});
this.$router.push({name: "oilprice"});
this.$router.push({name: "home"});
}
if (response.data.error) {
this.$router.push("/");
@@ -200,6 +208,7 @@
price_for_employee: this.CreateOilForm.basicInfo.price_for_employee,
price_same_day: this.CreateOilForm.basicInfo.price_same_day,
price_prime: this.CreateOilForm.basicInfo.price_prime,
price_emergency: this.CreateOilForm.basicInfo.price_emergency,
};
this.CreatePricing(payload);
},

View File

@@ -93,7 +93,6 @@
</div>
</div>
<div class=" rounded-md mx-5 my-5">
<div class="flex">
Order Date:
@@ -129,6 +128,10 @@
<input v-model="CreateOilOrderForm.basicInfo.card" class="checkbox checkbox-xs" id="Credit"
type="checkbox" />
</div>
<div class="col-span-12 md:col-span-4 mb-5 md:mb-0 gap-10">
<label class="block text-white text-sm font-bold cursor-pointer label">Check</label>
<input v-model="CreateOilOrderForm.basicInfo.check" class="checkbox checkbox-xs" id="check" type="checkbox" />
</div>
<div class="flex-1 mb-4">
<label class="block text-white text-sm font-bold mb-2">Customer Cards Payment</label>
<select class="select select-bordered select-sm w-full max-w-xs" aria-label="Default select example"
@@ -309,6 +312,7 @@ export default defineComponent({
credit_card_id: 0,
cash: false,
card: false,
check: false,
driver_driver: '',
},
},
@@ -392,15 +396,24 @@ export default defineComponent({
if (response.data.delivery.payment_type == 0) {
this.CreateOilOrderForm.basicInfo.card = false
this.CreateOilOrderForm.basicInfo.cash = true
this.CreateOilOrderForm.basicInfo.check = false
}
if (response.data.delivery.payment_type == 1) {
this.CreateOilOrderForm.basicInfo.card = true
this.CreateOilOrderForm.basicInfo.cash = false
this.CreateOilOrderForm.basicInfo.check = false
}
if (response.data.delivery.payment_type == 2) {
this.CreateOilOrderForm.basicInfo.card = true
this.CreateOilOrderForm.basicInfo.cash = true
this.CreateOilOrderForm.basicInfo.check = false
}
if (response.data.delivery.payment_type == 3) {
this.CreateOilOrderForm.basicInfo.card = false
this.CreateOilOrderForm.basicInfo.cash = false
this.CreateOilOrderForm.basicInfo.check = true
}
}
})
},
@@ -481,6 +494,7 @@ export default defineComponent({
dispatcher_notes_taken: string;
cash: boolean;
credit: boolean;
check: boolean;
credit_card_id: any;
driver_employee_id: string,
}) {
@@ -514,6 +528,7 @@ export default defineComponent({
driver_employee_id: this.CreateOilOrderForm.basicInfo.driver_driver,
cash: this.CreateOilOrderForm.basicInfo.cash,
credit: this.CreateOilOrderForm.basicInfo.card,
check: this.CreateOilOrderForm.basicInfo.check,
credit_card_id: this.CreateOilOrderForm.basicInfo.userCards,
};
this.editOilOrder(payload);

View File

@@ -48,6 +48,7 @@
<th>Automatic</th>
<th>Prime</th>
<th>Same Day</th>
<th>Payment</th>
</tr>
</thead>
<tbody>
@@ -88,8 +89,38 @@
<div v-if="oil['same_day'] == 0">No</div>
<div v-else>Yes</div>
</td>
<td>
<div v-if="oil['payment_type'] == 0">Cash</div>
<div v-else-if="oil['payment_type'] == 1">CC</div>
<div v-else-if="oil['payment_type'] == 2">Cash/CC</div>
<div v-else-if="oil['payment_type'] == 3">Check</div>
<div v-else-if="oil['payment_type'] == 4">Other</div>
<div v-else></div>
</td>
<td class="flex gap-5">
<router-link :to="{ name: 'deliveryOrder', params: { id: oil['id'] } }">
<button class="btn btn-accent btn-sm">View</button>
</router-link>
<router-link :to="{ name: 'deliveryEdit', params: { id: oil['id'] } }">
<button class="btn btn-accent btn-sm">Edit</button>
</router-link>
<router-link :to="{ name: 'Ticket', params: { id: oil['id'] } }">
<button class="btn btn-accent btn-sm">
Print
</button>
</router-link>
<button @click.prevent="deleteCall(oil['id'])" class="btn btn-error btn-sm">
Delete
</button>
<router-link :to="{ name: 'finalizeTicket', params: { id: oil['id'] } }">
<button class="btn btn-accent btn-sm">Finalize</button>
</router-link>

View File

@@ -32,9 +32,10 @@
<th>Address</th>
<th>Gallons</th>
<th>Date</th>
<th>Automatic</th>
<th>Auto</th>
<th>Prime</th>
<th>Same Day</th>
<th>Payment</th>
</tr>
</thead>
<tbody>
@@ -78,7 +79,17 @@
<div v-if="oil['same_day'] == 0">No</div>
<div v-else>Yes</div>
</td>
<td>
<div v-if="oil['payment_type'] == 0">Cash</div>
<div v-else-if="oil['payment_type'] == 1">CC</div>
<div v-else-if="oil['payment_type'] == 2">Cash/CC</div>
<div v-else-if="oil['payment_type'] == 3">Check</div>
<div v-else-if="oil['payment_type'] == 4">Other</div>
<div v-else></div>
</td>
<td class="flex gap-5">
<router-link :to="{ name: 'deliveryOrder', params: { id: oil['id'] } }">
<button class="btn btn-accent btn-sm">View</button>

View File

@@ -211,7 +211,12 @@
<div class="" v-if="delivery.payment_type == 3">
<button class="btn btn-accent btn-sm" @click="checkoutOilUpdatePayment(3)">
Error
Check + Pay Credit Terminal
</button>
</div>
<div class="" v-if="delivery.payment_type == 4">
<button class="btn btn-accent btn-sm" @click="checkoutOilUpdatePayment(3)">
Other
</button>
</div>
</div>
@@ -499,7 +504,7 @@ export default defineComponent({
if (payment_type == 1) {
notify({
title: "Success",
text: "marked payment as credit (bank terminal)",
text: "marked payment as credit card",
type: "success",
});
}
@@ -507,14 +512,14 @@ export default defineComponent({
if (payment_type == 2) {
notify({
title: "Success",
text: "marked payment as cash (COD)",
text: "marked payment as cash (COD) and credit card partial payment",
type: "success",
});
}
if (payment_type == 3) {
notify({
title: "Success",
text: "marked payment as cash (COD)",
text: "marked payment as check with credit card hold",
type: "success",
});
}