import id's from sheet (#1516)

* import id's from sheet

* fix test

* fix test in utils

* remove comment

* ensure uri safe ids
This commit is contained in:
Alex Christoffer Rasmussen
2025-02-26 21:12:36 +01:00
committed by GitHub
parent e90161aa33
commit d0b4c6a279
6 changed files with 50 additions and 6 deletions
@@ -20,6 +20,7 @@ export const namedImportMap = {
'Timer type': 'timer type',
'Time warning': 'warning time',
'Time danger': 'danger time',
ID: 'id',
custom: [] as ImportCustom[],
};
@@ -58,6 +59,7 @@ export function convertToImportMap(namedImportMap: NamedImportMap): ImportMap {
timeWarning: namedImportMap['Time warning'],
timeDanger: namedImportMap['Time danger'],
custom,
entryId: namedImportMap.ID,
};
}
@@ -49,6 +49,7 @@ export default function PreviewRundown(props: PreviewRundownProps) {
{fieldLabels.map((label) => (
<th key={label}>{label}</th>
))}
<th>ID</th>
</tr>
</thead>
<tbody>
@@ -113,6 +114,9 @@ export default function PreviewRundown(props: PreviewRundownProps) {
}
return <td key={field}>{value}</td>;
})}
<td className={style.center}>
<Tag>{event.id}</Tag>
</td>
</tr>
{event.note && (
<tr>