create user role and menu, create seeder for first user and create crud role, menu and user
This commit is contained in:
@@ -17,6 +17,15 @@ class UsersTable {
|
||||
"Firstname",
|
||||
"Lastname",
|
||||
"Position",
|
||||
"Roles",
|
||||
{
|
||||
name: "Action",
|
||||
formatter: (cell) =>
|
||||
gridjs.html(`
|
||||
<div class="d-flex justify-content-end gap-x-2">
|
||||
<a href="/master/users/${cell}/edit" class="btn btn-yellow me-2">Update</a>
|
||||
`),
|
||||
},
|
||||
],
|
||||
pagination: {
|
||||
limit: 15,
|
||||
@@ -42,15 +51,19 @@ class UsersTable {
|
||||
.getAttribute("content")}`,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
then: (data) =>
|
||||
data.data.map((item) => [
|
||||
then: (data) => {
|
||||
console.log(data.data);
|
||||
return data.data.map((item) => [
|
||||
item.id,
|
||||
item.name,
|
||||
item.email,
|
||||
item.firstname,
|
||||
item.lastname,
|
||||
item.position,
|
||||
]),
|
||||
item.roles,
|
||||
item.id,
|
||||
]);
|
||||
},
|
||||
total: (data) => data.meta.total,
|
||||
},
|
||||
}).render(document.getElementById("table-users"));
|
||||
|
||||
Reference in New Issue
Block a user