EOD and Carryover tickets added
This commit is contained in:
+17
-13
@@ -59,28 +59,31 @@ class DashboardWidget(QWidget):
|
||||
heading.setFont(heading_font)
|
||||
outer.addWidget(heading)
|
||||
|
||||
# Top row: overall pipeline health
|
||||
# Top row: active workload health (fulfilled tickets have moved to the Done tab)
|
||||
top_row = QHBoxLayout()
|
||||
self.total_card = StatCard("Total Orders")
|
||||
self.fulfilled_card = StatCard("Fulfilled")
|
||||
self.fulfilled_card.setStyleSheet("QLabel { color: #1a7a1a; }")
|
||||
self.total_card = StatCard("Active Orders")
|
||||
self.cancelled_card = StatCard("Cancelled")
|
||||
self.cancelled_card.setStyleSheet("QLabel { color: #b00020; }")
|
||||
self.carryover_card = StatCard("Carryover (still open from an earlier day)")
|
||||
self.carryover_card.setStyleSheet("QLabel { color: #b06a00; }")
|
||||
for card in (self.total_card, self.fulfilled_card, self.cancelled_card, self.carryover_card):
|
||||
self.past_cutoff_card = StatCard("Arrived Past Cutoff Today")
|
||||
self.past_cutoff_card.setStyleSheet("QLabel { color: #b06a00; }")
|
||||
for card in (self.total_card, self.cancelled_card, self.carryover_card, self.past_cutoff_card):
|
||||
top_row.addWidget(card)
|
||||
outer.addLayout(top_row)
|
||||
|
||||
# Second row: tracking pull progress, since that's the 5PM task
|
||||
outer.addWidget(self._section_label("Tracking Numbers"))
|
||||
tracking_row = QHBoxLayout()
|
||||
self.tracking_received_card = StatCard("Tickets With Tracking Pulled")
|
||||
tracking_row.addWidget(self.tracking_received_card)
|
||||
outer.addLayout(tracking_row)
|
||||
# Second row: today's completions + tracking pull progress
|
||||
outer.addWidget(self._section_label("Today's Progress"))
|
||||
progress_row = QHBoxLayout()
|
||||
self.fulfilled_today_card = StatCard("Fulfilled Today (moved to Done)")
|
||||
self.fulfilled_today_card.setStyleSheet("QLabel { color: #1a7a1a; }")
|
||||
self.tracking_received_card = StatCard("Active Tickets With Tracking Pulled")
|
||||
progress_row.addWidget(self.fulfilled_today_card)
|
||||
progress_row.addWidget(self.tracking_received_card)
|
||||
outer.addLayout(progress_row)
|
||||
|
||||
# Third row: per-company totals (grid so adding a 3rd company later just works)
|
||||
outer.addWidget(self._section_label("By Company"))
|
||||
outer.addWidget(self._section_label("Active Orders By Company"))
|
||||
self.company_grid = QGridLayout()
|
||||
self.company_cards: dict[str, StatCard] = {}
|
||||
outer.addLayout(self.company_grid)
|
||||
@@ -97,9 +100,10 @@ class DashboardWidget(QWidget):
|
||||
|
||||
def update_stats(self, stats: dict) -> None:
|
||||
self.total_card.set_value(stats.get("total", 0))
|
||||
self.fulfilled_card.set_value(stats.get("fulfilled_count", 0))
|
||||
self.cancelled_card.set_value(stats.get("cancelled_count", 0))
|
||||
self.carryover_card.set_value(stats.get("carryover_count", 0))
|
||||
self.past_cutoff_card.set_value(stats.get("past_cutoff_today_count", 0))
|
||||
self.fulfilled_today_card.set_value(stats.get("fulfilled_today_count", 0))
|
||||
self.tracking_received_card.set_value(stats.get("tracking_received_count", 0))
|
||||
|
||||
by_company = stats.get("by_company", {})
|
||||
|
||||
Reference in New Issue
Block a user