mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-26 13:31:45 +03:00
Fixes data importer showing incorrect unmatched fields (# 6138) (#6311)
fixes #6138 --------- Co-authored-by: Thomas Trompette <thomas.trompette@sfr.fr>
This commit is contained in:
parent
41931c53e8
commit
4f249df831
@ -1,10 +1,10 @@
|
|||||||
// TODO: We should create our own accordion component
|
// TODO: We should create our own accordion component
|
||||||
import {
|
import {
|
||||||
Accordion,
|
Accordion,
|
||||||
AccordionButton as ChakraAccordionButton,
|
|
||||||
AccordionIcon,
|
AccordionIcon,
|
||||||
AccordionItem,
|
AccordionItem,
|
||||||
AccordionPanel,
|
AccordionPanel,
|
||||||
|
AccordionButton as ChakraAccordionButton,
|
||||||
} from '@chakra-ui/accordion';
|
} from '@chakra-ui/accordion';
|
||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { IconChevronDown, IconForbid } from 'twenty-ui';
|
import { IconChevronDown, IconForbid } from 'twenty-ui';
|
||||||
@ -15,6 +15,7 @@ import { Fields } from '@/spreadsheet-import/types';
|
|||||||
|
|
||||||
import { Column, Columns, ColumnType } from '../MatchColumnsStep';
|
import { Column, Columns, ColumnType } from '../MatchColumnsStep';
|
||||||
|
|
||||||
|
import { isDefined } from '~/utils/isDefined';
|
||||||
import { SubMatchingSelect } from './SubMatchingSelect';
|
import { SubMatchingSelect } from './SubMatchingSelect';
|
||||||
|
|
||||||
const StyledContainer = styled.div`
|
const StyledContainer = styled.div`
|
||||||
@ -68,7 +69,8 @@ const getAccordionTitle = <T extends string>(
|
|||||||
)?.label;
|
)?.label;
|
||||||
|
|
||||||
return `Match ${fieldLabel} (${
|
return `Match ${fieldLabel} (${
|
||||||
'matchedOptions' in column && column.matchedOptions.length
|
'matchedOptions' in column &&
|
||||||
|
column.matchedOptions.filter((option) => !isDefined(option.value)).length
|
||||||
} Unmatched)`;
|
} Unmatched)`;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user