feat(profile): preset date/time format picker + central formatter (frontend) #118

Merged
YousifShkara merged 1 commit from feat/pms-253-date-format-preference-frontend into main 2026-06-12 08:31:31 +02:00
Owner

Second half of PMS-253. Lands the consumer side of the per-user date/time format preference on the SPA: AuthContext now carries date_format_string, the Profile page renders a "Date & time format" Select with eight presets right next to the timezone dropdown, and the central crate::utils::datetime::format_user_datetime helper expands a moment-style token grammar (YYYY, MMM, DD, HH, mm, A, a.m., ...) against the user's stored format. A Custom... button sits below the dropdown, disabled with an inline "lands in a follow-up PR (PMS-254)" note, so the surface is in place for slice 2 to plug in.

Initial migration covers the high-visibility sites called out in the issue: the notification bell (format_local_datetime in components/layout.rs), the audit log table, ticket SLA + activity timestamps, asset history, and the multi-tenant admin "created" column. Each fall back to the existing strftime when the user has no pref so existing users see no change.

Helper ships with 9 unit tests covering every token group, ordinal day, AM/PM variants, 12h roll-over, literal punctuation pass-through, and a preset-table sanity check.

#PMS-253

Second half of PMS-253. Lands the consumer side of the per-user date/time format preference on the SPA: AuthContext now carries `date_format_string`, the Profile page renders a "Date & time format" Select with eight presets right next to the timezone dropdown, and the central `crate::utils::datetime::format_user_datetime` helper expands a moment-style token grammar (YYYY, MMM, DD, HH, mm, A, a.m., ...) against the user's stored format. A Custom... button sits below the dropdown, disabled with an inline "lands in a follow-up PR (PMS-254)" note, so the surface is in place for slice 2 to plug in. Initial migration covers the high-visibility sites called out in the issue: the notification bell (`format_local_datetime` in `components/layout.rs`), the audit log table, ticket SLA + activity timestamps, asset history, and the multi-tenant admin "created" column. Each fall back to the existing strftime when the user has no pref so existing users see no change. Helper ships with 9 unit tests covering every token group, ordinal day, AM/PM variants, 12h roll-over, literal punctuation pass-through, and a preset-table sanity check. #PMS-253
feat(profile): preset date/time format picker + central formatter (frontend)
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
Check / clippy + fmt + tests (pull_request) Successful in 1m8s
24df1bccb6
Second half of PMS-253. Lands the consumer side of the per-user date/time format preference on the SPA: AuthContext now carries `date_format_string`, the Profile page renders a "Date & time format" Select with eight presets right next to the timezone dropdown, and the central `crate::utils::datetime::format_user_datetime` helper expands a moment-style token grammar (YYYY, MMM, DD, HH, mm, A, a.m., ...) against the user's stored format. A Custom... button sits below the dropdown, disabled with an inline "lands in a follow-up PR (PMS-254)" note, so the surface is in place for slice 2 to plug in.

Initial migration covers the high-visibility sites called out in the issue: the notification bell (`format_local_datetime` in `components/layout.rs`), the audit log table, ticket SLA + activity timestamps, asset history, and the multi-tenant admin "created" column. Each fall back to the existing strftime when the user has no pref so existing users see no change.

Helper ships with 9 unit tests covering every token group, ordinal day, AM/PM variants, 12h roll-over, literal punctuation pass-through, and a preset-table sanity check.

#PMS-253
YousifShkara deleted branch feat/pms-253-date-format-preference-frontend 2026-06-12 08:31:31 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
psa-systems/mokosh-apps!118
No description provided.