From 6ce9db9ea2176ce44e502c1af746665a519972dd Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 10 Jul 2020 21:39:17 +0000 Subject: [PATCH] --- .../src/views/home-notify-subscription.vue | 53 ++++++++++--------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/ayanova/src/views/home-notify-subscription.vue b/ayanova/src/views/home-notify-subscription.vue index f561d933..a6386ab2 100644 --- a/ayanova/src/views/home-notify-subscription.vue +++ b/ayanova/src/views/home-notify-subscription.vue @@ -6,6 +6,8 @@ {{ obj }} + ////// + {{ selectLists }} @@ -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" + ); }