You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sims-hq/apps/hq/test
Thomas Joise 4c1514c315 fix(milestones): stamp installed_on/trained_on on every tick, keep links on a re-tick
Two bugs in the same tick path.

1. installed_on / trained_on were written only as a side effect of a status
   UPGRADE. The ~300 APEX-imported projects are already at 'live' -- the furthest
   status -- so ticking Installation or Training upgraded nothing and therefore
   recorded nothing, and the UI's own date writers were removed in the Client
   Detail redesign, leaving those columns unfillable and the Module Directory's
   "Installed" column blank forever. The date is now stamped whenever the step is
   ticked, independent of any status move: same transaction, same audit payload,
   still write-once (an existing date is never overwritten) and still no downgrade.
   A tick that changes neither status nor a date now writes nothing at all.

2. setMilestone wrote payment_id/document_id as `done ? linked : null`, so any tick
   that did not resend the ids cleared them. bulkSetMilestone routes through it and
   never passes ids (one key, many projects), so a single bulk re-tick silently cut
   every project's step loose from the payment or quotation it had been linked to.
   An already-done step now keeps the link it carries when nothing is supplied.
   An explicit empty id is still an unlink, and unticking still clears both.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 day ago
..
fixtures feat(hq): seed + apex csv importer with verification and series seeding (HQ-1 task 13) 2 weeks ago
amc.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
audit-viewer.test.ts feat(d27): #8 audit-log viewer (owner-only) 3 days ago
auth.test.ts chore: remove all 'Tecnostac' references — everything is SiMS 2 days ago
authz-gates.test.ts fix(sec/d24): gate destructive/sensitive ops to managerial 4 days ago
aws-costs.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
aws-pull-route.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
aws-repo.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
bounces.test.ts chore: remove all 'Tecnostac' references — everything is SiMS 2 days ago
bulk-sms-purchase.test.ts feat(sms): bulk SMS purchase proforma + document source tagging (renewal vs top-up) 2 days ago
client-modules.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
client-owner.test.ts chore: remove all 'Tecnostac' references — everything is SiMS 2 days ago
client-support.test.ts feat(d31): store credentials in the clear (owner decision) + one-time migration 3 days ago
clients.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
concurrency.test.ts fix(sec/d24): concurrency + workflow isolation 4 days ago
convert-and-send.test.ts chore: remove all 'Tecnostac' references — everything is SiMS 2 days ago
dashboard.test.ts chore: remove all 'Tecnostac' references — everything is SiMS 2 days ago
db-resolve.test.ts fix(scripts): document the DATABASE_URL-prefixed invocation, make SQLite an explicit opt-in 1 day ago
db.test.ts fix(onboarding): APEX-imported projects were invisible on the stalled tile 1 day ago
documents-page.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
documents.test.ts feat(docs): require a reason when cancelling a document 2 days ago
due-dates.test.ts chore: remove all 'Tecnostac' references — everything is SiMS 2 days ago
e2e.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
employees-routes.test.ts fix(sec/d24): auth hardening — login lockout, rate limits, constant-time, trust proxy 4 days ago
employees.test.ts chore: remove all 'Tecnostac' references — everything is SiMS 2 days ago
functional-d26.test.ts fix(milestones): fresh projects false-flagged as stalled, fallback modules stuck at quoted, bulk ops skipped status/link logic (FIX D, E, F) 1 day ago
gmail-connect.test.ts feat(hq): one-time gmail oauth connect script (HQ-1 task 12) 2 weeks ago
gmail.test.ts feat(hq): gmail send with token-death handling and email log (HQ-1 task 11) 2 weeks ago
health.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
hq2-schema.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
hq3-schema.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
import-apex-full.test.ts fix(onboarding): APEX-imported projects were invisible on the stalled tile 1 day ago
import-routes.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
import.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
interactions.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
isolation.test.ts feat(hq): HQ-1.5 — module quote content, pack pick-lists, bundle isolation check 2 weeks ago
ledger-outstanding.test.ts fix(payments): exclude draft proformas from outstanding (owner decision) 2 days ago
migrate-onboarding-templates.test.ts fix(onboarding-migration): idempotency check must ignore ad-hoc custom_* rows 1 day ago
migrate-plaintext.test.ts feat(d32): remove the key concept entirely + keyless legacy cleanup 3 days ago
milestone-document.test.ts feat(client-detail): quotation-step document link + ticket classification (backend) 1 day ago
milestone-link-preservation.test.ts fix(milestones): stamp installed_on/trained_on on every tick, keep links on a re-tick 1 day ago
milestone-payment.test.ts feat(onboarding): composed milestone templates (shared front + per-module tail) 2 days ago
milestone-status.test.ts fix(milestones): stamp installed_on/trained_on on every tick, keep links on a re-tick 1 day ago
milestones-templates.test.ts feat(onboarding): composed milestone templates (shared front + per-module tail) 2 days ago
milestones.test.ts fix(milestones): reject front/tail key collisions; dedupe on collision; stamp installed/trained dates 1 day ago
mis.test.ts feat(d27): #5 owner MIS cockpit 3 days ago
module-access.test.ts test(d28): lock module directory + portals (fieldSpec, login-only, no secret leak) 3 days ago
module-fields.test.ts feat(d31): store credentials in the clear (owner decision) + one-time migration 3 days ago
module-roster.test.ts chore: remove all 'Tecnostac' references — everything is SiMS 2 days ago
modules.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
money-guards.test.ts fix(sec/d24): money-integrity guards — CN cap, atomic doc-no, qty, TDS, markStatus 4 days ago
onboarding-template-routes.test.ts fix(milestones): reject front/tail key collisions; dedupe on collision; stamp installed/trained dates 1 day ago
payments.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
pdf-download.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
pg-engine.test.ts feat(db): D19 P4 — DATABASE_URL engine selection + Postgres integration suite 4 days ago
pipeline.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
prepare-draft.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
preview-fidelity.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
preview-route.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
preview-sample.test.ts chore: remove all 'Tecnostac' references — everything is SiMS 2 days ago
profile-me.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
projects-stalled-route.test.ts fix(onboarding): APEX-imported projects were invisible on the stalled tile 1 day ago
public-share.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
quote-followup.test.ts feat(docs): require a reason when cancelling a document 2 days ago
receipt.test.ts chore: remove all 'Tecnostac' references — everything is SiMS 2 days ago
recurring.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
reminder-preview.test.ts chore: remove all 'Tecnostac' references — everything is SiMS 2 days ago
reminder-schedule.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
reminders-page.test.ts chore: remove all 'Tecnostac' references — everything is SiMS 2 days ago
reminders.test.ts chore: remove all 'Tecnostac' references — everything is SiMS 2 days ago
renewals.test.ts feat(d27): #1 renewals command center + one-click module renewal quote (backend) 3 days ago
reports.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
scheduler-recurring.test.ts chore: remove all 'Tecnostac' references — everything is SiMS 2 days ago
scheduler-scan.test.ts chore: remove all 'Tecnostac' references — everything is SiMS 2 days ago
seed-templates.test.ts feat(onboarding): composed milestone templates (shared front + per-module tail) 2 days ago
send-reminder.test.ts chore: remove all 'Tecnostac' references — everything is SiMS 2 days ago
series.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
settings-company.test.ts chore: remove all 'Tecnostac' references — everything is SiMS 2 days ago
settings-reminders.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
settings-sharing.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
settings-template.test.ts chore: remove all 'Tecnostac' references — everything is SiMS 2 days ago
shares.test.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
sms-balances.test.ts feat(sms): live-only balance list, no full-row red, mandatory creds on assign 2 days ago
sms-gateway.test.ts harden(d28): SSRF guard + no credential-URL leak on SMS gateway fetch 3 days ago
sms-rate-card.test.ts feat(d23): SMS volume-band billing (dated rate card, money locked) 4 days ago
stalled-onboarding.test.ts fix(onboarding): APEX-imported projects were invisible on the stalled tile 1 day ago
template-accent.test.ts chore: remove all 'Tecnostac' references — everything is SiMS 2 days ago
template-render.test.ts chore: remove all 'Tecnostac' references — everything is SiMS 2 days ago
templates.test.ts chore: remove all 'Tecnostac' references — everything is SiMS 2 days ago
ticket-sla.test.ts feat(d28): #3 ticket desk — SLA aging + overdue filter + bill-from-ticket 3 days ago
ticket-types.test.ts feat(client-detail): quotation-step document link + ticket classification (backend) 1 day ago
tickets.test.ts feat(d31): store credentials in the clear (owner decision) + one-time migration 3 days ago