diff --git a/src/components/common/VnChangePassword.vue b/src/components/common/VnChangePassword.vue new file mode 100644 index 000000000..79784f3c5 --- /dev/null +++ b/src/components/common/VnChangePassword.vue @@ -0,0 +1,136 @@ + + + + +es: + New password: Nueva contraseña + Repeat password: Repetir contraseña + You must enter a new password: Debes introducir la nueva contraseña + Passwords don't match: Las contraseñas no coinciden + diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 4c559dfdf..b76c147cd 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -300,6 +300,7 @@ globals: from: From To: To stateFk: State + changePass: Change password errors: statusUnauthorized: Access denied statusInternalServerError: An internal server error has ocurred diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 7cb17aad3..d0d5bdc0d 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -304,6 +304,7 @@ globals: from: Desde To: Hasta stateFk: Estado + changePass: Cambiar contraseña errors: statusUnauthorized: Acceso denegado statusInternalServerError: Ha ocurrido un error interno del servidor diff --git a/src/pages/Account/Card/AccountDescriptorMenu.vue b/src/pages/Account/Card/AccountDescriptorMenu.vue index 0e35d25f3..6f1d2ca1f 100644 --- a/src/pages/Account/Card/AccountDescriptorMenu.vue +++ b/src/pages/Account/Card/AccountDescriptorMenu.vue @@ -4,9 +4,12 @@ import { computed, ref, toRefs } from 'vue'; import { useI18n } from 'vue-i18n'; import { useVnConfirm } from 'composables/useVnConfirm'; import { useRoute } from 'vue-router'; +import { useAcl } from 'src/composables/useAcl'; import { useArrayData } from 'src/composables/useArrayData'; import VnConfirm from 'src/components/ui/VnConfirm.vue'; +import VnChangePassword from 'src/components/common/VnChangePassword.vue'; import useNotify from 'src/composables/useNotify.js'; + const $props = defineProps({ hasAccount: { type: Boolean, @@ -62,6 +65,19 @@ async function sync() { } + + {{ t('globals.changePass') }} + {{ t('account.card.actions.sync.name') }} - diff --git a/src/pages/Customer/Card/CustomerUnpaid.vue b/src/pages/Customer/Card/CustomerUnpaid.vue index ad00cbf59..d7f933a7f 100644 --- a/src/pages/Customer/Card/CustomerUnpaid.vue +++ b/src/pages/Customer/Card/CustomerUnpaid.vue @@ -92,7 +92,7 @@ const onSubmit = async () => { notify('globals.dataSaved', 'positive'); unpaidClient.value = true; } catch (error) { - notify('errors.create', 'negative'); + notify('errors.writeRequest', 'negative'); } finally { isLoading.value = false; } diff --git a/src/pages/Customer/Card/CustomerWebAccess.vue b/src/pages/Customer/Card/CustomerWebAccess.vue index 8d025a365..1db32c752 100644 --- a/src/pages/Customer/Card/CustomerWebAccess.vue +++ b/src/pages/Customer/Card/CustomerWebAccess.vue @@ -3,14 +3,11 @@ import { computed, ref } from 'vue'; import { useI18n } from 'vue-i18n'; import { useRoute } from 'vue-router'; import axios from 'axios'; -import { useQuasar } from 'quasar'; - import VnInput from 'src/components/common/VnInput.vue'; -import CustomerChangePassword from 'src/pages/Customer/components/CustomerChangePassword.vue'; import FormModel from 'components/FormModel.vue'; +import VnChangePassword from 'src/components/common/VnChangePassword.vue'; const { t } = useI18n(); -const quasar = useQuasar(); const route = useRoute(); const canChangePassword = ref(0); @@ -21,21 +18,11 @@ const filter = computed(() => { }; }); -const showChangePasswordDialog = () => { - quasar.dialog({ - component: CustomerChangePassword, - componentProps: { - id: route.params.id, - }, - }); -}; - async function hasCustomerRole() { const { data } = await axios(`Clients/${route.params.id}/hasCustomerRole`); canChangePassword.value = data; } - - es: Enable web access: Habilitar acceso web User: Usuario Recovery email: Correo de recuperacion This email is used for user to regain access their account: Este correo electrónico se usa para que el usuario recupere el acceso a su cuenta - Change password: Cambiar contraseña diff --git a/src/pages/Customer/components/CustomerChangePassword.vue b/src/pages/Customer/components/CustomerChangePassword.vue deleted file mode 100644 index d92a10c5c..000000000 --- a/src/pages/Customer/components/CustomerChangePassword.vue +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -es: - New password: Nueva contraseña - Request password: Repetir contraseña - Change password: Cambiar contraseña - Passwords don't match: Las contraseñas no coinciden - diff --git a/src/pages/Customer/components/CustomerSamplesCreate.vue b/src/pages/Customer/components/CustomerSamplesCreate.vue index 3c9eb856b..8c59f28b6 100644 --- a/src/pages/Customer/components/CustomerSamplesCreate.vue +++ b/src/pages/Customer/components/CustomerSamplesCreate.vue @@ -138,7 +138,7 @@ const onSubmit = async () => { notify('globals.dataSaved', 'positive'); onDataSaved(data); } catch (error) { - notify('errors.create', 'negative'); + notify('errors.writeRequest', 'negative'); } finally { isLoading.value = false; } diff --git a/src/pages/Route/Agency/Card/AgencyWorkcenter.vue b/src/pages/Route/Agency/Card/AgencyWorkcenter.vue index 1f3cab5d0..7103ea9ce 100644 --- a/src/pages/Route/Agency/Card/AgencyWorkcenter.vue +++ b/src/pages/Route/Agency/Card/AgencyWorkcenter.vue @@ -46,13 +46,13 @@ async function deleteWorCenter(id) { } +