updated user customer list
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
{{ person.account_number }}
|
||||
</router-link>
|
||||
</td>
|
||||
<td>{{ person.customer_first_name }} {{ person.customer_last_name }}</td>
|
||||
<td><router-link :to="{ name: 'customerProfile', params: { id: person.id } }" class="link link-hover hover:text-green-500">{{ person.customer_first_name }} {{ person.customer_last_name }}</router-link></td>
|
||||
<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>
|
||||
@@ -79,7 +79,9 @@
|
||||
<div class="card-body p-4">
|
||||
<div class="flex justify-between items-start">
|
||||
<div>
|
||||
<router-link :to="{ name: 'customerProfile', params: { id: person.id } }" class="hover:text-green-500">
|
||||
<h2 class="card-title text-base">{{ person.customer_first_name }} {{ person.customer_last_name }}</h2>
|
||||
</router-link>
|
||||
<p class="text-xs text-gray-400">#{{ person.account_number }}</p>
|
||||
</div>
|
||||
<div class="badge" :class="person.customer_automatic ? 'badge-success' : 'badge-ghost'">
|
||||
|
||||
@@ -73,8 +73,8 @@
|
||||
<div class="xl:col-span-4 space-y-6">
|
||||
<!-- Authorize.net Account Status Box -->
|
||||
<div v-if="customer.id" class="bg-base-100 rounded-lg p-4 border">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center gap-3">
|
||||
<div class="flex flex-col lg:flex-row lg:items-center lg:justify-between">
|
||||
<div class="flex items-center gap-3 mb-3 md:mb-0">
|
||||
<svg class="w-5 h-5 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v4a3 3 0 003 3z"/>
|
||||
</svg>
|
||||
@@ -89,16 +89,10 @@
|
||||
{{ getAccountStatusMessage() }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex gap-2" v-if="!isLoadingAuthorize">
|
||||
<div class="flex gap-2" v-if="!isLoadingAuthorize && !authorizeCheck.valid_for_charging">
|
||||
<!-- CREATE ACCOUNT SECTION - Only show when account doesn't exist -->
|
||||
<div v-if="!authorizeCheck.valid_for_charging" class="flex gap-2">
|
||||
<button
|
||||
v-if="credit_cards_count === 0"
|
||||
@click="addCreditCard"
|
||||
class="btn btn-primary btn-sm"
|
||||
>
|
||||
Add Card
|
||||
</button>
|
||||
<div class="flex gap-2">
|
||||
|
||||
<button
|
||||
@click="createAuthorizeAccount"
|
||||
:class="['btn btn-sm', credit_cards_count === 0 ? 'btn-disabled' : 'btn-primary']"
|
||||
@@ -115,19 +109,18 @@
|
||||
Add Card First
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- DELETE ACCOUNT SECTION - Only show when account exists -->
|
||||
<div v-if="authorizeCheck.valid_for_charging" class="flex gap-2">
|
||||
<div v-if="authorizeCheck.valid_for_charging" class="mt-3 lg:mt-0 lg:flex lg:gap-2">
|
||||
<button
|
||||
@click="showDeleteAccountModal"
|
||||
class="btn btn-error btn-sm"
|
||||
class="btn btn-error btn-sm lg:self-start"
|
||||
>
|
||||
Delete Account
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<CustomerComments
|
||||
:comments="comments"
|
||||
|
||||
@@ -62,9 +62,8 @@
|
||||
|
||||
<!-- Delivery Status Card -->
|
||||
<div class="bg-neutral rounded-lg p-5">
|
||||
<h3 class="text-xl font-bold mb-4">Delivery Status</h3>
|
||||
<div class="space-y-3">
|
||||
<div>
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
<div class="col-span-2">
|
||||
<div class="font-bold text-sm">Current Status</div>
|
||||
<div class="badge badge-lg"
|
||||
:class="{
|
||||
@@ -84,10 +83,6 @@
|
||||
<span v-else-if="deliveryOrder.delivery_status == 10">Finalized</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div>
|
||||
<div class="font-bold text-sm">Assigned Driver</div>
|
||||
<div>{{ deliveryOrder.driver_first_name }} {{ deliveryOrder.driver_last_name }}</div>
|
||||
</div> -->
|
||||
<div>
|
||||
<div class="font-bold text-sm">Scheduled Date</div>
|
||||
<div>{{ deliveryOrder.expected_delivery_date }}</div>
|
||||
@@ -96,7 +91,7 @@
|
||||
<div class="font-bold text-sm">Date Delivered</div>
|
||||
<div>{{ (deliveryOrder.when_delivered) }}</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="col-span-2">
|
||||
<div class="font-bold text-sm">Date Ordered</div>
|
||||
<div>{{ (deliveryOrder.when_ordered) }}</div>
|
||||
</div>
|
||||
@@ -335,7 +330,7 @@
|
||||
This prevents the links from rendering until `deliveryOrder.id` is available.
|
||||
-->
|
||||
<div v-if="deliveryOrder && deliveryOrder.id" class="flex flex-wrap gap-2 pt-4">
|
||||
<router-link :to="{ name: 'deliveryEdit', params: { id: deliveryOrder.id } }">
|
||||
<router-link v-if="deliveryOrder.delivery_status !== 10" :to="{ name: 'deliveryEdit', params: { id: deliveryOrder.id } }">
|
||||
<button class="btn btn-secondary btn-sm">Edit Delivery</button>
|
||||
</router-link>
|
||||
<router-link :to="{ name: 'finalizeTicket', params: { id: deliveryOrder.id } }" v-if="deliveryOrder.delivery_status != 10">
|
||||
|
||||
@@ -747,7 +747,7 @@ export default defineComponent({
|
||||
// Update local state
|
||||
this.customer.auth_net_profile_id = response.data.profile_id;
|
||||
this.authorizeCheck.valid_for_charging = true;
|
||||
this.authorizeCheck.profile_exists = true;
|
||||
// this.authorizeCheck.profile_exists = true;
|
||||
this.authorizeCheck.has_payment_methods = true;
|
||||
this.authorizeCheck.missing_components = [];
|
||||
this.createdProfileId = response.data.profile_id;
|
||||
|
||||
Reference in New Issue
Block a user