mirror of
https://github.com/christianvidalwolf-prog/CrazeAnalytix.git
synced 2026-08-03 12:25:22 +02:00
Integrate stock availability data and StockBadge component across all views
This commit is contained in:
@@ -2,6 +2,8 @@ import React, { useMemo, useState, useEffect, useCallback } from 'react';
|
||||
import * as XLSX from 'xlsx';
|
||||
import { ProductForecastData, FilterState } from '../types';
|
||||
import { DownloadIcon } from './Icons';
|
||||
import { StockBadge } from './StockBadge';
|
||||
import { StockBadge } from './StockBadge';
|
||||
import {
|
||||
BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer,
|
||||
LineChart, Line, Legend, ComposedChart, Area
|
||||
@@ -13,7 +15,9 @@ interface ForecastViewProps {
|
||||
top50Ranking?: {
|
||||
eu: Map<string, number>;
|
||||
uk: Map<string, number>;
|
||||
stockMap?: Map<string, number>;
|
||||
};
|
||||
stockMap?: Map<string, number>;
|
||||
}
|
||||
|
||||
const MONTH_ORDER = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
||||
@@ -29,7 +33,7 @@ const Top50Badge: React.FC<{ rank: number; label: string; theme?: 'amber' | 'ind
|
||||
);
|
||||
};
|
||||
|
||||
const ForecastView: React.FC<ForecastViewProps> = ({ data, filters, top50Ranking }) => {
|
||||
const ForecastView: React.FC<ForecastViewProps> = ({ data, filters, top50Ranking, stockMap, stockMap }) => {
|
||||
const [searchTerm, setSearchTerm] = useState('');
|
||||
const [showOnlyTop50, setShowOnlyTop50] = useState(false);
|
||||
const [top50Mode, setTop50Mode] = useState<'eu' | 'uk'>('eu');
|
||||
|
||||
Reference in New Issue
Block a user