diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index 1234ce123..b1c7606e6 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -176,14 +176,13 @@ async function saveChanges(data) { const changes = data || getChanges(); try { await axios.post($props.saveUrl || $props.url + '/crud', changes); - } catch (e) { - return (isLoading.value = false); + } finally { + isLoading.value = false; } originalData.value = JSON.parse(JSON.stringify(formData.value)); if (changes.creates?.length) await vnPaginateRef.value.fetch(); hasChanges.value = false; - isLoading.value = false; emit('saveChanges', data); quasar.notify({ type: 'positive', diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue index f24f054a5..14005e1cc 100644 --- a/src/components/common/VnSelect.vue +++ b/src/components/common/VnSelect.vue @@ -284,9 +284,9 @@ async function onScroll({ to, direction, from, index }) { :loading="isLoading" @virtual-scroll="onScroll" > - + { @@ -299,7 +299,22 @@ async function onScroll({ to, direction, from, index }) { /> - + + { + value = null; + emit('remove'); + } + " + class="cursor-pointer" + size="xs" + /> + + + diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index e2e0e4238..31a6931a4 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -766,7 +766,7 @@ travel: thermographs: Thermographs hb: HB basicData: - daysInForward: Days in forward + daysInForward: Automatic movement (Raid) isRaid: Raid thermographs: temperature: Temperature diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 58ddc98ef..ccc21e225 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -760,7 +760,7 @@ travel: thermographs: Termógrafos hb: HB basicData: - daysInForward: Días redada + daysInForward: Desplazamiento automatico (redada) isRaid: Redada thermographs: temperature: Temperatura diff --git a/src/pages/Account/Card/AccountMailForwarding.vue b/src/pages/Account/Card/AccountMailForwarding.vue index aa92e5072..30849d44a 100644 --- a/src/pages/Account/Card/AccountMailForwarding.vue +++ b/src/pages/Account/Card/AccountMailForwarding.vue @@ -41,8 +41,12 @@ const fetchAccountExistence = async () => { }; const fetchMailForwards = async () => { - const response = await axios.get(`MailForwards/${route.params.id}`); - return response.data; + try { + const response = await axios.get(`MailForwards/${route.params.id}`); + return response.data; + } catch { + return null; + } }; const deleteMailForward = async () => { diff --git a/src/pages/Customer/Card/CustomerWebAccess.vue b/src/pages/Customer/Card/CustomerWebAccess.vue index eec127fde..ea901c65a 100644 --- a/src/pages/Customer/Card/CustomerWebAccess.vue +++ b/src/pages/Customer/Card/CustomerWebAccess.vue @@ -42,13 +42,13 @@ async function hasCustomerRole() { > - + diff --git a/src/pages/Customer/components/CustomerAddressCreate.vue b/src/pages/Customer/components/CustomerAddressCreate.vue index f4a188243..bc4d6a128 100644 --- a/src/pages/Customer/components/CustomerAddressCreate.vue +++ b/src/pages/Customer/components/CustomerAddressCreate.vue @@ -18,8 +18,6 @@ const router = useRouter(); const formInitialData = reactive({ isDefaultAddress: false }); -const urlCreate = ref(''); - const agencyModes = ref([]); const incoterms = ref([]); const customsAgents = ref([]); @@ -40,13 +38,18 @@ function handleLocation(data, location) { data.countryFk = countryFk; } -function onAgentCreated(requestResponse, data) { - customsAgents.value.push(requestResponse); - data.customsAgentFk = requestResponse.id; +function onAgentCreated({ id, fiscalName }, data) { + customsAgents.value.push({ id, fiscalName }); + data.customsAgentFk = id; } + (customsAgents = data)" + auto-load + url="CustomsAgents" + /> (agencyModes = data)" auto-load @@ -57,7 +60,7 @@ function onAgentCreated(requestResponse, data) { @@ -141,8 +144,7 @@ function onAgentCreated(requestResponse, data) { - onAgentCreated(requestResponse, data) + (requestResponse) => onAgentCreated(requestResponse, data) " /> diff --git a/src/pages/Item/Card/ItemTags.vue b/src/pages/Item/Card/ItemTags.vue index 461aaef4b..f4ab90d93 100644 --- a/src/pages/Item/Card/ItemTags.vue +++ b/src/pages/Item/Card/ItemTags.vue @@ -66,6 +66,7 @@ const insertTag = (rows) => { (tagOptions = data)" auto-load /> diff --git a/src/pages/Supplier/Card/SupplierAccounts.vue b/src/pages/Supplier/Card/SupplierAccounts.vue index 428ab05c2..c2934830a 100644 --- a/src/pages/Supplier/Card/SupplierAccounts.vue +++ b/src/pages/Supplier/Card/SupplierAccounts.vue @@ -24,13 +24,14 @@ const supplier = ref(null); const supplierAccountRef = ref(null); const wireTransferFk = ref(null); const bankEntitiesOptions = ref([]); +const filteredBankEntitiesOptions = ref([]); const onBankEntityCreated = async (dataSaved, rowData) => { await bankEntitiesRef.value.fetch(); rowData.bankEntityFk = dataSaved.id; }; -const onChangesSaved = () => { +const onChangesSaved = async () => { if (supplier.value.payMethodFk !== wireTransferFk.value) quasar .dialog({ @@ -55,12 +56,35 @@ const setWireTransfer = async () => { await axios.patch(`Suppliers/${route.params.id}`, params); notify('globals.dataSaved', 'positive'); }; + +function findBankFk(value, row) { + row.bankEntityFk = null; + if (!value) return; + + const bankEntityFk = bankEntitiesOptions.value.find((b) => b.id == value.slice(4, 8)); + if (bankEntityFk) row.bankEntityFk = bankEntityFk.id; +} + +function bankEntityFilter(val, update) { + update(() => { + const needle = val.toLowerCase(); + filteredBankEntitiesOptions.value = bankEntitiesOptions.value.filter( + (bank) => + bank.bic.toLowerCase().startsWith(needle) || + bank.name.toLowerCase().includes(needle) + ); + }); +} (bankEntitiesOptions = data)" + @on-fetch=" + (data) => { + (bankEntitiesOptions = data), (filteredBankEntitiesOptions = data); + } + " auto-load /> { findBankFk(value, row)" :required="true" > @@ -109,7 +134,9 @@ const setWireTransfer = async () => { bankEntityFilter(val, update)" option-label="bic" option-value="id" hide-selected diff --git a/src/pages/Ticket/Card/TicketSaleTracking.vue b/src/pages/Ticket/Card/TicketSaleTracking.vue index 03e2336eb..7a33df795 100644 --- a/src/pages/Ticket/Card/TicketSaleTracking.vue +++ b/src/pages/Ticket/Card/TicketSaleTracking.vue @@ -471,7 +471,7 @@ const qCheckBoxController = (sale, action) => { url="Shelvings" hide-selected option-label="code" - option-value="code" + option-value="id" v-model="row.shelvingFk" @update:model-value="updateShelving(row)" style="max-width: 120px" diff --git a/src/pages/Travel/Card/TravelBasicData.vue b/src/pages/Travel/Card/TravelBasicData.vue index fd02b28cd..4b9aa28ed 100644 --- a/src/pages/Travel/Card/TravelBasicData.vue +++ b/src/pages/Travel/Card/TravelBasicData.vue @@ -104,7 +104,7 @@ const warehousesOptionsIn = ref([]); es: - raidDays: Si se marca "Redada", la fecha de entrega se moverá automáticamente los días indicados. + raidDays: El travel se desplaza automáticamente cada día para estar desde hoy al número de días indicado. Si se deja vacio no se moverá en: - raidDays: If "Raid" is checked, the landing date will automatically shift by the specified number of days. + raidDays: The travel adjusts itself daily to match the number of days set, starting from today. If left blank, it won’t move diff --git a/test/cypress/integration/vnComponent/vnBreadcrumbs.spec.js b/test/cypress/integration/vnComponent/vnBreadcrumbs.spec.js index 3c839c1c7..e996a65d5 100644 --- a/test/cypress/integration/vnComponent/vnBreadcrumbs.spec.js +++ b/test/cypress/integration/vnComponent/vnBreadcrumbs.spec.js @@ -3,6 +3,7 @@ describe('VnBreadcrumbs', () => { const firstCard = '.q-infinite-scroll > :nth-child(1)'; const lastBreadcrumb = '.q-breadcrumbs--last > .q-breadcrumbs__el'; beforeEach(() => { + cy.viewport(1920, 1080); cy.login('developer'); cy.visit('/'); });