From 25e01ce6fb49a96fd1be3bf4b54d049663dc538b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Apr 2023 15:07:25 +0200 Subject: [PATCH 001/117] Bump nokogiri from 1.14.2 to 1.14.3 (#447) Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.14.2 to 1.14.3. - [Release notes](https://github.com/sparklemotion/nokogiri/releases) - [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md) - [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.14.2...v1.14.3) --- updated-dependencies: - dependency-name: nokogiri dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4adb800d5..4606b128b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -269,7 +269,7 @@ GEM net-smtp (0.3.3) net-protocol nio4r (2.5.8) - nokogiri (1.14.2-x86_64-linux) + nokogiri (1.14.3-x86_64-linux) racc (~> 1.4) oauth2 (1.4.4) faraday (>= 0.8, < 2.0) From a6574cc80e457d0a4945bd165aaa07ebbf5e5070 Mon Sep 17 00:00:00 2001 From: Du Peng Date: Tue, 2 May 2023 05:49:45 -0400 Subject: [PATCH 002/117] (bug) unable to show calendar for Firefox and Safari --- CHANGELOG.md | 2 ++ app/frontend/src/javascript/controllers/admin/calendar.js | 4 ++-- app/frontend/src/javascript/controllers/calendar.js | 4 ++-- app/frontend/src/javascript/controllers/machines.js.erb | 4 ++-- app/frontend/src/javascript/controllers/spaces.js.erb | 4 ++-- app/frontend/src/javascript/controllers/trainings.js.erb | 4 ++-- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cccb06abf..9cc9e57ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog Fab-manager +- Fix a bug: unable to show calendar for Firefox and Safari + ## v6.0.4 2023 April 25 - Fix a bug: notification is broken when delete a project diff --git a/app/frontend/src/javascript/controllers/admin/calendar.js b/app/frontend/src/javascript/controllers/admin/calendar.js index bf3363d68..67af6ec61 100644 --- a/app/frontend/src/javascript/controllers/admin/calendar.js +++ b/app/frontend/src/javascript/controllers/admin/calendar.js @@ -69,8 +69,8 @@ Application.Controllers.controller('AdminCalendarController', ['$scope', '$state snapDuration: BOOKING_SNAP, selectable: true, selectHelper: true, - minTime: moment.duration(moment.utc(bookingWindowStart.setting.value).format('HH:mm:ss')), - maxTime: moment.duration(moment.utc(bookingWindowEnd.setting.value).format('HH:mm:ss')), + minTime: moment.duration(moment.utc(bookingWindowStart.setting.value.match(/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), + maxTime: moment.duration(moment.utc(bookingWindowEnd.setting.value.match(/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), select (start, end, jsEvent, view) { return calendarSelectCb(start, end, jsEvent, view); }, diff --git a/app/frontend/src/javascript/controllers/calendar.js b/app/frontend/src/javascript/controllers/calendar.js index e862a670d..2581496a4 100644 --- a/app/frontend/src/javascript/controllers/calendar.js +++ b/app/frontend/src/javascript/controllers/calendar.js @@ -204,8 +204,8 @@ Application.Controllers.controller('CalendarController', ['$scope', '$state', '$ center: 'title', right: '' }, - minTime: moment.duration(moment.utc(bookingWindowStart.setting.value).format('HH:mm:ss')), - maxTime: moment.duration(moment.utc(bookingWindowEnd.setting.value).format('HH:mm:ss')), + minTime: moment.duration(moment.utc(bookingWindowStart.setting.value.match(/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), + maxTime: moment.duration(moment.utc(bookingWindowEnd.setting.value.match(/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), defaultView: window.innerWidth <= 480 ? 'agendaDay' : 'agendaWeek', eventClick (event, jsEvent, view) { return calendarEventClickCb(event, jsEvent, view); diff --git a/app/frontend/src/javascript/controllers/machines.js.erb b/app/frontend/src/javascript/controllers/machines.js.erb index b62e273f3..3c5851e6b 100644 --- a/app/frontend/src/javascript/controllers/machines.js.erb +++ b/app/frontend/src/javascript/controllers/machines.js.erb @@ -447,8 +447,8 @@ Application.Controllers.controller('ReserveMachineController', ['$scope', '$tran // fullCalendar (v2) configuration $scope.calendarConfig = CalendarConfig({ - minTime: moment.duration(moment.utc(settingsPromise.booking_window_start).format('HH:mm:ss')), - maxTime: moment.duration(moment.utc(settingsPromise.booking_window_end).format('HH:mm:ss')), + minTime: moment.duration(moment.utc(settingsPromise.booking_window_start.match(/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), + maxTime: moment.duration(moment.utc(settingsPromise.booking_window_end.match(/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), eventClick (event, jsEvent, view) { return calendarEventClickCb(event, jsEvent, view); }, diff --git a/app/frontend/src/javascript/controllers/spaces.js.erb b/app/frontend/src/javascript/controllers/spaces.js.erb index fc9586d69..a6e4c3b85 100644 --- a/app/frontend/src/javascript/controllers/spaces.js.erb +++ b/app/frontend/src/javascript/controllers/spaces.js.erb @@ -385,8 +385,8 @@ Application.Controllers.controller('ReserveSpaceController', ['$scope', '$transi // fullCalendar (v2) configuration $scope.calendarConfig = CalendarConfig({ - minTime: moment.duration(moment.utc(settingsPromise.booking_window_start).format('HH:mm:ss')), - maxTime: moment.duration(moment.utc(settingsPromise.booking_window_end).format('HH:mm:ss')), + minTime: moment.duration(moment.utc(settingsPromise.booking_window_start.match(/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), + maxTime: moment.duration(moment.utc(settingsPromise.booking_window_end.match(/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), eventClick (event, jsEvent, view) { return calendarEventClickCb(event, jsEvent, view); }, diff --git a/app/frontend/src/javascript/controllers/trainings.js.erb b/app/frontend/src/javascript/controllers/trainings.js.erb index f051845f5..e08b69ff8 100644 --- a/app/frontend/src/javascript/controllers/trainings.js.erb +++ b/app/frontend/src/javascript/controllers/trainings.js.erb @@ -155,8 +155,8 @@ Application.Controllers.controller('ReserveTrainingController', ['$scope', '$tra // fullCalendar (v2) configuration $scope.calendarConfig = CalendarConfig({ - minTime: moment.duration(moment.utc(settingsPromise.booking_window_start).format('HH:mm:ss')), - maxTime: moment.duration(moment.utc(settingsPromise.booking_window_end).format('HH:mm:ss')), + minTime: moment.duration(moment.utc(settingsPromise.booking_window_start.match(/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), + maxTime: moment.duration(moment.utc(settingsPromise.booking_window_end.match(/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), eventClick (event, jsEvent, view) { return calendarEventClickCb(event, jsEvent, view); }, From e90f4e3e004d120fdee2dea03e8e9160fa0c439c Mon Sep 17 00:00:00 2001 From: Du Peng Date: Tue, 2 May 2023 18:05:42 +0200 Subject: [PATCH 003/117] (bug) unable to show calendar --- app/frontend/src/javascript/controllers/admin/calendar.js | 4 ++-- app/frontend/src/javascript/controllers/calendar.js | 4 ++-- app/frontend/src/javascript/controllers/machines.js.erb | 4 ++-- app/frontend/src/javascript/controllers/spaces.js.erb | 4 ++-- app/frontend/src/javascript/controllers/trainings.js.erb | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/frontend/src/javascript/controllers/admin/calendar.js b/app/frontend/src/javascript/controllers/admin/calendar.js index 67af6ec61..3e59d6b76 100644 --- a/app/frontend/src/javascript/controllers/admin/calendar.js +++ b/app/frontend/src/javascript/controllers/admin/calendar.js @@ -69,8 +69,8 @@ Application.Controllers.controller('AdminCalendarController', ['$scope', '$state snapDuration: BOOKING_SNAP, selectable: true, selectHelper: true, - minTime: moment.duration(moment.utc(bookingWindowStart.setting.value.match(/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), - maxTime: moment.duration(moment.utc(bookingWindowEnd.setting.value.match(/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), + minTime: moment.duration(moment.utc(bookingWindowStart.setting.value.match(/\d{4}-\d{2}-\d{2}(?: |T)\d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), + maxTime: moment.duration(moment.utc(bookingWindowEnd.setting.value.match(/\d{4}-\d{2}-\d{2}(?: |T)\d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), select (start, end, jsEvent, view) { return calendarSelectCb(start, end, jsEvent, view); }, diff --git a/app/frontend/src/javascript/controllers/calendar.js b/app/frontend/src/javascript/controllers/calendar.js index 2581496a4..e0977c9dd 100644 --- a/app/frontend/src/javascript/controllers/calendar.js +++ b/app/frontend/src/javascript/controllers/calendar.js @@ -204,8 +204,8 @@ Application.Controllers.controller('CalendarController', ['$scope', '$state', '$ center: 'title', right: '' }, - minTime: moment.duration(moment.utc(bookingWindowStart.setting.value.match(/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), - maxTime: moment.duration(moment.utc(bookingWindowEnd.setting.value.match(/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), + minTime: moment.duration(moment.utc(bookingWindowStart.setting.value.match(/\d{4}-\d{2}-\d{2}(?: |T)\d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), + maxTime: moment.duration(moment.utc(bookingWindowEnd.setting.value.match(/\d{4}-\d{2}-\d{2}(?: |T)\d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), defaultView: window.innerWidth <= 480 ? 'agendaDay' : 'agendaWeek', eventClick (event, jsEvent, view) { return calendarEventClickCb(event, jsEvent, view); diff --git a/app/frontend/src/javascript/controllers/machines.js.erb b/app/frontend/src/javascript/controllers/machines.js.erb index 3c5851e6b..9d8556865 100644 --- a/app/frontend/src/javascript/controllers/machines.js.erb +++ b/app/frontend/src/javascript/controllers/machines.js.erb @@ -447,8 +447,8 @@ Application.Controllers.controller('ReserveMachineController', ['$scope', '$tran // fullCalendar (v2) configuration $scope.calendarConfig = CalendarConfig({ - minTime: moment.duration(moment.utc(settingsPromise.booking_window_start.match(/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), - maxTime: moment.duration(moment.utc(settingsPromise.booking_window_end.match(/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), + minTime: moment.duration(moment.utc(settingsPromise.booking_window_start.match(/\d{4}-\d{2}-\d{2}(?: |T)\d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), + maxTime: moment.duration(moment.utc(settingsPromise.booking_window_end.match(/\d{4}-\d{2}-\d{2}(?: |T)\d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), eventClick (event, jsEvent, view) { return calendarEventClickCb(event, jsEvent, view); }, diff --git a/app/frontend/src/javascript/controllers/spaces.js.erb b/app/frontend/src/javascript/controllers/spaces.js.erb index a6e4c3b85..d4bded6da 100644 --- a/app/frontend/src/javascript/controllers/spaces.js.erb +++ b/app/frontend/src/javascript/controllers/spaces.js.erb @@ -385,8 +385,8 @@ Application.Controllers.controller('ReserveSpaceController', ['$scope', '$transi // fullCalendar (v2) configuration $scope.calendarConfig = CalendarConfig({ - minTime: moment.duration(moment.utc(settingsPromise.booking_window_start.match(/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), - maxTime: moment.duration(moment.utc(settingsPromise.booking_window_end.match(/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), + minTime: moment.duration(moment.utc(settingsPromise.booking_window_start.match(/\d{4}-\d{2}-\d{2}(?: |T)\d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), + maxTime: moment.duration(moment.utc(settingsPromise.booking_window_end.match(/\d{4}-\d{2}-\d{2}(?: |T)\d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), eventClick (event, jsEvent, view) { return calendarEventClickCb(event, jsEvent, view); }, diff --git a/app/frontend/src/javascript/controllers/trainings.js.erb b/app/frontend/src/javascript/controllers/trainings.js.erb index e08b69ff8..0fa0a18a8 100644 --- a/app/frontend/src/javascript/controllers/trainings.js.erb +++ b/app/frontend/src/javascript/controllers/trainings.js.erb @@ -155,8 +155,8 @@ Application.Controllers.controller('ReserveTrainingController', ['$scope', '$tra // fullCalendar (v2) configuration $scope.calendarConfig = CalendarConfig({ - minTime: moment.duration(moment.utc(settingsPromise.booking_window_start.match(/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), - maxTime: moment.duration(moment.utc(settingsPromise.booking_window_end.match(/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), + minTime: moment.duration(moment.utc(settingsPromise.booking_window_start.match(/\d{4}-\d{2}-\d{2}(?: |T)\d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), + maxTime: moment.duration(moment.utc(settingsPromise.booking_window_end.match(/\d{4}-\d{2}-\d{2}(?: |T)\d{2}:\d{2}:\d{2}/)[0]).format('HH:mm:ss')), eventClick (event, jsEvent, view) { return calendarEventClickCb(event, jsEvent, view); }, From 7e8c56b4b7629a835d2db4223e5e00068e206f76 Mon Sep 17 00:00:00 2001 From: Du Peng Date: Tue, 2 May 2023 18:07:21 +0200 Subject: [PATCH 004/117] (quality) error message for event reservation --- CHANGELOG.md | 1 + app/frontend/src/javascript/controllers/events.js.erb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cc9e57ec..01c07c64d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog Fab-manager - Fix a bug: unable to show calendar for Firefox and Safari +- Improved error message for event reservation ## v6.0.4 2023 April 25 diff --git a/app/frontend/src/javascript/controllers/events.js.erb b/app/frontend/src/javascript/controllers/events.js.erb index 8fe4e618a..09b5ab08c 100644 --- a/app/frontend/src/javascript/controllers/events.js.erb +++ b/app/frontend/src/javascript/controllers/events.js.erb @@ -372,7 +372,7 @@ Application.Controllers.controller('ShowEventController', ['$scope', '$state', ' } , function (response) { // reservation failed - growl.error(response && response.data && response.data.card && response.data.card[0] || 'server error'); + growl.error(response && response.data && _.keys(response.data)[0] && response.data[_.keys(response.data)[0]][0] || 'server error'); // unset the attempting marker $scope.attempting = false; }) From c79142b40aa5c9fa2663c176ec279914ecd79fa8 Mon Sep 17 00:00:00 2001 From: Du Peng Date: Tue, 2 May 2023 18:15:49 +0200 Subject: [PATCH 005/117] Version 6.0.5 --- CHANGELOG.md | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01c07c64d..f780dcd75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog Fab-manager +## v6.0.5 2023 May 2 + - Fix a bug: unable to show calendar for Firefox and Safari - Improved error message for event reservation diff --git a/package.json b/package.json index 82bfc73d6..1d657277e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fab-manager", - "version": "6.0.4", + "version": "6.0.5", "description": "Fab-manager is the FabLab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks and your marker's projects.", "keywords": [ "fablab", From f346c4bb1f23d082954e4683ef20f3bd53684b73 Mon Sep 17 00:00:00 2001 From: Du Peng Date: Mon, 18 Sep 2023 11:59:40 +0200 Subject: [PATCH 006/117] (bug) unable to update card for payment schedule --- CHANGELOG.md | 1 + .../src/javascript/components/payment/payzen/payzen-form.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0dffb3842..e98dfc3d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Improvement : add a notification to remind users to upload their supporting documents - Cancel payment schedule subscription after update the payment mean - admin can see reservations of a member +- Fix a bug: unable to update card for payment schedule ## v6.0.14 2023 September 6 diff --git a/app/frontend/src/javascript/components/payment/payzen/payzen-form.tsx b/app/frontend/src/javascript/components/payment/payzen/payzen-form.tsx index 7f7a6223b..1f2b3b013 100644 --- a/app/frontend/src/javascript/components/payment/payzen/payzen-form.tsx +++ b/app/frontend/src/javascript/components/payment/payzen/payzen-form.tsx @@ -140,7 +140,7 @@ export const PayzenForm: React.FC = ({ onSubmit, onSuccess, onE try { const { result } = await PayZenKR.current.validateForm(); if (result === null) { - if (!order) { + if (!order && !updateCard) { await PayzenAPI.checkCart(cart, customer); } await PayZenKR.current.onSubmit(onPaid); From f2e7cd0fdc1e0064d07ba637cf08c8983adbeb4f Mon Sep 17 00:00:00 2001 From: Du Peng Date: Tue, 19 Sep 2023 10:07:55 +0200 Subject: [PATCH 007/117] (i18n) update translations --- config/locales/mails.en.yml | 2 +- config/locales/mails.fr.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/locales/mails.en.yml b/config/locales/mails.en.yml index 5a66d9098..f2071ec54 100644 --- a/config/locales/mails.en.yml +++ b/config/locales/mails.en.yml @@ -428,7 +428,7 @@ en: notify_user_child_is_invalidated: subject: "Child account invalidated" body: - account_invalidated: "Your child account was invalidated. You won't be able to book event, until your child account is validated again." + child_invalidated: "Your child account was invalidated. You won't be able to book event, until your child account is validated again." notify_user_supporting_document_refusal: subject: "Your supporting documents were refused" body: diff --git a/config/locales/mails.fr.yml b/config/locales/mails.fr.yml index e4f2ef4bf..e41c38ea3 100644 --- a/config/locales/mails.fr.yml +++ b/config/locales/mails.fr.yml @@ -424,11 +424,11 @@ fr: notify_user_child_is_validated: subject: "Compte enfant validé" body: - account_validated: "Votre compte enfant a été validé. Vous avez maintenant accès aux fonctionnalités de réservation de l'événement." + child_validated: "Votre compte enfant a été validé. Vous avez maintenant accès aux fonctionnalités de réservation de l'événement." notify_user_child_is_invalidated: subject: "Compte enfant invalidé" body: - account_invalidated: "Votre compte enfant a été invalidé. Vous ne pourrez plus réserver l'événement, jusqu'à ce que votre compte enfant soit à nouveau validé." + child_invalidated: "Votre compte enfant a été invalidé. Vous ne pourrez plus réserver l'événement, jusqu'à ce que votre compte enfant soit à nouveau validé." notify_user_supporting_document_refusal: subject: "Vos pièces justificatives ont été refusées" body: From bed4a93585e480a71300e03c7cfd0948698b2df3 Mon Sep 17 00:00:00 2001 From: Du Peng Date: Tue, 19 Sep 2023 14:18:40 +0200 Subject: [PATCH 008/117] (bug) user is_allow_contact is actived by default --- CHANGELOG.md | 1 + app/frontend/src/javascript/controllers/admin/members.js | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e98dfc3d1..789f30438 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Cancel payment schedule subscription after update the payment mean - admin can see reservations of a member - Fix a bug: unable to update card for payment schedule +- Fix a bug: user is_allow_contact is actived by default ## v6.0.14 2023 September 6 diff --git a/app/frontend/src/javascript/controllers/admin/members.js b/app/frontend/src/javascript/controllers/admin/members.js index 3957098d2..3b36f5a0c 100644 --- a/app/frontend/src/javascript/controllers/admin/members.js +++ b/app/frontend/src/javascript/controllers/admin/members.js @@ -1027,6 +1027,7 @@ Application.Controllers.controller('NewMemberController', ['$scope', '$state', ' // Default member's profile parameters $scope.user = { plan_interval: '', + is_allow_contact: false, invoicing_profile_attributes: {}, statistic_profile_attributes: {} }; From eb4c89cd680920baeb550f43bbe817d5d43c42f8 Mon Sep 17 00:00:00 2001 From: Du Peng Date: Tue, 19 Sep 2023 14:41:06 +0200 Subject: [PATCH 009/117] (bug) unbale to export projects --- CHANGELOG.md | 1 + app/services/project_service.rb | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 789f30438..b1f794d83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - admin can see reservations of a member - Fix a bug: unable to update card for payment schedule - Fix a bug: user is_allow_contact is actived by default +- Fix a bug: unbale to export projects ## v6.0.14 2023 September 6 diff --git a/app/services/project_service.rb b/app/services/project_service.rb index be85c3cd2..1c3e6628f 100644 --- a/app/services/project_service.rb +++ b/app/services/project_service.rb @@ -46,7 +46,8 @@ class ProjectService records = records.includes(:users, :project_image) records = records.page(params[:page]) if paginate + total = paginate ? records.total_count : records.count - { total: records.total_count, projects: records } + { total: total, projects: records } end end From e9e0749bdbb49fbb5a8f940c1e4b400dad7df81a Mon Sep 17 00:00:00 2001 From: Du Peng Date: Wed, 20 Sep 2023 18:13:30 +0200 Subject: [PATCH 010/117] (bug) unbale to update card bank of payment schedule --- CHANGELOG.md | 1 + app/services/cart_service.rb | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1f794d83..269c2ee48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Fix a bug: unable to update card for payment schedule - Fix a bug: user is_allow_contact is actived by default - Fix a bug: unbale to export projects +- Fix a bug: unbale to update card bank of payment schedule ## v6.0.14 2023 September 6 diff --git a/app/services/cart_service.rb b/app/services/cart_service.rb index c89d20533..7f878753e 100644 --- a/app/services/cart_service.rb +++ b/app/services/cart_service.rb @@ -190,33 +190,36 @@ class CartService def reservable_from_payment_schedule_object(object, plan) reservable = object.reservation.reservable + cart_item_reservation_slots = object.reservation.slots_reservations.map do |s| + { slot_id: s.slot_id, slots_reservation_id: s.id, offered: s.offered } + end case reservable when Machine CartItem::MachineReservation.new(customer_profile: @customer.invoicing_profile, operator_profile: @operator.invoicing_profile, reservable: reservable, - cart_item_reservation_slots_attributes: object.reservation.slots_reservations, + cart_item_reservation_slots_attributes: cart_item_reservation_slots, plan: plan, new_subscription: true) when Training CartItem::TrainingReservation.new(customer_profile: @customer.invoicing_profile, operator_profile: @operator.invoicing_profile, reservable: reservable, - cart_item_reservation_slots_attributes: object.reservation.slots_reservations, + cart_item_reservation_slots_attributes: cart_item_reservation_slots, plan: plan, new_subscription: true) when Event CartItem::EventReservation.new(customer_profile: @customer.invoicing_profile, operator_profile: @operator.invoicing_profile, event: reservable, - cart_item_reservation_slots_attributes: object.reservation.slots_reservation, + cart_item_reservation_slots_attributes: cart_item_reservation_slots, normal_tickets: object.reservation.nb_reserve_places, cart_item_event_reservation_tickets_attributes: object.reservation.tickets) when Space CartItem::SpaceReservation.new(customer_profile: @customer.invoicing_profile, operator_profile: @operator.invoicing_profile, reservable: reservable, - cart_item_reservation_slots_attributes: object.reservation.slots_reservations, + cart_item_reservation_slots_attributes: cart_item_reservation_slots, plan: plan, new_subscription: true) else From 801ca4f8b28aead9b75aaf916fdb85f1cf9cfb92 Mon Sep 17 00:00:00 2001 From: Du Peng Date: Thu, 21 Sep 2023 18:40:01 +0200 Subject: [PATCH 011/117] (bug) pre registration end date dont set empty if pre registration is false --- app/frontend/src/javascript/components/events/event-form.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/frontend/src/javascript/components/events/event-form.tsx b/app/frontend/src/javascript/components/events/event-form.tsx index 8102db622..e65570bb4 100644 --- a/app/frontend/src/javascript/components/events/event-form.tsx +++ b/app/frontend/src/javascript/components/events/event-form.tsx @@ -103,7 +103,7 @@ export const EventForm: React.FC = ({ action, event, onError, on const onSubmit: SubmitHandler = (data: Event) => { setSubmitting(true); if (submitting) return; - if (data.pre_registration_end_date?.toString() === 'Invalid Date') { + if (data.pre_registration_end_date?.toString() === 'Invalid Date' || !data.pre_registration) { data.pre_registration_end_date = null; } if (action === 'update') { From 3bf30cf3a466f1058afa07146c66946918205f0b Mon Sep 17 00:00:00 2001 From: Du Peng Date: Mon, 25 Sep 2023 12:57:24 +0200 Subject: [PATCH 012/117] (i18n) update translates --- ...fy_member_reservation_invalidated.html.erb | 2 +- ...tify_member_reservation_validated.html.erb | 2 +- config/locales/app.admin.de.yml | 70 ++++++++++++++++++- config/locales/app.admin.es.yml | 70 ++++++++++++++++++- config/locales/app.admin.fr.yml | 18 +++-- config/locales/app.admin.it.yml | 70 ++++++++++++++++++- config/locales/app.admin.no.yml | 70 ++++++++++++++++++- config/locales/app.admin.pt.yml | 70 ++++++++++++++++++- config/locales/app.admin.zu.yml | 70 ++++++++++++++++++- config/locales/app.logged.de.yml | 19 +++++ config/locales/app.logged.es.yml | 19 +++++ config/locales/app.logged.fr.yml | 8 +-- config/locales/app.logged.it.yml | 19 +++++ config/locales/app.logged.no.yml | 19 +++++ config/locales/app.logged.pt.yml | 19 +++++ config/locales/app.logged.zu.yml | 19 +++++ config/locales/app.public.de.yml | 40 +++++++++++ config/locales/app.public.es.yml | 40 +++++++++++ config/locales/app.public.fr.yml | 2 +- config/locales/app.public.it.yml | 40 +++++++++++ config/locales/app.public.no.yml | 40 +++++++++++ config/locales/app.public.pt.yml | 40 +++++++++++ config/locales/app.public.zu.yml | 40 +++++++++++ config/locales/app.shared.de.yml | 6 +- config/locales/app.shared.es.yml | 6 +- config/locales/app.shared.fr.yml | 1 + config/locales/app.shared.it.yml | 6 +- config/locales/app.shared.no.yml | 6 +- config/locales/app.shared.pt.yml | 6 +- config/locales/app.shared.zu.yml | 6 +- config/locales/de.yml | 30 ++++++++ config/locales/en.yml | 4 +- config/locales/es.yml | 30 ++++++++ config/locales/fr.yml | 13 ++-- config/locales/it.yml | 30 ++++++++ config/locales/mails.de.yml | 63 +++++++++++++++++ config/locales/mails.es.yml | 63 +++++++++++++++++ config/locales/mails.fr.yml | 10 +-- config/locales/mails.it.yml | 63 +++++++++++++++++ config/locales/mails.no.yml | 63 +++++++++++++++++ config/locales/mails.pt.yml | 63 +++++++++++++++++ config/locales/mails.zu.yml | 63 +++++++++++++++++ config/locales/no.yml | 30 ++++++++ config/locales/pt.yml | 30 ++++++++ config/locales/zu.yml | 30 ++++++++ 45 files changed, 1389 insertions(+), 39 deletions(-) diff --git a/app/views/notifications_mailer/notify_member_reservation_invalidated.html.erb b/app/views/notifications_mailer/notify_member_reservation_invalidated.html.erb index caa17bc2c..f29e64cef 100644 --- a/app/views/notifications_mailer/notify_member_reservation_invalidated.html.erb +++ b/app/views/notifications_mailer/notify_member_reservation_invalidated.html.erb @@ -1,3 +1,3 @@ <%= render 'notifications_mailer/shared/hello', recipient: @recipient %> -

<%= t('.body.reservation_invalidated_html', RESERVATION: @attached_object.reservable.name) %>

+

<%= t('.body.reservation_invalidated_html', RESERVABLE: @attached_object.reservable.name) %>

diff --git a/app/views/notifications_mailer/notify_member_reservation_validated.html.erb b/app/views/notifications_mailer/notify_member_reservation_validated.html.erb index 635bb1e98..8a2c1b20d 100644 --- a/app/views/notifications_mailer/notify_member_reservation_validated.html.erb +++ b/app/views/notifications_mailer/notify_member_reservation_validated.html.erb @@ -1,6 +1,6 @@ <%= render 'notifications_mailer/shared/hello', recipient: @recipient %> -

<%= t('.body.reservation_validated_html', RESERVATION: @attached_object.reservable.name) %>

+

<%= t('.body.reservation_validated_html', RESERVABLE: @attached_object.reservable.name) %>

<%= t('.body.your_reserved_slots') %>