This commit is contained in:
@@ -89,7 +89,31 @@ export default {
|
||||
id: item.notifySubscriptionId
|
||||
});
|
||||
},
|
||||
deleteItem(item) {},
|
||||
async deleteItem(item) {
|
||||
//prompt
|
||||
//delete
|
||||
|
||||
let vm = this;
|
||||
try {
|
||||
let dialogResult = await window.$gz.dialog.confirmDelete();
|
||||
if (dialogResult != true) {
|
||||
return;
|
||||
}
|
||||
|
||||
window.$gz.form.deleteAllErrorBoxErrors(vm);
|
||||
let res = await window.$gz.api.upsert(
|
||||
`notify/${item.id}`,
|
||||
this.selectedItems
|
||||
);
|
||||
if (res.error) {
|
||||
vm.formState.serverError = res.error;
|
||||
window.$gz.form.setErrorBoxErrors(vm);
|
||||
}
|
||||
this.reload = !this.reload;
|
||||
} catch (ex) {
|
||||
window.$gz.errorHandler.handleFormError(ex, vm);
|
||||
}
|
||||
},
|
||||
|
||||
async getDataFromApi() {
|
||||
let vm = this;
|
||||
@@ -267,7 +291,8 @@ async function initForm(vm) {
|
||||
async function fetchTranslatedText(vm) {
|
||||
await window.$gz.translation.cacheTranslations([
|
||||
"NotifySubscription",
|
||||
"Server"
|
||||
"Server",
|
||||
"Notifications"
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user