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

This commit is contained in:
Carlos Satorres 2024-08-28 10:28:58 +02:00
commit 98be567ead
10 changed files with 189 additions and 38 deletions

View File

@ -1,3 +1,141 @@
# Version 24.36 - 2024-08-27
### Added 🆕
- feat(FormModel): trim data by default by:alexm
- feat(orderBasicData): add notes by:alexm
- feat(orderList): correct create order by:alexm
- feat(orderList): use orderFilter and fixed this by:alexm
- feat: #7323 handle workerPhoto (origin/7323_workerPhoto, 7323_workerPhoto) by:Javier Segarra
- feat: add recover password and reset password by:alexm
- feat: refs #7346 add seriaType option by:jgallego
- feat: refs #7346 elimino === by:jgallego
- feat: refs #7346 formdata uses serialType by:jgallego
- feat: refs #7346 refactor by:jgallego
- feat: refs #7346 sonarLint warnings (origin/7346-invoiceOutMultilple, 7346-invoiceOutMultilple) by:jgallego
- feat: refs #7710 uses cloneAll by:jgallego
- fix: refs #7717 fix OrderList table filters' and summary table style by:Jon
### Changed 📦
- feat: refs #7346 refactor by:jgallego
- perf: date fields (mindshore/feature/TicketFutureFilter, feature/TicketFutureFilter) by:Javier Segarra
- perf: refs #7717 right menu filter by:Jon
- perf: use ref at component start by:Javier Segarra
- refactor: refs #7717 delete useless function and import by:Jon
- refactor: refs #7717 deleted useless code by:Jon
### Fixed 🛠️
- feat(orderList): use orderFilter and fixed this by:alexm
- fix(VnTable): orderBy v-model by:alexm
- fix(account_card): redirection by:carlossa
- fix(orderLines): reload when delete and redirect when confirm by:alexm
- fix: #6336 ClaimListStates by:Javier Segarra
- fix: account subsections cards by:carlossa
- fix: duplicate key by:Jon
- fix: order description to vnTable by:alexm
- fix: orderCatalogFilter order by:alexm
- fix: quasar build warnings (6336_claim_fix_states) by:Javier Segarra
- fix: refs #7717 fix OrderList table filters' and summary table style by:Jon
- fix: refs #7717 fix basic data form & minor errors by:Jon
- fix: refs #7717 fix catalog filter, searchbar redirect and search by:Jon
- fix: refs #7717 fix catalog searchbar and worker tests(refs #7323) by:Jon
- fix: refs #7717 fix order sections by:Jon
- fix: refs #7717 fix volume and lines redirect by:Jon
- fix: refs #7717 fixed searchbar filter with rightmenu filters' applied by:Jon
- fix: test by:alexm
- fix: ticketDescriptorMenu by:Javier Segarra
- refs #7355 account fixes by:carlossa
# Version 24.34 - 2024-08-20
### Added 🆕
- 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:carlossa
# Version 24.32 - 2024-08-06
### Added 🆕

View File

@ -1,6 +1,6 @@
{
"name": "salix-front",
"version": "24.34.0",
"version": "24.36.0",
"description": "Salix frontend",
"productName": "Salix",
"author": "Verdnatura",

View File

@ -8,7 +8,6 @@ import VnSubToolbar from '../ui/VnSubToolbar.vue';
import VnSearchbar from 'components/ui/VnSearchbar.vue';
import LeftMenu from 'components/LeftMenu.vue';
import RightMenu from 'components/common/RightMenu.vue';
const props = defineProps({
dataKey: { type: String, required: true },
baseUrl: { type: String, default: undefined },
@ -74,7 +73,7 @@ if (props.baseUrl) {
<QPage>
<VnSubToolbar />
<div :class="[useCardSize(), $attrs.class]">
<RouterView />
<RouterView :key="route.fullPath" />
</div>
</QPage>
</QPageContainer>

View File

@ -18,6 +18,7 @@ const { notify } = useNotify();
const { t } = useI18n();
const arrayData = useArrayData();
const invoiceIn = computed(() => arrayData.store.data);
const currency = computed(() => invoiceIn.value?.currency?.code);
const rowsSelected = ref([]);
const banks = ref([]);
@ -139,9 +140,9 @@ const getTotalAmount = (rows) => rows.reduce((acc, { amount }) => acc + +amount,
<QTd>
<VnInputNumber
:class="{
'no-pointer-events': !isNotEuro(invoiceIn.currency.code),
'no-pointer-events': !isNotEuro(currency),
}"
:disable="!isNotEuro(invoiceIn.currency.code)"
:disable="!isNotEuro(currency)"
v-model="row.foreignValue"
clearable
clear-icon="close"
@ -154,9 +155,7 @@ const getTotalAmount = (rows) => rows.reduce((acc, { amount }) => acc + +amount,
<QTd />
<QTd />
<QTd>
{{
toCurrency(getTotalAmount(rows), invoiceIn.currency.code)
}}
{{ toCurrency(getTotalAmount(rows), currency) }}
</QTd>
<QTd />
</QTr>
@ -208,11 +207,9 @@ const getTotalAmount = (rows) => rows.reduce((acc, { amount }) => acc + +amount,
:label="t('Foreign value')"
class="full-width"
:class="{
'no-pointer-events': !isNotEuro(
invoiceIn.currency.code
),
'no-pointer-events': !isNotEuro(currency),
}"
:disable="!isNotEuro(invoiceIn.currency.code)"
:disable="!isNotEuro(currency)"
v-model="props.row.foreignValue"
clearable
clear-icon="close"

View File

@ -242,11 +242,12 @@ const formatOpt = (row, { model, options }, prop) => {
</template>
<template #body-cell-taxablebase="{ row }">
<QTd>
{{ currency }}
<VnInputNumber
:class="{
'no-pointer-events': isNotEuro(invoiceIn.currency.code),
'no-pointer-events': isNotEuro(currency),
}"
:disable="isNotEuro(invoiceIn.currency.code)"
:disable="isNotEuro(currency)"
label=""
clear-icon="close"
v-model="row.taxableBase"
@ -312,9 +313,9 @@ const formatOpt = (row, { model, options }, prop) => {
<QTd>
<VnInputNumber
:class="{
'no-pointer-events': !isNotEuro(invoiceIn.currency.code),
'no-pointer-events': !isNotEuro(currency),
}"
:disable="!isNotEuro(invoiceIn.currency.code)"
:disable="!isNotEuro(currency)"
v-model="row.foreignValue"
/>
</QTd>
@ -361,12 +362,10 @@ const formatOpt = (row, { model, options }, prop) => {
<VnInputNumber
:label="t('Taxable base')"
:class="{
'no-pointer-events': isNotEuro(
invoiceIn.currency.code
),
'no-pointer-events': isNotEuro(currency),
}"
class="full-width"
:disable="isNotEuro(invoiceIn.currency.code)"
:disable="isNotEuro(currency)"
clear-icon="close"
v-model="props.row.taxableBase"
clearable
@ -427,11 +426,9 @@ const formatOpt = (row, { model, options }, prop) => {
:label="t('Foreign value')"
class="full-width"
:class="{
'no-pointer-events': !isNotEuro(
invoiceIn.currency.code
),
'no-pointer-events': !isNotEuro(currency),
}"
:disable="!isNotEuro(invoiceIn.currency.code)"
:disable="!isNotEuro(currency)"
v-model="props.row.foreignValue"
/>
</QItem>

View File

@ -101,7 +101,17 @@ onMounted(async () => {
dense
outlined
rounded
/>
>
<template #option="scope">
<QItem v-bind="scope.itemProps">
<QItemSection>
<QItemLabel>
#{{ scope.opt?.id }} {{ scope.opt?.name }}
</QItemLabel>
</QItemSection>
</QItem>
</template>
</VnSelect>
<VnSelect
:label="t('invoiceOutSerialType')"
v-model="formData.serialType"

View File

@ -226,10 +226,18 @@ watchEffect(selectedRows);
url="Tickets"
v-model="data.ticketFk"
:label="t('invoiceOutList.tableVisibleColumns.ticket')"
:options="ticketsOptions"
option-label="nickname"
option-label="id"
option-value="id"
/>
>
<template #option="scope">
<QItem v-bind="scope.itemProps">
<QItemSection>
<QItemLabel> #{{ scope.opt?.id }} </QItemLabel>
<QItemLabel caption>{{ scope.opt?.nickname }}</QItemLabel>
</QItemSection>
</QItem>
</template>
</VnSelect>
<span class="q-ml-md">O</span>
</div>
<VnSelect

View File

@ -1,6 +1,6 @@
<script setup>
import { useI18n } from 'vue-i18n';
import { ref } from 'vue';
import { computed, ref } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import VnRow from 'components/ui/VnRow.vue';
import FetchData from 'components/FetchData.vue';
@ -11,8 +11,8 @@ import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
const { t } = useI18n();
const route = useRoute();
const router = useRouter();
const shelvingId = route.params?.id || null;
const isNew = Boolean(!shelvingId);
const entityId = computed(() => route.params.id ?? null);
const isNew = Boolean(!entityId.value);
const defaultInitialData = {
parkingFk: null,
priority: null,
@ -67,7 +67,7 @@ const onSave = (shelving, newShelving) => {
};
</script>
<template>
<VnSubToolbar />
<VnSubToolbar v-if="isNew" />
<FetchData
url="Parkings"
:filter="parkingFilter"
@ -75,13 +75,13 @@ const onSave = (shelving, newShelving) => {
auto-load
/>
<FormModel
:url="isNew ? null : `Shelvings/${shelvingId}`"
:url="isNew ? null : `Shelvings/${entityId}`"
:url-create="isNew ? 'Shelvings' : null"
:observe-form-changes="!isNew"
:filter="shelvingFilter"
model="shelving"
:auto-load="!isNew"
:form-initial-data="defaultInitialData"
:form-initial-data="isNew ? defaultInitialData : null"
@on-data-saved="onSave"
>
<template #form="{ data, validate, filter }">

View File

@ -30,10 +30,12 @@ const actions = {
let clonedTicketId;
try {
const { data } = await axios.post(`Tickets/${ticketId}/clone`, {
shipped: ticket.value.shipped,
const { data } = await axios.post(`Tickets/cloneAll`, {
ticketsIds: [ticket.value.id],
withWarehouse: true,
negative: false,
});
clonedTicketId = data;
clonedTicketId = data[0].id;
} catch (e) {
opts.message = t('It was not able to clone the ticket');
opts.type = 'negative';

View File

@ -16,7 +16,7 @@ describe('Ticket descriptor', () => {
cy.openActionsDescriptor();
cy.get(toCloneOpt).click();
cy.clickConfirm();
cy.get(warehouseValue).contains('-');
cy.get(warehouseValue).contains('Warehouse One');
cy.get(summaryHeader)
.invoke('text')
.then((text) => {