From 27b699ebf4f96fcdff05f58a35c1893655824076 Mon Sep 17 00:00:00 2001 From: pablone Date: Wed, 25 Sep 2024 11:16:27 +0200 Subject: [PATCH] fix: refs #7129 some component styles --- src/i18n/locale/en.yml | 8 +- src/i18n/locale/es.yml | 6 +- src/pages/Item/ItemFixedPrice.vue | 2 - src/pages/Route/Agency/AgencyList.vue | 1 - src/pages/Route/RouteExtendedList.vue | 119 +++++++----------------- src/pages/Route/RouteList.vue | 28 ++---- src/pages/Route/locale/en.yml | 25 +++++ src/pages/Route/locale/es.yml | 25 +++++ src/pages/Travel/Card/TravelSummary.vue | 2 +- 9 files changed, 101 insertions(+), 115 deletions(-) create mode 100644 src/pages/Route/locale/en.yml create mode 100644 src/pages/Route/locale/es.yml diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 6b9a4a1e1..f1e502998 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -111,7 +111,7 @@ globals: basicData: Basic data log: Logs parkingList: Parkings list - agencyList: Agencies list + agencyList: Agencies agency: Agency workCenters: Work centers modes: Modes @@ -207,7 +207,7 @@ globals: roadmap: Roadmap stops: Stops routes: Routes - cmrsList: CMRs list + cmrsList: CMRs RouteList: List routeCreate: New route RouteRoadmap: Roadmaps @@ -273,7 +273,7 @@ globals: clientsActionsMonitor: Clients and actions serial: Serial medical: Mutual - RouteExtendedList: Extended list + RouteExtendedList: Router supplier: Supplier created: Created worker: Worker @@ -880,7 +880,7 @@ route: tickets: Tickets log: Log autonomous: Autonomous - RouteExtendedList: Extended list + RouteExtendedList: Router cmr: list: results: results diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 15eba6706..e62553446 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -113,7 +113,7 @@ globals: basicData: Datos básicos log: Historial parkingList: Listado de parkings - agencyList: Listado de agencias + agencyList: Agencias agency: Agencia workCenters: Centros de trabajo modes: Modos @@ -211,13 +211,13 @@ globals: roadmap: Troncales stops: Paradas routes: Rutas - cmrsList: Listado de CMRs + cmrsList: CMRs RouteList: Listado routeCreate: Nueva ruta RouteRoadmap: Troncales RouteRoadmapCreate: Crear troncal autonomous: Autónomos - RouteExtendedList: Listado extendido + RouteExtendedList: Enrutador suppliers: Proveedores supplier: Proveedor supplierCreate: Nuevo proveedor diff --git a/src/pages/Item/ItemFixedPrice.vue b/src/pages/Item/ItemFixedPrice.vue index fddf154a2..2158065bd 100644 --- a/src/pages/Item/ItemFixedPrice.vue +++ b/src/pages/Item/ItemFixedPrice.vue @@ -600,11 +600,9 @@ function handleOnDataSave({ CrudModelRef }) { .q-table th, .q-table td { padding-inline: 5px !important; - // text-align: -webkit-right; } .q-table tbody td { max-width: none; - .q-td.col { & .vnInputDate { min-width: 90px; diff --git a/src/pages/Route/Agency/AgencyList.vue b/src/pages/Route/Agency/AgencyList.vue index 30ee52f54..9d456c1da 100644 --- a/src/pages/Route/Agency/AgencyList.vue +++ b/src/pages/Route/Agency/AgencyList.vue @@ -76,7 +76,6 @@ const columns = computed(() => [
import { computed, ref } from 'vue'; import { useI18n } from 'vue-i18n'; -import { useSession } from 'composables/useSession'; import { useSummaryDialog } from 'src/composables/useSummaryDialog'; import { useQuasar } from 'quasar'; import { toDate } from 'src/filters'; import { useRouter } from 'vue-router'; +import { usePrintService } from 'src/composables/usePrintService'; import axios from 'axios'; import RouteSearchbar from 'pages/Route/Card/RouteSearchbar.vue'; @@ -13,17 +13,14 @@ import RouteListTicketsDialog from 'pages/Route/Card/RouteListTicketsDialog.vue' import RouteSummary from 'pages/Route/Card/RouteSummary.vue'; import RightMenu from 'src/components/common/RightMenu.vue'; import RouteFilter from 'pages/Route/Card/RouteFilter.vue'; - import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue'; import VnInputDate from 'components/common/VnInputDate.vue'; import VnTable from 'components/VnTable/VnTable.vue'; -import { usePrintService } from 'src/composables/usePrintService'; const { openReport } = usePrintService(); const { t } = useI18n(); const { viewSummary } = useSummaryDialog(); const quasar = useQuasar(); -const session = useSession(); const selectedRows = ref([]); const tableRef = ref([]); const confirmationDialog = ref(false); @@ -53,7 +50,7 @@ const columns = computed(() => [ { align: 'left', name: 'workerFk', - label: t('Worker'), + label: t('route.Worker'), create: true, component: 'select', attrs: { @@ -76,7 +73,7 @@ const columns = computed(() => [ { align: 'left', name: 'agencyModeFk', - label: t('Agency'), + label: t('route.Agency'), isTitle: true, cardVisible: true, create: true, @@ -94,7 +91,7 @@ const columns = computed(() => [ { align: 'left', name: 'vehicleFk', - label: t('Vehicle'), + label: t('route.Vehicle'), cardVisible: true, create: true, component: 'select', @@ -115,7 +112,7 @@ const columns = computed(() => [ { align: 'left', name: 'created', - label: t('Date'), + label: t('route.Date'), columnFilter: false, cardVisible: true, create: true, @@ -125,7 +122,7 @@ const columns = computed(() => [ { align: 'left', name: 'from', - label: t('From'), + label: t('route.From'), visible: false, cardVisible: true, create: true, @@ -135,7 +132,7 @@ const columns = computed(() => [ { align: 'left', name: 'to', - label: t('To'), + label: t('route.To'), visible: false, cardVisible: true, create: true, @@ -145,28 +142,28 @@ const columns = computed(() => [ { align: 'center', name: 'm3', - label: t('Volume'), + label: 'm3', cardVisible: true, columnClass: 'shrink', }, { align: 'left', name: 'started', - label: t('hourStarted'), + label: t('route.hourStarted'), component: 'time', columnFilter: false, }, { align: 'left', name: 'finished', - label: t('hourFinished'), + label: t('route.hourFinished'), component: 'time', columnFilter: false, }, { align: 'center', name: 'kmStart', - label: t('KmStart'), + label: t('route.KmStart'), columnClass: 'shrink', create: true, visible: false, @@ -174,7 +171,7 @@ const columns = computed(() => [ { align: 'center', name: 'kmEnd', - label: t('KmEnd'), + label: t('route.KmEnd'), columnClass: 'shrink', create: true, visible: false, @@ -182,7 +179,7 @@ const columns = computed(() => [ { align: 'left', name: 'description', - label: t('Description'), + label: t('route.Description'), isTitle: true, create: true, component: 'input', @@ -191,7 +188,7 @@ const columns = computed(() => [ { align: 'left', name: 'isOk', - label: t('Served'), + label: t('route.Served'), component: 'checkbox', columnFilter: false, columnClass: 'shrink', @@ -201,20 +198,22 @@ const columns = computed(() => [ name: 'tableActions', actions: [ { - title: t('Add tickets'), + title: t('route.Add tickets'), icon: 'vn:ticketAdd', action: (row) => openTicketsDialog(row?.id), + isPrimary: true, }, { - title: t('components.smartCard.viewSummary'), + title: t('route.components.smartCard.viewSummary'), icon: 'preview', action: (row) => viewSummary(row?.id, RouteSummary), + isPrimary: true, }, { - title: t('Route summary'), + title: t('route.Route summary'), icon: 'arrow_forward', - isPrimary: true, action: (row) => navigate(row?.id), + isPrimary: true, }, ], }, @@ -226,7 +225,7 @@ function navigate(id) { const cloneRoutes = () => { if (!selectedRows.value.length || !startingDate.value) return; - axios.post('Routes/clone', { + axios.post('route.Routes/clone', { created: startingDate.value, ids: selectedRows.value.map((row) => row?.id), }); @@ -273,20 +272,25 @@ const openTicketsDialog = (id) => { -

{{ t('Select the starting date') }}

+

{{ t('route.Select the starting date') }}

- + - {{ t('globals.clone') }} + {{ t('route.globals.clone') }}
@@ -310,7 +314,7 @@ const openTicketsDialog = (id) => { :row-click="false" :create="{ urlCreate: 'Routes', - title: t('Create route'), + title: t('route.createRoute'), onDataSaved: ({ id }) => tableRef.redirect(id), formInitialData: {}, }" @@ -331,7 +335,7 @@ const openTicketsDialog = (id) => { :disable="!selectedRows?.length" @click="confirmationDialog = true" > - {{ t('Clone Selected Routes') }} + {{ t('route.Clone Selected Routes') }} { :disable="!selectedRows?.length" @click="showRouteReport" > - {{ t('Download selected routes as PDF') }} + {{ t('route.Download selected routes as PDF') }} { :disable="!selectedRows?.length" @click="markAsServed()" > - {{ t('Mark as served') }} + {{ t('route.Mark as served') }}
- - - -en: - newRoute: New Route - hourStarted: Started hour - hourFinished: Finished hour -es: - From: Desde - To: Hasta - Worker: Trabajador - Agency: Agencia - Vehicle: Vehículo - Volume: Volumen - Date: Fecha - Description: Descripción - Hour started: Hora inicio - Hour finished: Hora fin - KmStart: Km inicio - KmEnd: Km fin - Served: Servida - newRoute: Nueva Ruta - Clone Selected Routes: Clonar rutas seleccionadas - Select the starting date: Seleccione la fecha de inicio - Stating date: Fecha de inicio - Cancel: Cancelar - Mark as served: Marcar como servidas - Download selected routes as PDF: Descargar rutas seleccionadas como PDF - Add ticket: Añadir tickets - Preview: Vista previa - Summary: Resumen - Route is closed: La ruta está cerrada - Route is not served: La ruta no está servida - hourStarted: Hora de inicio - hourFinished: Hora de fin - diff --git a/src/pages/Route/RouteList.vue b/src/pages/Route/RouteList.vue index b6c23f8ed..d0feb9a65 100644 --- a/src/pages/Route/RouteList.vue +++ b/src/pages/Route/RouteList.vue @@ -38,7 +38,7 @@ const columns = computed(() => [ { align: 'left', name: 'workerFk', - label: t('Worker'), + label: t('route.Worker'), create: true, cardVisible: true, format: (row, dashIfEmpty) => dashIfEmpty(row.travelRef), @@ -47,7 +47,7 @@ const columns = computed(() => [ { align: 'left', name: 'agencyName', - label: t('Agency'), + label: t('route.Agency'), cardVisible: true, create: true, columnClass: 'expand', @@ -56,7 +56,7 @@ const columns = computed(() => [ { align: 'left', name: 'vehiclePlateNumber', - label: t('Vehicle'), + label: t('route.Vehicle'), cardVisible: true, create: true, columnFilter: false, @@ -64,7 +64,7 @@ const columns = computed(() => [ { align: 'left', name: 'started', - label: t('hourStarted'), + label: t('route.hourStarted'), cardVisible: true, columnFilter: false, format: (row) => toHour(row.started), @@ -72,7 +72,7 @@ const columns = computed(() => [ { align: 'left', name: 'finished', - label: t('hourFinished'), + label: t('route.hourFinished'), cardVisible: true, columnFilter: false, format: (row) => toHour(row.started), @@ -80,7 +80,7 @@ const columns = computed(() => [ { align: 'left', name: 'description', - label: t('Description'), + label: t('route.Description'), cardVisible: true, isTitle: true, create: true, @@ -90,7 +90,7 @@ const columns = computed(() => [ { align: 'left', name: 'isOk', - label: t('Served'), + label: t('route.Served'), component: 'checkbox', columnFilter: false, columnClass: 'shrink', @@ -103,7 +103,7 @@ const columns = computed(() => [ title: t('components.smartCard.viewSummary'), icon: 'preview', action: (row) => viewSummary(row?.id, RouteSummary), - color: 'primary', + isPrimary: true, }, ], }, @@ -117,7 +117,6 @@ const columns = computed(() => [ [ redirect="route" :create="{ urlCreate: 'Routes', - title: t('Create route'), + title: t('route.createRoute'), onDataSaved: ({ id }) => tableRef.redirect(id), formInitialData: {}, }" @@ -140,12 +139,3 @@ const columns = computed(() => [ - -es: - Worker: Trabajador - Agency: Agencia - Vehicle: Vehículo - Description: Descripción - Hour started: Hora inicio - Hour finished: Hora fin - diff --git a/src/pages/Route/locale/en.yml b/src/pages/Route/locale/en.yml new file mode 100644 index 000000000..617d704d2 --- /dev/null +++ b/src/pages/Route/locale/en.yml @@ -0,0 +1,25 @@ +route: + Worker: Worker + Agency: Agency + Vehicle: Vehicle + Description: Description + hourStarted: H.Start + hourFinished: H.End + createRoute: Create route + From: From + To: To + Date: Date + KmStart: Km start + KmEnd: Km end + Served: Served + Clone Selected Routes: Clone selected routes + Select the starting date: Select the starting date + Stating date: Starting date + Cancel: Cancel + Mark as served: Mark as served + Download selected routes as PDF: Download selected routes as PDF + Add ticket: Add ticket + Preview: Preview + Summary: Summary + Route is closed: Route is closed + Route is not served: Route is not served diff --git a/src/pages/Route/locale/es.yml b/src/pages/Route/locale/es.yml new file mode 100644 index 000000000..ed96ad915 --- /dev/null +++ b/src/pages/Route/locale/es.yml @@ -0,0 +1,25 @@ +route: + Worker: Trabajador + Agency: Agencia + Vehicle: Vehículo + Description: Descripción + hourStarted: H.Inicio + hourFinished: H.Fin + createRoute: Crear ruta + From: Desde + To: Hasta + Date: Fecha + KmStart: Km inicio + KmEnd: Km fin + Served: Servida + Clone Selected Routes: Clonar rutas seleccionadas + Select the starting date: Seleccione la fecha de inicio + Stating date: Fecha de inicio + Cancel: Cancelar + Mark as served: Marcar como servidas + Download selected routes as PDF: Descargar rutas seleccionadas como PDF + Add ticket: Añadir tickets + Preview: Vista previa + Summary: Resumen + Route is closed: La ruta está cerrada + Route is not served: La ruta no está servida diff --git a/src/pages/Travel/Card/TravelSummary.vue b/src/pages/Travel/Card/TravelSummary.vue index d7dce911b..829eb3a17 100644 --- a/src/pages/Travel/Card/TravelSummary.vue +++ b/src/pages/Travel/Card/TravelSummary.vue @@ -319,7 +319,7 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;