From 5443b2d3ad95e37e18080922c801e50ee10781f6 Mon Sep 17 00:00:00 2001 From: Ryunosuke Tokinaga <59079411+toririm@users.noreply.github.com> Date: Sun, 6 Oct 2024 12:12:54 +0900 Subject: [PATCH] =?UTF-8?q?pos=20/cashier-v2=20=E3=82=B3=E3=83=BC=E3=82=B9?= =?UTF-8?q?=E3=82=BF=E3=83=BC=E5=AF=BE=E5=BF=9C=20(#234)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/organisms/OrderItemEdit.tsx | 2 +- app/models/order.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/components/organisms/OrderItemEdit.tsx b/app/components/organisms/OrderItemEdit.tsx index dcc86862..f388eec5 100644 --- a/app/components/organisms/OrderItemEdit.tsx +++ b/app/components/organisms/OrderItemEdit.tsx @@ -4,7 +4,7 @@ import type { ItemEntity } from "~/models/item"; import type { OrderEntity } from "~/models/order"; import { ItemAssign } from "./ItemAssign"; -const keys = ["q", "d", "c", "w", "a", "v", "e", "s", "z", "x"]; +const keys = ["q", "d", "c", "w", "a", "v", "e", "s", "z", "x", "b"]; type props = { order: OrderEntity; diff --git a/app/models/order.ts b/app/models/order.ts index ee33f35f..d0370771 100644 --- a/app/models/order.ts +++ b/app/models/order.ts @@ -176,7 +176,9 @@ export class OrderEntity implements Order { getCoffeeCount() { // milk 以外のアイテムの数を返す // TODO(toririm): このメソッドは items が変更された時だけでいい - return this.items.filter((item) => item.type !== "milk").length; + return this.items.filter( + (item) => item.type !== "milk" && item.type !== "others", + ).length; } /**