feat: refs #7731
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Robert Ferrús 2024-12-17 11:02:51 +01:00
parent 08f247900a
commit 4de85126cd
2 changed files with 14 additions and 16 deletions

View File

@ -22,13 +22,14 @@ function filterFn(val, update) {
countriesOptionCopy.value = JSON.parse(
JSON.stringify(countriesOption.value)
);
} else {
return;
}
const exist = countriesOption.value.filter((c) =>
c.code.toLowerCase().includes(val.toLowerCase())
);
if (exist) return (countriesOptionCopy.value = exist);
countriesOptionCopy.value = JSON.parse(JSON.stringify([{ code: val }]));
}
},
(ref) => {
if (val !== '' && ref.options.length > 0) {
@ -46,8 +47,7 @@ function filterFn(val, update) {
v-model="model"
:input-debounce="0"
:options="countriesOptionCopy"
@blur="() => handleBlur()"
@input-value="(evt) => (lastVal = evt)"
@input-value="(evt) => (lastVal = evt) && handleBlur()"
@filter="filterFn"
option-label="code"
option-value="code"

View File

@ -173,15 +173,13 @@ function handleLocation(data, location) {
}"
@update:model-value="(location) => handleLocation(data, location)"
/>
<VnSelectVies v-model="data.viesCode" style="max-width: 30%" />
</VnRow>
<VnRow>
<div class="col flex justify-around">
<VnSelectVies v-model="data.viesCode" />
<QCheckbox
v-model="data.isTrucker"
:label="t('supplier.fiscalData.isTrucker')"
/>
</div>
</VnRow>
</template>
</FormModel>