diff --git a/src/components/AttachmentsModal.vue b/src/components/AttachmentsModal.vue
index 7090d09..a44d867 100644
--- a/src/components/AttachmentsModal.vue
+++ b/src/components/AttachmentsModal.vue
@@ -3,6 +3,7 @@
import useAttachments from '../composables/useAttachments';
import Spiner from './ui/Spiner.vue';
import { useLoadsStore } from '../stores/loads';
+ import { useI18n } from 'vue-i18n';
const loadStore = useLoadsStore();
const { getAttachmentLoad, loading, attachments } = useAttachments();
@@ -11,7 +12,7 @@
console.log('se ejcyta attach');
getAttachmentLoad();
})
-
+ const { t } = useI18n();
const clearLoad = () => {
loadStore.openAttachmentsModal = false;
loadStore.currentLoad = null;
@@ -24,7 +25,7 @@
- Al confirmar esta acción, cerraremos tu sesión actual para actualizar tu correo electrónico. Serás redirigido a la página de inicio de sesión. Recuerda que tu contraseña se restablecerá. Necesitaras recuperarla, puedes hacerlo en la sección ¿Olvidaste tu contraseña? .
+
Guardar
+ class="btn btn-dark btn-block" type="submit">{{ t('buttons.save') }}
diff --git a/src/components/FormChangePassword.vue b/src/components/FormChangePassword.vue
index 66e06b4..4de1ea3 100644
--- a/src/components/FormChangePassword.vue
+++ b/src/components/FormChangePassword.vue
@@ -7,6 +7,7 @@
import { useAuthStore } from '../stores/auth';
import { useRouter } from 'vue-router';
import { useNotificationsStore } from '../stores/notifications';
+ import { useI18n } from 'vue-i18n';
const pwdForm = reactive({
pwd: '',
@@ -24,6 +25,7 @@
const loading = ref(false)
const msgError = ref('');
const msgSuccess = ref('');
+ const { t } = useI18n()
const hangleSave = async() => {
msgError.value = '';
@@ -42,7 +44,7 @@
}
const result = await recoveryPassword(data);
if(result.msg === 'success' && result.data !== null) {
- msgSuccess.value = 'Te enviamos un código al correo, ingresado!';
+ msgSuccess.value = t('messages.sendCode')
pwdForm.checksum = result.data.checksum;
step.value = 2;
clearMessages();
@@ -58,7 +60,7 @@
msgError.value = '';
msgSuccess.value = '';
if(pwdForm.code.length < 6) {
- msgError.value = 'Ingresa código valido';
+ msgError.value = t('errors.code');
clearMessages();
return;
} else {
@@ -81,7 +83,7 @@
});
clearMessages();
notifications.$patch({
- text : 'Contraseña se ha cambiando exitosamente!',
+ text : t('messages.changePassword'),
show : true,
error: false
});
@@ -121,9 +123,9 @@
const pass = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[a-zA-Z]).{8,}$/;
if(!pass.test(pwdForm.pwd)) {
- return 'Contraseña poco segura';
+ return t('errors.weakPassword')
} else if (pwdForm.pwd !== pwdForm.pwd2) {
- return 'Las contraseñas no coinciden';
+ return t('errors.matchPassword');
} else {
return '';
}
@@ -146,20 +148,20 @@
v-if="step === 1"
>
-
Cambiar contraseña
+
{{ t('profile.changePassword') }}
- Esta acción cerrara su sesión actual y debera volver a iniciar sesión con su nueva contraseña
+ {{ t('profile.helpTextResetPass') }}
Continuar
+ class="btn btn-dark btn-block" type="submit">{{ t('buttons.continue') }}
diff --git a/src/components/FormLoadModal.vue b/src/components/FormLoadModal.vue
index 1c73371..9a7b42b 100644
--- a/src/components/FormLoadModal.vue
+++ b/src/components/FormLoadModal.vue
@@ -107,7 +107,7 @@
origin.city = loadStore.currentLoad.origin?.city ? { city_name: loadStore.currentLoad.origin.city } : null;
origin.country = loadStore.currentLoad.origin.country;
origin.postalCode = loadStore.currentLoad.origin.zipcode;
- origin.ref = loadStore.currentLoad.origin.landmark;
+ originRef.value = loadStore.currentLoad.origin.landmark;
destination.locationName = loadStore.currentLoad.destination.company_name;
destination.address = loadStore.currentLoad.destination.street_address1;
@@ -115,7 +115,7 @@
destination.city = loadStore.currentLoad.destination?.city ? { city_name: loadStore.currentLoad.destination.city } : null;
destination.country = loadStore.currentLoad.destination.country;
destination.postalCode = loadStore.currentLoad.destination.zipcode;
- destination.ref = loadStore.currentLoad.destination.landmark;
+ destinationRef.value = loadStore.currentLoad.destination.landmark;
getCoordsMap();
}
@@ -146,7 +146,7 @@
origin.address = locationLoadSelected.value.address;
origin.state = { state_name: locationLoadSelected.value.state };
origin.city = { city_name: locationLoadSelected.value.city };
- origin.ref = locationLoadSelected.value.description;
+ originRef.value = locationLoadSelected.value.description;
});
watch(locationDownloadSelected, () => {
@@ -154,7 +154,7 @@
destination.address = locationDownloadSelected.value.address;
destination.state = { state_name: locationDownloadSelected.value.state };
destination.city = { city_name: locationDownloadSelected.value.city };
- destination.ref = locationDownloadSelected.value.description;
+ destinationRef.value = locationDownloadSelected.value.description;
});
const getLocations = async() => {
@@ -207,7 +207,7 @@
city: '',
country: '',
postalCode: '',
- ref: '',
+ // ref: '',
});
const destination = reactive({
@@ -217,7 +217,7 @@
city: '',
country: '',
postalCode: '',
- ref: '',
+ // ref: '',
});
const setLoadData = () => {
@@ -236,7 +236,7 @@
state : origin.state?.state_name,
city : origin.city?.city_name,
country : origin?.country,
- landmark : origin?.ref,
+ landmark : originRef.value,
zipcode : origin?.postalCode,
lat : originCoords.value?.lat,
lng : originCoords.value?.lng
@@ -247,7 +247,7 @@
state : destination.state?.state_name,
city : destination.city?.city_name,
country : destination?.country,
- landmark : destination?.ref,
+ landmark : destinationRef.value,
zipcode : destination?.postalCode,
lat : destinationCoords.value?.lat,
lng : destinationCoords.value?.lng
@@ -402,7 +402,7 @@
:filled="false"
name="date-load"
:required="submited ? true : false"
- :error="(submited && !formLoad.dateLoad) ? 'Fecha es requerida' : null"
+ :error="(submited && !formLoad.dateLoad) ? t('errors.date') : null"
v-model:field="formLoad.dateLoad"
/>
@@ -594,7 +594,7 @@
type="text"
:filled="false"
name="ref-destination"
- v-model:field="destination.ref"
+ v-model:field="destinationRef"
/>
diff --git a/src/components/ProfilePopup.vue b/src/components/ProfilePopup.vue
index 191f11e..912f755 100644
--- a/src/components/ProfilePopup.vue
+++ b/src/components/ProfilePopup.vue
@@ -51,8 +51,8 @@ import { watch } from 'vue';