mirror of
https://github.com/christianvidalwolf-prog/CrazeAnalytix.git
synced 2026-08-03 12:25:22 +02:00
Refine StockBadge design to Top 50 style and move to title row across all views
This commit is contained in:
@@ -3,7 +3,6 @@ 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
|
||||
@@ -15,7 +14,6 @@ interface ForecastViewProps {
|
||||
top50Ranking?: {
|
||||
eu: Map<string, number>;
|
||||
uk: Map<string, number>;
|
||||
stockMap?: Map<string, number>;
|
||||
};
|
||||
stockMap?: Map<string, number>;
|
||||
}
|
||||
@@ -33,7 +31,7 @@ const Top50Badge: React.FC<{ rank: number; label: string; theme?: 'amber' | 'ind
|
||||
);
|
||||
};
|
||||
|
||||
const ForecastView: React.FC<ForecastViewProps> = ({ data, filters, top50Ranking, stockMap, stockMap }) => {
|
||||
const ForecastView: React.FC<ForecastViewProps> = ({ data, filters, top50Ranking, stockMap }) => {
|
||||
const [searchTerm, setSearchTerm] = useState('');
|
||||
const [showOnlyTop50, setShowOnlyTop50] = useState(false);
|
||||
const [top50Mode, setTop50Mode] = useState<'eu' | 'uk'>('eu');
|
||||
@@ -411,8 +409,11 @@ const ForecastView: React.FC<ForecastViewProps> = ({ data, filters, top50Ranking
|
||||
</div>
|
||||
</div>
|
||||
{/* Title Row */}
|
||||
<div className="text-[13px] font-medium text-slate-100 leading-snug group-hover:text-white transition-colors">
|
||||
{p.title}
|
||||
<div className="flex items-start gap-2 text-[13px] font-medium text-slate-100 leading-snug group-hover:text-white transition-colors">
|
||||
<span className="truncate max-w-[170px]">{p.title}</span>
|
||||
{stockMap && (
|
||||
<StockBadge stock={stockMap.get(p.sku?.replace(/(DE|EN)$/i, ''))} />
|
||||
)}
|
||||
</div>
|
||||
{/* Line Row */}
|
||||
<div className="text-[10px] font-black text-[#ec4899] uppercase tracking-[0.15em]">
|
||||
|
||||
Reference in New Issue
Block a user