added tags for timesheets (#604)

This commit is contained in:
Mathias
2019-05-12 01:40:04 +02:00
committed by Kevin Papst
parent f31118292c
commit e29e183e84
84 changed files with 2132 additions and 158 deletions

View File

@@ -51,4 +51,30 @@ export default class KimaiAlert extends KimaiPlugin {
});
}
/**
* Callback receives a value and needs to decide what should happen with it
*
* @param message
* @param callback
*/
question(message, callback) {
const translation = this.getContainer().getTranslation();
if (translation.has(message)) {
message = translation.get(message);
}
Swal.fire({
title: message,
type: 'question',
showCancelButton: true,
confirmButtonText: translation.get('confirm'),
cancelButtonText: translation.get('cancel')
}).then((result) => {
if (result.value) {
callback(result.value);
}
});
}
}