diff --git a/src/components/pages/production/uniformity/UniformityTable.tsx b/src/components/pages/production/uniformity/UniformityTable.tsx index e9405dd6..5633cdf9 100644 --- a/src/components/pages/production/uniformity/UniformityTable.tsx +++ b/src/components/pages/production/uniformity/UniformityTable.tsx @@ -112,11 +112,19 @@ const UniformityConfirmationPreview = ({ const columns: ColumnDef[] = [ { - header: 'Label', + accessorKey: 'label', + enableSorting: false, + header: () => ( + Label + ), cell: (props) => props.row.original.label, }, { - header: 'Value', + accessorKey: 'value', + enableSorting: false, + header: () => ( + Value + ), cell: (props) => { const id = props.row.original.id; const value = props.row.original.value; @@ -214,7 +222,6 @@ const UniformityTable = () => { const [isBulkActionLoading, setIsBulkActionLoading] = useState(false); const [isPdfExportLoading, setIsPdfExportLoading] = useState(false); const [isExcelExportLoading, setIsExcelExportLoading] = useState(false); - const isAnyExportLoading = isPdfExportLoading || isExcelExportLoading; const singleDeleteModal = useModal(); const successModal = useModal(); @@ -238,7 +245,7 @@ const UniformityTable = () => { const [filterEndDate, setFilterEndDate] = useState(''); const [filterProjectFlockLocationId, setFilterProjectFlockLocationId] = useState(''); - const [filterErrors, setFilterErrors] = useState>({}); + const [, setFilterErrors] = useState>({}); const { setInputValue: setFilterLocationInputValue, @@ -309,7 +316,6 @@ const UniformityTable = () => { ? projectFlockKandangLookupData.data : undefined; - // Update filterProjectFlockKandangId when lookup changes useEffect(() => { if (projectFlockKandangLookup?.id) { setFilterProjectFlockKandangId(projectFlockKandangLookup.id); @@ -483,12 +489,6 @@ const UniformityTable = () => { [filterFormik] ); - const handleApplyFilters = useCallback(() => { - handleFormSubmit( - new Event('submit') as unknown as React.FormEvent - ); - }, [handleFormSubmit]); - const selectedRowIds = useMemo(() => { return Object.keys(rowSelection) .filter((key) => rowSelection[key]) @@ -1076,7 +1076,7 @@ const UniformityTable = () => { modalBox: 'rounded-2xl', }} > -
+
{createdUniformity ? ( { modalBox: 'rounded-2xl', }} > -
+
@@ -1136,7 +1136,7 @@ const UniformityTable = () => { modalBox: 'rounded-2xl', }} > -
+
{selectedRowIds.length === 1 ? ( { modalBox: 'rounded-2xl', }} > -
+
@@ -1192,7 +1192,7 @@ const UniformityTable = () => { modalBox: 'rounded-2xl', }} > -
+
{selectedRowIds.length === 1 ? ( { modalBox: 'rounded-2xl', }} > -
+
{selectedRowIds.length === 1 ? (