Add support for editing calendar work and exception times and recurring work times

This commit is contained in:
Dion Moult
2021-04-29 13:16:47 +10:00
parent f8eb1c178a
commit 810d36781c
11 changed files with 359 additions and 26 deletions
@@ -7,11 +7,11 @@ class Usecase:
def execute(self):
work_time = self.file.create_entity("IfcWorkTime")
if self.settings["type"] == "WorkingTimes":
if self.settings["time_type"] == "WorkingTimes":
working_times = list(self.settings["work_calendar"].WorkingTimes or [])
working_times.append(work_time)
self.settings["work_calendar"].WorkingTimes = working_times
elif self.settings["type"] == "ExceptionTimes":
elif self.settings["time_type"] == "ExceptionTimes":
exception_times = list(self.settings["work_calendar"].ExceptionTimes or [])
exception_times.append(work_time)
self.settings["work_calendar"].ExceptionTimes = exception_times