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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "input=$(cat); model=$(echo \"$input\" | jq -r '.model.display_name // \"Unknown\"'); usage=$(echo \"$input\" | jq '.context_window.current_usage'); if [ \"$usage\" != \"null\" ]; then current=$(echo \"$usage\" | jq '.input_tokens + .cache_creation_input_tokens + .cache_read_input_tokens'); size=$(echo \"$input\" | jq '.context_window.context_window_size'); pct=$((current * 100 / size)); ctx=$(printf '%d%% ctx' \"$pct\"); else ctx='0% ctx'; fi; branch=$(git -c core.useBuiltinFSMonitor=false branch --show-current 2>/dev/null || echo 'no-git'); cwd=$(basename \"$(pwd)\"); printf '\\033[36m%s\\033[0m | \\033[33m%s\\033[0m | \\033[32m%s\\033[0m | \\033[35m%s\\033[0m' \"$model\" \"$ctx\" \"$branch\" \"$cwd\""
|
||||
"command": "/home/claude/.claude/statusline.sh"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user