Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -69,7 +69,7 @@ def get_line_id_from_url(request: gr.Request):
|
|
| 69 |
|
| 70 |
def handle_booking(name, tel, email, date_str, time, pax, remarks, line_id):
|
| 71 |
# 👇👇👇 加入這一行除錯 👇👇👇
|
| 72 |
-
print(f"🔥 DEBUG: 收到訂單,Name={name}, Line_ID={line_id}")
|
| 73 |
if not name or not tel or not date_str or not time:
|
| 74 |
return "⚠️ 請完整填寫必填欄位"
|
| 75 |
|
|
@@ -154,7 +154,7 @@ custom_css = "footer {display: none !important;} .gradio-container, .block, .row
|
|
| 154 |
with gr.Blocks(theme=theme, css=custom_css, title="Booking") as demo:
|
| 155 |
# line_id_box = gr.Textbox(visible=False)
|
| 156 |
# 👇 把 False 改成 True,並加上標籤方便辨識
|
| 157 |
-
line_id_box = gr.Textbox(visible=
|
| 158 |
confirm_msg_box = gr.HTML()
|
| 159 |
demo.load(get_line_id_from_url, None, line_id_box)
|
| 160 |
demo.load(check_confirmation, None, confirm_msg_box)
|
|
|
|
| 69 |
|
| 70 |
def handle_booking(name, tel, email, date_str, time, pax, remarks, line_id):
|
| 71 |
# 👇👇👇 加入這一行除錯 👇👇👇
|
| 72 |
+
# print(f"🔥 DEBUG: 收到訂單,Name={name}, Line_ID={line_id}")
|
| 73 |
if not name or not tel or not date_str or not time:
|
| 74 |
return "⚠️ 請完整填寫必填欄位"
|
| 75 |
|
|
|
|
| 154 |
with gr.Blocks(theme=theme, css=custom_css, title="Booking") as demo:
|
| 155 |
# line_id_box = gr.Textbox(visible=False)
|
| 156 |
# 👇 把 False 改成 True,並加上標籤方便辨識
|
| 157 |
+
line_id_box = gr.Textbox(visible=False, label="【除錯用】接收到的 LINE ID")
|
| 158 |
confirm_msg_box = gr.HTML()
|
| 159 |
demo.load(get_line_id_from_url, None, line_id_box)
|
| 160 |
demo.load(check_confirmation, None, confirm_msg_box)
|