auto kind of working

This commit is contained in:
2024-07-17 18:04:19 -04:00
parent 601c2e27ba
commit 74fcd282db
4 changed files with 49 additions and 32 deletions

View File

@@ -22,9 +22,9 @@
<div class="flex start text-2xl mb-10">Automatics </div>
<div class="mb-10">
<div class="">Home Factor</div>
<div class="pl-10"> 1.00 = medium</div>
<div class="pl-10">1.50 = large</div>
<div class="pl-10">0.50 = small</div>
<div class="pl-10">1.50 = large oil usage</div>
<div class="pl-10"> 1.00 = medium oil usage</div>
<div class="pl-10">0.50 = small oil usage</div>
</div>
<div class="overflow-x-auto bg-neutral">
@@ -32,25 +32,28 @@
<!-- head -->
<thead>
<tr>
<th>Gallons Left</th>
<th>Home Factor</th>
<th>Town</th>
<th>Estimated Gallons Left</th>
<th>Name</th>
<th>Town</th>
<th>Address</th>
<th>Last Fill</th>
<th>Home Factor</th>
</tr>
</thead>
<tbody>
<!-- row 1 -->
<tr v-for="oil in deliveries" :key="oil['id']">
<td>{{ oil['estimated_gallons_left'] }}</td>
<td>{{ oil['house_factor'] }}</td>
<td>{{ oil['customer_town'] }}</td>
<td>{{ oil['customer_full_name'] }}</td>
<td>{{ oil['customer_town'] }}</td>
<td>{{ oil['customer_address'] }}</td>
<td>{{ oil['last_fill'] }} </td>
<td>{{ oil['house_factor'] }}</td>
<td class="flex gap-5">
<router-link :to="{ name: 'deliveryEdit', params: { id: oil['id'] } }">
<router-link :to="{ name: 'customerEdit', params: { id: oil['customer_id'] } }">
<button class="btn btn-accent btn-sm">
Edit
</button>
@@ -127,17 +130,14 @@ export default defineComponent({
get_oil_orders() {
let path = import.meta.env.VITE_AUTO_URL + '/delivery/all/customers';
console.log(path)
console.log("woop")
axios({
method: 'get',
url: path,
withCredentials: true,
headers: authHeader(),
}).then((response: any) => {
this.deliveries = response.data.automatics
console.log("here")
console.log(this.deliveries)
this.deliveries = response.data
})
},
},