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