diff --git a/frontend/src/views/Users.vue b/frontend/src/views/Users.vue index 6f3435c..30d54c6 100644 --- a/frontend/src/views/Users.vue +++ b/frontend/src/views/Users.vue @@ -1,7 +1,7 @@ @@ -24,6 +24,22 @@ export default { window.location.href = selfUri + "/edituser"; }, + deluser(selfLink){ + var userxhttp = new XMLHttpRequest(); + userxhttp.onreadystatechange = function() { + if (this.readyState == 4 && this.status == 204) { + location.reload(); + } + }; + userxhttp.open("DELETE", selfLink , false); + + userxhttp.setRequestHeader( + "Authorization", + sessionStorage.getItem("jwt") + ); + + userxhttp.send(null); + }, showAccounts(username, uid) { sessionStorage.setItem("timeTrackAccountListUser", username); sessionStorage.setItem("timeTrackAccountListUserId", uid); diff --git a/frontend/src/views/UsersItems.vue b/frontend/src/views/UsersItems.vue index d82eaed..6f90ab5 100644 --- a/frontend/src/views/UsersItems.vue +++ b/frontend/src/views/UsersItems.vue @@ -44,7 +44,7 @@ mdi-file-document-edit - + mdi-delete