This commit is contained in:
2021-03-19 15:05:53 +00:00
parent 845a458fb4
commit ae68ec0695
3 changed files with 23 additions and 14 deletions

View File

@@ -66,7 +66,7 @@ todo: Reviews are showing for all users for all users
..........................................................................................................
* todo JC misc list:
Unit charge description should offer auto suggest from prior entries to save typing. (yes, is new functionality, but would be handy)
...................................................................................................................................................................
@@ -952,6 +952,7 @@ build 105
Accounting role: if select Contacts listview, get error "! Not authorized"
Taxes won't let me change an existing Name if previously selected on any other record.
Taxes won't let me change the Active status if previously selected on any other record.
Unit charge description should offer auto suggest from prior entries to save typing
- not changed
Tag extension should have tag picker instead of empty field in cases where you are picking from existing tags

View File

@@ -87,16 +87,6 @@
lg="4"
xl="3"
>
<!-- <v-text-field
v-model="obj.unit"
:readonly="formState.readOnly"
:label="$ay.t('RateUnitChargeDescriptionID')"
ref="unit"
data-cy="unit"
:error-messages="form().serverErrors(this, 'unit')"
@input="fieldValueChanged('unit')"
></v-text-field> -->
<v-combobox
v-model="obj.unit"
:readonly="formState.readOnly"

View File

@@ -87,7 +87,7 @@
lg="4"
xl="3"
>
<v-text-field
<v-combobox
v-model="obj.unit"
:readonly="formState.readOnly"
:label="$ay.t('RateUnitChargeDescriptionID')"
@@ -95,7 +95,8 @@
data-cy="unit"
:error-messages="form().serverErrors(this, 'unit')"
@input="fieldValueChanged('unit')"
></v-text-field>
:items="selectLists.priorUnits"
></v-combobox>
</v-col>
<v-col
v-if="form().showMe(this, 'ContractOnly')"
@@ -294,7 +295,10 @@ export default {
serverError: {}
},
rights: window.$gz.role.defaultRightsObject(),
ayaType: window.$gz.type.TravelRate
ayaType: window.$gz.type.TravelRate,
selectLists: {
priorUnits: []
}
};
},
//WATCHERS
@@ -692,6 +696,7 @@ let JUST_DELETED = false;
async function initForm(vm) {
await fetchTranslatedText(vm);
await window.$gz.formCustomTemplate.get(FORM_CUSTOM_TEMPLATE_KEY);
await populateSelectionLists(vm);
}
//////////////////////////////////////////////////////////
@@ -726,4 +731,17 @@ async function fetchTranslatedText(vm) {
"TravelRateCustom16"
]);
}
//////////////////////
//
//
async function populateSelectionLists(vm) {
let res = await window.$gz.api.get("travel-rate/prior-unit-list");
if (res.error) {
vm.formState.serverError = res.error;
window.$gz.form.setErrorBoxErrors(vm);
} else {
vm.selectLists.priorUnits = res.data;
}
}
</script>