Sorry for my english
This commit is contained in:
parent
122df85e25
commit
b5830414b0
@ -43,7 +43,7 @@ const useStyles = makeStyles((theme) => ({
|
|||||||
free: {
|
free: {
|
||||||
background: theme.palette.success.main,
|
background: theme.palette.success.main,
|
||||||
},
|
},
|
||||||
busy: {
|
occupied: {
|
||||||
background: theme.palette.grey[500],
|
background: theme.palette.grey[500],
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
@ -79,13 +79,13 @@ export const RoomList = () => {
|
|||||||
>
|
>
|
||||||
<option value={FilterState.ALL}>All</option>
|
<option value={FilterState.ALL}>All</option>
|
||||||
<option value={FilterState.FREE}>Free</option>
|
<option value={FilterState.FREE}>Free</option>
|
||||||
<option value={FilterState.BUSY}>Busy</option>
|
<option value={FilterState.OCCUPIED}>Occupied</option>
|
||||||
</Select>
|
</Select>
|
||||||
</Box>
|
</Box>
|
||||||
<List>
|
<List>
|
||||||
{state.map.map(({ title }, index) => {
|
{state.map.map(({ title }, index) => {
|
||||||
if (filter === FilterState.FREE && !state.char[index].free) return "";
|
if (filter === FilterState.FREE && !state.char[index].free) return "";
|
||||||
else if (filter === FilterState.BUSY && state.char[index].free)
|
else if (filter === FilterState.OCCUPIED && state.char[index].free)
|
||||||
return "";
|
return "";
|
||||||
else
|
else
|
||||||
return (
|
return (
|
||||||
@ -93,7 +93,7 @@ export const RoomList = () => {
|
|||||||
<ListItemIcon className={classes.indicatorContainer}>
|
<ListItemIcon className={classes.indicatorContainer}>
|
||||||
<div
|
<div
|
||||||
className={`${classes.indicator} ${
|
className={`${classes.indicator} ${
|
||||||
state.char[index].free ? classes.free : classes.busy
|
state.char[index].free ? classes.free : classes.occupied
|
||||||
}`}
|
}`}
|
||||||
/>
|
/>
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
export enum FilterState {
|
export enum FilterState {
|
||||||
ALL,
|
ALL,
|
||||||
FREE,
|
FREE,
|
||||||
BUSY,
|
OCCUPIED,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user