feat(ui): order totals, decimals, mobile modal cards, set editing
- Dashboard/Logs: Total column with 2 decimals (order_total) - Order detail modal: totals summary row (items total + order total) - Order detail modal mobile: compact article cards (d-md-none) - Mappings: openEditModal loads all CODMATs for SKU, saveMapping replaces entire set via delete-all + batch POST - Add project-specific team agents: ui-templates, ui-js, ui-verify, backend-api - CLAUDE.md: mandatory preview approval before implementation, fix-loop after verification, server must start via start.sh Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
36
CLAUDE.md
36
CLAUDE.md
@@ -20,8 +20,9 @@ Importa automat comenzi din GoMag in sistemul ERP ROA Oracle. Stack complet Pyth
|
||||
## Development Commands
|
||||
|
||||
```bash
|
||||
# Run FastAPI server
|
||||
cd api && uvicorn app.main:app --host 0.0.0.0 --port 5003 --reload
|
||||
# Run FastAPI server — INTOTDEAUNA via start.sh (seteaza Oracle env vars)
|
||||
./start.sh
|
||||
# NU folosi uvicorn direct — lipsesc LD_LIBRARY_PATH si TNS_ADMIN pentru Oracle
|
||||
|
||||
# Tests
|
||||
python api/test_app_basic.py # Test A - fara Oracle
|
||||
@@ -30,18 +31,21 @@ python api/test_integration.py # Test C - cu Oracle
|
||||
|
||||
## UI Development Workflow: Before → Preview → After
|
||||
|
||||
For UI/frontend changes, follow this visual verification workflow:
|
||||
**OBLIGATORIU**: Respecta ordinea exacta. NU treci la pasul urmator fara aprobare explicita.
|
||||
|
||||
### 1. Before Screenshots
|
||||
Capture current state with Playwright MCP at target viewports:
|
||||
Captureaza starea curenta cu Playwright MCP:
|
||||
- **Mobile:** 375x812
|
||||
- **Desktop:** 1440x900
|
||||
Save to `screenshots/before/`
|
||||
Salveaza in `screenshots/before/`
|
||||
|
||||
### 2. Plan & Preview
|
||||
- Write implementation plan with design decisions
|
||||
- Generate preview mockups if needed → save to `screenshots/preview/`
|
||||
- Get user approval on previews before implementation
|
||||
### 2. Plan & Preview — ASTEAPTA APROBARE
|
||||
1. Citeste TOATE fisierele implicate
|
||||
2. Scrie planul de implementare cu decizii de design
|
||||
3. Genereaza mockup-uri HTML/CSS statice care arata rezultatul asteptat → salveaza in `screenshots/preview/`
|
||||
4. **Prezinta mockup-urile userului si ASTEAPTA aprobare explicita**
|
||||
5. Rafineaza planul daca userul cere modificari
|
||||
6. **NU trece la implementare pana userul nu spune explicit "ok", "aprob", "executa" sau similar**
|
||||
|
||||
### 3. Implementation cu TeamCreate (Agent Teams)
|
||||
|
||||
@@ -57,7 +61,12 @@ Folosim **TeamCreate** (team agents), NU superpowers subagents. Diferenta:
|
||||
- Task 1: Templates + CSS (HTML templates, style.css, cache-bust)
|
||||
- Task 2: JavaScript (shared.js, dashboard.js, logs.js, mappings.js)
|
||||
- Task 3: Verificare Playwright (depinde de Task 1 + Task 2)
|
||||
4. **Agent tool** cu `team_name` spawneaza teammates care isi iau task-uri din lista
|
||||
4. **Agent tool** cu `team_name` spawneaza teammates folosind agentii predefiniti din `.claude/agents/`:
|
||||
- `subagent_type: ui-templates` → pentru Task 1 (templates + CSS)
|
||||
- `subagent_type: ui-js` → pentru Task 2 (JavaScript)
|
||||
- `subagent_type: ui-verify` → pentru Task 3 (Playwright verification)
|
||||
- `subagent_type: backend-api` → pentru modificari backend/API (routers, services, Oracle/SQLite)
|
||||
- `subagent_type: qa-tester` → pentru teste de integrare
|
||||
5. Teammates lucreaza in paralel, comunica intre ei, marcheaza task-uri completate
|
||||
6. Cand Task 1 + Task 2 sunt complete, teammate-ul de verificare preia Task 3
|
||||
|
||||
@@ -68,6 +77,13 @@ Folosim **TeamCreate** (team agents), NU superpowers subagents. Diferenta:
|
||||
4. Raporteaza discrepante la team lead
|
||||
5. Verifica ca desktop-ul ramane neschimbat
|
||||
|
||||
#### Bucla de corectie (responsabilitatea team lead-ului):
|
||||
1. Dupa ce verify-agent raporteaza, **team lead-ul analizeaza discrepantele**
|
||||
2. Pentru fiecare discrepanta, creeaza un nou task de fix si spawneaza un agent sa-l rezolve
|
||||
3. Dupa fix, spawneaza din nou verify-agent pentru re-verificare
|
||||
4. **Repeta bucla** pana cand toate verificarile trec (after ≈ preview)
|
||||
5. Abia atunci declara task-ul complet
|
||||
|
||||
```
|
||||
screenshots/
|
||||
├── before/ # Starea inainte de modificari
|
||||
|
||||
Reference in New Issue
Block a user