A tooth named twice — once bare, once with a job — was counted as jobless. joblessProsthesisTargets adds an uncovered target inside the loop, but a LATER assignment can still cover it, and nothing re-checked at the end. The sheet then showed 13 with its crown AND struck through as "no prosthesis heard". prosthesisTargetLines also returns a line per target including one with nothing applied and nothing refused, so the sheet printed a dangling "13: " beside the jobless entry for the same tooth. The sheet now renders only lines carrying a code; the unfiltered list still feeds the chart, so a target pending a material pick stays selected. A line whose codes were all refused no longer opens with a leading " + ". applyVoiceResult now reads labCaseDraftsRef.current rather than the state. Every other handler writes that ref beside setLabCaseDrafts precisely because a save in the same tick reads it; this path was the one left reading state, so a draft added earlier in the same tick could be dropped. Found by /code-review. One new test, verified to fail without the fix. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Dyolink — Frontend (Next.js)
Prerequisites
- Node.js 20+ and npm
First-time setup
-
Clone the monorepo and go to the frontend app:
git clone <repository-url> dyolink cd dyolink/frontend -
Install dependencies
npm install -
Environment
Create
.env.localin this folder (not committed to git) with the public URLs your browser will use:NEXT_PUBLIC_APP_URL=http://localhost:3001 NEXT_PUBLIC_API_URL=http://localhost:3000/api NEXT_PUBLIC_APP_NAME=Dyolink- Adjust
NEXT_PUBLIC_API_URLif the Nest API runs on another host/port. - These values are baked in at build time for production images; for local dev, restart
npm run devafter changing them.
- Adjust
Run (development)
npm run dev
Open http://localhost:3001 (dev server uses port 3001 so it does not clash with the API on 3000).
Ensure the backend is running and NEXT_PUBLIC_API_URL matches its base URL (including /api if your API is mounted there).
After pulling latest main
git pull
npm install
Useful commands
| Command | Purpose |
|---|---|
npm run dev |
Development server (port 3001) |
npm run build |
Production build |
npm run start |
Serve production build (port 3000 — used inside Docker) |
npm run lint |
ESLint |
Docker
Image build and build-args (NEXT_PUBLIC_*) are documented in the repository root README.md. Next standalone does not include public/ — frontend/Dockerfile copies it so /prosthesis-catalog/*.svg is served in production.