camparchimedes
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -112,24 +112,25 @@ async def handle_message(message: cl.Message):
|
|
112 |
|
113 |
if "booking_id" in booking_data:
|
114 |
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
|
131 |
else:
|
132 |
await cl.Message(content="Booking not found or invalid response.").send()
|
|
|
133 |
except requests.exceptions.RequestException as e:
|
134 |
await cl.Message(content=f"Request failed: {str(e)}").send()
|
135 |
else:
|
|
|
112 |
|
113 |
if "booking_id" in booking_data:
|
114 |
|
115 |
+
table = (
|
116 |
+
"| Field | Info |\n"
|
117 |
+
"|:-----------|:---------------------|\n"
|
118 |
+
f"| Booking ID | {booking_data.get('booking_id', 'N/A')} |\n"
|
119 |
+
f"| Full Name | {booking_data.get('full_name', 'N/A')} |\n"
|
120 |
+
f"| Amount | {booking_data.get('amount', 0)} |\n"
|
121 |
+
f"| Check-in | {booking_data.get('checkin', 'N/A')} |\n"
|
122 |
+
f"| Check-out | {booking_data.get('checkout', 'N/A')} |\n"
|
123 |
+
f"| Address | {booking_data.get('address', 'N/A')} |\n"
|
124 |
+
f"| User ID | {booking_data.get('user_id', 0)} |\n"
|
125 |
+
f"| Info Text | {booking_data.get('infotext', 'N/A')} |\n"
|
126 |
+
f"| Included | {booking_data.get('included', 'N/A')} |"
|
127 |
+
)
|
128 |
+
|
129 |
+
await cl.Message(content=table).send()
|
130 |
|
131 |
else:
|
132 |
await cl.Message(content="Booking not found or invalid response.").send()
|
133 |
+
|
134 |
except requests.exceptions.RequestException as e:
|
135 |
await cl.Message(content=f"Request failed: {str(e)}").send()
|
136 |
else:
|