feat(data-entry): Bulk Receipt Upload cu Mobile UX Android Nativ
## Funcționalități Principale ### Bulk Upload & Processing - Drag & drop pentru upload bonuri multiple oriunde pe pagină - Batch processing cu job queue și worker pool - Real-time updates via SSE (Server-Sent Events) cu fallback polling - Duplicate detection via SHA-256 file hash - Auto-retry pentru job-uri failed - Cancel individual jobs sau batch complet ### Mobile UX - Android Native Style - Top bar fixă cu hamburger, titlu centrat, acțiuni (search/filter) - Bottom navigation cu 4 tab-uri (Bonuri, Upload, Rapoarte, Setări) - FAB (Floating Action Button) cu hide/show on scroll - Filter chips orizontal scrollabile - Selecție multiplă prin long-press (500ms) - Select All + Bulk Delete cu confirmare - Layout Android pentru Create/Edit/View bon (Gmail compose style) ### Bug Fixes - Refresh individual via SSE în loc de refresh total pagină - Bonurile cu eroare OCR rămân vizibile pentru editare manuală - Afișare nume fișier original pentru toate bonurile - Upload stabil pe mobil (fix race condition File API) - Păstrare ordine bonuri la refresh (nu se reordonează) ### Backend - SSE endpoint pentru status updates real-time - Bulk delete endpoint cu partial success - Auto-cleanup bonuri failed după 7 zile - Batch model cu tracking complet ### Testing - E2E tests cu Playwright - Unit tests pentru bulk upload, auto-create, cleanup ## Commits Squashed: 43 user stories (US-001 → US-043) ## Branch: ralph/bulk-receipt-upload ## Timp dezvoltare: ~3 zile (Ralph autonomous) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -140,3 +140,20 @@ const getStorageKey = () => {
|
||||
@2025-12-24 #vue #watch #reactive | inferred:high
|
||||
**P**: Period dropdown stayed on placeholder - handleCompanyChanged() existed but periods never loaded.
|
||||
**S**: Add Vue watch() on companyStore.selectedCompany with { immediate: true } to handle both initial load and changes.
|
||||
|
||||
## G: Mobile File Input Reset Causes Page Reload/Crash
|
||||
@2026-01-10 #mobile #file-upload #async #chrome-android | explicit:high
|
||||
**P**: On Chrome Mobile (Android/iOS), selecting multiple files in bulk upload caused page reload before "Process" button could be clicked. Files disappeared.
|
||||
**C**: Race condition - `onFilesSelected` called async `handleFiles()` (which clones files with `arrayBuffer()`) but immediately reset `fileInput.value = ''` without waiting. On mobile browsers, resetting input invalidates File object references while `arrayBuffer()` is still reading them.
|
||||
**S**: Make event handler async and await `handleFiles()` before resetting input:
|
||||
```javascript
|
||||
const onFilesSelected = async (event) => {
|
||||
const files = event.target?.files
|
||||
if (files?.length > 0) {
|
||||
await handleFiles(Array.from(files)) // Wait for cloning!
|
||||
}
|
||||
// Reset AFTER handleFiles completes
|
||||
if (fileInput.value) fileInput.value.value = ''
|
||||
}
|
||||
```
|
||||
**Applied in**: `src/modules/data-entry/components/bulk/BulkUploadZone.vue`
|
||||
|
||||
Reference in New Issue
Block a user