Skip to content

Add export-to-CSV functionality for Orders and Inventory - #243

Open
paudichya5 wants to merge 5 commits into
beck-source:mainfrom
paudichya5:feature/export-to-csv
Open

Add export-to-CSV functionality for Orders and Inventory#243
paudichya5 wants to merge 5 commits into
beck-source:mainfrom
paudichya5:feature/export-to-csv

Conversation

@paudichya5

Copy link
Copy Markdown

Summary

Adds export-to-CSV functionality for Orders and Inventory pages, allowing users to download filtered data as CSV files with proper formatting and translations.

Changes

  • ✅ New CSV export utility (client/src/utils/csvExport.js)
  • ✅ Export buttons on Orders and Inventory pages
  • ✅ Proper CSV formatting with escaped values
  • ✅ i18n translations for export button (EN + JA)
  • ✅ Filenames include export date (e.g., orders-2026-08-13.csv)

Features

  • Respects all active filters and search queries
  • Uses translated values (status labels, product names, etc.)
  • Accessible button styling with proper states
  • Integrates seamlessly with design system

Testing

  • Export buttons visible on both pages
  • CSV files download with correct data
  • Works with filters and search
  • Translations display correctly (EN/JA)

paudichya5 and others added 5 commits August 13, 2026 13:52
Add Claude Code GitHub Actions workflows
## Features Added
- New Restocking tab with smart budget-based recommendations
  - Budget slider ($0-$100K) with real-time recommendation updates
  - Weighted algorithm combining demand trend (40%), stock urgency (35%), cost efficiency (25%)
  - Checkbox selection with budget constraint validation
  - "Place Order" functionality that creates persistent restocking orders

## Components Created
- Restocking.vue: Main restocking view with budget slider and recommendations
- OrderSubmittedModal.vue: Success confirmation modal with order details

## API Enhancements
- POST /api/restocking-orders: Create restocking orders with 30-day delivery
- GET /api/restocking/recommendations: Smart recommendation engine
- Added getQuarterlyReports() and getMonthlyTrends() to api.js

## Bug Fixes
- Reports.vue: Fixed 8 critical issues
  - Converted to Composition API (was Options API)
  - Added full i18n support (was hardcoded English)
  - Integrated global filters (was ignoring filters)
  - Removed 13+ console.log spam
  - Centralized API calls via api.js
  - Added currency locale support (JPY/USD)
  - Fixed nav tab translation

- Backlog.vue: Fixed i18n integration
  - Added useI18n() import and t() calls
  - Translated all UI text and table headers
  - Priority labels now use i18n

## Translations
- Added 50+ new translation keys (en.js + ja.js)
  - Restocking feature (budget, recommendations, order submission)
  - Reports page (quarterly, monthly, summary sections)
  - Backlog management (items, priorities, table headers)
  - Reports nav tab now translates properly

## Data & Backend
- Added 2 sample restocking orders to orders.json
- Backend endpoints return proper Pydantic models
- Orders persist to JSON file and in-memory storage

## Testing
- End-to-end Playwright testing via MCP confirms:
  - Budget slider works with real-time updates
  - Recommendations load and filter correctly
  - Item selection respects budget constraints
  - Order submission creates unique order numbers
  - Orders appear in Orders tab with correct status
  - Delivery date calculated as current_date + 30 days
  - i18n translations working across all pages

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
## Features
- New CSV export buttons on Orders and Inventory pages
- Exports all visible items (respects filters and search)
- Properly formatted CSV with headers and escaped values
- Filenames include export date (e.g., orders-2026-08-13.csv)

## Files Added
- client/src/utils/csvExport.js: Reusable CSV export utility

## Files Modified
- client/src/views/Orders.vue: Added export button and exportOrders() method
- client/src/views/Inventory.vue: Added export button and exportInventory() method
- client/src/locales/en.js: Added "Export CSV" translation
- client/src/locales/ja.js: Added Japanese translation

## Implementation Details
- CSV files properly escape quotes and newlines
- Export respects translations (uses t() for status values)
- Button styling matches design system
- Works with all filters and search queries
- Accessible with proper hover states

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant