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/src
Thomas Joise 9457b0f145 fix(milestones): fresh projects false-flagged as stalled, fallback modules stuck at quoted, bulk ops skipped status/link logic (FIX D, E, F)
FIX D: stalledProjects treated a no-tick project's missing done_on as the
sentinel '0000-00-00', always older than any cutoff, so every
freshly-assigned project immediately showed up on the "Onboarding stalled"
tile. It's now measured against client_module.created_at (stamped by
assignModule); when that's also unknown (predates the column, or an import
path that doesn't stamp it) the project is excluded rather than assumed
ancient.

FIX E: STEP_STATUS only mapped the new template's keys, but TAIL_FALLBACK
(any module with no seeded/owner-configured tail -- WHATSAPP, ATM, AMC, ...)
still uses the legacy 'installed' key, so ticking "Installation done" on
those modules left status at 'quoted' forever. Added installed->installed
to STEP_STATUS (checked: no legacy payment key needs a mapping, since
payment never drove status even in the new vocabulary).

FIX F: bulkSetMilestone did a bare UPDATE, so a bulk go_live never advanced
client_module.status and a bulk untick never cleared a stale
payment_id/document_id link. Each id now routes through setMilestone itself
(same status-advance + link-clearing path a single tick uses), inside the
existing transaction -- nested transaction() calls become savepoints on
both engines, so a project without the milestone key is caught and skipped
without losing "bulk ops only touch projects that have the milestone".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 day ago
..
api.ts fix(api): validate ?days= and guard the onboarding-project routes against a crash (FIX B) 1 day ago
audit.ts feat(d27): #8 audit-log viewer (owner-only) 3 days ago
auth.ts feat(d36): login history (IP + device) + first-login change nudge 2 days ago
aws-costs.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
bounces.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
crypto.ts feat(d32): remove the key concept entirely + keyless legacy cleanup 3 days ago
db-pg.ts fix(deploy): one shared DB-engine resolver so scripts can't silently target a throwaway SQLite file (FIX A) 1 day ago
db.ts fix(deploy): one shared DB-engine resolver so scripts can't silently target a throwaway SQLite file (FIX A) 1 day ago
gmail.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
import-apex-full.ts feat(d21): P4 — importer seeds module field_spec + writes field_values 4 days ago
import-apex.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
migrate-onboarding-templates.ts fix(onboarding-migration): deterministic survivor when two old ticks collapse onto one key (FIX C) 1 day ago
migrate-plaintext.ts feat(d32): remove the key concept entirely + keyless legacy cleanup 3 days ago
migrations-pg.ts fix(deploy): one shared DB-engine resolver so scripts can't silently target a throwaway SQLite file (FIX A) 1 day ago
pdf.ts fix(sec/d24): PDF render hardening — strict CSP + request interception 4 days ago
rate-limit.ts fix(sec/d24): auth hardening — login lockout, rate limits, constant-time, trust proxy 4 days ago
reminder-templates.ts feat(documents): invoice due dates — terms default + override, honest overdue chase (Phase 1, D18) 5 days ago
repos-amc.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
repos-aws.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
repos-branches.ts feat(d20): P1 — ticket desk, client branches, per-service data (schema + repos) 4 days ago
repos-clients.ts feat(d37): society category (Kerala co-op directory taxonomy) on clients 2 days ago
repos-dashboard.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
repos-documents.ts feat(sms): bulk SMS purchase proforma + document source tagging (renewal vs top-up) 2 days ago
repos-email.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
repos-employees.ts feat(d34): import employee master + invited/pending-login flag 2 days ago
repos-interactions.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
repos-login-events.ts feat(d36): login history (IP + device) + first-login change nudge 2 days ago
repos-milestones.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
repos-mis.ts feat(d28): #6 SMS credit review + low-balance upsell 3 days ago
repos-modules.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
repos-payments.ts fix(payments): exclude draft proformas from outstanding (owner decision) 2 days ago
repos-pipeline.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
repos-rate-card.ts feat(d23): SMS volume-band billing (dated rate card, money locked) 4 days ago
repos-recurring.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
repos-reminders.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
repos-renewals.ts feat(sms): bulk SMS purchase proforma + document source tagging (renewal vs top-up) 2 days ago
repos-reports.ts feat(d26): functional gaps — GST summary, doc search, bulk ops (backend) 3 days ago
repos-search.ts feat(d28): Portals quick-list + global search (clients/docs/tickets) 3 days ago
repos-shares.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
repos-sms.ts feat(sms): live-only balance list, no full-row red, mandatory creds on assign 2 days ago
repos-tickets.ts feat(client-detail): quotation-step document link + ticket classification (backend) 1 day ago
scheduler.ts feat(d28): SMS gateway live balance sync (BalAlert API) + daily auto + low alert 3 days ago
seed.ts feat(client-detail): quotation-step document link + ticket classification (backend) 1 day ago
send-reminder.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
series.ts fix(sec/d24): money-integrity guards — CN cap, atomic doc-no, qty, TDS, markStatus 4 days ago
server.ts fix(deploy): one shared DB-engine resolver so scripts can't silently target a throwaway SQLite file (FIX A) 1 day ago
sms-gateway.ts harden(d28): SSRF guard + no credential-URL leak on SMS gateway fetch 3 days ago
templates.ts feat(d37): society category (Kerala co-op directory taxonomy) on clients 2 days ago