{{define "users_content"}}
{{if .FlashError}}
{{.FlashError}}
{{end}} {{if .FlashSuccess}}
{{.FlashSuccess}}
{{end}}
{{if .CSRFField}}{{.CSRFField}}{{end}} {{if .CSRFCookie}}{{end}}
Required headers: username, firstName, lastName, email, password, companyId, locationId. Optional headers include phone, status, timezone, details, isSales, managerId, mfaRequired, serviceLineIds, and roles. In the roles column list the human-readable role names (comma, semicolon, or pipe separated); names are matched case-insensitively.
{{if .RolesError}}
{{.RolesError}}
{{end}} {{if .Roles}}

Use the role names from this list in the CSV roles column.

{{range .Roles}} {{end}}
ID Name Description Global
{{.ID}} {{.Name}} {{.Description}} {{if .Global}}Yes{{else}}No{{end}}
{{end}} {{if .ImportSummary}}

Processed file: {{.ImportSummary.ProcessedFilename}} at {{.ImportSummary.ProcessedAt.Format "2006-01-02 15:04 MST"}}.

{{end}} {{if .ImportResults}}
{{range .ImportResults}} {{end}}
Row Username Email User Result Role Assignments Processing Time
{{.Row}} {{.Username}} {{.Email}} {{if .Error}}
{{.Error}}
{{else if .Created}} Created (#{{.UserID}}) {{else}} Skipped {{end}}
{{if .RoleAssignments}}
    {{range .RoleAssignments}}
  • {{if .Success}}✅{{else}}⚠️{{end}} {{if .Role}}{{.Role}} ({{.RoleID}}){{else}}{{.Token}}{{end}} — {{.Message}}
  • {{end}}
{{else if .Error}} — {{else}} No roles provided {{end}}
{{.ProcessingTime}}
{{end}}
{{end}}