| Line 89... |
Line 89... |
| 89 |
};
|
89 |
};
|
| Line 90... |
Line 90... |
| 90 |
|
90 |
|
| 91 |
my $DEPTS = getDepartments;
|
91 |
my $DEPTS = getDepartments;
|
| 92 |
sub modify_dept {
|
92 |
sub modify_dept {
|
| - |
|
93 |
my $hr = shift;
|
| 93 |
my $hr = shift;
|
94 |
$hr->{orig_dept} = $hr->{dept};
|
| 94 |
$hr->{dept} = $DEPTS->{$hr->{dept}};
|
95 |
$hr->{dept} = $DEPTS->{$hr->{dept}};
|
| Line 95... |
Line 96... |
| 95 |
}
|
96 |
}
|
| 96 |
|
97 |
|
| Line 113... |
Line 114... |
| 113 |
}
|
114 |
}
|
| 114 |
}
|
115 |
}
|
| Line 115... |
Line 116... |
| 115 |
|
116 |
|
| 116 |
sub modify_derby_name {
|
117 |
sub modify_derby_name {
|
| - |
|
118 |
my $t = shift;
|
| Line 117... |
Line 119... |
| 117 |
my $t = shift;
|
119 |
my $dept = $t->{orig_dept} // $t->{dept};
|
| 118 |
|
120 |
|
| 119 |
if ($t->{derby_name}) {
|
121 |
if ($t->{derby_name}) {
|
| 120 |
if ($user->{department}->{$t->{dept}} >= RollerCon::LEAD or $LVL >= RollerCon::ADMIN) {
|
122 |
if ($user->{department}->{$dept} >= RollerCon::LEAD or $LVL >= RollerCon::ADMIN) {
|
| 121 |
$t->{derby_name} = $h->a ({ href=>"/schedule/view_user.pl?RCid=$t->{RCid}" }, $t->{derby_name});
|
123 |
$t->{derby_name} = $h->a ({ href=>"/schedule/view_user.pl?RCid=$t->{RCid}" }, $t->{derby_name});
|
| 122 |
} else {
|
124 |
} else {
|
| 123 |
$t->{derby_name} = "FILLED";
|
125 |
$t->{derby_name} = "FILLED";
|
| 124 |
return $t->{derby_name};
|
126 |
return $t->{derby_name};
|
| Line 125... |
Line 127... |
| 125 |
}
|
127 |
}
|
| 126 |
}
|
128 |
}
|
| 127 |
|
129 |
|
| Line 128... |
Line 130... |
| 128 |
if ($t->{dept} eq "COA") {
|
130 |
if ($dept eq "COA") {
|
| 129 |
return $LVL >= RollerCon::ADMIN ? $t->{derby_name} . " | " . $h->a ({ href=>"view_class.pl?id=".getClassID ($t->{id})."&choice=Update" }, "[Edit Class]") : $t->{derby_name};
|
131 |
return $LVL >= RollerCon::ADMIN ? $t->{derby_name} . " | " . $h->a ({ href=>"view_class.pl?id=".getClassID ($t->{id})."&choice=Update" }, "[Edit Class]") : $t->{derby_name};
|
| Line 138... |
Line 140... |
| 138 |
minute => 0,
|
140 |
minute => 0,
|
| 139 |
second => 0,
|
141 |
second => 0,
|
| 140 |
time_zone => 'America/Los_Angeles'
|
142 |
time_zone => 'America/Los_Angeles'
|
| 141 |
);
|
143 |
);
|
| Line 142... |
Line 144... |
| 142 |
|
144 |
|
| 143 |
if (($t->{assignee_id} == $RCid and $t->{type} ne "selected" and $now < $cutoff) or ($t->{derby_name} and ($user->{department}->{$t->{dept}} >= 2 or $LVL >= 5))) {
|
145 |
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))) {
|
| 144 |
# DROP
|
146 |
# DROP
|
| 145 |
$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->{assignee_id}&id=$t->{id}','Confirm Shift Change','resizable,height=260,width=370'); return false; }\">[DROP]</a>";
|
| 146 |
if ($user->{department}->{$t->{dept}} >= 2 or $LVL > 4) {
|
148 |
if ($user->{department}->{$dept} >= 2 or $LVL > 4) {
|
| 147 |
# NO SHOW
|
149 |
# NO SHOW
|
| 148 |
$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->{assignee_id}&id=$t->{id}','Confirm Shift Change','resizable,height=260,width=370'); return false; }\">[NO SHOW]</a>";
|
| 149 |
}
|
151 |
}
|
| 150 |
} elsif (!$t->{derby_name}) {
|
152 |
} elsif (!$t->{derby_name}) {
|
| 151 |
if (signUpEligible ($ORCUSER, $t, "vol") and $now < $cutoff) {
|
153 |
if (signUpEligible ($ORCUSER, $t, "vol") and $now < $cutoff) {
|
| 152 |
# SIGN UP
|
154 |
# SIGN UP
|
| 153 |
$t->{derby_name} = "<A HREF='#' onClick=\"event.stopPropagation(); window.open('make_shift_change.pl?change=add&RCid=$RCid&id=$t->{id}','Confirm Shift Change','resizable,height=260,width=370'); return false;\">[SIGN UP]</a>";
|
155 |
$t->{derby_name} = "<A HREF='#' onClick=\"event.stopPropagation(); window.open('make_shift_change.pl?change=add&RCid=$RCid&id=$t->{id}','Confirm Shift Change','resizable,height=260,width=370'); return false;\">[SIGN UP]</a>";
|
| 154 |
}
|
156 |
}
|
| 155 |
if ($user->{department}->{$t->{dept}} >= 2 or $LVL > 4) {
|
157 |
if ($user->{department}->{$dept} >= 2 or $LVL > 4) {
|
| 156 |
# ADD USER
|
158 |
# ADD USER
|
| 157 |
$t->{derby_name} ? $t->{derby_name} .= " | " : {};
|
159 |
$t->{derby_name} ? $t->{derby_name} .= " | " : {};
|
| 158 |
$t->{derby_name} .= "<A HREF='#' onClick=\"event.stopPropagation(); window.open('make_shift_change.pl?change=lookup&RCid=$RCid&id=$t->{id}','Confirm Shift Change','resizable,height=260,width=370'); return false;\">[ADD USER]</a>";
|
160 |
$t->{derby_name} .= "<A HREF='#' onClick=\"event.stopPropagation(); window.open('make_shift_change.pl?change=lookup&RCid=$RCid&id=$t->{id}','Confirm Shift Change','resizable,height=260,width=370'); return false;\">[ADD USER]</a>";
|
| 159 |
}
|
161 |
}
|