package components import ( "context" "github.com/starfleetcptn/gomft/internal/db" "strconv" ) type UserManagementData struct { Users []db.User Roles []db.Role ActiveTab string // "list", "create", or "edit" EditUser *db.User UserRoles []db.Role ErrorMessage string } templ UserManagement(ctx context.Context, data UserManagementData) { @LayoutWithContext("User Management", ctx) {
|
Email
|
Role
|
Status
|
Actions |
|---|---|---|---|
| No users found. Click the "Add User" button to create your first user. | |||
| { user.Email } | if user.GetIsAdmin() { Admin } else { User } | if user.GetAccountLocked() { Locked } else { Active } | |
if isNew { Create a new user account with appropriate permissions. } else { Update user information and permissions. }