diff --git a/CHANGES.md b/CHANGES.md index a52f7ed19..f9ef67085 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,7 +3,7 @@ **Bug fixes** -* +* Show POIs on dive detail page 2.21.1 / 2019-09-11 =================== diff --git a/src/app/config/factories.js b/src/app/config/factories.js index adbb0ceb0..d6880595f 100644 --- a/src/app/config/factories.js +++ b/src/app/config/factories.js @@ -15,6 +15,7 @@ function settingsFactory(globalSettings) { servicesUrl = globalSettings.API_URL + '/' + globalSettings.API_DIR + '/$lang/' + globalSettings.SERVICES_FILE, eventsUrl = globalSettings.API_URL + '/' + globalSettings.API_DIR + '/$lang/' + globalSettings.TOURISTIC_EVENTS_FILE, touristicUrl = globalSettings.API_URL + '/' + globalSettings.API_DIR + '/$lang/' + globalSettings.TOURISTIC_CONTENTS_FILE, + diveUrl = globalSettings.API_URL + '/' + globalSettings.API_DIR + '/$lang/' + globalSettings.DIVES_DIR + '/', divesUrl = globalSettings.API_URL + '/' + globalSettings.API_DIR + '/$lang/' + globalSettings.DIVES_FILE, flatUrl = globalSettings.API_URL + '/' + globalSettings.API_DIR + '/$lang/' + globalSettings.FLAT_FILE, warningCategoriesUrl = globalSettings.API_URL + '/' + globalSettings.API_DIR + '/$lang/' + globalSettings.WARNING_CAT_DIR + '/' + globalSettings.WARNING_CAT_FILE, @@ -48,6 +49,7 @@ function settingsFactory(globalSettings) { servicesUrl: servicesUrl, eventsUrl: eventsUrl, touristicUrl: touristicUrl, + diveUrl: diveUrl, divesUrl: divesUrl, flatUrl: flatUrl, warningCategoriesUrl: warningCategoriesUrl, diff --git a/src/app/config/settings.default.json b/src/app/config/settings.default.json index 7aaafda71..97af00e1a 100644 --- a/src/app/config/settings.default.json +++ b/src/app/config/settings.default.json @@ -125,6 +125,7 @@ "DEPARTURE_ARRIVAL_ICON": "", "API_DIR": "api", "TREKS_DIR": "treks", + "DIVES_DIR": "dives", "TREKS_FILE": "treks.geojson", "POI_FILE": "pois.geojson", "SERVICES_FILE": "services.geojson", diff --git a/src/app/detail/controllers.js b/src/app/detail/controllers.js index 3ab08425d..89fe795c3 100644 --- a/src/app/detail/controllers.js +++ b/src/app/detail/controllers.js @@ -233,7 +233,7 @@ function DetailController($scope, $rootScope, $state, $q, $modal, $timeout, $sta function getPoisOfResult(result, forceRefresh) { var deferred = $q.defer(); - poisService.getPoisFromElement(result.id, forceRefresh) + poisService.getPoisFromElement(result, forceRefresh) .then( function (elementPois) { $scope.pois = elementPois.features; @@ -248,8 +248,7 @@ function DetailController($scope, $rootScope, $state, $q, $modal, $timeout, $sta function getInterests(result, forceRefresh) { var promises = [], activeDefaultType = null; - - if (result.properties.contentType === 'trek') { + if (result.properties.contentType === 'trek' || result.properties.contentType === 'dive') { promises.push( getPoisOfResult(result, forceRefresh) .then( diff --git a/src/app/detail/templates/detail-aside.html b/src/app/detail/templates/detail-aside.html index af7e809b9..e438948f3 100644 --- a/src/app/detail/templates/detail-aside.html +++ b/src/app/detail/templates/detail-aside.html @@ -47,7 +47,7 @@ -