feat(frontend): add drag-and-drop reordering and inline editing for routine steps

- Install svelte-dnd-action v0.9.69
- Use dragHandleZone + dragHandle for per-step ⋮⋮ drag handles
- PATCH only steps whose order_index changed after a drop
- Inline edit mode (✎ button) expands step in-place: product steps show product/dose/region selects; action steps show action_type/notes
- DnD disabled while a step is being edited

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Piotr Oleszczyk 2026-03-01 17:21:59 +01:00
parent 5e2536138b
commit 4b0fedde35
3 changed files with 243 additions and 30 deletions

View file

@ -23,6 +23,9 @@ importers:
mode-watcher:
specifier: ^1.1.0
version: 1.1.0(svelte@5.53.5)
svelte-dnd-action:
specifier: ^0.9.69
version: 0.9.69(svelte@5.53.5)
tailwind-merge:
specifier: ^3.5.0
version: 3.5.0
@ -968,6 +971,11 @@ packages:
svelte: ^4.0.0 || ^5.0.0-next.0
typescript: '>=5.0.0'
svelte-dnd-action@0.9.69:
resolution: {integrity: sha512-NAmSOH7htJoYraTQvr+q5whlIuVoq88vEuHr4NcFgscDRUxfWPPxgie2OoxepBCQCikrXZV4pqV86aun60wVyw==}
peerDependencies:
svelte: '>=3.23.0 || ^5.0.0-next.0'
svelte-toolbelt@0.10.6:
resolution: {integrity: sha512-YWuX+RE+CnWYx09yseAe4ZVMM7e7GRFZM6OYWpBKOb++s+SQ8RBIMMe+Bs/CznBMc0QPLjr+vDBxTAkozXsFXQ==}
engines: {node: '>=18', pnpm: '>=8.7.0'}
@ -1828,6 +1836,10 @@ snapshots:
transitivePeerDependencies:
- picomatch
svelte-dnd-action@0.9.69(svelte@5.53.5):
dependencies:
svelte: 5.53.5
svelte-toolbelt@0.10.6(@sveltejs/kit@2.53.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.53.5)(vite@7.3.1(@types/node@25.3.3)(jiti@2.6.1)(lightningcss@1.31.1)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.1(@types/node@25.3.3)(jiti@2.6.1)(lightningcss@1.31.1)))(svelte@5.53.5):
dependencies:
clsx: 2.1.1