Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix-front into dev
gitea/salix-front/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2024-11-26 14:20:08 +01:00
commit 9086b7d48d
10 changed files with 228 additions and 23 deletions

View File

@ -1,3 +1,189 @@
# Version 24.48 - 2024-11-25
### Added 🆕
- chore: correct checkNotification (fix_customer_issues) by:alexm
- chore: perf (warmFix_order_equalSalix) by:alexm
- chore: refs #6818 add spaces by:jorgep
- chore: refs #6818 drop useless code & comment by:jorgep
- chore: refs #7273 sticky add btn & refactor by:jorgep
- chore: refs #7524 fix test by:jorgep
- chore: refs #8039 not required by:alexm
- chore: refs #8078 fiz tests by:jorgep
- chore: refs #8078 rollback ref by:jorgep
- chore: remove console.log (warmFix_invoiceOut_Global) by:alexm
- chore: typo (fix_itemType-redirection) by:alexm
- feat: #6943 use openURL quasar by:Javier Segarra
- feat: #7782 add cypress report by:Javier Segarra
- feat: #7782 cypress.config watchForFileChanges by:Javier Segarra
- feat: #7782 npm run resetDatabase by:Javier Segarra
- feat: #7782 waitUntil domContentLoad by:Javier Segarra
- feat: added composable to confirm orders by:Jon
- feat: add /reports in gitignore (warmFix_reports_in_gitignore) by:alexm
- feat: apply changes for customerModule by:Javier Segarra
- feat: disabled buttons by:Javier Segarra
- feat: move buttons to DescriptorMenu by:Javier Segarra
- feat: refs #6818 add icon by:jorgep
- feat: refs #6818 fetch url & default channel by:jorgep
- feat: refs #6818 saysimple integration by:jorgep
- feat: refs #6839 module searching (6839-addSearchMenu) by:jorgep
- feat: refs #6839 normalize search by:jorgep
- feat: refs #6919 sync entry data by:jorgep
- feat: refs #7006 itemType basic data new inputs by:guillermo
- feat: refs #7006 itemTypeLog added by:guillermo
- feat: refs #7193 modified parking to use the scope and corrected small errors by:Jon
- feat: refs #7206 added inactive label and corrected minor errors by:Jon
- feat: refs #7308 #7308 remove warnings related to useSession by:Javier Segarra
- feat: refs #7349 usa back con permisos by:jgallego
- feat: refs #7524 add front test by:jorgep
- feat: refs #7874 improve vn-notes ui by:jorgep
- feat: refs #7970 notify changes by:Jon
- feat(): refs #8039 canceledError not notify by:alexm
- feat: refs #8039 notify error unify by:alexm
- feat: refs #8039 show duplicate request in local by:alexm
- feat: refs #8078 add shortcut multi selection by:jorgep
- feat: refs #8078 add tests by:jorgep
- feat: refs#8087 Redadas en travel by:Carlos Andrés
- feat: refs #8087 Traspasar redadas a travels by:Carlos Andrés
- feat: remove comments by:Javier Segarra
- feat(Supplier): add companySize by:alexm
- feat: use composable to unify logic by:Javier Segarra
- feat(VnInput): empty to null by:alexm
- feat(VnSelect): order data equal salix by:alexm
- feat(VnSelect): refs #7136 add scroll (7136-vnSelect_paginate_simplify_2) by:alexm
### Changed 📦
- chore: perf (warmFix_order_equalSalix) by:alexm
- chore: refs #7273 sticky add btn & refactor by:jorgep
- fix: better performance (warmFix_accountAcls) by:alexm
- perf: minor bugs detected by:Javier Segarra
- perf: refs #6943 #6943 merge command by:Javier Segarra
- perf: refs #7283 #7283 declare composable inst4ead code duplicated by:Javier Segarra
- perf: refs #7283 #7283 handle composable i18n by:Javier Segarra
- perf: refs #7283 #7283 handle i18n by:Javier Segarra
- perf: refs #7283 #7283 i18n params by:Javier Segarra
- perf: refs #7308 #7308 remove comments by:Javier Segarra
- perf: remove appendParams by:Javier Segarra
- perf: use const in VnLocation by:Javier Segarra
- perf: use required instead :required="true" by:Javier Segarra
- refactor: apply QPopupProxy by:wbuezas
- refactor: changed confirmOrder directory by:Jon
- refactor: change keyup.enter for update:model-value by:wbuezas
- refactor(InvoiceInBasicData): use VnDms by:alexm
- refactor: modified composable by:Jon
- refactor: refs #6818 change channel source by:jorgep
- refactor: refs #6818 channel logic by:jorgep
- refactor: refs #6919 export filter by:jorgep
- refactor: refs #7132 1st wave of changes in global translations files by:Jon
- refactor: refs #7132 account's module translations by:Jon
- refactor: refs #7132 customer's module translations by:Jon
- refactor: refs #7132 deleted pageTitles repeated by:Jon
- refactor: refs #7132 delete duplicate translations' keys by:Jon
- refactor: refs #7132 deleted useless code by:Jon
- refactor: refs #7132 global translations files changed by:Jon
- refactor: refs #7266 Changed method name by:guillermo
- refactor: refs #7950 Created cmr model by:guillermo
- refactor: refs #7970 added emit by:Jon
- refactor: refs #7970 refactored VnConfirm to emit events by:Jon
- refactor: refs #8185 modified LeftMenu to avoid duplicates by:Jon
- refactor: remove unused variable by:wbuezas
- refactor: revert catalog changes by:Jon
- refactor: small change by:wbuezas
- test: refactor e2e by:alexm
- test: refs #8039 add hasNotify and, refactor: agencyWorkCenter test by:alexm
### Fixed 🛠️
- chore: refs #7524 fix test by:jorgep
- fix: better performance (warmFix_accountAcls) by:alexm
- fix: catalog view category and type filter by:wbuezas
- fix: category and tags filters by:Jon
- fix: changed route.query by:Jon
- fix: change type vnput by:Javier Segarra
- fix(ClaimList): stateCode orderBy priority by:alexm
- fix: entryFilters by:carlossa
- fix: filter panel by:Jon
- fix(InvoiceOutGlobal): parallelism by:alexm
- fix: itemBotanical by:Javier Segarra
- fix: itemType redirection and fix filters by:alexm
- fix: logout spec (warmFix_logout.spec) by:alexm
- fix: merge errors by:alexm
- fix: order catalog by:wbuezas
- fix: order catalog fixes by:wbuezas
- fix: refs #6818 use right icon by:jorgep
- fix: refs #6896 fixed module problems by:Jon
- fix: refs #7193 fixed e2e test by:Jon
- fix: refs #7206 deleted duplicate code by:Jon
- fix: refs #7273 use same filter by:jorgep
- fix: refs #7283 #7283 bugs by:Javier Segarra
- fix: refs #7283 #7283 ItemDiary subToolbar by:Javier Segarra
- fix: refs #7283 #7283 ItemSummary bugs by:Javier Segarra
- fix: refs #7283 Account image resolution by:guillermo
- fix: refs #7283 css by:jorgep
- fix: refs #7283 filter by:carlossa
- fix: refs #7283 fix image by:carlossa
- fix: refs #7283 fix pr by:carlossa
- fix: refs #7283 fix preview by:carlossa
- fix: refs #7283 fix required by:carlossa
- fix: refs #7283 item filters by:carlossa
- fix: refs #7283 itemtype fix by:carlossa
- fix: refs #7283 order translation by:carlossa
- fix: refs #7283 preview by:carlossa
- fix: refs #7283 tooltips !Item by:Javier Segarra
- fix: refs #7306 clean warning by:carlossa
- fix: refs #7310 clean warning by:carlossa
- fix: refs #7323 locale #7396 by:jorgep
- fix: refs #7323 show advanced fields by:jorgep
- fix: refs #7349 dependencia no usada by:jgallego
- fix: refs #7524 e2e & worker module by:jorgep
- fix: refs #7874 add title by:jorgep
- fix: refs #7874 show name by:jorgep
- fix: refs #7943 use correct data-key by:jorgep
- fix: refs #7943 use summary by:jorgep
- fix: refs #8039 bad tests by:alexm
- fix: refs #8039 o not handle unnecessary errors by:alexm
- fix: refs #8078 e2e #7970 by:jorgep
- fix: refs #8078 handleSelection by:jorgep
- fix: refs #8078 improve cy command (8078-enableMultiSelection) by:jorgep
- fix: refs #8078 improve handleSelection by:jorgep
- fix: reset category by:wbuezas
- fix: tag chips by:Jon
- fix: vnSearchbar spec (warmFix_vnSearchBar.spec) by:alexm
- fix(VnSelect): setOptions when applyFilter by:alexm
- fix: worker test e2e by:Jon
- Merge branch 'dev' into fix_customer_issues by:Javier Segarra
- refactor: revert catalog changes by:Jon
- refs #7283 fix conflicts by:carlossa
- refs #7283 fix descriptorproxy by:carlossa
- refs #7283 fixedPrice by:carlossa
- refs #7283 fixedPrices by:carlossa
- refs #7283 fix itemFixed by:carlossa
- refs #7283 fix itemFixedPrice by:carlossa
- refs #7283 fix itemMigration by:carlossa
- refs #7283 fix itemMigration list filters by:carlossa
- refs #7283 fix items by:carlossa
- refs #7283 fix items error get images by:carlossa
- refs #7283 fix items images by:carlossa
- refs #7283 fix request by:carlossa
- refs #7283 fix searchbar by:carlossa
- refs #7283 fix viewSummary by:carlossa
- refs #7283 fix yml list basicData by:carlossa
- refs #7283 itemRequest fix by:carlossa
- refs #7283 itemRequest fix deny by:carlossa
- refs #7283 itemRequest fix reload by:carlossa
- refs #72983 fix filters by:carlossa
- revert: commit by:Javier Segarra
- revert e57a253c6f649382da187d1129449d265fb26d3b by:Javier Segarra
- test: #8162 fix clientList spec by:Javier Segarra
- test: #8162 fix vnLocation spec by:Javier Segarra
- test: fix arrayData by:Javier Segarra
- test: fix e2e by:alexm
- test: fix e2e by:Javier Segarra
- test: refs #8039 fix WorkerNotification e2e by:alexm
- test: refs #8039 fix ZoneWarehouse e2e by:alexm
- warmfix: ItemLastEntries to date (origin/warmfix_itemLastEntriesFilter) by:Javier Segarra
# Version 24.40 - 2024-10-02 # Version 24.40 - 2024-10-02
### Added 🆕 ### Added 🆕

View File

@ -94,6 +94,7 @@ defineExpose({
saveChanges, saveChanges,
getChanges, getChanges,
formData, formData,
originalData,
vnPaginateRef, vnPaginateRef,
}); });

View File

@ -60,7 +60,7 @@ globals:
reference: Reference reference: Reference
agency: Agency agency: Agency
warehouseOut: Warehouse Out warehouseOut: Warehouse Out
wareHouseIn: Warehouse In warehouseIn: Warehouse In
landed: Landed landed: Landed
shipped: Shipped shipped: Shipped
totalEntries: Total entries totalEntries: Total entries

View File

@ -18,7 +18,7 @@ const groupedStates = ref();
const handleScopeDays = (params, days, callback) => { const handleScopeDays = (params, days, callback) => {
const [from, to] = dateRange(Date.vnNew()); const [from, to] = dateRange(Date.vnNew());
if (!days) { if (!days) {
Object.assign(params, { from, to, scopeDays: 1 }); Object.assign(params, { from, to, scopeDays: 0 });
} else { } else {
params.from = from; params.from = from;
to.setDate(to.getDate() + days); to.setDate(to.getDate() + days);
@ -59,7 +59,7 @@ const getLocale = (label) => {
</template> </template>
<template #customTags="{ params, searchFn, formatFn }"> <template #customTags="{ params, searchFn, formatFn }">
<VnFilterPanelChip <VnFilterPanelChip
v-if="params.scopeDays" v-if="params.scopeDays !== null"
removable removable
@remove="handleScopeDays(params, null, searchFn)" @remove="handleScopeDays(params, null, searchFn)"
> >

View File

@ -25,11 +25,8 @@ const provinceOpts = ref([]);
const stateOpts = ref([]); const stateOpts = ref([]);
const zoneOpts = ref([]); const zoneOpts = ref([]);
const { viewSummary } = useSummaryDialog(); const { viewSummary } = useSummaryDialog();
const from = Date.vnNew();
from.setHours(0, 0, 0, 0); const [from, to] = dateRange(Date.vnNew());
const to = new Date(from.getTime());
to.setDate(to.getDate() + 1);
to.setHours(23, 59, 59, 999);
const stateColors = { const stateColors = {
notice: 'info', notice: 'info',
success: 'positive', success: 'positive',
@ -340,7 +337,7 @@ const openTab = (id) =>
auto-load auto-load
:row-click="({ id }) => openTab(id)" :row-click="({ id }) => openTab(id)"
:disable-option="{ card: true }" :disable-option="{ card: true }"
:user-params="{ from, to, scopeDays: 1 }" :user-params="{ from, to, scopeDays: 0 }"
> >
<template #top-left> <template #top-left>
<QBtn <QBtn

View File

@ -36,7 +36,6 @@ const getSelectedTagValues = async (tag) => {
const filter = { const filter = {
fields: ['value'], fields: ['value'],
order: 'value ASC', order: 'value ASC',
limit: 30,
}; };
const url = `Tags/${tag?.id}/filterValue`; const url = `Tags/${tag?.id}/filterValue`;

View File

@ -183,18 +183,25 @@ const resetChanges = async () => {
}; };
const updateQuantity = async (sale) => { const updateQuantity = async (sale) => {
const payload = { quantity: sale.quantity }; const params = { quantity: sale.quantity };
await axios.post(`Sales/${sale.id}/updateQuantity`, payload); try {
await axios.post(`Sales/${sale.id}/updateQuantity`, params);
} catch (e) {
sale.quantity = tableRef.value.CrudModelRef.originalData.find(
(s) => s.id === sale.id
).quantity;
throw e;
}
notify('globals.dataSaved', 'positive'); notify('globals.dataSaved', 'positive');
}; };
const addSale = async (sale) => { const addSale = async (sale) => {
const payload = { const params = {
barcode: sale.itemFk, barcode: sale.itemFk,
quantity: sale.quantity, quantity: sale.quantity,
}; };
const { data } = await axios.post(`tickets/${route.params.id}/addSale`, payload); const { data } = await axios.post(`tickets/${route.params.id}/addSale`, params);
if (!data) return; if (!data) return;
@ -222,7 +229,7 @@ const changeQuantity = async (sale) => {
) )
return; return;
if (!sale.id) return addSale(sale); if (!sale.id) return addSale(sale);
updateQuantity(sale); await updateQuantity(sale);
}; };
const updateConcept = async (sale) => { const updateConcept = async (sale) => {

View File

@ -14,6 +14,8 @@ const route = useRoute();
const { t } = useI18n(); const { t } = useI18n();
const agenciesOptions = ref([]); const agenciesOptions = ref([]);
const warehousesOptionsOut = ref([]);
const warehousesOptionsIn = ref([]);
</script> </script>
<template> <template>
<FetchData <FetchData
@ -21,6 +23,18 @@ const agenciesOptions = ref([]);
@on-fetch="(data) => (agenciesOptions = data)" @on-fetch="(data) => (agenciesOptions = data)"
auto-load auto-load
/> />
<FetchData
url="Warehouses"
@on-fetch="(data) => (warehousesOptionsOut = data)"
auto-load
:filter="{ where: { isOrigin: TRUE } }"
/>
<FetchData
url="Warehouses"
@on-fetch="(data) => (warehousesOptionsIn = data)"
auto-load
:filter="{ where: { isDestiny: TRUE } }"
/>
<FormModel :url-update="`Travels/${route.params.id}`" model="Travel" auto-load> <FormModel :url-update="`Travels/${route.params.id}`" model="Travel" auto-load>
<template #form="{ data }"> <template #form="{ data }">
<VnRow> <VnRow>
@ -39,11 +53,12 @@ const agenciesOptions = ref([]);
<VnInputDate v-model="data.shipped" :label="t('globals.shipped')" /> <VnInputDate v-model="data.shipped" :label="t('globals.shipped')" />
<VnInputDate v-model="data.landed" :label="t('globals.landed')" /> <VnInputDate v-model="data.landed" :label="t('globals.landed')" />
</VnRow> </VnRow>
<VnRow> <VnRow>
<VnSelect <VnSelect
:label="t('globals.warehouseOut')" :label="t('globals.warehouseOut')"
v-model="data.warehouseOutFk" v-model="data.warehouseOutFk"
:options="agenciesOptions" :options="warehousesOptionsOut"
option-value="id" option-value="id"
option-label="name" option-label="name"
map-options map-options
@ -52,7 +67,7 @@ const agenciesOptions = ref([]);
<VnSelect <VnSelect
:label="t('globals.warehouseIn')" :label="t('globals.warehouseIn')"
v-model="data.warehouseInFk" v-model="data.warehouseInFk"
:options="agenciesOptions" :options="warehousesOptionsIn"
option-value="id" option-value="id"
option-label="name" option-label="name"
map-options map-options
@ -89,7 +104,7 @@ const agenciesOptions = ref([]);
<i18n> <i18n>
es: es:
raidDays: Si se marca "Redada", la fecha de entrega se moverá automáticamente los días indicados (incluido 0). Si se deja vacio, la fecha no cambiará raidDays: Si se marca "Redada", la fecha de entrega se moverá automáticamente los días indicados.
en: en:
raidDays: If "Raid" is checked, the landing date will automatically shift by the specified number of days (including 0). If left empty, the date will stay the same. raidDays: If "Raid" is checked, the landing date will automatically shift by the specified number of days.
</i18n> </i18n>

View File

@ -44,8 +44,8 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.
<TravelDescriptorMenuItems :travel="entity" /> <TravelDescriptorMenuItems :travel="entity" />
</template> </template>
<template #body="{ entity }"> <template #body="{ entity }">
<VnLv :label="t('globals.warehouseIn')" :value="entity.warehouseIn.name" /> <VnLv :label="t('globals.warehouseIn')" :value="entity.warehouseIn?.name" />
<VnLv :label="t('globals.warehouseOut')" :value="entity.warehouseOut.name" /> <VnLv :label="t('globals.warehouseOut')" :value="entity.warehouseOut?.name" />
<VnLv :label="t('globals.shipped')" :value="toDate(entity.shipped)" /> <VnLv :label="t('globals.shipped')" :value="toDate(entity.shipped)" />
<VnLv :label="t('globals.landed')" :value="toDate(entity.landed)" /> <VnLv :label="t('globals.landed')" :value="toDate(entity.landed)" />
<VnLv :label="t('globals.totalEntries')" :value="entity.totalEntries" /> <VnLv :label="t('globals.totalEntries')" :value="entity.totalEntries" />

View File

@ -105,12 +105,12 @@ describe('VnLocation', () => {
const province = 'Valencia'; const province = 'Valencia';
cy.get(createLocationButton).click(); cy.get(createLocationButton).click();
cy.get('.q-card > h1').should('have.text', 'New postcode'); cy.get('.q-card > h1').should('have.text', 'New postcode');
cy.get(dialogInputs).eq(0).clear();
cy.get(dialogInputs).eq(0).type(postCode);
cy.selectOption( cy.selectOption(
`${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix}`, `${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix}`,
province province
); );
cy.get(dialogInputs).eq(0).clear();
cy.get(dialogInputs).eq(0).type(postCode);
cy.get('.q-mt-lg > .q-btn--standard').click(); cy.get('.q-mt-lg > .q-btn--standard').click();
cy.get(`${createForm.prefix}`).should('not.exist'); cy.get(`${createForm.prefix}`).should('not.exist');
cy.waitForElement('.q-form'); cy.waitForElement('.q-form');