This commit is contained in:
@@ -44,6 +44,14 @@ CURRENT ROADMAP
|
|||||||
|
|
||||||
CURRENT TODOs
|
CURRENT TODOs
|
||||||
=-=-=-=-=-=-=
|
=-=-=-=-=-=-=
|
||||||
|
TODO: Form customization
|
||||||
|
- Init of form: synthesize a single working collection array of objects in the vue data() for the session to play with not live data
|
||||||
|
- customize form should work with a *copy* of all data and only access the store to update after successful save and on init to make copy
|
||||||
|
- When go to save then synthesize the record to send back
|
||||||
|
- Update the Store on success
|
||||||
|
- Do not add any custom fields not set to be displayed, their mere presence in teh template means they are to be displayed
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TODO: FORM CUSTOMIZATION FORM
|
TODO: FORM CUSTOMIZATION FORM
|
||||||
- Customize option on every form if user is logged in with BizAdminFull rights
|
- Customize option on every form if user is logged in with BizAdminFull rights
|
||||||
|
|||||||
@@ -43,11 +43,13 @@
|
|||||||
{{ item.key }}
|
{{ item.key }}
|
||||||
</v-card-subtitle>
|
</v-card-subtitle>
|
||||||
<v-checkbox
|
<v-checkbox
|
||||||
v-model="item.hideable"
|
v-model="getTemplateItemForField(item.key).visible"
|
||||||
:label="lt('FormFieldVisible')"
|
:label="lt('FormFieldVisible')"
|
||||||
:ref="item.key"
|
:ref="item.key"
|
||||||
:disabled="!canHide(item)"
|
:disabled="!canHide(item)"
|
||||||
></v-checkbox>
|
></v-checkbox>
|
||||||
|
<v-divider></v-divider>
|
||||||
|
{{ item }}
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
</template>
|
</template>
|
||||||
@@ -158,6 +160,29 @@ export default {
|
|||||||
},
|
},
|
||||||
canDuplicate: function() {
|
canDuplicate: function() {
|
||||||
return this.formState.valid && !this.formState.dirty;
|
return this.formState.valid && !this.formState.dirty;
|
||||||
|
},
|
||||||
|
getTemplateItemForField: function(customTemplateFieldKey) {
|
||||||
|
//first check template
|
||||||
|
var templateItem = window.$gz.formCustomTemplate.getFieldTemplateValue(
|
||||||
|
this.formCustomTemplateKey,
|
||||||
|
availableFieldItem.key
|
||||||
|
);
|
||||||
|
if(templateItem==undefined){
|
||||||
|
templateItem=
|
||||||
|
}
|
||||||
|
return templateItem;
|
||||||
|
},
|
||||||
|
fullName: {
|
||||||
|
// getter
|
||||||
|
get: function() {
|
||||||
|
return this.firstName + " " + this.lastName;
|
||||||
|
},
|
||||||
|
// setter
|
||||||
|
set: function(newValue) {
|
||||||
|
var names = newValue.split(" ");
|
||||||
|
this.firstName = names[0];
|
||||||
|
this.lastName = names[names.length - 1];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {},
|
components: {},
|
||||||
|
|||||||
Reference in New Issue
Block a user