package components import ( "context" "github.com/starfleetcptn/gomft/internal/db" "strconv" ) type UsersData struct { Users []db.User } templ Users(ctx context.Context, data UsersData) { @LayoutWithContext("User Management", ctx) {

User Management

Add User
if len(data.Users) == 0 { } else {
if len(data.Users) == 0 { } else { for _, user := range data.Users { } }
Email
Role
Created
Actions
No users found
{ user.Email } if user.GetIsAdmin() { Admin } else { User } { user.CreatedAt.Format("Jan 02, 2006") } Edit
}
} } type UserFormData struct { IsNew bool ErrorMessage string } templ UserForm(ctx context.Context, data UserFormData) { @LayoutWithContext("Add User", ctx) {

Add New User

if data.ErrorMessage != "" { }

User Information

Create a new user account with appropriate permissions.

Passwords do not match

Grant administrative privileges to this user

Cancel
} }