forked from verdnatura/salix-front
fix: workerCreate form street field to be always upperCase
This commit is contained in:
parent
a4a9572c96
commit
74c36a28b2
|
@ -85,6 +85,15 @@ function handleLocation(data, location) {
|
|||
data.provinceFk = provinceFk;
|
||||
data.countryFk = countryFk;
|
||||
}
|
||||
|
||||
function uppercaseStreetModel(data) {
|
||||
return {
|
||||
get: () => (data.street ? data.street.toUpperCase() : ''),
|
||||
set: (value) => {
|
||||
data.street = value.toUpperCase();
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<VnSearchbar
|
||||
|
@ -215,7 +224,8 @@ function handleLocation(data, location) {
|
|||
<VnRow>
|
||||
<VnInput
|
||||
:label="t('worker.create.street')"
|
||||
v-model="data.street"
|
||||
:model-value="uppercaseStreetModel(data).get()"
|
||||
@update:model-value="uppercaseStreetModel(data).set"
|
||||
:disable="data.isFreelance"
|
||||
/>
|
||||
</VnRow>
|
||||
|
|
Loading…
Reference in New Issue