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/src/components/CreateNewCityForm.vue b/src/components/CreateNewCityForm.vue
index 4b1e12fb0..bf3830522 100644
--- a/src/components/CreateNewCityForm.vue
+++ b/src/components/CreateNewCityForm.vue
@@ -40,18 +40,23 @@ const onDataSaved = (...args) => {
url-create="towns"
model="city"
@on-data-saved="onDataSaved"
+ data-cy="newCityForm"
>
diff --git a/src/components/CreateNewPostcodeForm.vue b/src/components/CreateNewPostcodeForm.vue
index 44338f186..d3d6708f0 100644
--- a/src/components/CreateNewPostcodeForm.vue
+++ b/src/components/CreateNewPostcodeForm.vue
@@ -1,5 +1,5 @@
@@ -154,17 +137,11 @@ 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"
@@ -194,7 +174,8 @@ async function handleCountries(data) {
:rules="validate('postcode.city')"
:acls="[{ model: 'Town', props: '*', accessType: 'WRITE' }]"
:emit-value="false"
- :clearable="true"
+ required
+ data-cy="locationTown"
>
@@ -225,18 +206,25 @@ async function handleCountries(data) {
:province-selected="data.provinceFk"
@update:model-value="(value) => setProvince(value, data)"
v-model="data.provinceFk"
- :clearable="true"
@on-province-created="onProvinceCreated"
+ required
/>
setCountry(value, data)"
+ data-cy="locationCountry"
/>
diff --git a/src/components/CreateNewProvinceForm.vue b/src/components/CreateNewProvinceForm.vue
index a0e681f77..d35690eeb 100644
--- a/src/components/CreateNewProvinceForm.vue
+++ b/src/components/CreateNewProvinceForm.vue
@@ -2,7 +2,6 @@
import { computed, reactive, ref } from 'vue';
import { useI18n } from 'vue-i18n';
-import FetchData from 'components/FetchData.vue';
import VnRow from 'components/ui/VnRow.vue';
import VnSelect from 'src/components/common/VnSelect.vue';
import VnInput from 'src/components/common/VnInput.vue';
@@ -21,15 +20,11 @@ const $props = defineProps({
type: Number,
default: null,
},
- provinces: {
- type: Array,
- default: () => [],
- },
});
-const autonomiesOptions = ref([]);
+const autonomiesRef = ref([]);
const onDataSaved = (dataSaved, requestResponse) => {
- requestResponse.autonomy = autonomiesOptions.value.find(
+ requestResponse.autonomy = autonomiesRef.value.opts.find(
(autonomy) => autonomy.id == requestResponse.autonomyFk
);
emit('onDataSaved', dataSaved, requestResponse);
@@ -43,16 +38,6 @@ const where = computed(() => {
- (autonomiesOptions = data)"
- auto-load
- :filter="{
- where,
- }"
- url="Autonomies/location"
- :sort-by="['name ASC']"
- :limit="30"
- />
{
:label="t('Name')"
v-model="data.name"
:rules="validate('province.name')"
+ required
+ data-cy="provinceName"
/>
state.get(modelValue));
const defaultButtons = computed(() => ({
save: {
+ dataCy: 'saveDefaultBtn',
color: 'primary',
icon: 'save',
label: 'globals.save',
@@ -117,6 +118,7 @@ const defaultButtons = computed(() => ({
type: 'submit',
},
reset: {
+ dataCy: 'resetDefaultBtn',
color: 'primary',
icon: 'restart_alt',
label: 'globals.reset',
@@ -207,7 +209,9 @@ async function save() {
isLoading.value = true;
try {
formData.value = trimData(formData.value);
- const body = $props.mapper ? $props.mapper(formData.value) : formData.value;
+ const body = $props.mapper
+ ? $props.mapper(formData.value, originalData.value)
+ : formData.value;
const method = $props.urlCreate ? 'post' : 'patch';
const url =
$props.urlCreate || $props.urlUpdate || $props.url || arrayData.store.url;
@@ -322,6 +326,7 @@ defineExpose({
:title="t(defaultButtons.reset.label)"
/>
@@ -63,6 +64,7 @@ watch(
auto-load
/>
-import { ref, watch } from 'vue';
+import { nextTick, ref, watch } from 'vue';
import { QInput } from 'quasar';
-const props = defineProps({
+const $props = defineProps({
modelValue: {
type: String,
default: '',
},
+ insertable: {
+ type: Boolean,
+ default: false,
+ },
});
const emit = defineEmits(['update:modelValue', 'accountShortToStandard']);
-let internalValue = ref(props.modelValue);
+let internalValue = ref($props.modelValue);
watch(
- () => props.modelValue,
+ () => $props.modelValue,
(newVal) => {
internalValue.value = newVal;
}
@@ -28,8 +32,46 @@ watch(
}
);
+const handleKeydown = (e) => {
+ if (e.key === 'Backspace') return;
+ if (e.key === '.') {
+ accountShortToStandard();
+ // TODO: Fix this setTimeout, with nextTick doesn't work
+ setTimeout(() => {
+ setCursorPosition(0, e.target);
+ }, 1);
+ return;
+ }
+
+ if ($props.insertable && e.key.match(/[0-9]/)) {
+ handleInsertMode(e);
+ }
+};
+function setCursorPosition(pos, el = vnInputRef.value) {
+ el.focus();
+ el.setSelectionRange(pos, pos);
+}
+const vnInputRef = ref(false);
+const handleInsertMode = (e) => {
+ e.preventDefault();
+ const input = e.target;
+ const cursorPos = input.selectionStart;
+ const { maxlength } = vnInputRef.value;
+ let currentValue = internalValue.value;
+ if (!currentValue) currentValue = e.key;
+ const newValue = e.key;
+ if (newValue && !isNaN(newValue) && cursorPos < maxlength) {
+ internalValue.value =
+ currentValue.substring(0, cursorPos) +
+ newValue +
+ currentValue.substring(cursorPos + 1);
+ }
+ nextTick(() => {
+ input.setSelectionRange(cursorPos + 1, cursorPos + 1);
+ });
+};
function accountShortToStandard() {
- internalValue.value = internalValue.value.replace(
+ internalValue.value = internalValue.value?.replace(
'.',
'0'.repeat(11 - internalValue.value.length)
);
@@ -37,5 +79,5 @@ function accountShortToStandard() {
-
+
diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue
index 7a9e26186..57a495ac3 100644
--- a/src/components/common/VnInput.vue
+++ b/src/components/common/VnInput.vue
@@ -1,5 +1,5 @@
@@ -89,6 +127,7 @@ const mixinRules = [
:type="$attrs.type"
:class="{ required: isRequired }"
@keyup.enter="emit('keyup.enter')"
+ @keydown="handleKeydown"
:clearable="false"
:rules="mixinRules"
:lazy-rules="true"
@@ -130,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}