mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-05-03 10:14:52 +00:00
fac6a49a64
- Updated ModelTable component to use more specific types for records and edit actions. - Enhanced NavItem component to extend MUI ListItemProps for better type safety. - Refactored normalizeLuaStructure to improve type handling with JsonValue. - Updated LuaUIComponent and related types to use JsonValue for props and handler arguments. - Modified AuditLog interface to use JsonObject for metadata. - Improved importUIPages function to use a more specific database interface. - Refactored builder-types to use JsonValue for component props and default values. - Updated package index.json to reflect changes in package descriptions, dependencies, and added minLevel attributes. - Enhanced permissions in Lua scripts to include new roles (moderator, supergod). - Renamed and updated metadata for UI level packages to reflect new roles and functionalities. - Added new UI level package (Level 6 - Supergod Panel) with associated scripts and components. - Updated permissions check script to include new moderator role checks.
41 lines
991 B
Lua
41 lines
991 B
Lua
-- Tenant management for supergod
|
|
local M = {}
|
|
|
|
function M.tenant_list()
|
|
return {
|
|
type = "tenant_list",
|
|
columns = {
|
|
{ id = "name", label = "Tenant Name" },
|
|
{ id = "owner", label = "Owner" },
|
|
{ id = "users", label = "Users", type = "number" },
|
|
{ id = "status", label = "Status", type = "badge" },
|
|
{ id = "actions", label = "", type = "actions" }
|
|
}
|
|
}
|
|
end
|
|
|
|
function M.tenant_card(tenant)
|
|
return {
|
|
type = "tenant_card",
|
|
id = tenant.id,
|
|
name = tenant.name,
|
|
owner = tenant.owner,
|
|
userCount = tenant.userCount,
|
|
status = tenant.status
|
|
}
|
|
end
|
|
|
|
function M.create_tenant_form()
|
|
return {
|
|
type = "form",
|
|
id = "create_tenant",
|
|
fields = {
|
|
{ id = "name", type = "text", label = "Tenant Name", required = true },
|
|
{ id = "owner", type = "user_select", label = "Owner", required = true },
|
|
{ id = "plan", type = "select", label = "Plan", options = { "free", "pro", "enterprise" } }
|
|
}
|
|
}
|
|
end
|
|
|
|
return M
|