Fix 'approuve' button, add warning when break is not between day start and day end
This commit is contained in:
@@ -84,6 +84,20 @@ QJsonObject Day::to_json()
|
||||
return obj;
|
||||
}
|
||||
|
||||
bool Day::has_warning()
|
||||
{
|
||||
bool warning = false;
|
||||
foreach (BreakPoint val, breaks) {
|
||||
if (val.getStart() < start) {
|
||||
warning = true;
|
||||
}
|
||||
if (val.getEnd() > end) {
|
||||
warning = true;
|
||||
}
|
||||
}
|
||||
return warning;
|
||||
}
|
||||
|
||||
Day* Day::from_json(QJsonObject obj)
|
||||
{
|
||||
Day *result = new Day();
|
||||
|
||||
Reference in New Issue
Block a user