удалены основные сущности фронт

This commit is contained in:
Kayashov.SM
2025-04-28 12:39:53 +04:00
parent 91f94ddea9
commit 1af2bc6f05
24 changed files with 23 additions and 853 deletions

View File

@@ -71,12 +71,6 @@ export function Cocktail({row, handleFavourite, handleChangeRating, handleSelect
<Typography variant="h5" minHeight={'50px'} mt={2}>{row.name} </Typography>
<CocktailDescription row={row}/>
</CardContent>
<CardActions>
{(row.isAllowed && session.isActive && user.invited) &&
<Button variant="contained" onClick={() => pay(row.id)}>Заказать</Button>
}
{editMenuBlock(row)}
</CardActions>
</Box>
</CocktailItemStyled>
</Grid>

View File

@@ -27,10 +27,6 @@ export function CocktailDescription({row}) {
<ListItem sx={{p: '2px 12px 0px 0px', m: '0px'}}>
<ListItemText>{"Состав: " + row.components}</ListItemText>
</ListItem>
{(row.tags && row.tags.length > 0) && (
<ListItem sx={{p: '2px 12px 0px 0px', m: '0px'}}>
<ListItemText>{"Теги: " + row.tags.replaceAll(',', ', ')}</ListItemText>
</ListItem>)}
</List>
)
}

View File

@@ -26,7 +26,7 @@ const inMenuFilter = [
}
]
export function FilterBlock({filter, handleFilterChange, handleClearFilter, barmen, all}) {
export function FilterBlock({filter, handleFilterChange, handleClearFilter, barmen}) {
const {createError} = useAlert();
const [glass, setGlass] = useState([]);
const [category, setCategory] = useState([]);
@@ -111,14 +111,6 @@ export function FilterBlock({filter, handleFilterChange, handleClearFilter, barm
{/*Блок фильтров*/}
<Box hidden={filter.hidden}>
<Grid container>
{/*Фильтр по меню*/}
{(barmen && all) && (
<CheckMarks rows={inMenuFilter} name={"Есть в меню"} filterName={"inMenu"}
filterValue={filter.inMenu}
handleChange={handleFilterChange}
nonMulti nullValue
/>
)}
{/*Фильтр по избранным*/}
<FormControlLabel
control={
@@ -129,6 +121,16 @@ export function FilterBlock({filter, handleFilterChange, handleClearFilter, barm
label="Только избранные"
sx={{ml: 1}}
/>
{/*Фильтр по избранным*/}
<FormControlLabel
control={
<Switch inputProps={{'aria-label': 'controlled'}}
onChange={() => handleFilterChange("all", !filter.all)}
/>
}
label={!filter.all ? "Полный список" : "Только доступные"}
sx={{ml: 1}}
/>
{/*Фильтр по алкогольности*/}
<CheckMarks rows={alcohol} name={"Алкогольность"} handleChange={handleFilterChange}
filterValue={filter.alcohol} filterName={"alcohol"}/>
@@ -143,8 +145,7 @@ export function FilterBlock({filter, handleFilterChange, handleClearFilter, barm
{tags.length > 0 && (<CheckMarks rows={tags} name={"Теги"} handleChange={handleFilterChange}
filterValue={filter.tags} filterName={"tags"}/>)}
{/*Фильтр по нехватке ингредиентов*/}
{/*todo: доделать эти фильтры в беке*/}
{(barmen && all) && (<CheckMarks rows={ingredientCount} name={"Не хватает ингредиентов"}
{(barmen && filter.all) && (<CheckMarks rows={ingredientCount} name={"Не хватает ингредиентов"}
handleChange={handleFilterChange}
nonMulti nullValue
filterValue={filter.iCount} filterName={"iCount"}/>)}