This commit is contained in:
@@ -40,7 +40,8 @@ todo: As biz objects are fleshed out need to also code their notification event
|
||||
|
||||
todo: Localize this message or get rid of it, it's annoying and possibly useless
|
||||
"Error checking for notifications, see about->log for details; log out and back in again to reset "
|
||||
|
||||
todo: backup notification: AY:Backup status:~SERVER~
|
||||
fixup token with translated text and include link to backup status ops page
|
||||
|
||||
##########################
|
||||
todo: ops backup file list not in order by date, seems to be random or something, I want newest at top oldest at bottom
|
||||
|
||||
@@ -57,7 +57,7 @@ export default {
|
||||
rawObj: [],
|
||||
headers: [
|
||||
{
|
||||
text: this.$ay.t("TimeStamp"),
|
||||
text: this.$ay.t("EventCreated"),
|
||||
align: "start",
|
||||
value: "created"
|
||||
},
|
||||
@@ -87,7 +87,32 @@ export default {
|
||||
window.$gz.eventBus.$off("menu-click", clickHandler);
|
||||
},
|
||||
methods: {
|
||||
deleteItem(item) {},
|
||||
async deleteItem(item) {
|
||||
let vm = this;
|
||||
try {
|
||||
let dialogResult = await window.$gz.dialog.confirmDelete();
|
||||
if (dialogResult != true) {
|
||||
return;
|
||||
}
|
||||
|
||||
//do the delete
|
||||
vm.formState.loading = true;
|
||||
|
||||
window.$gz.form.deleteAllErrorBoxErrors(vm);
|
||||
let res = await window.$gz.api.remove(`notify-event/${item.id}`);
|
||||
if (res.error) {
|
||||
vm.formState.serverError = res.error;
|
||||
window.$gz.form.setErrorBoxErrors(vm);
|
||||
} else {
|
||||
//refresh
|
||||
await vm.getDataFromApi();
|
||||
}
|
||||
} catch (ex) {
|
||||
window.$gz.errorHandler.handleFormError(ex, vm);
|
||||
} finally {
|
||||
vm.formState.loading = false;
|
||||
}
|
||||
},
|
||||
async getDataFromApi() {
|
||||
let vm = this;
|
||||
vm.formState.loading = true;
|
||||
@@ -243,7 +268,13 @@ async function initForm(vm) {
|
||||
// Ensures UI translated text is available
|
||||
//
|
||||
async function fetchTranslatedText(vm) {
|
||||
await window.$gz.translation.cacheTranslations(["NotifyEventType"]);
|
||||
await window.$gz.translation.cacheTranslations([
|
||||
"NotifyEventType",
|
||||
"EventCreated",
|
||||
"AyaType",
|
||||
"Name",
|
||||
"User"
|
||||
]);
|
||||
}
|
||||
|
||||
//////////////////////
|
||||
|
||||
Reference in New Issue
Block a user