SSSSSSSiao commited on
Commit
917964b
·
verified ·
1 Parent(s): a7aa040

Update app.py

Browse files

Fix review board indentation

Files changed (1) hide show
  1. app.py +36 -36
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
- <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,33 +339,33 @@ def build_review_board(data):
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 = []
 
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 = []