Small ui fixes
This commit is contained in:
@@ -13,9 +13,12 @@
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" />
|
||||
</svg>
|
||||
</label>
|
||||
<router-link :to="{ name: 'home' }" class="btn btn-ghost normal-case text-xl font-bold">
|
||||
Auburn Oil
|
||||
</router-link>
|
||||
<div class="flex flex-col items-center">
|
||||
<span class="text-xs text-base-content/60">{{ dayOfWeek }}</span>
|
||||
<span class="normal-case text-xl font-bold">
|
||||
{{ currentDate }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
@@ -255,7 +258,7 @@ export default defineComponent({
|
||||
computed: {
|
||||
searchStore() {
|
||||
return useSearchStore();
|
||||
|
||||
|
||||
},
|
||||
userInitials(): string {
|
||||
if (!this.user || !this.user.user_name) return '';
|
||||
@@ -263,6 +266,17 @@ export default defineComponent({
|
||||
return parts.length > 1
|
||||
? `${parts[0][0]}${parts[1][0]}`.toUpperCase()
|
||||
: this.user.user_name.substring(0, 2).toUpperCase();
|
||||
},
|
||||
currentDate(): string {
|
||||
const now = new Date();
|
||||
const month = (now.getMonth() + 1).toString().padStart(2, '0');
|
||||
const day = now.getDate().toString().padStart(2, '0');
|
||||
const year = now.getFullYear().toString().slice(-2);
|
||||
return `${month}/${day}/${year}`;
|
||||
},
|
||||
dayOfWeek(): string {
|
||||
const now = new Date();
|
||||
return now.toLocaleDateString('en-US', { weekday: 'long' });
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -82,8 +82,8 @@
|
||||
<td>{{ oil.house_factor }}</td>
|
||||
<td>{{ oil.hot_water_summer ? 'Yes' : 'No' }}</td>
|
||||
<td>{{ oil.customer_address }}, {{ oil.customer_town }}</td>
|
||||
<td class="text-right">
|
||||
<div class="flex items-center justify-end gap-2">
|
||||
<td class="text-right ">
|
||||
|
||||
<!-- <router-link :to="{ name: 'customerEdit', params: { id: oil.customer_id } }" class="btn btn-sm btn-secondary">Edit Customer</router-link> -->
|
||||
<router-link v-if="oil.auto_status != 3"
|
||||
:to="{ name: 'payAutoAuthorize', params: { id: oil['id'] } }">
|
||||
@@ -101,7 +101,7 @@
|
||||
Print Ticket
|
||||
</button>
|
||||
</router-link>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -21,9 +21,7 @@
|
||||
<span class="label-text-alt">{{ customer_count }} customers found</span>
|
||||
</label>
|
||||
</div>
|
||||
<router-link to="/customers/create" class="btn btn-primary btn-sm">
|
||||
Add New Customer
|
||||
</router-link>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="divider"></div>
|
||||
@@ -38,7 +36,7 @@
|
||||
<th>Town</th>
|
||||
<th>Automatic</th>
|
||||
<th>Phone Number</th>
|
||||
<th class="text-right">Actions</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -52,22 +50,8 @@
|
||||
<td>{{ person.customer_town }}</td>
|
||||
<td><span :class="person.customer_automatic ? 'text-success' : 'text-gray-500'">{{ person.customer_automatic ? 'Yes' : 'No' }}</span></td>
|
||||
<td>{{ person.customer_phone_number }}</td>
|
||||
<td class="text-right">
|
||||
<div class="flex items-center justify-end gap-2">
|
||||
<router-link :to="{ name: 'deliveryCreate', params: { id: person.id } }" class="btn btn-sm btn-primary">
|
||||
New Delivery
|
||||
</router-link>
|
||||
<router-link :to="{ name: 'CalenderCustomer', params: { id: person.id } }" class="btn btn-sm btn-accent">
|
||||
New Service
|
||||
</router-link>
|
||||
<router-link :to="{ name: 'customerEdit', params: { id: person.id } }" class="btn btn-sm btn-secondary">
|
||||
Edit
|
||||
</router-link>
|
||||
<router-link :to="{ name: 'customerProfile', params: { id: person.id } }" class="btn btn-sm btn-ghost">
|
||||
View
|
||||
</router-link>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -772,7 +772,6 @@ onSubmitSocial(commentText: string) {
|
||||
this.currentParts = response.data;
|
||||
} catch (error) {
|
||||
console.error("Failed to fetch customer parts:", error);
|
||||
notify({ title: "Error", text: "Could not fetch equipment parts.", type: "error" });
|
||||
}
|
||||
},
|
||||
openPartsModal() {
|
||||
|
||||
@@ -384,7 +384,6 @@ export default defineComponent({
|
||||
|
||||
this.total_amount = response.data.delivery.total_amount || 0;
|
||||
this.preChargeTotal = response.data.delivery.total_amount || 0;
|
||||
this.FinalizeOilOrderForm.gallons_delivered = this.deliveryOrder.gallons_delivered || '';
|
||||
|
||||
|
||||
await this.getCustomer(this.deliveryOrder.customer_id);
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
<form class="space-y-4" @submit.prevent="onSubmit">
|
||||
<div>
|
||||
<label class="label"><span class="label-text font-bold">Gallons Delivered</span></label>
|
||||
<input v-model="FinalizeOilOrderForm.gallons_delivered" class="input input-bordered input-sm w-full max-w-xs" type="number" placeholder="# gallons" />
|
||||
<input v-model="FinalizeOilOrderForm.gallons_delivered" class="input input-bordered input-sm w-full max-w-xs" type="number" step="0.01" placeholder="# gallons" />
|
||||
</div>
|
||||
|
||||
<div class="pt-2">
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
<div>
|
||||
<label class="label"><span class="label-text font-bold">Gallons Delivered</span></label>
|
||||
<input v-model="FinalizeOilOrderForm.gallons_delivered"
|
||||
class="input input-bordered input-sm w-full max-w-xs" type="number" placeholder="# gallons" />
|
||||
class="input input-bordered input-sm w-full max-w-xs" type="number" step="0.01" placeholder="# gallons" />
|
||||
</div>
|
||||
|
||||
<div class="pt-2">
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<!-- Modal Header -->
|
||||
<div class="flex justify-between items-center border-b border-gray-700 pb-3 mb-4">
|
||||
<h3 class="text-2xl font-bold">Edit Service Call</h3>
|
||||
<h3 class="text-2xl font-bold">Service Call</h3>
|
||||
<span class="font-bold text-white px-3 py-1 mr-10 rounded" :style="{ backgroundColor: getServiceTypeColor(editableService.type_service_call) }">
|
||||
{{ getServiceTypeName(editableService.type_service_call) }}
|
||||
</span>
|
||||
@@ -24,7 +24,7 @@
|
||||
<div class="font-bold text-lg">{{ customer.account_number }}</div>
|
||||
<div class="text-sm">{{ customer.customer_first_name }} {{ customer.customer_last_name }}</div>
|
||||
<div class="text-sm">{{ customer.customer_address }}</div>
|
||||
<div class="text-sm">{{ customer.customer_town }}, {{ customer.customer_state }} {{ customer.customer_zip }}</div>
|
||||
<div class="text-sm">{{ customer.customer_town }}, {{ getStateAbbrev(customer.customer_state) }} {{ customer.customer_zip }}</div>
|
||||
<div class="text-sm mt-1">{{ customer.customer_phone_number }}</div>
|
||||
</div>
|
||||
<div v-else class="p-4 bg-base-200 rounded-md text-center"><p>Loading customer details...</p></div>
|
||||
@@ -184,7 +184,12 @@ export default defineComponent({
|
||||
if (typeId === undefined || typeId === null) return 'gray';
|
||||
const colorMap: { [key: number]: string } = { 0: 'blue', 1: 'red', 2: 'green', 3: '#B58900', 4: 'black' };
|
||||
return colorMap[typeId] || 'gray';
|
||||
},
|
||||
getStateAbbrev(stateId: number | undefined | null): string {
|
||||
if (stateId === undefined || stateId === null) return 'Unknown';
|
||||
const stateMap: { [key: number]: string } = { 0: 'MA', 1: 'RI', 2: 'NH', 3: 'ME', 4: 'VT', 5: 'CT', 6: 'NY' };
|
||||
return stateMap[stateId] || 'Unknown';
|
||||
}
|
||||
},
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user