package components import ( "context" "fmt" ) type Role struct { ID uint Name string Description string Permissions []string } type RolesData struct { Roles []Role Error string } templ AdminRoles(ctx context.Context, data RolesData) { @LayoutWithContext("Role Management", ctx) {
| Role Name | Description | Permissions | Actions |
|---|---|---|---|
| No roles found. Create your first role to get started. | |||
| { role.Name } | { role.Description } |
for _, perm := range role.Permissions {
{ perm }
}
|
|