0
0
Fork 0

fix: workerCreate form street field to be always upperCase

This commit is contained in:
Jon Elias 2024-07-12 13:05:46 +02:00
parent a4a9572c96
commit 74c36a28b2
1 changed files with 11 additions and 1 deletions

View File

@ -85,6 +85,15 @@ function handleLocation(data, location) {
data.provinceFk = provinceFk; data.provinceFk = provinceFk;
data.countryFk = countryFk; data.countryFk = countryFk;
} }
function uppercaseStreetModel(data) {
return {
get: () => (data.street ? data.street.toUpperCase() : ''),
set: (value) => {
data.street = value.toUpperCase();
},
};
}
</script> </script>
<template> <template>
<VnSearchbar <VnSearchbar
@ -215,7 +224,8 @@ function handleLocation(data, location) {
<VnRow> <VnRow>
<VnInput <VnInput
:label="t('worker.create.street')" :label="t('worker.create.street')"
v-model="data.street" :model-value="uppercaseStreetModel(data).get()"
@update:model-value="uppercaseStreetModel(data).set"
:disable="data.isFreelance" :disable="data.isFreelance"
/> />
</VnRow> </VnRow>