Skip to content

Commit 8d9fed8

Browse files
committed
show fields to import
1 parent 46a4173 commit 8d9fed8

3 files changed

Lines changed: 19 additions & 2 deletions

File tree

src/components/Admin/CreateUser/BulkCreation/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const BulkCreation = observer((props: Props) => {
2727
{state === 'paste' && (
2828
<FromXlsxClipboard
2929
importLabel="Weiter zur Benutzererstellung"
30+
toAssign={['E-Mail', 'Passwort']}
3031
matchUsers
3132
withoutKnownUsers
3233
includeHeader

src/components/shared/FromXlsxClipboard/index.tsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ import { useStore } from '@tdev-hooks/useStore';
66
import Button from '../Button';
77
import Table from '../Table';
88
import { mdiCheckboxBlankOutline, mdiCheckboxMarked } from '@mdi/js';
9+
import Badge from '../Badge';
910

1011
interface Props {
1112
matchUsers?: boolean;
1213
withoutKnownUsers?: boolean;
1314
onDone?: (table?: string[][], hasHeader?: boolean) => void;
15+
toAssign?: string[];
1416
importLabel?: string;
1517
cancelLabel?: string;
1618
cancelIcon?: string;
@@ -64,9 +66,18 @@ const FromXlsxClipboard = (props: Props) => {
6466
<h3>Excel-Zellen einfügen</h3>
6567
</div>
6668
<div className="card__body">
67-
<p>
69+
<div>
6870
Kopierte Excel-Zellen hier per <kbd>Strg</kbd> + <kbd>V</kbd> einfügen.
69-
</p>
71+
</div>
72+
{props.toAssign && (
73+
<div className={clsx(styles.rowsToAssign)}>
74+
{props.toAssign.map((col, idx) => (
75+
<Badge key={idx} type="info">
76+
{col}
77+
</Badge>
78+
))}
79+
</div>
80+
)}
7081
<div className={clsx(styles.main)}>
7182
<div className={clsx(styles.input)}>
7283
<TextAreaInput

src/components/shared/FromXlsxClipboard/styles.module.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
.xlsxImport {
22
margin-bottom: var(--ifm-paragraph-margin-bottom);
3+
.rowsToAssign {
4+
display: flex;
5+
gap: 0.5em;
6+
margin-bottom: 1em;
7+
}
38
.main {
49
display: flex;
510
flex-wrap: wrap;

0 commit comments

Comments
 (0)