fix redirect back users crud
This commit is contained in:
@@ -9,9 +9,8 @@ class UsersTable {
|
||||
}
|
||||
|
||||
initTableUsers() {
|
||||
let tableContainer = document.getElementById(
|
||||
"table-users"
|
||||
);
|
||||
let tableContainer = document.getElementById("table-users");
|
||||
let menuId = tableContainer.getAttribute("data-menuId");
|
||||
|
||||
tableContainer.innerHTML = "";
|
||||
let canUpdate = tableContainer.getAttribute("data-updater") === "1";
|
||||
@@ -26,13 +25,15 @@ class UsersTable {
|
||||
"Roles",
|
||||
{
|
||||
name: "Action",
|
||||
formatter: (cell) =>{
|
||||
formatter: (cell) => {
|
||||
if (!canUpdate) {
|
||||
return gridjs.html(`<span class="text-muted">No Privilege</span>`);
|
||||
return gridjs.html(
|
||||
`<span class="text-muted">No Privilege</span>`
|
||||
);
|
||||
}
|
||||
return gridjs.html(`
|
||||
<div class="d-flex justify-content-center">
|
||||
<a href="/master/users/${cell}/edit" class="btn btn-yellow btn-sm d-inline-flex align-items-center justify-content-center">
|
||||
<a href="/master/users/${cell}/edit?menu_id=${menuId}" class="btn btn-yellow btn-sm d-inline-flex align-items-center justify-content-center">
|
||||
<i class='bx bx-edit'></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user