Fix: Implement dynamic column detection to handle Excel structure changes (insertion of PM Classification). This fixes the Missing data error in Pricing Units and other views.

This commit is contained in:
Christian Vidal Wolf
2026-04-22 16:52:59 +02:00
parent 8471a69529
commit d43d9931c6
15 changed files with 176 additions and 55 deletions
+3 -1
View File
@@ -1,5 +1,6 @@
import React, { useMemo, useState } from 'react';
import { ExcelRow, COLUMNS } from '../types';
import { ExcelRow } from '../types';
import { useColumns } from '../contexts/ColumnsContext';
import { ChevronDown, ChevronUp } from 'lucide-react';
import { cn } from '../lib/utils';
@@ -9,6 +10,7 @@ interface DataCompletenessProps {
}
export function DataCompleteness({ data, headers }: DataCompletenessProps) {
const COLUMNS = useColumns();
const [sortCol, setSortCol] = useState<number | 'score'>('score');
const [sortDesc, setSortDesc] = useState(false);
const [page, setPage] = useState(1);