mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-20 14:54:15 +01:00
(feat) add Family account setting
This commit is contained in:
parent
734608f31c
commit
7d10132953
@ -528,6 +528,7 @@ GEM
|
||||
zeitwerk (2.6.7)
|
||||
|
||||
PLATFORMS
|
||||
x86_64-darwin-20
|
||||
x86_64-darwin-21
|
||||
x86_64-linux
|
||||
|
||||
|
@ -178,7 +178,8 @@ export const accountSettings = [
|
||||
'external_id',
|
||||
'user_change_group',
|
||||
'user_validation_required',
|
||||
'user_validation_required_list'
|
||||
'user_validation_required_list',
|
||||
'family_account'
|
||||
] as const;
|
||||
|
||||
export const analyticsSettings = [
|
||||
|
@ -51,6 +51,17 @@
|
||||
<user-validation-setting on-success="onSuccess" on-error="onError" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<h3 class="m-l" translate>{{ 'app.admin.settings.family_account' }}</h3>
|
||||
<p class="alert alert-warning m-h-md" ng-bind-html="'app.admin.settings.family_account_info_html' | translate"></p>
|
||||
<div class="col-md-6">
|
||||
<boolean-setting name="'family_account'"
|
||||
settings="allSettings"
|
||||
label="'app.admin.settings.enable_family_account' | translate"
|
||||
on-success="onSuccess"
|
||||
on-error="onError">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<h3 class="m-l" translate>{{ 'app.admin.settings.captcha' }}</h3>
|
||||
<p class="alert alert-warning m-h-md" ng-bind-html="'app.admin.settings.captcha_info_html' | translate"></p>
|
||||
|
@ -167,6 +167,7 @@ module SettingsHelper
|
||||
user_validation_required
|
||||
user_validation_required_list
|
||||
show_username_in_admin_list
|
||||
family_account
|
||||
store_module
|
||||
store_withdrawal_instructions
|
||||
store_hidden
|
||||
|
@ -47,7 +47,7 @@ class SettingPolicy < ApplicationPolicy
|
||||
machines_banner_cta_url trainings_banner_active trainings_banner_text trainings_banner_cta_active trainings_banner_cta_label
|
||||
trainings_banner_cta_url events_banner_active events_banner_text events_banner_cta_active events_banner_cta_label
|
||||
events_banner_cta_url projects_list_member_filter_presence projects_list_date_filters_presence
|
||||
project_categories_filter_placeholder project_categories_wording]
|
||||
project_categories_filter_placeholder project_categories_wording family_account]
|
||||
end
|
||||
|
||||
##
|
||||
|
@ -1783,6 +1783,9 @@ en:
|
||||
projects_list_date_filters_presence: "Presence of date filters on projects list"
|
||||
project_categories_filter_placeholder: "Placeholder for categories filter in project gallery"
|
||||
project_categories_wording: "Wording used to replace \"Categories\" on public pages"
|
||||
family_account: "family account"
|
||||
family_account_info_html: "By activating this option, you offer your members the possibility to add their child(ren) to their own account. You can also request proof if you wish to validate them."
|
||||
enable_family_account: "Enable the Family Account option"
|
||||
overlapping_options:
|
||||
training_reservations: "Trainings"
|
||||
machine_reservations: "Machines"
|
||||
|
@ -1783,6 +1783,9 @@ fr:
|
||||
projects_list_date_filters_presence: "Presence of date filters on projects list"
|
||||
project_categories_filter_placeholder: "Placeholder for categories filter in project gallery"
|
||||
project_categories_wording: "Wording used to replace \"Categories\" on public pages"
|
||||
family_account: "Compte famille"
|
||||
family_account_info_html: "En activant cette option, vous offrez à vos membres la possibilité d'ajouter sur leur propre compte leur(s) enfants. Vous pouvez aussi demander un justificatif si vous souhaitez les valider."
|
||||
enable_family_account: "Activer l'option Compte Famille"
|
||||
overlapping_options:
|
||||
training_reservations: "Formations"
|
||||
machine_reservations: "Machines"
|
||||
|
@ -701,6 +701,7 @@ en:
|
||||
projects_list_date_filters_presence: "Presence of dates filter on projects list"
|
||||
project_categories_filter_placeholder: "Placeholder for categories filter in project gallery"
|
||||
project_categories_wording: "Wording used to replace \"Categories\" on public pages"
|
||||
family_account: "Family account"
|
||||
#statuses of projects
|
||||
statuses:
|
||||
new: "New"
|
||||
|
@ -733,3 +733,4 @@ Setting.set('projects_list_member_filter_presence', false) unless Setting.find_b
|
||||
Setting.set('projects_list_date_filters_presence', false) unless Setting.find_by(name: 'projects_list_date_filters_presence')
|
||||
Setting.set('project_categories_filter_placeholder', 'Toutes les catégories') unless Setting.find_by(name: 'project_categories_filter_placeholder').try(:value)
|
||||
Setting.set('project_categories_wording', 'Catégories') unless Setting.find_by(name: 'project_categories_wording').try(:value)
|
||||
Setting.set('family_account', false) unless Setting.find_by(name: 'family_account').try(:value)
|
||||
|
10
test/fixtures/history_values.yml
vendored
10
test/fixtures/history_values.yml
vendored
@ -853,6 +853,7 @@ history_value_100:
|
||||
invoicing_profile_id: 1
|
||||
|
||||
history_value_101:
|
||||
id: 101
|
||||
setting_id: 100
|
||||
value: 'Toutes les catégories'
|
||||
created_at: 2023-04-05 09:16:08.000511500 Z
|
||||
@ -860,6 +861,7 @@ history_value_101:
|
||||
invoicing_profile_id: 1
|
||||
|
||||
history_value_102:
|
||||
id: 102
|
||||
setting_id: 101
|
||||
value: 'Catégories'
|
||||
created_at: 2023-04-05 09:16:08.000511500 Z
|
||||
@ -880,4 +882,12 @@ history_value_104:
|
||||
value: 'false'
|
||||
created_at: 2023-04-05 09:16:08.000511500 Z
|
||||
updated_at: 2023-04-05 09:16:08.000511500 Z
|
||||
|
||||
history_value_105:
|
||||
id: 105
|
||||
setting_id: 104
|
||||
value: 'false'
|
||||
created_at: '2023-03-31 14:38:40.000421'
|
||||
updated_at: '2023-03-31 14:38:40.000421'
|
||||
footprint:
|
||||
invoicing_profile_id: 1
|
||||
|
5
test/fixtures/settings.yml
vendored
5
test/fixtures/settings.yml
vendored
@ -610,3 +610,8 @@ setting_103:
|
||||
name: projects_list_date_filters_presence
|
||||
created_at: 2023-04-05 09:16:08.000511500 Z
|
||||
updated_at: 2023-04-05 09:16:08.000511500 Z
|
||||
|
||||
setting_104:
|
||||
name: family_account
|
||||
created_at: 2023-03-31 14:38:40.000421500 Z
|
||||
updated_at: 2023-03-31 14:38:40.000421500 Z
|
||||
|
@ -849,6 +849,12 @@ export const settings: Array<Setting> = [
|
||||
value: 'Catégories',
|
||||
last_update: '2022-12-23T14:39:12+0100',
|
||||
localized: 'Project categories overridden name'
|
||||
},
|
||||
{
|
||||
name: 'family_account',
|
||||
value: 'false',
|
||||
last_update: '2023-03-31T14:39:12+0100',
|
||||
localized: 'Family account'
|
||||
}
|
||||
];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user