diff --git a/copri4/main/src/Mod/APIfunc.pm b/copri4/main/src/Mod/APIfunc.pm index 302d94b..362677c 100755 --- a/copri4/main/src/Mod/APIfunc.pm +++ b/copri4/main/src/Mod/APIfunc.pm @@ -1044,7 +1044,8 @@ sub booking_request(){ $pos_id = $dbt->insert_pos($dbh,$ctt->{c_id},$ct_bike,$ct_station,$auth,$ct_tariff,$request_para,$bike,$booking_state,$owner,$sig_book); $bw->log("booking_request reserved insert_pos:",$pos_id,""); $response_state = "OK, bike " . $bike . " succesfully reserved"; - $response_text = "Erfolgreiche Buchung: $start_loc - $end_loc."; + #$response_text = "Erfolgreiche Buchung: $start_loc - $end_loc."; + $response_text = "Buchung erfolgreich."; } }else{ $response_state = "Failure 4260, reserv timerange"; diff --git a/copri4/shareeapp-operator/css/local_style20240315.css b/copri4/shareeapp-operator/css/local_style20240315.css index eb54121..ae37e8b 100755 --- a/copri4/shareeapp-operator/css/local_style20240315.css +++ b/copri4/shareeapp-operator/css/local_style20240315.css @@ -103,8 +103,7 @@ div a:hover { } .content_title3 { - font-size:1.5em; - padding-top:1.0em; + font-size:1.3em; color: #4f3f3f; } diff --git a/copri4/shareeapp-operator/src/Tpl/CalReserv.pm b/copri4/shareeapp-operator/src/Tpl/CalReserv.pm index f8cf1b8..1eb0da3 100755 --- a/copri4/shareeapp-operator/src/Tpl/CalReserv.pm +++ b/copri4/shareeapp-operator/src/Tpl/CalReserv.pm @@ -52,12 +52,13 @@ sub tpl { $session = "?sessionid=$R::sessionid"; $session_and = "&sessionid=$R::sessionid"; } + my $select_station = $q->escapeHTML($R::select_station) || "LatLng(47.976634, 7.82549)";#defaults to Villaban my $bike = $q->escapeHTML($R::bike) || ""; my $bgcolor1 = "009899";#sharee $bgcolor1 = $dbt->{website}->{$varenv->{syshost}}->{bgcolor1} if($dbt->{website}->{$varenv->{syshost}}->{bgcolor1}); $bgcolor1 = $dbt->{merchant_ids}->{$varenv->{merchant_id}}->{bgcolor1} if($dbt->{merchant_ids}->{$varenv->{merchant_id}}->{bgcolor1}); - my $initMap = "48.741246, 11.210390"; - my $map_zoom = 7; + my $initMap = "47.976634, 7.825490";#Freiburg + my $map_zoom = 10; my $project = "all"; my $uri_server = $dbt->{primary}->{sharee_primary}->{primaryApp}; @@ -123,9 +124,11 @@ sub tpl { my $icon_blue = "Open_Blue.png"; $initMap =~ s/\s//g; my ($lat,$lng) = split(/,/,$initMap); - if($R::select_station && $R::select_station =~ /LatLng\((\d+\.\d+),\s(\d+\.\d+)\)/){ + if($select_station && $select_station =~ /LatLng\((\d+\.\d+),\s(\d+\.\d+)\)/){ $lat = $1; $lng = $2; + }else{ + } print<\n"; $gbfs_station{$station}{LatLng} = "LatLng($response_stations->{shareejson}->{stations}->{$station}->{gps}->{latitude}, $response_stations->{shareejson}->{stations}->{$station}->{gps}->{longitude})"; $gbfs_station{$station}{name} = Encode::encode('utf-8', Encode::decode('iso-8859-1',$response_stations->{shareejson}->{stations}->{$station}->{description})); $gbfs_station{$station}{station_id} = $response_stations->{shareejson}->{stations}->{$station}->{station}; - if($R::select_station && $R::select_station eq $gbfs_station{$station}{LatLng}){ + if($select_station && $select_station eq $gbfs_station{$station}{LatLng}){ $selected_station{uri_operator} = $response_stations->{shareejson}->{stations}->{$station}->{uri_operator}; $selected_station{name} = $gbfs_station{$station}{name}; $selected_station{station_id} = $gbfs_station{$station}{station_id}; @@ -272,7 +275,7 @@ function onLocationFound(e) { function onLocationError(e) { - alert(e.message); + //alert(e.message); } function lastLocation() { @@ -287,7 +290,7 @@ function lastLocation() { } -if("$R::select_station"){ +if("$select_station"){ map.on('locationfound', lastLocation); map.locate({setView: false, maxZoom: 16}); map.setView(L.latLng($lat, $lng), 11); @@ -339,12 +342,12 @@ EOF } if($R::sharee_edit =~ /calendar_bikes_available/ && $bike){ - print $q->div({-style=>'margin:1em 0;text-align:center;clear:both;'},""),"\n"; + print $q->div({-style=>'margin:1em 0;text-align:center;clear:both;'},""),"\n"; print $q->hidden(-name=>"bike",-override=>1,-value=>"$bike"); } my $but_search = "Suchen"; $but_search = "Erneut suchen" if($R::sharee_edit =~ /calendar_bikes_available/); - print $q->div({-style=>'margin:1em 0;text-align:center;clear:both;'},""),"\n"; + print $q->div({-style=>'margin:1em 0;text-align:center;clear:both;'},""),"\n"; print $q->div({-id=>'reserved_bikes'},""),"\n";#not used @@ -354,7 +357,7 @@ EOF my $rest_bikes = "request=bikes_available&calreserv=1&reserv_starttime=$R::reserv_starttime&reserv_endtime=$R::reserv_endtime&authcookie=$coo&lang=de"; $rest_bikes .= "&station=$selected_station{station_id}" if($selected_station{station_id}); - if($R::select_station && $R::select_station =~/LatLng\((\d+\.\d+), (\d+\.\d+)\)/){ + if($select_station && $select_station =~/LatLng\((\d+\.\d+), (\d+\.\d+)\)/){ my $Lat = $1; my $Lng = $2; $rest_bikes .= "&Lat=$Lat&Lng=$Lng"; @@ -389,8 +392,8 @@ EOF my $start_loc = $dts->strftime("%d.%m.%Y %H:%M"); my $dte = $strp->parse_datetime($reserv_endtime); my $end_loc = $dte->strftime("%d.%m.%Y %H:%M"); - print $q->div({-style=>''},"Fahrtbeginn: $start_loc"),"\n"; - print $q->div({-style=>''},"Fahrtende: $end_loc"),"\n"; + print $q->div({-style=>''},"Beginn: $start_loc"),"\n"; + print $q->div({-style=>''},"Ende:    $end_loc"),"\n"; print $q->div({-id=>"return_state_$bike",-style=>'color:green;'},""),"\n"; @@ -505,7 +508,7 @@ EOF $se = $2; } if($ri =~ /^$rangeindex/ && $se == 1){ - $href = "/app/Account/CalendarReserv?sharee_edit=calendar_bikes_available&select_station=$R::select_station&bike=$bike&calreserv=1&authcookie=$coo&lang=de"; + $href = "/app/Account/CalendarReserv?sharee_edit=calendar_bikes_available&select_station=$select_station&bike=$bike&calreserv=1&authcookie=$coo&lang=de"; #print "$ri Von: $blockedhash{$ri}
\n"; my $dtx = $strp->parse_datetime($blockedhash{$ri}); my $start_loc = $dtx->strftime("%d.%m.%Y %H:%M"); @@ -546,14 +549,14 @@ EOF print $q->div({-style=>'color:red;'},"Im gewähltem Zeitfenster nicht verfügbar"),"\n"; }else{ #Mietrad buchen - print $q->div({-id=>"button_reserv_$bike",-style=>'clear:both;text-align:center;display:block;'},"Mietrad buchen"),"\n"; + print $q->div({-id=>"button_reserv_$bike",-style=>'clear:both;text-align:center;display:block;'},"Mietrad buchen"),"\n"; #Buchung stornieren - print $q->div({-id=>"button_cancel_$bike",-style=>'clear:both;text-align:center;display:none;'},"Buchung stornieren"),"\n"; + print $q->div({-id=>"button_cancel_$bike",-style=>'clear:both;text-align:center;display:none;'},"Buchung stornieren"),"\n"; } #Weitere Verfügbarkeit anzeigen - print $q->div({-id=>"button_availablbility_$bike",-style=>'clear:both;text-align:center;display:block;'},"Weitere Verfügbarkeit anzeigen"),"\n"; + print $q->div({-id=>"button_availablbility_$bike",-style=>'clear:both;text-align:center;display:block;'},"Verfügbarkeitsanzeige"),"\n"; #print Dumper($response_bikes->{shareejson}->{bikes}->{$bike}->{rental_description}->{tarif_elements}); @@ -581,7 +584,7 @@ EOF print $q->div({-style=>'padding:1em 0.5em;font-weight:bold;'},"Deine $oprefix Buchungen:"),"\n" if($i == 1); #selector by $rid pos_id print $q->div({-id=>"return_state_$rid"},""),"\n"; - print $q->div({-id=>"button_cancel_$rid", -style=>'padding:0.2em 0.5em;color:green;display:block;'},"Buchung stornieren $start_loc - $end_loc: $response_bikes->{shareejson}->{bikes_occupied}->{$rid}->{description} $bike an Station $response_bikes->{shareejson}->{bikes_occupied}->{$rid}->{station}"),"\n"; + print $q->div({-id=>"button_cancel_$rid", -style=>'padding:0.2em 0.5em;color:green;display:block;'},"Buchung stornieren $start_loc - $end_loc: $response_bikes->{shareejson}->{bikes_occupied}->{$rid}->{description} $bike an Station $response_bikes->{shareejson}->{bikes_occupied}->{$rid}->{station}"),"\n"; print $q->div({-id=>"button_reserv_$rid",-style=>'color:red;'},""),"\n";#dummy }