Merge pull request #6617 from akathuria289/issue_5584

FIxed issue #5584
This commit is contained in:
Jitendra Singh 2022-08-02 10:48:29 +05:30 committed by GitHub
commit fa8f3e6d4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 9 deletions

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@
<i class="icon notification-icon active" style="margin-left:0px"></i>
</div>
<div class="dropdown-list bottom-right notification">
<div class="dropdown-list bottom-right notification" ref="dropdownList">
<div class="dropdown-container">
<ul class="notif">
<div id="notif-title">{{ title }}</div>
@ -132,34 +132,38 @@ export default {
read: 0
};
let this_this = this;
let self = this;
this.$http.get(this.getNotificationUrl, {
params: params
})
.then(function (response) {
this_this.notifications = response.data.search_results.data;
this_this.totalUnRead = response.data.total_unread;
self.notifications = response.data.search_results.data;
self.totalUnRead = response.data.total_unread;
})
.catch(function (error) {})
},
readAll: function () {
let this_this = this;
let self = this;
let dropdownList = this.$refs.dropdownList;
this.$http.post(this.getReadAllUrl)
.then(function (response) {
this_this.notifications = response.data.search_results.data;
self.notifications = response.data.search_results.data;
this_this.totalUnRead = response.data.total_unread;
self.totalUnRead = response.data.total_unread;
window.flashMessages.push({
'type': 'alert-success',
'message': response.data.success_message
});
this_this.$root.addFlashMessages();
self.$root.addFlashMessages();
})
.catch(function (error) {})
dropdownList.style.display = "none";
}
}
}