Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0824 #46

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

0824 #46

wants to merge 3 commits into from

Conversation

yiiihsuan
Copy link
Collaborator

1.新增功能:訂位取消時,自動更新訂餐資訊以及遞補候位資訊/候位訂單資訊

@vercel
Copy link

vercel bot commented Aug 24, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
campus-summer-rapid-dining ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 24, 2023 3:25pm

Copy link
Collaborator

@timsu92 timsu92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這個PR對於取消桌位的邏輯變成了:

  1. 取得要被刪除桌子的狀態
    • 如果有符合的桌子
      1. 取得該桌子上的訂單
      2. 如果本來有訂單,移除
      3. 取得可以坐進來的下一組客人
        • 如果有,將這位等待的客人排入、將可能有的訂單與預約脫鉤、刪除預約紀錄
        • 如果沒有,將桌子清出
    • 如果沒有符合的桌子,回傳null

但我覺得怪怪的,因為這樣代表他可以訂餐後隨意取消。這樣來說,我們的外帶訂單取消好像也有一樣的邏輯問題?

Comment on lines +95 to +96
console.log('res id',reservationRows[0].id)
console.log('res phone',reservationRows[0].phone)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

縮排記得調

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants