App-feedback SX bike fix

This commit is contained in:
ragu 2022-08-02 16:36:41 +02:00
parent f1f6eef8c8
commit a577f60e91
4 changed files with 13 additions and 10 deletions

View file

@ -672,10 +672,10 @@ div#ContentLogin {
div#Content4list { div#Content4list {
text-align:left; text-align:left;
font-size:15px; font-size:15px;
border: 0px solid gray; border: 0px solid yellow;
margin: 0; margin: 0;
padding: 40px 5px 5px 0px; padding: 40px 5px 5px 0px;
min-width: 1250px; min-width: 2000px;
} }
div#Content4cal { div#Content4cal {

View file

@ -430,8 +430,12 @@ sub service_insert(){
}; };
if($q->param('bike') =~ /(\d+)/){ if($q->param('bike') =~ /(\d+)/){
my $bike = $1; my $bike = $q->escapeHTML($q->param('bike'));
$insert->{barcode} = $bike; my $bike_id = $bike;
$bike_id =~ s/S[1-9]X/SX/;
$bike_id = $1 if($bike_id =~ /(\d+)/);
$insert->{barcode} = $bike_id;
$c_id = $dbt->insert_contentoid($dbh,$insert,""); $c_id = $dbt->insert_contentoid($dbh,$insert,"");
#if bike_broken then also to contentpos #if bike_broken then also to contentpos
@ -440,7 +444,7 @@ sub service_insert(){
table => "content", table => "content",
fetch => "one", fetch => "one",
template_id => "205", template_id => "205",
barcode => "$bike", barcode => "$bike_id",
}; };
my $crecord_content = $dbt->fetch_record($dbh,$cpref); my $crecord_content = $dbt->fetch_record($dbh,$cpref);
if(ref($crecord_content) eq "HASH" && $crecord_content->{c_id} && $crecord_content->{main_id}){ if(ref($crecord_content) eq "HASH" && $crecord_content->{c_id} && $crecord_content->{main_id}){

View file

@ -126,9 +126,9 @@ sub sig_available {
#Other than Active status, should not be used to display information to a customer #Other than Active status, should not be used to display information to a customer
$response_out->{$station}->{state} = "defect"; $response_out->{$station}->{state} = "defect";
if(uc($resp->{status}) =~ /ACTIVE|PRIVATE/i){ if(uc($resp->{site}->{status}) =~ /ACTIVE|PRIVATE/i){
$response_out->{$station}->{state} = "available"; $response_out->{$station}->{state} = "available";
}elsif(uc($resp->{status}) eq "MAINTANANCE"){ }elsif(uc($resp->{site}->{status}) eq "MAINTANANCE"){
$response_out->{$station}->{state} = "maintanance"; $response_out->{$station}->{state} = "maintanance";
} }
@ -162,7 +162,7 @@ sub sig_available {
} }
#print FILE "response_out:" . Dumper($response_out->{$station}) . "\n"; #print FILE "response_out:" . Dumper($response_out->{$station}) . "\n";
#print FILE "return2copri:" . Dumper($return2copri->{$station}) . "\n"; #print FILE "return2copri:" . Dumper($return2copri->{$station}) . "\n";
delete $response_out->{$station} if(uc($resp->{status}) !~ /ACTIVE|PRIVATE/i || !$resp->{site}->{lat} || !$resp->{site}->{lon}); delete $response_out->{$station} if(uc($resp->{site}->{status}) !~ /ACTIVE|PRIVATE/i || !$resp->{site}->{lat} || !$resp->{site}->{lon});
} }
}#end stations_available }#end stations_available

View file

@ -332,8 +332,7 @@ EOF
#BIG LOOP loop content table #BIG LOOP loop content table
#if($users_dms->{sort_updown} eq "up"){ $users_dms->{sort_updown} = "down" if(!$users_dms->{sort_updown});
$users_dms->{cal_sort_updown} = "down" if(!$users_dms->{cal_sort_updown});
my $nr=0; my $nr=0;
foreach my $id (sort { foreach my $id (sort {
if($users_dms->{sort_updown} eq "down"){ if($users_dms->{sort_updown} eq "down"){