Skip to content

Commit

Permalink
/cashier-v2 備考欄未入力でも正常に入力できるように
Browse files Browse the repository at this point in the history
  • Loading branch information
toririm committed Oct 4, 2024
1 parent 9ddfa89 commit 71f9e93
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/components/functional/useOrderState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type ApplyDiscount = Action<
>;
type RemoveDiscount = Action<"removeDiscount">;
type SetReceived = Action<"setReceived", { received: string }>;
type SetDescription = Action<"setDescription", { description: string }>;
type SetDescription = Action<"setDescription", { description: string | null }>;
/**
* オーダーの状態を更新するためのアクション型
*/
Expand Down
5 changes: 4 additions & 1 deletion app/components/pages/CashierV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@ const CashierV2 = ({ items, orders, submitPayload }: props) => {
key={`Description-${UISession.key}`}
onTextSet={useCallback(
(text) =>
newOrderDispatch({ type: "setDescription", description: text }),
newOrderDispatch({
type: "setDescription",
description: text || null,
}),
[newOrderDispatch],
)}
focus={inputStatus === "description"}
Expand Down

0 comments on commit 71f9e93

Please sign in to comment.