|
|
@@ -6,8 +6,7 @@
|
|
|
<q-btn v-close-popup icon="mdi-chevron-left" flat round dense color="primary" />
|
|
|
<q-space />
|
|
|
<span class="text-subtitle1 text-weight-bold text-primary">{{ $t('profile.payments.subtitle') }}</span>
|
|
|
- <q-space />
|
|
|
- <div style="width: 32px"></div>
|
|
|
+ <q-space />
|
|
|
</div>
|
|
|
|
|
|
<div v-if="loading" class="col flex flex-center">
|
|
|
@@ -33,7 +32,7 @@
|
|
|
<div v-else class="column q-gutter-y-md">
|
|
|
<div v-for="item in paymentMethods" :key="item.id" class="card-item-box row items-center no-wrap q-pa-md">
|
|
|
<div class="brand-logo-wrapper q-mr-md">
|
|
|
- <q-icon name="mdi-credit-card-chip-outline" color="grey-7" size="32px" />
|
|
|
+ <BrandDetectorPanel :brand="item.brand" />
|
|
|
</div>
|
|
|
|
|
|
<div class="col column">
|
|
|
@@ -69,6 +68,7 @@ import { userStore } from 'src/stores/user';
|
|
|
import { getClientPaymentMethods, deleteClientPaymentMethod } from 'src/api/clientPaymentMethod';
|
|
|
import ProfilePaymentAddDialog from './ProfilePaymentAddDialog.vue';
|
|
|
import ProfilePaymentRemoveDialog from './ProfilePaymentRemoveDialog.vue';
|
|
|
+import BrandDetectorPanel from '../brandDetector/BrandDetectorPanel.vue';
|
|
|
|
|
|
defineEmits([...useDialogPluginComponent.emits]);
|
|
|
|
|
|
@@ -79,30 +79,6 @@ const store = userStore();
|
|
|
const paymentMethods = ref([]);
|
|
|
const loading = ref(false);
|
|
|
|
|
|
-// const brandIcon = (brand) => {
|
|
|
-// const icons = {
|
|
|
-// visa: 'mdi-credit-card-outline',
|
|
|
-// mastercard: 'mdi-credit-card-outline',
|
|
|
-// elo: 'mdi-credit-card-outline',
|
|
|
-// hipercard: 'mdi-credit-card-outline',
|
|
|
-// diners: 'mdi-credit-card-outline',
|
|
|
-// discover: 'mdi-credit-card-outline',
|
|
|
-// };
|
|
|
-// return icons[brand] ?? 'mdi-credit-card-outline';
|
|
|
-// };
|
|
|
-
|
|
|
-// const brandColor = (brand) => {
|
|
|
-// const colors = {
|
|
|
-// visa: 'blue-8',
|
|
|
-// mastercard: 'orange-8',
|
|
|
-// elo: 'yellow-9',
|
|
|
-// hipercard: 'red-8',
|
|
|
-// diners: 'grey-7',
|
|
|
-// discover: 'orange-6',
|
|
|
-// };
|
|
|
-// return colors[brand] ?? 'grey-6';
|
|
|
-// };
|
|
|
-
|
|
|
const cardLabel = (item) => {
|
|
|
const parts = [];
|
|
|
if (item.card_name) parts.push(item.card_name);
|