feat(data-entry): Add unified receipt form with OCR confidence tracking
New unified receipt creation system with: - UnifiedReceiptForm component with inline OCR preview and confidence indicators - Compact upload zone with drag-drop and camera support - TVA and Payment fields with dynamic add/remove - Supplier dual-field with autocomplete and OCR hint - Receipt form sections with collapsible auxiliary data Backend OCR improvements: - Add confidence_tva and confidence_payment to extraction results - Update TVA extraction to return confidence scores - Include TVA (15%) and payment (10%) in overall_confidence calculation Also includes: - CSS design system rules documentation - Port check helper function for service scripts - Expanded design tokens documentation in CLAUDE.md Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -96,3 +96,41 @@ color: var(--red-600); /* Error text */
|
||||
- Use hardcoded backgrounds like `#ffffff` or `white` (use `var(--surface-card)`)
|
||||
- Create scoped CSS for patterns that already exist in shared files
|
||||
- **Skip theme testing** - ALWAYS test cu toggle (auto/light/dark) + DevTools dark mode
|
||||
|
||||
## PrimeVue Component Patterns
|
||||
|
||||
### Dropdown în Forme Compacte
|
||||
**OBLIGATORIU:** Folosește clasa `dropdown-borderless` pentru toate dropdown-urile în forme compacte/inline:
|
||||
|
||||
```html
|
||||
<Dropdown ... class="my-select dropdown-borderless" />
|
||||
```
|
||||
|
||||
Clasa este definită global (în `ReceiptCreateView.vue` non-scoped) și elimină border, background și box-shadow pentru un look minimalist.
|
||||
|
||||
### Entry Chips / Inline Labels (Dark Mode)
|
||||
Pentru elemente custom care afișează date inline (chips, tags, badges):
|
||||
|
||||
```css
|
||||
/* ✅ CORECT - folosește semantic tokens */
|
||||
.entry-chip {
|
||||
background: var(--surface-hover);
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
[data-theme="dark"] .entry-chip {
|
||||
background: var(--surface-100);
|
||||
}
|
||||
|
||||
/* ❌ GREȘIT - culori hardcodate */
|
||||
.entry-chip {
|
||||
background: #f1f5f9; /* NU! */
|
||||
color: #111827; /* NU! */
|
||||
}
|
||||
```
|
||||
|
||||
### Reguli Dark Mode pentru Componente Custom
|
||||
1. **Text:** Folosește `var(--text-color)` sau `var(--text-color-secondary)` - se adaptează automat
|
||||
2. **Background:** Folosește `var(--surface-hover)` pentru hover/chips în light mode
|
||||
3. **Dark override:** Folosește `[data-theme="dark"]` cu `var(--surface-100)` sau `var(--surface-200)`
|
||||
4. **NU hardcoda:** Niciodată `#d1d5db`, `#f9fafb`, `#334155` direct în CSS
|
||||
|
||||
Reference in New Issue
Block a user