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":"WidgetSerial","propertyName":"Serial","hideable":true,"sharedLTKey":false,"custom":false},
{"key":"WidgetDollarAmount","propertyName":"DollarAmount","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":"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":"WidgetStartDate","propertyName":"StartDate","hideable":false,"sharedLTKey":false,"custom":false},
{"key":"WidgetEndDate","propertyName":"EndDate","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}, {"key":"WidgetNotes","propertyName":"Notes","hideable":true,"sharedLTKey":false,"custom":false},

View File

@@ -148,23 +148,23 @@
></v-checkbox> ></v-checkbox>
</v-col> </v-col>
<v-col <v-col
v-if="form().showMe(this, 'WidgetRoles')" v-if="form().showMe(this, 'WidgetUserType')"
cols="12" cols="12"
sm="6" sm="6"
lg="4" lg="4"
xl="3" xl="3"
> >
<v-select <v-select
v-model="obj.roles" v-model="obj.usertype"
:items="pickLists.roles" :items="pickLists.usertypes"
item-text="name" item-text="name"
item-value="id" item-value="id"
:readonly="this.formState.readOnly" :readonly="this.formState.readOnly"
:label="lt('WidgetRoles')" :label="lt('WidgetUserType')"
ref="roles" ref="usertype"
:rules="[form().integerValid(this, 'roles')]" :rules="[form().integerValid(this, 'usertype')]"
:error-messages="form().serverErrors(this, 'roles')" :error-messages="form().serverErrors(this, 'usertype')"
@change="onChange('roles')" @change="onChange('usertype')"
></v-select> ></v-select>
</v-col> </v-col>
@@ -244,7 +244,7 @@ export default {
"WidgetSerial", "WidgetSerial",
"WidgetDollarAmount", "WidgetDollarAmount",
"WidgetCount", "WidgetCount",
"WidgetRoles", "WidgetUserType",
"WidgetStartDate", "WidgetStartDate",
"WidgetEndDate", "WidgetEndDate",
"WidgetNotes", "WidgetNotes",
@@ -341,18 +341,18 @@ export default {
return { return {
formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY, formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY,
pickLists: { pickLists: {
roles: [] usertypes: []
}, },
obj: { 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 //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, id: 0,
concurrencyToken: 0, concurrencyToken: 0,
name: null, name: null,
serial: 0, serial: 0,
dollarAmount: null, dollarAmount: null,
active: null, active: null,
roles: 0, usertype: 0,
startDate: null, startDate: null,
endDate: null, endDate: null,
notes: null, notes: null,
@@ -729,14 +729,12 @@ function initForm(vm) {
// //
// //
function populatePickLists(vm) { function populatePickLists(vm) {
return window.$gz.api return window.$gz.api.get("EnumPickList/list/usertypes").then(res => {
.get("EnumPickList/list/authorizationroles") if (res.error) {
.then(res => { throw res.error;
if (res.error) { }
throw res.error; vm.pickLists.usertypes = res.data;
} });
vm.pickLists.roles = res.data;
});
} }
////////////////////// //////////////////////
@@ -750,7 +748,7 @@ function populatePickLists(vm) {
// "WidgetSerial", // "WidgetSerial",
// "WidgetDollarAmount", // "WidgetDollarAmount",
// "WidgetCount", // "WidgetCount",
// "WidgetRoles", // "WidgetUserType",
// "WidgetStartDate", // "WidgetStartDate",
// "WidgetEndDate", // "WidgetEndDate",
// "WidgetNotes", // "WidgetNotes",