forked from firka/student-legacy
fixed error screen bug in summary maybe
This commit is contained in:
parent
9d9f99a955
commit
d2c762d29a
@ -118,10 +118,13 @@ class _AllSumBodyState extends State<AllSumBody> {
|
|||||||
|
|
||||||
void getDelays() {
|
void getDelays() {
|
||||||
var allDelays = absenceProvider.absences.where((a) => a.delay > 0);
|
var allDelays = absenceProvider.absences.where((a) => a.delay > 0);
|
||||||
var totalDelayTime = (allDelays.map((a) {
|
var delayTimeList = (allDelays.map((a) {
|
||||||
return a.delay;
|
return a.delay;
|
||||||
}).toList())
|
}).toList());
|
||||||
.reduce((a, b) => a + b);
|
var totalDelayTime = 0;
|
||||||
|
if (delayTimeList.isNotEmpty) {
|
||||||
|
totalDelayTime = delayTimeList.reduce((a, b) => a + b);
|
||||||
|
}
|
||||||
var unexcusedDelays = absenceProvider.absences
|
var unexcusedDelays = absenceProvider.absences
|
||||||
.where((a) => a.state == Justification.unexcused && a.delay > 0);
|
.where((a) => a.state == Justification.unexcused && a.delay > 0);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user