From d9e4568b7109b9b0e05c94108604f4f325c29e02 Mon Sep 17 00:00:00 2001 From: Du Peng Date: Mon, 11 Dec 2023 17:01:08 +0100 Subject: [PATCH 01/13] (bug) unable to show wallet payment mean for invoice --- CHANGELOG.md | 3 +++ app/models/invoice.rb | 2 ++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a9a6a444..93977467a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog Fab-manager +- Fix a bug: unable to show wallet payment mean for invoice +- [TODO DEPLOY] `rails fablab:setup:build_accounting_lines` + ## v6.3.6 2023 December 6 - fix a bug: fix event service diff --git a/app/models/invoice.rb b/app/models/invoice.rb index 63f8fd04d..fb4c0ed90 100644 --- a/app/models/invoice.rb +++ b/app/models/invoice.rb @@ -165,6 +165,8 @@ def payment_means if paid_by_card? res.push(means: :card, amount: amount_paid) + elsif paid_by_wallet? + res.push(means: :wallet, amount: amount_paid) else res.push(means: :other, amount: amount_paid) end From 11205bb1b35894427a6ac232258b213d6b3cd73d Mon Sep 17 00:00:00 2001 From: Du Peng Date: Mon, 11 Dec 2023 17:01:37 +0100 Subject: [PATCH 02/13] update Gemfile --- Gemfile.lock | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile.lock b/Gemfile.lock index b60dfdf10..b798e07fe 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -532,6 +532,7 @@ GEM PLATFORMS x86_64-darwin-20 x86_64-darwin-21 + x86_64-darwin-23 x86_64-linux DEPENDENCIES From c75fa4b954e8af0b7dbef3b2eafd44283486718f Mon Sep 17 00:00:00 2001 From: Vincent Date: Fri, 15 Dec 2023 15:08:33 +0100 Subject: [PATCH 03/13] (quality) Cleanup unused feature --- .../javascript/controllers/admin/members.js | 3 --- app/frontend/src/javascript/models/setting.ts | 3 +-- app/frontend/src/javascript/router.js | 4 ++-- .../templates/admin/settings/compte.html | 22 ------------------- app/helpers/settings_helper.rb | 1 - config/locales/app.admin.en.yml | 1 - config/locales/en.yml | 1 - db/seeds/settings.rb | 2 -- test/frontend/__fixtures__/settings.ts | 6 ----- 9 files changed, 3 insertions(+), 40 deletions(-) diff --git a/app/frontend/src/javascript/controllers/admin/members.js b/app/frontend/src/javascript/controllers/admin/members.js index 9cc5e6adc..860cb71aa 100644 --- a/app/frontend/src/javascript/controllers/admin/members.js +++ b/app/frontend/src/javascript/controllers/admin/members.js @@ -165,9 +165,6 @@ Application.Controllers.controller('AdminMembersController', ['$scope', '$sce', if ($scope.enableUserValidationRequired) { $scope.member.memberFilters.push('not_validated'); } - // should we display the username in the list? - $scope.displayUsername = (settingsPromise.show_username_in_admin_list === 'true'); - // Admins ordering/sorting. Default: not sorted $scope.orderAdmin = null; diff --git a/app/frontend/src/javascript/models/setting.ts b/app/frontend/src/javascript/models/setting.ts index ae114d96c..926c51d1a 100644 --- a/app/frontend/src/javascript/models/setting.ts +++ b/app/frontend/src/javascript/models/setting.ts @@ -219,8 +219,7 @@ export const registrationSettings = [ ] as const; export const adminSettings = [ - 'feature_tour_display', - 'show_username_in_admin_list' + 'feature_tour_display' ] as const; export const pricingSettings = [ diff --git a/app/frontend/src/javascript/router.js b/app/frontend/src/javascript/router.js index 2005f7bb2..74d83f59e 100644 --- a/app/frontend/src/javascript/router.js +++ b/app/frontend/src/javascript/router.js @@ -1037,7 +1037,7 @@ angular.module('application.router', ['ui.router']) groupsPromise: ['Group', function (Group) { return Group.query().$promise; }], tagsPromise: ['Tag', function (Tag) { return Tag.query().$promise; }], authProvidersPromise: ['AuthProvider', function (AuthProvider) { return AuthProvider.query().$promise; }], - settingsPromise: ['Setting', function (Setting) { return Setting.query({ names: "['feature_tour_display', 'user_validation_required', 'show_username_in_admin_list']" }).$promise; }] + settingsPromise: ['Setting', function (Setting) { return Setting.query({ names: "['feature_tour_display', 'user_validation_required']" }).$promise; }] } }) .state('app.admin.members_new', { @@ -1198,7 +1198,7 @@ angular.module('application.router', ['ui.router']) "'link_name', 'home_content', 'home_css', 'phone_required', 'upcoming_events_shown', 'public_agenda_module'," + "'renew_pack_threshold', 'pack_only_for_subscription', 'overlapping_categories', 'public_registrations'," + "'extended_prices_in_same_day', 'recaptcha_site_key', 'recaptcha_secret_key', 'user_validation_required', " + - "'user_validation_required_list', 'machines_module', 'user_change_group', 'show_username_in_admin_list', " + + "'user_validation_required_list', 'machines_module', 'user_change_group', " + "'store_module', 'machine_reservation_deadline', 'training_reservation_deadline', 'event_reservation_deadline', " + "'space_reservation_deadline', 'reservation_context_feature']" }).$promise; diff --git a/app/frontend/templates/admin/settings/compte.html b/app/frontend/templates/admin/settings/compte.html index 241196c69..44f0f14a9 100644 --- a/app/frontend/templates/admin/settings/compte.html +++ b/app/frontend/templates/admin/settings/compte.html @@ -105,28 +105,6 @@

{{ 'app.admin.settings.captcha' }}

-
-
- {{ 'app.admin.settings.accounts_management' }} -
-
-
-

{{ 'app.admin.settings.members_list' }}

-

- {{ 'app.admin.settings.members_list_info' }} -

-
- - -
-
-
-
-
{{ 'app.admin.settings.account.customize_account_settings' }} diff --git a/app/helpers/settings_helper.rb b/app/helpers/settings_helper.rb index c82f0f62c..da4c92808 100644 --- a/app/helpers/settings_helper.rb +++ b/app/helpers/settings_helper.rb @@ -166,7 +166,6 @@ module SettingsHelper user_change_group user_validation_required user_validation_required_list - show_username_in_admin_list family_account child_validation_required store_module diff --git a/config/locales/app.admin.en.yml b/config/locales/app.admin.en.yml index 7f3efc37c..67341f678 100644 --- a/config/locales/app.admin.en.yml +++ b/config/locales/app.admin.en.yml @@ -1859,7 +1859,6 @@ en: extended_prices_info_html: "Spaces can have different prices depending on the cumulated duration of the booking. You can choose if this apply to all bookings or only to those starting within the same day." extended_prices_in_same_day: "Extended prices in the same day" public_registrations: "Public registrations" - show_username_in_admin_list: "Show the username in the list" projects_list_member_filter_presence: "Presence of member filter on projects list" projects_list_date_filters_presence: "Presence of date filters on projects list" project_categories_filter_placeholder: "Placeholder for categories filter in project gallery" diff --git a/config/locales/en.yml b/config/locales/en.yml index 625dcfff9..cc3437fe5 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -721,7 +721,6 @@ en: flickr: "flickr" machines_module: "Machines module" user_change_group: "Allow users to change their group" - show_username_in_admin_list: "Show the username in the admin's members list" store_module: "Store module" store_withdrawal_instructions: "Withdrawal instructions" store_hidden: "Store hidden to the public" diff --git a/db/seeds/settings.rb b/db/seeds/settings.rb index 7962b9194..fcfb09328 100644 --- a/db/seeds/settings.rb +++ b/db/seeds/settings.rb @@ -686,8 +686,6 @@ Setting.set('extended_prices_in_same_day', false) unless Setting.find_by(name: 'extended_prices_in_same_day').try(:value) -Setting.set('show_username_in_admin_list', false) unless Setting.find_by(name: 'show_username_in_admin_list').try(:value) - Setting.set('store_module', false) unless Setting.find_by(name: 'store_module').try(:value) Setting.set('store_hidden', true) unless Setting.find_by(name: 'store_hidden').try(:value) diff --git a/test/frontend/__fixtures__/settings.ts b/test/frontend/__fixtures__/settings.ts index c43dcf0be..407218cfa 100644 --- a/test/frontend/__fixtures__/settings.ts +++ b/test/frontend/__fixtures__/settings.ts @@ -508,12 +508,6 @@ export const settings: Array = [ last_update: '2022-11-28T16:01:00+0200', localized: 'Adresse requise' }, - { - name: 'show_username_in_admin_list', - value: 'false', - last_update: '2022-11-21T15:20:03+0100', - localized: "Afficher le nom d'utilisateur dans la liste des membres de l'administrateur" - }, { name: 'store_module', value: 'true', From 13311906bbf0847565018d072b37b75fef5d4910 Mon Sep 17 00:00:00 2001 From: Du Peng Date: Fri, 15 Dec 2023 18:09:33 +0100 Subject: [PATCH 04/13] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93977467a..08c6607ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog Fab-manager - Fix a bug: unable to show wallet payment mean for invoice +- improvement: remove show_username_in_admin_list setting - [TODO DEPLOY] `rails fablab:setup:build_accounting_lines` ## v6.3.6 2023 December 6 From 5a88ff5aa4d1787840c6c872127b00926160088f Mon Sep 17 00:00:00 2001 From: Du Peng Date: Thu, 21 Dec 2023 15:49:11 +0100 Subject: [PATCH 05/13] (feat) show invoice payment method in accounting line --- CHANGELOG.md | 1 + app/models/accounting_line.rb | 12 ++++++++++++ app/views/open_api/v1/accounting/index.json.jbuilder | 1 + 3 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08c6607ca..68e466357 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - Fix a bug: unable to show wallet payment mean for invoice - improvement: remove show_username_in_admin_list setting +- improvement: show invoice payment method in accounting line - [TODO DEPLOY] `rails fablab:setup:build_accounting_lines` ## v6.3.6 2023 December 6 diff --git a/app/models/accounting_line.rb b/app/models/accounting_line.rb index 2f94fa990..4c980fe5b 100644 --- a/app/models/accounting_line.rb +++ b/app/models/accounting_line.rb @@ -5,4 +5,16 @@ class AccountingLine < ApplicationRecord belongs_to :invoice belongs_to :invoicing_profile + + def invoice_payment_method + # if the invoice was 100% payed with the wallet ... + return 'wallet' if (!invoice.wallet_amount.nil? && (invoice.wallet_amount - invoice.total == 0)) || invoice.payment_method == 'wallet' + + # else + if invoice.paid_by_card? + 'card' + else + 'other' + end + end end diff --git a/app/views/open_api/v1/accounting/index.json.jbuilder b/app/views/open_api/v1/accounting/index.json.jbuilder index 017ba53a8..44b161f0b 100644 --- a/app/views/open_api/v1/accounting/index.json.jbuilder +++ b/app/views/open_api/v1/accounting/index.json.jbuilder @@ -9,6 +9,7 @@ json.lines @lines do |line| json.extract! line.invoice, :reference, :id json.label Invoices::LabelService.build(line.invoice) json.url download_open_api_v1_invoice_path(line.invoice) + json.payment_method line.invoice_payment_method if @codes.values.include?(line.account_code) # if this is a 'payment' line mean = @codes.select { |_key, value| value == line.account_code } json.payment_details line.invoice.payment_details(mean.keys[0]) From 04c5dc58e7c668428fec5fbf2bcba6d16b9c7a92 Mon Sep 17 00:00:00 2001 From: Du Peng Date: Thu, 28 Dec 2023 17:54:47 +0100 Subject: [PATCH 06/13] (bug) PayZen amount of subscription compute error for Coupon validity per user = forever --- CHANGELOG.md | 1 + lib/pay_zen/service.rb | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68e466357..7e2bd4923 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog Fab-manager - Fix a bug: unable to show wallet payment mean for invoice +- Fix a bug: PayZen amount of subscription compute error for Coupon validity per user = forever - improvement: remove show_username_in_admin_list setting - improvement: show invoice payment method in accounting line - [TODO DEPLOY] `rails fablab:setup:build_accounting_lines` diff --git a/lib/pay_zen/service.rb b/lib/pay_zen/service.rb index 4f2dfbac6..e9597af0f 100644 --- a/lib/pay_zen/service.rb +++ b/lib/pay_zen/service.rb @@ -16,9 +16,11 @@ def create_subscription(payment_schedule, order_id, *_args) order = PayZen::Order.new.get(order_id, operation_type: 'VERIFICATION') client = PayZen::Charge.new token_id = order['answer']['transactions'].first['paymentMethodToken'] + coupon = payment_schedule.coupon + amount = coupon && coupon.validity_per_user == 'forever' ? first_item.amount : first_item.details['recurring'].to_i params = { - amount: payzen_amount(first_item.details['recurring'].to_i), + amount: payzen_amount(amount), effect_date: first_item.due_date.iso8601, payment_method_token: token_id, rrule: rrule(payment_schedule, first_item.due_date), From be034c1c067946975f116e44074b7f81a697d658 Mon Sep 17 00:00:00 2001 From: Du Peng Date: Thu, 28 Dec 2023 18:32:16 +0100 Subject: [PATCH 07/13] (bug) unable to create Stripe coupon with duration = forever --- CHANGELOG.md | 1 + lib/stripe/service.rb | 2 +- lib/tasks/fablab/fix.rake | 14 ++++++++++++++ test/fixtures/coupons.yml | 2 +- test/models/coupon_test.rb | 2 +- 5 files changed, 18 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e2bd4923..b066a8ee5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - Fix a bug: unable to show wallet payment mean for invoice - Fix a bug: PayZen amount of subscription compute error for Coupon validity per user = forever +- Fix a bug: unable to create Stripe coupon with duration = forever - improvement: remove show_username_in_admin_list setting - improvement: show invoice payment method in accounting line - [TODO DEPLOY] `rails fablab:setup:build_accounting_lines` diff --git a/lib/stripe/service.rb b/lib/stripe/service.rb index 49b13b62a..f9ee3cbce 100644 --- a/lib/stripe/service.rb +++ b/lib/stripe/service.rb @@ -66,7 +66,7 @@ def create_coupon(coupon_id) stp_coupon[:currency] = Setting.get('stripe_currency') end - stp_coupon[:duration] = coupon.validity_per_user == 'always' ? 'forever' : 'once' + stp_coupon[:duration] = coupon.validity_per_user stp_coupon[:redeem_by] = coupon.valid_until.to_i unless coupon.valid_until.nil? stp_coupon[:max_redemptions] = coupon.max_usages unless coupon.max_usages.nil? diff --git a/lib/tasks/fablab/fix.rake b/lib/tasks/fablab/fix.rake index 507f4ab56..bf3b1b629 100644 --- a/lib/tasks/fablab/fix.rake +++ b/lib/tasks/fablab/fix.rake @@ -1,4 +1,5 @@ # frozen_string_literal: true +require 'stripe/service' # Correctives for bugs or upgrades migrations tasks namespace :fablab do @@ -348,5 +349,18 @@ namespace :fablab do end end end + + desc '[release 6.3.6] fix stripe coupon duration' + task stripe_coupon_duration: :environment do |_task, _args| + if Setting.get('payment_gateway') == 'stripe' + Coupon.where(validity_per_user: 'forever').each do |c| + cpn = Stripe::Coupon.retrieve(c.code, api_key: Setting.get('stripe_secret_key')) + cpn.delete + Stripe::Service.new.create_coupon(c.id) + rescue Stripe::InvalidRequestError => e + puts "Unable to create coupon #{c.code} on stripe: #{e}" + end + end + end end end diff --git a/test/fixtures/coupons.yml b/test/fixtures/coupons.yml index 11673d6c7..f19fecb77 100644 --- a/test/fixtures/coupons.yml +++ b/test/fixtures/coupons.yml @@ -16,7 +16,7 @@ two: valid_until: <%= 1.month.from_now.utc.strftime('%Y-%m-%d %H:%M:%S.%9N %Z') %> max_usages: 10 active: true - validity_per_user: always + validity_per_user: forever cash: name: Cash Code diff --git a/test/models/coupon_test.rb b/test/models/coupon_test.rb index 701afdc25..bef300f4e 100644 --- a/test/models/coupon_test.rb +++ b/test/models/coupon_test.rb @@ -22,7 +22,7 @@ class CouponTest < ActiveSupport::TestCase end test 'two coupons cannot have the same code' do - c = Coupon.new({ name: 'Summer deals', code: 'SUNNYFABLAB', percent_off: 15, validity_per_user: 'always' }) + c = Coupon.new({ name: 'Summer deals', code: 'SUNNYFABLAB', percent_off: 15, validity_per_user: 'forever' }) assert c.invalid? end From dac874d915f030d999f87276666d158fd1c3d084 Mon Sep 17 00:00:00 2001 From: Du Peng Date: Thu, 28 Dec 2023 18:34:31 +0100 Subject: [PATCH 08/13] (i18n) updated translations --- config/locales/app.admin.de.yml | 1 - config/locales/app.admin.es-MX.yml | 1 - config/locales/app.admin.es.yml | 1 - config/locales/app.admin.fr.yml | 1 - config/locales/app.admin.it.yml | 1 - config/locales/app.admin.no.yml | 1 - config/locales/app.admin.pt.yml | 1 - config/locales/app.admin.zu.yml | 7 +++---- config/locales/de.yml | 1 - config/locales/es-MX.yml | 1 - config/locales/es.yml | 1 - config/locales/fr.yml | 3 +-- config/locales/it.yml | 1 - config/locales/no.yml | 1 - config/locales/pt.yml | 1 - config/locales/zu.yml | 1 - 16 files changed, 4 insertions(+), 20 deletions(-) diff --git a/config/locales/app.admin.de.yml b/config/locales/app.admin.de.yml index 45bc26b04..24940b797 100644 --- a/config/locales/app.admin.de.yml +++ b/config/locales/app.admin.de.yml @@ -1859,7 +1859,6 @@ de: extended_prices_info_html: "Räume können je nach Dauer der Buchung unterschiedliche Preise haben. Sie können wählen, ob dies für alle Buchungen oder nur für diejenigen gilt, die am selben Tag beginnen." extended_prices_in_same_day: "Erweiterte Preise am selben Tag" public_registrations: "Öffentliche Registrierungen" - show_username_in_admin_list: "Show the username in the list" projects_list_member_filter_presence: "Presence of member filter on projects list" projects_list_date_filters_presence: "Presence of date filters on projects list" project_categories_filter_placeholder: "Placeholder for categories filter in project gallery" diff --git a/config/locales/app.admin.es-MX.yml b/config/locales/app.admin.es-MX.yml index ac434ca8a..f7da2de92 100644 --- a/config/locales/app.admin.es-MX.yml +++ b/config/locales/app.admin.es-MX.yml @@ -1859,7 +1859,6 @@ es-MX: extended_prices_info_html: "Los espacios pueden tener diferentes precios dependiendo de la duración acumulada de la reserva. Puede elegir si esto se aplica a todas las reservas o solo a las que empiezan en el mismo día." extended_prices_in_same_day: "Precios extendidos en el mismo día" public_registrations: "Registros públicos" - show_username_in_admin_list: "Mostrar el nombre de usuario en la lista" projects_list_member_filter_presence: "Presencia del filtro de miembros en la lista de proyectos" projects_list_date_filters_presence: "Presencia de filtros de fecha en la lista de proyectos" project_categories_filter_placeholder: "Marcador para el filtro de categorías en la galería de proyectos" diff --git a/config/locales/app.admin.es.yml b/config/locales/app.admin.es.yml index 9206d4f92..2aacd4d97 100644 --- a/config/locales/app.admin.es.yml +++ b/config/locales/app.admin.es.yml @@ -1859,7 +1859,6 @@ es: extended_prices_info_html: "Los espacios pueden tener diferentes precios dependiendo de la duración acumulada de la reserva. Puede elegir si esto se aplica a todas las reservas o solo a las que empiezan en el mismo día." extended_prices_in_same_day: "Precios extendidos en el mismo día" public_registrations: "Registros públicos" - show_username_in_admin_list: "Mostrar el nombre de usuario en la lista" projects_list_member_filter_presence: "Presencia del filtro de miembros en la lista de proyectos" projects_list_date_filters_presence: "Presencia de filtros de fecha en la lista de proyectos" project_categories_filter_placeholder: "Marcador para el filtro de categorías en la galería de proyectos" diff --git a/config/locales/app.admin.fr.yml b/config/locales/app.admin.fr.yml index c62964e7e..259b69fbf 100644 --- a/config/locales/app.admin.fr.yml +++ b/config/locales/app.admin.fr.yml @@ -1859,7 +1859,6 @@ fr: extended_prices_info_html: "Les espaces peuvent avoir des prix différents selon la durée cumulée de la réservation. Vous pouvez choisir si cela s'applique à toutes les réservations ou seulement à celles qui commencent dans la même journée." extended_prices_in_same_day: "Prix étendus le même jour" public_registrations: "Inscriptions publiques" - show_username_in_admin_list: "Afficher le nom d'utilisateur dans la liste" projects_list_member_filter_presence: "Permettre la recherche de projets par membre" projects_list_date_filters_presence: "Permettre la recherche de projets par dates" project_categories_filter_placeholder: "Dans la galerie de projets, renommer le filtre \"Toutes les catégories\"" diff --git a/config/locales/app.admin.it.yml b/config/locales/app.admin.it.yml index e7822af7e..3c2a52d67 100644 --- a/config/locales/app.admin.it.yml +++ b/config/locales/app.admin.it.yml @@ -1859,7 +1859,6 @@ it: extended_prices_info_html: "Gli spazi possono avere prezzi diversi a seconda della durata cumulata della prenotazione. È possibile scegliere se questo si applica a tutte le prenotazioni o solo a quelli che iniziano entro lo stesso giorno." extended_prices_in_same_day: "Prezzi estesi nello stesso giorno" public_registrations: "Registri pubblici" - show_username_in_admin_list: "Mostra il nome utente nella lista" projects_list_member_filter_presence: "Presence of member filter on projects list" projects_list_date_filters_presence: "Presence of date filters on projects list" project_categories_filter_placeholder: "Placeholder for categories filter in project gallery" diff --git a/config/locales/app.admin.no.yml b/config/locales/app.admin.no.yml index f64183496..a8c15cc33 100644 --- a/config/locales/app.admin.no.yml +++ b/config/locales/app.admin.no.yml @@ -1859,7 +1859,6 @@ extended_prices_info_html: "Spaces can have different prices depending on the cumulated duration of the booking. You can choose if this apply to all bookings or only to those starting within the same day." extended_prices_in_same_day: "Extended prices in the same day" public_registrations: "Public registrations" - show_username_in_admin_list: "Show the username in the list" projects_list_member_filter_presence: "Presence of member filter on projects list" projects_list_date_filters_presence: "Presence of date filters on projects list" project_categories_filter_placeholder: "Placeholder for categories filter in project gallery" diff --git a/config/locales/app.admin.pt.yml b/config/locales/app.admin.pt.yml index 75e779d24..f21df745d 100644 --- a/config/locales/app.admin.pt.yml +++ b/config/locales/app.admin.pt.yml @@ -1859,7 +1859,6 @@ pt: extended_prices_info_html: "Os espaços podem ter preços diferentes dependendo da duração acumulada da reserva. Você pode escolher se isso se aplica a todas as reservas ou apenas àqueles que iniciam no mesmo dia." extended_prices_in_same_day: "Preços estendidos no mesmo dia" public_registrations: "Inscrições públicas" - show_username_in_admin_list: "Mostrar o nome de usuário na lista" projects_list_member_filter_presence: "Presence of member filter on projects list" projects_list_date_filters_presence: "Presence of date filters on projects list" project_categories_filter_placeholder: "Placeholder for categories filter in project gallery" diff --git a/config/locales/app.admin.zu.yml b/config/locales/app.admin.zu.yml index d5b1aa2f9..b6f1ea81d 100644 --- a/config/locales/app.admin.zu.yml +++ b/config/locales/app.admin.zu.yml @@ -957,13 +957,13 @@ zu: n_digits_annual_amount_of_orders: "crwdns25076:0crwdne25076:0" add_a_notice_regarding_the_online_sales_only_if_the_invoice_is_concerned: "crwdns25078:0crwdne25078:0" this_will_never_be_added_when_a_refund_notice_is_present: "crwdns25080:0crwdne25080:0" - eg_XVL_will_add_VL_to_the_invoices_settled_by_card: 'crwdns25082:0[/VL]crwdne25082:0' + eg_XVL_will_add_VL_to_the_invoices_settled_by_card: 'crwdns25082:0crwdne25082:0' add_a_notice_regarding_refunds_only_if_the_invoice_is_concerned: "crwdns25084:0crwdne25084:0" this_will_never_be_added_when_an_online_sales_notice_is_present: "crwdns25086:0crwdne25086:0" - eg_RA_will_add_A_to_the_refund_invoices: 'crwdns25088:0[/A]crwdne25088:0' + eg_RA_will_add_A_to_the_refund_invoices: 'crwdns25088:0crwdne25088:0' add_a_notice_regarding_payment_schedule: "crwdns25090:0crwdne25090:0" this_will_never_be_added_with_other_notices: "crwdns25092:0crwdne25092:0" - eg_SE_to_schedules: 'crwdns25094:0[/E]crwdne25094:0' + eg_SE_to_schedules: 'crwdns25094:0crwdne25094:0' code: "crwdns25096:0crwdne25096:0" enable_the_code: "crwdns25098:0crwdne25098:0" enabled: "crwdns25100:0crwdne25100:0" @@ -1859,7 +1859,6 @@ zu: extended_prices_info_html: "crwdns26750:0crwdne26750:0" extended_prices_in_same_day: "crwdns26752:0crwdne26752:0" public_registrations: "crwdns26754:0crwdne26754:0" - show_username_in_admin_list: "crwdns26756:0crwdne26756:0" projects_list_member_filter_presence: "crwdns37627:0crwdne37627:0" projects_list_date_filters_presence: "crwdns37629:0crwdne37629:0" project_categories_filter_placeholder: "crwdns37631:0crwdne37631:0" diff --git a/config/locales/de.yml b/config/locales/de.yml index 2b07ea625..9a8917ddf 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -721,7 +721,6 @@ de: flickr: "Flickr" machines_module: "Maschinenmodul" user_change_group: "Allow users to change their group" - show_username_in_admin_list: "Show the username in the admin's members list" store_module: "Store module" store_withdrawal_instructions: "Withdrawal instructions" store_hidden: "Store hidden to the public" diff --git a/config/locales/es-MX.yml b/config/locales/es-MX.yml index 357e8492b..c1589fcce 100644 --- a/config/locales/es-MX.yml +++ b/config/locales/es-MX.yml @@ -721,7 +721,6 @@ es-MX: flickr: "flickr" machines_module: "Módulo de máquinas" user_change_group: "Permitir a los usuarios cambiar su grupo" - show_username_in_admin_list: "Mostrar el nombre de usuario en la lista de miembros del administrador" store_module: "Módulo de tienda" store_withdrawal_instructions: "Instrucciones de retirada" store_hidden: "Tienda oculta al público" diff --git a/config/locales/es.yml b/config/locales/es.yml index 7f48dd107..b0fddcaf2 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -721,7 +721,6 @@ es: flickr: "flickr" machines_module: "Módulo de máquinas" user_change_group: "Permitir a los usuarios cambiar su grupo" - show_username_in_admin_list: "Mostrar el nombre de usuario en la lista de miembros del administrador" store_module: "Módulo de tienda" store_withdrawal_instructions: "Instrucciones de retirada" store_hidden: "Tienda oculta al público" diff --git a/config/locales/fr.yml b/config/locales/fr.yml index c3de87a5e..7977f5bc1 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -24,7 +24,7 @@ fr: extension_whitelist_error: "Vous n'êtes pas autorisé à envoyer des fichiers %{extension}, les types autorisés sont : %{allowed_types}" extension_blacklist_error: "Vous n'êtes pas autorisé à envoyer des fichiers %{extension}, les types interdits sont : %{prohibited_types}" content_type_whitelist_error: "Vous n'êtes pas autorisé à envoyer des fichiers %{content_type}, les types autorisés sont : %{allowed_types}" - rmagick_processing_error: "Impossible de manipuler avec rmagick. Peut-être que ce n'est pas une image ?" + rmagick_processing_error: "Impossible à manipuler avec rmagick. Peut-être que ce n'est pas une image ?" mime_types_processing_error: "Impossible de traiter le fichier avec MIME::Types. Le type de contenu n'est peut-être pas valide ?" mini_magick_processing_error: "Impossible de manipuler le fichier. Peut-être que ce n'est pas une image ?" wrong_size: "ne fait pas la bonne taille (doit comporter %{file_size})" @@ -721,7 +721,6 @@ fr: flickr: "flickr" machines_module: "Module machines" user_change_group: "Permettre aux utilisateurs de changer leur groupe" - show_username_in_admin_list: "Afficher le nom d'utilisateur dans la liste des membres de l'administrateur" store_module: "Module boutique" store_withdrawal_instructions: "Instructions de retrait" store_hidden: "Boutique masquée au public" diff --git a/config/locales/it.yml b/config/locales/it.yml index 86ee5a8a7..cccafc44c 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -721,7 +721,6 @@ it: flickr: "flickr" machines_module: "Modulo macchine" user_change_group: "Consenti all'utente di cambiare il loro gruppo" - show_username_in_admin_list: "Mostra il nome utente nell'elenco dei membri dell'amministratore" store_module: "Modulo del negozio" store_withdrawal_instructions: "Istruzioni per il ritiro" store_hidden: "Negozio nascosto al pubblico" diff --git a/config/locales/no.yml b/config/locales/no.yml index 66ce5d5bb..d4eadb082 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -721,7 +721,6 @@ flickr: "flickr" machines_module: "Machines module" user_change_group: "Allow users to change their group" - show_username_in_admin_list: "Show the username in the admin's members list" store_module: "Store module" store_withdrawal_instructions: "Withdrawal instructions" store_hidden: "Store hidden to the public" diff --git a/config/locales/pt.yml b/config/locales/pt.yml index e00a3127e..852dfda05 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -721,7 +721,6 @@ pt: flickr: "flickr" machines_module: "Módulo de Máquinas" user_change_group: "Permitir que os usuários mudem de grupo" - show_username_in_admin_list: "Mostrar o nome de usuário na lista de membros do administrador" store_module: "Store module" store_withdrawal_instructions: "Withdrawal instructions" store_hidden: "Store hidden to the public" diff --git a/config/locales/zu.yml b/config/locales/zu.yml index 1f15e36d4..3a2295f32 100644 --- a/config/locales/zu.yml +++ b/config/locales/zu.yml @@ -721,7 +721,6 @@ zu: flickr: "crwdns23036:0crwdne23036:0" machines_module: "crwdns23038:0crwdne23038:0" user_change_group: "crwdns23040:0crwdne23040:0" - show_username_in_admin_list: "crwdns24016:0crwdne24016:0" store_module: "crwdns31723:0crwdne31723:0" store_withdrawal_instructions: "crwdns31725:0crwdne31725:0" store_hidden: "crwdns31727:0crwdne31727:0" From 4fcdd51f253218e22b7c322f1a63da3a5f43c54c Mon Sep 17 00:00:00 2001 From: Du Peng Date: Thu, 28 Dec 2023 18:36:05 +0100 Subject: [PATCH 09/13] update Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b066a8ee5..ba156ff8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - improvement: remove show_username_in_admin_list setting - improvement: show invoice payment method in accounting line - [TODO DEPLOY] `rails fablab:setup:build_accounting_lines` +- [TODO DEPLOY] `rails fablab:fix:stripe_coupon_duration` ## v6.3.6 2023 December 6 From 32c5b010533b4981aa01b52a7e8523e8684a4f8e Mon Sep 17 00:00:00 2001 From: Du Peng Date: Thu, 28 Dec 2023 18:37:16 +0100 Subject: [PATCH 10/13] Version 6.3.7 --- CHANGELOG.md | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba156ff8f..18a9f4c2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog Fab-manager +## v6.3.7 2023 December 28 + - Fix a bug: unable to show wallet payment mean for invoice - Fix a bug: PayZen amount of subscription compute error for Coupon validity per user = forever - Fix a bug: unable to create Stripe coupon with duration = forever diff --git a/package.json b/package.json index 86010da48..83c22de38 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fab-manager", - "version": "6.3.6", + "version": "6.3.7", "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 a523b564f150b445b25f36ce0acc77fff25cc332 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Feb 2024 16:26:09 +0100 Subject: [PATCH 11/13] Bump sidekiq-unique-jobs from 7.1.23 to 7.1.33 (#466) Bumps [sidekiq-unique-jobs](https://github.com/mhenrixon/sidekiq-unique-jobs) from 7.1.23 to 7.1.33. - [Release notes](https://github.com/mhenrixon/sidekiq-unique-jobs/releases) - [Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/blob/main/CHANGELOG.md) - [Commits](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.1.23...v7.1.33) --- updated-dependencies: - dependency-name: sidekiq-unique-jobs dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile | 2 +- Gemfile.lock | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Gemfile b/Gemfile index dfdd5557d..29d463c77 100644 --- a/Gemfile +++ b/Gemfile @@ -95,7 +95,7 @@ gem 'aasm' gem 'sidekiq', '6.5.12' # Recurring jobs for Sidekiq gem 'sidekiq-scheduler', '5.0.3' -gem 'sidekiq-unique-jobs', '~> 7.1.23' +gem 'sidekiq-unique-jobs', '~> 7.1.33' gem 'stripe', '5.29.0' diff --git a/Gemfile.lock b/Gemfile.lock index 0495981c7..1917985da 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -94,9 +94,9 @@ GEM bindex (0.8.1) bootsnap (1.16.0) msgpack (~> 1.2) - brpoplpush-redis_script (0.1.2) + brpoplpush-redis_script (0.1.3) concurrent-ruby (~> 1.0, >= 1.0.5) - redis (>= 1.0, <= 5.0) + redis (>= 1.0, < 6) builder (3.2.4) bullet (7.0.0) activesupport (>= 3.0.0) @@ -124,7 +124,7 @@ GEM coderay (1.1.3) coercible (1.0.0) descendants_tracker (~> 0.0.1) - concurrent-ruby (1.2.2) + concurrent-ruby (1.2.3) connection_pool (2.4.1) coveralls_reborn (0.18.0) simplecov (>= 0.18.1, < 0.20.0) @@ -345,7 +345,7 @@ GEM activesupport (>= 3.0.0) raabro (1.4.0) racc (1.6.2) - rack (2.2.6.4) + rack (2.2.8.1) rack-oauth2 (1.21.3) activesupport attr_required @@ -394,7 +394,7 @@ GEM recurrence (1.3.0) activesupport i18n - redis (4.6.0) + redis (4.8.1) redis-session-store (0.11.4) actionpack (>= 3, < 8) redis (>= 3, < 5) @@ -462,10 +462,11 @@ GEM rufus-scheduler (~> 3.2) sidekiq (>= 6, < 8) tilt (>= 1.4.0) - sidekiq-unique-jobs (7.1.23) + sidekiq-unique-jobs (7.1.33) brpoplpush-redis_script (> 0.1.1, <= 2.0.0) concurrent-ruby (~> 1.0, >= 1.0.5) - sidekiq (>= 5.0, < 8.0) + redis (< 5.0) + sidekiq (>= 5.0, < 7.0) thor (>= 0.20, < 3.0) silencer (2.0.0) simplecov (0.19.0) @@ -487,7 +488,7 @@ GEM ffi (~> 1.1) term-ansicolor (1.7.1) tins (~> 1.0) - thor (1.2.1) + thor (1.3.0) thread_safe (0.3.6) tilt (2.3.0) timeout (0.3.2) @@ -618,7 +619,7 @@ DEPENDENCIES shakapacker (= 6.6.0) sidekiq (= 6.5.12) sidekiq-scheduler (= 5.0.3) - sidekiq-unique-jobs (~> 7.1.23) + sidekiq-unique-jobs (~> 7.1.33) silencer spring (~> 4) spring-watcher-listen (~> 2.1.0) From 6cb6974a93bd198a03a140110411c6b70507989e Mon Sep 17 00:00:00 2001 From: Du Peng Date: Mon, 8 Apr 2024 10:40:06 +0200 Subject: [PATCH 12/13] (feat) hide gender in signup form if not required --- CHANGELOG.md | 2 ++ app/frontend/src/javascript/controllers/application.js | 2 +- app/frontend/templates/shared/signupModal.html | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c09fadb3..274cf4b9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next release +- improvement: hide gender in signup form if not required + ## v6.3.17 2024 Avril 8 - improvement: add loader for create/delete availability slot diff --git a/app/frontend/src/javascript/controllers/application.js b/app/frontend/src/javascript/controllers/application.js index c081a7bd3..854697e80 100644 --- a/app/frontend/src/javascript/controllers/application.js +++ b/app/frontend/src/javascript/controllers/application.js @@ -81,7 +81,7 @@ Application.Controllers.controller('ApplicationController', ['$rootScope', '$sco size: 'md', resolve: { settingsPromise: ['Setting', function (Setting) { - return Setting.query({ names: "['phone_required', 'recaptcha_site_key', 'confirmation_required', 'address_required']" }).$promise; + return Setting.query({ names: "['phone_required', 'recaptcha_site_key', 'confirmation_required', 'address_required', 'gender_required', 'birthday_required']" }).$promise; }], profileCustomFieldsPromise: ['ProfileCustomField', function (ProfileCustomField) { return ProfileCustomField.query({}).$promise; }], proofOfIdentityTypesPromise: ['SupportingDocumentType', function (SupportingDocumentType) { return SupportingDocumentType.query({}).$promise; }] diff --git a/app/frontend/templates/shared/signupModal.html b/app/frontend/templates/shared/signupModal.html index 44ac77736..bb57d2d70 100644 --- a/app/frontend/templates/shared/signupModal.html +++ b/app/frontend/templates/shared/signupModal.html @@ -8,7 +8,7 @@

{{ 'app.public.common.create_your_account' }}