refafctor: changed titles errors
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Jon Elias 2024-06-19 08:44:40 +02:00
parent a33ce5699e
commit 42c58296ac
11 changed files with 25 additions and 34 deletions

View File

@ -37,7 +37,6 @@ function getBreadcrumb(param) {
locale: t(`globals.pageTitles.${param.meta.title}`),
};
//TODO modificar para que funcione títulos de página
if (screen.gt.sm) {
breadcrumb.name = param.name;
breadcrumb.title = useCamelCase(param.meta.title);

View File

@ -100,8 +100,8 @@ globals:
modes: Modes
zones: Zones
zonesList: Zones
deliveryList: Delivery days
upcomingList: Upcoming deliveries
deliveryDays: Delivery days
upcomingDeliveries: Upcoming deliveries
role: Role
alias: Alias
aliasUsers: Users
@ -220,6 +220,8 @@ globals:
lastEntries: Last entries
itemType: Item type
monitors: Monitors
dashboard: Dashboard
users: Users
created: Created
worker: Worker
now: Now
@ -260,7 +262,7 @@ verifyEmail:
verifyEmail: Email verification
dashboard:
pageTitles:
dashboard: Dashboard
customer:
list:
phone: Phone

View File

@ -100,8 +100,8 @@ globals:
modes: Modos
zones: Zonas
zonesList: Zonas
deliveryList: Días de entrega
upcomingList: Próximos repartos
deliveryDays: Días de entrega
upcomingDeliveries: Próximos repartos
role: Role
alias: Alias
aliasUsers: Usuarios
@ -221,6 +221,8 @@ globals:
lastEntries: Últimas entradas
itemType: Familia
monitors: Monitores
dashboard: Tablón
users: Usuarios
created: Fecha creación
worker: Trabajador
now: Ahora
@ -259,7 +261,7 @@ verifyEmail:
verifyEmail: Verificación de correo
dashboard:
pageTitles:
dashboard: Tablón
customer:
list:
phone: Teléfono

View File

@ -223,7 +223,7 @@ async function changeState(value) {
<QCard class="vn-one">
<VnTitle
:url="`#/claim/${entityId}/basic-data`"
:text="t('claim.pageTitles.basicData')"
:text="t('globals.pageTitles.basicData')"
/>
<VnLv
:label="t('claim.summary.created')"

View File

@ -209,7 +209,7 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
<QCardSection class="q-pa-none">
<VnTitle
:url="getLink('basic-data')"
:text="t('invoiceIn.pageTitles.basicData')"
:text="t('globals.pageTitles.basicData')"
/>
</QCardSection>
<VnLv
@ -240,7 +240,7 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
<QCardSection class="q-pa-none">
<VnTitle
:url="getLink('basic-data')"
:text="t('invoiceIn.pageTitles.basicData')"
:text="t('globals.pageTitles.basicData')"
/>
</QCardSection>
<VnLv
@ -265,7 +265,7 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
<QCardSection class="q-pa-none">
<VnTitle
:url="getLink('basic-data')"
:text="t('invoiceIn.pageTitles.basicData')"
:text="t('globals.pageTitles.basicData')"
/>
</QCardSection>
<VnLv
@ -289,7 +289,7 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
<QCardSection class="q-pa-none">
<VnTitle
:url="getLink('basic-data')"
:text="t('invoiceIn.pageTitles.basicData')"
:text="t('globals.pageTitles.basicData')"
/>
</QCardSection>
<QCardSection class="q-pa-none">

View File

@ -49,7 +49,7 @@ const entriesTableColumns = computed(() => {
showValue: false,
},
{
label: t('supplier.pageTitles.supplier'),
label: t('globals.pageTitles.supplier'),
field: 'supplierName',
name: 'supplierName',
align: 'left',
@ -247,7 +247,7 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
<QCardSection class="q-pa-none">
<VnTitle
:url="getLink('basic-data')"
:text="t('travel.pageTitles.basicData')"
:text="t('globals.pageTitles.basicData')"
/>
</QCardSection>
<VnLv :label="t('globals.shipped')" :value="toDate(travel.shipped)" />
@ -265,7 +265,7 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
<QCardSection class="q-pa-none">
<VnTitle
:url="getLink('basic-data')"
:text="t('travel.pageTitles.basicData')"
:text="t('globals.pageTitles.basicData')"
/>
</QCardSection>
<VnLv :label="t('globals.landed')" :value="toDate(travel.landed)" />
@ -283,7 +283,7 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
<QCardSection class="q-pa-none">
<VnTitle
:url="getLink('basic-data')"
:text="t('travel.pageTitles.basicData')"
:text="t('globals.pageTitles.basicData')"
/>
</QCardSection>
<VnLv :label="t('globals.agency')" :value="travel.agency?.name" />

View File

@ -132,7 +132,7 @@ const columns = computed(() => [
sortable: true,
},
{
label: t('supplier.pageTitles.supplier'),
label: t('globals.pageTitles.supplier'),
field: 'cargoSupplierNickname',
name: 'cargoSupplierNickname',
align: 'left',

View File

@ -182,7 +182,7 @@ const decrement = (paramsObj, key) => {
<QItem>
<QItemSection>
<VnSelect
:label="t('supplier.pageTitles.supplier')"
:label="t('globals.pageTitles.supplier')"
v-model="params.cargoSupplierFk"
@update:model-value="searchFn()"
:options="suppliersOptions"

View File

@ -11,7 +11,6 @@ import { useState } from 'src/composables/useState';
import { useSession } from 'src/composables/useSession';
import { useRole } from 'src/composables/useRole';
import { useUserConfig } from 'src/composables/useUserConfig';
import { toLowerCamel } from 'src/filters';
import { useTokenConfig } from 'src/composables/useTokenConfig';
import { useAcl } from 'src/composables/useAcl';
@ -79,13 +78,11 @@ export default route(function (/* { store, ssrContext } */) {
let title = t(`login.title`);
const matches = to.matched;
let moduleName;
if (matches && matches.length > 1) {
const module = matches[1];
const moduleTitle = module.meta && module.meta.title;
moduleName = toLowerCamel(module.name);
if (moduleTitle) {
title = t(`${moduleName}.pageTitles.${moduleTitle}`);
title = t(`globals.pageTitles.${moduleTitle}`);
}
}
@ -94,7 +91,7 @@ export default route(function (/* { store, ssrContext } */) {
if (childPageTitle && matches.length > 2) {
if (title != '') title += ': ';
const moduleLocale = `${moduleName}.pageTitles.${childPageTitle}`;
const moduleLocale = `globals.pageTitles.${childPageTitle}`;
const pageTitle = te(moduleLocale)
? t(moduleLocale)
: t(`globals.pageTitles.${childPageTitle}`);

View File

@ -201,15 +201,6 @@ export default {
},
component: () => import('src/pages/Item/Card/ItemLog.vue'),
},
{
path: 'botanical',
name: 'ItemBotanical',
meta: {
title: 'botanical',
icon: 'vn:botanical',
},
component: () => import('src/pages/Item/Card/ItemBotanical.vue'),
},
],
},
],

View File

@ -60,7 +60,7 @@ export const useNavigationStore = defineStore('navigationStore', () => {
menuChildren = menuChildren.map(({ name, title, icon }) => ({
name,
icon,
title: `${module}.pageTitles.${title}`,
title: `globals.pageTitles.${title}`,
}));
if (meta && meta.roles && role.hasAny(meta.roles) === false) return;
@ -70,7 +70,7 @@ export const useNavigationStore = defineStore('navigationStore', () => {
children: menuChildren,
};
if (meta) {
item.title = `${module}.pageTitles.${meta.title}`;
item.title = `globals.pageTitles.${meta.title}`;
item.icon = meta.icon;
}