Docs consolidation + audit-log timezone fix + PTO-Exhausted sliding scale
Build and Push Docker Image / build (push) Successful in 49s
Build and Push Docker Image / build (push) Successful in 49s
Documentation: - Consolidate 6 doc surfaces to 3. Merge Unraid guide into README and fold durable mobile rules into AGENTS.md; remove README_UNRAID_INSTALL.md, MOBILE_RESPONSIVE.md, and the misplaced "CPAS Violation Tracker.md" vault note. - Fix drift across README/AGENTS/in-app guide: clean-cycle roll-off model (not per-violation 90-day window), auth documented as shipped, dropped active_cpas_scores view, correct table count (8 tables/0 views), auth endpoints + ADMIN_PASSWORD in run commands, roadmap updated. Fixes: - Audit log / amendment timestamps: SQLite CURRENT_TIMESTAMP is UTC with no zone marker; new Date() parsed the space-separated form as local time, shifting entries +5h in Chicago/CDT. Pin the bare form to UTC before formatting in AuditLog.jsx and AmendViolationModal.jsx. - Absence - PTO Exhausted: fixed 5 pts -> sliding scale 1-5. Rebuild client bundle to include the above. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -73,9 +73,13 @@ const s = {
|
||||
},
|
||||
};
|
||||
|
||||
// SQLite CURRENT_TIMESTAMP is UTC as "YYYY-MM-DD HH:MM:SS" with no zone marker;
|
||||
// JS Date() would parse that space-separated form as local time and shift it by
|
||||
// the viewer's UTC offset. Pin the bare SQLite form to UTC before formatting.
|
||||
function fmtDt(iso) {
|
||||
if (!iso) return '—';
|
||||
return new Date(iso).toLocaleString('en-US', { timeZone: 'America/Chicago', dateStyle: 'medium', timeStyle: 'short' });
|
||||
const utc = /^\d{4}-\d\d-\d\d \d\d:\d\d:\d\d$/.test(iso) ? iso.replace(' ', 'T') + 'Z' : iso;
|
||||
return new Date(utc).toLocaleString('en-US', { timeZone: 'America/Chicago', dateStyle: 'medium', timeStyle: 'short' });
|
||||
}
|
||||
|
||||
export default function AmendViolationModal({ violation, onClose, onSaved }) {
|
||||
|
||||
Reference in New Issue
Block a user