diff --git a/CHANGELOG.md b/CHANGELOG.md index a7797f810..fbe18a10a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,157 @@ +# Version 25.04 - 2025-01-28 + +### Added 🆕 + +- chore: add task comment by:jorgep +- chore: refs #8198 rollback by:jorgep +- chore: refs #8322 unnecessary prop by:alexm +- feat: refs #7055 added new test case by:provira +- feat: refs #7055 created FilterItemForm test by:provira +- feat: refs #7077 created test for VnInputTime by:provira +- feat: refs #7078 created test for VnJsonValue by:provira +- feat: refs #7087 added more test cases by:provira +- feat: refs #7087 added new test by:provira +- feat: refs #7087 created CardSummary test by:provira +- feat: refs #7088 created test for FetchedTags by:provira +- feat: refs #7202 added new field by:Jon +- feat: refs #7882 Added coords to create a address by:guillermo +- feat: refs #7957 add tooltip and i18n support for search link in VnSearchbar component by:jorgep +- feat: refs #7957 enhance search functionality and improve data filtering logic by:jorgep +- feat: refs #7957 open in new tab by:jorgep +- feat: refs #7957 simplify fn to by:jorgep +- feat: refs #7957 update VnSearchbar component with improved search URL handling and styling enhancements by:jorgep +- feat: refs #8117 filters and values added as needed by:jtubau +- feat: refs #8197 useHasContent and use in VnSection and RightMenu by:alexm +- feat: refs #8219 added invoice out e2e tests by:Jon +- feat: refs #8219 global invoicing e2e by:Jon +- feat: refs #8220 added barcodes e2e test by:Jon +- feat: refs #8220 created items e2e by:Jon +- feat: refs #8220 modified create item form and added respective e2e by:Jon +- feat: refs #8225 added account and invoiceOut modules by:Jon +- feat: refs #8225 added entry module and fixed translations by:Jon +- feat: refs #8225 added invoiceIn and travel module by:Jon +- feat: refs #8225 added moreOptions and use it in customer and ticket summary by:Jon +- feat: refs #8225 added route and shelving module by:Jon +- feat: refs #8225 added worker and zone modules by:Jon +- feat: refs #8225 use it in claim, item and order modules by:Jon +- feat: refs #8258 added button to pass to uppercase by:provira +- feat: refs #8258 added uppercase option to VnInput by:provira +- feat: refs #8258 added uppercase validation on supplier create by:provira +- feat: refs #8298 add price optimum input and update translations for bonus and price optimum by:jgallego +- feat: refs #8316 add entryFilter prop to VnTable component in EntryList by:jtubau +- feat: refs #8322 added department changes by:provira +- feat: refs #8372 workerPBX by:robert +- feat: refs #8381 add initial and final temperature fields to entry forms and summaries by:jgallego +- feat: refs #8381 add initial and final temperature labels in English and Spanish locales by:jgallego +- feat: refs #8381 add toCelsius filter and update temperature fields in entry forms and summaries by:jgallego +- feat: skip tests by:jorgep +- style: refs #7957 update VnSearchbar padding for improved layout by:jorgep + +### Changed 📦 + +- perf: refs #8219 #8219 minor change by:Javier Segarra +- perf: refs #8220 on-fetch and added missing translations by:Jon +- perf: refs #8220 on-fetch by:Jon +- perf: refs #8220 translations by:Jon +- perf: refs #8220 use searchbar selector in e2e tests by:Jon +- perf: remove warning default value by:Javier Segarra +- refactor: redirect using params by:Jon +- refactor: refs #7077 removed some comments by:provira +- refactor: refs #7087 removed unused imports by:provira +- refactor: refs #7100 added const mockData by:jtubau +- refactor: refs #7100 delete unnecesary set prop by:jtubau +- refactor: refs #7100 refactorized with methods by:jtubau +- refactor: refs #7957 remove blank by:jorgep +- refactor: refs #8198 simplify data fetching and filtering logic by:jorgep +- refactor: refs #8198 simplify state management and data fetching in ItemDiary component by:jorgep +- refactor: refs #8219 modified e2e tests and fixed some translations by:Jon +- refactor: refs #8219 modified list test, created cypress download folder and added to gitignore by:Jon +- refactor: refs #8219 requested changes by:Jon +- refactor: refs #8219 use checkNotification command by:Jon +- refactor: refs #8220 added data-cy for e2e tests by:Jon +- refactor: refs #8220 requested changes by:Jon +- refactor: refs #8220 skip failling test and modifed tag test by:Jon +- refactor: refs #8225 requested changes by:Jon +- refactor: refs #8247 use new acl for sysadmin by:Jon +- refactor: refs #8316 added claimFilter by:jtubau +- refactor: refs #8316 added entryFilter by:jtubau +- refactor: refs #8316 add new localization keys and update existing ones for entry components by:jtubau +- refactor: refs #8316 moved localizations to local locale by:jtubau +- refactor: refs #8316 move order localization by:jtubau +- refactor: refs #8316 remove unused OrderSearchbar component by:jtubau +- refactor: refs #8316 update EntryCard to use user-filter prop and remove exprBuilder from EntryList by:jtubau +- refactor: refs #8316 used VnSection and VnCardBeta by:jtubau +- refactor: refs #8322 changed translations by:provira +- refactor: refs #8322 changed Worker component to use VnSection/VnCardBeta by:provira +- refactor: refs #8322 set department inside worker by:alexm +- refactor: skip intermitent failing test by:Jon + +### Fixed 🛠️ + +- feat: refs #8225 added entry module and fixed translations by:Jon +- fix: added missing translations in InvoiceIn by:provira +- fix: changed invoiceIn for InvoiceIn by:provira +- fix: changed translations to only use "invoicein" by:provira +- fix: department descriptor link by:Jon +- fix: e2e tests by:Jon +- fix: entry summary view and build warnings by:Jon +- fix: fixed InvoiceIn filter translations by:provira +- fix: modified setData in customerDescriptor to show the icons by:Jon +- fix: redirect to TicketSale from OrderLines (origin/Fix-RedirectToTicketSale) by:Jon +- fix: redirect when confirming lines by:Jon +- fix: refs #7055 #7055 #7055 fixed some tests by:provira +- fix: refs #7077 removed unused imports by:provira +- fix: refs #7078 added missing case with array by:provira +- fix: refs #7087 fixed some tests by:provira +- fix: refs #7088 changed "vm.vm" to "vm" by:provira +- fix: refs #7088 changed wrapper to vm by:provira +- fix: refs #7699 add icons and hint by:carlossa +- fix: refs #7699 add pwd vnInput by:carlossa +- fix: refs #7699 fix component by:carlossa +- fix: refs #7699 fix password visibility by:carlossa +- fix: refs #7699 fix tfront clean code by:carlossa +- fix: refs #7699 fix vnChangePassword, clean VnInput by:carlossa +- fix: refs #7699 fix vnInputPassword by:carlossa +- fix: refs #7957 add missing closing brace by:jorgep +- fix: refs #7957 css by:jorgep +- fix: refs #7957 rollback by:jorgep +- fix: refs #7957 update data-cy by:jorgep +- fix: refs #7957 update visibility handling for clear icon in VnInput component by:jorgep +- fix: refs #7957 vn-searchbar test by:jorgep +- fix: refs #8117 update salesPersonFk filter options and URL for improved data retrieval by:jtubau +- fix: refs #8197 not use yet by:alexm +- fix: refs #8198 update query param by:jorgep +- fix: refs #8219 fixed e2e tests by:Jon +- fix: refs #8219 fixed summary and global tests by:Jon +- fix: refs #8219 forgotten dataCy by:Jon +- fix: refs #8219 global e2e by:Jon +- fix: refs #8219 requested changes by:Jon +- fix: refs #8220 itemTag test by:Javier Segarra +- fix: refs #8225 invoice in translations by:Jon +- fix: refs #8243 fixed SkeletonSummary by:provira +- fix: refs #8247 conflicts by:Jon +- fix: refs #8247 fixed acls and added lost options by:Jon +- fix: refs #8316 ref="claimFilterRef" by:alexm +- fix: refs #8316 userFilter by:alexm +- fix: refs #8316 use rightMenu by:alexm +- fix: refs #8316 use section-searchbar by:alexm +- fix: refs #8317 disable action buttons when no rows are selected in ItemFixedPrice by:jtubau +- fix: refs #8322 unnecessary section by:alexm +- fix: refs #8338 fixed VnTable translations by:provira +- fix: refs #8338 removed chipLocale property/added more translations by:provira +- fix: refs #8448 e2e by:Jon +- fix: refs #8448 not use croppie by:alexm +- fix: remove departmentCode by:Javier Segarra +- fix: removed unused searchbar by:PAU ROVIRA ROSALENY +- fix: skip failling e2e by:Jon +- fix: sort by name in description by:Jon +- fix: translations by:Jon +- fix: use entryFilter by:alexm +- fix(VnCardBeta): add userFilter by:alexm +- refactor: refs #8219 modified e2e tests and fixed some translations by:Jon +- revert: revert header by:alexm +- test: fix expedition e2e by:alexm + # Version 25.00 - 2025-01-14 ### Added 🆕 diff --git a/cypress.config.js b/cypress.config.js index 500dda5c5..1924144f6 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -30,9 +30,11 @@ export default defineConfig({ testFiles: '**/*.spec.js', supportFile: 'test/cypress/support/unit.js', }, - setupNodeEvents(on, config) { - import('cypress-mochawesome-reporter/plugin').then((plugin) => plugin.default(on)); - // implement node event listeners here + setupNodeEvents: async (on, config) => { + const plugin = await import('cypress-mochawesome-reporter/plugin'); + plugin.default(on); + + return config; }, viewportWidth: 1280, viewportHeight: 720, diff --git a/src/components/ItemsFilterPanel.vue b/src/components/ItemsFilterPanel.vue index 946a5f11e..dc2a34435 100644 --- a/src/components/ItemsFilterPanel.vue +++ b/src/components/ItemsFilterPanel.vue @@ -341,4 +341,11 @@ es: floramondo: Floramondo salesPersonFk: Comprador categoryFk: Categoría + Plant: Planta natural + Flower: Flor fresca + Handmade: Hecho a mano + Artificial: Artificial + Green: Verdes frescos + Accessories: Complementos florales + Fruit: Fruta diff --git a/src/components/common/RightMenu.vue b/src/components/common/RightMenu.vue index 1eded089e..196815df1 100644 --- a/src/components/common/RightMenu.vue +++ b/src/components/common/RightMenu.vue @@ -26,6 +26,7 @@ onMounted(() => { round dense icon="dock_to_left" + data-cy="toggle-right-drawer" > {{ t('globals.collapseMenu') }} diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue index 1a0bb0019..78f08a479 100644 --- a/src/components/common/VnInput.vue +++ b/src/components/common/VnInput.vue @@ -175,7 +175,11 @@ const handleUppercase = () => { v-if="!$attrs.disabled && !($attrs.readonly) && $props.uppercase" @click="handleUppercase" class="uppercase-icon" - /> + > + + {{ t('Convert to uppercase') }} + + @@ -188,13 +192,26 @@ const handleUppercase = () => { + en: inputMin: Must be more than {value} maxLength: The value exceeds {value} characters inputMax: Must be less than {value} + es: inputMin: Debe ser mayor a {value} maxLength: El valor excede los {value} carácteres inputMax: Debe ser menor a {value} + Convert to uppercase: Convertir a mayúsculas \ No newline at end of file diff --git a/src/components/ui/VnPaginate.vue b/src/components/ui/VnPaginate.vue index 655f37059..7bb81591f 100644 --- a/src/components/ui/VnPaginate.vue +++ b/src/components/ui/VnPaginate.vue @@ -170,7 +170,7 @@ function emitStoreData() { async function paginate() { const { page, rowsPerPage, sortBy, descending } = pagination.value; - if (!props.url) return; + if (!arrayData.store.url) return; isLoading.value = true; await arrayData.loadMore(); diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 8e458df97..3cce2a853 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -1,7 +1,7 @@ globals: lang: es: Spanish - en: English + en: English language: Language quantity: Quantity entity: Entity @@ -453,6 +453,7 @@ ticket: service: Service attender: Attender ok: Ok + consigneeStreet: Street create: address: Address invoiceOut: @@ -721,6 +722,7 @@ travel: destination: Destination thermograph: Thermograph travelFileDescription: 'Travel id { travelId }' + carrier: Carrier components: topbar: {} itemsFilterPanel: diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index f59821f28..897edd9fe 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -448,6 +448,7 @@ ticket: purchaseRequest: Petición de compra service: Servicio attender: Consignatario + consigneeStreet: Dirección create: address: Dirección order: @@ -691,6 +692,7 @@ travel: destination: Destino thermograph: Termógrafo travelFileDescription: 'Id envío { travelId }' + carrier: Transportista components: topbar: {} itemsFilterPanel: diff --git a/src/pages/Customer/CustomerFilter.vue b/src/pages/Customer/CustomerFilter.vue index 53a12bf43..eae97d1be 100644 --- a/src/pages/Customer/CustomerFilter.vue +++ b/src/pages/Customer/CustomerFilter.vue @@ -1,3 +1,4 @@ + diff --git a/src/pages/Ticket/Card/TicketSummary.vue b/src/pages/Ticket/Card/TicketSummary.vue index 2c7976f52..bb338191b 100644 --- a/src/pages/Ticket/Card/TicketSummary.vue +++ b/src/pages/Ticket/Card/TicketSummary.vue @@ -46,16 +46,6 @@ onMounted(async () => { ticketUrl.value = (await getUrl('ticket/')) + entityId.value + '/'; }); -function formattedAddress() { - if (!ticket.value) return ''; - - const address = ticket.value.address; - const postcode = address.postalCode; - const province = address.province ? `(${address.province.name})` : ''; - - return `${address.street} - ${postcode} - ${address.city} ${province}`; -} - function isEditable() { try { return !ticket.value.ticketState?.state?.alertLevel; @@ -243,7 +233,11 @@ onMounted(async () => { + diff --git a/src/pages/Ticket/Card/TicketVolume.vue b/src/pages/Ticket/Card/TicketVolume.vue index 3c9f579d4..71b16f878 100644 --- a/src/pages/Ticket/Card/TicketVolume.vue +++ b/src/pages/Ticket/Card/TicketVolume.vue @@ -11,6 +11,7 @@ import { useStateStore } from 'stores/useStateStore'; import { dashIfEmpty } from 'src/filters'; import axios from 'axios'; import VnTable from 'src/components/VnTable/VnTable.vue'; +import RightMenu from 'src/components/common/RightMenu.vue'; const route = useRoute(); const stateStore = useStateStore(); @@ -23,7 +24,7 @@ watch( async () => { await nextTick(); salesRef.value?.fetch(); - } + }, ); const salesFilter = computed(() => ({ @@ -100,29 +101,28 @@ onMounted(() => (stateStore.rightDrawer = true)); @on-fetch="(data) => applyVolumes(data)" auto-load /> - - - - - {{ t('volume.type') }}: - {{ dashIfEmpty(packingType.description) }} - - - - {{ t('volume.volume') }}: {{ packingType.volume }} - - - + + + { name: 'temperatureFk', align: 'left', }, + { + label: t('travel.thermographs.carrier'), + field: (row) => row.agencyMode?.name, + name: 'agencyModeFk', + align: 'left', + }, { label: t('globals.maxTemperature'), field: 'maxTemperature', @@ -179,33 +185,31 @@ const entriesTableRows = computed(() => { return entries.value; }); -const entriesTotalHb = computed(() => - entriesTableRows.value.reduce((acc, { hb }) => acc + hb, 0) -); +const entriesTotals = computed(() => { + const totals = { + hb: 0, + freightValue: 0, + packageValue: 0, + cc: 0, + pallet: 0, + m3: 0, + }; -const entriesTotalFreight = computed(() => - toCurrency( - entriesTableRows.value.reduce((acc, { freightValue }) => acc + freightValue, 0) - ) -); + entriesTableRows.value.forEach((row) => { + for (const key in totals) { + totals[key] += row[key] || 0; + } + }); -const entriesTotalPackageValue = computed(() => - toCurrency( - entriesTableRows.value.reduce((acc, { packageValue }) => acc + packageValue, 0) - ) -); - -const entriesTotalCc = computed(() => - entriesTableRows.value.reduce((acc, { cc }) => acc + cc, 0) -); - -const entriesTotalPallet = computed(() => - entriesTableRows.value.reduce((acc, { pallet }) => acc + pallet, 0) -); - -const entriesTotalM3 = computed(() => - entriesTableRows.value.reduce((acc, { m3 }) => acc + m3, 0) -); + return { + hb: totals.hb.toFixed(2), + freight: toCurrency(totals.freightValue), + packageValue: toCurrency(totals.packageValue), + cc: totals.cc.toFixed(2), + pallet: totals.pallet.toFixed(2), + m3: totals.m3.toFixed(2), + }; +}); const getTravelEntries = async (id) => { const { data } = await axios.get(`Travels/${id}/getEntries`); @@ -214,17 +218,25 @@ const getTravelEntries = async (id) => { const getTravelThermographs = async (id) => { const filter = { - include: { - relation: 'warehouse', - scope: { - fields: ['id', 'name'], + include: [ + { + relation: 'agencyMode', + scope: { + fields: ['id', 'name'], + }, }, - }, + { + relation: 'warehouse', + scope: { + fields: ['id', 'name'], + }, + }, + ], where: { travelFk: id }, }; const { data } = await axios.get('TravelThermographs', { - params: { filter: JSON.parse(JSON.stringify(filter)) }, + params: { filter }, }); thermographs.value = data; }; @@ -368,12 +380,12 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`; - {{ entriesTotalHb }} - {{ entriesTotalFreight }} - {{ entriesTotalPackageValue }} - {{ entriesTotalCc }} - {{ entriesTotalPallet }} - {{ entriesTotalM3 }} + {{ entriesTotals.hb }} + {{ entriesTotals.freight }} + {{ entriesTotals.packageValue }} + {{ entriesTotals.cc }} + {{ entriesTotals.pallet }} + {{ entriesTotals.m3 }} diff --git a/src/pages/Travel/Card/TravelThermographs.vue b/src/pages/Travel/Card/TravelThermographs.vue index 85781a6a4..b520166d3 100644 --- a/src/pages/Travel/Card/TravelThermographs.vue +++ b/src/pages/Travel/Card/TravelThermographs.vue @@ -12,6 +12,7 @@ import axios from 'axios'; import useNotify from 'src/composables/useNotify.js'; import { toDate, toCelsius } from 'src/filters'; import { downloadFile } from 'src/composables/downloadFile'; +import { useArrayData } from 'src/composables/useArrayData'; const route = useRoute(); const quasar = useQuasar(); @@ -19,16 +20,25 @@ const router = useRouter(); const { t } = useI18n(); const { notify } = useNotify(); +const travel = computed(() => useArrayData('Travel').store.data); const thermographPaginateRef = ref(); const warehouses = ref([]); const thermographFilter = { - include: { - relation: 'warehouse', - scope: { - fields: ['id', 'name'], + include: [ + { + relation: 'agencyMode', + scope: { + fields: ['id', 'name'], + }, }, - }, + { + relation: 'warehouse', + scope: { + fields: ['id', 'name'], + }, + }, + ], where: { travelFk: route.params.id }, order: ['created'], }; @@ -47,6 +57,12 @@ const TableColumns = computed(() => { name: 'temperatureFk', align: 'left', }, + { + label: t('travel.thermographs.carrier'), + field: (row) => row.agencyMode?.name, + name: 'agencyModeFk', + align: 'left', + }, { label: t('globals.maxTemperature'), field: 'maxTemperature', @@ -116,7 +132,9 @@ const redirectToThermographForm = (action, id) => { }; if (action === 'edit' && id) { - routeDetails.query = { travelThermographFk: id }; + routeDetails.query = { id }; + } else if (action === 'create') { + routeDetails.query = { agencyModeFk: travel.value?.agencyModeFk }; } router.push(routeDetails); }; diff --git a/src/pages/Travel/Card/TravelThermographsForm.vue b/src/pages/Travel/Card/TravelThermographsForm.vue index 9788c9a99..7aec32972 100644 --- a/src/pages/Travel/Card/TravelThermographsForm.vue +++ b/src/pages/Travel/Card/TravelThermographsForm.vue @@ -39,6 +39,7 @@ const warehousesOptions = ref([]); const temperaturesOptions = ref([]); const thermographForm = ref({}); const inputFileRef = ref(null); +const agencyModeOptions = ref([]); onBeforeMount(async () => { if (props.viewAction === 'create') { @@ -49,8 +50,8 @@ onBeforeMount(async () => { if (route.query.thermographData) { const thermographData = JSON.parse(route.query.thermographData); - for (let key in thermographForm) { - thermographForm[key] = thermographData[key]; + for (let key in thermographForm.value) { + thermographForm.value[key] = thermographData[key]; } } }); @@ -72,6 +73,7 @@ const setCreateDefaultParams = async () => { thermographForm.value.reference = route.params.id; thermographForm.value.dmsTypeId = dataResponse.id; thermographForm.value.state = 'Ok'; + thermographForm.value.agencyModeFk = +route.query.agencyModeFk; thermographForm.value.description = t('travel.thermographs.travelFileDescription', { travelId: route.params.id, }).toUpperCase(); @@ -81,7 +83,7 @@ const setEditDefaultParams = async () => { const filterObj = { include: { relation: 'dms' } }; const filter = encodeURIComponent(JSON.stringify(filterObj)); const { data } = await axios.get( - `TravelThermographs/${route.query.travelThermographFk}?filter=${filter}` + `TravelThermographs/${route.query.id}?filter=${filter}`, ); if (data) { @@ -98,6 +100,7 @@ const setEditDefaultParams = async () => { thermographForm.value.minTemperature = data.minTemperature; thermographForm.value.temperatureFk = data.temperatureFk; thermographForm.value.travelThermographFk = data.id; + thermographForm.value.agencyModeFk = data.agencyModeFk; } }; @@ -159,9 +162,14 @@ const onThermographCreated = async (data) => { auto-load url="Temperatures" /> + + { }" sort-by="thermographFk ASC" option-label="thermographFk" - option-filter-value="thermographFk" + option-filter-value="id" :disable="viewAction === 'edit'" :tooltip="t('New thermograph')" :roles-allowed-to-create="['logistic']" + data-key="travelThermographSelect" >