add: translations of profile & proposals
This commit is contained in:
@@ -7,7 +7,8 @@
|
||||
import Segments from '../components/ui/Segments.vue';
|
||||
import States from '../components/ui/States.vue';
|
||||
import Cities from '../components/ui/Cities.vue';
|
||||
import Pagination from '../components/Pagination.vue';
|
||||
import Pagination from '../components/Pagination.vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const {loading, companies, getCompaniesData, companiesTotal, currentCompaniesPage} = useDirectory();
|
||||
const query = ref('');
|
||||
@@ -17,6 +18,8 @@ import Pagination from '../components/Pagination.vue';
|
||||
const selectedCities = ref([]);
|
||||
const filterQuery = ref([]);
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
const limit = 10;
|
||||
|
||||
onMounted(() => {
|
||||
@@ -129,11 +132,12 @@ import Pagination from '../components/Pagination.vue';
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<h2 class="title mb-5">Directorios de <span class="title-main">Transportistas</span></h2>
|
||||
<!-- <h2 class="title mb-5">Directorios de <span class="title-main">Transportistas</span></h2> -->
|
||||
<h2 class="title mb-5" v-html="t('carriers.title')"></h2>
|
||||
<div class="card-filters">
|
||||
<div class="d-flex mb-2">
|
||||
<input class="form-control me-2" type="search" name="" placeholder="Buscar transportista" id="" @:input="search()" v-model="query" aria-label="Search">
|
||||
<button class="btn btn-outline-dark me-2" type="button" @click="search">Buscar</button>
|
||||
<input class="form-control me-2" type="search" name="" :placeholder="t('carriers.searchByCarrier')" id="" @:input="search()" v-model="query" aria-label="Search">
|
||||
<button class="btn btn-outline-dark me-2" type="button" @click="search">{{ t('buttons.search') }}</button>
|
||||
<button
|
||||
class="btn btn-danger" type="button" @click="clearFilter">
|
||||
<i class="fa-solid fa-arrow-rotate-right"></i>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
import NotificationBadge from '../components/ui/NotificationBadge.vue';
|
||||
import FormChangePassword from '../components/FormChangePassword.vue';
|
||||
import FormChangeEmail from '../components/FormChangeEmail.vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const auth = useAuthStore();
|
||||
|
||||
@@ -23,6 +24,8 @@
|
||||
phone1: '',
|
||||
})
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
onMounted(() => {
|
||||
if(user.value) {
|
||||
getData()
|
||||
@@ -58,10 +61,10 @@
|
||||
const result = await auth.updateProfile(userData)
|
||||
loading.value = false;
|
||||
if(result.msg === 'success') {
|
||||
msgSuccess.value = 'Usuario actualizado';
|
||||
msgSuccess.value = t('errors.msgUpdateUser');
|
||||
clearMessages();
|
||||
} else {
|
||||
msgError.value = 'Algo salio mal, intente más tarde';
|
||||
msgError.value = t('errors.generic');
|
||||
clearMessages();
|
||||
}
|
||||
}
|
||||
@@ -76,11 +79,11 @@
|
||||
|
||||
const validatiosUser = () => {
|
||||
if(userForm.name.trim().length < 3) {
|
||||
return 'Ingresa nombre(s) valido';
|
||||
return t('errors.name');
|
||||
} else if(userForm.lastName.trim().length < 2) {
|
||||
return 'Ingresa apellido(s) valido';
|
||||
return t('errors.lastname');
|
||||
} else if(userForm.phone1.trim().length < 10) {
|
||||
return 'Ingresa teléfono valido';
|
||||
return t('errors.phone');
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
@@ -98,15 +101,15 @@
|
||||
<a class="btn-text"
|
||||
:class="[(form === 0) ? 'selection' : '']"
|
||||
@click="setForm(0)"
|
||||
>Datos usuario</a>
|
||||
>{{ t('profile.profile') }}</a>
|
||||
<a class="btn-text"
|
||||
:class="[(form === 1) ? 'selection' : '']"
|
||||
@click="setForm(1)"
|
||||
>Cambiar correo</a>
|
||||
>{{ t('profile.changeEmail') }}</a>
|
||||
<a class="btn-text"
|
||||
:class="[(form === 2) ? 'selection' : '']"
|
||||
@click="setForm(2)"
|
||||
>Cambiar contraseña</a>
|
||||
>{{ t('profile.changePassword') }}</a>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="divider"></div>
|
||||
@@ -118,26 +121,26 @@
|
||||
v-if="form === 0"
|
||||
>
|
||||
<br/>
|
||||
<h3 class="title">Datos de usuario</h3>
|
||||
<h3 class="title">{{ t('profile.profile') }}</h3>
|
||||
<br/>
|
||||
<NotificationBadge :msg="msgError" v-if="msgError != ''"/>
|
||||
<NotificationBadge :msg="msgSuccess" v-if="msgSuccess != ''" :is-error="false"/>
|
||||
<CustomInput
|
||||
label="Nombres(s)*:"
|
||||
:label="t('labels.names')+'*:'"
|
||||
type="text"
|
||||
name="name"
|
||||
:filled="false"
|
||||
v-model:field="userForm.name"
|
||||
/>
|
||||
<CustomInput
|
||||
label="Apellidos(s)*:"
|
||||
:label="t('labels.lastnames')+'*:'"
|
||||
type="text"
|
||||
name="lastname"
|
||||
:filled="false"
|
||||
v-model:field="userForm.lastName"
|
||||
/>
|
||||
<CustomInput
|
||||
label="Teléfono*:"
|
||||
:label="t('labels.phone')+'*:'"
|
||||
type="number"
|
||||
name="phone1"
|
||||
:step="1"
|
||||
@@ -148,7 +151,7 @@
|
||||
<Spiner v-if="loading"/>
|
||||
<button
|
||||
v-else
|
||||
class="btn btn-dark btn-block" type="submit">Guardar</button>
|
||||
class="btn btn-dark btn-block" type="submit">{{ t('buttons.save') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
<FormChangeEmail v-if="form === 1"/>
|
||||
|
||||
Reference in New Issue
Block a user