Skip to content

Commit

Permalink
added extra fields for submission (#1069)
Browse files Browse the repository at this point in the history
  • Loading branch information
MadsNyl authored Aug 18, 2024
1 parent 6566839 commit 88fe5d6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions src/components/forms/FormAnswers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ const FormAnswers = ({ formId }: FormAnswersProps) => {
<TableHeader>
<TableRow>
<TableHead>Navn</TableHead>
<TableHead>E-post</TableHead>
<TableHead>Studie</TableHead>
<TableHead>Studiekull</TableHead>

{selectedFields.includes('Alle') && form.fields.map((field, index) => <TableHead key={index}>{field.title}</TableHead>)}

Expand All @@ -119,6 +122,12 @@ const FormAnswers = ({ formId }: FormAnswersProps) => {
{submission.user.first_name} {submission.user.last_name}
</TableCell>

<TableCell>{submission.user.email}</TableCell>

<TableCell>{submission.user.study.group.name}</TableCell>

<TableCell>{submission.user.studyyear.group.name}</TableCell>

{form.fields
.filter((filter) => {
if (selectedFields.includes('Alle')) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/ui/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const CardHeader = forwardRef<
>(({ className, ...props }, ref) => (
<div
ref={ref}
className={cn("flex flex-col space-y-1.5 p-4 md:p-6", className)}
className={cn("flex flex-col space-y-1.5 p-6", className)}
{...props}
/>
))
Expand Down Expand Up @@ -59,7 +59,7 @@ const CardContent = forwardRef<
HTMLDivElement,
React.HTMLAttributes<HTMLDivElement>
>(({ className, ...props }, ref) => (
<div ref={ref} className={cn("p-4 md:p-6 pt-0", className)} {...props} />
<div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
))
CardContent.displayName = "CardContent"

Expand Down

0 comments on commit 88fe5d6

Please sign in to comment.