redz1029
e0dd3f6368
feat(db): day sheet RPCs, auto-submit cron, digest queue
...
Add submit_day_sheet, disapprove_day_sheet, justify_day_sheet,
approve_day_sheets (all SECURITY DEFINER, grant to authenticated)
and auto_submit_day_sheets (revoked from all client roles).
auto_submit_day_sheets:
1. Reopens approved yesterday sheets for programmers whose timer
was still running at end of day (amended event).
2. Auto-promotes stale draft sheets to pending (auto_submitted event).
3. Inserts day_sheet_digest notifications + scheduled_notifications
(epoch=YYYYMMDD, ON CONFLICT DO NOTHING) for every admin.
Extends chk_at_least_one_ref on scheduled_notifications to allow
notify_type = 'day_sheet_digest' rows with no FK reference.
Registers pg_cron job 'programmer_day_sheet_autosubmit' at 16:05 UTC
(00:05 Asia/Manila) in a DO $$ EXCEPTION block.
Co-Authored-By: claude-flow <ruv@ruv.net >
2026-09-28 13:31:26 +08:00
..
2026-02-21 15:44:12 +08:00
2026-03-21 12:58:38 +08:00
2026-03-21 12:58:38 +08:00
2026-03-22 18:00:10 +08:00
2026-02-18 18:13:10 +08:00
2026-02-18 18:13:10 +08:00
2026-02-18 18:13:10 +08:00
2026-02-18 23:14:50 +08:00
2026-02-21 08:31:20 +08:00
2026-02-21 08:31:20 +08:00
2026-02-21 08:31:20 +08:00
2026-02-21 08:31:20 +08:00
2026-02-21 14:33:22 +08:00
2026-02-21 14:33:22 +08:00
2026-02-21 14:33:22 +08:00
2026-02-21 21:37:36 +08:00
2026-02-21 21:37:36 +08:00
2026-02-21 21:37:36 +08:00
2026-02-21 21:57:31 +08:00
2026-02-23 18:26:25 +08:00
2026-02-24 21:06:46 +08:00
2026-02-24 21:06:46 +08:00
2026-02-24 21:06:46 +08:00
2026-02-24 21:06:46 +08:00
2026-02-24 21:06:46 +08:00
2026-03-01 19:12:13 +08:00
2026-02-28 16:19:08 +08:00
2026-02-28 16:19:08 +08:00
2026-02-28 16:19:08 +08:00
2026-03-01 18:51:53 +08:00
2026-03-01 18:51:53 +08:00
2026-03-01 19:12:13 +08:00
2026-03-01 19:12:13 +08:00
2026-03-01 18:51:53 +08:00
2026-03-01 18:51:53 +08:00
2026-03-01 18:51:53 +08:00
2026-03-03 18:15:45 +08:00
2026-03-04 07:12:00 +08:00
2026-03-08 16:58:05 +08:00
2026-03-08 16:58:05 +08:00
2026-03-08 16:58:05 +08:00
2026-03-08 16:58:05 +08:00
2026-03-08 16:58:05 +08:00
2026-03-08 16:58:05 +08:00
2026-03-08 16:58:05 +08:00
2026-03-08 16:58:05 +08:00
2026-03-08 16:58:05 +08:00
2026-03-08 16:58:05 +08:00
2026-03-08 16:58:05 +08:00
2026-03-08 16:58:05 +08:00
2026-03-08 16:58:05 +08:00
2026-03-08 16:58:05 +08:00
2026-03-08 16:58:05 +08:00
2026-03-08 16:58:05 +08:00
2026-03-08 16:58:05 +08:00
2026-03-08 16:58:05 +08:00
2026-03-08 16:58:05 +08:00
2026-03-08 17:32:13 +08:00
2026-03-08 18:45:31 +08:00
2026-03-08 18:45:31 +08:00
2026-03-09 17:52:55 +08:00
2026-03-09 13:37:25 +08:00
2026-03-09 18:24:16 +08:00
2026-03-15 19:24:34 +08:00
2026-03-15 19:24:34 +08:00
2026-03-15 19:24:34 +08:00
2026-03-15 19:24:34 +08:00
2026-03-15 19:24:34 +08:00
2026-03-15 19:24:34 +08:00
2026-03-15 22:37:42 +08:00
2026-03-16 07:23:20 +08:00
2026-03-16 07:23:20 +08:00
2026-03-16 07:23:20 +08:00
2026-03-17 07:20:24 +08:00
2026-03-17 07:20:24 +08:00
2026-03-17 07:20:24 +08:00
2026-03-18 16:51:34 +08:00
2026-03-18 16:51:34 +08:00
2026-03-21 18:51:04 +08:00
2026-03-21 18:51:04 +08:00
2026-03-21 18:51:04 +08:00
2026-03-21 18:51:04 +08:00
2026-03-21 18:51:04 +08:00
2026-03-22 11:52:25 +08:00
2026-03-22 11:52:25 +08:00
2026-03-22 11:52:25 +08:00
2026-03-22 11:52:25 +08:00
2026-03-22 11:52:25 +08:00
2026-03-22 11:52:25 +08:00
2026-03-22 18:00:10 +08:00
2026-03-22 18:00:10 +08:00
2026-04-27 06:20:39 +08:00
2026-04-27 06:20:39 +08:00
2026-04-27 06:20:39 +08:00
2026-05-21 06:29:37 +08:00
2026-05-21 06:29:37 +08:00
2026-05-21 06:29:14 +08:00
2026-06-04 11:28:55 +08:00
2026-06-05 10:34:26 +08:00
2026-06-05 16:42:56 +08:00
2026-09-26 11:52:16 +08:00
2026-09-26 11:52:16 +08:00
2026-09-26 11:52:16 +08:00
2026-09-26 11:52:16 +08:00
2026-09-26 11:52:16 +08:00
2026-09-27 01:13:33 +08:00
2026-09-27 16:06:26 +08:00
2026-09-27 16:06:26 +08:00
2026-09-27 22:51:41 +08:00
2026-09-28 13:31:26 +08:00