Skip to content

Commit

Permalink
Adapting GUI to HAL API changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
schlpbch committed Mar 31, 2017
1 parent 0426732 commit 6ba1bac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion public/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ <h5>Ankunftsort</h5>
</md-card-title>
<md-card-actions layout="row" layout-align="end center">
<md-button class="md-primary" ng-click="cancelBooking($event, booking)">annullieren</md-button>
<md-button class="md-primary md-raised" ng-href="../{{booking.links[0].href}}">
<md-button class="md-primary md-raised" ng-href="../{{booking._links[0].href}}">
Billett
</md-button>
</md-card-actions>
Expand Down
10 changes: 5 additions & 5 deletions public/app/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,31 +43,31 @@ app.controller('AppCtrl', ['$scope', '$mdSidenav', '$mdDialog', '$http', functio
}

$scope.getOffers = function (event, item) {
$http.get('../' + item.links[0].href)
$http.get('../' + item._links[0].href)
.then(function (res) {
$scope.offers = res.data
$scope.tabs.selectedIndex = 2
})
}

$scope.getPrebooking = function (event, item) {
$http.get('../' + item.links[0].href)
$http.get('../' + item._links[0].href)
.then(function (res) {
$scope.prebooking = res.data
$scope.tabs.selectedIndex = 3
})
}

$scope.getBooking = function (event, item) {
$http.get('../' + item.links[0].href)
$http.get('../' + item._links[0].href)
.then(function (res) {
$scope.booking = res.data
$scope.tabs.selectedIndex = 4
})
}

$scope.cancelBooking = function (event, item) {
$http.get('../' + item.links[2].href)
$http.get('../' + item._links[2].href)
.then(function (res) {
$scope.cancellation = res.data

Expand All @@ -85,7 +85,7 @@ app.controller('AppCtrl', ['$scope', '$mdSidenav', '$mdDialog', '$http', functio
}

$scope.printBooking = function (event, bookings) {
$http.get('../' + bookings.links[0].href)
$http.get('../' + bookings._links[0].href)
.then(function (res) {
var ticketUrl = res.config.url
$mdDialog.show({
Expand Down

0 comments on commit 6ba1bac

Please sign in to comment.