diff --git a/src/components/CreateNewCityForm.vue b/src/components/CreateNewCityForm.vue
index 4b1e12fb0..e51a18ef8 100644
--- a/src/components/CreateNewCityForm.vue
+++ b/src/components/CreateNewCityForm.vue
@@ -44,7 +44,7 @@ const onDataSaved = (...args) => {
diff --git a/src/components/CreateNewPostcodeForm.vue b/src/components/CreateNewPostcodeForm.vue
index 44338f186..907e49499 100644
--- a/src/components/CreateNewPostcodeForm.vue
+++ b/src/components/CreateNewPostcodeForm.vue
@@ -1,5 +1,5 @@
@@ -154,12 +143,15 @@ async function handleCountries(data) {
ref="townsFetchDataRef"
:sort-by="['name ASC']"
:limit="30"
+ :filter="townFilter"
@on-fetch="handleTowns"
auto-load
url="Towns/location"
/>
setTown(value, data)"
+ @filter="filterTowns"
:tooltip="t('Create city')"
v-model="data.townFk"
:options="townsOptions"
@@ -225,7 +218,7 @@ async function handleCountries(data) {
:province-selected="data.provinceFk"
@update:model-value="(value) => setProvince(value, data)"
v-model="data.provinceFk"
- :clearable="true"
+ @on-province-fetched="handleProvinces"
@on-province-created="onProvinceCreated"
/>
setCountry(value, data)"
/>
diff --git a/src/components/VnSelectProvince.vue b/src/components/VnSelectProvince.vue
index 5da6b781f..bfc4ab7b7 100644
--- a/src/components/VnSelectProvince.vue
+++ b/src/components/VnSelectProvince.vue
@@ -7,7 +7,7 @@ import VnSelectDialog from 'components/common/VnSelectDialog.vue';
import FetchData from 'components/FetchData.vue';
import CreateNewProvinceForm from './CreateNewProvinceForm.vue';
-const emit = defineEmits(['onProvinceCreated']);
+const emit = defineEmits(['onProvinceCreated', 'onProvinceFetched']);
const $props = defineProps({
countryFk: {
type: Number,
@@ -50,6 +50,7 @@ watch(
filter.value.where.countryFk = $props.countryFk;
} else filter.value.where = {};
await provincesFetchDataRef.value.fetch({});
+ emit('onProvinceFetched', provincesOptions.value);
}
);
@@ -67,6 +68,7 @@ watch(
:options="provincesOptions"
:tooltip="t('Create province')"
hide-selected
+ :clearable="true"
v-model="provinceFk"
:rules="validate && validate('postcode.provinceFk')"
:acls="[{ model: 'Province', props: '*', accessType: 'WRITE' }]"
diff --git a/src/components/common/VnAccountNumber.vue b/src/components/common/VnAccountNumber.vue
index f7273a72d..c4fa78674 100644
--- a/src/components/common/VnAccountNumber.vue
+++ b/src/components/common/VnAccountNumber.vue
@@ -1,20 +1,24 @@
-
+
diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue
index 7a9e26186..57a495ac3 100644
--- a/src/components/common/VnInput.vue
+++ b/src/components/common/VnInput.vue
@@ -1,5 +1,5 @@
@@ -89,6 +127,7 @@ const mixinRules = [
:type="$attrs.type"
:class="{ required: isRequired }"
@keyup.enter="emit('keyup.enter')"
+ @keydown="handleKeydown"
:clearable="false"
:rules="mixinRules"
:lazy-rules="true"
@@ -130,9 +169,11 @@ const mixinRules = [
en:
inputMin: Must be more than {value}
+ maxLength: The value exceeds {value} characters
inputMax: Must be less than {value}
es:
inputMin: Debe ser mayor a {value}
+ maxLength: El valor excede los {value} carácteres
inputMax: Debe ser menor a {value}