@@ -209,7 +209,6 @@ await dbContext.PlanRegistrations.AsNoTracking()
209209 PlannedStartOfShift2 = planRegistration . PlannedStartOfShift2 ,
210210 PlannedEndOfShift2 = planRegistration . PlannedEndOfShift2 ,
211211 PlannedBreakOfShift2 = planRegistration . PlannedBreakOfShift2 ,
212- IsDoubleShift = planRegistration . Start2StartedAt != planRegistration . Stop2StoppedAt ,
213212 OnVacation = planRegistration . OnVacation ,
214213 Sick = planRegistration . Sick ,
215214 OtherAllowedAbsence = planRegistration . OtherAllowedAbsence ,
@@ -240,11 +239,11 @@ await dbContext.PlanRegistrations.AsNoTracking()
240239 ( planRegistration . Stop2Id * 5 ) - 5 ) ) ,
241240 Break1Shift = planRegistration . Pause1Id ,
242241 Break2Shift = planRegistration . Pause2Id ,
243- Pause1Id = planRegistration . Pause1Id ,
244- Pause2Id = planRegistration . Pause2Id ,
245- Pause3Id = planRegistration . Pause3Id ,
246- Pause4Id = planRegistration . Pause4Id ,
247- Pause5Id = planRegistration . Pause5Id ,
242+ Pause1Id = planRegistration . Pause1Id > 0 ? planRegistration . Pause1Id - 1 : 0 ,
243+ Pause2Id = planRegistration . Pause2Id > 0 ? planRegistration . Pause2Id - 1 : 0 ,
244+ Pause3Id = planRegistration . Pause3Id > 0 ? planRegistration . Pause3Id - 1 : 0 ,
245+ Pause4Id = planRegistration . Pause4Id > 0 ? planRegistration . Pause4Id - 1 : 0 ,
246+ Pause5Id = planRegistration . Pause5Id > 0 ? planRegistration . Pause5Id - 1 : 0 ,
248247 PauseMinutes = planRegistration . Pause1Id > 0 ? planRegistration . Pause1Id * 5 - 5 +
249248 ( planRegistration . Pause2Id > 0
250249 ? planRegistration . Pause2Id * 5 - 5
@@ -310,8 +309,10 @@ await dbContext.PlanRegistrations.AsNoTracking()
310309 Pause201StoppedAt = planRegistration . Pause201StoppedAt ,
311310 Pause202StartedAt = planRegistration . Pause202StartedAt ,
312311 Pause202StoppedAt = planRegistration . Pause202StoppedAt ,
313-
314312 } ;
313+
314+ planningModel . IsDoubleShift = planningModel . Start2StartedAt != planningModel . Stop2StoppedAt ;
315+
315316 try
316317 {
317318 if ( dbAssignedSite . UseGoogleSheetAsDefault )
@@ -823,7 +824,6 @@ await dbContext.PlanRegistrations.AsNoTracking()
823824 PlannedStartOfShift2 = planRegistration . PlannedStartOfShift2 ,
824825 PlannedEndOfShift2 = planRegistration . PlannedEndOfShift2 ,
825826 PlannedBreakOfShift2 = planRegistration . PlannedBreakOfShift2 ,
826- IsDoubleShift = planRegistration . Start2StartedAt != planRegistration . Stop2StoppedAt ,
827827 OnVacation = planRegistration . OnVacation ,
828828 Sick = planRegistration . Sick ,
829829 OtherAllowedAbsence = planRegistration . OtherAllowedAbsence ,
@@ -924,8 +924,10 @@ await dbContext.PlanRegistrations.AsNoTracking()
924924 Pause201StoppedAt = planRegistration . Pause201StoppedAt ,
925925 Pause202StartedAt = planRegistration . Pause202StartedAt ,
926926 Pause202StoppedAt = planRegistration . Pause202StoppedAt ,
927-
928927 } ;
928+
929+ planningModel . IsDoubleShift = planningModel . Start2StartedAt != planningModel . Stop2StoppedAt ;
930+
929931 try
930932 {
931933 if ( dbAssignedSite . UseGoogleSheetAsDefault )
0 commit comments