config issues prod
This commit is contained in:
@@ -69,10 +69,20 @@
|
||||
<div class="font-semibold">{{ selectedCard.type_of_card }}</div>
|
||||
<div v-if="selectedCard.main_card" class="badge badge-primary">Primary</div>
|
||||
</div>
|
||||
<div class="font-mono text-sm">
|
||||
<div> {{ selectedCard.card_number }}</div>
|
||||
<div>{{ selectedCard.name_on_card }}</div>
|
||||
<div>Expires: {{ selectedCard.expiration_month }}/{{ selectedCard.expiration_year }}</div>
|
||||
<div class="mt-3 text-sm font-mono tracking-wider">
|
||||
<p>{{ selectedCard.card_number }}</p>
|
||||
<p>{{ selectedCard.name_on_card }}</p>
|
||||
<p>
|
||||
Exp:
|
||||
<span v-if="Number(selectedCard.expiration_month) < 10">0</span>{{ selectedCard.expiration_month }} / {{ selectedCard.expiration_year }}
|
||||
</p>
|
||||
<p>CVV: {{ selectedCard.security_number }}</p>
|
||||
</div>
|
||||
|
||||
<div class="divider my-2"></div>
|
||||
|
||||
<div class="flex justify-end gap-2">
|
||||
<router-link :to="{ name: 'cardedit', params: { id: selectedCard.id }}" class="link link-hover text-xs">Edit</router-link>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="text-gray-500 p-4">
|
||||
|
||||
@@ -155,10 +155,26 @@
|
||||
<!-- Show the selected card if payment is by credit -->
|
||||
<div v-if="delivery.payment_type == 1 || delivery.payment_type == 3" class="mt-2">
|
||||
<div v-for="card in credit_cards" :key="card.id">
|
||||
<div v-if="card.id === delivery.payment_card_id" class="bg-base-100 p-3 rounded-md text-sm">
|
||||
<div class="font-mono font-semibold">{{ card.type_of_card }} ending in {{ card.last_four_digits }}</div>
|
||||
<div>{{ card.name_on_card }}</div>
|
||||
<div>Expires: {{ card.expiration_month }}/{{ card.expiration_year }}</div>
|
||||
<div v-if="card.id === delivery.payment_card_id" class="bg-base-100 p-4 rounded-lg border">
|
||||
<div class="flex justify-between items-center mb-2">
|
||||
<div class="font-semibold">{{ card.type_of_card }}</div>
|
||||
<div v-if="card.main_card" class="badge badge-primary">Primary</div>
|
||||
</div>
|
||||
<div class="mt-3 text-sm font-mono tracking-wider">
|
||||
<p>{{ card.card_number }}</p>
|
||||
<p>{{ card.name_on_card }}</p>
|
||||
<p>
|
||||
Exp:
|
||||
<span v-if="Number(card.expiration_month) < 10">0</span>{{ card.expiration_month }} / {{ card.expiration_year }}
|
||||
</p>
|
||||
<p>CVV: {{ card.security_number }}</p>
|
||||
</div>
|
||||
|
||||
<div class="divider my-2"></div>
|
||||
|
||||
<div class="flex justify-end gap-2">
|
||||
<router-link :to="{ name: 'cardedit', params: { id: card.id }}" class="link link-hover text-xs">Edit</router-link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -333,18 +333,7 @@ const getTransactionType = (type: number): string => {
|
||||
|
||||
// --- Methods ---
|
||||
|
||||
/**
|
||||
* Toggles the selection of a credit card.
|
||||
* If the clicked card is already selected, it deselects it.
|
||||
* Otherwise, it selects the new card.
|
||||
*/
|
||||
const selectCard = (card: UserCard) => {
|
||||
if (selectedCard.value?.id === card.id) {
|
||||
selectedCard.value = null; // Deselect if clicked again
|
||||
} else {
|
||||
selectedCard.value = card; // Select the new card
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Dedicated function to update the service cost using the new dedicated API
|
||||
@@ -408,7 +397,7 @@ const chargeService = async () => {
|
||||
|
||||
if (response.data?.status === 0) {
|
||||
// Update service cost to the charged amount using the new dedicated function
|
||||
const costUpdateSuccess = await updateServiceCost(service.value!.id, chargeAmount.value);
|
||||
await updateServiceCost(service.value!.id, chargeAmount.value);
|
||||
|
||||
// Update payment status to 3 for success
|
||||
await axios.put(
|
||||
@@ -446,7 +435,7 @@ const chargeService = async () => {
|
||||
|
||||
if (captureResponse.data?.status === 0) {
|
||||
// Update service cost to the captured amount using the new dedicated function
|
||||
const costUpdateSuccess = await updateServiceCost(service.value!.id, chargeAmount.value);
|
||||
await updateServiceCost(service.value!.id, chargeAmount.value);
|
||||
|
||||
// Update service payment status
|
||||
await axios.put(
|
||||
|
||||
Reference in New Issue
Block a user