This commit is contained in:
2020-07-20 19:05:28 +00:00
parent a6ca999130
commit 89b9107682
3 changed files with 71 additions and 12 deletions

View File

@@ -55,9 +55,7 @@ todo: //NEW NOTIFICATION SUBSCRIPTION EVENT TYPE:
BACKEND
todo: remove fetched date column from notification table? (doesn't appear to be used in current system)
although, would be useful for bolding new items maybe?
todo: BAckend server routes for App notification fetch and clear etc
todo: Back end notification related settings

View File

@@ -1,6 +1,7 @@
<template>
<div>
<h1>New notification count: {{ newNotificationCount() }}</h1>
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
{{ obj }}
<v-list three-line>
<v-list-item> </v-list-item>
</v-list>
@@ -29,19 +30,28 @@ export default {
},
data() {
return {
obj: [],
formState: {
ready: false,
dirty: false,
valid: true,
readOnly: false,
loading: true,
errorBoxMessage: null,
appError: null,
serverError: {}
},
rights: window.$gz.role.defaultRightsObject()
};
},
methods: {
async getDataFromApi() {
let vm = this;
let url = API_BASE_URL + recordId;
try {
window.$gz.form.deleteAllErrorBoxErrors(vm);
let res = await window.$gz.api.get(url);
let res = await window.$gz.api.get("notify/app-notifications");
if (res.error) {
//Not found?
@@ -154,4 +164,55 @@ function generateMenu(vm) {
// });
window.$gz.eventBus.$emit("menu-change", menuOptions);
}
/////////////////////////////////
//
//
async function initForm(vm) {
//await fetchTranslatedText(vm);
//await populateSelectionLists(vm);
}
// //////////////////////////////////////////////////////////
// //
// // Ensures UI translated text is available
// //
// async function fetchTranslatedText(vm) {
// await window.$gz.translation.cacheTranslations([
// "Widget",
// "WidgetName",
// "WidgetSerial",
// "WidgetDollarAmount",
// "WidgetCount",
// "User",
// "UserType",
// "WidgetStartDate",
// "WidgetEndDate",
// "WidgetNotes",
// "WidgetCustom1",
// "WidgetCustom2",
// "WidgetCustom3",
// "WidgetCustom4",
// "WidgetCustom5",
// "WidgetCustom6",
// "WidgetCustom7",
// "WidgetCustom8",
// "WidgetCustom9",
// "WidgetCustom10",
// "WidgetCustom11",
// "WidgetCustom12",
// "WidgetCustom13",
// "WidgetCustom14",
// "WidgetCustom15",
// "WidgetCustom16"
// ]);
// }
// //////////////////////
// //
// //
// 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");
// }
</script>

View File

@@ -234,12 +234,12 @@ export default {
userId: this.$store.state.userId,
ayaType: 0,
eventType: 0,
advanceNotice: null,
idValue: null,
decValue: null,
advanceNotice: "00:00:00",
idValue: 0,
decValue: 0,
deliveryMethod: 0,
deliveryAddress: null,
attachReportId: null,
attachReportId: 0,
inTags: []
},