fix(web): profile modal always displayed UTC — Timezone never mapped

The admin profile-modal route hand-rolled its templates.User without
the Timezone field, so every selected?={ user.Timezone == … } in the
timezone select was false and the first option (UTC) rendered selected
for every user on every open. Saves worked fine — the modal just never
displayed what was stored, which read as 'not saving'. The route's
GetUser query already returns the column; it just wasn't mapped.
Verified end-to-end in the emulator browser: modal opens showing the
stored zone, save → HX-Refresh → reopen shows the new zone.
This commit is contained in:
John O'Keefe committed 2026-10-13 15:05:40 -04:00
1 parent 2a6e4b9ae5
commit dc353b0f3f
1 file changed
+3
+3
View File
@@ -1254,6 +1254,9 @@ func registerFrontendRoutes(cfg *Config) {
FirstName: getText(targetUser.FirstName),
LastName: getText(targetUser.LastName),
CreatedAt: targetUser.CreatedAt.Time,
// Without this the timezone select rendered UTC selected for
// EVERY user — saves landed, the modal just never showed them.
Timezone: getText(targetUser.Timezone),
}
// Render modal