ThreadCount Community edition

Uniform stock management for healthcare linen rooms: the coordinator app, the phone counter and the staff app, for your own server. Built from d947f89 on 2026-09-15. Licensed under the Functional Source License (FSL-1.1-ALv2).
This commit is contained in:
ThreadCount
2026-09-15 18:27:45 +10:00
commit 7d650e4c10
298 changed files with 45868 additions and 0 deletions
@@ -0,0 +1,16 @@
-- Give the slips already in people's hands a printing date.
--
-- Staff.activateCodeAt was added for an expiry rule that was then never wired up: nothing wrote the
-- column and nothing read it. Now that the activation route refuses a slip printed more than
-- fourteen days ago, a row holding a code with no date reads as printed at the epoch, so every slip
-- outstanding on the day of the deploy would be refused as expired -- telling a nurse to go and ask
-- for a new one for a slip she was handed yesterday.
--
-- Stamping them now starts their fortnight from this deploy rather than from whenever they were
-- really printed. That is deliberately generous: these codes were valid a moment ago, and the only
-- alternative is silently killing every one of them. Rows whose code has already been spent or
-- cancelled carry a null activateCode and are left alone.
UPDATE "Staff"
SET "activateCodeAt" = now()
WHERE "activateCode" IS NOT NULL
AND "activateCodeAt" IS NULL;