feat: add section label to import mapping

This commit is contained in:
Ahmed Bouhuolia
2024-04-08 00:39:18 +02:00
parent af981ce630
commit aaa8f39e50
4 changed files with 18 additions and 7 deletions

View File

@@ -1,6 +1,16 @@
.group {
margin-top: 1.4rem;
}
.groupTitle {
margin-bottom: 1.2rem;
color: #738091;
font-weight: 700;
padding: 0 11px;
}
.table {
width: 100%;
margin-top: 1.4rem;
th.label,
td.label{

View File

@@ -27,7 +27,7 @@ export function ImportFileMapping() {
{entityColumns.map((entityColumn, index) => (
<ImportFileMappingGroup
groupKey={entityColumn.groupKey}
groupName={entityColumn.groupName}
groupLabel={entityColumn.groupLabel}
fields={entityColumn.fields}
/>
))}
@@ -40,7 +40,7 @@ export function ImportFileMapping() {
interface ImportFileMappingGroupProps {
groupKey: string;
groupName: string;
groupLabel: string;
fields: any;
}
@@ -50,12 +50,12 @@ interface ImportFileMappingGroupProps {
*/
function ImportFileMappingGroup({
groupKey,
groupName,
groupLabel,
fields,
}: ImportFileMappingGroupProps) {
return (
<Box>
{groupName && <h3>{groupName}</h3>}
<Box className={styles.group}>
{groupLabel && <h3 className={styles.groupTitle}>{groupLabel}</h3>}
<table className={clsx('bp4-html-table', styles.table)}>
<thead>

View File

@@ -17,7 +17,7 @@ export type EntityColumnField = {
export interface EntityColumn {
groupKey: string;
groupName: string;
groupLabel: string;
fields: EntityColumnField[];
}
export type SheetColumn = string;