Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 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
31 changes: 6 additions & 25 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,8 @@ export const StrikeDetailsModal = ({
<Modal
open={isOpen}
closeAfterTransition
BackdropComponent={Backdrop}
BackdropProps={{
timeout: 500,
}}
slots={{ backdrop: Backdrop }}
slotProps={{ backdrop: { timeout: 500 } }}
>
<Fade in={isOpen}>
<Box
Expand All @@ -123,7 +121,7 @@ export const StrikeDetailsModal = ({
top: '50%',
left: '50%',
transform: 'translate(-50%, -50%)',
bgcolor: 'background.paper',
backgroundColor: 'background.paper',
boxShadow: 24,
p: 4,
}}
Expand All @@ -140,7 +138,7 @@ export const StrikeDetailsModal = ({
label="Date"
type="date"
value={formatDate(strikeFields.date)}
InputLabelProps={{ shrink: true }}
slotProps={{ inputLabel: { shrink: true } }}
onChange={handleStrikeChange}
fullWidth
/>
Expand Down Expand Up @@ -187,7 +185,7 @@ export const StrikeDetailsModal = ({
error={commentsRequiredError}
helperText={commentsRequiredError ? 'Comments are required' : ''}
value={strikeFields.comments}
InputLabelProps={{ shrink: true }}
slotProps={{ inputLabel: { shrink: true} }}
onChange={onChangeComments}
fullWidth
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import EditIcon from '@mui/icons-material/Edit';
import MarkdownText from '../../components/MarkdownText';
import { Strike } from '../../../../data/types/Trainee';
import { formatDateForDisplay } from '../../utils/dateHelper';
import React from 'react';

interface StrikesListProps {
strikes: Strike[];
Expand Down Expand Up @@ -33,7 +34,7 @@ export const StrikesList: React.FC<StrikesListProps> = ({ strikes, onClickEdit,

const renderActions = (id: string) => {
return (
<Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'flex-end', paddingRight: 1 }}>
<Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'flex-end', pr: 1 }}>
<IconButton aria-label="edit" onClick={() => handleEdit(id)}>
<EditIcon />
</IconButton>
Expand All @@ -48,7 +49,7 @@ export const StrikesList: React.FC<StrikesListProps> = ({ strikes, onClickEdit,
<List
sx={{
width: '100%',
bgcolor: 'background.paper',
backgroundColor: 'background.paper',
maxHeight: 300,
overflow: 'auto',
scrollbarWidth: 'thin',
Expand All @@ -66,16 +67,15 @@ export const StrikesList: React.FC<StrikesListProps> = ({ strikes, onClickEdit,
alignItems="flex-start"
disablePadding
sx={{
bgcolor: index % 2 === 0 ? 'background.paperAlt' : 'background.paper',
backgroundColor: index % 2 === 0 ? 'background.paperAlt' : 'background.paper',
}}
>
<ListItemAvatar
sx={{
display: 'flex',
alignIntems: 'center',
paddingLeft: 2,
paddingRight: 2,
paddingTop: 1,
alignItems: 'center',
px: 2,
pt: 1,
}}
>
<AvatarWithTooltip imageUrl={strike.reporter.imageUrl} name={strike.reporter.name} />
Expand All @@ -87,11 +87,10 @@ export const StrikesList: React.FC<StrikesListProps> = ({ strikes, onClickEdit,
flexDirection="row"
justifyContent="space-between"
width="100%"
paddingTop={1}
paddingBottom={1}
py={1}
>
{formatStrikeReason(strike.reason || '')}
<Typography sx={{ paddingRight: 2 }}>{formatDateForDisplay(strike.date)}</Typography>
<Typography sx={{ pr: 2 }}>{formatDateForDisplay(strike.date)}</Typography>
</Box>
}
secondary={
Expand Down
Loading