This commit is contained in:
2020-07-10 21:39:17 +00:00
parent bcabdde720
commit 6ce9db9ea2

View File

@@ -6,6 +6,8 @@
<v-row>
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
{{ obj }}
//////
{{ selectLists }}
</v-row>
</v-form>
</v-col>
@@ -28,7 +30,6 @@
//
const FORM_KEY = "home-notify-subscription";
const API_BASE_URL = "notify-subscription/";
const FORM_CUSTOM_TEMPLATE_KEY = "home-notify-subscription";
export default {
async created() {
@@ -84,9 +85,9 @@ export default {
},
data() {
return {
formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY,
selectLists: {
usertypes: []
eventTypes: [],
deliveryMethods: []
},
/* public long Id { get; set; }
public uint Concurrency { get; set; }
@@ -108,23 +109,19 @@ export default {
obj: {
id: 0,
concurrency: 0,
active: false,
name: null,
roles: null,
userType: 3,
employeeNumber: null,
notes: null,
customerId: null,
headOfficeId: null,
subVendorId: null,
wiki: null,
customFields: "{}",
tags: [],
lastLogin: null
userId: this.$store.state.userId,
ayaType: 0,
eventType: 0,
advanceNotice: null,
idValue: null,
decValue: null,
deliveryMethod: 0,
deliveryAddress: null,
attachReportId: null,
inTags: [],
outTags: []
},
login: null,
password: null,
reveal: true,
formState: {
ready: false,
dirty: false,
@@ -441,8 +438,7 @@ function generateMenu(vm) {
helpUrl: "form-home-notify-subscription",
formData: {
ayaType: window.$gz.type.NotifySubscription,
recordId: vm.$route.params.recordid,
formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY
recordId: vm.$route.params.recordid
},
menuItems: []
};
@@ -515,7 +511,7 @@ let JUST_DELETED = false;
//
async function initForm(vm) {
await fetchTranslatedText(vm);
await window.$gz.formCustomTemplate.get(FORM_CUSTOM_TEMPLATE_KEY);
// await window.$gz.formCustomTemplate.get(FORM_CUSTOM_TEMPLATE_KEY);
await populateSelectionLists(vm);
}
@@ -524,7 +520,7 @@ async function initForm(vm) {
// Ensures UI translated text is available
//
async function fetchTranslatedText(vm) {
await window.$gz.translation.cacheTranslations([]);
await window.$gz.translation.cacheTranslations(["NotifySubscription"]);
}
//////////////////////
@@ -532,7 +528,14 @@ async function fetchTranslatedText(vm) {
//
async function populateSelectionLists(vm) {
//ensure the pick lists required are pre-fetched
await window.$gz.enums.fetchEnumList("usertype");
vm.selectLists.usertypes = window.$gz.enums.getSelectionList("usertype");
await window.$gz.enums.fetchEnumList("NotifyEventType");
vm.selectLists.eventTypes = window.$gz.enums.getSelectionList(
"NotifyEventType"
);
await window.$gz.enums.fetchEnumList("NotifyDeliveryMethod");
vm.selectLists.deliveryMethods = window.$gz.enums.getSelectionList(
"NotifyDeliveryMethod"
);
}
</script>