Files
metabuilder/packages/user_manager/seed/scripts/list.lua
JohnDoe6345789 9d67c8dbbc feat: add notification center package with toast and list functionalities
- Implemented notification center initialization and rendering utilities.
- Added toast notification types: success, error, warning, and info.
- Created notification list rendering with badge support.
- Included SVG icons for notification center.
- Added tests for notification center functionalities.

feat: introduce schema editor package for database management

- Developed schema editor initialization and field type definitions.
- Implemented table management and relationships handling.
- Added SVG icons for schema editor.
- Included tests for schema editor functionalities.

feat: create user manager package for user management operations

- Implemented user management actions: create, update, delete, change level, and toggle active.
- Developed user list rendering with sortable columns.
- Added SVG icons for user manager.
- Included tests for user manager functionalities.

feat: add workflow editor package for workflow management

- Developed workflow editor rendering and step management utilities.
- Implemented workflow run status display and progress rendering.
- Added SVG icons for workflow editor.
- Included tests for workflow editor functionalities.

chore: add static SVG icons for various packages
2025-12-29 23:47:01 +00:00

39 lines
875 B
Lua

-- User list rendering
local M = {}
function M.columns()
return {
{ id = "username", label = "Username", sortable = true },
{ id = "email", label = "Email", sortable = true },
{ id = "role", label = "Role", sortable = true },
{ id = "level", label = "Level", sortable = true },
{ id = "active", label = "Status", type = "badge" },
{ id = "actions", label = "", type = "actions" }
}
end
function M.render_row(user)
return {
username = user.username,
email = user.email,
role = user.role,
level = user.level,
active = user.active and "Active" or "Inactive",
actions = { "edit", "delete" }
}
end
function M.render(users)
local rows = {}
for _, user in ipairs(users) do
table.insert(rows, M.render_row(user))
end
return {
type = "data_table",
columns = M.columns(),
rows = rows
}
end
return M