Updated forms
This commit is contained in:
@@ -21,22 +21,75 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="grid grid-cols-12">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-span-12 xl:col-span-6 rounded-md p-6 ">
|
||||
<div class="grid grid-cols-12">
|
||||
<div class="col-span-12 text-[24px]">
|
||||
Create Oil Delivery
|
||||
</div>
|
||||
<div class="col-span-12 py-5">
|
||||
<div class="grid grid-cols-12 ">
|
||||
<div class="col-span-12 bg-neutral ">
|
||||
<div class="col-span-12 py-5 ">
|
||||
<router-link :to="{ name: 'customerProfile', params: { id: customer['id'] } }"
|
||||
class="btn btn-secondary btn-sm">
|
||||
View Profile
|
||||
</router-link>
|
||||
class="btn btn-secondary btn-sm">
|
||||
View Profile
|
||||
</router-link>
|
||||
</div>
|
||||
<div class="grid grid-cols-12">
|
||||
<div class="col-span-12 font-bold flex pb-5 ">{{ customer.account_number }}</div>
|
||||
<div class="col-span-12 font-bold flex">
|
||||
{{ customer.customer_first_name }}
|
||||
{{ customer.customer_last_name }}
|
||||
</div>
|
||||
<div class="col-span-12 font-bold flex">
|
||||
|
||||
{{ customer.customer_address }}
|
||||
<div v-if="customer.customer_apt != 'None'">
|
||||
{{ customer.customer_apt }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-span-12 font-bold flex">
|
||||
<div class="pr-2">
|
||||
{{ customer.customer_town }},
|
||||
</div>
|
||||
<div class="pr-2">
|
||||
|
||||
<div v-if="customer.customer_state == 0">Massachusetts</div>
|
||||
<div v-else-if="customer.customer_state == 1">Rhode Island</div>
|
||||
<div v-else-if="customer.customer_state == 2">New Hampshire</div>
|
||||
<div v-else-if="customer.customer_state == 3">Maine</div>
|
||||
<div v-else-if="customer.customer_state == 4">Vermont</div>
|
||||
<div v-else-if="customer.customer_state == 5">Maine</div>
|
||||
<div v-else-if="customer.customer_state == 6">New York</div>
|
||||
<div v-else>Unknown state</div>
|
||||
</div>
|
||||
<div class="pr-2">
|
||||
{{ customer.customer_zip }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-span-12 font-bold flex" v-if="customer.customer_apt !== 'None'">
|
||||
{{ customer.customer_apt }}
|
||||
</div>
|
||||
<div class="col-span-12 font-bold flex">
|
||||
<div v-if="customer.customer_home_type == 0">Residential</div>
|
||||
<div v-else-if="customer.customer_home_type == 1">apartment</div>
|
||||
<div v-else-if="customer.customer_home_type == 2">condo</div>
|
||||
<div v-else-if="customer.customer_home_type == 3">commercial</div>
|
||||
<div v-else-if="customer.customer_home_type == 4">business</div>
|
||||
<div v-else-if="customer.customer_home_type == 5">construction</div>
|
||||
<div v-else-if="customer.customer_home_type == 6">container</div>
|
||||
</div>
|
||||
<div class="col-span-12 font-bold flex">
|
||||
{{ customer.customer_phone_number }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-span-6 rounded-md p-6 ">
|
||||
<div class="grid grid-cols-12">
|
||||
<div class="col-span-12 text-[24px] ">
|
||||
Create Delivery
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<form class="col-span-12 rounded-md px-8 pt-6 pb-8 mb-4 w-full" enctype="multipart/form-data"
|
||||
@submit.prevent="onSubmit">
|
||||
|
||||
@@ -82,27 +135,29 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div v-if="userCards.length > 0">
|
||||
<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"
|
||||
id="userCards" v-model="CreateOilOrderForm.basicInfo.userCards">
|
||||
|
||||
<option class="text-white" v-for="(card, index) in userCards" :key="index" :value="card['id']">
|
||||
{{ card['type_of_card'] }} {{ card['card_number'] }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="col-span-12 md:col-span-4 mb-5 md:mb-0 py-5">
|
||||
No Cards on File!
|
||||
<router-link :to="{ name: 'cardadd', params: { id: customer.id } }">
|
||||
<button class="btn btn-sm bg-blue-700 text-white">Add CreditCard</button>
|
||||
</router-link>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="userCards.length > 0">
|
||||
<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"
|
||||
id="userCards" v-model="CreateOilOrderForm.basicInfo.userCards">
|
||||
|
||||
<option class="text-white" v-for="(card, index) in userCards" :key="index" :value="card['id']">
|
||||
{{ card['type_of_card'] }} {{ card['card_number'] }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="col-span-12 md:col-span-4 mb-5 md:mb-0 py-5">
|
||||
No Cards on File!
|
||||
<a @click.prevent="test()" class="cursor-pointer underline hover:text-blue-300">
|
||||
Edit Card
|
||||
</a>
|
||||
<!-- <router-link :to="{ name: 'cardadd', params: { id: customer.id } }">
|
||||
<button class="btn btn-sm bg-blue-700 text-white">Add Credit Card</button>
|
||||
</router-link> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-1 mb-4">
|
||||
<label class="block text-white text-sm font-bold mb-2">Delivery Driver </label>
|
||||
@@ -123,18 +178,18 @@
|
||||
type="checkbox" />
|
||||
</div>
|
||||
<div v-if="userCards.length > 0">
|
||||
<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">Credit </label>
|
||||
<input v-model="CreateOilOrderForm.basicInfo.credit" 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">Credit </label>
|
||||
<input v-model="CreateOilOrderForm.basicInfo.credit" class="checkbox checkbox-xs" id="Credit"
|
||||
type="checkbox" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="userCards.length > 0">
|
||||
<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="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>
|
||||
<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">Other </label>
|
||||
@@ -161,97 +216,129 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-span-12 xl:col-span-6 p-5">
|
||||
<div class="grid grid-cols-12">
|
||||
<div class="col-span-12 font-bold flex pb-5 text-lg">{{ customer.account_number }}</div>
|
||||
<div class="col-span-12 font-bold flex">
|
||||
{{ customer.customer_first_name }}
|
||||
{{ customer.customer_last_name }}
|
||||
|
||||
<div class="grid grid-cols-12 ">
|
||||
<div class="col-span-12 text-2xl">Add a Credit Card</div>
|
||||
|
||||
<div class="col-span-12">
|
||||
<form class="rounded-md px-8 pt-6 pb-8 mb-4 w-full" enctype="multipart/form-data"
|
||||
@submit.prevent="onSubmitCard">
|
||||
|
||||
<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">Main Card</label>
|
||||
<input v-model="CreateCardForm.basicInfo.main_card" class="checkbox" id="fill" type="checkbox" />
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label class="block text-white text-sm font-bold mb-2">Name on Card</label>
|
||||
<input v-model="CreateCardForm.basicInfo.card_name"
|
||||
class="input input-bordered input-sm w-full max-w-xs" id="title" type="text"
|
||||
placeholder="Name on Card" />
|
||||
<span v-if="v$.CreateCardForm.basicInfo.card_name.$error" class="text-red-600 text-center">
|
||||
{{ v$.CreateCardForm.basicInfo.card_name.$errors[0].$message }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label class="block text-white text-sm font-bold mb-2">Card Number</label>
|
||||
<input v-model="CreateCardForm.basicInfo.card_number"
|
||||
class="input input-bordered input-sm w-full max-w-xs" id="title" type="text"
|
||||
placeholder="Card Number" />
|
||||
<span v-if="v$.CreateCardForm.basicInfo.card_number.$error" class="text-red-600 text-center">
|
||||
{{ v$.CreateCardForm.basicInfo.card_number.$errors[0].$message }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label class="block text-white text-sm font-bold mb-2">Expiration Month</label>
|
||||
<select v-model="CreateCardForm.basicInfo.expiration_month"
|
||||
class="input input-bordered input-sm w-full max-w-xs" id="Month">
|
||||
<option>01</option>
|
||||
<option>02</option>
|
||||
<option>03</option>
|
||||
<option>04</option>
|
||||
<option>05</option>
|
||||
<option>06</option>
|
||||
<option>07</option>
|
||||
<option>08</option>
|
||||
<option>09</option>
|
||||
<option>10</option>
|
||||
<option>11</option>
|
||||
<option>12</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label class="block text-white text-sm font-bold mb-2">Expiration Year</label>
|
||||
<select v-model="CreateCardForm.basicInfo.expiration_year"
|
||||
class="input input-bordered input-sm w-full max-w-xs" id="Month">
|
||||
<option>2024</option>
|
||||
<option>2025</option>
|
||||
<option>2026</option>
|
||||
<option>2027</option>
|
||||
<option>2028</option>
|
||||
<option>2029</option>
|
||||
<option>2030</option>
|
||||
</select>
|
||||
|
||||
<span v-if="v$.CreateCardForm.basicInfo.expiration_year.$error" class="text-red-600 text-center">
|
||||
{{ v$.CreateCardForm.basicInfo.expiration_year.$errors[0].$message }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label class="block text-white text-sm font-bold mb-2">Type of Card</label>
|
||||
<select v-model="CreateCardForm.basicInfo.type_of_card"
|
||||
class="input input-bordered input-sm w-full max-w-xs" id="Month">
|
||||
<option>Visa</option>
|
||||
<option>MasterCard</option>
|
||||
<option>Discover</option>
|
||||
<option>American Express</option>
|
||||
</select>
|
||||
|
||||
<span v-if="v$.CreateCardForm.basicInfo.type_of_card.$error" class="text-red-600 text-center">
|
||||
{{ v$.CreateCardForm.basicInfo.type_of_card.$errors[0].$message }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label class="block text-white text-sm font-bold mb-2">Security Number</label>
|
||||
<input v-model="CreateCardForm.basicInfo.security_number"
|
||||
class="input input-bordered input-sm w-full max-w-xs" id="title" type="text"
|
||||
placeholder="Back of card" />
|
||||
<span v-if="v$.CreateCardForm.basicInfo.security_number.$error" class="text-red-600 text-center">
|
||||
{{ v$.CreateCardForm.basicInfo.security_number.$errors[0].$message }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label class="block text-white text-sm font-bold mb-2">Zip Code</label>
|
||||
<input v-model="CreateCardForm.basicInfo.zip_code"
|
||||
class="input input-bordered input-sm w-full max-w-xs" id="title" type="text"
|
||||
placeholder="Zip Code" />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-span-12 md:col-span-12 flex mt-5 mb-5">
|
||||
<button class="btn-sm btn bg-orange-600 text-white">
|
||||
Save Credit Card
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-span-12 font-bold flex">
|
||||
<div class="pr-2">
|
||||
{{ customer.customer_town }},
|
||||
</div>
|
||||
<div class="pr-2">
|
||||
<div v-if="customer.customer_state == 0">Massachusetts</div>
|
||||
<div v-else-if="customer.customer_state == 1">Rhode Island</div>
|
||||
<div v-else-if="customer.customer_state == 2">New Hampshire</div>
|
||||
<div v-else-if="customer.customer_state == 3">Maine</div>
|
||||
<div v-else-if="customer.customer_state == 4">Vermont</div>
|
||||
<div v-else-if="customer.customer_state == 5">Maine</div>
|
||||
<div v-else-if="customer.customer_state == 6">New York</div>
|
||||
<div v-else>Unknown state</div>
|
||||
</div>
|
||||
<div class="pr-2">
|
||||
{{ customer.customer_zip }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-span-12 font-bold flex" v-if="customer.customer_apt !== 'None'">
|
||||
{{ customer.customer_apt }}
|
||||
</div>
|
||||
<div class="col-span-12 font-bold flex">
|
||||
<div v-if="customer.customer_home_type == 0">Residential</div>
|
||||
<div v-else-if="customer.customer_home_type == 1">apartment</div>
|
||||
<div v-else-if="customer.customer_home_type == 2">condo</div>
|
||||
<div v-else-if="customer.customer_home_type == 3">commercial</div>
|
||||
<div v-else-if="customer.customer_home_type == 4">business</div>
|
||||
<div v-else-if="customer.customer_home_type == 5">construction</div>
|
||||
<div v-else-if="customer.customer_home_type == 6">container</div>
|
||||
</div>
|
||||
<div class="col-span-12 font-bold flex">
|
||||
{{ customer.customer_phone_number }}
|
||||
</div>
|
||||
<table class="table col-span-12">
|
||||
<!-- head -->
|
||||
<thead>
|
||||
<tr>
|
||||
<th>id</th>
|
||||
<th>Date</th>
|
||||
<th>Gallons</th>
|
||||
<th>Status</th>
|
||||
<th>Prime</th>
|
||||
<th>Same Day</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- row 1 -->
|
||||
<tr v-for="oil in deliveries" :key="oil['id']">
|
||||
<td>{{ oil['id'] }}</td>
|
||||
<td>{{ oil['expected_delivery_date'] }}</td>
|
||||
<td>
|
||||
<div v-if="oil['customer_asked_for_fill'] == 1">Fill</div>
|
||||
<div v-else> {{ oil['gallons_ordered'] }}</div>
|
||||
</td>
|
||||
<td>
|
||||
<div v-if="oil['delivery_status'] == 0">Waiting</div>
|
||||
<div v-else-if="oil['delivery_status'] == 1">delivered</div>
|
||||
<div v-else-if="oil['delivery_status'] == 2">Out for Delivery</div>
|
||||
<div v-else-if="oil['delivery_status'] == 3">Cancelled</div>
|
||||
<div v-else-if="oil['delivery_status'] == 4">Partial Delivery</div>
|
||||
<div v-else-if="oil['delivery_status'] == 5">Issue</div>
|
||||
<div v-else-if="oil['delivery_status'] == 10">Finalized</div>
|
||||
<div v-else></div>
|
||||
</td>
|
||||
<td>
|
||||
<div v-if="oil['prime'] == 0">No</div>
|
||||
<div v-else>Yes</div>
|
||||
</td>
|
||||
<td>
|
||||
<div v-if="oil['same_day'] == 0">No</div>
|
||||
<div v-else>Yes</div>
|
||||
</td>
|
||||
<td class="flex gap-5">
|
||||
<router-link :to="{ name: 'deliveryEdit', params: { id: oil['id'] } }">
|
||||
<button class="btn btn-sm btn-secondary">Edit</button>
|
||||
</router-link>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="grid grid-cols-12 ">
|
||||
<div class="col-span-12 text-center font-bold text-3xl">Remind customer of tank Inspection</div>
|
||||
<div class="col-span-12 text-center font-bold text-3xl">Ask how they heard about us</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -307,6 +394,18 @@ export default defineComponent({
|
||||
driver_driver: '',
|
||||
},
|
||||
},
|
||||
CreateCardForm: {
|
||||
basicInfo: {
|
||||
card_name: '',
|
||||
expiration_month: '',
|
||||
expiration_year: '',
|
||||
type_of_card: '',
|
||||
security_number: '',
|
||||
card_number: '',
|
||||
zip_code: '',
|
||||
main_card: false,
|
||||
},
|
||||
},
|
||||
deliveries: [],
|
||||
customer: {
|
||||
id: 0,
|
||||
@@ -328,6 +427,17 @@ export default defineComponent({
|
||||
},
|
||||
validations() {
|
||||
return {
|
||||
CreateCardForm: {
|
||||
basicInfo: {
|
||||
card_name: { required, minLength: minLength(1) },
|
||||
expiration_month: { required, minLength: minLength(1) },
|
||||
expiration_year: { required, minLength: minLength(1) },
|
||||
security_number: { required, minLength: minLength(1) },
|
||||
type_of_card: { required, minLength: minLength(1) },
|
||||
card_number: { required, minLength: minLength(1) },
|
||||
},
|
||||
},
|
||||
|
||||
CreateOilOrderForm: {
|
||||
basicInfo: {
|
||||
gallons_ordered: { required, minLength: minLength(1) },
|
||||
@@ -350,7 +460,7 @@ export default defineComponent({
|
||||
},
|
||||
mounted() {
|
||||
this.getCustomer(this.$route.params.id)
|
||||
|
||||
|
||||
this.getPaymentCards(this.$route.params.id);
|
||||
this.getCustomerDelivery(this.$route.params.id)
|
||||
},
|
||||
@@ -392,6 +502,9 @@ export default defineComponent({
|
||||
});
|
||||
});
|
||||
},
|
||||
test() {
|
||||
this.CreateOilOrderForm.basicInfo.gallons_ordered = '100'
|
||||
},
|
||||
getCustomerDelivery(userid: any) {
|
||||
let path = import.meta.env.VITE_BASE_URL + '/delivery/customer/' + userid + '/1';
|
||||
axios({
|
||||
@@ -412,12 +525,13 @@ export default defineComponent({
|
||||
})
|
||||
.then((response: any) => {
|
||||
this.userCards = response.data;
|
||||
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
getPromos() {
|
||||
let path = import.meta.env.VITE_BASE_URL + "/promo/all" ;
|
||||
let path = import.meta.env.VITE_BASE_URL + "/promo/all";
|
||||
axios({
|
||||
method: "get",
|
||||
url: path,
|
||||
@@ -502,7 +616,7 @@ export default defineComponent({
|
||||
text: "Did not add a driver",
|
||||
type: "error",
|
||||
});
|
||||
pass += 1;
|
||||
pass += 1;
|
||||
}
|
||||
if (this.CreateOilOrderForm.basicInfo.cash === false && this.CreateOilOrderForm.basicInfo.credit === false && this.CreateOilOrderForm.basicInfo.check === false && this.CreateOilOrderForm.basicInfo.other === false) {
|
||||
notify({
|
||||
@@ -510,12 +624,59 @@ export default defineComponent({
|
||||
text: "Did not select a payment method",
|
||||
type: "error",
|
||||
});
|
||||
pass += 1;
|
||||
pass += 1;
|
||||
}
|
||||
if (pass == 0) {
|
||||
this.CreateOilOrder(payload);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
CreateCard(payload: {
|
||||
card_name: string;
|
||||
expiration_month: string;
|
||||
expiration_year: string;
|
||||
type_of_card: string;
|
||||
security_number: string;
|
||||
zip_code: string;
|
||||
card_number: string;
|
||||
main_card: boolean;
|
||||
}) {
|
||||
let path = import.meta.env.VITE_BASE_URL + "/payment/card/create/" + this.customer.id;
|
||||
axios({
|
||||
method: "post",
|
||||
url: path,
|
||||
data: payload,
|
||||
withCredentials: true,
|
||||
headers: authHeader(),
|
||||
})
|
||||
.then((response: any) => {
|
||||
if (response.data.ok) {
|
||||
this.getPaymentCards(this.$route.params.id)
|
||||
}
|
||||
if (response.data.error) {
|
||||
notify({
|
||||
title: "Error",
|
||||
text: "Error adding card",
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
onSubmitCard() {
|
||||
let payload = {
|
||||
card_name: this.CreateCardForm.basicInfo.card_name,
|
||||
card_number: this.CreateCardForm.basicInfo.card_number,
|
||||
expiration_month: this.CreateCardForm.basicInfo.expiration_month,
|
||||
expiration_year: this.CreateCardForm.basicInfo.expiration_year,
|
||||
type_of_card: this.CreateCardForm.basicInfo.type_of_card,
|
||||
security_number: this.CreateCardForm.basicInfo.security_number,
|
||||
main_card: this.CreateCardForm.basicInfo.main_card,
|
||||
zip_code: this.CreateCardForm.basicInfo.zip_code,
|
||||
};
|
||||
this.CreateCard(payload);
|
||||
},
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="grid grid-cols-1 rounded-md p-6 ">
|
||||
<div class="grid grid-cols-2 rounded-md p-6 ">
|
||||
<div class="col-span-1">
|
||||
<div class="text-2xl border-b border-gray-500 mb-10">
|
||||
Edit Oil Delivery
|
||||
</div>
|
||||
@@ -38,6 +39,7 @@
|
||||
{{ customer.customer_first_name }}
|
||||
{{ customer.customer_last_name }}
|
||||
</div>
|
||||
<div class="col-span-12 flex">{{customer.customer_address}}</div>
|
||||
<div class="col-span-12 flex">
|
||||
<div class="pr-2">
|
||||
{{ customer.customer_town }},
|
||||
@@ -78,9 +80,9 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="grid grid-cols-1" v-if="deliveryOrder.payment_type == 1">
|
||||
<div class="flex ">
|
||||
<div class="basis-1/3 p-2 ">
|
||||
<div class="grid grid-cols-1 " v-if="deliveryOrder.payment_type == 1">
|
||||
|
||||
<div class=" p-2 ">
|
||||
<div class="rounded-md border-2 bg-neutral">
|
||||
<div class="flex p-3">
|
||||
{{ userCard.type_of_card }}
|
||||
@@ -94,8 +96,11 @@
|
||||
<div class="flex p-1 pl-4">
|
||||
{{ userCard.expiration_month }}/ {{ userCard.expiration_year }}
|
||||
</div>
|
||||
<div class="flex p-1 pl-4">
|
||||
{{ userCard.security_number }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -122,8 +127,8 @@
|
||||
{{ deliveryOrder.customer_price }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-span-1">
|
||||
<form class="rounded-md px-8 pb-8 mb-4 w-full" enctype="multipart/form-data" @submit.prevent="onSubmit">
|
||||
<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">Cash</label>
|
||||
@@ -165,6 +170,14 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="flex-1 mb-4">
|
||||
<label class="block text-white text-sm font-bold mb-2">Delivery Status</label>
|
||||
<select class="select select-bordered select-sm w-full max-w-xs" aria-label="Default select example"
|
||||
@@ -255,11 +268,12 @@
|
||||
|
||||
<div class="col-span-12 md:col-span-12 flex mt-5 mb-5">
|
||||
<button class="btn btn-accent btn-sm">
|
||||
Submit Edit Oil Delivery
|
||||
Save Changes
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Footer />
|
||||
@@ -312,6 +326,7 @@ export default defineComponent({
|
||||
id: 0,
|
||||
user_id: 0,
|
||||
customer_first_name: '',
|
||||
customer_address: '',
|
||||
customer_last_name: '',
|
||||
customer_town: '',
|
||||
customer_state: 0,
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-span-12 flex start pb-10 text-2xl">All Deliveries Not Finished</div>
|
||||
<div class="col-span-12 flex start pb-10 text-2xl">Recent 100 delivieres </div>
|
||||
|
||||
|
||||
<div class="col-span-12 overflow-x-auto bg-neutral">
|
||||
@@ -38,7 +38,7 @@
|
||||
<!-- head -->
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Account #</th>
|
||||
<th>Name</th>
|
||||
<th>Status</th>
|
||||
<th>Town</th>
|
||||
@@ -56,7 +56,7 @@
|
||||
<!-- row 1 -->
|
||||
<tr v-for="oil in deliveries" :key="oil['id']">
|
||||
<td>{{ oil['id'] }} </td>
|
||||
<router-link :to="{ name: 'customerProfile', params: { id: oil['customer_id'] } }">
|
||||
<router-link :to="{ name: 'customerProfile', params: { id: oil['id'] } }">
|
||||
<td>
|
||||
<div class="hover:text-accent">{{ oil['customer_name'] }} </div>
|
||||
</td>
|
||||
@@ -118,16 +118,16 @@
|
||||
<router-link :to="{ name: 'deliveryEdit', params: { id: oil['id'] } }">
|
||||
<button class="btn btn-secondary btn-sm">Edit Delivery</button>
|
||||
</router-link>
|
||||
<router-link :to="{ name: 'Ticket', params: { id: oil['id'] } }">
|
||||
<button class="btn btn-secondary btn-sm">
|
||||
|
||||
<router-link :to="{ name: 'finalizeTicket', params: { id: oil['id'] } }" v-if="oil['delivery_status'] != 10">
|
||||
<button class="btn btn-secondary btn-sm">Finalize</button>
|
||||
</router-link>
|
||||
|
||||
<router-link :to="{ name: 'Ticket', params: { id: oil['id'] } }">
|
||||
<button class="btn btn-success btn-sm">
|
||||
Print Ticket
|
||||
</button>
|
||||
</router-link>
|
||||
<router-link :to="{ name: 'finalizeTicket', params: { id: oil['id'] } }">
|
||||
<button class="btn btn-secondary btn-sm">Finalize</button>
|
||||
</router-link>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
{{ customer.customer_first_name }}
|
||||
{{ customer.customer_last_name }}
|
||||
</div>
|
||||
<div class="col-span-12 font-bold ">{{customer.customer_address}}</div>
|
||||
<div class="col-span-12 font-bold flex">
|
||||
<div class="pr-2">
|
||||
{{ customer.customer_town }},
|
||||
@@ -213,6 +214,8 @@
|
||||
{{ deliveryOrder.gallons_delivered }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-span-12" v-if="deliveryOrder.prime == 1">
|
||||
<div class="">
|
||||
Prime Fee:
|
||||
@@ -318,52 +321,37 @@
|
||||
|
||||
<div class="col-span-6">
|
||||
<form class="rounded-md px-8 pb-8 mb-4 w-full" enctype="multipart/form-data" @submit.prevent="onSubmit">
|
||||
|
||||
<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">Cash</label>
|
||||
<input v-model="FinalizeOilOrderForm.cash" class="checkbox checkbox-xs" id="cash" type="checkbox" />
|
||||
<div class="grid grid-cols-12">
|
||||
<div class="col-span-12 mb-4">
|
||||
<label class="block text-white text-sm font-bold mb-2">Gallons Delivered</label>
|
||||
<input v-model="FinalizeOilOrderForm.gallons_delivered"
|
||||
class="input input-bordered input-sm w-full max-w-xs" id="title" type="text"
|
||||
placeholder="# gallons" />
|
||||
</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">Credit Card</label>
|
||||
<input v-model="FinalizeOilOrderForm.card" class="checkbox checkbox-xs" id="Credit" type="checkbox" />
|
||||
<div class="col-span-12 mb-4 ">
|
||||
<label class="block text-white text-sm font-bold mb-2">Fill Location</label>
|
||||
<input v-model="FinalizeOilOrderForm.fill_location"
|
||||
class="input input-bordered input-sm w-full max-w-xs" id="title" type="text"
|
||||
placeholder="Fill location (1-12)" />
|
||||
</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="FinalizeOilOrderForm.check" class="checkbox checkbox-xs" id="check" 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">Other</label>
|
||||
<input v-model="FinalizeOilOrderForm.other" class="checkbox checkbox-xs" id="check" type="checkbox" />
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<div class="col-span-12 mb-4">
|
||||
<label class="block text-white text-sm font-bold mb-2">Cash Recieved</label>
|
||||
<input v-model="FinalizeOilOrderForm.cash_recieved"
|
||||
class="input input-bordered input-sm w-full max-w-xs" id="title" type="text"
|
||||
placeholder="Cash from delivery recieved" />
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label class="block text-white text-sm font-bold mb-2">check Number</label>
|
||||
<div class="col-span-12 mb-4">
|
||||
<label class="block text-white text-sm font-bold mb-2">Check #</label>
|
||||
<input v-model="FinalizeOilOrderForm.check_number"
|
||||
class="input input-bordered input-sm w-full max-w-xs" id="title" type="text"
|
||||
placeholder="Check Number" />
|
||||
</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"
|
||||
id="userCards" v-model="FinalizeOilOrderForm.userCards">
|
||||
<option class="text-white" v-for="(card, index) in userCards" :key="index" :value="card['id']">
|
||||
{{ card['type_of_card'] }} {{ card['card_number'] }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="flex-1 mb-4">
|
||||
<div class="col-span-12 flex-1 mb-4">
|
||||
<label class="block text-white text-sm font-bold mb-2">Delivery Status</label>
|
||||
<select class="select select-bordered select-sm w-full max-w-xs" aria-label="Default select example"
|
||||
id="delivery_status" v-model="FinalizeOilOrderForm.delivery_status">
|
||||
@@ -380,43 +368,16 @@
|
||||
type="checkbox" />
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label class="block text-white text-sm font-bold mb-2">Gallons Delivered</label>
|
||||
<input v-model="FinalizeOilOrderForm.gallons_delivered"
|
||||
class="input input-bordered input-sm w-full max-w-xs" id="title" type="text"
|
||||
placeholder="# gallons" />
|
||||
</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">Emergency</label>
|
||||
<input v-model="FinalizeOilOrderForm.emergency" class="checkbox checkbox-xs" id="prime"
|
||||
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">Prime</label>
|
||||
<input v-model="FinalizeOilOrderForm.prime" class="checkbox checkbox-xs" id="prime" 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">Same Day</label>
|
||||
<input v-model="FinalizeOilOrderForm.same_day" class="checkbox checkbox-xs" id="same_day"
|
||||
type="checkbox" />
|
||||
</div>
|
||||
|
||||
<div class="mb-4 ">
|
||||
<label class="block text-white text-sm font-bold mb-2">Fill Location</label>
|
||||
<input v-model="FinalizeOilOrderForm.fill_location"
|
||||
class="input input-bordered input-sm w-full max-w-xs" id="title" type="text"
|
||||
placeholder="Fill location in clock format" />
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-span-12 md:col-span-12 flex mt-5 mb-5">
|
||||
<button class="btn btn-secondary btn-sm">
|
||||
Finalize Delivery
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -470,7 +431,7 @@ export default defineComponent({
|
||||
cash_recieved: '',
|
||||
fill_location: 0,
|
||||
check_number: 0,
|
||||
delivery_status: '',
|
||||
delivery_status: 10,
|
||||
userCards: [],
|
||||
credit_card_id: 0,
|
||||
driver: 0,
|
||||
@@ -508,6 +469,7 @@ export default defineComponent({
|
||||
customer: {
|
||||
id: 0,
|
||||
user_id: 0,
|
||||
customer_address: '',
|
||||
customer_first_name: '',
|
||||
customer_last_name: '',
|
||||
customer_town: '',
|
||||
@@ -630,58 +592,15 @@ export default defineComponent({
|
||||
if (this.deliveryOrder.payment_type === 3) {
|
||||
this.getPaymentCard(this.deliveryOrder.payment_card_id);
|
||||
}
|
||||
if (response.data.prime == 1) {
|
||||
this.FinalizeOilOrderForm.prime = true
|
||||
}
|
||||
if (response.data.same_day == 1) {
|
||||
this.FinalizeOilOrderForm.same_day = true
|
||||
}
|
||||
if (response.data.emergency == 1) {
|
||||
this.FinalizeOilOrderForm.emergency = true
|
||||
}
|
||||
|
||||
this.FinalizeOilOrderForm.cash_recieved = response.data.cash_recieved;
|
||||
this.FinalizeOilOrderForm.check_number = response.data.check_number;
|
||||
this.FinalizeOilOrderForm.delivery_status = response.data.delivery_status;
|
||||
this.FinalizeOilOrderForm.credit_card_id = response.data.payment_card_id;
|
||||
|
||||
if (response.data.customer_filled == 1) {
|
||||
this.FinalizeOilOrderForm.customer_filled = true
|
||||
}
|
||||
// Cash
|
||||
if (response.data.payment_type == 0) {
|
||||
this.FinalizeOilOrderForm.card = false
|
||||
this.FinalizeOilOrderForm.cash = true
|
||||
this.FinalizeOilOrderForm.check = false
|
||||
this.FinalizeOilOrderForm.other = false
|
||||
}
|
||||
// Credit card
|
||||
if (response.data.payment_type == 1) {
|
||||
this.FinalizeOilOrderForm.card = true
|
||||
this.FinalizeOilOrderForm.cash = false
|
||||
this.FinalizeOilOrderForm.check = false
|
||||
this.FinalizeOilOrderForm.other = false
|
||||
}
|
||||
// Credit card/Cash
|
||||
if (response.data.payment_type == 2) {
|
||||
this.FinalizeOilOrderForm.card = true
|
||||
this.FinalizeOilOrderForm.cash = true
|
||||
this.FinalizeOilOrderForm.check = false
|
||||
this.FinalizeOilOrderForm.other = false
|
||||
}
|
||||
// Check
|
||||
if (response.data.payment_type == 3) {
|
||||
this.FinalizeOilOrderForm.card = false
|
||||
this.FinalizeOilOrderForm.cash = false
|
||||
this.FinalizeOilOrderForm.check = true
|
||||
this.FinalizeOilOrderForm.other = false
|
||||
}
|
||||
// Other
|
||||
if (response.data.payment_type == 4) {
|
||||
this.FinalizeOilOrderForm.card = false
|
||||
this.FinalizeOilOrderForm.cash = false
|
||||
this.FinalizeOilOrderForm.check = false
|
||||
this.FinalizeOilOrderForm.other = true
|
||||
}
|
||||
this.FinalizeOilOrderForm.gallons_delivered = response.data.gallons_delivered;
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -881,20 +800,14 @@ export default defineComponent({
|
||||
},
|
||||
|
||||
FinalizeOrder(payload: {
|
||||
cash: boolean,
|
||||
card: boolean,
|
||||
check: boolean,
|
||||
other: boolean,
|
||||
|
||||
cash_recieved: string,
|
||||
check_number: number,
|
||||
delivery_status: any,
|
||||
credit_card_id: number,
|
||||
driver_employee_id: number,
|
||||
gallons_delivered: string,
|
||||
customer_filled: boolean,
|
||||
prime: boolean,
|
||||
same_day: boolean,
|
||||
emergency: boolean,
|
||||
|
||||
fill_location: number,
|
||||
|
||||
}) {
|
||||
@@ -914,7 +827,7 @@ export default defineComponent({
|
||||
type: "success",
|
||||
});
|
||||
this.CreateTransaction()
|
||||
this.$router.push({ name: "delivery" });
|
||||
this.$router.push({ name: "deliveryWaiting" });
|
||||
|
||||
}
|
||||
if (response.data.error) {
|
||||
@@ -936,20 +849,14 @@ export default defineComponent({
|
||||
this.UpdateAuto(auto_payload);
|
||||
}
|
||||
let payload = {
|
||||
cash: this.FinalizeOilOrderForm.cash,
|
||||
card: this.FinalizeOilOrderForm.card,
|
||||
check: this.FinalizeOilOrderForm.check,
|
||||
other: this.FinalizeOilOrderForm.other,
|
||||
|
||||
cash_recieved: this.FinalizeOilOrderForm.cash_recieved,
|
||||
check_number: this.FinalizeOilOrderForm.check_number,
|
||||
delivery_status: this.FinalizeOilOrderForm.delivery_status,
|
||||
credit_card_id: this.FinalizeOilOrderForm.credit_card_id,
|
||||
driver_employee_id: this.FinalizeOilOrderForm.driver,
|
||||
gallons_delivered: this.FinalizeOilOrderForm.gallons_delivered,
|
||||
customer_filled: this.FinalizeOilOrderForm.customer_filled,
|
||||
prime: this.FinalizeOilOrderForm.prime,
|
||||
same_day: this.FinalizeOilOrderForm.same_day,
|
||||
emergency: this.FinalizeOilOrderForm.emergency,
|
||||
|
||||
fill_location: this.FinalizeOilOrderForm.fill_location,
|
||||
};
|
||||
this.FinalizeOrder(payload);
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
{{ customer.customer_first_name }}
|
||||
{{ customer.customer_last_name }}
|
||||
</div>
|
||||
<div class="col-span-12 flex">{{customer.customer_address}}</div>
|
||||
<div class="col-span-12 flex ">
|
||||
<div class="pr-2">
|
||||
{{ customer.customer_town }},
|
||||
@@ -128,12 +129,12 @@
|
||||
{{ (deliveryOrder.when_ordered) }}
|
||||
</div>
|
||||
<div v-if="deliveryOrder.delivery_status == 10">
|
||||
<div class="col-span-12 font-bold">
|
||||
When Delivered
|
||||
</div>
|
||||
<div class="col-span-12 mb-5 text-sm text-gray-500">
|
||||
{{ (deliveryOrder.when_delivered) }}
|
||||
</div>
|
||||
<div class="col-span-12 font-bold">
|
||||
When Delivered
|
||||
</div>
|
||||
<div class="col-span-12 mb-5 text-sm text-gray-500">
|
||||
{{ (deliveryOrder.when_delivered) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -181,20 +182,20 @@
|
||||
</div>
|
||||
|
||||
<div v-if="deliveryOrder.delivery_status !== 10">
|
||||
<div class="col-span-12 font-bold">
|
||||
Promo
|
||||
</div>
|
||||
<div class="grid grid-cols-12 p-5">
|
||||
<div class="col-span-12 text-sm text-gray-500">
|
||||
<div v-if="deliveryOrder.promo_id !== null">
|
||||
<div class="">{{ promo.name_of_promotion }}</div>
|
||||
<div class="">{{ promo.description }}</div>
|
||||
<div class="">{{ promo.money_off_delivery }} off a gallon</div>
|
||||
<div class="">{{ promo.text_on_ticket }}</div>
|
||||
</div>
|
||||
<div v-else>No Promo Added</div>
|
||||
<div class="col-span-12 font-bold">
|
||||
Promo
|
||||
</div>
|
||||
<div class="grid grid-cols-12 p-5">
|
||||
<div class="col-span-12 text-sm text-gray-500">
|
||||
<div v-if="deliveryOrder.promo_id !== null">
|
||||
<div class="">{{ promo.name_of_promotion }}</div>
|
||||
<div class="">{{ promo.description }}</div>
|
||||
<div class="">{{ promo.money_off_delivery }} off a gallon</div>
|
||||
<div class="">{{ promo.text_on_ticket }}</div>
|
||||
</div>
|
||||
<div v-else>No Promo Added</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="deliveryOrder.delivery_status !== 10">
|
||||
@@ -204,36 +205,36 @@
|
||||
<div class="grid grid-cols-12 p-5">
|
||||
<div class="col-span-12 text-sm text-gray-500">
|
||||
<div class="col-span-12 text-gray-500">
|
||||
<div v-if="deliveryOrder.customer_asked_for_fill == 1"> FILL (250)</div>
|
||||
<div v-else> Gallons Ordered: {{ deliveryOrder.gallons_ordered }}</div>
|
||||
</div>
|
||||
<div v-if="deliveryOrder.customer_asked_for_fill == 1"> FILL (250)</div>
|
||||
<div v-else> Gallons Ordered: {{ deliveryOrder.gallons_ordered }}</div>
|
||||
</div>
|
||||
|
||||
<div v-if="deliveryOrder.promo_id !== null">
|
||||
<div class="col-span-12 text-sm text-gray-500">
|
||||
Before Discount: {{ total_amount }}
|
||||
<div v-if="deliveryOrder.promo_id !== null">
|
||||
<div class="col-span-12 text-sm text-gray-500">
|
||||
Before Discount: {{ total_amount }}
|
||||
</div>
|
||||
<div class="col-span-12 text-sm text-gray-500">
|
||||
Discount Amount: ${{ discount }}
|
||||
</div>
|
||||
<div class="col-span-12 text-sm text-gray-500">
|
||||
Promo Amount: ${{ total_amount_after_discount }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-span-12 text-sm text-gray-500">
|
||||
Discount Amount: ${{ discount }}
|
||||
<div v-else>
|
||||
<div class="col-span-12 text-sm text-gray-500">
|
||||
${{ total_amount }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-span-12 text-sm text-gray-500">
|
||||
Promo Amount: ${{ total_amount_after_discount }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="col-span-12 text-sm text-gray-500">
|
||||
${{ total_amount }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-span-12 py-3" v-if="deliveryOrder.prime == 1">
|
||||
Prime Fee: {{ pricing.price_prime }}
|
||||
</div>
|
||||
<div class="col-span-12 py-3" v-if="deliveryOrder.emergency == 1">
|
||||
Emergency Fee: {{ pricing.price_emergency }}
|
||||
</div>
|
||||
<div class="col-span-12 py-3" v-if="deliveryOrder.same_day == 1">
|
||||
Same Day: {{ pricing.price_same_day }}
|
||||
</div>
|
||||
<div class="col-span-12 py-3" v-if="deliveryOrder.prime == 1">
|
||||
Prime Fee: {{ pricing.price_prime }}
|
||||
</div>
|
||||
<div class="col-span-12 py-3" v-if="deliveryOrder.emergency == 1">
|
||||
Emergency Fee: {{ pricing.price_emergency }}
|
||||
</div>
|
||||
<div class="col-span-12 py-3" v-if="deliveryOrder.same_day == 1">
|
||||
Same Day: {{ pricing.price_same_day }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -252,7 +253,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-span-12 font-bold">
|
||||
Payment
|
||||
</div>
|
||||
@@ -331,12 +332,25 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-span-12 flex justify-center" v-if="deliveryOrder.id">
|
||||
<router-link :to="{ name: 'customerProfile', params: { id: deliveryOrder['customer_id'] } }">
|
||||
<div class="col-span-12 " v-if="deliveryOrder.id">
|
||||
<router-link :to="{ name: 'customerProfile', params: { id: deliveryOrder['customer_id'] } }">
|
||||
<button class="btn btn-neutral btn-sm">View Customer</button>
|
||||
</router-link>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-span-12 pt-5" v-if="deliveryOrder.id">
|
||||
<router-link :to="{ name: 'deliveryEdit', params: { id: deliveryOrder['id'] } }">
|
||||
<button class="btn btn-sm btn-secondary">Edit</button>
|
||||
</router-link>
|
||||
</div>
|
||||
|
||||
<div class="col-span-12 pt-5" v-if="deliveryOrder.id">
|
||||
<router-link :to="{ name: 'Ticket', params: { id: deliveryOrder['id'] } }">
|
||||
<button class="btn btn-success btn-sm">Print Ticket</button>
|
||||
</router-link>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -400,6 +414,7 @@ export default defineComponent({
|
||||
customer_last_name: '',
|
||||
customer_town: '',
|
||||
customer_state: 0,
|
||||
customer_address: '',
|
||||
customer_zip: '',
|
||||
customer_apt: '',
|
||||
customer_home_type: 0,
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
<button class="btn btn-secondary btn-sm">Edit Delivery</button>
|
||||
</router-link>
|
||||
<router-link :to="{ name: 'Ticket', params: { id: oil['id'] } }">
|
||||
<button class="btn btn-secondary btn-sm">
|
||||
<button class="btn btn-success btn-sm">
|
||||
Print Ticket
|
||||
</button>
|
||||
</router-link>
|
||||
|
||||
@@ -104,15 +104,15 @@
|
||||
<router-link :to="{ name: 'deliveryEdit', params: { id: oil['id'] } }">
|
||||
<button class="btn btn-secondary btn-sm">Edit Delivery</button>
|
||||
</router-link>
|
||||
<router-link :to="{ name: 'Ticket', params: { id: oil['id'] } }">
|
||||
<button class="btn btn-secondary btn-sm">
|
||||
Print Ticket
|
||||
</button>
|
||||
</router-link>
|
||||
|
||||
<router-link :to="{ name: 'finalizeTicket', params: { id: oil['id'] } }">
|
||||
<button class="btn btn-secondary btn-sm">Finalize</button>
|
||||
</router-link>
|
||||
|
||||
<router-link :to="{ name: 'Ticket', params: { id: oil['id'] } }">
|
||||
<button class="btn btn-success btn-sm">
|
||||
Print Ticket
|
||||
</button>
|
||||
</router-link>
|
||||
<!-- <button @click.prevent="deleteCall(oil['id'])" class="btn btn-error btn-sm">
|
||||
Delete
|
||||
</button> -->
|
||||
@@ -204,11 +204,7 @@ export default defineComponent({
|
||||
headers: authHeader(),
|
||||
}).then((response: any) => {
|
||||
if (response.data.update)
|
||||
notify({
|
||||
title: "Success",
|
||||
text: "Updated delivery",
|
||||
type: "success",
|
||||
});
|
||||
console.log("success")
|
||||
else { }
|
||||
})
|
||||
},
|
||||
|
||||
@@ -87,11 +87,10 @@
|
||||
<button class="btn btn-secondary btn-sm">Edit Delivery</button>
|
||||
</router-link>
|
||||
<router-link :to="{ name: 'Ticket', params: { id: oil['id'] } }">
|
||||
<button class="btn btn-secondary btn-sm ">
|
||||
<button class="btn btn-success btn-sm ">
|
||||
Print Ticket
|
||||
</button>
|
||||
</router-link>
|
||||
|
||||
<!-- <button @click.prevent="deleteCall(oil['id'])" class="btn btn-error btn-sm">
|
||||
Delete
|
||||
</button> -->
|
||||
|
||||
@@ -84,15 +84,16 @@
|
||||
<router-link :to="{ name: 'deliveryEdit', params: { id: oil['id'] } }">
|
||||
<button class="btn btn-secondary btn-sm">Edit Delivery</button>
|
||||
</router-link>
|
||||
<router-link :to="{ name: 'Ticket', params: { id: oil['id'] } }">
|
||||
<button class="btn btn-secondary btn-sm">
|
||||
Print Ticket
|
||||
</button>
|
||||
</router-link>
|
||||
|
||||
|
||||
<router-link :to="{ name: 'finalizeTicket', params: { id: oil['id'] } }">
|
||||
<button class="btn btn-secondary btn-sm">Finalize</button>
|
||||
</router-link>
|
||||
|
||||
<router-link :to="{ name: 'Ticket', params: { id: oil['id'] } }">
|
||||
<button class="btn btn-success btn-sm">
|
||||
Print Ticket
|
||||
</button>
|
||||
</router-link>
|
||||
<!-- <button @click.prevent="deleteCall(oil['id'])" class="btn btn-error btn-sm">
|
||||
Delete
|
||||
</button> -->
|
||||
@@ -209,52 +210,8 @@ export default defineComponent({
|
||||
}
|
||||
})
|
||||
},
|
||||
printtTicketAll() {
|
||||
let path = import.meta.env.VITE_PRINT_URL + '/command/printticket/print_waiting';
|
||||
axios({
|
||||
method: 'delete',
|
||||
url: path,
|
||||
headers: authHeader(),
|
||||
}).then((response: any) => {
|
||||
if (response.data.ok) {
|
||||
notify({
|
||||
title: "Success",
|
||||
text: "Sent to Printer",
|
||||
type: "success",
|
||||
});
|
||||
this.getPage(this.page)
|
||||
} else {
|
||||
notify({
|
||||
title: "Failure",
|
||||
text: "error printing",
|
||||
type: "success",
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
printTicket(delivery_id: number) {
|
||||
let path = import.meta.env.VITE_PRINT_URL + '/command/printticket/' + delivery_id;
|
||||
axios({
|
||||
method: 'delete',
|
||||
url: path,
|
||||
headers: authHeader(),
|
||||
}).then((response: any) => {
|
||||
if (response.data.ok) {
|
||||
notify({
|
||||
title: "Success",
|
||||
text: "Sent to Printer",
|
||||
type: "success",
|
||||
});
|
||||
this.getPage(this.page)
|
||||
} else {
|
||||
notify({
|
||||
title: "Failure",
|
||||
text: "error printing",
|
||||
type: "success",
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user