javascript and api to stop and display active records (#772)

This commit is contained in:
Kevin Papst
2019-05-10 13:45:09 +02:00
committed by GitHub
parent e619b5fd31
commit 09da7cd242
86 changed files with 918 additions and 449 deletions

View File

@@ -6,7 +6,7 @@
*/
/*!
* [KIMAI] KimaiToolbar: some event listener to handle the toolbar/data-table filter, toolbar and navigation
* [KIMAI] KimaiAPI: easy access to API methods
*/
import jQuery from 'jquery';
@@ -31,4 +31,18 @@ export default class KimaiAPI extends KimaiPlugin {
});
}
patch(url, callbackSuccess, callbackError) {
jQuery.ajax({
url: url,
headers: {
'X-AUTH-SESSION': true,
'Content-Type':'application/json'
},
method: 'PATCH',
dataType: 'json',
success: callbackSuccess,
error: callbackError
});
}
}