diff --git a/src/components/LeftMenuItem.vue b/src/components/LeftMenuItem.vue
index 976136394..7e7a7fe72 100644
--- a/src/components/LeftMenuItem.vue
+++ b/src/components/LeftMenuItem.vue
@@ -2,7 +2,7 @@
import { computed } from 'vue';
import { useI18n } from 'vue-i18n';
-const { t } = useI18n();
+const { t, te } = useI18n();
const props = defineProps({
item: {
@@ -11,7 +11,13 @@ const props = defineProps({
},
});
-const item = computed(() => props.item); // eslint-disable-line vue/no-dupe-keys
+const item = computed(() => {
+ const item = JSON.parse(JSON.stringify(props.item));
+ const [, , section] = item.title.split('.');
+
+ if (!te(item.title)) item.title = t(`globals.pageTitles.${section}`);
+ return item;
+}); // eslint-disable-line vue/no-dupe-keys
diff --git a/src/components/common/VnBreadcrumbs.vue b/src/components/common/VnBreadcrumbs.vue
index 666f14c72..5002c5a9a 100644
--- a/src/components/common/VnBreadcrumbs.vue
+++ b/src/components/common/VnBreadcrumbs.vue
@@ -5,16 +5,16 @@ import { useQuasar } from 'quasar';
import { useI18n } from 'vue-i18n';
import { useCamelCase } from 'src/composables/useCamelCase';
-const router = useRouter();
-const quasar = useQuasar();
-const { t } = useI18n();
+const { currentRoute } = useRouter();
+const { screen } = useQuasar();
+const { t, te } = useI18n();
let matched = ref([]);
let breadcrumbs = ref([]);
let root = ref(null);
watchEffect(() => {
- matched.value = router.currentRoute.value.matched.filter(
+ matched.value = currentRoute.value.matched.filter(
(matched) => Object.keys(matched.meta).length
);
breadcrumbs.value.length = 0;
@@ -36,11 +36,15 @@ function getBreadcrumb(param) {
root: root.value,
};
- if (quasar.screen.gt.sm) {
+ if (screen.gt.sm) {
breadcrumb.name = param.name;
breadcrumb.title = useCamelCase(param.meta.title);
}
+ breadcrumb.locale = te(`${breadcrumb.root}.pageTitles.${breadcrumb.title}`)
+ ? t(`${breadcrumb.root}.pageTitles.${breadcrumb.title}`)
+ : t(`globals.pageTitles.${breadcrumb.title}`);
+
return breadcrumb;
}
@@ -50,7 +54,7 @@ function getBreadcrumb(param) {
v-for="(breadcrumb, index) of breadcrumbs"
:key="index"
:icon="breadcrumb.icon"
- :label="t(`${breadcrumb.root}.pageTitles.${breadcrumb.title}`)"
+ :label="breadcrumb.locale"
:to="breadcrumb.path"
/>
diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js
index 4cbcba102..6096fb404 100644
--- a/src/i18n/en/index.js
+++ b/src/i18n/en/index.js
@@ -83,6 +83,12 @@ export default {
selectFile: 'Select a file',
copyClipboard: 'Copy on clipboard',
salesPerson: 'SalesPerson',
+ code: 'Code',
+ pageTitles: {
+ summary: 'Summary',
+ basicData: 'Basic data',
+ log: 'Logs',
+ },
},
errors: {
statusUnauthorized: 'Access denied',
@@ -685,34 +691,18 @@ export default {
},
},
parking: {
+ pickingOrder: 'Picking order',
+ sector: 'Sector',
+ row: 'Row',
+ column: 'Column',
pageTitles: {
parking: 'Parking',
parkingList: 'Parkings list',
- summary: 'Summary',
- basicData: 'Basic data',
- log: 'Logs',
- },
- list: {
- pickingOrder: 'Picking order',
},
searchBar: {
info: 'You can search by parking code',
label: 'Search parking...',
},
- summary: {
- code: 'Code',
- pickingOrder: 'Picking order',
- sector: 'Sector',
- row: 'Row',
- column: 'Column',
- },
- basicData: {
- code: 'Code',
- pickingOrder: 'Picking order',
- sector: 'Sector',
- row: 'Row',
- column: 'Column',
- },
},
invoiceIn: {
pageTitles: {
diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js
index 02647f581..ab14e0e82 100644
--- a/src/i18n/es/index.js
+++ b/src/i18n/es/index.js
@@ -83,6 +83,12 @@ export default {
selectFile: 'Seleccione un fichero',
copyClipboard: 'Copiar en portapapeles',
salesPerson: 'Comercial',
+ code: 'Código',
+ pageTitles: {
+ summary: 'Resumen',
+ basicData: 'Datos básicos',
+ log: 'Historial',
+ },
},
errors: {
statusUnauthorized: 'Acceso denegado',
@@ -743,32 +749,17 @@ export default {
},
},
parking: {
+ pickingOrder: 'Orden de recogida',
+ row: 'Fila',
+ column: 'Columna',
pageTitles: {
parking: 'Parking',
parkingList: 'Listado de parkings',
- summary: 'Resumen',
- basicData: 'Datos básicos',
- log: 'Registros de auditoría',
- },
- list: {
- pickingOrder: 'Orden de recogida',
},
searchBar: {
info: 'Puedes buscar por código de parking',
label: 'Buscar parking...',
},
- summary: {
- code: 'Código',
- pickingOrder: 'Orden de recogida',
- row: 'Fila',
- column: 'Columna',
- },
- basicData: {
- code: 'Código',
- pickingOrder: 'Orden de recogida',
- row: 'Fila',
- column: 'Columna',
- },
},
invoiceIn: {
pageTitles: {
diff --git a/src/pages/Parking/Card/ParkingBasicData.vue b/src/pages/Parking/Card/ParkingBasicData.vue
index 72f19a5e7..26a1ed8be 100644
--- a/src/pages/Parking/Card/ParkingBasicData.vue
+++ b/src/pages/Parking/Card/ParkingBasicData.vue
@@ -32,22 +32,19 @@ const filter = {
-
-
+
+
-
-
+
+
(header.value = useCardDescription(entity.code, en
@on-fetch="setHeader"
>
-
-
-
+
+
+
diff --git a/src/pages/Parking/Card/ParkingSummary.vue b/src/pages/Parking/Card/ParkingSummary.vue
index f72fc7d2c..fe733f56c 100644
--- a/src/pages/Parking/Card/ParkingSummary.vue
+++ b/src/pages/Parking/Card/ParkingSummary.vue
@@ -33,21 +33,21 @@ const filter = {
class="header header-link"
:href="`#/parking/${entityId}/basic-data`"
>
- {{ t('parking.pageTitles.basicData') }}
+ {{ t('globals.pageTitles.basicData') }}
-
+
-
-
+
+
diff --git a/src/pages/Parking/ParkingList.vue b/src/pages/Parking/ParkingList.vue
index 1615e99ed..2a1873d5a 100644
--- a/src/pages/Parking/ParkingList.vue
+++ b/src/pages/Parking/ParkingList.vue
@@ -88,7 +88,7 @@ function exprBuilder(param, value) {