This commit is contained in:
2019-12-05 00:15:28 +00:00
parent d23a7fdba1
commit b231bf8873
2 changed files with 47 additions and 3 deletions

View File

@@ -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

View File

@@ -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",