diff --git a/CHANGELOG.md b/CHANGELOG.md index 86ffce3fd..6a973777a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,120 @@ +# Version 24.36 - 2024-09-03 + +### Added 🆕 + +- Cesta → Se añaden notas +- Trabajadore → Se puede modificar la foto +- General → Recuperar y restaurar contraseña + +### Changed 📦 + +- (General) Modificado filtro lateral + +### Fixed 🛠️ + +- Cesta → Mejoras varias +- Reclamaciones → Mejoras varias +- Usuarios → Mejoras varias + +# Version 24.34 - 2024-08-20 + +### Added 🆕 + +## Changed 📦 + +- General → Trabajadores: Migrado de Salix a Lilium + +## Fixed 🛠️ + +- Artículos → General: Arreglados fallos de interfaz +- Fact. Recibidas → General: Arreglados fallos de interfaz +- Trabajadores → General: Arreglados fallos de interfaz +- Usuarios → General: Arreglados fallos de interfaz + +- chore: #6900 order params by:jorgep +- chore: refs #6900 drop console log by:jorgep +- chore: refs #6900 drop vnCurrency by:jorgep +- chore: refs #6900 fix e2e tests by:jorgep +- chore: refs #6900 mv rectificative logic by:jorgep +- chore: refs #6900 responsive code by:jorgep +- chore: refs #7283 drop array types by:jorgep +- chore: refs #7283 drop import by:jorgep +- chore: refs #7283 fix e2e logout by:jorgep +- chore: refs #7283 update VnAvatar title handling by:jorgep +- chore: refs #7323 fix test by:jorgep +- chore: refs #7323 remove unused import by:jorgep +- chore: refs #7323drop commented code by:jorgep +- feat(VnCard): use props searchbar by:alexm +- feat(customer): improve basicData to balance by:alexm +- feat(customer_balance): refs #6943 add functionality from salix by:alexm +- feat(customer_balance): refs #6943 translations by:alexm +- feat: refs #6130 husky commitLint config by:pablone +- feat: refs #6130 husky hooks by:pablone +- feat: refs #6900 add InvoiceInSerial by:jorgep +- feat: refs #6900 add locale by:jorgep +- feat: refs #6900 use VnTable & sort filter fields by:jorgep +- feat: refs #7323 add flex-wrap by:jorgep +- feat: refs #7323 add my account" btn & fix models log selectable by:jorgep +- feat: refs #7323 improve test by:jorgep + +### Changed 📦 + +- refactor(customer_log: use VnLog by:alexm +- refactor(customer_recovery): to vnTable by:alexm +- refactor(customer_webAccess): FormModel by:alexm +- refactor: refs #7283 update avatar size and color by:jorgep + +### Fixed 🛠️ + +- chore: refs #6900 fix e2e tests by:jorgep +- chore: refs #7283 fix e2e logout by:jorgep +- chore: refs #7323 fix test by:jorgep +- feat: refs #7323 add my account" btn & fix models log selectable by:jorgep +- fix #7355 fix acls list by:carlossa +- fix(VnFilterPanel): emit userParams better by:alexm +- fix(claim_summary): url links (HEAD -> 7864_testToMaster_2434, origin/test, origin/7864_testToMaster_2434, test) by:alexm +- fix(customer_sms: fix reload by:alexm +- fix(twoFactor): unify code login and twoFactor by:alexm +- fix: VnCard VnSearchbar props by:alexm +- fix: accountMailAlias by:alexm +- fix: refs #6130 add commit lint modules by:pablone +- fix: refs #6130 pnpm-lock.yml by:pablone +- fix: refs #6900 improve loading by:jorgep +- fix: refs #6900 improve logic (origin/6900-addSerial) by:jorgep +- fix: refs #6900 improve logic by:jorgep +- fix: refs #6900 rectificative btn reactivity by:jorgep +- fix: refs #6900 use type number by:jorgep +- fix: refs #6900 vat & dueday by:jorgep +- fix: refs #6900 vat, dueday & intrastat by:jorgep +- fix: refs #6989 show entity name & default time from config table by:jorgep +- fix: refs #7283 basicData locale by:jorgep +- fix: refs #7283 itemLastEntries filter by:jorgep +- fix: refs #7283 itemTags & VnImg by:jorgep +- fix: refs #7283 locale by:jorgep +- fix: refs #7283 min-width vnImg by:jorgep +- fix: refs #7283 use vnAvatar & add optional zoom by:jorgep +- fix: refs #7283 userPanel pic by:jorgep +- fix: refs #7323 add department popup by:jorgep +- fix: refs #7323 add locale by:jorgep +- fix: refs #7323 css righ menu by:jorgep +- fix: refs #7323 data-key & add select by:jorgep +- fix: refs #7323 load all opts by:jorgep +- fix: refs #7323 righ menu bug by:jorgep +- fix: refs #7323 use global locale by:jorgep +- fix: refs #7323 use workerFilter (origin/7323-warmfix-fixErrors) by:jorgep +- fix: refs #7323 vnsubtoolbar css by:jorgep +- fix: refs #7323 wrong css by:jorgep +- refs #7355 fix Rol, alias by:carlossa +- refs #7355 fix accountAlias by:carlossa +- refs #7355 fix alias summary by:carlossa +- refs #7355 fix conflicts by:carlossa +- refs #7355 fix create Rol by:carlossa +- refs #7355 fix list by:carlossa +- refs #7355 fix lists redirects summary by:carlossa +- refs #7355 fix roles by:carlossa +- refs #7355 fix search exprBuilder by:carlossa +- refs #7355 fix vnTable by:carlos + # Version 24.32 - 2024-08-06 ### Added 🆕 diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index a0f6bf479..22ef1622c 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -87,6 +87,10 @@ const $props = defineProps({ type: Boolean, default: false, }, + defaultTrim: { + type: Boolean, + default: true, + }, }); const emit = defineEmits(['onFetch', 'onDataSaved']); const modelValue = computed( @@ -195,6 +199,7 @@ async function save() { isLoading.value = true; try { + formData.value = trimData(formData.value); const body = $props.mapper ? $props.mapper(formData.value) : formData.value; const method = $props.urlCreate ? 'post' : 'patch'; const url = @@ -253,6 +258,14 @@ function updateAndEmit(evt, val, res) { emit(evt, state.get(modelValue), res); } +function trimData(data) { + if (!$props.defaultTrim) return data; + for (const key in data) { + if (typeof data[key] == 'string') data[key] = data[key].trim(); + } + return data; +} + defineExpose({ save, isLoading, diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index d6b35d4da..6c77d44df 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -315,7 +315,7 @@ defineExpose({ col?.columnFilter !== false && col?.name !== 'tableActions' " - v-model="orders[col.name]" + v-model="orders[col.orderBy ?? col.name]" :name="col.orderBy ?? col.name" :data-key="$attrs['data-key']" :search-url="searchUrl" @@ -409,7 +409,7 @@ defineExpose({ style="height: 30px" > { if (props.baseUrl) return `${props.baseUrl}/${route.params.id}`; return props.customUrl; }); - +const searchRightDataKey = computed(() => { + if (!props.searchDataKey) return route.name; + return props.searchDataKey; +}); const arrayData = useArrayData(props.dataKey, { url: url.value, filter: props.filter, @@ -62,10 +65,9 @@ if (props.baseUrl) { - diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index 65cd32a37..ae6ee95df 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -37,7 +37,7 @@ const $props = defineProps({ }, hiddenTags: { type: Array, - default: () => ['filter'], + default: () => ['filter', 'search', 'or', 'and'], }, customTags: { type: Array, @@ -111,24 +111,23 @@ watch( const isLoading = ref(false); async function search(evt) { - if (evt && $props.disableSubmitEvent) return; - - store.filter.where = {}; - isLoading.value = true; - const filter = { ...userParams.value, ...$props.modelValue }; - store.userParamsChanged = true; try { + if (evt && $props.disableSubmitEvent) return; + + store.filter.where = {}; + isLoading.value = true; + const filter = { ...userParams.value, ...$props.modelValue }; + store.userParamsChanged = true; const { params: newParams } = await arrayData.addFilter({ params: filter, }); userParams.value = newParams; if (!$props.showAll && !Object.values(filter).length) store.data = []; + emit('search'); } finally { isLoading.value = false; } - - emit('search'); } async function reload() { @@ -143,29 +142,31 @@ async function reload() { } async function clearFilters() { - isLoading.value = true; - store.userParamsChanged = true; - arrayData.reset(['skip', 'filter.skip', 'page']); - // Filtrar los params no removibles - const removableFilters = Object.keys(userParams.value).filter((param) => - $props.unRemovableParams.includes(param) - ); - const newParams = {}; - // Conservar solo los params que no son removibles - for (const key of removableFilters) { - newParams[key] = userParams.value[key]; - } - userParams.value = {}; - userParams.value = { ...newParams }; // Actualizar los params con los removibles - await arrayData.applyFilter({ params: userParams.value }); + try { + isLoading.value = true; + store.userParamsChanged = true; + arrayData.reset(['skip', 'filter.skip', 'page']); + // Filtrar los params no removibles + const removableFilters = Object.keys(userParams.value).filter((param) => + $props.unRemovableParams.includes(param) + ); + const newParams = {}; + // Conservar solo los params que no son removibles + for (const key of removableFilters) { + newParams[key] = userParams.value[key]; + } + userParams.value = {}; + userParams.value = { ...newParams }; // Actualizar los params con los removibles + await arrayData.applyFilter({ params: userParams.value }); - if (!$props.showAll) { - store.data = []; + if (!$props.showAll) { + store.data = []; + } + emit('clear'); + emit('update:modelValue', userParams.value); + } finally { + isLoading.value = false; } - - isLoading.value = false; - emit('clear'); - emit('update:modelValue', userParams.value); } const tagsList = computed(() => { diff --git a/src/components/ui/VnOutForm.vue b/src/components/ui/VnOutForm.vue new file mode 100644 index 000000000..e7ad441d0 --- /dev/null +++ b/src/components/ui/VnOutForm.vue @@ -0,0 +1,32 @@ + + + diff --git a/src/components/ui/VnSearchbar.vue b/src/components/ui/VnSearchbar.vue index a34eba6af..a4375f36c 100644 --- a/src/components/ui/VnSearchbar.vue +++ b/src/components/ui/VnSearchbar.vue @@ -104,9 +104,7 @@ onMounted(() => { }); async function search() { - const staticParams = Object.entries(store.userParams).filter( - ([key, value]) => value && (props.staticParams || []).includes(key) - ); + const staticParams = Object.entries(store.userParams); arrayData.reset(['skip', 'page']); if (props.makeFetch) diff --git a/src/components/ui/VnSms.vue b/src/components/ui/VnSms.vue index 81058a6cb..bf6e0695e 100644 --- a/src/components/ui/VnSms.vue +++ b/src/components/ui/VnSms.vue @@ -1,5 +1,5 @@ diff --git a/src/pages/Account/Role/Card/RoleCard.vue b/src/pages/Account/Role/Card/RoleCard.vue index 622bfb1c6..35f9a1f27 100644 --- a/src/pages/Account/Role/Card/RoleCard.vue +++ b/src/pages/Account/Role/Card/RoleCard.vue @@ -1,33 +1,20 @@ diff --git a/src/pages/Claim/ClaimList.vue b/src/pages/Claim/ClaimList.vue index 6fd607da0..b03dfb226 100644 --- a/src/pages/Claim/ClaimList.vue +++ b/src/pages/Claim/ClaimList.vue @@ -50,7 +50,7 @@ const columns = computed(() => [ align: 'left', label: t('claim.attendedBy'), name: 'attendedBy', - cardVisible: true, + orderBy: 'workerFk', columnFilter: { component: 'select', attrs: { @@ -63,6 +63,7 @@ const columns = computed(() => [ optionFilter: 'firstName', }, }, + cardVisible: true, }, { align: 'left', @@ -77,6 +78,9 @@ const columns = computed(() => [ { align: 'left', label: t('claim.state'), + format: ({ stateCode }) => + claimFilterRef.value?.states.find(({code}) => code === stateCode) + ?.description, name: 'stateCode', chip: { condition: () => true, diff --git a/src/pages/Claim/locale/es.yml b/src/pages/Claim/locale/es.yml index 90bef8e66..052416aa7 100644 --- a/src/pages/Claim/locale/es.yml +++ b/src/pages/Claim/locale/es.yml @@ -42,7 +42,7 @@ claim: pickup: Recoger null: No agency: Agencia - delivery: Entrega + delivery: Reparto fileDescription: 'ID de reclamación {claimId} del cliente {clientName} con ID {clientId}' noData: 'No hay imágenes/videos, haz clic aquí o arrastra y suelta el archivo' dragDrop: Arrastra y suelta aquí diff --git a/src/pages/Customer/Card/CustomerBasicData.vue b/src/pages/Customer/Card/CustomerBasicData.vue index 87a3b08f7..a6150bb3f 100644 --- a/src/pages/Customer/Card/CustomerBasicData.vue +++ b/src/pages/Customer/Card/CustomerBasicData.vue @@ -97,7 +97,12 @@ const title = ref(); :rules="validate('client.salesPersonFk')" :use-like="false" :emit-value="false" - @update:model-value="(val) => (title = val?.nickname)" + @update:model-value=" + (val) => { + title = val?.nickname; + data.salesPersonFk = val?.id; + } + " >