Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev This commit is unstable Details

This commit is contained in:
Jorge Penadés 2025-04-14 10:47:45 +02:00
commit 09d88e25ea
15 changed files with 51 additions and 35 deletions

View File

@ -68,7 +68,6 @@ const filter = {
}, },
}, },
], ],
where: { and: [{ originFk: route.params.id }] },
}; };
const paginate = ref(); const paginate = ref();
@ -267,13 +266,6 @@ onMounted(() => {
onUnmounted(() => { onUnmounted(() => {
stateStore.rightDrawer = false; stateStore.rightDrawer = false;
}); });
watch(
() => router.currentRoute.value.params.id,
() => {
applyFilter();
},
);
</script> </script>
<template> <template>
<VnPaginate <VnPaginate
@ -281,6 +273,7 @@ watch(
:data-key :data-key
:url="dataKey + 's'" :url="dataKey + 's'"
:user-filter="filter" :user-filter="filter"
:filter="{ where: { and: [{ originFk: route.params.id }] } }"
:skeleton="false" :skeleton="false"
auto-load auto-load
@on-fetch="setLogTree" @on-fetch="setLogTree"

View File

@ -39,7 +39,7 @@ const checkboxOptions = ref([
{ name: 'select', label: 'Accesses', selected: false }, { name: 'select', label: 'Accesses', selected: false },
]); ]);
const columns = computed(() => [ const columns = computed(() => [
{ name: 'changedModelValue' }, { name: 'changedModelValue', orderBy: 'id' },
{ name: 'changedModel' }, { name: 'changedModel' },
{ name: 'userType', orderBy: false }, { name: 'userType', orderBy: false },
{ name: 'userFk' }, { name: 'userFk' },

View File

@ -6,6 +6,7 @@ import { computed } from 'vue';
const $props = defineProps({ const $props = defineProps({
label: { type: String, default: null }, label: { type: String, default: null },
tooltip: { type: String, default: null },
value: { value: {
type: [String, Boolean, Number], type: [String, Boolean, Number],
default: null, default: null,
@ -40,7 +41,10 @@ const val = computed(() => $props.value);
<template v-else> <template v-else>
<div v-if="label || $slots.label" class="label"> <div v-if="label || $slots.label" class="label">
<slot name="label"> <slot name="label">
<span style="color: var(--vn-label-color)">{{ label }}</span> <QTooltip v-if="tooltip">{{ tooltip }}</QTooltip>
<span style="color: var(--vn-label-color)">
{{ label }}
</span>
</slot> </slot>
</div> </div>
<div class="value" v-if="value || $slots.value"> <div class="value" v-if="value || $slots.value">

View File

@ -131,6 +131,7 @@ const columns = computed(() => [
name: 'isConciliate', name: 'isConciliate',
label: t('Conciliated'), label: t('Conciliated'),
cardVisible: true, cardVisible: true,
component: 'checkbox',
}, },
{ {
align: 'left', align: 'left',

View File

@ -18,7 +18,7 @@ import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
import VnSelect from 'components/common/VnSelect.vue'; import VnSelect from 'components/common/VnSelect.vue';
import VnInputDate from 'components/common/VnInputDate.vue'; import VnInputDate from 'components/common/VnInputDate.vue';
const arrayData = useArrayData('Client'); const arrayData = useArrayData('Customer');
const { t } = useI18n(); const { t } = useI18n();
const route = useRoute(); const route = useRoute();
const campaignList = ref(); const campaignList = ref();
@ -260,7 +260,7 @@ const updateDateParams = (value, params) => {
:label="t('globals.campaign')" :label="t('globals.campaign')"
:filled="true" :filled="true"
class="q-px-sm q-pt-none fit" class="q-px-sm q-pt-none fit"
:option-label="(opt) => t(opt.code)" :option-label="(opt) => t(opt.code ?? '')"
:fields="['id', 'code', 'dated', 'scopeDays']" :fields="['id', 'code', 'dated', 'scopeDays']"
@update:model-value="(data) => updateDateParams(data, params)" @update:model-value="(data) => updateDateParams(data, params)"
dense dense

View File

@ -34,7 +34,7 @@ const columns = computed(() => [
}, },
{ {
align: 'left', align: 'left',
format: (row) => row.type.description, format: (row) => row?.type?.description,
label: t('Description'), label: t('Description'),
name: 'description', name: 'description',
}, },

View File

@ -208,7 +208,8 @@ const sumRisk = ({ clientRisks }) => {
:text="t('customer.summary.consignee')" :text="t('customer.summary.consignee')"
/> />
<VnLv <VnLv
:label="t('customer.summary.addressName')" :tooltip="t('customer.summary.addressName')"
:label="t('customer.summary.addressNameAbbr')"
:value="entity.defaultAddress.nickname" :value="entity.defaultAddress.nickname"
/> />
<VnLv <VnLv
@ -252,7 +253,8 @@ const sumRisk = ({ clientRisks }) => {
/> />
<VnLv <VnLv
v-if="entity.claimsRatio" v-if="entity.claimsRatio"
:label="t('customer.summary.priceIncreasingRate')" :tooltip="t('customer.summary.priceIncreasingRate')"
:label="t('customer.summary.priceIncreasingRateAbbr')"
:value="toPercentage(priceIncreasingRate)" :value="toPercentage(priceIncreasingRate)"
/> />
<VnLv <VnLv
@ -261,7 +263,8 @@ const sumRisk = ({ clientRisks }) => {
/> />
<VnLv <VnLv
v-if="entity.claimsRatio" v-if="entity.claimsRatio"
:label="t('customer.summary.claimRate')" :label="t('customer.summary.claimRateAbbr')"
:tooltip="t('customer.summary.claimRate')"
:value="toPercentage(claimRate)" :value="toPercentage(claimRate)"
/> />
</QCard> </QCard>
@ -318,8 +321,9 @@ const sumRisk = ({ clientRisks }) => {
/> />
<VnLv <VnLv
:label="t('customer.summary.recommendCredit')" :label="t('customer.summary.recommendCreditAbbr')"
:value="entity.recommendedCredit" :tooltip="t('customer.summary.recommendCredit')"
:value="toCurrency(entity.recommendedCredit)"
/> />
</QCard> </QCard>
<QCard class="vn-max"> <QCard class="vn-max">

View File

@ -111,14 +111,11 @@ const columns = computed(() => [
component: 'number', component: 'number',
}, },
columnField: { columnField: {
component: null, component: markRaw(VnLinkPhone),
after: { attrs: ({ model }) => {
component: markRaw(VnLinkPhone), return {
attrs: ({ model }) => { 'phone-number': model,
return { };
'phone-number': model,
};
},
}, },
}, },
}, },

View File

@ -42,14 +42,17 @@ customer:
hasCoreVnl: Has core VNL hasCoreVnl: Has core VNL
hasB2BVnl: Has B2B VNL hasB2BVnl: Has B2B VNL
addressName: Address name addressName: Address name
addressNameAbbr: A. Name
addressCity: City addressCity: City
username: Username username: Username
webAccess: Web access webAccess: Web access
totalGreuge: Total greuge totalGreuge: Total greuge
mana: Mana mana: Mana
priceIncreasingRate: Price increasing rate priceIncreasingRate: Price increasing rate
priceIncreasingRateAbbr: Price inc. rate
averageInvoiced: Average invoiced averageInvoiced: Average invoiced
claimRate: Claming rate claimRate: Claming rate
claimRateAbbr: Claim. rate
payMethodFk: Billing data payMethodFk: Billing data
risk: Risk risk: Risk
maximumRisk: Solunion's maximum risk maximumRisk: Solunion's maximum risk
@ -68,6 +71,7 @@ customer:
descriptorInfo: Invoices minus payments plus orders not yet descriptorInfo: Invoices minus payments plus orders not yet
rating: Rating rating: Rating
recommendCredit: Recommended credit recommendCredit: Recommended credit
recommendCreditAbbr: Rec. credit
goToLines: Go to lines goToLines: Go to lines
basicData: basicData:
socialName: Fiscal name socialName: Fiscal name

View File

@ -42,14 +42,17 @@ customer:
hasCoreVnl: Recibido core VNL hasCoreVnl: Recibido core VNL
hasB2BVnl: Recibido B2B VNL hasB2BVnl: Recibido B2B VNL
addressName: Nombre de la dirección addressName: Nombre de la dirección
addressNameAbbr: N. Dirección
addressCity: Ciudad addressCity: Ciudad
username: Usuario username: Usuario
webAccess: Acceso web webAccess: Acceso web
totalGreuge: Greuge total totalGreuge: Greuge total
mana: Maná mana: Maná
priceIncreasingRate: Ratio de incremento de precio priceIncreasingRate: Ratio de incremento de precio
priceIncreasingRateAbbr: R. Inc. Precio
averageInvoiced: Facturación media averageInvoiced: Facturación media
claimRate: Ratio de reclamaciones claimRate: Ratio de reclamaciones
claimRateAbbr: R. Reclamaciones
maximumRisk: Riesgo máximo asumido por Solunion maximumRisk: Riesgo máximo asumido por Solunion
payMethodFk: Forma de pago payMethodFk: Forma de pago
risk: Riesgo risk: Riesgo
@ -68,6 +71,7 @@ customer:
descriptorInfo: Facturas menos recibos mas pedidos sin facturar descriptorInfo: Facturas menos recibos mas pedidos sin facturar
rating: Clasificación rating: Clasificación
recommendCredit: Crédito recomendado recommendCredit: Crédito recomendado
recommendCreditAbbr: Cr. Recomendado
goToLines: Ir a líneas goToLines: Ir a líneas
basicData: basicData:
socialName: Nombre fiscal socialName: Nombre fiscal

View File

@ -141,7 +141,7 @@ const setOrderedPriority = async () => {
}; };
const sortRoutes = async () => { const sortRoutes = async () => {
await axios.patch(`Routes/${route.params?.id}/guessPriority/`); await axios.patch(`Routes/${route.params?.id}/optimizePriority`);
refreshKey.value++; refreshKey.value++;
}; };

View File

@ -38,7 +38,9 @@ function handleDelete(row) {
ticketNotesCrudRef.value.remove([row]); ticketNotesCrudRef.value.remove([row]);
} }
async function handleSave() { async function handleSave(e) {
if (e.shiftKey && e.key === 'Enter') return;
e.preventDefault();
if (!isSaving.value) { if (!isSaving.value) {
isSaving.value = true; isSaving.value = true;
await ticketNotesCrudRef.value?.saveChanges(); await ticketNotesCrudRef.value?.saveChanges();
@ -70,7 +72,7 @@ async function handleSave() {
<div <div
v-for="(row, index) in rows" v-for="(row, index) in rows"
:key="index" :key="index"
class="q-mb-md row items-center q-gutter-x-md" class="q-mb-md row q-gutter-x-md"
> >
<VnSelect <VnSelect
:label="t('ticketNotes.observationType')" :label="t('ticketNotes.observationType')"
@ -86,7 +88,8 @@ async function handleSave() {
:label="t('basicData.description')" :label="t('basicData.description')"
v-model="row.description" v-model="row.description"
class="col" class="col"
@keyup.enter="handleSave" @keydown.enter.stop="handleSave"
autogrow
data-cy="ticketNotesDescription" data-cy="ticketNotesDescription"
/> />
<QIcon <QIcon

View File

@ -241,6 +241,7 @@ onMounted(async () => {
:value="`${entity.address?.nickname} #${entity.address?.id}`" :value="`${entity.address?.nickname} #${entity.address?.id}`"
/> />
<VnLv <VnLv
class="white-space-normal"
:label="t('ticket.summary.consigneeStreet')" :label="t('ticket.summary.consigneeStreet')"
:value="formattedAddress" :value="formattedAddress"
/> />
@ -524,4 +525,7 @@ onMounted(async () => {
.grafana { .grafana {
color: $primary-light; color: $primary-light;
} }
.white-space-normal :deep(.value span) {
white-space: normal;
}
</style> </style>

View File

@ -273,6 +273,7 @@ en:
orderFk: Order orderFk: Order
from: From from: From
shipped: Shipped shipped: Shipped
shippedDate: Shipped date
to: To to: To
stateFk: State stateFk: State
groupedStates: Grouped State groupedStates: Grouped State
@ -300,6 +301,7 @@ es:
orderFk: Pedido orderFk: Pedido
from: Desde from: Desde
shipped: F. envío shipped: F. envío
shippedDate: F. envío
to: Hasta to: Hasta
stateFk: Estado stateFk: Estado
groupedStates: Estado agrupado groupedStates: Estado agrupado

View File

@ -113,13 +113,13 @@ const columns = computed(() => [
}, },
{ {
align: 'left', align: 'left',
name: 'shippedDate', name: 'shipped',
cardVisible: true, cardVisible: true,
label: t('ticketList.shipped'), label: t('ticketList.shipped'),
columnFilter: { columnFilter: {
component: 'date', component: 'date',
}, },
format: ({ shippedDate }) => toDate(shippedDate), format: ({ shipped }) => toDate(shipped),
}, },
{ {
align: 'left', align: 'left',
@ -477,7 +477,7 @@ function setReference(data) {
prefix="card" prefix="card"
:array-data-props="{ :array-data-props="{
url: 'Tickets/filter', url: 'Tickets/filter',
order: ['shippedDate DESC', 'shippedHour ASC', 'zoneLanding ASC', 'id'], order: ['shipped DESC', 'shippedHour ASC', 'zoneLanding ASC', 'id'],
exprBuilder, exprBuilder,
}" }"
> >
@ -515,10 +515,10 @@ function setReference(data) {
<DepartmentDescriptorProxy :id="row.departmentFk" /> <DepartmentDescriptorProxy :id="row.departmentFk" />
</span> </span>
</template> </template>
<template #column-shippedDate="{ row }"> <template #column-shipped="{ row }">
<span v-if="getDateColor(row.shipped)"> <span v-if="getDateColor(row.shipped)">
<QChip :class="getDateColor(row.shipped)" dense square> <QChip :class="getDateColor(row.shipped)" dense square>
{{ toDate(row.shippedDate) }} {{ toDate(row.shipped) }}
</QChip> </QChip>
</span> </span>
</template> </template>