refactored permissions for simpler customizations (#808)
This commit is contained in:
@@ -39,8 +39,10 @@ export default class KimaiAPILink extends KimaiClickHandlerReducedInTableRow {
|
||||
}
|
||||
|
||||
if (attributes.question !== undefined) {
|
||||
self.getContainer().getPlugin('alert').question(attributes.question, function() {
|
||||
self._callApi(url, attributes);
|
||||
self.getContainer().getPlugin('alert').question(attributes.question, function(value) {
|
||||
if (value) {
|
||||
self._callApi(url, attributes);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
self._callApi(url, attributes);
|
||||
|
||||
@@ -41,8 +41,6 @@ export default class KimaiAlert extends KimaiPlugin {
|
||||
}
|
||||
|
||||
Swal.fire({
|
||||
//toast: true,
|
||||
//timer: 3000,
|
||||
timer: 1500,
|
||||
position: 'top-end',
|
||||
showConfirmButton: false,
|
||||
@@ -71,9 +69,7 @@ export default class KimaiAlert extends KimaiPlugin {
|
||||
confirmButtonText: translation.get('confirm'),
|
||||
cancelButtonText: translation.get('cancel')
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
callback(result.value);
|
||||
}
|
||||
callback(result.value);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user