From 17ab75cfa54192fe37034e195164dacc8d0ec456 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 15 Jun 2021 13:05:38 +0200 Subject: [PATCH 01/28] [bug] during the upgrade, unable to detect the target when not explicitly specified --- CHANGELOG.md | 2 ++ setup/upgrade.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6597900b..5606bc5ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog Fab-manager +- Fix a bug: during the upgrade, unable to detect the target when not explicitly specified + ## v5.0.4 2021 June 15 - Ability to disable the public agenda diff --git a/setup/upgrade.sh b/setup/upgrade.sh index 63d686b37..1c9fb469d 100644 --- a/setup/upgrade.sh +++ b/setup/upgrade.sh @@ -88,7 +88,7 @@ target_version() if [[ "$TAG" =~ ^:release-v[\.0-9]+$ ]]; then TARGET=$(echo "$TAG" | grep -Eo '[\.0-9]{5}') - elif [ "$TAG" = ":latest" ]; then + elif [ "$TAG" = ":latest" ] || [ "$TAG" = "" ]; then TARGET=$(\curl -sSL "https://hub.fab-manager.com/api/versions/latest" | jq -r '.semver') else TARGET='custom' From 2a616125c199736d339c6dad08496e08596abaeb Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 16 Jun 2021 10:33:52 +0200 Subject: [PATCH 02/28] [bug] unable to sync users on stripe if one of them have an invalid email address --- CHANGELOG.md | 1 + app/workers/sync_objects_on_stripe_worker.rb | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5606bc5ce..efa7e8593 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog Fab-manager - Fix a bug: during the upgrade, unable to detect the target when not explicitly specified +- Fix a bug: unable to sync users on stripe if one of them have an invalid email address ## v5.0.4 2021 June 15 diff --git a/app/workers/sync_objects_on_stripe_worker.rb b/app/workers/sync_objects_on_stripe_worker.rb index 63eb29f1d..4add9fbef 100644 --- a/app/workers/sync_objects_on_stripe_worker.rb +++ b/app/workers/sync_objects_on_stripe_worker.rb @@ -11,10 +11,14 @@ class SyncObjectsOnStripeWorker User.online_payers.each_with_index do |member, index| logger.debug "#{index} / #{total}" begin - stp_customer = member.payment_gateway_object.gateway_object.retrieve + stp_customer = member.payment_gateway_object&.gateway_object&.retrieve StripeWorker.new.create_stripe_customer(member.id) if stp_customer.nil? || stp_customer[:deleted] rescue Stripe::InvalidRequestError - StripeWorker.new.create_stripe_customer(member.id) + begin + StripeWorker.new.create_stripe_customer(member.id) + rescue Stripe::InvalidRequestError => e + puts "Unable to create the customer #{member.id} do to a Stripe error: #{e}" + end end end From 3f0884550323688872e6732db92f236ee1e45586 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 16 Jun 2021 11:44:53 +0200 Subject: [PATCH 03/28] [bug] unable to book a free event --- CHANGELOG.md | 1 + app/frontend/src/javascript/controllers/events.js.erb | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index efa7e8593..12ad7c772 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - Fix a bug: during the upgrade, unable to detect the target when not explicitly specified - Fix a bug: unable to sync users on stripe if one of them have an invalid email address +- Fix a bug: unable to book a free event ## v5.0.4 2021 June 15 diff --git a/app/frontend/src/javascript/controllers/events.js.erb b/app/frontend/src/javascript/controllers/events.js.erb index d25b27740..f0b808715 100644 --- a/app/frontend/src/javascript/controllers/events.js.erb +++ b/app/frontend/src/javascript/controllers/events.js.erb @@ -126,8 +126,8 @@ Application.Controllers.controller('EventsController', ['$scope', '$state', 'Eve } ]); -Application.Controllers.controller('ShowEventController', ['$scope', '$state', '$stateParams', '$rootScope', 'Event', '$uibModal', 'Member', 'Reservation', 'Price', 'CustomAsset', 'Slot', 'eventPromise', 'growl', '_t', 'Wallet', 'AuthService', 'helpers', 'dialogs', 'priceCategoriesPromise', 'settingsPromise', - function ($scope, $state, $stateParams, $rootScope, Event, $uibModal, Member, Reservation, Price, CustomAsset, Slot, eventPromise, growl, _t, Wallet, AuthService, helpers, dialogs, priceCategoriesPromise, settingsPromise) { +Application.Controllers.controller('ShowEventController', ['$scope', '$state', '$stateParams', '$rootScope', 'Event', '$uibModal', 'Member', 'Reservation', 'Price', 'CustomAsset', 'Slot', 'eventPromise', 'growl', '_t', 'Wallet', 'AuthService', 'helpers', 'dialogs', 'priceCategoriesPromise', 'settingsPromise', 'LocalPayment', + function ($scope, $state, $stateParams, $rootScope, Event, $uibModal, Member, Reservation, Price, CustomAsset, Slot, eventPromise, growl, _t, Wallet, AuthService, helpers, dialogs, priceCategoriesPromise, settingsPromise, LocalPayment) { /* PUBLIC SCOPE */ // reservations for the currently shown event @@ -366,7 +366,7 @@ Application.Controllers.controller('ShowEventController', ['$scope', '$state', ' // set the attempting marker $scope.attempting = true; // save the reservation to the API - return Reservation.save(cartItems, function (reservation) { + return LocalPayment.confirm(cartItems, function (reservation) { // reservation successful afterPayment(reservation); return $scope.attempting = false; From 8826cef37196d45da65ae35d37019060042d33f2 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 16 Jun 2021 14:07:14 +0200 Subject: [PATCH 04/28] New translations en.yml (French) --- config/locales/fr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 909efd963..309799f09 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -525,4 +525,4 @@ fr: payzen_public_key: "Clé publique du client PayZen" payzen_hmac: "Clef HMAC-SHA-256 PayZen" payzen_currency: "Devise PayZen" - public_agenda_module: "Public agenda module" + public_agenda_module: "Module d'agenda public" From f3f6a61461371dfad8658add112f2f5fad583ef3 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 16 Jun 2021 14:07:34 +0200 Subject: [PATCH 05/28] New translations app.shared.en.yml (French) --- config/locales/app.shared.fr.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/locales/app.shared.fr.yml b/config/locales/app.shared.fr.yml index 128ec21bb..908688b9f 100644 --- a/config/locales/app.shared.fr.yml +++ b/config/locales/app.shared.fr.yml @@ -250,11 +250,11 @@ fr: common_url: "URL commune" common_url_is_required: "L'URL commune est requise." provided_url_is_not_a_valid_url: "L'URL fournie n'est pas une URL valide." - authorization_endpoint: "Terminaison d'autorisation" - oauth2_authorization_endpoint_is_required: "La terminaison d'autorisation OAuth 2 est requise." - provided_endpoint_is_not_valid: "La terminaison fournie n'est pas valide." - token_acquisition_endpoint: "Terminaison d'acquisition du jeton" - oauth2_token_acquisition_endpoint_is_required: "La terminaison d'acquisition du jeton OAuth 2 est requise." + authorization_endpoint: "Point d'accès pour l'autorisation" + oauth2_authorization_endpoint_is_required: "Le point d'accès pour l'autorisation OAuth 2 est requis." + provided_endpoint_is_not_valid: "Le point d'accès fourni n'est pas valide." + token_acquisition_endpoint: "Point d'accès d'acquisition du jeton" + oauth2_token_acquisition_endpoint_is_required: "Le point d'accès d'acquisition du jeton OAuth 2 est requis." profil_edition_url: "URL d'édition du profil" profile_edition_url_is_required: "L'adresse d'édition du profil utilisateur est requise." client_identifier: "Identifiant client" @@ -266,7 +266,7 @@ fr: add_a_match: "Ajouter une correspondance" model: "Modèle" field: "Champ" - api_endpoint_url: "Terminaison/URL de l'API" + api_endpoint_url: "Point d'accès/URL de l'API" api_type: "Type d'API" api_fields: "Champ de l'API" #machine/training slot modification modal From 21a593edf0b8d87566cf0631b6cd1df1ab4404a7 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 16 Jun 2021 14:46:47 +0200 Subject: [PATCH 06/28] [bug] can't see the dates for the next booked training session --- CHANGELOG.md | 1 + app/frontend/templates/machines/training_reservation_modal.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12ad7c772..b696463e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ - Fix a bug: during the upgrade, unable to detect the target when not explicitly specified - Fix a bug: unable to sync users on stripe if one of them have an invalid email address - Fix a bug: unable to book a free event +- Fix a bug: can't see the dates for the next booked training session, when the user is reserving a machine without the appropriate training ## v5.0.4 2021 June 15 diff --git a/app/frontend/templates/machines/training_reservation_modal.html b/app/frontend/templates/machines/training_reservation_modal.html index 6b986a511..21068196e 100644 --- a/app/frontend/templates/machines/training_reservation_modal.html +++ b/app/frontend/templates/machines/training_reservation_modal.html @@ -3,7 +3,7 @@