fix: minor bugs

This commit is contained in:
Javier Segarra 2025-05-01 10:21:11 +02:00
parent 7eb02bee8c
commit eb0754b3d1
4 changed files with 21 additions and 7 deletions

View File

@ -132,8 +132,7 @@ const card = toRef(props, 'item');
display: flex;
flex-direction: column;
gap: 4px;
white-space: nowrap;
width: 192px;
p {
margin-bottom: 0;
}

View File

@ -312,16 +312,28 @@ async function getZone(options) {
<VnSelect
:label="t('basicData.address')"
v-model="addressId"
option-value="id"
option-label="nickname"
:options="addresses"
hide-selected
map-options
:required="true"
:sort-by="['isActive DESC']"
:rules="validate('basicData.address')"
>
<template #option="scope">
<QItem v-bind="scope.itemProps">
<QItem
v-bind="scope.itemProps"
:class="{ disabled: !scope.opt.isActive }"
>
<QItemSection style="min-width: min-content" avatar>
<QIcon
v-if="scope.opt.isActive && addressId === scope.opt.id"
size="sm"
color="grey"
name="star"
class="fill-icon"
/>
</QItemSection>
<QItemSection>
<QItemLabel
:class="{
@ -347,6 +359,9 @@ async function getZone(options) {
{{ scope.opt?.agencyMode?.name }}</span
>
</QItemLabel>
<QItemLabel caption>
{{ `#${scope.opt?.id}` }}
</QItemLabel>
</QItemSection>
</QItem>
</template>

View File

@ -579,7 +579,7 @@ function setReference(data) {
hide-selected
required
@update:model-value="() => onClientSelected(data)"
:sort-by="'id ASC'"
:sort-by="['id ASC']"
>
<template #option="scope">
<QItem v-bind="scope.itemProps">
@ -605,7 +605,7 @@ function setReference(data) {
map-options
required
:disable="!data.clientId"
:sort-by="'isActive DESC'"
:sort-by="['isActive DESC']"
@update:model-value="() => fetchAvailableAgencies(data)"
>
<template #option="scope">

View File

@ -89,7 +89,7 @@ watch(
v-model="formData.geoFk"
url="Postcodes/location"
:fields="['geoFk', 'code', 'townFk', 'countryFk']"
:sort-by="'code ASC'"
:sort-by="['code ASC']"
option-value="geoFk"
option-label="code"
:filter-options="['code']"