add: translations of profile & proposals

This commit is contained in:
Alexandro Uc Santos
2024-06-01 17:17:34 -06:00
parent 2de6b5b4fd
commit 97f4f93fd3
14 changed files with 267 additions and 124 deletions

View File

@@ -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 @@
<div class="modal-dialog modal-dialog-centered modal-xl" role="document">
<div class="modal-content">
<div class="modal-header">
<h2 class="title mt-2 mb-3">Evidencias adjuntas</h2>
<h2 class="title mt-2 mb-3">{{ t('evidence.title') }}</h2>
<button
id="btnCloseAttachmentModal"
type="button"
@@ -39,12 +40,12 @@
<Spiner v-if="loading"/>
<div v-else>
<div v-if="!attachments || attachments.total == 0" class="card-body">
<p class="empty">No hay evidencias subidas</p>
<p class="empty">{{ t('evidence.empty') }}</p>
</div>
<div v-else class="card-body">
<div class="attachment" v-for="data in attachments.data">
<p v-if="data.type == 'Loading'">Evidencia de carga</p>
<p v-else>Evidencia de descarga</p>
<p v-if="data.type == 'Loading'">{{ t('evidence.loadEvidence') }}</p>
<p v-else>{{ t('evidence.downloadEvidence') }}</p>
<img
:src="`https://api.etaviaporte.com/api/v1/public-load-attachments/download/${data._id}`"
:alt="data.type"
@@ -58,7 +59,7 @@
type="button"
class="btn btn-dark"
@click="clearLoad"
data-dismiss="modal">Cerrar</button>
data-dismiss="modal">{{ t('buttons.close') }}</button>
</div>
</div>
</div>

View File

@@ -184,7 +184,7 @@
@click="openAttachmentsModal"
>
<i class="fa-solid fa-image"></i>
Evidencias
{{ t('evidence.evidence') }}
</button>
<button
v-if="(authStore.user?.job_role === 'owner' || authStore.user?.job_role === 'manager') || authStore.user._id === props.load.posted_by"

View File

@@ -6,8 +6,9 @@
import { validateEmail } from '../helpers/validations';
import Swal from 'sweetalert2';
import { useAuthStore } from '../stores/auth';
import { useNotificationsStore } from '../stores/notifications';
import { useRouter } from 'vue-router';
import { useNotificationsStore } from '../stores/notifications';
import { useRouter } from 'vue-router';
import { useI18n } from 'vue-i18n';
const emailForm = reactive({
email: '',
@@ -21,6 +22,8 @@ import { useRouter } from 'vue-router';
const notifications = useNotificationsStore();
const router = useRouter();
const { t } = useI18n();
const hangleSave = () => {
msgError.value = '';
msgSuccess.value = '';
@@ -31,19 +34,19 @@ import { useRouter } from 'vue-router';
return;
} else {
Swal.fire({
title: '¿Estás seguro de cambiar el correo electrónico?',
title: t('profile.questionChangeEmail'),
// text: '',
html: '<span>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 <span class="font-bold">¿Olvidaste tu contraseña?</span>.</span>',
html: t('profile.msgInfoEmail'),
icon: 'warning',
showCancelButton: true,
cancelButtonColor: "#d33",
confirmButtonText: 'Confirmar',
cancelButtonText: 'Cancelar',
confirmButtonText: t('buttons.confirm'),
cancelButtonText: t('buttons.cancel'),
}).then( async(result) => {
if(result.isConfirmed) {
Swal.fire({
title: 'Por favor espere!',
html: 'Guardando cambios...',
title: t('messages.loading'),
html: t('messages.savingChanes') + '...',
allowOutsideClick: false,
didOpen: () => {
Swal.showLoading()
@@ -53,7 +56,7 @@ import { useRouter } from 'vue-router';
const userData = {
"email" : emailForm.email,
};
console.log(userData);
// console.log(userData);
loading.value = true;
const response = await auth.updateProfile(userData)
loading.value = false;
@@ -63,7 +66,7 @@ import { useRouter } from 'vue-router';
} else {
clearMessages();
notifications.$patch({
text : 'Correo electrónico se ha cambiando exitosamente!',
text : t('profile.msgChangeEmail'),
show : true,
error: false
});
@@ -80,11 +83,11 @@ import { useRouter } from 'vue-router';
const validations = () => {
if(emailForm.email.trim() == '') {
return 'Todos los campos con obligatorios';
return t('errors.requireds');
} else if (!validateEmail(emailForm.email)) {
return 'Correo electrónico no es valido'
return t('errors.email')
} else if (emailForm.email !== emailForm.email2) {
return 'Los correos electrónico no coinciden'
return t('errors.notMatchEmails')
} else {
return '';
}
@@ -106,19 +109,19 @@ import { useRouter } from 'vue-router';
ref="formRef1"
>
<br/>
<h3 class="title">Cambiar correo electrónico</h3>
<h3 class="title">{{ t('profile.titleFormEmail') }}</h3>
<br/>
<NotificationBadge :msg="msgError" v-if="msgError != ''"/>
<NotificationBadge :msg="msgSuccess" v-if="msgSuccess != ''" :is-error="false"/>
<CustomInput
label=" Nuevo Correo electrónico*:"
:label="t('profile.newEmail') + '*:'"
type="email"
name="email"
:filled="false"
v-model:field="emailForm.email"
/>
<CustomInput
label="Confirmar Correo electrónico*:"
:label="t('profile.confirmEmail') + '*:'"
type="email"
name="email2"
:step="1"
@@ -129,13 +132,13 @@ import { useRouter } from 'vue-router';
<div>
<i class="fa-solid fa-triangle-exclamation warning"></i>
</div>
<span>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 <span class="font-bold">¿Olvidaste tu contraseña?</span>.</span>
<span v-html="t('profile.msgInfoEmail')"></span>
</div>
<div class="mt-5 text-center">
<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>
</template>

View File

@@ -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"
>
<br/>
<h3 class="title">Cambiar contraseña</h3>
<h3 class="title">{{ t('profile.changePassword') }}</h3>
<br/>
<NotificationBadge :msg="msgError" v-if="msgError != ''"/>
<NotificationBadge :msg="msgSuccess" v-if="msgSuccess != ''" :is-error="false"/>
<CustomInput
label=" Nueva contraseña*:"
:label="t('labels.password2') + '*:'"
type="password"
name="pwd"
:filled="false"
v-model:field="pwdForm.pwd"
help-text="La Contraseña debe ser mínimo 8 caracteres, al menos una mayúscula, al menos una minúscula, y un digito."
:help-text="t('login.helptext')"
/>
<CustomInput
label="Confirme contraseña*:"
:label="t('labels.password3') + '*:'"
type="password"
name="pwd2"
:step="1"
@@ -168,26 +170,26 @@
/>
<div class="warning-info">
<div><i class="fa-solid fa-triangle-exclamation warning"></i></div>
Esta acción cerrara su sesión actual y debera volver a iniciar sesión con su nueva contraseña
{{ t('profile.helpTextResetPass') }}
</div>
<div class="mt-5 text-center">
<Spiner v-if="loading"/>
<button
v-else
class="btn btn-dark btn-block" type="submit">Continuar</button>
class="btn btn-dark btn-block" type="submit">{{ t('buttons.continue') }}</button>
</div>
</form>
<form v-if="step === 2" @submit.prevent="handleConfirmChange" class="mx-5">
<div class="d-flex justify-content-center align-items-center mb-4 mt-4">
<a
@click="handleBack(1)"
class="btn-text ms-2"><i class="fa-solid fa-arrow-left"></i> Volver</a>
class="btn-text ms-2"><i class="fa-solid fa-arrow-left"></i> {{ t('buttons.back') }}</a>
</div>
<NotificationBadge :msg="msgError" v-if="msgError != ''"/>
<NotificationBadge :msg="msgSuccess" :is-error="false" v-if="msgSuccess != ''"/>
<p class="help-info">Te enviamos un código de verificación al correo electrónico, ingresalo para confirmar la recuperacion de contraseña. No olvides revisar en la carpeta spam</p>
<p class="help-info">{{ t('login.helptextCode') }}</p>
<CustomInput
label="Ingresa el código"
:label="t('labels.code') + '*:'"
name="code"
:filled="false"
type="text"
@@ -202,7 +204,7 @@
<Spiner v-if="loading"/>
<button
v-else
class="btn btn-dark btn-block" type="submit">Confirmar</button>
class="btn btn-dark btn-block" type="submit">{{ t('buttons.confirm') }}</button>
</div>
</form>
</template>

View File

@@ -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"
/>
<Custominput
@@ -411,7 +411,7 @@
:filled="false"
name="date-download"
:required="submited ? true : false"
:error="(submited && !formLoad.dateDownload) ? 'Fecha es requerida' : null"
:error="(submited && !formLoad.dateDownload) ? t('errors.date') : null"
v-model:field="formLoad.dateDownload"
/>
<Custominput
@@ -420,7 +420,7 @@
:filled="false"
name="weight"
:required="submited ? true : false"
:error="(submited && !formLoad.weight) ? 'Ingrese peso en KG' : null"
:error="(submited && !formLoad.weight) ? t('errors.weight') : null"
v-model:field="formLoad.weight"
/>
</div>
@@ -524,7 +524,7 @@
type="text"
:filled="false"
name="ref-origin"
v-model:field="origin.ref"
v-model:field="originRef"
/>
</div>
<div class="form-section">
@@ -594,7 +594,7 @@
type="text"
:filled="false"
name="ref-destination"
v-model:field="destination.ref"
v-model:field="destinationRef"
/>
</div>
</div>

View File

@@ -51,8 +51,8 @@ import { watch } from 'vue';
<h3>{{auth.user?.first_name}} {{ auth.user?.last_name }}</h3>
<p>{{ auth.user?.email }}</p>
<p>{{ auth.user?.phone }}</p>
<p class="section-prefs">Preferencias de usuario</p>
<p class="label-item">Idioma:</p>
<p class="section-prefs">{{ t('global.prefs') }}</p>
<p class="label-item">{{ t('global.lang') }}:</p>
<CustomRadioInput
value="es"
:label="t('global.es')"
@@ -71,7 +71,7 @@ import { watch } from 'vue';
data-toggle="modal"
data-target="#editProfileModal"
@click="handleEditProfile()"
>Editar perfil</button>
>{{ t('buttons.editProfile') }}</button>
</div>
</div>
</template>

View File

@@ -6,12 +6,14 @@
import { getDateMonthDay } from '../helpers/date_formats';
import VehicleInfo from './VehicleInfo.vue';
import Swal from 'sweetalert2'
import CardEmpty from './CardEmpty.vue';
import CardEmpty from './CardEmpty.vue';
import { useI18n } from 'vue-i18n';
const loadsStore = useLoadsStore();
const authStore = useAuthStore();
const isLoading = ref(false);
const isLoadingActions = ref(false);
const { t } = useI18n();
onMounted(() => {
getProposalsData()
@@ -41,7 +43,6 @@ import CardEmpty from './CardEmpty.vue';
isLoadingActions.value = true;
let load = await loadsStore.updateLoad(load_id, loadData);
if(load != null) {
const index = loadsStore.loads.findIndex((load) => load._id === load_id);
loadsStore.loads[index] = {
@@ -63,21 +64,21 @@ import CardEmpty from './CardEmpty.vue';
...formData
};
Swal.fire({
title: "Oferta aceptada!",
text: "La oferta fue aceptada exitosamente.",
title: t('proposals.titleOfferAccept'),
text: t('proposals.msgOfferAccept'),
icon: "success"
});
} else {
Swal.fire({
title: "Error!",
text: "No se pudo actualizar oferta, intente más tarde.",
text: t('proposals.msgErrorAcceptOffer'),
icon: "error"
});
}
} else {
Swal.fire({
title: "Error!",
text: "No se pudo aceptar oferta, intente más tarde.",
text: t('proposals.msgNotAcceptOffer'),
icon: "error"
});
}
@@ -85,16 +86,16 @@ import CardEmpty from './CardEmpty.vue';
}
const handleCancelProposal = async(proposal) => {
const handleCancelProposal = async(proposal) => {
const proposal_id = proposal._id;
const load_id = proposal.load._id;
const {isConfirmed} = await Swal.fire({
title: 'Cancelar oferta!',
text: '¿Estás seguro de cancelar esta oferta?',
title: t('proposals.titleCanceModal'),
text: t('proposals.textCancelModal'),
icon: 'warning',
cancelButtonColor: "#d33",
showCancelButton: true,
confirmButtonText: 'Si, cancelar',
confirmButtonText: t('proposals.confirmCancel'),
cancelButtonText: 'No'
})
if( isConfirmed ) {
@@ -126,21 +127,21 @@ import CardEmpty from './CardEmpty.vue';
...formData
};
Swal.fire({
title: "Oferta cancelada!",
text: "La oferta fue retirada exitosamente.",
title: t('proposals.msgTitleCancel'),
text: t('proposals.msgCancel'),
icon: "success"
});
} else {
Swal.fire({
title: "Error!",
text: "No se pudo retirar oferta, intente más tarde",
text: t('proposals.msgNotCancel'),
icon: "error"
});
}
} else {
Swal.fire({
title: "Error!",
text: "Algo salio mal, intente más tarde",
text: t('errors.generic'),
icon: "error"
});
}
@@ -155,7 +156,7 @@ import CardEmpty from './CardEmpty.vue';
<div class="modal-dialog modal-dialog-centered modal-xl" role="document">
<div class="modal-content">
<div class="modal-header">
<h2 class="title mt-2 mb-3">Ofertas</h2>
<h2 class="title mt-2 mb-3">{{ t('loads.offers') }}</h2>
<button
id="btnCloseProposalsModal"
type="button"
@@ -170,14 +171,14 @@ import CardEmpty from './CardEmpty.vue';
<div v-if="loadsStore.proposalsOfLoads.length > 0" v-for="proposal in loadsStore.proposalsOfLoads" class="card-fixed card-proposal">
<div class="row">
<div class="col-lg-6 col-md-12">
<p>Empresa: <span>{{ proposal.carrier.company_name }}</span></p>
<p>Licitador: <span>{{ proposal.bidder.first_name }} {{ proposal.bidder.last_name }}</span></p>
<p># de registro del transportista: <span v-if="proposal.vehicle">{{proposal.vehicle.vehicle_code}}</span></p>
<p>{{ t('global.company') }}: <span>{{ proposal.carrier.company_name }}</span></p>
<p>{{ t('proposals.bidder') }}: <span>{{ proposal.bidder.first_name }} {{ proposal.bidder.last_name }}</span></p>
<p>{{ t('proposals.numCarrier') }}: <span v-if="proposal.vehicle">{{proposal.vehicle.vehicle_code}}</span></p>
</div>
<div class="col-lg-6 col-md-12">
<p>Fecha: <span>{{ getDateMonthDay(proposal.createdAt) }}</span></p>
<p>Tipo de Transporte: <span v-if="proposal.vehicle">{{proposal.vehicle.truck_type}}</span></p>
<p>Transportista: <span v-if="proposal._driver">{{proposal._driver}}</span></p>
<p>{{ t('labels.date') }}: <span>{{ getDateMonthDay(proposal.createdAt) }}</span></p>
<p>{{ t('directory.typeTruck') }}: <span v-if="proposal.vehicle">{{proposal.vehicle.truck_type}}</span></p>
<p>{{ t('global.carrier') }}: <span v-if="proposal._driver">{{proposal._driver}}</span></p>
</div>
</div>
<div v-if="proposal.comment" class="box-note">
@@ -188,7 +189,7 @@ import CardEmpty from './CardEmpty.vue';
<div class="d-flex justify-content-end gap-3" v-else>
<div v-if="proposal.is_accepted" class="indicator-check">
<i class="fa-solid fa-check"></i>
Aceptado
{{ t('buttons.accepted') }}
</div>
<button v-if="!proposal.is_accepted"
type="button"
@@ -196,7 +197,7 @@ import CardEmpty from './CardEmpty.vue';
@click="handleAceptedProposal(proposal)"
>
<i class="fa-solid fa-check"></i>
Aceptar
{{ t('buttons.accept') }}
</button>
<button
v-if="proposal.load.load_status !== 'Delivered' && proposal.is_accepted"
@@ -204,11 +205,11 @@ import CardEmpty from './CardEmpty.vue';
@click="handleCancelProposal(proposal)"
>
<i class="fa-solid fa-ban clear-sm"></i>
Cancelar
{{ t('buttons.cancel') }}
</button>
</div>
</div>
<CardEmpty v-else text="No hay ofertas"/>
<CardEmpty v-else :text="t('proposals.empty')"/>
</div>
</div>
<div class="modal-footer">
@@ -216,7 +217,7 @@ import CardEmpty from './CardEmpty.vue';
type="button"
class="btn btn-dark"
@click="clearMoal"
data-dismiss="modal">Cerrar</button>
data-dismiss="modal">{{ t('buttons.close') }}</button>
</div>
</div>
</div>

View File

@@ -1,5 +1,6 @@
<script setup>
import { ref } from 'vue';
import { useI18n } from 'vue-i18n';
defineProps({
vehicle: {
@@ -8,6 +9,8 @@ import { ref } from 'vue';
}
})
const { t } = useI18n()
const isShow = ref(false);
const toogle = () => {
@@ -19,27 +22,27 @@ import { ref } from 'vue';
<a
@click="toogle"
class="btn-text mt-4 mb-2"
>Información del vehiculo <i class="fa-solid" :class="[isShow ? 'fa-chevron-up' : 'fa-chevron-down']"></i></a>
>{{ t('vehicles.infoVehicle') }} <i class="fa-solid" :class="[isShow ? 'fa-chevron-up' : 'fa-chevron-down']"></i></a>
<div v-if="isShow">
<div class="divider"></div>
<!-- <h2 class="my-3">Información del vehiculo</h2> -->
<div class="row my-2">
<div class="col-lg-6">
<p>Código: <span>{{ vehicle.vehicle_code }}</span></p>
<p>Tipo de transporte: <span>{{ vehicle.truck_type }}</span></p>
<p>Número de Serie: <span>{{ vehicle.vehicle_number }}</span></p>
<p>Segmento: <span>{{ vehicle._categories }}</span></p>
<p>{{ t('labels.codeId') }}: <span>{{ vehicle.vehicle_code }}</span></p>
<p>{{ t('directory.typeTruck') }}: <span>{{ vehicle.truck_type }}</span></p>
<p>{{ t('vehicles.serialNumber') }}: <span>{{ vehicle.vehicle_number }}</span></p>
<p>{{ t('global.segment') }}: <span>{{ vehicle._categories }}</span></p>
</div>
<div class="col-lg-6">
<p>Placas Tracto Camión: <span>{{ vehicle.circulation_serial_number }}</span></p>
<p>Placas Remolque 1: <span>{{ vehicle.trailer_plate_1 }}</span></p>
<p>Placas Remolque 2: <span>{{ vehicle.trailer_plate_2 }}</span></p>
<p>Base de carga: <span>{{ vehicle.city }}, {{ vehicle.state }}</span></p>
<p>{{ t('vehicles.truckPlates') }}: <span>{{ vehicle.circulation_serial_number }}</span></p>
<p>{{ t('vehicles.trailerPlates') }} 1: <span>{{ vehicle.trailer_plate_1 }}</span></p>
<p>{{ t('vehicles.trailerPlates') }} 2: <span>{{ vehicle.trailer_plate_2 }}</span></p>
<p>{{ t('vehicles.chargingBase') }}: <span>{{ vehicle.city }}, {{ vehicle.state }}</span></p>
</div>
</div>
<div class="col-12">
<p>Información Adicional del Transporte: <span>{{ vehicle.notes }}</span></p>
<p>{{ t('vehicles.additionalInfoVehicle') }}: <span>{{ vehicle.notes }}</span></p>
</div>
</div>
</template>

View File

@@ -2,9 +2,11 @@
import { ref } from 'vue';
import VueMultiselect from 'vue-multiselect'
import { searchProducts } from '../../services/public';
import { useI18n } from 'vue-i18n';
const options = ref([]);
const isLoading = ref(false);
const { t } = useI18n();
// defineProps(['selectedCategory']);
defineProps({
@@ -43,18 +45,18 @@
:disabled="disabled"
@search-change="searchProductFn"
@remove="$emit('clear-option')"
placeholder="Busca por producto"
label="name"
track-by="name"
selectLabel="Presione para seleccionar"
selectedLabel="Selecionado"
deselectLabel="Presione para remover seleción"
:placeholder="t('labels.selectProduct')"
:selectLabel="t('global.helpSelected')"
:selectedLabel="t('global.selected')"
:deselectLabel="t('global.removeSelected')"
>
<template #noResult>
Oops! No se encontro coincidencias.
{{ t('global.notFound') }}
</template>
<template #noOptions>
Lista vacia.
{{ t('global.emptyList') }}
</template>
</VueMultiselect>
</template>

View File

@@ -2,7 +2,7 @@
import { ref } from 'vue';
import VueMultiselect from 'vue-multiselect'
import { searchcategories } from '../../services/public';
import { useI18n } from 'vue-i18n';
import { useI18n } from 'vue-i18n';
const options = ref([]);
const isLoading = ref(false);