package components import ( "context" "github.com/starfleetcptn/gomft/internal/db" "strconv" ) type UserEditData struct { User *db.User Roles []db.Role UserRoles []db.Role IsNew bool ErrorMessage string } templ UserEdit(ctx context.Context, data UserEditData) { @LayoutWithContext("Edit User", ctx) {

if data.IsNew { Add New User } else { Edit User }

if data.ErrorMessage != "" { }

User Information

if data.IsNew { Create a new user account with appropriate permissions. } else { Update user information and permissions. }

Grant administrative privileges to this user

if !data.IsNew {

Account Status

Prevent user from logging in

}
Cancel
} }