improve tobuylist UI

feature-frontend-styles
Masaharu.Kato 9 months ago
parent bd242cbb3a
commit de2229f4bc
  1. 22
      frontend/src/pages/TaskListPage.tsx

@ -135,7 +135,7 @@ const TaskListPage: React.FC = () => {
const handleBuy = async (tobuyId: number) => { const handleBuy = async (tobuyId: number) => {
try { try {
const today = new Date().toISOString().substring(0, 10); const today = new Date().toISOString().substring(0, 10);
const parsedPrice = parseInt(newPrice, 10); const parsedPrice = parseInt(newPrice, 10);
console.log("newPrice") console.log("newPrice")
console.log(newPrice) console.log(newPrice)
console.log("parsedPrice") console.log("parsedPrice")
@ -200,18 +200,20 @@ const TaskListPage: React.FC = () => {
*/} */}
{/* タスクのタイトルと説明 - 完了状態に応じて取り消し線を表示 */} {/* タスクのタイトルと説明 - 完了状態に応じて取り消し線を表示 */}
<ListItemText <ListItemText
primary={`${tobuy.stuffName} × ${tobuy.amount}`} primary={tobuy.stuffName}
//secondary={tobuy.amount}
sx={{
textDecoration: false ? 'line-through' : 'none',
}}
/> />
{/* 買い物リスト:食材情報記入ボタン */} {/* 買い物リスト:食材情報記入ボタン */}
<ListItemSecondaryAction> <ListItemSecondaryAction>
<Tooltip title="食材情報追加"> <Typography variant="body1" component="span" sx={{ marginRight: '1em' }}>
{`× ${tobuy.amount}`}
</Typography>
<Tooltip title="購入情報を記入">
{/* デフォルトの marginRightの設定(マイナス)を上書き */}
<IconButton <IconButton
color="primary"
sx={{ marginRight: 0}}
edge="end" edge="end"
aria-label="食材情報追加" aria-label="購入情報を記入"
onClick={() => { onClick={() => {
setOpenInfoDialog(true) setOpenInfoDialog(true)
setSelectedTask(tobuy.tobuyId) setSelectedTask(tobuy.tobuyId)
@ -378,7 +380,7 @@ const TaskListPage: React.FC = () => {
const value = e.target.value; const value = e.target.value;
if (/^\d*$/.test(value)) { if (/^\d*$/.test(value)) {
setNewPrice(value) setNewPrice(value)
} ; };
}} }}
/> />
{/* 購入日入力フィールド */} {/* 購入日入力フィールド */}

Loading…
Cancel
Save