Update app.py
Browse filesFix review board indentation
app.py
CHANGED
|
@@ -281,21 +281,21 @@ def build_summary(data):
|
|
| 281 |
ready = total - followups
|
| 282 |
|
| 283 |
return f"""
|
| 284 |
-
<div style="display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:8px 0 18px;">
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
</div>
|
| 298 |
-
"""
|
| 299 |
|
| 300 |
def build_review_board(data):
|
| 301 |
ready_cards = []
|
|
@@ -339,33 +339,33 @@ def build_review_board(data):
|
|
| 339 |
<div style="margin-top:8px;">{chips}</div>
|
| 340 |
</div>
|
| 341 |
"""
|
| 342 |
-
|
| 343 |
-
|
| 344 |
-
|
| 345 |
-
|
| 346 |
<div style="background:#f0fdf4;border:1px solid #bbf7d0;border-radius:10px;padding:14px;margin-bottom:10px;">
|
| 347 |
<div style="font-weight:700;">{customer}</div>
|
| 348 |
<div>{title}</div>
|
| 349 |
<div style="color:#64748b;font-size:13px;margin-top:4px;">{detail_html}</div>
|
| 350 |
</div>
|
| 351 |
"""
|
| 352 |
-
|
| 353 |
-
|
| 354 |
-
|
| 355 |
-
|
| 356 |
-
|
| 357 |
-
|
| 358 |
-
|
| 359 |
-
|
| 360 |
-
|
| 361 |
-
|
| 362 |
-
|
| 363 |
-
|
| 364 |
-
|
| 365 |
-
|
| 366 |
-
|
| 367 |
-
|
| 368 |
-
|
| 369 |
|
| 370 |
def split_customer_messages(messages):
|
| 371 |
entries = []
|
|
|
|
| 281 |
ready = total - followups
|
| 282 |
|
| 283 |
return f"""
|
| 284 |
+
<div style="display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:8px 0 18px;">
|
| 285 |
+
<div style="background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:14px;">
|
| 286 |
+
<div style="font-size:24px;font-weight:700;">{total}</div>
|
| 287 |
+
<div style="color:#475569;">customer messages</div>
|
| 288 |
+
</div>
|
| 289 |
+
<div style="background:#ecfdf5;border:1px solid #bbf7d0;border-radius:10px;padding:14px;">
|
| 290 |
+
<div style="font-size:24px;font-weight:700;">{ready}</div>
|
| 291 |
+
<div style="color:#166534;">ready orders</div>
|
| 292 |
+
</div>
|
| 293 |
+
<div style="background:#fffbeb;border:1px solid #fde68a;border-radius:10px;padding:14px;">
|
| 294 |
+
<div style="font-size:24px;font-weight:700;">{followups}</div>
|
| 295 |
+
<div style="color:#92400e;">follow-ups needed</div>
|
| 296 |
+
</div>
|
| 297 |
+
</div>
|
| 298 |
+
"""
|
| 299 |
|
| 300 |
def build_review_board(data):
|
| 301 |
ready_cards = []
|
|
|
|
| 339 |
<div style="margin-top:8px;">{chips}</div>
|
| 340 |
</div>
|
| 341 |
"""
|
| 342 |
+
)
|
| 343 |
+
else:
|
| 344 |
+
ready_cards.append(
|
| 345 |
+
f"""
|
| 346 |
<div style="background:#f0fdf4;border:1px solid #bbf7d0;border-radius:10px;padding:14px;margin-bottom:10px;">
|
| 347 |
<div style="font-weight:700;">{customer}</div>
|
| 348 |
<div>{title}</div>
|
| 349 |
<div style="color:#64748b;font-size:13px;margin-top:4px;">{detail_html}</div>
|
| 350 |
</div>
|
| 351 |
"""
|
| 352 |
+
)
|
| 353 |
+
|
| 354 |
+
ready_html = "".join(ready_cards) or '<div style="color:#64748b;">No ready orders yet.</div>'
|
| 355 |
+
followup_html = "".join(followup_cards) or '<div style="color:#64748b;">No follow-ups needed.</div>'
|
| 356 |
+
|
| 357 |
+
return f"""
|
| 358 |
+
<div style="display:grid;grid-template-columns:1fr 1fr;gap:16px;">
|
| 359 |
+
<section>
|
| 360 |
+
<h3>Ready to prep</h3>
|
| 361 |
+
{ready_html}
|
| 362 |
+
</section>
|
| 363 |
+
<section>
|
| 364 |
+
<h3>Needs follow-up</h3>
|
| 365 |
+
{followup_html}
|
| 366 |
+
</section>
|
| 367 |
+
</div>
|
| 368 |
+
"""
|
| 369 |
|
| 370 |
def split_customer_messages(messages):
|
| 371 |
entries = []
|