| Line 558... |
Line 558... |
| 558 |
}
|
558 |
}
|
| Line 559... |
Line 559... |
| 559 |
|
559 |
|
| 560 |
sub getSchedule {
|
560 |
sub getSchedule {
|
| 561 |
my $RCid = shift // return "ERROR: No RCid provided to getSchedule";
|
561 |
my $RCid = shift // return "ERROR: No RCid provided to getSchedule";
|
| - |
|
562 |
my $filter = shift // "";
|
| 562 |
my $filter = shift // "";
|
563 |
my $output = shift // "";
|
| Line 563... |
Line 564... |
| 563 |
my $year = 1900 + (localtime)[5];
|
564 |
my $year = 1900 + (localtime)[5];
|
| 564 |
|
565 |
|
| 565 |
my @whereclause;
|
566 |
my @whereclause;
|
| Line 651... |
Line 652... |
| 651 |
} else {
|
652 |
} else {
|
| 652 |
push @shifts, $h->li ({ class=> $s->{date} eq $dt ? "highlighted" : "shaded" }, $h->div ({ class=>"lisp0" }, [ $h->div ({ class=>"liLeft" }, join ' ', ($s->{date}, $s->{dayofweek}, $s->{time}, $s->{location}, $s->{dept} eq "CLA" ? "MVP Class:" : getDepartments()->{$s->{dept}}, $s->{role}, $s->{teams})), $h->div ({ class=>"liRight" }, $s->{buttons}) ]));
|
653 |
push @shifts, $h->li ({ class=> $s->{date} eq $dt ? "highlighted" : "shaded" }, $h->div ({ class=>"lisp0" }, [ $h->div ({ class=>"liLeft" }, join ' ', ($s->{date}, $s->{dayofweek}, $s->{time}, $s->{location}, $s->{dept} eq "CLA" ? "MVP Class:" : getDepartments()->{$s->{dept}}, $s->{role}, $s->{teams})), $h->div ({ class=>"liRight" }, $s->{buttons}) ]));
|
| 653 |
}
|
654 |
}
|
| 654 |
$hours += $s->{volhours} unless $s->{dept} eq "PER" or $s->{dept} eq "CLA";
|
655 |
$hours += $s->{volhours} unless $s->{dept} eq "PER" or $s->{dept} eq "CLA";
|
| 655 |
}
|
656 |
}
|
| - |
|
657 |
|
| - |
|
658 |
if ($output eq "hours") {
|
| - |
|
659 |
return $hours;
|
| - |
|
660 |
}
|
| Line 656... |
Line 661... |
| 656 |
|
661 |
|
| 657 |
if (scalar @shifts) {
|
662 |
if (scalar @shifts) {
|
| 658 |
return $h->ul ([ @shifts, $h->h5 ("Currently showing $hours hours of Volunteer Time.") ]);
|
663 |
return $h->ul ([ @shifts, $h->h5 ("Currently showing $hours hours of Volunteer Time.") ]);
|
| 659 |
} else {
|
664 |
} else {
|
| Line 940... |
Line 945... |
| 940 |
);
|
945 |
);
|
| 941 |
my $response = from_json($client->responseContent());
|
946 |
my $response = from_json($client->responseContent());
|
| Line 942... |
Line 947... |
| 942 |
|
947 |
|
| Line 943... |
Line 948... |
| 943 |
my $activationCode = $response->{activationCode};
|
948 |
my $activationCode = $response->{activationCode};
|
| 944 |
|
949 |
|
| 945 |
my @add_response = `/bin/curl --location --request POST 'https://core.wrstbnd.io/rest/core/v1/assign' --header 'Authorization: 601037851507c624' --form accountid=$accountid --form ticketactcode=$activationCode --output /dev/null --silent --write-out '%{http_code}\n'`;
|
950 |
# my @add_response = `/bin/curl --location --request POST 'https://core.wrstbnd.io/rest/core/v1/assign' --header 'Authorization: 601037851507c624' --form accountid=$accountid --form ticketactcode=$activationCode --output /dev/null --silent --write-out '%{http_code}\n'`;
|
| Line 946... |
Line 951... |
| 946 |
my $add_response = $add_response[$#add_response];
|
951 |
# my $add_response = $add_response[$#add_response];
|
| Line 947... |
Line 952... |
| 947 |
chomp $add_response;
|
952 |
# chomp $add_response;
|
| 948 |
|
953 |
|
| 949 |
$dbh->do ("update assignment set wb_ticket_act = ? where Gid = ? and RCid = ? and role like ?", undef, $activationCode, $shift_id, $user_id, 'CLA-%') unless $add_response ne "200";
|
954 |
# $dbh->do ("update assignment set wb_ticket_act = ? where Gid = ? and RCid = ? and role like ?", undef, $activationCode, $shift_id, $user_id, 'CLA-%') unless $add_response ne "200";
|
| 950 |
|
955 |
|