Report an issue hereooptify community
Dispensing
Add Safety checkbox and carry flag through supplier orders
Enable dispensers to mark a job as "Safety" using a checkbox during dispensing. The Safety flag must remain clearly marked throughout the job's logistical order workflow, including the orders for the lens lab and frame suppliers. Acceptance criteria: - A dispenser can mark a job as "Safety" using a checkbox during dispensing. - The job retains its Safety designation throughout the logistical order path. - The Safety designation is clearly visible in the relevant order information for both the lens lab and frame suppliers.
Separate dispensing purchases and invoices
Deployed to dev on 9 November 2026 after Calvin explicitly approved the two reviewed migrations and dev rollout. At that point the feature awaited Calvin's authenticated acceptance and was not yet released to main or production. Dev: https://dev.ooptify.com Exact remote dev commit: 869aa0e49a46aac53615581b480cb4d2d4a4eacb Verified READY deployment: dpl_3z3Z5KMidusr65rat6QEiSGutfte Deployment: https://vercel.com/karubi02s-projects/ooptify/3z3Z5KMidusr65rat6QEiSGutfte Feature branch: https://github.com/karubi02/ooptify/tree/fix/separate-dispensing-purchases (b99e8d7378e750e655dbadeadf8d511409fe6c01) Existing engineering owner: 01a1ac01-7ff4-747b-b196-ad5e3e9dc03c; completed rollout turn 01a1bdf8-743a-702d-b15b-4e7f54b5fd90. Do not duplicate dispatch. Delivered behaviour: - Explicit New purchase versus Edit existing when resuming an earlier dispensing session, preserving the earlier purchase/order, invoice lines and stock history. - Durable purchase identity and invoice choice without copying already-billed service charges. - Recovery after reload, lost browser storage/responses, repeat requests and concurrent tabs. Atomic edits guard against stale versions and existing invoice/order restrictions. - Legacy billed-source protection, standalone invoice choice, Orders/cancellation/refund/stock compatibility and consultation reporting attribution. Approved dev database rollout: Target ooptify_dev, fowypkrbfosasvwkbsle. Source migrations applied in order: 1. 20261105153326_separate_dispensing_purchase_drafts.sql, recorded as 20261109014256 / separate_dispensing_purchase_drafts. 2. 20261105154636_atomic_dispensing_purchase_edit.sql, recorded as 20261109014331 / atomic_dispensing_purchase_edit. Independent readback confirmed both new tables have RLS and deny anon/authenticated SELECT; the three purchase RPCs deny anon/authenticated execution and allow service_role. The identity guard is enabled, with direct execution revoked. Receipt and sequence row counts were both zero after rollout: no test purchases were created. Existing invoice and stock data were not rewritten. Verification: - 45 focused tests, 317 invoice tests, 40 isolated PostgreSQL/PostgREST checks, TypeScript, inventory checks and synthetic Chromium flows passed. Browser tests used mocked application APIs. - Local offline build passed with a temporary substitute font because Google Fonts was unreachable. The actual hosted build passed, both Vercel status checks passed, and canonical dev alias plus remote commit were independently verified. - A live HTTP smoke attempt was blocked by the executor's outbound proxy before it reached the site. Authenticated live acceptance has not been completed. Acceptance on dev with dummy data: Start a separate purchase from an already billed dispensing session, verify the earlier invoice/order/stock lines are unchanged, choose a new or existing invoice, then check explicit edit, reload/retry recovery and Orders/reporting attribution. Do not use or repair the affected production test invoice as part of this test. Safety and rollback: At the time of the dev rollout, main and production were unchanged. The dev push automatically generated a noncanonical training preview; canonical training and its database were unchanged. No email was sent, no held messages or queue jobs were replayed. If rolling back after test purchases exist, retain receipt/sequence records while reverting application code. Keep private/internal and unpublished. Awaiting Testing records remaining authenticated acceptance. Do not mark Resolved/Rejected or trigger closure emails without approval. Production update (9 November 2026): Calvin accepted the combined purchase and quote changes and authorized release. The selective main commit 7cc0349c3cf4fffefb51a4d02c492d49719d2083 is READY at app.ooptify.com on deployment dpl_4xahFTvcbFAxZnis6ZE4J46UWGpN. Production ooptify_production received separate_dispensing_purchase_drafts (20261109102004) and atomic_dispensing_purchase_edit (20261109105344); server-only grants and identity guard were verified, with no existing invoice or stock data rewritten. 145 focused tests, 39 isolated PostgreSQL checks, TypeScript and mocked browser tests passed. Authenticated production smoke remains unverified because outbound proxy access was denied. The automatic training production build was canceled; its existing alias remained unchanged.