Commit Graph

359 Commits

Author SHA1 Message Date
f59951ef97 improvment: Case sheets now show comments. wet milling removed from PFM crown workflow pipeline.
All checks were successful
Production — tag build, push, deploy / build-and-push (push) Successful in 25m13s
Production — tag build, push, deploy / deploy (push) Successful in 14m45s
v1.0.22
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
85ff8988d9 improvment: Persian case sheet layout problems fixed. 2026-10-01 22:26:18 +03:30
a305293404 improvment: Lab case outsourcing v1 implemented. 2026-10-01 01:51:54 +03:30
d3361031e2 improvment: case sheet print layout updated both for landscape and portrait. 2026-10-01 00:01:00 +03:30
39e9d55361 Merge pull request 'improvement: generating tasks and their related steps improved.' (#91) from improvement/pre-release into master
All checks were successful
Registry — build, push, deploy / build-and-push (push) Successful in 7m27s
Registry — build, push, deploy / deploy (push) Successful in 1m27s
Reviewed-on: #91
Reviewed-by: aminmsvi <amn.mousavi@gmail.com>
2026-09-25 23:32:08 +03:30
ca488cb602 improvement: generating tasks and their related steps improved.
All checks were successful
Production — tag build, push, deploy / build-and-push (push) Successful in 5m8s
Production — tag build, push, deploy / deploy (push) Successful in 13m23s
v1.0.21
2026-09-25 23:11:04 +03:30
e70f806ee6 Merge pull request 'fix(tasks): keep case header names readable on mobile' (#90) from bug/responsive-task-header into master
All checks were successful
Registry — build, push, deploy / build-and-push (push) Successful in 19m30s
Registry — build, push, deploy / deploy (push) Successful in 1m9s
Reviewed-on: #90
Reviewed-by: admin <admin@localhost>
2026-09-22 14:13:09 +03:30
26ed5b4512 Merge pull request 'feat/cases/add-voice-input-for-lab-case-line' (#82) from feat/cases/add-voice-input-for-lab-case-line into master
All checks were successful
Registry — build, push, deploy / build-and-push (push) Successful in 7m16s
Registry — build, push, deploy / deploy (push) Successful in 1m42s
Reviewed-on: #82
Reviewed-by: admin <admin@localhost>
2026-09-22 14:12:20 +03:30
93d0baa178 fix(tasks): keep case header names readable on mobile
All checks were successful
Production — tag build, push, deploy / build-and-push (push) Successful in 5m21s
Production — tag build, push, deploy / deploy (push) Successful in 2m5s
v1.0.20
2026-09-22 02:52:42 +03:30
af10e7f1a0 fix(docs): correct link path for voice treatment entry spec 2026-09-21 13:01:49 +08:00
39bfec1d3f docs(voice): one flat spec file, no progress note
Amin's call: specs live at docs/specs/<slug>.md, and the repo does not carry a
progress ledger. The ledger was an /orchestrate requirement, not something the
codebase needs to keep.

The link to voice-treatment-entry is repointed — that spec still sits in its own
folder on master.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-21 13:01:49 +08:00
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
b2f2825beb fix(voice): say so when a dictation lands nothing on the line
buildLabLineFromVoice returns null whenever no prosthesis job survives — bare
teeth with no material, an out-of-catalog code, every code refused by the stack
rules. applyVoice then closed the sheet and returned in silence.

Dictate "دندون ۱۲ و ۱۴" with no material: lab mode forces labDependent, so the
merged row is available and ticked and the button reads Apply (1). Tapping it
changed nothing and said nothing.

It now raises voiceNothingExtracted through the panel's existing toast, unless a
due date landed — a due-date-only dictation did do something and must stay quiet.

Found by /code-review.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-21 13:00:45 +08:00
beba7bb4d4 docs(voice): record the blank-line fix and the decision to leave lint red
Amin's call: the repo-wide lint gate stays red. Both commands fail identically
on origin/master and no error is in a file this branch touched. The repair means
restructuring auth, realtime and toast effects with no component tests to catch
a regression, so it is its own attended task.

Notes the consequence: the Stop guard blocks on this ledger and every future
/orchestrate here inherits the same red.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-21 13:00:45 +08:00
0584b79472 fix(voice): never append a blank line from a dictation that built none
Found by the /orchestrate correctness critic, verified by hand.

applyVoice checked isBlankLine on the TARGET line but never on the line it had
just built. A dictation carrying no line content — a due date on its own, or one
whose codes were all refused — returned a blank newLine(), fell past the
blank-target branch and appended it. The panel then made it active and autosaved
it, and start only requires that SOME line carries jobs (cases.service.ts:549),
so the empty line shipped to the lab floor. That is what decision 9 exists to
prevent; the decision only covered filling a blank target, not appending one.

The spec's own manual step 7 triggers it: dictate «تا پنجشنبه» with line 1
already filled.

buildLabLineFromVoice now returns line: null for a blank line, so the rule sits
in the pure function a test can reach rather than in a component nothing renders.
The due date still lands — it belongs to the case header, not the line.

Six tests that asserted an empty line now assert null, and one new test covers a
due date riding along with real work. Reverting the guard fails five of them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-21 13:00:45 +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
54044e44e6 docs(voice): add the lab-case-entry progress ledger
Every /orchestrate stop path writes here, and preflight aborts without it.
Records the two preflight blockers: no merge request template, and the repo
being on Gitea while /orchestrate ends in GitLab-shaped merge requests.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-21 13:00:01 +08:00
6bfa5ade78 docs(voice): spec voice entry for a lab case line
One dictation fills one case line — teeth, prosthesis stack, comment — plus the
case due date. The header's identity fields stay typed, which is what keeps every
extracted field free of a patient name and leaves the transcript decision in
voice-treatment-entry §10 closed.

Lab mode is an empty treatmentTypes and labs catalog, not a second prompt. The
prompt already renders both as empty, so the model cannot emit a field it has no
list for and no prompt text changes.

Four findings from reading the code shaped it:

- voice.controller.ts:22 puts ClinicOrgGuard on the whole controller, so a LAB
  org gets 403 on both voice routes today.
- listLinkedLabs (voice.service.ts:272) does not filter by org type. For a LAB
  org it returns the linked CLINICS, and the prompt labels them "LABS THIS CLINIC
  CAN SEND TO". Emptying the list is what stops a referring clinic coming back as
  labId.
- The lab write validates only the prosthesis code (cases.service.ts:481) because
  the line and its jobs arrive in one transaction. Nothing rejects a teeth/jobs
  mismatch, so the apply keeps decision 40 itself.
- TAB_TREATMENT_EDIT is clinic-only (organization-type.ts:14), so reusing it for
  the lab side would 403 every lab member including the owner. TAB_CASES_EDIT is
  the one that already gates Add Case.

Mode is derived from the org type, never sent by the client. The save model needs
no refs: CaseCreatePanel autosaves one PUT carrying header, lines and jobs
together, so the ref coupling behind three of the five clinic defects cannot
occur here.

14 decisions and a verification list in §10. No code yet.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-21 13:00:01 +08:00
50daac44e3 Merge pull request 'bugfix: cases critical bugs fixed.' (#89) from bugfix/pre-release into master
All checks were successful
Registry — build, push, deploy / build-and-push (push) Successful in 19m39s
Registry — build, push, deploy / deploy (push) Successful in 1m24s
Reviewed-on: #89
Reviewed-by: aminmsvi <amn.mousavi@gmail.com>
2026-09-21 01:57:13 +03:30
705ea92da7 bugfix: cases critical bugs fixed.
All checks were successful
Production — tag build, push, deploy / build-and-push (push) Successful in 4m54s
Production — tag build, push, deploy / deploy (push) Successful in 13m25s
v1.0.19
2026-09-21 01:44:55 +03:30
b42adecd71 Merge pull request 'fix(ci): prod nginx re-resolves backend via Docker DNS; deploy starts nginx last' (#88) from bug/ci-cd into master
All checks were successful
Registry — build, push, deploy / build-and-push (push) Successful in 1m14s
Registry — build, push, deploy / deploy (push) Successful in 1m7s
Reviewed-on: #88
Reviewed-by: admin <admin@localhost>
2026-09-20 23:36:40 +03:30
fae7e0cd53 fix(ci): prod nginx re-resolves backend via Docker DNS; deploy starts nginx last
All checks were successful
Production — tag build, push, deploy / build-and-push (push) Successful in 58s
Production — tag build, push, deploy / deploy (push) Successful in 46s
v1.0.18
2026-09-19 09:26:06 +03:30
0324589928 Merge pull request 'improvement: Build and Push error fixed.' (#87) from feature/billing into master
All checks were successful
Registry — build, push, deploy / build-and-push (push) Successful in 5m6s
Registry — build, push, deploy / deploy (push) Successful in 1m20s
Reviewed-on: #87
Reviewed-by: aminmsvi <amn.mousavi@gmail.com>
2026-09-19 06:23:43 +03:30
f6867467f7 improvement: Build and Push error fixed.
All checks were successful
Production — tag build, push, deploy / build-and-push (push) Successful in 4m36s
Production — tag build, push, deploy / deploy (push) Successful in 20m52s
v1.0.17
2026-09-19 06:19:42 +03:30
851d4a1546 Merge pull request 'feature/billing' (#86) from feature/billing into master
Some checks failed
Registry — build, push, deploy / build-and-push (push) Failing after 25m50s
Registry — build, push, deploy / deploy (push) Has been skipped
Reviewed-on: #86
Reviewed-by: aminmsvi <amn.mousavi@gmail.com>
2026-09-19 05:38:12 +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
9f77a78139 improvement: A currency patch applied just to lables. not a final solution yet. 2026-09-19 05:06:45 +03:30
b8129bef6c improvement: Pontic rules updated. alongside with other shits! 2026-09-19 04:57:56 +03:30
cb5d4f0477 Merge pull request 'feature/minore-features-v1' (#85) from feature/minore-features-v1 into master
All checks were successful
Registry — build, push, deploy / build-and-push (push) Successful in 4m37s
Registry — build, push, deploy / deploy (push) Successful in 1m12s
Reviewed-on: #85
Reviewed-by: admin <admin@localhost>
2026-09-19 02:07:39 +03:30
e7a3e749d9 Make Treatment and lab Cases usable at phone and tablet widths. 2026-09-19 01:05:14 +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
c79bba935b Touch on the FDI chart no longer selects a tooth when you scroll. 2026-09-18 14:12:56 +03:30
778f02ee83 improvement: Redundant and unuseful gadgets removed from dashboard. 2026-09-18 13:54:08 +03:30
4141d88bfd Merge pull request 'Make patient identification the unique identity instead of mobile.' (#84) from feature/minore-features-v1 into master
All checks were successful
Registry — build, push, deploy / build-and-push (push) Successful in 18m7s
Registry — build, push, deploy / deploy (push) Successful in 1m18s
Reviewed-on: #84
Reviewed-by: admin <admin@localhost>
2026-09-18 03:55:41 +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
284067d16b Merge pull request 'Remove organization email; unique orgs by owner and name' (#83) from feature/minore-features-v1 into master
All checks were successful
Registry — build, push, deploy / build-and-push (push) Successful in 58s
Registry — build, push, deploy / deploy (push) Successful in 1m8s
Reviewed-on: #83
Reviewed-by: admin <admin@localhost>
2026-09-17 21:47:14 +03:30
da544f18b7 Remove organization email; unique orgs by owner and name 2026-09-17 20:46:32 +03:30
6313701ed0 improvement: Some minor UI improvements. 2026-09-17 13:37:41 +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
e7efea7818 Merge pull request 'Cache npm and Docker bases on the Gitea registry and Verdaccio.' (#81) from feature/ci-cd into master
All checks were successful
Registry — build, push, deploy / build-and-push (push) Successful in 1m10s
Registry — build, push, deploy / deploy (push) Successful in 1m11s
Reviewed-on: #81
Reviewed-by: admin <admin@localhost>
2026-09-16 12:01:05 +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