package components import ( "github.com/starfleetcptn/gomft/internal/db" "strconv" "context" ) 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 {

No users found

Get started by adding a new user.

} else {
if len(data.Users) == 0 { } else { for _, user := range data.Users { } }
Email Role Created Actions
No users found
{ user.Email }
if user.IsAdmin { Admin } else { User } { user.CreatedAt.Format("Jan 02, 2006") }
}

User accounts provide secure access to the GoMFT application with role-based permissions

} } 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
User accounts provide secure access to the GoMFT application
} }