UI Datagrid Plus Enhanced

This commit is contained in:
devansh bawari 2021-09-07 09:59:33 +05:30
parent 55360a186a
commit eca31e3123
3 changed files with 15 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
{
"/js/ui.js": "/js/ui.js?id=5ad9ef8dc0f7e2a59c75",
"/js/ui.js": "/js/ui.js?id=0e7531d8cbf7818a9acd",
"/css/ui.css": "/css/ui.css?id=87c15a3e7af4ab272377"
}

View File

@ -1459,6 +1459,8 @@
},
doAction: function(e, message, type) {
let self = this;
let element = e.currentTarget;
if (message) {
@ -1474,10 +1476,19 @@
_method: element.getAttribute("data-method")
})
.then(function(response) {
/**
* If refirect is true, then pass redirect url in the response.
*
* Else, it will reload table only.
*/
if (response.data.redirect) {
window.location.href = response.data.redirect;
window.location.href = response.data.redirectUrl;
} else {
location.reload();
self.hitUrl();
window.flashMessages.push({'type': 'alert-success', 'message': response.data.message });
self.$root.addFlashMessages();
}
})
.catch(function(error) {