File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -204,9 +204,12 @@ class Statblock(Container):
204
204
delta : reactive [timedelta | None ] = reactive (timedelta (days = 7 ), recompose = True )
205
205
206
206
def compose (self ) -> ComposeResult :
207
- # end = datetime.today()
208
- # start = end - self.period
209
- # self.data = self.timecard.general_report(start, end)
207
+ end = datetime .today ()
208
+ start = end - self .delta
209
+ try :
210
+ self .data = self .timecard .general_report (start , end )
211
+ except AttributeError :
212
+ self .data = "Data and Statistics"
210
213
yield Static (f"Period = { self .period } " )
211
214
yield Static (f"Days = { self .delta .days } " )
212
215
@@ -325,7 +328,7 @@ def compose(self) -> ComposeResult:
325
328
PlotextPlot (),
326
329
self .codes ,
327
330
# Placeholder(self.name),
328
- Statblock (TimeCard ( self . code ) ),
331
+ Statblock (),
329
332
Container (
330
333
# Title("Period"), Rule(),
331
334
Button ("Period" , id = "period" ),
You can’t perform that action at this time.
0 commit comments