fix(gui): ProjectStatsDialog uses correct ProjectData fields
- Remove references to non-existent description, session_count, last_session - Use project.type, project.status, project.metadata for description - Fixes AttributeError when viewing project stats
This commit is contained in:
parent
59094ee469
commit
0f4d1271f8
|
|
@ -152,16 +152,16 @@ class ProjectStatsDialog(QDialog):
|
|||
|
||||
stats_layout.addRow("ID:", QLabel(str(self.project.id)))
|
||||
stats_layout.addRow("Name:", QLabel(self.project.name))
|
||||
stats_layout.addRow("Description:", QLabel(self.project.description or "N/A"))
|
||||
stats_layout.addRow("Type:", QLabel(self.project.type))
|
||||
stats_layout.addRow("Status:", QLabel(self.project.status))
|
||||
|
||||
# Description from metadata
|
||||
description = self.project.metadata.get('description', 'N/A') if self.project.metadata else 'N/A'
|
||||
stats_layout.addRow("Description:", QLabel(description))
|
||||
|
||||
created = self.project.created_at.strftime("%Y-%m-%d %H:%M") if self.project.created_at else "N/A"
|
||||
stats_layout.addRow("Created:", QLabel(created))
|
||||
|
||||
stats_layout.addRow("Total Sessions:", QLabel(str(self.project.session_count)))
|
||||
|
||||
last = self.project.last_session.strftime("%Y-%m-%d %H:%M") if self.project.last_session else "Never"
|
||||
stats_layout.addRow("Last Session:", QLabel(last))
|
||||
|
||||
layout.addWidget(stats_group)
|
||||
|
||||
# Close button
|
||||
|
|
|
|||
Loading…
Reference in New Issue