diff --git a/src/pages/Account/Card/AccountDescriptorMenu.vue b/src/pages/Account/Card/AccountDescriptorMenu.vue
index 60510394d..8740571f5 100644
--- a/src/pages/Account/Card/AccountDescriptorMenu.vue
+++ b/src/pages/Account/Card/AccountDescriptorMenu.vue
@@ -8,7 +8,7 @@ import { useRoute } from 'vue-router';
import { useArrayData } from 'src/composables/useArrayData';
import CustomerChangePassword from 'src/pages/Customer/components/CustomerChangePassword.vue';
import VnConfirm from 'src/components/ui/VnConfirm.vue';
-
+import useNotify from 'src/composables/useNotify.js';
const quasar = useQuasar();
const $props = defineProps({
hasAccount: {
@@ -21,7 +21,7 @@ const { t } = useI18n();
const { hasAccount } = toRefs($props);
const { openConfirmationModal } = useVnConfirm();
const route = useRoute();
-
+const { notify } = useNotify();
const account = computed(() => useArrayData('AccountId').store.data[0]);
account.value.hasAccount = hasAccount.value;
const entityId = computed(() => +route.params.id);
@@ -71,9 +71,44 @@ async function sync() {
type: 'positive',
});
}
+// const removeAccount = async () => {
+// try {
+// quasar
+// .dialog({
+// component: VnConfirm,
+// componentProps: {
+// title: t('account.card.actions.delete.title'),
+// message: t('account.card.actions.delete.subTitle'),
+// promise: async () => {
+// try {
+// await axios.delete(`VnUsers/${this.id}`);
+// notify('Account removed', 'positive');
+// } catch (error) {
+// notify('Error removing account', 'negative');
+// console.error('Error deleting the account', error);
+// }
+// },
+// },
+// })
+// .onOk(() => {
+// notify('Account removed', 'positive');
+// });
+// } catch (error) {
+// console.error('Error deleting the account', error);
+// }
+// };
+const removeAccount = async () => {
+ try {
+ console.log('id', account.value.id);
+ await axios.delete(`VnUsers/${account.value.id}`);
+ notify(t('Account removed'), 'positive');
+ } catch (error) {
+ console.error('Error killing session', error);
+ }
+};
-
-
-
+ -->
+
-
+
diff --git a/src/pages/Account/locale/en.yml b/src/pages/Account/locale/en.yml
index c7220d7c9..3cf861fb2 100644
--- a/src/pages/Account/locale/en.yml
+++ b/src/pages/Account/locale/en.yml
@@ -68,7 +68,7 @@ account:
delete:
name: Delete
title: The account will be deleted
- subtitle: Are you sure you want to continue?
+ subTitle: Are you sure you want to continue?
success: ''
search: Search user
searchInfo: You can search by id, name or nickname
diff --git a/src/pages/Account/locale/es.yml b/src/pages/Account/locale/es.yml
index fcc4ce1c8..b53a0153c 100644
--- a/src/pages/Account/locale/es.yml
+++ b/src/pages/Account/locale/es.yml
@@ -67,7 +67,7 @@ account:
delete:
name: Eliminar
title: El usuario será eliminado
- subtitle: ¿Seguro que quieres continuar?
+ subTitle: ¿Seguro que quieres continuar?
success: ''
search: Buscar usuario
searchInfo: Puedes buscar por id, nombre o usuario