mirror of
https://github.com/christianvidalwolf-prog/Craze-Data-check.git
synced 2026-08-03 15:45:24 +02:00
Remove missingClass tab, keep only missingLaunch
This commit is contained in:
@@ -36,7 +36,7 @@ function isEmptyOrEpoch(val: any): boolean {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
type TabType = 'missingClass' | 'missingLaunch';
|
type TabType = 'missingLaunch';
|
||||||
|
|
||||||
interface EditingState {
|
interface EditingState {
|
||||||
rowIndex: number;
|
rowIndex: number;
|
||||||
@@ -46,7 +46,7 @@ interface EditingState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function MissingDataView({ data, headers, onSaveRow, onCaptureState }: MissingDataViewProps) {
|
export function MissingDataView({ data, headers, onSaveRow, onCaptureState }: MissingDataViewProps) {
|
||||||
const [activeTab, setActiveTab] = useState<TabType>('missingClass');
|
const [activeTab, setActiveTab] = useState<TabType>('missingLaunch');
|
||||||
const [search, setSearch] = useState('');
|
const [search, setSearch] = useState('');
|
||||||
const [sortCol, setSortCol] = useState<number | null>(null);
|
const [sortCol, setSortCol] = useState<number | null>(null);
|
||||||
const [sortDesc, setSortDesc] = useState(false);
|
const [sortDesc, setSortDesc] = useState(false);
|
||||||
@@ -103,13 +103,6 @@ export function MissingDataView({ data, headers, onSaveRow, onCaptureState }: Mi
|
|||||||
const filteredData = useMemo(() => {
|
const filteredData = useMemo(() => {
|
||||||
let result = data.map((row, index) => ({ row, index }));
|
let result = data.map((row, index) => ({ row, index }));
|
||||||
|
|
||||||
if (activeTab === 'missingClass') {
|
|
||||||
result = result.filter(r => {
|
|
||||||
const val = r.row[COLUMNS.CLASSIFICATION];
|
|
||||||
return !val || String(val).trim() === '';
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (activeTab === 'missingLaunch') {
|
if (activeTab === 'missingLaunch') {
|
||||||
result = result.filter(r => {
|
result = result.filter(r => {
|
||||||
const val = launchDateCol >= 0 ? r.row[launchDateCol] : undefined;
|
const val = launchDateCol >= 0 ? r.row[launchDateCol] : undefined;
|
||||||
@@ -188,7 +181,6 @@ export function MissingDataView({ data, headers, onSaveRow, onCaptureState }: Mi
|
|||||||
};
|
};
|
||||||
|
|
||||||
const tabs: { id: TabType; label: string }[] = [
|
const tabs: { id: TabType; label: string }[] = [
|
||||||
{ id: 'missingClass', label: 'Missing Classification' },
|
|
||||||
{ id: 'missingLaunch', label: 'Missing Launch Date' },
|
{ id: 'missingLaunch', label: 'Missing Launch Date' },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user