diff --git a/CHANGELOG.md b/CHANGELOG.md index 68760a25f..d93166a34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Display bookers names to connected users now apply to all resources - Updated rails locales files - Usage of the rails logger instead of printing to standard output +- Fix a bug: canceled trainings are still shown on the public profile page - Fix a bug: prevent same slot booking feature ignores canceled reservations - Fix a bug: wrong currency on invoices files - Fix a bug: unable to reserve if user's subscription plan is disabled diff --git a/app/frontend/src/javascript/filters/filters.js b/app/frontend/src/javascript/filters/filters.js index 832760e4a..293510366 100644 --- a/app/frontend/src/javascript/filters/filters.js +++ b/app/frontend/src/javascript/filters/filters.js @@ -191,6 +191,14 @@ Application.Filters.filter('humanReadablePlanName', ['$filter', function ($filte }; }]); +Application.Filters.filter('canceledReservationsFilter', [function () { + return function (elements) { + if (!angular.isUndefined(elements) && (elements != null)) { + return elements.filter(e => e.canceled_at === null); + } + }; +}]); + Application.Filters.filter('trainingReservationsFilter', [function () { return function (elements, selectedScope) { if (!angular.isUndefined(elements) && !angular.isUndefined(selectedScope) && (elements != null) && (selectedScope != null)) { diff --git a/app/frontend/templates/shared/publicProfile.html.erb b/app/frontend/templates/shared/publicProfile.html.erb index dc7ff7a4d..65fac1eb4 100644 --- a/app/frontend/templates/shared/publicProfile.html.erb +++ b/app/frontend/templates/shared/publicProfile.html.erb @@ -74,7 +74,7 @@