| Line 173... |
Line 173... |
| 173 |
}
|
173 |
}
|
| 174 |
} elsif ($AL > 1) { # A lead or higher is updating someone else's record
|
174 |
} elsif ($AL > 1) { # A lead or higher is updating someone else's record
|
| Line 175... |
Line 175... |
| 175 |
|
175 |
|
| 176 |
use List::Util qw/sum/;
|
176 |
use List::Util qw/sum/;
|
| 177 |
# if (sum (values %{ convertDepartments ($F->{department}) }) > 0 and $F->{access} == 0) {
|
177 |
# if (sum (values %{ convertDepartments ($F->{department}) }) > 0 and $F->{access} == 0) {
|
| 178 |
if (sum (values %{ convertDepartments ($F->{department}) }) > 0 and $F->{access} == 1) {
|
178 |
if ($F->{department} and sum (values %{ convertDepartments ($F->{department}) }) > 0 and $F->{access} == 1) {
|
| 179 |
# activating a user for the first time...
|
179 |
# activating a user for the first time...
|
| 180 |
$F->{access} = 1;
|
180 |
$F->{access} = 1;
|
| 181 |
# sendNewUserEMail ("Activate", $F);
|
181 |
# sendNewUserEMail ("Activate", $F);
|
| Line 349... |
Line 349... |
| 349 |
# if ($F->{mvp_pass}) {
|
349 |
# if ($F->{mvp_pass}) {
|
| 350 |
# $F->{mvp_pass} = $h->label ({ class=>"switch" }, [$h->input ({ type=>"checkbox", name=>"mvp_pass", value=>1, readonly=>[], disabled=>[], checked=>[] }), $h->span ({ class=>"slider round" })]);
|
350 |
# $F->{mvp_pass} = $h->label ({ class=>"switch" }, [$h->input ({ type=>"checkbox", name=>"mvp_pass", value=>1, readonly=>[], disabled=>[], checked=>[] }), $h->span ({ class=>"slider round" })]);
|
| 351 |
# } else {
|
351 |
# } else {
|
| 352 |
# $F->{mvp_pass} = $h->label ({ class=>"switch" }, [$h->input ({ type=>"checkbox", name=>"mvp_pass", value=>0, readonly=>[], disabled=>[] }), $h->span ({ class=>"slider round" })]);
|
352 |
# $F->{mvp_pass} = $h->label ({ class=>"switch" }, [$h->input ({ type=>"checkbox", name=>"mvp_pass", value=>0, readonly=>[], disabled=>[] }), $h->span ({ class=>"slider round" })]);
|
| 353 |
# }
|
353 |
# }
|
| 354 |
if ($currentuser->{access} > 2 or convertDepartments($currentuser->{department})->{MVP} >= 2) {
|
354 |
if ($currentuser->{access} > 2 or ($currentuser->{department} and convertDepartments($currentuser->{department}))->{MVP} >= 2) {
|
| 355 |
if($F->{MVPid}) {
|
355 |
if($F->{MVPid}) {
|
| 356 |
$F->{MVPid} .= ' ' . $h->button ({ onClick=>"window.open('update_mvp_ticket.pl?change=Delete&RCid=$F->{RCid}&MVPid=$F->{MVPid}','Change MVP Ticket','resizable,height=260,width=370'); return false;" }, "Delete Match");
|
356 |
$F->{MVPid} .= ' ' . $h->button ({ onClick=>"window.open('update_mvp_ticket.pl?change=Delete&RCid=$F->{RCid}&MVPid=$F->{MVPid}','Change MVP Ticket','resizable,height=260,width=370'); return false;" }, "Delete Match");
|
| 357 |
} else {
|
357 |
} else {
|
| 358 |
$F->{MVPid} .= $h->button ({ onClick=>"window.open('update_mvp_ticket.pl?change=lookup&RCid=$F->{RCid}','Change MVP Ticket','resizable,height=260,width=370'); return false;" }, "Manual Match");
|
358 |
$F->{MVPid} .= $h->button ({ onClick=>"window.open('update_mvp_ticket.pl?change=lookup&RCid=$F->{RCid}','Change MVP Ticket','resizable,height=260,width=370'); return false;" }, "Manual Match");
|
| 359 |
my $possible_matches = $dbh->selectall_arrayref ("select id, full_name from v_ticket where isnull(RCid) = true and email = (select email from official where RCid = ?) union
|
359 |
my $possible_matches = $dbh->selectall_arrayref ("select id, full_name from v_ticket where isnull(RCid) = true and email = (select email from official where RCid = ?) union
|