184 Commits

Author SHA1 Message Date
b81a671350 improvements: the whole branch reviewed. some tests added. some cleraning done. 2026-10-23 22:33:10 +03:30
178b2bc7e0 improvements: Currency convertion api added for subscriptions calculation 2026-10-23 21:19:12 +03:30
7049b17882 improvements: gapGPT keys and apis used instead of openrouter instead. 2026-10-23 20:28:03 +03:30
0a405bba7f Merge branch 'master' into improvements/subscription-V2 2026-10-22 03:26:20 +03:30
925b4776e1 improvements: currency selection method fixed. debit/credit fotter added for searched transactions. staff payment is now possible. 2026-10-22 03:05:38 +03:30
df9ca401e2 improvements: browsing exocad's db ui flow bug fixed so that user can choose another file if the first file is invalid. exocad's material data insertion updated based on real data 2026-10-21 19:42:51 +03:30
98281e764f improvements: prosthesis pipelines leftover data dropped. 2026-10-21 17:42:13 +03:30
a398cb66e7 improvements: subsription v2 first implementation. 2026-10-19 18:40:11 +03:30
247d2f863d Merge branch 'master' into improvements/billing-V2 2026-10-19 03:03:44 +03:30
6972b9eaff improvements: milling and sintering unified. Price calculation added to billing both for clinic sent and outsourced cases. pament confirmation added to billing flows. 2026-10-16 16:16:42 +03:30
c8da77dbf2 Count started own lab cases on the dashboard and fit the gadgets to the screen.
Lab numbers now follow the same cases as Cases and Tasks: a case the lab started itself is included, and a step already handed to another lab is not. Day labels stay inside the charts, the grid follows the dashboard width, and the progress rings share one thin stroke.
2026-10-16 02:52:46 +03:30
1e4fcfd27f improvements: Dry milling and sintering unified. stain and glaze unified. model design and model creation (of case level steps) now can be outsourced. 2026-10-14 16:31:03 +03:30
e17d08dbe0 improvment: tab change terminating unfinished attachments uploads fixed. 2026-10-10 03:44:51 +03:30
3cb579eaac improvment: code reviewd. some bugs when removing an attachment fixed. 2026-10-10 02:28:06 +03:30
f465523991 improvment: voice feature re-introduced in cases. remove option added for case attachments. counter badges added to cases tabs. 2026-10-10 01:57:35 +03:30
f9eddb4275 improvment: progression bar added to cases attachment card. upload size restrictions removed. 2026-10-10 00:59:29 +03:30
a690070127 Confirm new accounts and invites with an emailed code before they can sign in.
Existing users stay verified. Password reset can use email as well as SMS.
2026-10-08 19:22:02 +03:30
69e99c7713 improvment: code reviewd. docs and skills updated. 2026-10-06 18:25:29 +03:30
39e352a9f9 improvment: tasks UI updated based on new cases changes. 2026-10-06 18:01:20 +03:30
0278a1859c improvment: Cases flow splited into three tabs - details, files and messages. buggy functions fixed in cases. pdf layout improved. 2026-10-06 16:50:36 +03:30
f59951ef97 improvment: Case sheets now show comments. wet milling removed from PFM crown workflow pipeline. 2026-10-02 19:54:31 +03:30
686297000d improvment: Lab case outsourcing UX improved. 2026-10-02 03:01:33 +03:30
277edf9e75 improvment: case QrCodes now updates after editing a case. 2026-10-02 01:52:25 +03:30
9b3918e861 improvment: Task generation process updated. Cases and Tasks feature updated accordingly. 2026-10-02 01:00:23 +03:30
a305293404 improvment: Lab case outsourcing v1 implemented. 2026-10-01 01:51:54 +03:30
ca488cb602 improvement: generating tasks and their related steps improved. 2026-09-25 23:11:04 +03:30
c3d6581d2a fix(cases): tell an edit denial from an access denial
assertCanEditCases checks TAB_CASES_EDIT but threw PERMISSION_ACCESS_CASES —
"you do not have access to cases" — at a member who holds TAB_CASES_READ and can
open and read every case. It sent them to the wrong setting. Nine call sites:
start, delete, assign, external code, important flag and the rest.

assertCanReadCases (:1378) keeps PERMISSION_ACCESS_CASES, which is accurate
there, and so do both lab-case-activity.service.ts sites — those check READ.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-21 13:01:49 +08:00
5565dba604 feat(errors): add PERMISSION_EDIT_CASES and use it for the lab voice denial
Cases was the one feature with no edit-specific error code, so cases.service.ts
throws PERMISSION_ACCESS_CASES for a failed read check (:1375) and for a failed
edit check (:1391) alike. The lab voice branch checks TAB_CASES_EDIT, so reusing
it told a member holding TAB_CASES_READ "you do not have access to cases" — false,
and it points them at the wrong setting.

All three layers: the code in error-codes.ts, the throw in assertCanDictate, and
errors.PERMISSION_EDIT_CASES in en, fa and nl.

The two voice.service.spec cases asserting the old code failed on the change and
were updated — they are the guard that caught it.

cases.service.ts:1391 has the same mismatch and is left alone; it is an existing
endpoint's message, not this task's.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-21 13:01:49 +08:00
d557d92669 feat(voice): extend voice extraction to lab case line entry
Adds a lab-mode narrowing of the catalog for voice extraction,
lab case line draft/apply helpers, and a shared review sheet reused
by both treatment and lab case flows.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-21 13:00:45 +08:00
705ea92da7 bugfix: cases critical bugs fixed. 2026-09-21 01:44:55 +03:30
bb04090bc6 Merge branch 'master' into feature/billing 2026-09-19 05:21:25 +03:30
5977990412 improvement: Voice feature tuned with new pontic rules. 2026-09-19 05:12:23 +03:30
b8129bef6c improvement: Pontic rules updated. alongside with other shits! 2026-09-19 04:57:56 +03:30
d52b0e32cb improvement: billing reviewd. note added to financial transactions. 2026-09-18 17:07:36 +03:30
637e4af637 improvement: billing v1 UX finalized. still buggy though. 2026-09-18 16:28:32 +03:30
778f02ee83 improvement: Redundant and unuseful gadgets removed from dashboard. 2026-09-18 13:54:08 +03:30
0b6e6b4563 feature: payment flow updated. 2026-09-18 03:50:48 +03:30
5e1b0cb6eb feature: v1 billing implemented. 2026-09-18 02:12:56 +03:30
63058828f1 Make patient identification the unique identity instead of mobile.
mobile stays required but is no longer globally unique.
2026-09-17 23:25:08 +03:30
da544f18b7 Remove organization email; unique orgs by owner and name 2026-09-17 20:46:32 +03:30
809faa04e8 improvement: Pontic task and step generations updated. Some silent exeptions now actually informs users. 2026-09-16 20:19:12 +03:30
04b338408e improvement: Pontic added to prosthesis types catalog as a main catagory. voice feature updated accordingly. 2026-09-16 15:43:47 +03:30
957f94cf15 Cache npm and Docker bases on the Windows Gitea host for Iran-only builds.
CI installs via local Verdaccio and prefers Gitea copies of node/postgres/nginx so staging and prod can still ship when Docker Hub and npmjs are unreachable.
2026-09-15 12:04:04 +03:30
52923e87d8 fix(ci): rewrite leftover npmmirror URLs so npm ci uses npmjs.com
Lockfiles still pointed at registry.npmmirror.com after switching the
Docker registry, which caused ECONNRESET on victory-vendor during frontend builds.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-14 21:14:38 +03:30
2983061363 shift from mirror to official npm cdn. 2026-09-14 20:33:20 +03:30
ea4d348dc2 fix(ci): install npm packages via npmmirror when npmjs.org is blocked
Staging Docker builds were hanging ~25m then dying with Exit handler never
called because registry.npmjs.org resets TLS from the runner. Point npm ci
at npmmirror (rewrite lockfile tarball hosts for the build only).
2026-09-13 20:24:45 +03:30
e3ff59497f fix(ci): build images on node:20-bookworm-slim instead of Alpine
Alpine npm ci kept dying with Exit handler never called on Docker
Desktop; nested retries only burned hours. Use Debian + a single
cached npm ci, and update the Gitea node image mirror.
2026-09-12 15:34:24 +03:30
e2614bf4b0 fix(ci): retry npm ci in Docker builds when Exit handler never called
Docker Desktop OOM can kill npm mid-install on the Windows staging
runner. Retry npm ci, then fall back to install, and document the
≥8GB RAM requirement.
2026-09-12 11:07:56 +03:30
78fd3eb092 fix(voice): hear "یادداشت" as a note request, and stop the note at the next instruction
Two reports from live dictation in fa.

The locale trigger vocabulary listed only verbs that ask for a note ("بنویس",
"یادداشت کن"). Naming the field itself — "توی یادداشت‌ها بنویس", "در توضیحات" —
reported no commentTrigger, and the resolver discards a comment without one, so
the note was silently dropped. Added the field-name shape to fa, en and nl.

Where the dictated note ends was never stated, so the model answered it
inconsistently: "توی توضیحات بنویس سلام چطوری و بفرست برای لابراتوآر سانشاین"
sometimes put the lab dispatch inside the comment. Added a no-overlap rule — a
clause reported as a lab, tooth, prosthesis or deadline is an instruction and
must not appear in comment as well — with that sentence as a worked example.

Both rules go in the prompt and in the JSON-schema field descriptions, because
the schema description is what the model reads while filling the field. No code
enforcement for the second: stripping an extracted clause out of free-speech
note text by string matching is guesswork, and the review sheet shows the note
before it is saved.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-11 15:49:35 +03:30
b71b4e9ca9 feat(voice): write a note only when the clinician asks for one
The comment instruction told the model to sweep up leftovers: "clinical
notes, in the language spoken. Omit the parts already captured as treatment
type, teeth, prosthesis work or deadline." So filler, small talk and an
unrequested diagnosis all became a persisted clinical note — and comment is
the one durable trace a recording leaves (§10).

The model now reports the exact words that asked for the note in a new
commentTrigger field, and comment holds only what was dictated after them.
resolveVoiceIntent keeps comment only when a trigger is present, so the rule
is enforced by code instead of trusted to the prompt: a model that decides
leftover speech was a note loses that note.

Per-locale trigger vocabulary goes in the prompt's locale notes, beside the
tooth vocabulary — «بنویس که», "write this in the notes", "noteer". The
resolver only checks that a trigger was reported, so it needs no per-locale
knowledge and stays locale-neutral, as §6 requires.

Also adds HARD RULE 7: never decide something is a note; speech that fits no
field is simply not reported.

Four resolver tests. The two that drop an unasked note fail without the
guard; the trigger-only and trigger-with-note cases pass either way and exist
to prove the guard does not swallow a real note.

Frontend untouched — it only ever saw the resolved comment, never the
trigger.

Spec: §5 gains the rule and the field, decision 54 added.

Gates: backend 220 tests, nest build, ESLint clean on the voice module;
frontend tsc --noEmit clean, 52 Vitest tests.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-11 15:49:35 +03:30