perf: refs #7134 #7134 changes

This commit is contained in:
Javier Segarra 2024-12-04 11:55:03 +01:00
parent c0d8bf3a48
commit 494482b6a8
7 changed files with 12 additions and 55 deletions

View File

@ -12,7 +12,7 @@ module.exports = defineConfig({
supportFile: 'test/cypress/support/index.js',
videosFolder: 'test/cypress/videos',
video: false,
specPattern: 'test/cypress/integration/**/*.spec.js',
specPattern: 'test/cypress/integration/invoiceOut/*.spec.js',
experimentalRunAllSpecs: true,
watchForFileChanges: true,
reporter: 'cypress-mochawesome-reporter',

Binary file not shown.

View File

@ -0,0 +1,3 @@
Company Country Id client Client workerSocialName Amount Taxable base Id ticket Active Invoice Data checked Id Comercial workerName
VNL España 1101 BATMAN salesPersonNick -35.4 -35.4 23 1 1 1 18 salesperson
VNL España 1101 BATMAN salesPersonNick -8.07 -8.07 24 1 1 1 18 salesperson
1 Company Country Id client Client workerSocialName Amount Taxable base Id ticket Active Invoice Data checked Id Comercial workerName
2 VNL España 1101 BATMAN salesPersonNick -35.4 -35.4 23 1 1 1 18 salesperson
3 VNL España 1101 BATMAN salesPersonNick -8.07 -8.07 24 1 1 1 18 salesperson

View File

@ -428,6 +428,7 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) {
<slot :name="slotName" v-bind="slotData ?? {}" :key="slotName" />
</template>
<template #body="{ rows }">
{{ rows.length }}
<QTable
ref="tableRef"
v-bind="table"

View File

@ -2,7 +2,7 @@
import CreateNewPostcode from 'src/components/CreateNewPostcodeForm.vue';
import VnSelectDialog from 'components/common/VnSelectDialog.vue';
import { useI18n } from 'vue-i18n';
import { ref } from 'vue';
import { computed } from 'vue';
import { useAttrs } from 'vue';
import { useRequired } from 'src/composables/useRequired';
const { t } = useI18n();
@ -43,7 +43,7 @@ const formatLocation = (obj, properties) => {
return filteredParts.join(', ');
};
const modelValue = ref(
const modelValue = computed(() =>
props.location ? formatLocation(props.location, locationProperties) : null
);
@ -61,6 +61,7 @@ const handleModelValue = (data) => {
};
</script>
<template>
{{ modelValue }}
<VnSelectDialog
v-model="modelValue"
option-filter-value="search"

View File

@ -92,6 +92,7 @@ function handleLocation(data, location) {
</VnRow>
<VnRow>
*{{ data.location }}*
<VnLocation
:rules="validate('Worker.postcode')"
:roles-allowed-to-create="['deliveryAssistant', 'administrative']"

View File

@ -223,7 +223,7 @@ function round(value) {
</script>
<template>
<VnSubToolbar class="q-mb-md">
<!-- <VnSubToolbar class="q-mb-md">
<template #st-data>
<div class="column justify-center q-px-md q-py-sm">
<span class="text-bold">{{ t('Total by company') }}</span>
@ -238,13 +238,13 @@ function round(value) {
<VnFilter
ref="vnFilterRef"
v-model="companyId"
data-key="CustomerBalance"
data-key="SupplierBalance"
:column="companyFilterColumn"
search-url="balance"
/>
</div>
</template>
</VnSubToolbar>
</VnSubToolbar> -->
<QDrawer side="right" :width="265" v-model="stateStore.rightDrawer">
<SupplierBalanceFilter data-key="SupplierBalance" />
</QDrawer>
@ -258,58 +258,9 @@ function round(value) {
:right-search="false"
:is-editable="false"
:column-search="false"
@on-fetch="onFetch"
:disable-option="{ card: true }"
:footer="true"
auto-load
>
<template #column-balance="{ rowIndex }">
{{ toCurrency(balances[rowIndex]?.balance) }}
</template>
<template #column-description="{ row }">
<div class="link" v-if="row.isInvoice">
{{ t('bill', { ref: row.description }) }}
<InvoiceOutDescriptorProxy :id="row.description" />
</div>
<span v-else class="q-pa-xs dotted rounded-borders" :title="row.description">
{{ row.description }}
</span>
<QPopupEdit
v-model="row.description"
v-slot="scope"
@save="
(value) =>
value != row.description &&
axios.patch(`Receipts/${row.id}`, { description: value })
"
auto-save
>
<VnInput
v-model="scope.value"
:disable="
!hasAny([{ model: 'Receipt', props: '*', accessType: 'WRITE' }])
"
@keypress.enter="scope.set"
autofocus
/>
</QPopupEdit>
</template>
<template #column-footer-invoiceEuros>
<span>
{{ round(tableRef.footer.invoiceEuros) }}
</span>
</template>
<template #column-footer-paymentEuros>
<span>
{{ round(tableRef.footer.paymentEuros) }}
</span>
</template>
<template #column-footer-euroBalance>
<span>
{{ round(tableRef.footer.euroBalance) }}
</span>
</template>
</VnTable>
<QPageSticky :offset="[18, 18]" style="z-index: 2">
<QBtn