Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Reservation #31

Open
wants to merge 70 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
06db9e5
Set default position of map to Wedel coordinates
Amar-Bolkan Dec 1, 2020
538223b
Add Costum login button, which accesses the cykel admin login page an…
Amar-Bolkan Dec 1, 2020
2439be6
Check TODO
Amar-Bolkan Dec 1, 2020
ac6e35b
Custom Login funktion hinzugefuegt.
Amar-Bolkan Dec 3, 2020
a80d747
cleaned up
Amar-Bolkan Dec 4, 2020
5e5d455
Added choosable return locations. Currently hardcoded
Amar-Bolkan Dec 4, 2020
5250ecd
Added selectable return location, when renting bikes
Amar-Bolkan Dec 8, 2020
655f795
Textbox for Error Message
mlange304 Dec 8, 2020
03f70b2
Changed CustomLogin URL to relativ path
Amar-Bolkan Dec 8, 2020
85c2a72
Todo entfernt
Amar-Bolkan Dec 8, 2020
c928a55
messages.json für custom login aktualisiert
mlange304 Dec 9, 2020
2800e52
Changed request for station locations from POST to GET
Amar-Bolkan Dec 9, 2020
332020c
Added conditional rendering so the user has to select a location befo…
Amar-Bolkan Dec 9, 2020
94e1228
Formatting
Amar-Bolkan Dec 9, 2020
12b3e3d
added configurable messages for the return locations etc., also made …
Amar-Bolkan Dec 9, 2020
47a1dc7
Formatting
Amar-Bolkan Dec 9, 2020
cbde3c0
Message Dialog with wrong password from messages.json
mlange304 Dec 9, 2020
16ca31a
Made messages configurable for english and german display, red box du…
Amar-Bolkan Dec 9, 2020
acfbfef
Max with custom login 400
mlange304 Dec 9, 2020
f1722b3
Merge branch 'custom-login' of https://github.com/iteratec/voorwiel i…
mlange304 Dec 9, 2020
3011e45
Formatting
Amar-Bolkan Dec 9, 2020
9a1aa0b
made the selectable return option more intuitive for the user
Amar-Bolkan Dec 9, 2020
b04ae0c
changes the message for choosable locations
Amar-Bolkan Dec 9, 2020
ee3eeea
Bug Fix when returning a bike, now each rentId gets associated with i…
Amar-Bolkan Dec 10, 2020
5b26be5
removed unnecessary if statement inside endRent
Amar-Bolkan Dec 10, 2020
02660e9
Formatting
Amar-Bolkan Dec 10, 2020
eed8ebd
Design Änderungen der Error-Box
mlange304 Dec 14, 2020
9448b5a
Dropdown-Pfeil nicht mehr hardcoded sondern über CSS-Styles
mlange304 Dec 14, 2020
8bce227
Clean up
mlange304 Dec 14, 2020
8eeb3e8
Merge branch 'master' into selectable-return-locations
Amar-Bolkan Dec 14, 2020
0267df0
Merge pull request #1 from iteratec/selectable-return-locations
Amar-Bolkan Dec 14, 2020
e56d5a8
Created separate component to handle the returning bikes without trac…
Amar-Bolkan Dec 14, 2020
d41736a
Merge pull request #2 from iteratec/configurable-bike-return-method
mlange304 Dec 14, 2020
808d38d
removed a comment
Amar-Bolkan Dec 14, 2020
c421eea
Formatting, removed unused methods inside Rent.vue
Amar-Bolkan Dec 15, 2020
55e6cf4
Moved TRACKERAVAILABLE into the config.development.js
Amar-Bolkan Dec 15, 2020
e81d3fb
made environment configurable
Jan 8, 2021
52b9421
Merge branch 'stadtulm:master' into master
jlaacke Aug 9, 2021
ec475c4
set default for end station select; redirect to customLogin
Aug 11, 2021
0678236
use gbfs station information for end station selection
Aug 12, 2021
695bb83
cleaned up end rent functions
Aug 12, 2021
4ef059a
Added reservation button and functionality
fabsei-it Aug 25, 2021
95caf26
Changed Reservation Dialog
fabsei-it Aug 30, 2021
b17fa00
Added DateTimePickerDialog to Reservation creation
fabsei-it Sep 1, 2021
2da1b1d
add stationselect + datetime format to reservation
fabsei-it Sep 6, 2021
c82883b
only show spontaneous rent or reservation if allowed; choose vehicle …
Sep 7, 2021
47b4d48
extended functionality for reservations
fabsei-it Sep 8, 2021
8bcfac1
Merge branch 'dev' of github.com:iteratec/voorwiel into dev
fabsei-it Sep 8, 2021
0905be9
Added methods for getting allowed dates
fabsei-it Sep 15, 2021
6251d86
Change getAllowedDates
fabsei-it Sep 15, 2021
3f56ad6
Added time limitation for new reservations
fabsei-it Sep 22, 2021
3059c18
added vehicleType and station to allowedReservationDate request
Sep 24, 2021
91a4619
added vehicleType and station to allowedReservationTime request
Sep 24, 2021
fe56053
ReservationDialog resets upon closing it
fabsei-it Sep 27, 2021
b047202
Reservationform validation
fabsei-it Sep 28, 2021
5399dc6
Merge remote-tracking branch 'origin/dev' into dev
fabsei-it Sep 28, 2021
29185e4
Fix button-row layout
fabsei-it Oct 1, 2021
7c59b41
Timepicker resets after closing reservationdialog
fabsei-it Oct 1, 2021
c85fb3a
use forbidden ranges for reservation times
Oct 1, 2021
df22dd8
Merge branch 'dev' of github.com:iteratec/voorwiel into dev
fabsei-it Oct 1, 2021
a321f54
merge fixes
fabsei-it Oct 1, 2021
796965f
Fix forbidden time ranges
fabsei-it Oct 1, 2021
26cfc0a
Station + vehicletype required for datetimepicker
fabsei-it Oct 1, 2021
093853f
determine end time for reservation
Oct 2, 2021
7376e8f
Timepicker blocks everything after maxTime
fabsei-it Oct 4, 2021
693bf86
Code cleanup
fabsei-it Oct 6, 2021
190f41c
Added min time to datepicker for reservation end
fabsei-it Oct 6, 2021
476a1d3
Code cleanup and small bug fix
fabsei-it Oct 13, 2021
a67a6b0
Code cleanup
fabsei-it Oct 13, 2021
711e3f8
cleaned up reservation code and fixed some bugs
Oct 15, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ WORKDIR /app
COPY package*.json /app/
RUN npm ci
COPY . /app/
ARG environment=production
ENV NODE_ENV=$environment
RUN npm run build

FROM nginx
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ npm run lint
See [Configuration Reference for Vue](https://cli.vuejs.org/config/) and the configuration files at `config/`. The used configuration is set at build time by using `NODE_ENV=production` (or `development`, `staging`).
For staging and production you may also set `NPM_CONFIG_PRODUCTION=true`.

### Using Docker
```
docker build --build-arg environment=production -t voorwiel .
docker run -p 8080:80 voorwiel
```
You may create a config file as described above with an environment of your choice (e.g. config/config.myenv.js) and provide the environment to the docker build as described.

### Serving
voorwiel is a single page application with client site routing. Because of this, your webserver also needs to serve `index.html` on URLs that normally 404.

Expand Down
5 changes: 4 additions & 1 deletion config/config.development.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ var GBFS_URL = SYSTEM_URL + "/gbfs/gbfs.json";
var DEFAULT_LOCATION = [48.3984, 9.9908];
var DEFAULT_ZOOM = 15;

// set this to true if no tracking is available to return bikes via station selection
var END_STATION_SELECT = false;

var I18N_MESSAGE_OVERRIDE = {};

var SUPPORT_TYPE;
var SUPPORT_URL;

var SENTRY_DSN = '';

module.exports = { ENV, TITLE, NAME, API_ROOT, GBFS_URL, DEFAULT_LOCATION, DEFAULT_ZOOM, I18N_MESSAGE_OVERRIDE, SUPPORT_TYPE, SUPPORT_URL, SENTRY_DSN };
module.exports = { ENV, TITLE, NAME, API_ROOT, GBFS_URL, DEFAULT_LOCATION, DEFAULT_ZOOM, I18N_MESSAGE_OVERRIDE, SUPPORT_TYPE, SUPPORT_URL, SENTRY_DSN, END_STATION_SELECT };
5 changes: 4 additions & 1 deletion config/config.production.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ var GBFS_URL = SYSTEM_URL + "/gbfs/gbfs.json";
var DEFAULT_LOCATION = [48.3984, 9.9908];
var DEFAULT_ZOOM = 15;

// set this to true if no tracking is available to return bikes via station selection
var END_STATION_SELECT = false;

var I18N_MESSAGE_OVERRIDE = {
"en": {
"message": {
Expand All @@ -34,4 +37,4 @@ var SUPPORT_URL = 'https://support.ulm.dev';

var SENTRY_DSN = '';

module.exports = { ENV, TITLE, NAME, API_ROOT, GBFS_URL, DEFAULT_LOCATION, DEFAULT_ZOOM, I18N_MESSAGE_OVERRIDE, SUPPORT_TYPE, SUPPORT_URL, SENTRY_DSN };
module.exports = { ENV, TITLE, NAME, API_ROOT, GBFS_URL, DEFAULT_LOCATION, DEFAULT_ZOOM, I18N_MESSAGE_OVERRIDE, SUPPORT_TYPE, SUPPORT_URL, SENTRY_DSN, END_STATION_SELECT };
5 changes: 4 additions & 1 deletion config/config.staging.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ var GBFS_URL = SYSTEM_URL + "/gbfs/gbfs.json";
var DEFAULT_LOCATION = [48.3984, 9.9908];
var DEFAULT_ZOOM = 15;

// set this to true if no tracking is available to return bikes via station selection
var END_STATION_SELECT = false;

var I18N_MESSAGE_OVERRIDE = {};

var SUPPORT_TYPE = 'zammad';
var SUPPORT_URL = 'https://support.ulm.dev';

var SENTRY_DSN = '';

module.exports = { ENV, TITLE, NAME, API_ROOT, GBFS_URL, DEFAULT_LOCATION, DEFAULT_ZOOM, I18N_MESSAGE_OVERRIDE, SUPPORT_TYPE, SUPPORT_URL, SENTRY_DSN };
module.exports = { ENV, TITLE, NAME, API_ROOT, GBFS_URL, DEFAULT_LOCATION, DEFAULT_ZOOM, I18N_MESSAGE_OVERRIDE, SUPPORT_TYPE, SUPPORT_URL, SENTRY_DSN, END_STATION_SELECT };
174 changes: 86 additions & 88 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 33 additions & 27 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,16 @@
/>
<gbfs-view />
<router-view></router-view>
<div class="rent-buttonarea">
<v-btn fab dark x-small v-if="hasSupport" :to="{name: 'support'}" color="red" class="support-button">
<v-icon>{{ mdi.helpCircleOutline }}</v-icon>
</v-btn>
<v-btn rounded x-large color="success" class="login-button" v-if="!user" :to="{name: 'login'}">
<v-icon>{{ mdi.login }}</v-icon>&nbsp;<span>{{ $t('message.app.login') }}</span>
</v-btn>
<RentButton v-if="user" class="rent-button" />
</div>
<v-row class="button-row">
<v-btn fab dark x-small v-if="hasSupport" :to="{name: 'support'}" color="red" class="btn">
<v-icon>{{ mdi.helpCircleOutline }}</v-icon>
</v-btn>
<v-btn rounded x-large color="success" class="btn" v-if="!user" :to="{name: 'login'}">
<v-icon>{{ mdi.login }}</v-icon>&nbsp;<span>{{ $t('message.app.login') }}</span>
</v-btn>
<RentButton v-if="user && this.fetchVehicleTypesForSpontaneousRent().length > 0" class="btn" />
<ReservationButton v-if="user && this.fetchVehicleTypesForReservation().length > 0" class="btn"/>
</v-row>
<AppError />
</v-main>
</v-app>
Expand All @@ -64,13 +65,14 @@
import About from './components/About';
import GbfsView from './components/GbfsView';
import RentButton from './components/RentButton';
import ReservationButton from './components/ReservationButton';
import AppError from './components/AppError';

const blank = (v) => !(typeof v !== 'undefined' && v !== '');

export default {
name: 'App',
components: {About, GbfsView, RentButton, AppError},
components: {About, GbfsView, RentButton, AppError, ReservationButton},
data: function() {
return {
name: this.$appConfig.NAME,
Expand All @@ -87,11 +89,26 @@
let env = this.$appConfig.ENV;
return require('@/assets/logo' + (env != 'production' ? '.' + env : '') + '.png');
},
...mapState(['user'])
...mapState(['user']),
...mapState(['gbfs'])
},
methods: {
logout() {
this.$store.dispatch("LOGOUT");
},
fetchVehicleTypesForReservation() {
if (this.gbfs !== null) {
return this.$store.getters.getGBFSVehicleTypesForReservation();
} else {
return [];
}
},
fetchVehicleTypesForSpontaneousRent() {
if (this.gbfs !== null) {
return this.$store.getters.getGBFSVehicleTypesForSpontaneousRent();
} else {
return [];
}
}
},
watch: {
Expand All @@ -104,24 +121,13 @@


<style>
.support-button,
.rent-button,
.login-button {
.button-row {
justify-content: space-around;
position: fixed;
bottom: 2rem;
text-align: center;
}
/* bad hack, goes away when we restructure the navigation */
#attach-sheet + .rent-buttonarea .rent-button,
#attach-sheet + .rent-buttonarea .login-button {
z-index: 300;
}
.rent-button,
.login-button {
left: 50%;
transform: translateX(-50%);
width: 100%;
}
.support-button {
left: 1rem;
.btn {
margin-top: 10px;
}
</style>
Loading