Files
metabuilder/packages/ui_level4/seed/scripts/workflows.lua
T
git f3b1058d62 feat(ui): Add UI components for header, intro, and user dashboard
- 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.
2025-12-29 23:31:43 +00:00

36 lines
1.1 KiB
Lua

local M = {}
function M.render(ctx)
local items = {}
for _, w in ipairs(ctx.workflows or {}) do
items[#items + 1] = {
type = "Card",
children = {
{ type = "CardHeader", children = { { type = "CardTitle", props = { text = w.name } } } },
{ type = "CardContent", children = {
{ type = "Typography", props = { text = w.description or "No description" } },
{ type = "Badge", props = { text = #(w.steps or {}) .. " steps" } }
}},
{ type = "CardFooter", children = {
{ type = "Button", props = { text = "Edit", onClick = "editWorkflow", data = w.id } },
{ type = "Button", props = { variant = "outline", text = "Run", onClick = "runWorkflow", data = w.id } }
}}
}
}
end
return {
type = "Stack",
props = { spacing = 4 },
children = {
{ type = "Button", props = { text = "Add Workflow", onClick = "addWorkflow" } },
{ type = "Grid", props = { cols = 2, gap = 4 }, children = items }
}
}
end
function M.addWorkflow()
return { success = true, action = "open_workflow_dialog" }
end
return M