This commit is contained in:
@@ -105,7 +105,7 @@
|
|||||||
data-cy="unit"
|
data-cy="unit"
|
||||||
:error-messages="form().serverErrors(this, 'unit')"
|
:error-messages="form().serverErrors(this, 'unit')"
|
||||||
@input="fieldValueChanged('unit')"
|
@input="fieldValueChanged('unit')"
|
||||||
:items="rateUnits"
|
:items="selectLists.priorUnits"
|
||||||
></v-combobox>
|
></v-combobox>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
@@ -308,7 +308,9 @@ export default {
|
|||||||
},
|
},
|
||||||
rights: window.$gz.role.defaultRightsObject(),
|
rights: window.$gz.role.defaultRightsObject(),
|
||||||
ayaType: window.$gz.type.ServiceRate,
|
ayaType: window.$gz.type.ServiceRate,
|
||||||
rateUnits: ["each", "hour"]
|
selectLists: {
|
||||||
|
priorUnits: []
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
//WATCHERS
|
//WATCHERS
|
||||||
@@ -706,6 +708,7 @@ let JUST_DELETED = false;
|
|||||||
async function initForm(vm) {
|
async function initForm(vm) {
|
||||||
await fetchTranslatedText(vm);
|
await fetchTranslatedText(vm);
|
||||||
await window.$gz.formCustomTemplate.get(FORM_CUSTOM_TEMPLATE_KEY);
|
await window.$gz.formCustomTemplate.get(FORM_CUSTOM_TEMPLATE_KEY);
|
||||||
|
await populateSelectionLists(vm);
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////
|
||||||
@@ -740,4 +743,17 @@ async function fetchTranslatedText(vm) {
|
|||||||
"ServiceRateCustom16"
|
"ServiceRateCustom16"
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
//
|
||||||
|
async function populateSelectionLists(vm) {
|
||||||
|
let res = await window.$gz.api.get("service-rate/prior-unit-list");
|
||||||
|
if (res.error) {
|
||||||
|
vm.formState.serverError = res.error;
|
||||||
|
window.$gz.form.setErrorBoxErrors(vm);
|
||||||
|
} else {
|
||||||
|
vm.selectLists.priorUnits = res.data;
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user