Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix-front into hotFix_VnUserLink_whenNotIsWorker

This commit is contained in:
Alex Moreno 2025-05-07 07:21:31 +02:00
commit 34892316d7
7 changed files with 40 additions and 29 deletions

View File

@ -17,6 +17,7 @@ import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.v
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
import VnSelect from 'components/common/VnSelect.vue';
import VnInputDate from 'components/common/VnInputDate.vue';
import VnCheckbox from 'src/components/common/VnCheckbox.vue';
const arrayData = useArrayData('Customer');
const { t } = useI18n();
@ -50,7 +51,7 @@ const columns = computed(() => [
label: t('globals.ticket'),
cardVisible: true,
columnFilter: {
inWhere: true,
name: 'ticketId',
},
},
{
@ -84,25 +85,19 @@ const columns = computed(() => [
label: t('globals.description'),
columnClass: 'expand',
columnFilter: {
inWhere: true,
name: 'description',
},
},
{
name: 'quantity',
name: 'quantity',
label: t('globals.quantity'),
cardVisible: true,
visible: true,
columnFilter: {
inWhere: true,
},
},
{
name: 'grouped',
label: t('Group by items'),
component: 'checkbox',
visible: false,
orderBy: false,
columnFilter: false
},
]);
onBeforeMount(async () => {
@ -218,9 +213,9 @@ const updateDateParams = (value, params) => {
<div v-if="row.subName" class="subName">
{{ row.subName }}
</div>
<FetchedTags :item="row" />
<FetchedTags :item="row" :columns="6"/>
</template>
<template #moreFilterPanel="{ params }">
<template #moreFilterPanel="{ params, searchFn}">
<div class="column no-wrap flex-center q-gutter-y-md q-mt-xs q-pr-xl">
<VnSelect
:filled="true"
@ -290,6 +285,13 @@ const updateDateParams = (value, params) => {
class="q-px-xs q-pt-none fit"
dense
/>
<VnCheckbox
v-model="params.grouped"
:label="t('Group by items')"
class="q-px-xs q-pt-none fit"
dense
@update:modelValue="() => searchFn()"
/>
</div>
</template>
</VnTable>

View File

@ -117,8 +117,6 @@ async function acceptPropagate({ isEqualizated }) {
option-value="id"
v-model="data.sageTaxTypeFk"
data-cy="sageTaxTypeFk"
:required="data.isTaxDataChecked"
:rules="[(val) => validations.required(data.isTaxDataChecked, val)]"
/>
<VnSelect
:label="t('Sage transaction type')"
@ -128,10 +126,6 @@ async function acceptPropagate({ isEqualizated }) {
option-value="id"
data-cy="sageTransactionTypeFk"
v-model="data.sageTransactionTypeFk"
:required="data.isTaxDataChecked"
:rules="[
(val) => validations.required(data.sageTransactionTypeFk, val),
]"
>
<template #option="scope">
<QItem v-bind="scope.itemProps">

View File

@ -123,3 +123,4 @@ customer:
ticketFk: Ticket Id
description: Description
quantity: Quantity
ticketId: Ticket

View File

@ -123,3 +123,4 @@ customer:
ticketFk: Id Ticket
description: Descripción
quantity: Cantidad
ticketId: Ticket

View File

@ -89,7 +89,7 @@ defineExpose({ save });
</div>
<div v-if="newPrice" class="column items-center q-mt-lg">
<span class="text-primary">{{ t('New price') }}</span>
<span class="text-primary">{{ t('basicData.newPrice') }}</span>
<span class="text-subtitle1">{{ toCurrency(newPrice) }}</span>
</div>
</div>
@ -135,3 +135,4 @@ defineExpose({ save });
min-width: 230px;
}
</style>
<

View File

@ -314,7 +314,7 @@ const changePrice = async (sale) => {
const updatePrice = async (sale, newPrice) => {
try {
await axios.post(`Sales/${sale.id}/updatePrice`, {
newPrice: newPrice,
newPrice,
componentId: componentId.value,
});
notify('globals.dataSaved', 'positive');

View File

@ -13,12 +13,14 @@ import { useArrayData } from 'composables/useArrayData';
import useNotify from 'src/composables/useNotify.js';
import axios from 'axios';
import VnTable from 'src/components/VnTable/VnTable.vue';
import FetchData from 'src/components/FetchData.vue';
const stateStore = useStateStore();
const { t } = useI18n();
const { notify } = useNotify();
const { openConfirmationModal } = useVnConfirm();
const allColumnNames = ref([]);
const agencies = ref([]);
const arrayData = useArrayData('WeeklyTickets');
const { store } = arrayData;
@ -51,11 +53,16 @@ const columns = computed(() => [
isTitle: true,
cardVisible: true,
component: 'select',
attrs: {
url: 'Clients',
optionLabel: 'name',
optionValue: 'id',
isWhere: true,
columnFilter: {
name: 'id',
component: 'select',
alias: 'c',
attrs: {
url: 'Clients',
optionLabel: 'name',
optionValue: 'id',
inWhere: true,
},
},
columnField: {
component: null,
@ -167,6 +174,11 @@ onMounted(async () => {
</script>
<template>
<FetchData
url="AgencyModes/isActive"
@on-fetch="(data) => (agencies = data)"
auto-load
/>
<VnSearchbar
data-key="WeeklyTickets"
:label="t('weeklyTickets.search')"
@ -200,7 +212,7 @@ onMounted(async () => {
</template>
<template #column-agencyModeFk="{ row }">
<VnSelectCache
url="AgencyModes/isActive"
:options="agencies"
:row="row"
:find="['agencyModeFk', 'agencyModeName']"
v-model="row.agencyModeFk"