Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing the development profile data model #697

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions client/src/interface/introCourse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ export interface IntroCourseParticipation {
id: string
tutorId?: string
student: Student
appleId?: string
macBookDeviceId?: string
iphoneDeviceId?: string
ipadDeviceId?: string
appleWatchDeviceId?: string
seat?: string
chairDevice?: string
absences: IntroCourseAbsence[]
Expand Down
113 changes: 56 additions & 57 deletions client/src/management/IntroCourse/components/SeatPlanManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,11 @@ export const SeatPlanManager = ({ keycloak }: SeatPlanManagerProps): JSX.Element
tutorName: `${tutor?.firstName ?? '-'} ${tutor?.lastName ?? '-'}`,
seat: participation.seat,
needsChairDevice: participation.chairDevice ?? '-',
appleId: participation.appleId,
iPhoneDeviceId: participation.iphoneDeviceId,
iPadDeviceId: participation.ipadDeviceId,
macBookDeviceId: participation.macBookDeviceId,
appleWatchDeviceId: participation.appleWatchDeviceId,
appleId: participation.student.developmentProfile?.appleId,
iPhoneDeviceId: participation.student.developmentProfile?.iPhoneDeviceId,
iPadDeviceId: participation.student.developmentProfile?.iPadDeviceId,
macBookDeviceId: participation.student.developmentProfile?.macBookDeviceId,
appleWatchDeviceId: participation.student.developmentProfile?.appleWatchDeviceId,
}
})}
filename='seat_plan.csv'
Expand Down Expand Up @@ -443,58 +443,57 @@ export const SeatPlanManager = ({ keycloak }: SeatPlanManagerProps): JSX.Element
accessor: 'devices',
title: 'Devices',
textAlign: 'center',
render: ({
appleId,
iphoneDeviceId,
ipadDeviceId,
appleWatchDeviceId,
macBookDeviceId,
}) => (
<>
<Stack>
{!!appleId && (
<Group>
<IconBrandApple color='#2B70BE' />
<Text c='dimmed' fw='500' fz='sm'>
{appleId}
</Text>
</Group>
)}
{!!macBookDeviceId && (
<Group>
<IconDeviceLaptop color='#2B70BE' />
<Text c='dimmed' fw='500' fz='sm'>
{macBookDeviceId}
</Text>
</Group>
)}
{!!iphoneDeviceId && (
<Group>
<IconDeviceMobile color='#2B70BE' />
<Text c='dimmed' fw='500' fz='sm'>
{iphoneDeviceId}
</Text>
</Group>
)}
{!!ipadDeviceId && (
<Group>
<IconDeviceTablet color='#2B70BE' />
<Text c='dimmed' fw='500' fz='sm'>
{ipadDeviceId}
</Text>
</Group>
)}
{!!appleWatchDeviceId && (
<Group>
<IconDeviceWatch color='#2B70BE' />
<Text c='dimmed' fw='500' fz='sm'>
{appleWatchDeviceId}
</Text>
</Group>
)}
</Stack>
</>
),
render: ({ student }) => {
const { appleId, iPhoneDeviceId, iPadDeviceId, appleWatchDeviceId, macBookDeviceId } =
student.developmentProfile ?? {}

return (
<>
<Stack>
{!!appleId && (
<Group>
<IconBrandApple color='#2B70BE' />
<Text c='dimmed' fw='500' fz='sm'>
{appleId}
</Text>
</Group>
)}
{!!macBookDeviceId && (
<Group>
<IconDeviceLaptop color='#2B70BE' />
<Text c='dimmed' fw='500' fz='sm'>
{macBookDeviceId}
</Text>
</Group>
)}
{!!iPhoneDeviceId && (
<Group>
<IconDeviceMobile color='#2B70BE' />
<Text c='dimmed' fw='500' fz='sm'>
{iPhoneDeviceId}
</Text>
</Group>
)}
{!!iPadDeviceId && (
<Group>
<IconDeviceTablet color='#2B70BE' />
<Text c='dimmed' fw='500' fz='sm'>
{iPadDeviceId}
</Text>
</Group>
)}
{!!appleWatchDeviceId && (
<Group>
<IconDeviceWatch color='#2B70BE' />
<Text c='dimmed' fw='500' fz='sm'>
{appleWatchDeviceId}
</Text>
</Group>
)}
</Stack>
</>
)
},
},
{
accessor: 'seat',
Expand Down
Loading