Commit Graph

379 Commits

Author SHA1 Message Date
e17d08dbe0 improvment: tab change terminating unfinished attachments uploads fixed.
All checks were successful
Production — tag build, push, deploy / build-and-push (push) Successful in 2m30s
Production — tag build, push, deploy / deploy (push) Successful in 13m31s
v1.0.23
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
acb61f2934 Merge pull request 'email verification with spam issue & auto production db backup on Gitea server.' (#97) from feature/email-verification into master
All checks were successful
Registry — build, push, deploy / build-and-push (push) Successful in 12m51s
Registry — build, push, deploy / deploy (push) Successful in 53s
Reviewed-on: #97
Reviewed-by: admin <admin@localhost>
2026-10-09 18:33:40 +03:30
1c3e7b6495 docs for auto backup production db. 2026-10-09 17:55:28 +03:30
873b25e881 backup script that run on gitea server. 2026-10-09 17:34:23 +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
bf2df97346 Merge pull request 'feature/backup' (#96) from feature/backup into master
All checks were successful
Registry — build, push, deploy / build-and-push (push) Successful in 38s
Registry — build, push, deploy / deploy (push) Successful in 1m4s
Reviewed-on: #96
Reviewed-by: admin <admin@localhost>
2026-10-07 13:13:33 +03:30
8a99beabc3 Merge branch 'master' into feature/backup 2026-10-07 12:49:41 +03:30
9f7a1e3bba Merge pull request 'improvement/case' (#95) from improvement/cases into master
All checks were successful
Registry — build, push, deploy / build-and-push (push) Successful in 15m25s
Registry — build, push, deploy / deploy (push) Successful in 1m9s
Reviewed-on: admin/nudentic#95
Reviewed-by: aminmsvi <amn.mousavi@gmail.com>
2026-10-07 02:22:45 +03:30
b62292cab7 docs: ask for the server password when the Mac copies backups at 17:00
A login item at 17:00 Iran time shows a password box and copies every dump still on the server. The password is not saved.
2026-10-06 19:12:30 +03:30
0c49dddc4c docs: schedule production database dumps and copy them to the Mac
Three dumps a day stay on the server for 3 days. A Mac script copies every dump file after one password prompt.
2026-10-06 18:44:03 +03:30
69e99c7713 improvment: code reviewd. docs and skills updated. 2026-10-06 18:25:29 +03:30
38ea07da80 docs: add a manual runbook for production database backup and restore
The steps cover taking a nudentic.ir dump, copying it off the server, loading it into local Postgres, and restoring production in an emergency.
2026-10-06 18:08:02 +03:30
39e352a9f9 improvment: tasks UI updated based on new cases changes. 2026-10-06 18:01:20 +03:30
13c1fff61d improvment: all confirmation promts replaced with a shared confirma dialog component. 2026-10-06 17:30:05 +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
d7f584c654 Merge pull request 'improvment: Case sheets now show comments. wet milling removed from PFM crown workflow pipeline.' (#94) from feature/lab-to-lab-connection into master
All checks were successful
Registry — build, push, deploy / build-and-push (push) Successful in 6m40s
Registry — build, push, deploy / deploy (push) Successful in 1m56s
Reviewed-on: #94
Reviewed-by: aminmsvi <amn.mousavi@gmail.com>
2026-10-02 20:52:55 +03:30
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
1fb75f3459 Merge pull request 'feature/lab-to-lab-connection*' (#93) from feature/lab-to-lab-connection into master
All checks were successful
Registry — build, push, deploy / build-and-push (push) Successful in 29m7s
Registry — build, push, deploy / deploy (push) Successful in 1m52s
Reviewed-on: #93
Reviewed-by: aminmsvi <amn.mousavi@gmail.com>
2026-10-02 03:09:55 +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