| Line 114... |
Line 114... |
| 114 |
}
|
114 |
}
|
| Line 115... |
Line 115... |
| 115 |
|
115 |
|
| 116 |
sub modify_derby_name {
|
116 |
sub modify_derby_name {
|
| 117 |
my $t = shift;
|
117 |
my $t = shift;
|
| - |
|
118 |
my $dept = $t->{orig_dept} // $t->{dept};
|
| Line 118... |
Line 119... |
| 118 |
my $dept = $t->{orig_dept} // $t->{dept};
|
119 |
warn "DEBUG: RCid: ".$t->{RCid};
|
| 119 |
|
120 |
|
| 120 |
if ($t->{derby_name}) {
|
121 |
if ($t->{derby_name}) {
|
| 121 |
if ($user->{department}->{$dept} >= RollerCon::LEAD or $LVL >= RollerCon::ADMIN) {
|
122 |
if ($user->{department}->{$dept} >= RollerCon::LEAD or $LVL >= RollerCon::ADMIN) {
|
| Line 139... |
Line 140... |
| 139 |
minute => 0,
|
140 |
minute => 0,
|
| 140 |
second => 0,
|
141 |
second => 0,
|
| 141 |
time_zone => 'America/Los_Angeles'
|
142 |
time_zone => 'America/Los_Angeles'
|
| 142 |
);
|
143 |
);
|
| Line 143... |
Line 144... |
| 143 |
|
144 |
|
| 144 |
if (($t->{assignee_id} == $RCid and $t->{type} ne "selected" and $now < $cutoff) or ($t->{derby_name} and ($user->{department}->{$dept} >= 2 or $LVL >= 5))) {
|
145 |
if (($t->{RCid} == $RCid and $t->{type} ne "selected" and $now < $cutoff) or ($t->{derby_name} and ($user->{department}->{$dept} >= 2 or $LVL >= 5))) {
|
| 145 |
# DROP
|
146 |
# DROP
|
| 146 |
$t->{derby_name} = "$t->{derby_name} <A HREF='#' onClick=\"event.stopPropagation(); if (confirm('Really? You want to drop this person from the shift?')==true) { window.open('make_shift_change.pl?change=del&RCid=$t->{assignee_id}&id=$t->{id}','Confirm Shift Change','resizable,height=260,width=370'); return false; }\">[DROP]</a>";
|
147 |
$t->{derby_name} = "$t->{derby_name} <A HREF='#' onClick=\"event.stopPropagation(); if (confirm('Really? You want to drop this person from the shift?')==true) { window.open('make_shift_change.pl?change=del&RCid=$t->{RCid}&id=$t->{id}','Confirm Shift Change','resizable,height=260,width=370'); return false; }\">[DROP]</a>";
|
| 147 |
if ($user->{department}->{$dept} >= 2 or $LVL > 4) {
|
148 |
if ($user->{department}->{$dept} >= 2 or $LVL > 4) {
|
| 148 |
# NO SHOW
|
149 |
# NO SHOW
|
| 149 |
$t->{derby_name} .= " | <A HREF='#' onClick=\"event.stopPropagation(); if (confirm('Really? They were a no show?')==true) { window.open('make_shift_change.pl?noshow=true&change=del&RCid=$t->{assignee_id}&id=$t->{id}','Confirm Shift Change','resizable,height=260,width=370'); return false; }\">[NO SHOW]</a>";
|
150 |
$t->{derby_name} .= " | <A HREF='#' onClick=\"event.stopPropagation(); if (confirm('Really? They were a no show?')==true) { window.open('make_shift_change.pl?noshow=true&change=del&RCid=$t->{RCid}&id=$t->{id}','Confirm Shift Change','resizable,height=260,width=370'); return false; }\">[NO SHOW]</a>";
|
| 150 |
}
|
151 |
}
|
| 151 |
} elsif (!$t->{derby_name}) {
|
152 |
} elsif (!$t->{derby_name}) {
|
| 152 |
if (findConflict ($ORCUSER->{RCid}, $t->{id})) {
|
153 |
if (findConflict ($ORCUSER->{RCid}, $t->{id})) {
|
| 153 |
$t->{derby_name} .= "*schedule conflict*";
|
154 |
$t->{derby_name} .= "*schedule conflict*";
|