Compare commits

...

4 Commits

  1. 6
      frontend/src/components/DeleteStuffDialog.tsx
  2. 2
      frontend/src/components/Layout.tsx
  3. 2
      frontend/src/pages/AddRecipe.tsx
  4. 13
      frontend/src/pages/TaskListPage.tsx

@ -26,11 +26,11 @@ const DeleteStuffDialog = ({
sx={{ overflow: "hidden" }} sx={{ overflow: "hidden" }}
> >
<DialogTitle></DialogTitle> <DialogTitle></DialogTitle>
<DialogContent> <DialogContent sx={{ wordBreak: 'break-word' }}>
<Typography sx={{ fontSize: '1.6rem' }}>{stuffName} </Typography> <Typography sx={{ fontSize: '1.4rem', fontWeight: 'bold' }}>{stuffName} </Typography>
<Typography variant="body1" color="error"> 注意: 削除すると復元できません</Typography> <Typography variant="body1" color="error"> 注意: 削除すると復元できません</Typography>
</DialogContent> </DialogContent>
<DialogActions> <DialogActions sx={{ display: 'flex', justifyContent: 'flex-end', gap: 2 }}>
<Button onClick={() => setOpenDialog(false)} ></Button> <Button onClick={() => setOpenDialog(false)} ></Button>
<Button variant="contained" color="error" onClick={() => { <Button variant="contained" color="error" onClick={() => {
onSubmit(); onSubmit();

@ -136,7 +136,7 @@ const Layout: React.FC = () => {
{/* ヘッダー部分 - アプリ名とログアウトボタンを表示 */} {/* ヘッダー部分 - アプリ名とログアウトボタンを表示 */}
<AppBar position="static" elevation={0}> <AppBar position="static" elevation={0}>
<Toolbar> <Toolbar>
<Typography variant="h6" component="div" sx={{ flexGrow: 1 }}> <Typography variant="h6" component="div" sx={{ flexGrow: 1 }} onClick={() => navigate('/')}>
shopchop shopchop
</Typography> </Typography>
<Button color="inherit" onClick={handleLogout}> <Button color="inherit" onClick={handleLogout}>

@ -308,7 +308,7 @@ const AddRecipe: React.FC = () => {
{/* 削除ダイアログ */} {/* 削除ダイアログ */}
<DeleteStuffDialog openDialog={openDeleteDialog} setOpenDialog={setOpenDeleteDialog} <DeleteStuffDialog openDialog={openDeleteDialog} setOpenDialog={setOpenDeleteDialog}
stuffName={newItem.stuffName} stuffName={editingItem.stuffName}
onSubmit={() => setItems([...items.slice(0, editingItemIdx), ...items.slice(editingItemIdx + 1)])} onSubmit={() => setItems([...items.slice(0, editingItemIdx), ...items.slice(editingItemIdx + 1)])}
/> />

@ -272,20 +272,27 @@ const TaskListPage: React.FC = () => {
<ListItem <ListItem
key={tobuy.tobuyId} key={tobuy.tobuyId}
sx={{ sx={{
bgcolor: "background.paper", bgcolor: 'background.paper',
mb: 1, mb: 1,
borderRadius: 1, borderRadius: 1,
boxShadow: 1, boxShadow: 1,
display: 'flex',
flexDirection: 'row',
flexWrap: 'wrap',
alignItems: 'center',
justifyContent: 'space-between',
// px: 1,
}} }}
> >
{/* 食材名 */} {/* 食材名 */}
<ListItemText <ListItemText
sx={{maxWidth: '60%', wordBreak: 'break-word', flexGrow: 1}}
primary={tobuy.stuffName} primary={tobuy.stuffName}
onClick={() => handleShowHistories(tobuy)} onClick={() => handleShowHistories(tobuy)}
/> />
{/* 買い物リスト:食材情報記入ボタン */} {/* 買い物リスト:食材情報記入ボタン */}
<ListItemSecondaryAction> <ListItemSecondaryAction sx={{ display: 'flex', alignItems: 'center', flexShrink: 0, gap: 0.5 }}>
<Typography variant="body1" component="span" sx={{ marginRight: '1em' }}> <Typography variant="body1" component="span" sx={{ marginRight: '4px' }}>
{`× ${tobuy.amount}`} {`× ${tobuy.amount}`}
</Typography> </Typography>
{/* 買い物リスト:数量変更ボタン */} {/* 買い物リスト:数量変更ボタン */}

Loading…
Cancel
Save