Commit Graph
7 Commits
Author SHA1 Message Date
Christian Vidal WolfandClaude Sonnet 4.6 36fa63b6c1 fix: zero out deals/promos/chargebacks when 2025 is not in filtered scope
These Excel files only contain 2025 data. When the top filter excludes
2025 (e.g. year=2024), the maps are ignored so columns show 0 instead
of stale 2025 figures.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-12 16:26:52 +01:00
Christian Vidal WolfandClaude Sonnet 4.6 0eda5551d8 fix: include all ad-spend ASINs in MKT tab to match ADs Weekly total
Two bugs fixed:
1. Removed hardcoded year===2025 filter (data is already pre-filtered)
2. ASINs with ad spend but no sales records were silently dropped —
   now appended as extra rows so the total PPC spend matches ADs Weekly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-12 16:18:46 +01:00
Christian Vidal WolfandClaude Sonnet 4.6 657009a7ba feat: wire MKT tab to top-level filters and remove internal category filter
MktDataView now receives filteredData/filteredAdsData so the global
FilterBar controls the tab's data. Removed the local "All Categories"
dropdown that previously sat next to the Include COGS toggle.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-12 14:35:37 +01:00
Christian Vidal Wolf 9c55d132dd feat(mkt): filter sales and ads to 2025 only and show full product catalog 2026-03-11 13:06:06 +01:00
Christian Vidal WolfandClaude Sonnet 4.6 6a1cb0e8dd refactor: consolidate 3 MKT fetch routes into fetch-mkt-data to stay within Vercel 12-function limit
Replace fetch-deals, fetch-promos, fetch-chargebacks with a single
/api/fetch-mkt-data?file=deals|promos|chargebacks endpoint.
Update MktDataView fetch calls accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-11 12:36:45 +01:00
Christian Vidal WolfandClaude Sonnet 4.6 49498c5c51 feat: wire MKT tab to real data sources
Replace all mock data in the Profitability Dashboard with live data:
- Add 3 new API routes (fetch-deals, fetch-promos, fetch-chargebacks) proxying Dropbox Excel files
- MktDataView now accepts rawData/adsData props and fetches+parses the 3 new files on mount
- SELL OUT and units aggregated globally across all marketplaces from rawData
- PPC Spend aggregated globally from adsData; ACoS calculated as spend/sales
- Deals (col A→C), Promos (col E→K), Chargebacks (col AN→B) parsed and summed per ASIN
- Category filter populated from product line metadata
- Loading skeleton shown while files are fetching

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-11 12:34:07 +01:00
Christian Vidal Wolf 455cd8ed08 feat: add MKT tab and integrate profitability dashboard 2026-03-11 09:27:57 +01:00