This commit is contained in:
@@ -70,6 +70,7 @@ export default {
|
||||
|
||||
if (
|
||||
ctx.formData &&
|
||||
ctx.formData.formCustomTemplateKey != undefined &&
|
||||
window.$gz.role.hasRole(window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull)
|
||||
) {
|
||||
//add customize menu item
|
||||
|
||||
@@ -17,6 +17,17 @@
|
||||
>{{ formState.errorBoxMessage }}</v-alert
|
||||
>
|
||||
</v-col>
|
||||
<template
|
||||
v-for="item in this.$store.state.formCustomTemplate[
|
||||
formCustomTemplateKey
|
||||
]"
|
||||
>
|
||||
<v-col :key="item.fld" cols="12" sm="6" lg="4" xl="3" px-2>
|
||||
<div>
|
||||
{{ item }}
|
||||
</div>
|
||||
</v-col>
|
||||
</template>
|
||||
</v-row>
|
||||
</v-form>
|
||||
</v-col>
|
||||
@@ -42,7 +53,8 @@ export default {
|
||||
errorBoxMessage: null,
|
||||
appError: null,
|
||||
serverError: {}
|
||||
}
|
||||
},
|
||||
rights: window.$gz.role.defaultRightsObject()
|
||||
};
|
||||
},
|
||||
//WATCHERS
|
||||
@@ -115,11 +127,11 @@ export default {
|
||||
},
|
||||
getDataFromApi() {
|
||||
this.formState.loading = true;
|
||||
if (!formCustomTemplateKey) {
|
||||
if (!this.formCustomTemplateKey) {
|
||||
throw FORM_KEY + "::getDataFromApi -> Missing recordID!";
|
||||
}
|
||||
//http://localhost:7575/api/v8/FormCustom/AvailableFields/widget
|
||||
var url = FORM_BASE_URL + "AvailableFields/" + formCustomTemplateKey;
|
||||
var url = API_BASE_URL + "AvailableFields/" + this.formCustomTemplateKey;
|
||||
var vm = this;
|
||||
window.$gz.form.deleteAllErrorBoxErrors(this);
|
||||
|
||||
@@ -171,6 +183,37 @@ export default {
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//////////////////////
|
||||
//
|
||||
//
|
||||
function generateMenu(vm) {
|
||||
var menuOptions = {
|
||||
isMain: false,
|
||||
icon: "fa-sliders-h",
|
||||
title: window.$gz.locale.get("Customize"),
|
||||
helpUrl: "intro/#searching",
|
||||
formData: {
|
||||
formKey: FORM_KEY,
|
||||
ayaType: window.$gz.type.FormCustom,
|
||||
formCustomTemplateKey: undefined
|
||||
},
|
||||
menuItems: []
|
||||
};
|
||||
|
||||
if (vm.rights.change) {
|
||||
menuOptions.menuItems.push({
|
||||
title: window.$gz.locale.get("Save"),
|
||||
icon: "save",
|
||||
surface: true,
|
||||
key: FORM_KEY + ":save",
|
||||
vm: vm
|
||||
});
|
||||
}
|
||||
|
||||
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
||||
}
|
||||
|
||||
/*
|
||||
OLD (not used, drop)
|
||||
"ObjectCustomFieldCustomGrid": "Custom Fields",
|
||||
|
||||
Reference in New Issue
Block a user