|
1 | 1 | import { Edit, OpenInNew } from '@mui/icons-material'
|
2 |
| -import { Alert, Box, Button, Checkbox, Container, FormControlLabel, Input, Modal, Paper, Skeleton, Tab, TextField, Tooltip, Typography } from '@mui/material' |
| 2 | +import { Alert, Box, Button, Checkbox, Container, FormControlLabel, Input, Modal, Paper, Skeleton, Stack, Tab, TextField, Tooltip, Typography } from '@mui/material' |
3 | 3 | import { enqueueSnackbar } from 'notistack'
|
4 | 4 | import { useState } from 'react'
|
5 | 5 | import { useTranslation } from 'react-i18next'
|
@@ -197,13 +197,15 @@ const Course = () => {
|
197 | 197 | <TextField name="username" placeholder={'käyttäjänimi: '}></TextField>
|
198 | 198 | <Button type={'submit'}>Lisää</Button>
|
199 | 199 | </Form>
|
200 |
| - <ul> |
| 200 | + <Stack sx={{margin: 1, padding: 1, borderColor: 'gray', borderWidth: 1, borderStyle: 'solid'}}> |
| 201 | + |
201 | 202 | {course.responsibilities.map((responsibility) => (
|
202 |
| - <li key={responsibility.id}> |
203 |
| - {responsibility.user.last_name} {responsibility.user.first_names} <AssignedResponsibilityManagement handleRemove={() => {handleRemoveResponsibility(responsibility)}} responsibility={responsibility}/> |
204 |
| - </li> |
| 203 | + <Box key={responsibility.id} sx={{display: 'flex', alignItems: 'center', padding: 1}}> |
| 204 | + <Typography>{responsibility.user.last_name} {responsibility.user.first_names}</Typography> |
| 205 | + <AssignedResponsibilityManagement handleRemove={() => {handleRemoveResponsibility(responsibility)}} responsibility={responsibility}/> |
| 206 | + </Box> |
205 | 207 | ))}
|
206 |
| - </ul> |
| 208 | + </Stack> |
207 | 209 | </Box>
|
208 | 210 | )}
|
209 | 211 | </>
|
@@ -240,10 +242,10 @@ const AssignedResponsibilityManagement = ({responsibility, handleRemove}) => {
|
240 | 242 | return (<></>)
|
241 | 243 | }
|
242 | 244 | return (
|
243 |
| - <Box> |
244 |
| - <Typography>{t('course:rag')}</Typography> |
| 245 | + <Stack direction={'row'} sx={{marginLeft: 'auto', alignItems: 'center'}} > |
| 246 | + <Typography>{t('course:customResponsibility')}</Typography> |
245 | 247 | <Button onClick={handleRemove}>{t('course:remove')}</Button>
|
246 |
| - </Box> |
| 248 | + </Stack> |
247 | 249 | )
|
248 | 250 | }
|
249 | 251 |
|
|
0 commit comments