Skip to content

Demos adopt lookups: SCHEDULES table, two-form Add Employee, CRM stage list #61

Description

@DDecoene

Part of the v1.3.0 lookup feature. Design: docs/superpowers/specs/2026-07-10-lookup-columns-design.md (on release/v1.3.0). Depends on the other three lookup issues.

The motivating papercut: Add Employee in demos/overtime.prg makes you type a schedule id from memory.

Scope

  • overtime.prg: new SCHEDULES (SCHEDID CHAR(4), DESCR CHAR(30)) seeded with the three shifts (SCHEDULEDAYS is per-(SCHEDID, DOW) — a description there would repeat five times per schedule)
  • EMPLOYEES.SCHEDID declares LOOKUP SCHEDULES.SCHEDID DISPLAY DESCR
  • Add Employee becomes check-first, two forms: id as memvar GET, then SEEK; if new, SET INDEX TO (natural order) then APPEND RECORD, REPLACE EMPID, field-bound READ for NAME + SCHEDID. (A RECNO()/GO rollback is unsound under an active index — rowPtr is index-order position and writing the key moves the record.)
  • crm.prg: STAGE CHAR(12) LOOKUP ("Lead","Qualified","Proposal","Won","Lost") — the seeded vocabulary verbatim (membership is case-sensitive; the pipeline SUMs compare STAGE == "Won")
  • tests/DemoSchemas.test.ts: add the SCHEDULES golden (EMPLOYEES unchanged — the qualifier is metadata, not a column)
  • tests/overtime.spec.ts updated, not just extended: the Add-Employee flow it drives changes shape

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions