mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-05-03 10:14:52 +00:00
f3b1058d62
- Implemented App Header with lifecycle and rendering scripts. - Created Intro Section with rendering logic. - Developed User Dashboard with profile, comments, and chat functionalities. - Added Admin Panel for user and content management. - Introduced Application Builder with schemas and workflows. - Established Super God panel for tenant management. - Updated metadata and tests for all new components and functionalities. - Enhanced UI Pages Bundle to include dependencies for all levels. - Improved permission checks and constants in the permissions package.
36 lines
1.1 KiB
Lua
36 lines
1.1 KiB
Lua
local M = {}
|
|
|
|
function M.render(ctx)
|
|
local rows = {}
|
|
for _, u in ipairs(ctx.users or {}) do
|
|
rows[#rows + 1] = {
|
|
type = "TableRow",
|
|
children = {
|
|
{ type = "TableCell", props = { text = u.username } },
|
|
{ type = "TableCell", props = { text = u.email or "-" } },
|
|
{ type = "TableCell", props = { text = u.role } },
|
|
{ type = "TableCell", children = {
|
|
{ type = "Button", props = { size = "sm", text = "Edit", onClick = "editUser", data = u.id } },
|
|
{ type = "Button", props = { size = "sm", variant = "destructive", text = "Delete", onClick = "deleteUser", data = u.id } }
|
|
}}
|
|
}
|
|
}
|
|
end
|
|
return {
|
|
type = "Table",
|
|
children = {
|
|
{ type = "TableHeader", children = {
|
|
{ type = "TableRow", children = {
|
|
{ type = "TableHead", props = { text = "Username" } },
|
|
{ type = "TableHead", props = { text = "Email" } },
|
|
{ type = "TableHead", props = { text = "Role" } },
|
|
{ type = "TableHead", props = { text = "Actions" } }
|
|
}}
|
|
}},
|
|
{ type = "TableBody", children = rows }
|
|
}
|
|
}
|
|
end
|
|
|
|
return M
|