Commit c6939eb9 authored by Jan Wagemakers's avatar Jan Wagemakers

sort hour min

parent ee4f1db3
......@@ -20,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.data.domain.Sort;
import org.springframework.scheduling.annotation.Scheduled;
/**
......@@ -87,7 +88,7 @@ public class StartupRunner implements CommandLineRunner {
float personSP = 0;
for (User user : userRepository.findAll()) {
boolean isHome = user.isHome();
for (Rule rule : ruleRepository.findAll()) {
for (Rule rule : ruleRepository.findAll(new Sort(Sort.Direction.ASC, "hour", "min"))) {
if (rule.getUser().getId() == user.getId()) {
if (isHome) {
int rday = rule.getDay();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment