Commit graph

6 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
DJP
9923ec24a0 Fix Lookup button alignment and layout
- Changed align-items to stretch for proper vertical alignment
- Added flex: 1 to input for proper width distribution
- Added flex-shrink: 0 to button to prevent shrinking
- Increased min-width to 120px for 'Looking up...' text
- Fixed transform on disabled state

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 15:14:45 -05:00
DJP
f70fe30ea2 Show user email in header for both SSO and local modes
- Display user email in top right of header bar
- Update header layout with flexbox
- Show email in yellow (#FFC407) color
- Always visible regardless of SSO mode

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 14:55:54 -05:00
DJP
b412356b4b Add Lookup button and nested folder contents display
Features:
- Added "Lookup" button to trigger Box ID validation manually
- No automatic validation on typing - user must click Lookup
- Recursive folder contents fetching (3 levels deep)
- Collapsible nested folder display with expand/collapse buttons
- Visual hierarchy with indentation and folder icons
- Shows all files within nested folders
- Updated UI with better folder/file organization

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 14:48:25 -05:00
DJP
dbf7090d09 Initial commit: L'Oréal Box Asset Submission Form
- Set up PHP application with Composer and JWT library
- Implemented SSO authentication with local dev mode
- Created Box API service for folder validation
- Built two-column form interface (form + preview)
- Added real-time Box ID validation with AJAX
- Integrated webhook submission with status response
- Auto-populate Master Campaign Number from Box folder hierarchy
- Responsive design with Montserrat font and black/yellow theme

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

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