ReadJSShifts now only for operators, minor correction

parent 664d0895
......@@ -98,6 +98,9 @@ class ReadJSShifts(plugin.InputPreparationPlugin, TimeSupportMixin):
breakStart, breakEnd = timePair
timeStartList.append(breakEnd)
timeEndList.insert(0, breakStart)
# sort the list before proceeding
timeEndList.sort()
timeStartList.sort()
#if it is the current row is an extended row for the information belonging to a resource, and no resource name is entered
if line[0]:
entityID = line[0].split("-")[0]
......@@ -142,7 +145,7 @@ class ReadJSShifts(plugin.InputPreparationPlugin, TimeSupportMixin):
#create default pattern for all operators (10 days long)
timeStartList = []
timeEndList = []
for dayNumber in range(0,10):
for dayNumber in range(0,20):
startTime = "08:00"
endTime = "18:00"
upDate = now.date()+datetime.timedelta(days=dayNumber)
......@@ -167,6 +170,7 @@ class ReadJSShifts(plugin.InputPreparationPlugin, TimeSupportMixin):
# ================================================================
for node, node_data in nodes.items():
if node_data.get('_class', None) == 'Dream.Operator':
modifiedDefaultDays = [] # the days of the defaultShiftPattern that have been modified according to the exceptionShiftPattern
if node in exceptionShiftPattern:
for index1, exception in enumerate(exceptionShiftPattern[node]):
......
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