You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build the same way demos/crm.prg and demos/INVENTORY.prg are built: single menu-driven .prg, multiple work areas + SET RELATION, seeded on first run, README/CLAUDE.md entries, matching Playwright spec (tests/overtime.spec.ts, mirroring tests/crm.spec.ts / tests/inventory.spec.ts).
This is the showcase app for #43 (TIME type), #44 (WEEK()), and #45 (grid validation) — depends on all three landing first, so the demo has nothing to work around.
LEAVETAKEN — EMPID, LDATE (DATE), HOURS (NUM, quarter-hour increments, validated in the add-leave form), NOTES
Standard hours = sum of the employee's SCHEDULEDAYS durations (not a flat 40 — schedules vary per employee).
Overtime balance = SUM(WEEKSUMMARY.OVERTIME FOR EMPID==x) - SUM(LEAVETAKEN.HOURS FOR EMPID==x), computed live with SUM ... FOR ... TO var (see crm.prg's pipeline summary) — no mutable running-balance field.
Open/Prep Week — prompt employee + Monday date, WEEK() shows week number, auto-create the week's 5 TIMESHEET rows pre-filled from SCHEDULEDAYS if missing, then BROWSE for direct editing
Recalculate Week — GO TOP / DO WHILE .NOT. EOF() / SKIP over TIMESHEET, compute WORKEDHOURS = (TIMEOUT-TIMEIN) - (BEND-BSTART), sum for the week, compute STANDARDHOURS, upsert WEEKSUMMARY
Register Leave Taken (date + hours, quarter-hour only)
Overtime Balance (per employee)
Weekly/Overtime Report — REPORT FORM, group by employee, subtotals, grand total (new report def under demos/reports/, same shape as dealsbystage.json / lowstock.json)
Export CSV (COPY TO)
Browse tables (read-only tour)
Q. Quit
Branch
feature/<name> off release/v1.2.0, PR targets release/v1.2.0. Blocked on #43, #44, #45.
Definition of done
Per CLAUDE.md → Definition of done in full: tests green (vitest + playwright), version/changelog/README/CLAUDE.md updated, screenshots retaken if UI changed, Assistant parity (demo launcher entry, matching crm/inventory).
Scope
Build the same way
demos/crm.prganddemos/INVENTORY.prgare built: single menu-driven.prg, multiple work areas +SET RELATION, seeded on first run, README/CLAUDE.md entries, matching Playwright spec (tests/overtime.spec.ts, mirroringtests/crm.spec.ts/tests/inventory.spec.ts).This is the showcase app for #43 (TIME type), #44 (WEEK()), and #45 (grid validation) — depends on all three landing first, so the demo has nothing to work around.
Data model (
USE DATABASE OVERTIME)EMPLOYEES— EMPID, NAME, SCHEDIDSCHEDULEDAYS— SCHEDID, DOW (1-5), TIMEIN, BSTART, BEND, TIMEOUT (allTIME(15)), 5 rows/scheduleTIMESHEET— EMPID, WEEKDATE (Monday), DOW, WORKDATE, TIMEIN, BSTART, BEND, TIMEOUT (TIME(15)), WORKEDHOURS (NUM, computed/stored)WEEKSUMMARY— EMPID, WEEKDATE, WEEKNO (fromWEEK()), WORKEDHOURS, STANDARDHOURS, OVERTIME — upserted per recalculationLEAVETAKEN— EMPID, LDATE (DATE), HOURS (NUM, quarter-hour increments, validated in the add-leave form), NOTESStandard hours = sum of the employee's
SCHEDULEDAYSdurations (not a flat 40 — schedules vary per employee).Overtime balance =
SUM(WEEKSUMMARY.OVERTIME FOR EMPID==x) - SUM(LEAVETAKEN.HOURS FOR EMPID==x), computed live withSUM ... FOR ... TO var(seecrm.prg's pipeline summary) — no mutable running-balance field.Menu
SCHEDULEDAYS, exercises BROWSE per-cell validation hook #45's TIME(15) grid validation)WEEK()shows week number, auto-create the week's 5TIMESHEETrows pre-filled fromSCHEDULEDAYSif missing, thenBROWSEfor direct editingGO TOP/DO WHILE .NOT. EOF()/SKIPoverTIMESHEET, computeWORKEDHOURS = (TIMEOUT-TIMEIN) - (BEND-BSTART), sum for the week, computeSTANDARDHOURS, upsertWEEKSUMMARYREPORT FORM, group by employee, subtotals, grand total (new report def underdemos/reports/, same shape asdealsbystage.json/lowstock.json)COPY TO)Q. Quit
Branch
feature/<name>offrelease/v1.2.0, PR targetsrelease/v1.2.0. Blocked on #43, #44, #45.Definition of done
Per
CLAUDE.md→ Definition of done in full: tests green (vitest + playwright), version/changelog/README/CLAUDE.md updated, screenshots retaken if UI changed, Assistant parity (demo launcher entry, matching crm/inventory).