off schedule on-site won't be given the day shift
This commit is contained in:
@@ -178,7 +178,7 @@ $allemails = $schedule.PSObject.Properties | ForEach-Object {
|
|||||||
$today = (Get-Date).Date
|
$today = (Get-Date).Date
|
||||||
|
|
||||||
# ---| Specific date |---
|
# ---| Specific date |---
|
||||||
#$today = Get-Date -Day 27 -Month 10 -Year 2025 -Hour 9 -Minute 00 -Second 00 -Millisecond 00
|
#$today = Get-Date -Day 20 -Month 10 -Year 2025 -Hour 9 -Minute 00 -Second 00 -Millisecond 00
|
||||||
|
|
||||||
$daysahead = 14 #How many days ahead to plan
|
$daysahead = 14 #How many days ahead to plan
|
||||||
$timeoff_past_look = -7 #How many days to look into the past for the start of a multi-day time off
|
$timeoff_past_look = -7 #How many days to look into the past for the start of a multi-day time off
|
||||||
@@ -337,7 +337,7 @@ try {
|
|||||||
else {
|
else {
|
||||||
# ---| LOOKING FOR THE SHIFT |---
|
# ---| LOOKING FOR THE SHIFT |---
|
||||||
foreach ($shift in $shifts_today) {
|
foreach ($shift in $shifts_today) {
|
||||||
if($shift.UserId -eq $futureds_id) {
|
if($shift.UserId -eq $futureds_id -and $shift.SharedShift.Notes -ne "On-site") {
|
||||||
# ---| REMOVE THE SHIFT |---
|
# ---| REMOVE THE SHIFT |---
|
||||||
Remove-Shift -shift $shift -teamID $team.Id
|
Remove-Shift -shift $shift -teamID $team.Id
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user