improvment: code reviewd. some bugs when removing an attachment fixed.

This commit is contained in:
2026-10-10 02:28:06 +03:30
parent f465523991
commit 3cb579eaac
22 changed files with 147 additions and 109 deletions

View File

@@ -17,7 +17,7 @@ Ops panel at `/admin` (`backend/src/admin/`). Resources are a **manual allowlist
3. **Renamed / removed model** → update or remove the matching resource (broken `getModelByName` breaks `/admin` boot).
4. **New secret fields** (hashes, tokens, share tokens) → hide via `isVisible: false` (list/filter/show/edit).
5. **Catalog-like reference data** → list/show/edit only; disable `new` / `delete` / `bulkDelete`.
6. **Composite `@@id` only** (no single `@id`) → **do not register** — AdminJS list returns 500 (`Resource does not have an id property`). Examples: `LabCaseDetail`, `LabCaseAttachment`, `MembershipPermission`, read-cursor tables.
6. **Composite `@@id` only** (no single `@id`) → **do not register** — AdminJS list returns 500 (`Resource does not have an id property`). Examples: `LabCaseDetail`, `LabCaseAttachment`, `LabCaseSectionReadState`, `MembershipPermission`, read-cursor tables.
7. Skip pure join/cursor tables unless ops need them and they have a single id. **Do register** single-id models such as `StaffWorkingHoursSchedule` / `StaffWorkingHoursBlock`.
Auth: `ADMINJS_EMAIL` / `ADMINJS_PASSWORD` — production login disabled if password missing or still `admin123`.

View File

@@ -47,4 +47,4 @@ Logical failures: `AppException(ErrorCode.X)` → `errors.X` in en/fa/nl. UI: `g
## Notifications (inbox + live tabs)
Header bell: `UserNotification` + Socket.IO. Same `notification.created` also drives sidebar tab badges and soft list refresh on **currently open** Cases/Tasks/Treatment/Orgs pages. Inbox + Tasks/Treatment badges use **`CASE_COMPLETED`** (every task in the case done); per-step `TASK_COMPLETED` is timeline-only. Skills: `.cursor/skills/notifications-inbox/SKILL.md`, `.cursor/skills/tab-badges/SKILL.md`.
Header bell: `UserNotification` + Socket.IO. Same `notification.created` also drives sidebar tab badges and soft list refresh on **currently open** Cases/Tasks/Treatment/Orgs pages. A case file upload emits `case-section.changed` on that socket (no inbox row) for the case Files/Messages counts. Inbox + Tasks/Treatment badges use **`CASE_COMPLETED`** (every task in the case done); per-step `TASK_COMPLETED` is timeline-only. Skills: `.cursor/skills/notifications-inbox/SKILL.md`, `.cursor/skills/tab-badges/SKILL.md`.

View File

@@ -17,7 +17,7 @@ alwaysApply: false
- **One plan:** a live case has one prosthesis plan. Clinic send still uses `treatmentDetailId` as `sourceKey`. Lab-origin cases use the case id. Outsource children use the child case id, or `childId:parentSourceKey` when two selected steps would collide (see Outsource). `LabCaseLine` is gone. Detail and New case use `UnderlineTabs`: Details, Files, Messages. Files and Messages show unread counts (`LabCaseSectionReadState`); opening Details does not clear them. `ATTACHMENT_ADDED` is not a sidebar badge. Origin is one combobox of linked clinics and labs, or a typed name. Dentist/Technician stays optional. Arch jobs (`UA`/`LA`) highlight the read-only FDI chart.
- **Case Sheet PDF:** same layout for portrait and landscape (Download PDF menu). One A4 page, scaled to fit — the chart is never split. Header is a flex row: current organization name (one line, 48px line box so html2canvas does not clip the glyphs), Nudentic lockup aligned with that text, share QR at 88px inside a 96px frame with `fill` off (a stretched SVG is dropped by html2canvas; not a table cell). The page stays LTR in every locale. On `fa`, the org name is a shrink-wrapped `inline-block` (`direction: ltr` unless the name itself contains Arabic script) with `letter-spacing` and `word-spacing` `0px` — a full-width RTL box gaps Latin words. Party and meta values use `printRtlValueStyle` (Arabic script stays RTL; Latin stays LTR and right-aligned). `FA_RULE_DROP` (6px) clears Persian descenders. `onclone` must not overwrite the name span’s direction. Print ink is `prosthesisTypePrintColorFromCatalog` (heaviest family swatch). Prosthesis rows are SVG boxes. Chart is 85% of the page width with capped glyph height, shared upper column widths, outline-only unselected teeth, root vs crown fills, a larger gap under the upper caption, and matching tooth/number/midline gaps on both arches. Bridge marks match the FDI chart: 10px `#009cae` dots on the column boundary in the tooth-to-number gap. `onclone` sizes the lockup SVGs and the organization-name line box. Hex inline styles only. Optional `externalCode` replaces the order number.
- **Detail chrome:** **Mark as important** is centered in the header on `lg`. Below that, the header is one compact stack: name and the same QR thumb as desktop (`w-24 sm:w-32`) on the first row, mobile/from/date on one wrapping line, the progress bar without a separate “tasks completed” sentence, important and billed on one row, and Edit / Outsource / Get PDF sharing one row (`responsiveFill`). External code sits under the progress bar in the start column, same width as the bar; billed price is under important on `lg`. Get PDF and Add files are primary `CaseLifecycleButton`s with no icon, the same width as Outsource from `lg` up. **Add case** is a full-width `px-6 py-3 text-base` split (label + mic) matching New treatment and Add detail voice. There is no Comments button, and opening Messages does not scroll the page. File cards: name at the start and checkbox at the end, then a clipped preview, then size over date at the start with the View/Download menu centered at the end. Remove is on that menu (`DELETE /cases/:id/attachments/:attachmentId`, confirm first). An in-progress upload is its own card with a progress bar. The sent-date line reads “Outsource {date}”.
- **Attachments:** no size cap. One file per request, streamed with `orgDiskStorage` (not memory). The client has no axios timeout. Nginx `/api` uses `client_max_body_size 0`. Do not set `Content-Type: multipart/form-data` by hand.
- **Attachments:** no size cap. One file per request, streamed with `orgDiskStorage` (not memory). The client has no axios timeout. Nginx `/api` uses `client_max_body_size 0`, `send_timeout 3600s`, and `proxy_request_buffering off`. JSON bodies stay on the Express limit; only multipart is unlimited. Production must recreate nginx from the SSL template. Staging also needs the Windows host nginx reloaded. Do not set `Content-Type: multipart/form-data` by hand.
- **Drafts rail:** unstarted lab-origin cases sit in a collapsed `TreatmentRailSection`; expands on click or **Add case**. Main list is received + started cases (`drafts=exclude` / `drafts=only`), newest first by `listedAt` (`LAB_CASE_LIST_ORDER_BY`; trigger `lab_cases_listed_at_sync` = `COALESCE(startedAt, sentAt)`). Never `orderBy startedAt, sentAt` and never a `GENERATED ALWAYS` `listedAt`.
- **Add case / Start / Delete draft:** `TAB_CASES_EDIT`. The rail button is full width. Its mic uses the existing lab voice apply on that case’s one plan (blank plan replaced, existing jobs merged). No draft yet → create the draft, then record. Delete only unstarted lab-origin drafts (`origin === LAB_INTERNAL && !startedAt`). Comments on Cases accept `TAB_CASES_*` (owners are not blocked by Tasks opt-in).

View File

@@ -47,9 +47,9 @@ List item shape: `prosthesisGroups: { prosthesisTypeCode, teeth[], ponticTeeth?
- Comments: shared `LabCaseCommentsPanel` + `tasksApi` comment routes (`viewerSide="LAB"`). Newest-first; sent/received use logical start/end alignment (RTL-safe). Compact `h-9` composer with primary send + visibility controls. Lab-origin cases (`LAB_INTERNAL`, including after Start) are visible to lab comments/mark-read — do not require `sentAt` / `LabCaseSend`. Generated cases hide the eye until a linked clinic is selected; that eye publishes the comment to the clinic. A linked lab reads the thread on the share page and does not use the eye. Received cases use it for the clinic. Lab-to-lab cases use the same eye button for the sending lab: off keeps the comment on this lab, on shows it in that lab's handoff and notifies them. Comments that already existed on a lab-to-lab case stay shared.
- Mark read: `POST /notifications/mark-case-read` on select (Cases tab badge)
- FDI chart (`CaseToothChartPanel`): prosthesis colors + **connected bridge dots** from `selectionGroupId` (`buildCaseConnectedTeeth` / `buildCaseProsthesisRows` in `caseDetailUtils.ts`).
- **Important + external code** (`TAB_CASES_EDIT`): **Mark as important** is centered in the header on `lg`. Below `lg` the header is one compact stack: name and the desktop QR thumb (`w-24 sm:w-32`, not the 56px compact thumb) on the first row, mobile / from / date on one wrapping line, the progress bar (no separate “tasks completed” sentence), important and billed on one row, and Edit / Outsource / Get PDF sharing one row (`CaseLifecycleButton` `responsiveFill`). External code is under the progress bar in the start column, same width as the bar (no title; placeholder only); billed price is under important on `lg`. Save code on blur → `PATCH /cases/:id/external-code`. Edit, Outsource, Get PDF, and Add files use `CaseLifecycleButton` (primary, no icon; Treatment Lab dispatch / Chart / Add detail width from `lg` up). **Add case** is full width at New treatment size (`px-6 py-3 text-base`) and, when voice is available, splits like Add detail: label starts a blank draft, the mic records against the open draft (or creates one first). Apply still fills that case’s single plan. There is no second mic on the Details tab. There is no Comments button. Opening Messages does not scroll the page. Start and Delete on a draft use the lifecycle width. The sent-date line is `cases.sentAt` (“Outsource {date}”). File cards (`CaseFilesPanel`): name at the start and checkbox at the end, a clipped preview between them and the footer, then size over date at the start with the View/Download menu centered at the end. Each file being uploaded is its own card with a progress bar (one request per file). Remove one file from that menu after confirm (`DELETE /cases/:id/attachments/:attachmentId`): a clinic file still on a treatment is unlinked only; a lab upload with `detailId` null and no other case link is deleted from the database and disk. Tasks stays view-only.
- **Section badges:** Files counts `ATTACHMENT_ADDED` and Messages counts `LAB_COMMENT` / `CLINIC_COMMENT`, after `LabCaseSectionReadState`, excluding the actor. `GET /cases/:id/section-counts`, `POST /cases/:id/sections/:section/read` when that tab is selected. Opening Details does not clear them. Uploads emit `case-section.changed` to other lab members who can read Cases or Tasks (no inbox card). The existing socket turns that into `tab-badges-changed`. `ATTACHMENT_ADDED` is not a sidebar Cases/Tasks/Treatment count.
- **Attachment uploads:** no size limit in multer, axios, or nginx `/api` (`client_max_body_size 0`, `client_body_timeout 3600s`, `proxy_request_buffering off`). Files stream to disk via `orgDiskStorage` under `uploads/lab-cases/{orgId}` (treatment uploads use `uploads/treatments`). Do not buffer the file in memory and do not set `Content-Type: multipart/form-data` yourself — that drops the boundary. A previous 50MB nginx cap, a 120s axios timeout, and `memoryStorage` are why scans around 80MB failed.
- **Important + external code** (`TAB_CASES_EDIT`): **Mark as important** is centered in the header on `lg`. Below `lg` the header is one compact stack: name and the desktop QR thumb (`w-24 sm:w-32`) on the first row, mobile / from / date on one wrapping line, the progress bar (no separate “tasks completed” sentence), important and billed on one row, and Edit / Outsource / Get PDF sharing one row (`CaseLifecycleButton` `responsiveFill`). External code is under the progress bar in the start column, same width as the bar (no title; placeholder only); billed price is under important on `lg`. Save code on blur → `PATCH /cases/:id/external-code`. Edit, Outsource, Get PDF, and Add files use `CaseLifecycleButton` (primary, no icon; Treatment Lab dispatch / Chart / Add detail width from `lg` up). **Add case** is full width at New treatment size (`px-6 py-3 text-base`) and, when voice is available, splits like Add detail: label starts a blank draft, the mic records against the open draft (or creates one first). Apply still fills that case’s single plan. There is no second mic on the Details tab. There is no Comments button. Opening Messages does not scroll the page. Start and Delete on a draft use the lifecycle width. The sent-date line is `cases.sentAt` (“Outsource {date}”). File cards (`CaseFilesPanel`): name at the start and checkbox at the end, a clipped preview between them and the footer, then size over date at the start with the View/Download menu centered at the end. Each file being uploaded is its own card with a progress bar (one request per file). Remove one file from that menu after confirm (`DELETE /cases/:id/attachments/:attachmentId`): a clinic file still on a treatment is unlinked only; a lab upload with `detailId` null and no other case link is deleted from the database and disk. Tasks stays view-only.
- **Section badges:** Files counts `ATTACHMENT_ADDED` and Messages counts `LAB_COMMENT` / `CLINIC_COMMENT`, after `LabCaseSectionReadState`, excluding the actor. `GET /cases/:id/section-counts`. `POST /cases/:id/sections/:section/read` only when that tab is open and its count is greater than 0. Opening Details does not clear them. Uploads emit `case-section.changed` to other lab members who can read Cases or Tasks (no inbox card). The existing socket turns that into `tab-badges-changed`. `ATTACHMENT_ADDED` is not a sidebar Cases/Tasks/Treatment count. `LabCaseSectionReadState` has a composite id and stays off the AdminJS allowlist.
- **Attachment uploads:** no size limit in multer, axios, or nginx `/api` (`client_max_body_size 0`, `client_body_timeout 3600s`, `send_timeout 3600s`, `proxy_request_buffering off`, proxy read/send 3600s). The server-level `send_timeout 10` would cut a paused download, so `/api` overrides it. JSON and urlencoded bodies stay on the Express limits; only multipart is unlimited. Files stream to disk via `orgDiskStorage` under `uploads/lab-cases/{orgId}` (treatment uploads use `uploads/treatments`). The attachment row and the case link are one transaction; the disk file is removed only after that transaction commits on delete, and only for a lab-owned upload. A failed activity row does not fail the upload. Do not buffer the file in memory and do not set `Content-Type: multipart/form-data` yourself — that drops the boundary. Releasing this needs `prisma migrate deploy` (the backend container runs it on start; Postgres 15) and a nginx recreate from `nginx.ssl.conf.template`. Staging’s Windows host nginx is a separate paste-and-reload of `windows-edge-http.conf`; Docker alone leaves the 50MB edge. Uploaded bytes live on the backend container disk (`/app/uploads`, no volume) and can fill that disk.
- **Case Sheet PDF** — see below.
- **Share link (sent cases):** `shareUrl` on detail; attachment preview left + QR thumb right; `LabCaseShareQrDialog` (`react-qr-code`). Full flow: `.cursor/skills/lab-case-share-link/SKILL.md`.

View File

@@ -19,6 +19,8 @@ Do **not** clear tab badges when marking an inbox card read.
## Live cascade (one socket)
`case-section.changed` is the same socket and the same `notifyTabBadgesChanged()` call, for a case file upload. It does **not** write a `UserNotification` row and does not change the bell.
On `notification.created`, [`RealtimeProvider`](frontend/src/lib/realtime/RealtimeProvider.tsx):
1. Updates inbox state (bell list + unread).

View File

@@ -16,6 +16,7 @@ Frontend hook: [`frontend/src/lib/hooks/useTabBadgeCounts.ts`](frontend/src/lib/
- **`LabCaseActivity`** — append-only events: `CASE_SENT`, `CLINIC_COMMENT`, `LAB_COMMENT`, `CASE_IMPORTANT`, `CASE_AMENDED` (stub for Step 7), `TASK_COMPLETED` (timeline only), `TASK_ASSIGNED`, `CASE_COMPLETED`, `ATTACHMENT_ADDED` (case Files tab only — **not** a sidebar count)
- **`LabCaseUserTabReadState`** — per user/org/tab cursor (`TASKS`) for sidebar badge clearing on tab visit.
- **`LabCaseUserReadState`** — per user/org/labCase cursor; drives Cases tab count and `hasUnread` on case list cards
- **`LabCaseSectionReadState`** — per user/org/case/section cursor (`FILES`, `MESSAGES`) for the counts on a case’s own tabs. Composite `@@id`; do not register it in AdminJS. Opening Details does not move these cursors. `ATTACHMENT_ADDED` feeds Files only.
## Tab badge buckets (Option B)
@@ -49,7 +50,7 @@ Counts exclude events where `actorUserId === current user`. Clinic `LAB_COMMENT`
After mutations, frontend calls `notifyTabBadgesChanged()` (window event).
**Live path:** inbox Socket.IO `notification.created` also dispatches that event so sidebar counts refresh without navigation. **Only currently mounted** feature pages soft-reload list data on the same event (silent; Treatment form/draft untouched). Unmounted tabs do not fetch list data until the user opens them. See `.cursor/skills/notifications-inbox/SKILL.md`.
**Live path:** inbox Socket.IO `notification.created` also dispatches that event so sidebar counts refresh without navigation. Case file uploads emit `case-section.changed` (no `UserNotification` row) and the client turns that into the same event. The open Files or Messages tab marks itself read only when its count is greater than 0. **Only currently mounted** feature pages soft-reload list data on the same event (silent; Treatment form/draft untouched). Unmounted tabs do not fetch list data until the user opens them. See `.cursor/skills/notifications-inbox/SKILL.md`.
## Frontend pattern (same as org connections)

View File

@@ -151,6 +151,8 @@ On today: in-progress slot first, else nearest start time to `now`. Other days:
**Today checkbox** (`ScheduleDayPicker`, including `compact` on the Treatment strip and Appointments page headers): unchecked when `selectedDay` is not today (e.g. after loading a historical treatment). Checking Today calls `onSelectDay(today)` which unlocks selection (`selectionLocked = false`) and resets browse/historical context; appointments reload and auto-select nearest to now.
**Day arrows:** `onSelectDay` flushes, switches to live mode, and clears the selected visit before the new day loads. When that day has no appointment and no standalone treatment, the getDraft effect resets the form to one `newDetail()` (no patient, no leftover chart, notes, or lab drafts) unless it is already that blank line. A day that has a visit still auto-selects and loads it. Historical mode is left alone.
## Lab org search (dispatch)
@@ -224,7 +226,7 @@ canEditTreatmentForDay = canEdit && hasLiveContext && !isViewingPastDay && works
### Add / remove details
- **Add detail** stays enabled whenever `canEditTreatmentForDay` — even if sibling details are already sent.
- **Remove detail:** trash icon on each **detail chip** in chrome (`TreatmentDetailsEditor` `showChrome`), including the last remaining line. Disabled when `!canEdit`, day/workspace `disabled`, detail sent (`isDetailLocked`), or `uploadBusy`. Confirm via `confirmRemoveDetail`. Drop linked unsent lab drafts with the detail. Empty details persist as `[]` (`SaveTreatmentDraftDto` has no `@ArrayMinSize`; `areDetailsPersistable` is `details.every(isDetailTypeSelected)` so `[]` saves). Unscheduled strip-card trash uses `areUnscheduledDetailsStripDeletable` (blank lines), then `PUT` `{ details: [] }` and `DELETE /treatments/:id` (backend still refuses when any detail row remains — `TREATMENT_HAS_DETAILS`). **Do not** put a delete control in the type/notes fields.
- **Remove detail:** trash icon on each **detail chip** in chrome (`TreatmentDetailsEditor` `showChrome`), including the last remaining line. Disabled when `!canEdit`, day/workspace `disabled`, the line is sent (`isDetailSent`), or `uploadBusy`. The chip’s Sent label uses that same check. `isDetailLocked` is only the later edit lock (a completed lab step). Confirm via `confirmRemoveDetail`. Drop linked unsent lab drafts with the detail. Empty details persist as `[]` (`SaveTreatmentDraftDto` has no `@ArrayMinSize`; `areDetailsPersistable` is `details.every(isDetailTypeSelected)` so `[]` saves). Unscheduled strip-card trash uses `areUnscheduledDetailsStripDeletable` (blank lines), then `PUT` `{ details: [] }` and `DELETE /treatments/:id` (backend still refuses when any detail row remains — `TREATMENT_HAS_DETAILS`). **Do not** put a delete control in the type/notes fields.
### Sent lab shipment fields (vs detail)

View File

@@ -44,10 +44,10 @@ frontend/src/
**Treatment tab:** Preview and editable form are **separate** until the user clicks **Load into workspace** on a history item. See `.cursor/skills/treatment-workspace/SKILL.md` before changing that flow.
**Treatment edit / details (quick ref):**
- Day/mode gate: editable only for live draft on today/future (`canEditTreatmentForDay`). Past day / historical load → read-only form. Patient search sits in the **page header** (workspace-wide). If the patient has a visit on the day strip, that visit opens; else the latest history plan loads. If neither exists, the editor shows an inline empty state (no dialog) pointing to **New treatment** in the rail — do not auto-create. **New treatment** is at the top of the left rail (selected-patient card below it) and opens a picker: Walk-in first, then a matching card for the current named patient (name + mobile/email), then search. It does not auto-copy the appointment card’s patient. New treatment seeds one blank detail; a persisted empty plan loads as `[]` until Add.
- Day/mode gate: editable only for live draft on today/future (`canEditTreatmentForDay`). Past day / historical load → read-only form. Patient search sits in the **page header** (workspace-wide). If the patient has a visit on the day strip, that visit opens; else the latest history plan loads. Day arrows that land on a day with no visit reset the workspace to one blank detail and no patient, the same as opening Treatment with nothing selected. A day that has a visit still opens it. If neither exists, the editor shows an inline empty state (no dialog) pointing to **New treatment** in the rail — do not auto-create. **New treatment** is at the top of the left rail (selected-patient card below it) and opens a picker: Walk-in first, then a matching card for the current named patient (name + mobile/email), then search. It does not auto-copy the appointment card’s patient. New treatment seeds one blank detail; a persisted empty plan loads as `[]` until Add.
- **Unscheduled strip cards** use the same treatment-type banner as appointments from the **first detail’s type only** (`unscheduledStripColorCode`; live draft for the open card). Empty first line → chip theming even if later lines are typed. Strip trash only when every line is blank (no type/teeth/notes/attachments, including `[]`); typed cards need chip-delete first. Backend `DELETE /treatments/:id` is empty-only (`TREATMENT_HAS_DETAILS`).
- A sent line stays editable until any lab task is completed, including a step finished by a further lab. Then the line locks (`TREATMENT_DETAIL_SENT`). **Add detail** still OK same day; **Remove detail** = trash on chip (unsent, including last line; day/edit gates apply). A sent line cannot be removed. Empty details persist as `[]`.
- **Entry:** Type dropdown + compact attachments strip (`TreatmentDetailAttachmentsStrip`) on one row (plus **Lab dispatch** / **Chart** toggle when the type is lab-dependent; dispatch is primary, Chart is outline; **Add detail** uses the same width), then bordered FDI chart (Cases chrome/scale) **or** the lab dispatch panel in that same slot, then full-width auto-growing **Notes**. Prosthesis types are assigned on the chart (teeth, or Upper/Lower arch labels for jaw products — dashed outline + plus). Arch Upper/Lower/Both remaps existing `UA`/`LA` jobs (Both→Upper clears lower). Picker: `4fr` wrapping category grid / `1fr` add-ons with a vertical divider; tiles use `ProsthesisCatalogIcon` (`md` + two-line labels on category/addon; `sm` + centered icon/label on child cards); expanded children use a parent-colored **L** rail sized to the first child card; parent-bar back arrow is black; empty crown slot is plus + dashed “Crown can be added”; filled crown slot stays visible so it can be changed. Screen type names use `prosthesisTypeLabelStyleFromCatalog`. Implant/post & core show a **crown** suggestion slot; a veneer/inlay/onlay/overlay hides it. The empty **Pontic** suggestion appears only beside an immediate crown/indirect neighbor; a filled Pontic stays visible and the category remains available for pontic-first entry. Post & core is disabled after crown or implant; Implant is disabled after post & core; screw-retained does not suggest another crown. Removable on a tooth shows the full-arch notice (partial is tooth-selected; complete/overdenture use arch controls). Prosthesis teeth always have jobs (hydrate/save prune). Lab-rail / Go to dispatch **opens the dispatch view** (`pendingScrollToLabRef`). Detail chips show type + teeth; lab-dependent chips use colored sent/unsent text (sent date on dispatch). Lab dispatch keeps comments.
- **Entry:** Type dropdown + compact attachments strip (`TreatmentDetailAttachmentsStrip`) on one row (plus **Lab dispatch** / **Chart** toggle when the type is lab-dependent; dispatch is primary, Chart is outline; **Add detail** uses the same width), then bordered FDI chart (Cases chrome/scale) **or** the lab dispatch panel in that same slot, then full-width auto-growing **Notes**. Prosthesis types are assigned on the chart (teeth, or Upper/Lower arch labels for jaw products — dashed outline + plus). Arch Upper/Lower/Both remaps existing `UA`/`LA` jobs (Both→Upper clears lower). Picker: `4fr` wrapping category grid / `1fr` add-ons with a vertical divider; tiles use `ProsthesisCatalogIcon` (`md` + two-line labels on category/addon; `sm` + centered icon/label on child cards); expanded children use a parent-colored **L** rail sized to the first child card; parent-bar back arrow is black; empty crown slot is plus + dashed “Crown can be added”; filled crown slot stays visible so it can be changed. Screen type names use `prosthesisTypeLabelStyleFromCatalog`. Implant/post & core show a **crown** suggestion slot; a veneer/inlay/onlay/overlay hides it. The empty **Pontic** suggestion appears only beside an immediate crown/indirect neighbor; a filled Pontic stays visible and the category remains available for pontic-first entry. Post & core is disabled after crown or implant; Implant is disabled after post & core; screw-retained does not suggest another crown. Removable on a tooth shows the full-arch notice (partial is tooth-selected; complete/overdenture use arch controls). Prosthesis teeth always have jobs (hydrate/save prune). Lab-rail / Go to dispatch **opens the dispatch view** (`pendingScrollToLabRef`). Detail chips show type + teeth; lab-dependent chips use colored sent/unsent text. Sent follows the linked lab case `sentAt` (or the detail’s own `sentAt`); editing stays open until a lab step is completed. The sent date stays on dispatch. Lab dispatch keeps comments.
- **Tooth selection:** Hit target is the unrotated cell (`pointerdown` only — do not also bind `click`). Glyph is `pointer-events-none`; nest hover/selected scale inside the rotate wrapper. Neighbor circles connect/disconnect adjacent selected teeth; midline 11–21 / 41–31 is allowed; never keep a 1-tooth connected group. Prosthesis plain click opens the picker; Done stores the jobs copy brush; **Clear this tooth** stores a clear brush. Ctrl/Cmd+click or drag replays either action on one tooth; Shift+click replays it across an inclusive same-arch range as singles. Brushes reset when the active detail/line changes. Pontic is a no-child tile for pontic-first entry. A tooth immediately beside Pontic initially enables Crown, Indirect, and Pontic, allowing Pontic chains; assigning a Crown immediately enables Implant without reopening the picker (Indirect does not). Choosing a new restoration leaf on one connected abutment updates every restoration abutment in that span while preserving each tooth’s implant/post-core jobs. Orphan/mixed Pontics remain drafts with amber warning but block Send/Start (`PONTIC_BRIDGE_INVALID`). Helpers live in `prosthesisTree.ts`. Same-type teeth in one detail are one display job; stacked types remain distinct. A connected crown/indirect + Pontic span uses the abutment leaf’s steps and renders `13 · Pontic - 14 · PFZ Crown`; Pontic adds none. `UA`/`LA` are arch jobs; partial denture is one tooth-selected job across all selected FDI teeth.
- **Lab dispatch layout:** due date beside title (`justify-between`, logical start/end for RTL); job rows from `LabCaseToothJobsList` → `ProsthesisJobLineLabel` (same-type teeth in one detail share a row; Connected badge only for a real bridge). Sent cases: dest/jobs share a row with the Cases **QR** thumb; tracker + comments are full width below.
- **Schedule date:** Treatment strip and Appointments page headers use `ScheduleDayPicker` `compact` (date centered in a 3-col header; no “Schedule date” label; Today on the navigator).
@@ -72,7 +72,7 @@ frontend/src/
**Lab Tasks tab:** Newest case first (`listedAt`); grouping only for date sort; filters include completed step, origin, due date, assignment, and prosthesis. New tasks are plan-scoped: one scan → prosthesis sections → optional Model design/creation (when any type has `requiresModelSteps`) → packing/shipping. `lineCount` stays 1. `__line__` tasks are independently completable and non-outsourceable; historical `__case__` scan keeps whole-case fan-out. Same-type exclusive steps coalesce across matching teeth; duplicate non-model steps for stacked types become `typeA+typeB` sections. Pontics fold into connected crown/indirect sections. Task identity includes source, first tooth, section type, and workflow code because one section may produce different tooth sets across steps. Job titles use `ProsthesisJobLineLabel`; task assignment is in Cases; only assignee/unassigned pool can update status in Tasks. `CASE_COMPLETED` drives inbox/tab badges only after all case tasks finish. See `.cursor/skills/lab-tasks/SKILL.md`.
**Lab Cases tab:** Filter by **prosthesis type** (not treatment type); auto-select newest case on open; list **10 per page**; left rail list fills column height (`flex-1 overflow-y-auto`). Unstarted lab-origin **drafts** sit in a collapsed expandable rail section (opens on click or **Add case**); received + started cases list below, newest first by send or start time (`listedAt`, same key as Tasks). List cards use `LabCaseProsthesisGroupsList` (colored type + teeth, shared with Treatment rail) plus **From clinic** / **Generated** / **From lab** origin badges. Job titles use `ProsthesisJobLineLabel` the same as Treatment/Tasks (`13 · Pontic - 14 · PFZ Crown`; no category; indirect keeps Inlay · Layered ceramic). Deep link: `?caseId=`, `?clinicOrganizationId=`. **Share link:** QR + URL on sent cases **and** started lab-origin cases (attachment left, QR right); opens `/lab-case/[token]` focus page. **Case Sheet PDF:** same portrait/landscape layout, one A4 page (`jspdf`/`html2canvas`, scaled to fit); realistic FDI chart; hex-only print layout; share QR stays in the flex header; optional `externalCode` replaces order number. The page stays LTR; on Persian sheets the org name is shrink-wrapped (RTL only when the name itself is Arabic script) and labels use `0px` letter-spacing. Lab-origin Start has no clinic send and notifies the linked org once (`PARTNER_CASE_CREATED`, share link); generated-case comments have no visibility toggle. A lab-to-lab case uses the eye button so the sending lab can see that comment. Comments use Cases **or** Tasks permission. Unstarted generated drafts can be deleted (`DELETE /cases/:id`). **Edit** (`POST /cases/:id/stop`) returns a started generated case to that drafts rail: completed steps and the previous prosthesis plan stay as history, in-progress steps are dropped, and the case can be edited and started again. Open outsources with no finished step are cancelled; a finished outsourced step blocks Edit. **Outsource** gives selected in-progress prosthesis steps to one linked lab as a child case. Child `sourceKey` stays the child case id unless two selected steps share tooth, type, and workflow (`childId:parentSourceKey`). The child shows only that sending lab (no original clinic or dentist). Those steps leave Tasks until that lab completes them, and only the sending lab sees that direct handoff. The sender chart stays the full plan; the receiver chart is the selected jobs plus pontics on that bridge. **Live:** inbox Socket.IO → `notifyTabBadgesChanged()` soft-refreshes list + selected detail (no remount). See `.cursor/skills/lab-cases/SKILL.md` and `.cursor/skills/lab-case-share-link/SKILL.md`.
**Lab Cases tab:** Filter by **prosthesis type** (not treatment type); auto-select newest case on open; list **10 per page**; left rail list fills column height (`flex-1 overflow-y-auto`). Unstarted lab-origin **drafts** sit in a collapsed expandable rail section (opens on click or **Add case**); received + started cases list below, newest first by send or start time (`listedAt`, same key as Tasks). List cards use `LabCaseProsthesisGroupsList` (colored type + teeth, shared with Treatment rail) plus **From clinic** / **Generated** / **From lab** origin badges. Job titles use `ProsthesisJobLineLabel` the same as Treatment/Tasks (`13 · Pontic - 14 · PFZ Crown`; no category; indirect keeps Inlay · Layered ceramic). Deep link: `?caseId=`, `?clinicOrganizationId=`. **Share link:** QR + URL on sent cases **and** started lab-origin cases (attachment left, QR right); opens `/lab-case/[token]` focus page. **Case Sheet PDF:** same portrait/landscape layout, one A4 page (`jspdf`/`html2canvas`, scaled to fit); realistic FDI chart; hex-only print layout; share QR stays in the flex header; optional `externalCode` replaces order number. The page stays LTR; on Persian sheets the org name is shrink-wrapped (RTL only when the name itself is Arabic script) and labels use `0px` letter-spacing. Lab-origin Start has no clinic send and notifies the linked org once (`PARTNER_CASE_CREATED`, share link); generated-case comments have no visibility toggle. A lab-to-lab case uses the eye button so the sending lab can see that comment. Comments use Cases **or** Tasks permission. Unstarted generated drafts can be deleted (`DELETE /cases/:id`). **Edit** (`POST /cases/:id/stop`) returns a started generated case to that drafts rail: completed steps and the previous prosthesis plan stay as history, in-progress steps are dropped, and the case can be edited and started again. Open outsources with no finished step are cancelled; a finished outsourced step blocks Edit. **Outsource** gives selected in-progress prosthesis steps to one linked lab as a child case. Child `sourceKey` stays the child case id unless two selected steps share tooth, type, and workflow (`childId:parentSourceKey`). The child shows only that sending lab (no original clinic or dentist). Those steps leave Tasks until that lab completes them, and only the sending lab sees that direct handoff. The sender chart stays the full plan; the receiver chart is the selected jobs plus pontics on that bridge. **Live:** inbox Socket.IO → `notifyTabBadgesChanged()` soft-refreshes list + selected detail (no remount). A file upload emits `case-section.changed` on that socket (no inbox card) so Files and Messages unread counts refresh the same way. **Add case** is a full-width split button with the lab mic. One file can be removed from its card menu. Attachments have no size cap; production must recreate nginx from the SSL template or `/api` stays at 50MB. See `.cursor/skills/lab-cases/SKILL.md` and `.cursor/skills/lab-case-share-link/SKILL.md`.
**Lab case share link (quick ref):**
- Token on first ship **or** lab-origin Start → `/{locale}/lab-case/{token}` after login. Editing a generated case keeps that token. The page reads the current round and the live patient/clinic snapshots. Cases, Treatment lab dispatch, and the Case Sheet QR all use this URL.

View File

@@ -1,11 +1,17 @@
import {
HttpStatus,
Injectable,
} from '@nestjs/common';
import { HttpStatus, Injectable, Logger } from '@nestjs/common';
import { AppException, ErrorCode } from '../../common/errors';
import { createReadStream, existsSync, unlinkSync } from 'fs';
import { join, resolve, sep } from 'path';
import { CatalogEntityKind, LabCaseActivityType, LabCaseOrigin, LabCaseSection, LabTaskStatus, LinkStatus, Prisma, UserNotificationType } from '@prisma/client';
import {
CatalogEntityKind,
LabCaseActivityType,
LabCaseOrigin,
LabCaseSection,
LabTaskStatus,
LinkStatus,
Prisma,
UserNotificationType,
} from '@prisma/client';
import { PrismaService } from '../../../prisma/prisma.service';
import { normalizeMobile } from '../../common/phone';
import {
@@ -146,6 +152,7 @@ type LabCaseTaskWithRelations = Prisma.LabCaseTaskGetPayload<{
@Injectable()
export class CasesService {
private readonly logger = new Logger(CasesService.name);
private readonly uploadRoot = join(process.cwd(), 'uploads', 'lab-cases');
constructor(
@@ -1031,16 +1038,7 @@ export class CasesService {
actorUserId: string,
) {
await this.assertCanEditCases(actorUserId, labOrganizationId);
const existing = await this.prisma.labCase.findFirst({
where: {
id: labCaseId,
...this.visibleToLabWhere(labOrganizationId),
},
select: { id: true },
});
if (!existing) {
throw new AppException(ErrorCode.CASE_NOT_FOUND, HttpStatus.NOT_FOUND);
}
await this.requireVisibleCase(labCaseId, labOrganizationId);
if (!files?.length) {
throw new AppException(ErrorCode.TREATMENT_FILE_REQUIRED, HttpStatus.BAD_REQUEST);
}
@@ -1052,52 +1050,68 @@ export class CasesService {
sizeBytes: number;
}[] = [];
for (const file of files) {
const storagePath = file.path;
if (!storagePath) {
throw new AppException(ErrorCode.TREATMENT_FILE_REQUIRED, HttpStatus.BAD_REQUEST);
}
try {
for (const file of files) {
const storagePath = file.path;
if (!storagePath) {
throw new AppException(ErrorCode.TREATMENT_FILE_REQUIRED, HttpStatus.BAD_REQUEST);
}
let attachmentId = '';
try {
const attachment = await this.prisma.treatmentDetailAttachment.create({
data: {
detailClientKey: null,
fileName: file.originalname,
mimeType: file.mimetype || 'application/octet-stream',
sizeBytes: file.size,
storagePath,
},
});
await this.prisma.labCaseAttachment.create({
data: { labCaseId, attachmentId: attachment.id },
});
attachmentId = attachment.id;
created.push({
id: attachment.id,
fileName: attachment.fileName,
mimeType: attachment.mimeType,
sizeBytes: attachment.sizeBytes,
});
} catch (error) {
this.removeStoredFiles([storagePath]);
throw error;
let attachmentId = '';
try {
const attachment = await this.prisma.$transaction(async (tx) => {
const row = await tx.treatmentDetailAttachment.create({
data: {
detailClientKey: null,
fileName: file.originalname,
mimeType: file.mimetype || 'application/octet-stream',
sizeBytes: file.size,
storagePath,
},
});
await tx.labCaseAttachment.create({
data: { labCaseId, attachmentId: row.id },
});
return row;
});
attachmentId = attachment.id;
created.push({
id: attachment.id,
fileName: attachment.fileName,
mimeType: attachment.mimeType,
sizeBytes: attachment.sizeBytes,
});
} catch (error) {
this.removeStoredFiles([storagePath]);
throw error;
}
// The file is already stored. A badge-row failure must not make the client retry and upload it again.
try {
await this.labCaseActivity.record({
labCaseId,
type: LabCaseActivityType.ATTACHMENT_ADDED,
actorUserId,
payload: { attachmentId },
});
} catch (error) {
this.logger.error(
`Failed to record ATTACHMENT_ADDED for case ${labCaseId}`,
error instanceof Error ? error.stack : undefined,
);
}
}
} finally {
if (created.length > 0) {
void this.userNotifications.emitCaseSectionChanged({
organizationId: labOrganizationId,
actorUserId,
labCaseId,
requiredPermissions: ['TAB_CASES_READ', 'TAB_TASKS_READ'],
});
}
await this.labCaseActivity.record({
labCaseId,
type: LabCaseActivityType.ATTACHMENT_ADDED,
actorUserId,
payload: { attachmentId },
});
}
void this.userNotifications.emitCaseSectionChanged({
organizationId: labOrganizationId,
actorUserId,
labCaseId,
requiredPermissions: ['TAB_CASES_READ', 'TAB_TASKS_READ'],
});
return { success: true, data: created };
}
@@ -1108,16 +1122,7 @@ export class CasesService {
actorUserId: string,
) {
await this.assertCanEditCases(actorUserId, labOrganizationId);
const existing = await this.prisma.labCase.findFirst({
where: {
id: labCaseId,
...this.visibleToLabWhere(labOrganizationId),
},
select: { id: true },
});
if (!existing) {
throw new AppException(ErrorCode.CASE_NOT_FOUND, HttpStatus.NOT_FOUND);
}
await this.requireVisibleCase(labCaseId, labOrganizationId);
const link = await this.prisma.labCaseAttachment.findUnique({
where: { labCaseId_attachmentId: { labCaseId, attachmentId } },
@@ -1130,24 +1135,23 @@ export class CasesService {
}
const file = link.attachment;
await this.prisma.labCaseAttachment.delete({
where: { labCaseId_attachmentId: { labCaseId, attachmentId } },
const deleteDisk = await this.prisma.$transaction(async (tx) => {
await tx.labCaseAttachment.delete({
where: { labCaseId_attachmentId: { labCaseId, attachmentId } },
});
// A clinic file that still belongs to a treatment is unlinked from this case only.
if (file.detailId != null) return false;
const stillLinked = await tx.labCaseAttachment.count({
where: { attachmentId },
});
if (stillLinked > 0) return false;
await tx.treatmentDetailAttachment.delete({ where: { id: attachmentId } });
return this.isLabOwnedUpload(file.storagePath, labOrganizationId);
});
// A clinic file that still belongs to a treatment is unlinked from this case only.
if (file.detailId != null) {
return { success: true as const };
}
const stillLinked = await this.prisma.labCaseAttachment.count({
where: { attachmentId },
});
if (stillLinked > 0) {
return { success: true as const };
}
await this.prisma.treatmentDetailAttachment.delete({ where: { id: attachmentId } });
if (this.isLabOwnedUpload(file.storagePath, labOrganizationId)) {
if (deleteDisk) {
this.removeStoredFiles([file.storagePath]);
}
return { success: true as const };

View File

@@ -20,14 +20,9 @@ export type UserNotificationDto = {
actorUserId: string | null;
};
type FanoutInput = {
type RecipientQuery = {
organizationId: string;
type: UserNotificationType;
href: string;
actorUserId?: string | null;
payload?: Record<string, unknown> | null;
/** Explicit recipient user ids (e.g. task assignee). Skips permission fan-out. */
recipientUserIds?: string[];
/** Required tab permission when resolving org members. */
requiredPermission?: string;
/** Any-of tab permissions (OR) when resolving org members. */
@@ -36,6 +31,14 @@ type FanoutInput = {
labCaseIdForProviderScope?: string;
};
type FanoutInput = RecipientQuery & {
type: UserNotificationType;
href: string;
payload?: Record<string, unknown> | null;
/** Explicit recipient user ids (e.g. task assignee). Skips permission fan-out. */
recipientUserIds?: string[];
};
@Injectable()
export class UserNotificationService {
constructor(
@@ -205,8 +208,6 @@ export class UserNotificationService {
const recipientIds = await this.resolveRecipients({
organizationId: input.organizationId,
actorUserId: input.actorUserId,
type: UserNotificationType.LAB_COMMENT,
href: `/cases?caseId=${encodeURIComponent(input.labCaseId)}`,
requiredPermissions: input.requiredPermissions,
});
for (const userId of recipientIds) {
@@ -346,7 +347,7 @@ export class UserNotificationService {
};
}
private async resolveRecipients(input: FanoutInput): Promise<string[]> {
private async resolveRecipients(input: RecipientQuery): Promise<string[]> {
const requiredPermissions = [
...(input.requiredPermissions ?? []),
...(input.requiredPermission ? [input.requiredPermission] : []),

View File

@@ -196,6 +196,8 @@ export function CaseCreatePanel({
const cancelScheduledPersistRef = useRef<() => void>(() => {});
const attachmentIdsRef = useRef<string[]>(labCase.attachments.map((file) => file.id));
attachmentIdsRef.current = plan.attachments.map((file) => file.id);
const filesListEpoch = useRef(0);
const filesListRequest = useRef(0);
useEffect(() => {
if (hydratedIdRef.current === labCase.id) return;
@@ -327,8 +329,16 @@ export function CaseCreatePanel({
useEffect(() => {
if (section !== 'files') return;
const onChanged = () => {
const epoch = filesListEpoch.current;
const request = ++filesListRequest.current;
void casesApi.listAttachments(labCase.id).then((response) => {
setPlan((current) => ({ ...current, attachments: response.data }));
if (epoch !== filesListEpoch.current || request !== filesListRequest.current) return;
setPlan((current) => {
const currentIds = new Set(current.attachments.map((file) => file.id));
const extra = response.data.filter((file) => !currentIds.has(file.id));
if (extra.length === 0) return current;
return { ...current, attachments: [...current.attachments, ...extra] };
});
}).catch(() => undefined);
};
window.addEventListener(tabBadgesChangedEventName(), onChanged);
@@ -344,6 +354,7 @@ export function CaseCreatePanel({
tone: 'danger',
});
if (!accepted) return;
filesListEpoch.current += 1;
cancelScheduledPersistRef.current();
if (persistInFlightRef.current) {
await persistInFlightRef.current.catch(() => null);
@@ -354,6 +365,7 @@ export function CaseCreatePanel({
...line,
attachments: line.attachments.filter((file) => file.id !== attachmentId),
}));
filesListEpoch.current += 1;
} catch (error: unknown) {
onError(getUserFacingError(error, tErrors, t('errorSaveCase')));
}
@@ -449,6 +461,7 @@ export function CaseCreatePanel({
async function handleUploadFile(file: File, onProgress: (percent: number) => void) {
if (!canEdit) return;
filesListEpoch.current += 1;
uploadLockRef.current = true;
cancelScheduledPersistRef.current();
setUploadBusy(true);
@@ -464,6 +477,7 @@ export function CaseCreatePanel({
...line,
attachments: [...line.attachments, ...response.data],
}));
filesListEpoch.current += 1;
} catch (error: unknown) {
onError(getUserFacingError(error, tErrors, t('errorSaveCase')));
throw error;

View File

@@ -329,7 +329,7 @@ export function CaseDetailPanel({
const refreshed = await casesApi.getOne(labCase.id);
onCaseUpdated?.(refreshed.data);
} catch (error: unknown) {
toast.showError(t('errorSaveCase'));
toast.showError(getUserFacingError(error, tErrors, t('errorSaveCase')));
throw error;
}
}

View File

@@ -234,11 +234,10 @@ export function TreatmentDetailsEditor({
<div className="flex flex-wrap gap-2">
{details.map((d, idx) => {
const detailLocked = isDetailLocked(d);
const detailSent = isDetailSent(d);
const isActive = d.clientId === activeDetailId;
const showRemoveAction = Boolean(onRemoveDetail);
const removeDisabled = !canEdit || disabled || Boolean(d.sentAt) || detailLocked || uploadBusy;
const removeDisabled = !canEdit || disabled || detailSent || uploadBusy;
const chipLabel = formatDetailChipLabel(
d,
treatmentCatalog,

View File

@@ -1363,6 +1363,7 @@ export function TreatmentWorkspace({
// A day with no visit must match a fresh open of the tab: one blank line,
// no patient, no leftover plan from the day the arrows just left.
if (!appointmentId && !treatmentId) {
skipNextGetDraftRef.current = false;
const current = detailsRef.current;
const drafts = labCaseDraftsRef.current;
const alreadyBlank =

View File

@@ -23,7 +23,7 @@ export function useCaseSectionCounts(caseId: string, section: CasePanelSection)
const response = await casesApi.sectionCounts(caseId);
if (cancelled) return;
const next = { ...response.data };
if (section === 'files' || section === 'messages') {
if ((section === 'files' || section === 'messages') && next[section] > 0) {
await casesApi.markSectionRead(caseId, section === 'files' ? 'FILES' : 'MESSAGES');
if (cancelled) return;
next[section] = 0;

View File

@@ -401,6 +401,12 @@ docker compose -f docker-compose.prod.yml --env-file .env up -d
Backend runs `prisma migrate deploy` automatically on container start.
### Large attachment uploads
Case and treatment files have no size cap. Nginx `/api` (`nginx.ssl.conf.template`, rendered on deploy) sets `client_max_body_size 0`, `send_timeout 3600s`, and `proxy_request_buffering off`. `location /` and `/admin` stay at 50MB. JSON bodies stay on the Express limit; only multipart uploads are unlimited.
A tag deploy that recreates nginx picks this up. Pulling only the backend image leaves the previous 50MB `/api` cap. Uploaded files are written to the backend container disk (`/app/uploads`, no volume). A very large upload can fill that disk, and recreating the backend container removes those files.
---
## Troubleshooting

View File

@@ -257,6 +257,8 @@ curl.exe http://127.0.0.1/health
Replace any **default_server** / leftover `server { listen 80; }` in the host nginx that returns 404, or this file will never win.
Attachment uploads are unlimited only on `location /api` in this host file **and** in the Docker nginx behind it. Reloading Docker without pasting `windows-edge-http.conf` and running `nginx -s reload` leaves the Windows edge at 50MB, so a large scan still fails before it reaches the API.
From another machine (after **router forward TCP 80** → this PC):
```bash

View File

@@ -43,6 +43,7 @@ server {
# rejected or dropped when the client pauses.
client_max_body_size 0;
client_body_timeout 3600s;
send_timeout 3600s;
proxy_request_buffering off;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;

View File

@@ -46,6 +46,7 @@ server {
# rejected or dropped when the client pauses.
client_max_body_size 0;
client_body_timeout 3600s;
send_timeout 3600s;
proxy_request_buffering off;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;

View File

@@ -87,6 +87,7 @@ server {
# rejected or dropped when the client pauses.
client_max_body_size 0;
client_body_timeout 3600s;
send_timeout 3600s;
proxy_request_buffering off;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;

View File

@@ -81,6 +81,7 @@ server {
# rejected or dropped when the client pauses.
client_max_body_size 0;
client_body_timeout 3600s;
send_timeout 3600s;
proxy_request_buffering off;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;

View File

@@ -46,6 +46,7 @@ http {
location /api {
client_max_body_size 0;
client_body_timeout 3600s;
send_timeout 3600s;
proxy_request_buffering off;
proxy_pass http://127.0.0.1:18088;
proxy_http_version 1.1;
@@ -88,6 +89,7 @@ http {
location /api {
client_max_body_size 0;
client_body_timeout 3600s;
send_timeout 3600s;
proxy_request_buffering off;
proxy_pass http://127.0.0.1:18088;
proxy_http_version 1.1;