diff --git a/.gitignore b/.gitignore index 213384ef5..617169f6f 100644 --- a/.gitignore +++ b/.gitignore @@ -29,5 +29,5 @@ yarn-error.log* *.sln # Cypress directories and files -/tests/cypress/videos -/tests/cypress/screenshots \ No newline at end of file +/test/cypress/videos +/test/cypress/screenshots diff --git a/src/components/ui/CatalogItem.vue b/src/components/ui/CatalogItem.vue index 9670d9b68..7806562b2 100644 --- a/src/components/ui/CatalogItem.vue +++ b/src/components/ui/CatalogItem.vue @@ -41,7 +41,7 @@ const card = toRef(props, 'item');
- + {{ card.name }} diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js index d7838d58e..89d4dee5c 100644 --- a/src/composables/useArrayData.js +++ b/src/composables/useArrayData.js @@ -170,10 +170,9 @@ export function useArrayData(key, userOptions) { async function addOrder(field, direction = 'ASC') { const newOrder = field + ' ' + direction; - let order = store.order || []; - if (typeof order == 'string') order = [order]; + const order = toArray(store.order); - let index = order.findIndex((o) => o.split(' ')[0] === field); + let index = getOrderIndex(order, field); if (index > -1) { order[index] = newOrder; } else { @@ -190,16 +189,23 @@ export function useArrayData(key, userOptions) { } async function deleteOrder(field) { - let order = store.order ?? []; - if (typeof order == 'string') order = [order]; - - const index = order.findIndex((o) => o.split(' ')[0] === field); + const order = toArray(store.order); + const index = getOrderIndex(order, field); if (index > -1) order.splice(index, 1); store.order = order; fetch({}); } + function getOrderIndex(order, field) { + return order.findIndex((o) => o.split(' ')[0] === field); + } + + function toArray(str = []) { + if (Array.isArray(str)) return str; + if (typeof str === 'string') return str.split(',').map((item) => item.trim()); + } + function sanitizerParams(params, exprBuilder) { for (const param in params) { if (params[param] === '' || params[param] === null) { @@ -290,8 +296,7 @@ export function useArrayData(key, userOptions) { Object.assign(params, store.userParams); if (params.filter) params.filter.skip = store.skip; - if (store?.order && typeof store?.order == 'string') store.order = [store.order]; - if (store.order?.length) params.filter.order = [...store.order]; + if (store.order) params.filter.order = toArray(store.order); else delete params.filter.order; return { filter, params, limit: filter.limit }; diff --git a/src/css/app.scss b/src/css/app.scss index 69aa7c6bd..7296b079f 100644 --- a/src/css/app.scss +++ b/src/css/app.scss @@ -312,11 +312,11 @@ input::-webkit-inner-spin-button { } .q-item > .q-item__section:has(.q-checkbox) { - max-width: min-content; + max-width: fit-content; } .row > .column:has(.q-checkbox) { - max-width: min-content; + max-width: fit-content; } .q-field__inner { .q-field__control { diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 2381df258..03abb4a99 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -5,6 +5,7 @@ globals: quantity: Quantity language: Language entity: Entity + preview: Preview user: User details: Details collapseMenu: Collapse lateral menu diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index b48b4c7c5..b0f380c09 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -5,6 +5,7 @@ globals: language: Idioma quantity: Cantidad entity: Entidad + preview: Vista previa user: Usuario details: Detalles collapseMenu: Contraer menú lateral diff --git a/src/pages/Customer/Card/CustomerConsumption.vue b/src/pages/Customer/Card/CustomerConsumption.vue index 640e37ed3..f0d8dea47 100644 --- a/src/pages/Customer/Card/CustomerConsumption.vue +++ b/src/pages/Customer/Card/CustomerConsumption.vue @@ -152,7 +152,8 @@ const updateDateParams = (value, params) => { v-if="campaignList" data-key="CustomerConsumption" url="Clients/consumption" - :order="['itemTypeFk', 'itemName', 'itemSize', 'description']" + :order="['itemTypeFk', 'itemName', 'itemSize', 'description']" + :filter="{ where: { clientFk: route.params.id } }" :columns="columns" search-url="consumption" :user-params="userParams" diff --git a/src/pages/Customer/Card/CustomerDescriptor.vue b/src/pages/Customer/Card/CustomerDescriptor.vue index cb49109d0..4a064843a 100644 --- a/src/pages/Customer/Card/CustomerDescriptor.vue +++ b/src/pages/Customer/Card/CustomerDescriptor.vue @@ -187,14 +187,18 @@ const debtWarning = computed(() => { - {{ t('Go to user') }} + {{ t('globals.pageTitles.createOrder') }} { }; const clientFk = { ticket: 'clientId', - order: 'clientFk', }; const key = clientFk[type]; if (!key) return; @@ -70,11 +69,6 @@ const openCreateForm = (type) => { {{ t('globals.pageTitles.createTicket') }} - - - {{ t('globals.pageTitles.createOrder') }} - - {{ t('Send SMS') }} diff --git a/src/pages/Customer/components/CustomerSamplesCreate.vue b/src/pages/Customer/components/CustomerSamplesCreate.vue index 665e136e4..754693672 100644 --- a/src/pages/Customer/components/CustomerSamplesCreate.vue +++ b/src/pages/Customer/components/CustomerSamplesCreate.vue @@ -214,7 +214,7 @@ const toCustomerSamples = () => { - -es: - Go to module index: Ir al índice del módulo - diff --git a/src/pages/Monitor/Ticket/MonitorTickets.vue b/src/pages/Monitor/Ticket/MonitorTickets.vue index f363f5bf8..e6b4631a0 100644 --- a/src/pages/Monitor/Ticket/MonitorTickets.vue +++ b/src/pages/Monitor/Ticket/MonitorTickets.vue @@ -290,7 +290,7 @@ const columns = computed(() => [ }, }, { - title: t('salesTicketsTable.preview'), + title: t('globals.preview'), icon: 'preview', color: 'primary', action: (row) => viewSummary(row.id, TicketSummary), diff --git a/src/pages/Monitor/locale/en.yml b/src/pages/Monitor/locale/en.yml index e61a24979..21324087c 100644 --- a/src/pages/Monitor/locale/en.yml +++ b/src/pages/Monitor/locale/en.yml @@ -33,7 +33,6 @@ salesTicketsTable: isFragile: Is fragile zone: Zone goToLines: Go to lines - preview: Preview total: Total preparation: H.Prep payMethod: Pay method diff --git a/src/pages/Order/Card/OrderCatalogFilter.vue b/src/pages/Order/Card/OrderCatalogFilter.vue index 39627595d..262f503fd 100644 --- a/src/pages/Order/Card/OrderCatalogFilter.vue +++ b/src/pages/Order/Card/OrderCatalogFilter.vue @@ -115,6 +115,7 @@ const removeTagGroupParam = (params, search, valIndex) => { } else { params.tagGroups.splice(valIndex, 1); } + search(); }; const setCategoryList = (data) => { diff --git a/src/pages/Route/RouteAutonomous.vue b/src/pages/Route/RouteAutonomous.vue index ca51b0fdb..23c920a57 100644 --- a/src/pages/Route/RouteAutonomous.vue +++ b/src/pages/Route/RouteAutonomous.vue @@ -142,7 +142,7 @@ const total = computed(() => { const openDmsUploadDialog = async () => { dmsDialog.value.rowsToCreateInvoiceIn = selectedRows.value .filter( - (agencyTerm) => agencyTerm.supplierFk === selectedRows.value?.[0].supplierFk + (agencyTerm) => agencyTerm.supplierFk === selectedRows.value?.[0].supplierFk, ) .map((agencyTerm) => ({ routeFk: agencyTerm.routeFk, @@ -277,5 +277,4 @@ es: Price: Precio Received: Recibida Autonomous: Autónomos - Preview: Vista previa diff --git a/src/pages/Route/RouteRoadmap.vue b/src/pages/Route/RouteRoadmap.vue index 168e52b23..a4ae6245b 100644 --- a/src/pages/Route/RouteRoadmap.vue +++ b/src/pages/Route/RouteRoadmap.vue @@ -112,7 +112,7 @@ const removeSelection = async () => { await Promise.all( selectedRows.value.map((roadmap) => { axios.delete(`Roadmaps/${roadmap.id}`); - }) + }), ); }; @@ -236,6 +236,5 @@ es: Plate: Matrícula Price: Precio Observations: Observaciones - Preview: Vista previa Select the estimated date of departure (ETD): Selecciona la fecha estimada de salida diff --git a/src/pages/Route/locale/en.yml b/src/pages/Route/locale/en.yml index 7a1f9e1c0..dd86103b6 100644 --- a/src/pages/Route/locale/en.yml +++ b/src/pages/Route/locale/en.yml @@ -33,7 +33,6 @@ route: 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 index b6f42bd5a..4a7c9b1df 100644 --- a/src/pages/Route/locale/es.yml +++ b/src/pages/Route/locale/es.yml @@ -33,7 +33,7 @@ route: Mark as served: Marcar como servidas Download selected routes as PDF: Descargar rutas seleccionadas como PDF Add ticket: Añadir tickets - Preview: Vista previa + 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/Supplier/Card/SupplierDescriptor.vue b/src/pages/Supplier/Card/SupplierDescriptor.vue index a1a2a0991..37c9c1cff 100644 --- a/src/pages/Supplier/Card/SupplierDescriptor.vue +++ b/src/pages/Supplier/Card/SupplierDescriptor.vue @@ -188,7 +188,6 @@ const getEntryQueryParams = (supplier) => { es: All entries with current supplier: Todas las entradas con proveedor actual Go to client: Ir a cliente - Go to module index: Ir al índice del módulo Inactive supplier: Proveedor inactivo Unverified supplier: Proveedor no verificado diff --git a/src/pages/Ticket/Card/TicketDescriptor.vue b/src/pages/Ticket/Card/TicketDescriptor.vue index 4e77b633f..9f7684b93 100644 --- a/src/pages/Ticket/Card/TicketDescriptor.vue +++ b/src/pages/Ticket/Card/TicketDescriptor.vue @@ -239,7 +239,6 @@ function ticketFilter(ticket) { es: This ticket is deleted: Este ticket está eliminado - Go to module index: Ir al índice del modulo Client inactive: Cliente inactivo Client not checked: Cliente no verificado Client has debt: Cliente con deuda diff --git a/src/pages/Travel/Card/TravelCard.vue b/src/pages/Travel/Card/TravelCard.vue index 4e48e6b53..9c67428f5 100644 --- a/src/pages/Travel/Card/TravelCard.vue +++ b/src/pages/Travel/Card/TravelCard.vue @@ -14,6 +14,9 @@ const filter = { 'warehouseOutFk', 'cargoSupplierFk', 'agencyModeFk', + 'isRaid', + 'isDelivered', + 'isReceived', ], include: [ { diff --git a/src/pages/Travel/Card/TravelDescriptor.vue b/src/pages/Travel/Card/TravelDescriptor.vue index 00852e5ee..72acf91b8 100644 --- a/src/pages/Travel/Card/TravelDescriptor.vue +++ b/src/pages/Travel/Card/TravelDescriptor.vue @@ -85,7 +85,6 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity. es: - Go to module index: Ir al índice del módulo The travel will be deleted: El envío será eliminado Do you want to delete this travel?: ¿Quieres eliminar este envío? All travels with current agency: Todos los envíos con la agencia actual diff --git a/src/pages/Wagon/WagonCounter.vue b/src/pages/Wagon/WagonCounter.vue index 505cbba28..fd411b86b 100644 --- a/src/pages/Wagon/WagonCounter.vue +++ b/src/pages/Wagon/WagonCounter.vue @@ -11,7 +11,7 @@ const { t } = useI18n(); const counters = ref({ alquilerBandeja: { count: 0, id: 96001, title: 'CC Bandeja', isTray: true }, bandejaRota: { count: 0, id: 88381, title: 'CC Bandeja Rota', isTray: true }, - carryOficial: { count: 0, id: 96000, title: 'CC Carry OFICIAL TAG5' }, + carryOficial: { count: 0, id: 96000, title: 'CC Carry OFICIAL TAG6' }, candadoRojo: { count: 0, id: 96002, title: 'CC Carry NO OFICIAL' }, sacadores: { count: 0, id: 142260, title: 'CC Sacadores' }, sinChapa: { count: 0, id: 2214, title: 'DC Carry Sin Placa CC' }, diff --git a/src/pages/Worker/Card/WorkerDescriptor.vue b/src/pages/Worker/Card/WorkerDescriptor.vue index c09e8868f..d87fd4a54 100644 --- a/src/pages/Worker/Card/WorkerDescriptor.vue +++ b/src/pages/Worker/Card/WorkerDescriptor.vue @@ -10,6 +10,7 @@ import axios from 'axios'; import VnImg from 'src/components/ui/VnImg.vue'; import EditPictureForm from 'components/EditPictureForm.vue'; import WorkerDescriptorMenu from './WorkerDescriptorMenu.vue'; +import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue'; const $props = defineProps({ id: { @@ -115,10 +116,13 @@ const handlePhotoUpdated = (evt = false) => { :value="entity.user?.emailUser?.email" copy /> - + + + + - -es: - Go to module index: Ir al índice del módulo - diff --git a/src/pages/Zone/ZoneClosingTable.vue b/src/pages/Zone/ZoneClosingTable.vue index 049f82271..4590b7ce1 100644 --- a/src/pages/Zone/ZoneClosingTable.vue +++ b/src/pages/Zone/ZoneClosingTable.vue @@ -90,7 +90,7 @@ const redirectToZoneSummary = (id) => { color="primary" @click.stop="viewSummary(props.row.id, ZoneSummary)" > - {{ t('zoneClosingTable.preview') }} + {{ t('globals.preview') }}
diff --git a/src/pages/Zone/locale/en.yml b/src/pages/Zone/locale/en.yml index bc285ef23..5fd1a3ea7 100644 --- a/src/pages/Zone/locale/en.yml +++ b/src/pages/Zone/locale/en.yml @@ -50,8 +50,7 @@ deliveryPanel: postcode: Postcode query: Query noEventsWarning: No service for the specified zone -zoneClosingTable: - preview: Preview + warehouses: deleteTitle: This item will be deleted deleteSubtitle: Are you sure you want to continue?