Skip to content

Commit

Permalink
chore: resolve confolicts
Browse files Browse the repository at this point in the history
  • Loading branch information
r4ai committed Nov 20, 2024
1 parent 6d38de7 commit 555ad29
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 13 deletions.
2 changes: 0 additions & 2 deletions app/crud/crud_details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ export async function createOrderDetail(data: {
order_id: number
product_id: number
quantity: number
memo?: string
}) {
return await prisma.order_details.create({
data: {
order_id: data.order_id,
product_id: data.product_id,
quantity: data.quantity,
memo: data.memo || "",
},
})
}
Expand Down
3 changes: 0 additions & 3 deletions app/routes/kitchen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,7 @@ export default function Kitchen() {
return {
productName: product?.product_name || "",
quantity: detail.quantity,
<<<<<<< HEAD
deleted: product?.deleted_at != null,
=======
>>>>>>> main
}
})

Expand Down
1 change: 0 additions & 1 deletion app/routes/order_table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export default function OrderTable() {
minute: "2-digit",
},
)
console.log({ productIds, filteredProducts })

return (
<Tr key={order.order_id}>
Expand Down
4 changes: 0 additions & 4 deletions app/routes/reception.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ type TypeOrderDetail = {
product_id: number
quantity: number
price: number
memo?: string
}

type ActionData = {
Expand Down Expand Up @@ -281,7 +280,6 @@ export const action: ActionFunction = async ({

const product_ids = formData.getAll("product_id").map(Number)
const quantities = formData.getAll("quantity").map(Number)
const memos = formData.getAll("memo") as string[]
const table_number = Number(formData.get("table_number"))
const order_memo = formData.get("order_memo") as string

Expand All @@ -298,14 +296,12 @@ export const action: ActionFunction = async ({

product_ids.map(async (product_id, index) => {
const quantity = quantities[index]
const memo = memos[index]
const product = products.find((p) => p.product_id === product_id)

await createOrderDetail({
order_id: order.order_id,
product_id: product_id,
quantity: quantity,
memo: memo || "",
})

await updateStock({
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ model Order_details {
order_id Int
product_id Int
quantity Int
memo String?
orders Orders @relation(fields: [order_id], references: [order_id])
products Products @relation(fields: [product_id], references: [product_id])
}
Expand Down

0 comments on commit 555ad29

Please sign in to comment.