Commit graph

2 commits

Author SHA1 Message Date
DJP
df403363a9 Add file preview selector and download all functionality
Title Changes:
- App title: "L'Oréal OMG Assistant Global"
- Tab 1: "Master Global Asset Submission"
- Upload button: "Approve & Upload to OMG"

Preview Enhancements:
- Dropdown selector to preview all 16 CSV files individually
- Shows filename with ISO code (e.g., "en-GB - OMG1601654_...")
- Switch between files to view complete data for each
- Show ALL rows (not just first 20)

Download Features:
- "Download Current File" - Download the currently previewed CSV
- "Download All Files (ZIP)" - Download all 16 CSVs as a ZIP archive
- get-csv-preview.php: Endpoint to fetch any file for preview
- download-all-csv.php: Creates ZIP with all CSVs

UX Improvements:
- File selector styled with brand colors
- Clear labeling of which file is being previewed
- Easy navigation between all regional CSVs
- Test before upload with full data visibility

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 17:27:25 -05:00
DJP
d31f394ad5 Add Global to Local CSV transformation frontend with visual progress tracking
Created Complete Tab System:
- header.php: Shared navigation between Asset Submission and Global to Local tabs
- global-to-local.php: Upload page with drag & drop, progress tracker, preview
- global-to-local.js: Frontend logic for upload, processing, preview, and Box upload

Visual Progress System:
- 6-stage progress tracker with icons and status (⏸️ pending, 🔄 processing,  success, ⚠️ warning,  error)
- Real-time status updates for each stage
- Detailed error cards with actionable messages
- Warning cards for data quality issues
- Success cards with completion info

Features:
- Drag & drop CSV upload with file size validation
- Step-by-step progress visualization
- Error reporting at each stage (upload, parse, campaign, OMG API, business unit, transform)
- CSV preview table (first 50 rows) before Box upload
- Download preview CSV before committing
- User approval required before Box upload
- Summary cards showing input/output counts, campaign, business unit

Error Handling:
- File validation errors (wrong type, too large, empty)
- CSV parsing errors (malformed, wrong columns)
- Campaign extraction errors (invalid filename)
- OMG API errors (404, timeout, auth failure)
- Business unit mapping errors (unrecognized brands)
- Date transformation errors (invalid formats)
- Box upload errors (permissions, folder issues)

UI Enhancements:
- Tab navigation with active state highlighting
- Professional error cards with details and actions
- Responsive design for mobile/desktop
- Maintains black/yellow L'Oréal brand colors

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 16:48:43 -05:00