feat: enable sorting and filtering by Revenue in Weekly Sales grid

This commit is contained in:
Christian Vidal Wolf
2026-02-19 16:48:48 +01:00
parent ab79f2ca6e
commit 557703c5ea
2 changed files with 19 additions and 16 deletions
+4 -4
View File
@@ -2,7 +2,7 @@ import React, { useState, useRef, useEffect } from 'react';
export interface NumericFilterConfig {
week: string;
metric: 'units' | 'spend' | 'gv';
metric: 'units' | 'spend' | 'revenue' | 'gv';
operator: '=' | '>' | '>=' | '<' | '<=' | 'between';
value: number;
value2?: number;
@@ -10,7 +10,7 @@ export interface NumericFilterConfig {
interface NumericColumnFilterProps {
week: string;
metric: 'units' | 'spend' | 'gv';
metric: 'units' | 'spend' | 'revenue' | 'gv';
currentFilter: NumericFilterConfig | null;
onFilterChange: (filter: NumericFilterConfig | null) => void;
accentColor?: 'indigo' | 'amber' | 'teal';
@@ -127,8 +127,8 @@ export const NumericColumnFilter: React.FC<NumericColumnFilterProps> = ({
setIsOpen(!isOpen);
}}
className={`flex items-center justify-center w-4 h-4 rounded text-[9px] font-black transition-all ${isActive
? colors.active
: `text-slate-600 ${colors.hover}`
? colors.active
: `text-slate-600 ${colors.hover}`
}`}
title={isActive ? `${metric}: ${operatorSymbol} ${currentFilter?.value}${currentFilter?.value2 ? ` - ${currentFilter.value2}` : ''}` : `Filter ${metric}`}
>