diff --git a/package.json b/package.json index d23ed0ced..e78b0cf3c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-front", - "version": "25.08.0", + "version": "25.10.0", "description": "Salix frontend", "productName": "Salix", "author": "Verdnatura", @@ -71,4 +71,4 @@ "vite": "^6.0.11", "vitest": "^0.31.1" } -} \ No newline at end of file +} diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index a92ba29ee..633f1254d 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -106,7 +106,7 @@ const isLoading = ref(false); const isResetting = ref(false); const hasChanges = ref(!$props.observeFormChanges); const originalData = computed(() => state.get(modelValue)); -const formData = ref({}); +const formData = ref(); const defaultButtons = computed(() => ({ save: { dataCy: 'saveDefaultBtn', diff --git a/src/components/TicketProblems.vue b/src/components/TicketProblems.vue index 17d9602af..783f2556f 100644 --- a/src/components/TicketProblems.vue +++ b/src/components/TicketProblems.vue @@ -5,6 +5,18 @@ defineProps({ row: { type: Object, required: true } }); + + + + {{ t('ticketSale.claim') }}: + {{ row.claim?.claimFk }} + + + {{ $t('salesTicketsTable.purchaseRequest') }} handleLocation(data, location)" > diff --git a/src/pages/Route/Card/RouteDescriptor.vue b/src/pages/Route/Card/RouteDescriptor.vue index b6d0ba8c4..503cd1941 100644 --- a/src/pages/Route/Card/RouteDescriptor.vue +++ b/src/pages/Route/Card/RouteDescriptor.vue @@ -6,6 +6,8 @@ import VnLv from 'components/ui/VnLv.vue'; import { dashIfEmpty, toDate } from 'src/filters'; import RouteDescriptorMenu from 'pages/Route/Card/RouteDescriptorMenu.vue'; import filter from './RouteFilter.js'; +import useCardDescription from 'src/composables/useCardDescription'; +import axios from 'axios'; const $props = defineProps({ id: { @@ -16,7 +18,6 @@ const $props = defineProps({ }); const route = useRoute(); -const { t } = useI18n(); const zone = ref(); const zoneId = ref(); const entityId = computed(() => { @@ -50,9 +51,9 @@ onMounted(async () => { width="lg-width" > - - - + + + - - {{ t('futureTickets.noVerified') }} - - - - - {{ t('futureTickets.purchaseRequest') }} - - - - - {{ t('ticketSale.noVisible') }} - - - - - {{ t('futureTickets.clientFrozen') }} - - - - - {{ t('futureTickets.risk') }}: {{ row.risk }} - - - - - {{ t('futureTickets.componentLack') }} - - - - - {{ t('futureTickets.rounding') }} - - + diff --git a/src/pages/Travel/ExtraCommunity.vue b/src/pages/Travel/ExtraCommunity.vue index dee9d923a..ac46caa44 100644 --- a/src/pages/Travel/ExtraCommunity.vue +++ b/src/pages/Travel/ExtraCommunity.vue @@ -2,6 +2,7 @@ import { onMounted, ref, computed, watch } from 'vue'; import { QBtn } from 'quasar'; import { useI18n } from 'vue-i18n'; +import { useRoute } from 'vue-router'; import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue'; import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue'; @@ -22,6 +23,8 @@ import VnPopup from 'src/components/common/VnPopup.vue'; const stateStore = useStateStore(); const { t } = useI18n(); const { openReport } = usePrintService(); +const route = useRoute(); +const tableParams = ref(); const shippedFrom = ref(Date.vnNew()); const landedTo = ref(Date.vnNew()); @@ -143,7 +146,7 @@ const columns = computed(() => [ sortable: true, }, { - label: t('globals.pageTitles.supplier'), + label: t('extraCommunity.cargoShip'), field: 'cargoSupplierNickname', name: 'cargoSupplierNickname', align: 'left', @@ -171,7 +174,7 @@ const columns = computed(() => [ ? value.reduce((sum, entry) => { return sum + (entry.invoiceAmount || 0); }, 0) - : 0 + : 0, ), }, { @@ -200,7 +203,7 @@ const columns = computed(() => [ sortable: true, }, { - label: t('kg'), + label: t('extraCommunity.kg'), field: 'kg', name: 'kg', align: 'left', @@ -208,7 +211,7 @@ const columns = computed(() => [ sortable: true, }, { - label: t('physicKg'), + label: t('extraCommunity.physicKg'), field: 'loadedKg', name: 'loadedKg', align: 'left', @@ -232,7 +235,7 @@ const columns = computed(() => [ sortable: true, }, { - label: t('shipped'), + label: t('extraCommunity.shipped'), field: 'shipped', name: 'shipped', align: 'left', @@ -249,7 +252,7 @@ const columns = computed(() => [ sortable: true, }, { - label: t('landed'), + label: t('extraCommunity.landed'), field: 'landed', name: 'landed', align: 'left', @@ -258,7 +261,7 @@ const columns = computed(() => [ format: (value) => toDate(value), }, { - label: t('notes'), + label: t('extraCommunity.notes'), field: '', name: 'notes', align: 'center', @@ -284,7 +287,7 @@ watch( if (!arrayData.store.data) return; onStoreDataChange(); }, - { deep: true, immediate: true } + { deep: true, immediate: true }, ); const openReportPdf = () => { @@ -451,13 +454,24 @@ const getColor = (percentage) => { for (const { value, className } of travelKgPercentages.value) if (percentage > value) return className; }; + +const filteredEntries = (entries) => { + if (!tableParams?.value?.entrySupplierFk) return entries; + return entries?.filter( + (entry) => entry.supplierFk === tableParams?.value?.entrySupplierFk, + ); +}; + +watch(route, () => { + tableParams.value = JSON.parse(route.query.table); +}); @@ -521,7 +535,7 @@ const getColor = (percentage) => { ? tableColumnComponents[col.name].event( rows[props.rowIndex][col.field], col.field, - props.rowIndex + props.rowIndex, ) : {} " @@ -546,7 +560,7 @@ const getColor = (percentage) => { }, { link: ['id', 'cargoSupplierNickname'].includes( - col.name + col.name, ), }, ]" @@ -564,9 +578,8 @@ const getColor = (percentage) => { - { name="warning" color="negative" size="md" - :title="t('requiresInspection')" + :title="t('extraCommunity.requiresInspection')" > @@ -709,24 +722,3 @@ const getColor = (percentage) => { width: max-content; } - -en: - searchExtraCommunity: Search for extra community shipping - kg: BI. KG - physicKg: Phy. KG - shipped: W. shipped - landed: W. landed - requiresInspection: Requires inspection - BIP: Boder Inspection Point - notes: Notes -es: - searchExtraCommunity: Buscar por envío extra comunitario - kg: KG Bloq. - physicKg: KG físico - shipped: F. envío - landed: F. llegada - notes: Notas - Open as PDF: Abrir como PDF - requiresInspection: Requiere inspección - BIP: Punto de Inspección Fronteriza - diff --git a/src/pages/Travel/ExtraCommunityFilter.vue b/src/pages/Travel/ExtraCommunityFilter.vue index b22574632..29d342334 100644 --- a/src/pages/Travel/ExtraCommunityFilter.vue +++ b/src/pages/Travel/ExtraCommunityFilter.vue @@ -79,7 +79,7 @@ warehouses(); - {{ t(`params.${tag.label}`) }}: + {{ t(`extraCommunity.filter.${tag.label}`) }}: {{ formatFn(tag.value) }} @@ -92,7 +92,7 @@ warehouses(); @@ -103,7 +103,7 @@ warehouses(); + + + + + - - -en: - params: - id: Id - reference: Reference - totalEntries: Total entries - agencyModeFk: Agency - warehouseInFk: Warehouse In - warehouseOutFk: Warehouse Out - shippedFrom: Shipped from - landedTo: Landed to - cargoSupplierFk: Supplier - continent: Continent out -es: - params: - id: Id - reference: Referencia - totalEntries: Ent. totales - agencyModeFk: Agencia - warehouseInFk: Alm. entrada - warehouseOutFk: Alm. salida - shippedFrom: Llegada desde - landedTo: Llegada hasta - cargoSupplierFk: Proveedor - continent: Cont. Salida - diff --git a/src/pages/Travel/locale/en.yml b/src/pages/Travel/locale/en.yml new file mode 100644 index 000000000..ddef66f2f --- /dev/null +++ b/src/pages/Travel/locale/en.yml @@ -0,0 +1,22 @@ +extraCommunity: + cargoShip: Cargo ship + searchExtraCommunity: Search for extra community shipping + kg: BI. KG + physicKg: Phy. KG + shipped: W. shipped + landed: W. landed + requiresInspection: Requires inspection + BIP: Boder Inspection Point + notes: Notes + filter: + id: Id + reference: Reference + totalEntries: Total entries + agencyModeFk: Agency + warehouseInFk: Warehouse In + warehouseOutFk: Warehouse Out + shippedFrom: Shipped from + landedTo: Landed to + cargoSupplierFk: Cargo supplier + continent: Continent out + entrySupplierFk: Supplier diff --git a/src/pages/Travel/locale/es.yml b/src/pages/Travel/locale/es.yml new file mode 100644 index 000000000..1542d8892 --- /dev/null +++ b/src/pages/Travel/locale/es.yml @@ -0,0 +1,23 @@ +extraCommunity: + cargoShip: Carguera + searchExtraCommunity: Buscar por envío extra comunitario + kg: KG Bloq. + physicKg: KG físico + shipped: F. envío + landed: F. llegada + notes: Notas + Open as PDF: Abrir como PDF + requiresInspection: Requiere inspección + BIP: Punto de Inspección Fronteriza + filter: + id: Id + reference: Referencia + totalEntries: Ent. totales + agencyModeFk: Agencia + warehouseInFk: Alm. entrada + warehouseOutFk: Alm. salida + shippedFrom: Llegada desde + landedTo: Llegada hasta + cargoSupplierFk: Carguera + continent: Cont. Salida + entrySupplierFk: Proveedor diff --git a/test/cypress/integration/entry/myEntry.spec.js b/test/cypress/integration/entry/myEntry.spec.js index 49d75cf39..ed469d9e2 100644 --- a/test/cypress/integration/entry/myEntry.spec.js +++ b/test/cypress/integration/entry/myEntry.spec.js @@ -8,11 +8,9 @@ describe('EntryMy when is supplier', () => { }, }); }); - + it('should open buyLabel when is supplier', () => { - cy.get( - '[to="/null/3"] > .q-card > :nth-child(2) > .q-btn > .q-btn__content > .q-icon' - ).click(); + cy.dataCy('cardBtn').eq(2).click(); cy.dataCy('printLabelsBtn').click(); cy.window().its('open').should('be.called'); });