diff --git a/CHANGELOG.md b/CHANGELOG.md
index 88abb9ae0..03812d252 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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
### Added 🆕
diff --git a/cypress.config.js b/cypress.config.js
index f8e771093..e9aeb547a 100644
--- a/cypress.config.js
+++ b/cypress.config.js
@@ -1,4 +1,7 @@
const { defineConfig } = require('cypress');
+// https://docs.cypress.io/app/tooling/reporters
+// https://docs.cypress.io/app/references/configuration
+// https://www.npmjs.com/package/cypress-mochawesome-reporter
module.exports = defineConfig({
e2e: {
@@ -16,6 +19,7 @@ module.exports = defineConfig({
reporterOptions: {
charts: true,
reportPageTitle: 'Cypress Inline Reporter',
+ reportFilename: '[status]_[datetime]-report',
embeddedScreenshots: true,
reportDir: 'test/cypress/reports',
inlineAssets: true,
diff --git a/src/components/CreateNewCityForm.vue b/src/components/CreateNewCityForm.vue
index 85d13beb1..e51a18ef8 100644
--- a/src/components/CreateNewCityForm.vue
+++ b/src/components/CreateNewCityForm.vue
@@ -17,10 +17,6 @@ const $props = defineProps({
type: Number,
default: null,
},
- provinces: {
- type: Array,
- default: () => [],
- },
});
const { t } = useI18n();
@@ -48,7 +44,7 @@ const onDataSaved = (...args) => {
@@ -56,7 +52,6 @@ const onDataSaved = (...args) => {
:province-selected="$props.provinceSelected"
:country-fk="$props.countryFk"
v-model="data.provinceFk"
- :provinces="$props.provinces"
/>
diff --git a/src/components/CreateNewPostcodeForm.vue b/src/components/CreateNewPostcodeForm.vue
index 03cba8ac7..907e49499 100644
--- a/src/components/CreateNewPostcodeForm.vue
+++ b/src/components/CreateNewPostcodeForm.vue
@@ -1,5 +1,5 @@
@@ -143,10 +143,20 @@ async function handleCountries(data) {
ref="townsFetchDataRef"
:sort-by="['name ASC']"
:limit="30"
+ :filter="townFilter"
@on-fetch="handleTowns"
auto-load
url="Towns/location"
/>
+
setTown(value, data)"
+ @filter="filterTowns"
:tooltip="t('Create city')"
v-model="data.townFk"
:options="townsOptions"
@@ -193,7 +204,6 @@ async function handleCountries(data) {
onCityCreated(requestResponse, data)
@@ -208,20 +218,20 @@ async function handleCountries(data) {
:province-selected="data.provinceFk"
@update:model-value="(value) => setProvince(value, data)"
v-model="data.provinceFk"
- :clearable="true"
- :provinces="provincesOptions"
+ @on-province-fetched="handleProvinces"
@on-province-created="onProvinceCreated"
/>
setCountry(value, data)"
/>
diff --git a/src/components/CreateNewProvinceForm.vue b/src/components/CreateNewProvinceForm.vue
index d7df38f9f..a0e681f77 100644
--- a/src/components/CreateNewProvinceForm.vue
+++ b/src/components/CreateNewProvinceForm.vue
@@ -1,5 +1,5 @@
@@ -41,9 +47,7 @@ const onDataSaved = (dataSaved, requestResponse) => {
@on-fetch="(data) => (autonomiesOptions = data)"
auto-load
:filter="{
- where: {
- countryFk: $props.countryFk,
- },
+ where,
}"
url="Autonomies/location"
:sort-by="['name ASC']"
diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue
index 5eba97dc8..85bd5457a 100644
--- a/src/components/CrudModel.vue
+++ b/src/components/CrudModel.vue
@@ -94,6 +94,7 @@ defineExpose({
saveChanges,
getChanges,
formData,
+ originalData,
vnPaginateRef,
});
diff --git a/src/components/EditPictureForm.vue b/src/components/EditPictureForm.vue
index cd6107aca..1f158e785 100644
--- a/src/components/EditPictureForm.vue
+++ b/src/components/EditPictureForm.vue
@@ -156,26 +156,22 @@ const rotateRight = () => {
};
const onSubmit = () => {
- try {
- if (!newPhoto.files && !newPhoto.url) {
- notify(t('Select an image'), 'negative');
- return;
- }
-
- const options = {
- type: 'blob',
- };
-
- editor.value
- .result(options)
- .then((result) => {
- const file = new File([result], newPhoto.files?.name || '');
- newPhoto.blob = file;
- })
- .then(() => makeRequest());
- } catch (err) {
- console.error('Error uploading image');
+ if (!newPhoto.files && !newPhoto.url) {
+ notify(t('Select an image'), 'negative');
+ return;
}
+
+ const options = {
+ type: 'blob',
+ };
+
+ editor.value
+ .result(options)
+ .then((result) => {
+ const file = new File([result], newPhoto.files?.name || '');
+ newPhoto.blob = file;
+ })
+ .then(() => makeRequest());
};
const makeRequest = async () => {
diff --git a/src/components/EditTableCellValueForm.vue b/src/components/EditTableCellValueForm.vue
index 14709e884..7755df9ab 100644
--- a/src/components/EditTableCellValueForm.vue
+++ b/src/components/EditTableCellValueForm.vue
@@ -51,21 +51,17 @@ const onDataSaved = () => {
};
const onSubmit = async () => {
- try {
- isLoading.value = true;
- const rowsToEdit = $props.rows.map((row) => ({ id: row.id, itemFk: row.itemFk }));
- const payload = {
- field: selectedField.value.field,
- newValue: newValue.value,
- lines: rowsToEdit,
- };
+ isLoading.value = true;
+ const rowsToEdit = $props.rows.map((row) => ({ id: row.id, itemFk: row.itemFk }));
+ const payload = {
+ field: selectedField.value.field,
+ newValue: newValue.value,
+ lines: rowsToEdit,
+ };
- await axios.post($props.editUrl, payload);
- onDataSaved();
- isLoading.value = false;
- } catch (err) {
- console.error('Error submitting table cell edit');
- }
+ await axios.post($props.editUrl, payload);
+ onDataSaved();
+ isLoading.value = false;
};
const closeForm = () => {
diff --git a/src/components/FilterItemForm.vue b/src/components/FilterItemForm.vue
index d1ceff4ce..34968ccef 100644
--- a/src/components/FilterItemForm.vue
+++ b/src/components/FilterItemForm.vue
@@ -84,34 +84,30 @@ const tableColumns = computed(() => [
]);
const onSubmit = async () => {
- try {
- let filter = itemFilter;
- const params = itemFilterParams;
- const where = {};
- for (let key in params) {
- const value = params[key];
- if (!value) continue;
+ let filter = itemFilter;
+ const params = itemFilterParams;
+ const where = {};
+ for (let key in params) {
+ const value = params[key];
+ if (!value) continue;
- switch (key) {
- case 'name':
- where[key] = { like: `%${value}%` };
- break;
- case 'producerFk':
- case 'typeFk':
- case 'size':
- case 'inkFk':
- where[key] = value;
- }
+ switch (key) {
+ case 'name':
+ where[key] = { like: `%${value}%` };
+ break;
+ case 'producerFk':
+ case 'typeFk':
+ case 'size':
+ case 'inkFk':
+ where[key] = value;
}
- filter.where = where;
-
- const { data } = await axios.get(props.url, {
- params: { filter: JSON.stringify(filter) },
- });
- tableRows.value = data;
- } catch (err) {
- console.error('Error fetching entries items');
}
+ filter.where = where;
+
+ const { data } = await axios.get(props.url, {
+ params: { filter: JSON.stringify(filter) },
+ });
+ tableRows.value = data;
};
const closeForm = () => {
diff --git a/src/components/FilterTravelForm.vue b/src/components/FilterTravelForm.vue
index a471552f2..9fc91457a 100644
--- a/src/components/FilterTravelForm.vue
+++ b/src/components/FilterTravelForm.vue
@@ -86,32 +86,28 @@ const tableColumns = computed(() => [
]);
const onSubmit = async () => {
- try {
- let filter = travelFilter;
- const params = travelFilterParams;
- const where = {};
- for (let key in params) {
- const value = params[key];
- if (!value) continue;
+ let filter = travelFilter;
+ const params = travelFilterParams;
+ const where = {};
+ for (let key in params) {
+ const value = params[key];
+ if (!value) continue;
- switch (key) {
- case 'agencyModeFk':
- case 'warehouseInFk':
- case 'warehouseOutFk':
- case 'shipped':
- case 'landed':
- where[key] = value;
- }
+ switch (key) {
+ case 'agencyModeFk':
+ case 'warehouseInFk':
+ case 'warehouseOutFk':
+ case 'shipped':
+ case 'landed':
+ where[key] = value;
}
-
- filter.where = where;
- const { data } = await axios.get('Travels', {
- params: { filter: JSON.stringify(filter) },
- });
- tableRows.value = data;
- } catch (err) {
- console.error('Error fetching travels');
}
+
+ filter.where = where;
+ const { data } = await axios.get('Travels', {
+ params: { filter: JSON.stringify(filter) },
+ });
+ tableRows.value = data;
};
const closeForm = () => {
diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue
index c668769e5..bfb470c48 100644
--- a/src/components/FormModel.vue
+++ b/src/components/FormModel.vue
@@ -91,6 +91,10 @@ const $props = defineProps({
type: Boolean,
default: true,
},
+ maxWidth: {
+ type: [String, Boolean],
+ default: '800px',
+ },
});
const emit = defineEmits(['onFetch', 'onDataSaved']);
const modelValue = computed(
@@ -283,6 +287,7 @@ defineExpose({
@submit="save"
@reset="reset"
class="q-pa-md"
+ :style="maxWidth ? 'max-width: ' + maxWidth : ''"
id="formModel"
>
@@ -371,7 +376,6 @@ defineExpose({
color: black;
}
#formModel {
- max-width: 800px;
width: 100%;
}
diff --git a/src/components/FormPopup.vue b/src/components/FormPopup.vue
index d7f744984..e1c15fcf4 100644
--- a/src/components/FormPopup.vue
+++ b/src/components/FormPopup.vue
@@ -4,7 +4,7 @@ import { useI18n } from 'vue-i18n';
const emit = defineEmits(['onSubmit']);
-defineProps({
+const $props = defineProps({
title: {
type: String,
default: '',
@@ -25,16 +25,21 @@ defineProps({
type: String,
default: '',
},
+ submitOnEnter: {
+ type: Boolean,
+ default: true,
+ },
});
const { t } = useI18n();
-
const closeButton = ref(null);
const isLoading = ref(false);
const onSubmit = () => {
- emit('onSubmit');
- closeForm();
+ if ($props.submitOnEnter) {
+ emit('onSubmit');
+ closeForm();
+ }
};
const closeForm = () => {
diff --git a/src/components/ItemsFilterPanel.vue b/src/components/ItemsFilterPanel.vue
index 938dceb4d..405577095 100644
--- a/src/components/ItemsFilterPanel.vue
+++ b/src/components/ItemsFilterPanel.vue
@@ -88,20 +88,16 @@ const applyTags = (params, search) => {
};
const fetchItemTypes = async (id) => {
- try {
- const filter = {
- fields: ['id', 'name', 'categoryFk'],
- where: { categoryFk: id },
- include: 'category',
- order: 'name ASC',
- };
- const { data } = await axios.get('ItemTypes', {
- params: { filter: JSON.stringify(filter) },
- });
- itemTypesOptions.value = data;
- } catch (err) {
- console.error('Error fetching item types', err);
- }
+ const filter = {
+ fields: ['id', 'name', 'categoryFk'],
+ where: { categoryFk: id },
+ include: 'category',
+ order: 'name ASC',
+ };
+ const { data } = await axios.get('ItemTypes', {
+ params: { filter: JSON.stringify(filter) },
+ });
+ itemTypesOptions.value = data;
};
const getCategoryClass = (category, params) => {
@@ -111,23 +107,19 @@ const getCategoryClass = (category, params) => {
};
const getSelectedTagValues = async (tag) => {
- try {
- if (!tag?.selectedTag?.id) return;
- tag.value = null;
- const filter = {
- fields: ['value'],
- order: 'value ASC',
- limit: 30,
- };
+ if (!tag?.selectedTag?.id) return;
+ tag.value = null;
+ const filter = {
+ fields: ['value'],
+ order: 'value ASC',
+ limit: 30,
+ };
- const params = { filter: JSON.stringify(filter) };
- const { data } = await axios.get(`Tags/${tag.selectedTag.id}/filterValue`, {
- params,
- });
- tag.valueOptions = data;
- } catch (err) {
- console.error('Error getting selected tag values');
- }
+ const params = { filter: JSON.stringify(filter) };
+ const { data } = await axios.get(`Tags/${tag.selectedTag.id}/filterValue`, {
+ params,
+ });
+ tag.valueOptions = data;
};
const removeTag = (index, params, search) => {
diff --git a/src/components/RefundInvoiceForm.vue b/src/components/RefundInvoiceForm.vue
index 9d9f0cff1..590acede0 100644
--- a/src/components/RefundInvoiceForm.vue
+++ b/src/components/RefundInvoiceForm.vue
@@ -39,14 +39,10 @@ const refund = async () => {
invoiceCorrectionTypeFk: invoiceParams.invoiceCorrectionTypeFk,
};
- try {
- const { data } = await axios.post('InvoiceOuts/refundAndInvoice', params);
- notify(t('Refunded invoice'), 'positive');
- const [id] = data?.refundId || [];
- if (id) router.push({ name: 'InvoiceOutSummary', params: { id } });
- } catch (err) {
- console.error('Error refunding invoice', err);
- }
+ const { data } = await axios.post('InvoiceOuts/refundAndInvoice', params);
+ notify(t('Refunded invoice'), 'positive');
+ const [id] = data?.refundId || [];
+ if (id) router.push({ name: 'InvoiceOutSummary', params: { id } });
};
diff --git a/src/components/TransferInvoiceForm.vue b/src/components/TransferInvoiceForm.vue
index f7050cdba..aa71070d6 100644
--- a/src/components/TransferInvoiceForm.vue
+++ b/src/components/TransferInvoiceForm.vue
@@ -49,36 +49,32 @@ const makeInvoice = async () => {
makeInvoice: checked.value,
};
- try {
- if (checked.value && hasToInvoiceByAddress) {
- const response = await new Promise((resolve) => {
- quasar
- .dialog({
- component: VnConfirm,
- componentProps: {
- title: t('Bill destination client'),
- message: t('transferInvoiceInfo'),
- },
- })
- .onOk(() => {
- resolve(true);
- })
- .onCancel(() => {
- resolve(false);
- });
- });
- if (!response) {
- return;
- }
+ if (checked.value && hasToInvoiceByAddress) {
+ const response = await new Promise((resolve) => {
+ quasar
+ .dialog({
+ component: VnConfirm,
+ componentProps: {
+ title: t('Bill destination client'),
+ message: t('transferInvoiceInfo'),
+ },
+ })
+ .onOk(() => {
+ resolve(true);
+ })
+ .onCancel(() => {
+ resolve(false);
+ });
+ });
+ if (!response) {
+ return;
}
-
- const { data } = await axios.post('InvoiceOuts/transfer', params);
- notify(t('Transferred invoice'), 'positive');
- const id = data?.[0];
- if (id) router.push({ name: 'InvoiceOutSummary', params: { id } });
- } catch (err) {
- console.error('Error transfering invoice', err);
}
+
+ const { data } = await axios.post('InvoiceOuts/transfer', params);
+ notify(t('Transferred invoice'), 'positive');
+ const id = data?.[0];
+ if (id) router.push({ name: 'InvoiceOutSummary', params: { id } });
};
diff --git a/src/components/VnSelectProvince.vue b/src/components/VnSelectProvince.vue
index 9fcbef11e..bfc4ab7b7 100644
--- a/src/components/VnSelectProvince.vue
+++ b/src/components/VnSelectProvince.vue
@@ -1,5 +1,5 @@
{
};
const fetchViewConfigData = async () => {
- try {
- const userConfigFilter = {
- where: { tableCode: $props.tableCode, userFk: user.value.id },
- };
- const userConfig = await getConfig('UserConfigViews', userConfigFilter);
+ const userConfigFilter = {
+ where: { tableCode: $props.tableCode, userFk: user.value.id },
+ };
+ const userConfig = await getConfig('UserConfigViews', userConfigFilter);
- if (userConfig) {
- initialUserConfigViewData.value = userConfig;
- setUserConfigViewData(userConfig.configuration);
- return;
- }
+ if (userConfig) {
+ initialUserConfigViewData.value = userConfig;
+ setUserConfigViewData(userConfig.configuration);
+ return;
+ }
- const defaultConfigFilter = { where: { tableCode: $props.tableCode } };
- const defaultConfig = await getConfig('DefaultViewConfigs', defaultConfigFilter);
+ const defaultConfigFilter = { where: { tableCode: $props.tableCode } };
+ const defaultConfig = await getConfig('DefaultViewConfigs', defaultConfigFilter);
- if (defaultConfig) {
- // Si el backend devuelve una configuración por defecto la usamos
- setUserConfigViewData(defaultConfig.columns);
- return;
- } else {
- // Si no hay configuración por defecto mostramos todas las columnas
- const defaultColumns = {};
- $props.allColumns.forEach((col) => (defaultColumns[col] = true));
- setUserConfigViewData(defaultColumns);
- }
- } catch (err) {
- console.error('Error fetching config view data', err);
+ if (defaultConfig) {
+ // Si el backend devuelve una configuración por defecto la usamos
+ setUserConfigViewData(defaultConfig.columns);
+ return;
+ } else {
+ // Si no hay configuración por defecto mostramos todas las columnas
+ const defaultColumns = {};
+ $props.allColumns.forEach((col) => (defaultColumns[col] = true));
+ setUserConfigViewData(defaultColumns);
}
};
const saveConfig = async () => {
- try {
- const params = {};
- const configuration = {};
+ const params = {};
+ const configuration = {};
- formattedCols.value.forEach((col) => {
- const { name, active } = col;
- configuration[name] = active;
- });
+ formattedCols.value.forEach((col) => {
+ const { name, active } = col;
+ configuration[name] = active;
+ });
- // Si existe una view config del usuario hacemos un update si no la creamos
- if (initialUserConfigViewData.value) {
- params.updates = [
- {
- data: {
- configuration: configuration,
- },
- where: {
- id: initialUserConfigViewData.value.id,
- },
- },
- ];
- } else {
- params.creates = [
- {
- userFk: user.value.id,
- tableCode: $props.tableCode,
- tableConfig: $props.tableCode,
+ // Si existe una view config del usuario hacemos un update si no la creamos
+ if (initialUserConfigViewData.value) {
+ params.updates = [
+ {
+ data: {
configuration: configuration,
},
- ];
- }
-
- const response = await axios.post('UserConfigViews/crud', params);
- if (response.data && response.data[0]) {
- initialUserConfigViewData.value = response.data[0];
- }
- emitSavedConfig();
- notify('globals.dataSaved', 'positive');
- popupProxyRef.value.hide();
- } catch (err) {
- console.error('Error saving user view config', err);
+ where: {
+ id: initialUserConfigViewData.value.id,
+ },
+ },
+ ];
+ } else {
+ params.creates = [
+ {
+ userFk: user.value.id,
+ tableCode: $props.tableCode,
+ tableConfig: $props.tableCode,
+ configuration: configuration,
+ },
+ ];
}
+
+ const response = await axios.post('UserConfigViews/crud', params);
+ if (response.data && response.data[0]) {
+ initialUserConfigViewData.value = response.data[0];
+ }
+ emitSavedConfig();
+ notify('globals.dataSaved', 'positive');
+ popupProxyRef.value.hide();
};
const emitSavedConfig = () => {
diff --git a/src/components/common/VnAccountNumber.vue b/src/components/common/VnAccountNumber.vue
index f7273a72d..c4fa78674 100644
--- a/src/components/common/VnAccountNumber.vue
+++ b/src/components/common/VnAccountNumber.vue
@@ -1,20 +1,24 @@
-
+
diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue
index 4672529c6..57a495ac3 100644
--- a/src/components/common/VnInput.vue
+++ b/src/components/common/VnInput.vue
@@ -1,5 +1,5 @@
@@ -89,10 +127,12 @@ const mixinRules = [
:type="$attrs.type"
:class="{ required: isRequired }"
@keyup.enter="emit('keyup.enter')"
+ @keydown="handleKeydown"
:clearable="false"
:rules="mixinRules"
:lazy-rules="true"
hide-bottom-space
+ :data-cy="$attrs.dataCy ?? $attrs.label + '_input'"
>
@@ -129,9 +169,11 @@ const mixinRules = [
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}