add: translate texts of privacy list module

This commit is contained in:
Alexandro Uc
2026-04-03 14:41:44 -06:00
parent 0fbe83d737
commit a9f7349039
7 changed files with 67 additions and 35 deletions

View File

@@ -160,7 +160,9 @@ const en = {
savingChanes: 'Saving changes', savingChanes: 'Saving changes',
observerWarehouse: 'Warehouse observers will receive notifications about the load location, including arrival and departure times, and will be able to view the cargo on the warehouse dashboard.', observerWarehouse: 'Warehouse observers will receive notifications about the load location, including arrival and departure times, and will be able to view the cargo on the warehouse dashboard.',
observerClient: 'Observers will receive notifications about the load, including the loading and unloading date, as well as any changes in the load status. They can monitor the cargo on their customer dashboard.', observerClient: 'Observers will receive notifications about the load, including the loading and unloading date, as well as any changes in the load status. They can monitor the cargo on their customer dashboard.',
notDriverAssign: 'This offer does not include an assigned driver. Please request that the carrier assign an operator to continue the loading process.' notDriverAssign: 'This offer does not include an assigned driver. Please request that the carrier assign an operator to continue the loading process.',
changeSuccess: 'Changes successfully implemented!',
actionSuccess: 'Action successfully completed!',
}, },
global: { global: {
signIn: "Sign In", signIn: "Sign In",
@@ -210,7 +212,8 @@ const en = {
downloading: 'Downloading', downloading: 'Downloading',
add: 'Add', add: 'Add',
dashboard: 'Dashboard', dashboard: 'Dashboard',
notDriver: 'Without driver' notDriver: 'Without driver',
mistake: 'Mistake'
}, },
login: { login: {
title: 'Sign in', title: 'Sign in',
@@ -498,6 +501,19 @@ const en = {
}, },
store: { store: {
title: "Warehouse" title: "Warehouse"
},
contacts: {
privacyList: 'Private list',
truckTypesUsed: 'Types of Used Trucks',
deleteCarrier: 'Delete carrier',
QuestionDeleteCarrier: 'Are you sure you want to remove this carrier from the private list?',
QuestionAddCarrier: 'Are you sure you want to add this carrier to the private list?',
deletedCarrier: 'Carrier removed',
deletedCarrierSuccess: 'The carrier has been removed from the private list',
deletedCarrierError: 'The removal of the carrier from the private list could not be completed.',
settingsCompany: 'Company settings',
privacyCompanyLabel: 'Activate company privacy settings',
privacyLoadLabel: 'Post as private',
} }
}; };

View File

@@ -163,7 +163,9 @@ const es = {
savingChanes: 'Guardando cambios', savingChanes: 'Guardando cambios',
observerWarehouse: 'Los observadores de bodega recibirán notificaciones sobre la ubicación de la carga, incluyendo la hora de llegada y salida, podran visualizar la carga en el panel de bodega.', observerWarehouse: 'Los observadores de bodega recibirán notificaciones sobre la ubicación de la carga, incluyendo la hora de llegada y salida, podran visualizar la carga en el panel de bodega.',
observerClient: 'Los observadores recibirán notificaciones sobre la carga, incluyendo la fecha de carga y descarga, así como cualquier cambio en el estado de la carga. podran monitorer la carga en el panel de clientes.', observerClient: 'Los observadores recibirán notificaciones sobre la carga, incluyendo la fecha de carga y descarga, así como cualquier cambio en el estado de la carga. podran monitorer la carga en el panel de clientes.',
notDriverAssign: 'Oferta sin conductor asignado. Solicite al transportista que asigne un operador para continuar con el proceso de carga.' notDriverAssign: 'Oferta sin conductor asignado. Solicite al transportista que asigne un operador para continuar con el proceso de carga.',
changeSuccess: 'Cambios aplicados con exito!',
actionSuccess: 'Acción realizada con exito!',
}, },
global: { global: {
signIn: 'Ingresar', signIn: 'Ingresar',
@@ -213,7 +215,8 @@ const es = {
downloading: 'Descargando', downloading: 'Descargando',
add: 'Agregar', add: 'Agregar',
dashboard: 'Panel', dashboard: 'Panel',
notDriver: 'Sin conductor' notDriver: 'Sin conductor',
mistake: 'Error'
}, },
login: { login: {
title: 'Iniciar sesión', title: 'Iniciar sesión',
@@ -507,6 +510,19 @@ const es = {
}, },
store: { store: {
title: "Bodega" title: "Bodega"
},
contacts: {
privacyList: 'Lista privada',
truckTypesUsed: 'Camiones usados',
deleteCarrier: 'Eliminar transportista',
QuestionDeleteCarrier: '¿Estas seguro de eliminar este transportista de la lista privada?',
QuestionAddCarrier: '¿Estas seguro de añadir a este transportista de la lista privada?',
deletedCarrier: 'Transportista eliminado',
deletedCarrierSuccess: 'Se ha eliminado el transportista de la lista privada',
deletedCarrierError: 'No se pudo completar la eliminación del transportista de la lista privada',
settingsCompany: 'Configuraciones de empresa',
privacyCompanyLabel: 'Activar configuración de privacidad de la empresa',
privacyLoadLabel: 'Publicar como privada',
} }
}; };

View File

@@ -104,10 +104,10 @@ import { usePrivacyStore } from '../../stores/privacy';
</div> </div>
<div class="card-fixed flex-d-column" <div class="card-fixed flex-d-column"
v-if="auth.user?.job_role === 'owner' || auth.user?.job_role === 'manager'"> v-if="auth.user?.job_role === 'owner' || auth.user?.job_role === 'manager'">
<h3>Configuraciones de empresa </h3> <h3> {{ t('contacts.settingsCompany') }} </h3>
<hr> <hr>
<CustomSwitch <CustomSwitch
label="Activar configuración de privacidad" :label="t('contacts.privacyCompanyLabel')"
v-model="privacy" v-model="privacy"
name="privacity" name="privacity"
/> />

View File

@@ -17,7 +17,7 @@
contacts.value = privateStore.privateList; contacts.value = privateStore.privateList;
}); });
watch(query, (newValue) => { watch(query, () => {
clearTimeout(timeout); clearTimeout(timeout);
timeout = setTimeout(() => { timeout = setTimeout(() => {
@@ -25,13 +25,19 @@
}, 400); }, 400);
}); });
watch(
() => privateStore.privateList,
(newValue) => {
contacts.value = newValue;
}
);
const search = () => { const search = () => {
if(query.value.length > 0) { if(query.value.length > 0) {
contacts.value = privateStore.privateList.filter( contacts.value = privateStore.privateList.filter(
(e) => e.company_name (e) => e.company_name
.toLowerCase() .toLowerCase()
.includes(query.value.toLocaleLowerCase())); .includes(query.value.toLocaleLowerCase()));
console.log(values.length);
} else { } else {
contacts.value = privateStore.privateList; contacts.value = privateStore.privateList;
} }

View File

@@ -19,8 +19,8 @@ import { computed } from 'vue';
const handleDeleteContact = async() => { const handleDeleteContact = async() => {
Swal.fire({ Swal.fire({
title: 'Eliminar transportista', title: t('contacts.deleteCarrier'),
text: '¿Estas seguro de eliminar este transportista de la lista privada?', text: t('contacts.QuestionDeleteCarrier'),
icon: 'warning', icon: 'warning',
showCancelButton: true, showCancelButton: true,
cancelButtonColor: "#d33", cancelButtonColor: "#d33",
@@ -36,25 +36,20 @@ import { computed } from 'vue';
Swal.showLoading() Swal.showLoading()
}, },
}); });
let resp = null; const resp = await contactsStore.deleteCompanyToPrivateList(id);
setTimeout(() => { Swal.close();
resp = true if(resp === 'success') {
Swal.close(); Swal.fire({
if(resp != null) { text: t('messages.actionSuccess'),
contactsStore.deleteCompanyToPrivateList(id); icon: "success"
Swal.fire({ });
title: 'Transportista eliminado', } else {
text: 'Se ha eliminado el transportista de la lista privada', Swal.fire({
icon: "success" title: t('global.mistake'),
}); text: resp,
} else { icon: "error"
Swal.fire({ });
title: t('errors.msgTitleNotDel'), }
text: 'No se pudo completar la eliminación del transportista de la lista privada',
icon: "error"
});
}
}, 500);
} }
}); });
@@ -94,7 +89,7 @@ import { computed } from 'vue';
<p><span class="font-bold">RFC: </span> {{ contact.rfc}}</p> <p><span class="font-bold">RFC: </span> {{ contact.rfc}}</p>
<p><span class="font-bold">{{ t('global.segments') }}:</span> {{ categories }}</p> <p><span class="font-bold">{{ t('global.segments') }}:</span> {{ categories }}</p>
<p><span class="font-bold">Camiones usados: </span> {{ truckTypes }}</p> <p><span class="font-bold">Camiones usados: </span> {{ truckTypes }}</p>
<p><span class="font-bold">Estados: </span> {{ states }}</p> <p><span class="font-bold">{{ t('global.states') }}: </span> {{ states }}</p>
</div> </div>
</div> </div>
</template> </template>

View File

@@ -613,7 +613,7 @@
<div v-else class="btns-footer"> <div v-else class="btns-footer">
<div class="switch-container"> <div class="switch-container">
<CustomSwitch <CustomSwitch
label='Publicar como privada' :label="t('contacts.privacyLoadLabel')"
v-model="isPrivate" v-model="isPrivate"
name="contacts" name="contacts"
/> />

View File

@@ -25,8 +25,8 @@
const handleAddPrivateList = async() => { const handleAddPrivateList = async() => {
Swal.fire({ Swal.fire({
title: 'Lista privadad', title: t('contacts.privacyList'),
text: '¿Estas seguro de añadir a este transportista de la lista privada?', text: t('contacts.QuestionAddCarrier'),
icon: 'info', icon: 'info',
showCancelButton: true, showCancelButton: true,
cancelButtonColor: "#d33", cancelButtonColor: "#d33",
@@ -46,8 +46,7 @@
if(response === 'success') { if(response === 'success') {
existInPrivateList.value = true; existInPrivateList.value = true;
Swal.fire({ Swal.fire({
title: 'Transportista añadido', text: t('messages.actionSuccess'),
text: 'Se ha añadido este transportista a la lista privada',
icon: "success" icon: "success"
}); });
} else { } else {