vehicle_type_id for station filter and aa-journay

This commit is contained in:
ragu 2022-07-12 19:59:44 +02:00
parent c2238c9932
commit 3ea4b37b78
13 changed files with 162 additions and 374 deletions

View file

@ -582,6 +582,8 @@ EOF
elsif($key =~ /int18/ && "$size" eq "select" && $node_meta->{tpl_id} == 210){#sharing_type
my @_lock_valxx = ();
#delete hidden-lv if not LV
delete $dbt->{copri_conf}->{sharing_type}->{4} if($varenv{syshost} ne "shareedms-lv");
foreach my $s_key (sort keys (%{ $dbt->{copri_conf}->{sharing_type} })) {
push @_lock_valxx, "$s_key:$dbt->{copri_conf}->{sharing_type}->{$s_key}";
}
@ -682,10 +684,16 @@ EOF
print $q->td({-class=>'content1_cms',-colspan=>'1'},$but->selector2("$key","50px;","$height",$ctrel->{$key},@_service_valxx));
}
elsif($key =~ /txt24/ && $node_meta->{tpl_id} == 225){ #Station on station_group (bikenode.main_ids)
my %station_filter_hash = ();
my @_valxx = ("");
foreach my $rid (sort { $bike_nodes->{$a}->{node_name} cmp $bike_nodes->{$b}->{node_name} } keys (%$bike_nodes)){
push (@_valxx, "$bike_nodes->{$rid}->{main_id}:$bike_nodes->{$rid}->{node_name} - $bike_nodes->{$rid}->{main_id}");
#push (@_valxx, "$bike_nodes->{$rid}->{main_id}:$bike_nodes->{$rid}->{node_name} - $bike_nodes->{$rid}->{main_id}");
$station_filter_hash{$bike_nodes->{$rid}->{type_id}} = 1;
}
foreach my $type_id (keys (%station_filter_hash)){
push (@_valxx, "$type_id:$dbt->{copri_conf}->{type_id}->{$type_id} - $type_id");
}
my $height = scalar(@_valxx);
print $q->Tr();
print $q->td({-class=>'left_italic_cms',-style=>'vertical-align:top;',-colspan=>'1'},"$des");

View file

@ -129,13 +129,6 @@ print $q->div({-class=>"content2_legende"}, $q->img({-style=>'height:30px;', -sr
print "$initMap|$varenv->{dbname}|$api_return->{authcookie}|$users_sharee->{c_id}|$kmlfile" if($users_dms->{u_id} == $dbt->{copri_conf}->{superu_id});
#print "$varenv->{syshost}/$varenv->{dbname} --> $dbt->{operator}->{$varenv->{dbname}}->{initMap}";
#if($R::ask_radID && $R::ask_radID =~ /^\d+$/){
# require "Tpl/ModalboxDialog.pm";
# &ModalboxDialog::mobox2($tpl_name,$tpl_id,$parent_id,$main_id,$u_id,$u_group,$lang,$users_sharee,$bg_color1,$bg_color2,$R::ask_radID);
# }
#
}
1;

View file

@ -181,10 +181,9 @@ sub tpl(){
my $limit = $R::limit || $varenv{limit};
my $offset = $R::offset || "0";
if($node_meta->{int10} && $node_meta->{int10} < $varenv{limit}){
$offset = 0;
}
#if($node_meta->{int10} && $node_meta->{int10} < $varenv{limit}){
# $offset = 0;
#}
#backward | forward
if($R::go && $R::go eq "backward_list"){
@ -583,12 +582,25 @@ sub tpl(){
print $q->td({-class=>"search_line"},$q->textfield(-class=>'stxt',-name=>"s_$key",-default=>"$s_val",-size=>"$size",-maxlength=>40, -autofocus=>1),"\n");
}elsif($table =~ /contentadr|contenttrans/ && $key eq "txt08"){
print $q->td({-class=>"search_line"},$q->textfield(-class=>'stxt',-name=>"s_$key",-default=>"$s_val",-size=>"$size",-maxlength=>40, -autofocus=>1),"\n");
}elsif($size =~ /select/ && $key =~ /int12|txt24/ && $tpl_id =~ /225|210/){#txt24=Flotten ID select
}elsif($size =~ /select/ && $key =~ /int12/ && $tpl_id =~ /210/){#Tarif for Flot
my @s_valxx = ("");
foreach my $rid (sort { $bike_nodes->{$a}->{node_name} cmp $bike_nodes->{$b}->{node_name} } keys (%$bike_nodes)){
push (@s_valxx, "$bike_nodes->{$rid}->{main_id}:$bike_nodes->{$rid}->{node_name} - $bike_nodes->{$rid}->{main_id}");
}
print $q->td({-class=>'search_line'},$but->selector_class("s_$key","","",$s_val,@s_valxx)),"\n";
}elsif($size =~ /select/ && $key =~ /txt24/ && $tpl_id =~ /225/){#txt24=bike_group (for station filter)
my %station_filter_hash = ();
my @s_valxx = ("");
foreach my $rid (sort { $bike_nodes->{$a}->{node_name} cmp $bike_nodes->{$b}->{node_name} } keys (%$bike_nodes)){
#push (@s_valxx, "$bike_nodes->{$rid}->{main_id}:$bike_nodes->{$rid}->{node_name} - $bike_nodes->{$rid}->{main_id}");
$station_filter_hash{$bike_nodes->{$rid}->{type_id}} = 1;
}
foreach my $type_id (keys (%station_filter_hash)){
push (@s_valxx, "$type_id:$dbt->{copri_conf}->{type_id}->{$type_id} - $type_id");
}
print $q->td({-class=>'search_line'},$but->selector_class("s_$key","","",$s_val,@s_valxx)),"\n";
}elsif($size =~ /select/ && $key =~ /int21|int22/ && $tpl_id == 228){#Bonusnummern
my @s_valxx = ("");
foreach my $rid (sort { $tariff_all->{$a}->{barcode} <=> $tariff_all->{$b}->{barcode} } keys (%$tariff_all)){
@ -1012,16 +1024,23 @@ sub tpl(){
print $q->td({-class=>'tdtxt',-style=>"$txtstyle $set_style $colorize"},"$dbt->{copri_conf}->{lock_state}->{$ct4rel->{$id}->{$key}}"),"\n";
}elsif($ct4rel->{$id}->{template_id} == 205 && $key eq "int11"){#lock_system
print $q->td({-class=>'tdtxt',-style=>"$txtstyle $set_style"},"$dbt->{copri_conf}->{lock_system}->{$ct4rel->{$id}->{$key}}"),"\n";
#}elsif($ct4rel->{$id}->{template_id} == 210 && $key eq "int01"){#tariff_unit
# print $q->td({-class=>'tdtxt',-style=>"$txtstyle $set_style"},"$dbt->{copri_conf}->{tariff_unit}->{$ct4rel->{$id}->{$key}}"),"\n";
}elsif($ct4rel->{$id}->{template_id} == 210 && $key eq "int18"){#sharing_type
print $q->td({-class=>'tdtxt',-style=>"$txtstyle $set_style"},"$dbt->{copri_conf}->{sharing_type}->{$ct4rel->{$id}->{$key}}"),"\n";
}elsif($ct4rel->{$id}->{template_id} =~ /225|210/ && $key =~ /txt24|int12/){
}elsif($ct4rel->{$id}->{template_id} == 210 && $key eq "int12"){
my $flotten = "";
foreach my $rid (sort { $bike_nodes->{$a}->{node_name} cmp $bike_nodes->{$b}->{node_name} } keys (%$bike_nodes)){
$flotten .= "$bike_nodes->{$rid}->{node_name} - $bike_nodes->{$rid}->{main_id}<br />" if($ct4rel->{$id}->{$key} =~ /$bike_nodes->{$rid}->{main_id}/);
}
print $q->td({-class=>'tdtxt',-style=>"$txtstyle $set_style"},"$flotten"),"\n";
}elsif($ct4rel->{$id}->{template_id} == 225 && $key eq "txt24"){
my @station_filter = ($ct4rel->{$id}->{$key});
@station_filter = split(/\s+/,$ct4rel->{$id}->{$key}) if($ct4rel->{$id}->{$key} =~ /\d\s+\d/);
my $group_type = "";
foreach (@station_filter){
$group_type .= "$dbt->{copri_conf}->{type_id}->{$_} - $_<br />";
}
print $q->td({-class=>'tdtxt',-style=>"$txtstyle $set_style"},"$group_type"),"\n";
}elsif($ct4rel->{$id}->{template_id} == 228 && $key =~ /int21|int22/){
my $bonustarif = "";
foreach my $rid (sort { $tariff_all->{$a}->{barcode} <=> $tariff_all->{$b}->{barcode} } keys (%$tariff_all)){
@ -1347,7 +1366,8 @@ sub tpl(){
print $q->end_form;
my $offset_nr = $offset + $nr;
my $counter = $node_meta->{int10} || $rows;
#my $counter = $node_meta->{int10} || $rows;
my $counter = $rows;
print $q->div({-style=>'float:left;padding:6px 0 0 10px;'},"Zeile: $offset - $offset_nr / $counter");
#backward | forward
@ -1369,14 +1389,14 @@ sub tpl(){
print "</div>";
if($varenv{wwwhost} !~ /regiox/ && $node_meta->{main_id} > 300000 && $rows =~ /\d/){
$db->updater("nodes","main_id",$node_meta->{main_id},"int10",$rows);
}
#if($varenv{wwwhost} !~ /regiox/ && $node_meta->{main_id} > 300000 && $rows =~ /\d/){
# $db->updater("nodes","main_id",$node_meta->{main_id},"int10",$rows);
#}
#letzte Suche
if(!$v_journal && $R::detail_search && ref($searchref) eq "HASH" && $nr =~ /\d/){
$db->updater("nodes","main_id","300023","int10",$nr);
}
#if(!$v_journal && $R::detail_search && ref($searchref) eq "HASH" && $nr =~ /\d/){
# $db->updater("nodes","main_id","300023","int10",$nr);
#}
#print Dumper($node_meta);
return $return;
}