This commit is contained in:
2020-02-11 18:08:29 +00:00
parent bbab96033a
commit d525b55561
2 changed files with 20 additions and 22 deletions

View File

@@ -457,7 +457,7 @@ Example form available fields
{"key":"WidgetSerial","propertyName":"Serial","hideable":true,"sharedLTKey":false,"custom":false},
{"key":"WidgetDollarAmount","propertyName":"DollarAmount","hideable":true,"sharedLTKey":false,"custom":false},
{"key":"WidgetCount","propertyName":"Count","hideable":true,"sharedLTKey":false,"custom":false},
{"key":"WidgetRoles","propertyName":"Roles","hideable":true,"sharedLTKey":false,"custom":false},
{"key":"WidgetUserType","propertyName":"UserType","hideable":true,"sharedLTKey":false,"custom":false},
{"key":"WidgetStartDate","propertyName":"StartDate","hideable":false,"sharedLTKey":false,"custom":false},
{"key":"WidgetEndDate","propertyName":"EndDate","hideable":false,"sharedLTKey":false,"custom":false},
{"key":"WidgetNotes","propertyName":"Notes","hideable":true,"sharedLTKey":false,"custom":false},

View File

@@ -148,23 +148,23 @@
></v-checkbox>
</v-col>
<v-col
v-if="form().showMe(this, 'WidgetRoles')"
v-if="form().showMe(this, 'WidgetUserType')"
cols="12"
sm="6"
lg="4"
xl="3"
>
<v-select
v-model="obj.roles"
:items="pickLists.roles"
v-model="obj.usertype"
:items="pickLists.usertypes"
item-text="name"
item-value="id"
:readonly="this.formState.readOnly"
:label="lt('WidgetRoles')"
ref="roles"
:rules="[form().integerValid(this, 'roles')]"
:error-messages="form().serverErrors(this, 'roles')"
@change="onChange('roles')"
:label="lt('WidgetUserType')"
ref="usertype"
:rules="[form().integerValid(this, 'usertype')]"
:error-messages="form().serverErrors(this, 'usertype')"
@change="onChange('usertype')"
></v-select>
</v-col>
@@ -244,7 +244,7 @@ export default {
"WidgetSerial",
"WidgetDollarAmount",
"WidgetCount",
"WidgetRoles",
"WidgetUserType",
"WidgetStartDate",
"WidgetEndDate",
"WidgetNotes",
@@ -341,18 +341,18 @@ export default {
return {
formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY,
pickLists: {
roles: []
usertypes: []
},
obj: {
//IMPORTANT NOTE: Fields that are NON NULLABLE in the schema for the table but *are* hideable **MUST** have a default value set here or else there will be no way to save the record
//I.E. Serial, Roles fields
//I.E. Serial, usertype fields
id: 0,
concurrencyToken: 0,
name: null,
serial: 0,
dollarAmount: null,
active: null,
roles: 0,
usertype: 0,
startDate: null,
endDate: null,
notes: null,
@@ -729,14 +729,12 @@ function initForm(vm) {
//
//
function populatePickLists(vm) {
return window.$gz.api
.get("EnumPickList/list/authorizationroles")
.then(res => {
if (res.error) {
throw res.error;
}
vm.pickLists.roles = res.data;
});
return window.$gz.api.get("EnumPickList/list/usertypes").then(res => {
if (res.error) {
throw res.error;
}
vm.pickLists.usertypes = res.data;
});
}
//////////////////////
@@ -750,7 +748,7 @@ function populatePickLists(vm) {
// "WidgetSerial",
// "WidgetDollarAmount",
// "WidgetCount",
// "WidgetRoles",
// "WidgetUserType",
// "WidgetStartDate",
// "WidgetEndDate",
// "WidgetNotes",