This commit is contained in:
@@ -45,11 +45,6 @@ CURRENT TODOs
|
||||
@@@@@@@@@@@ ROADMAP STAGE 1 and 2:
|
||||
|
||||
|
||||
todo: widget edit, NEW button? (v7 has a new button for every type of record?? Save and new??)
|
||||
|
||||
todo: apparently I can change the buttons to display the text not uppercase with class="text-none" or something, should I go back to buttons? (kinda looked cooler, but...)
|
||||
- https://github.com/vuetifyjs/vuetify/issues/3948
|
||||
|
||||
todo: Customize form - needs locale text customization link in there too because that's the central spot people go to do that shit
|
||||
- Locale on it's own form though as previously planned, just additional link on customize fields form so that people can ramble their way onto it.
|
||||
|
||||
|
||||
@@ -91,8 +91,12 @@ export default {
|
||||
if (
|
||||
ctx.formData &&
|
||||
ctx.formData.formCustomTemplateKey != undefined &&
|
||||
window.$gz.role.hasRole(window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull)
|
||||
window.$gz.role.hasRole([
|
||||
window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull,
|
||||
window.$gz.role.AUTHORIZATION_ROLES.BizAdminLimited
|
||||
])
|
||||
) {
|
||||
//NOTE: BizAdminFull can edit, bizadminlimited can read only
|
||||
//add customize menu item
|
||||
//DIVIDER
|
||||
//Insert the devider between context and global items
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
{{ tempTemplate }}
|
||||
</div>
|
||||
<v-divider></v-divider> -->
|
||||
<v-row v-if="this.formState.ready">
|
||||
<v-row v-if="formState.ready">
|
||||
<v-col>
|
||||
<v-form ref="form">
|
||||
<v-row>
|
||||
@@ -52,6 +52,7 @@
|
||||
<v-card-text>
|
||||
<v-checkbox
|
||||
v-model="item.visible"
|
||||
:readOnly="formState.readOnly"
|
||||
:label="lt('FormFieldVisible')"
|
||||
:ref="item.key"
|
||||
:disabled="item.stockRequired"
|
||||
@@ -59,6 +60,7 @@
|
||||
></v-checkbox>
|
||||
<v-checkbox
|
||||
v-model="item.required"
|
||||
:readOnly="formState.readOnly"
|
||||
:label="lt('FormFieldEntryRequired')"
|
||||
:disabled="item.stockRequired"
|
||||
@change="requiredChanged(item)"
|
||||
@@ -66,6 +68,7 @@
|
||||
<v-select
|
||||
v-if="item.custom"
|
||||
v-model="item.type"
|
||||
:readOnly="formState.readOnly"
|
||||
:items="pickLists.uiFieldDataTypes"
|
||||
item-text="name"
|
||||
item-value="id"
|
||||
@@ -117,6 +120,7 @@ export default {
|
||||
initForm(vm)
|
||||
.then(() => {
|
||||
vm.formState.ready = true;
|
||||
vm.readOnly = !vm.rights.change;
|
||||
window.$gz.eventBus.$on("menu-click", clickHandler);
|
||||
//NOTE: this would normally be in getDataFromAPI but this form doesn't really need that function so doing it here
|
||||
//modify the menu as necessary
|
||||
@@ -178,23 +182,23 @@ export default {
|
||||
},
|
||||
submit() {
|
||||
var vm = this;
|
||||
var url = API_BASE_URL + this.formCustomTemplateKey;
|
||||
var url = API_BASE_URL + vm.formCustomTemplateKey;
|
||||
|
||||
//clear any errors vm might be around from previous submit
|
||||
window.$gz.form.deleteAllErrorBoxErrors(this);
|
||||
window.$gz.form.deleteAllErrorBoxErrors(vm);
|
||||
|
||||
//Create template data object here....
|
||||
//Note that server expects to see a string array of json template, not actual json
|
||||
var newObj = {
|
||||
formKey: this.formCustomTemplateKey,
|
||||
concurrencyToken: this.concurrencyToken,
|
||||
formKey: vm.formCustomTemplateKey,
|
||||
concurrencyToken: vm.concurrencyToken,
|
||||
template: "[]"
|
||||
};
|
||||
//temporary array to hold template for later stringification
|
||||
var temp = [];
|
||||
//Rules:
|
||||
for (var i = 0; i < this.obj.length; i++) {
|
||||
var fldItem = this.obj[i];
|
||||
for (var i = 0; i < vm.obj.length; i++) {
|
||||
var fldItem = vm.obj[i];
|
||||
if (fldItem.custom == false) {
|
||||
//Process regular stock field
|
||||
//If it's *not* set to stockRequired (i.e. built in field with biz rules that can't be hidden or changed)
|
||||
|
||||
Reference in New Issue
Block a user