mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-22 11:52:21 +01:00
(feat) add Family account setting
This commit is contained in:
parent
7cff0d6c39
commit
be539b1f76
@ -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
|
||||
|
@ -46,7 +46,7 @@ class SettingPolicy < ApplicationPolicy
|
||||
external_id machines_banner_active machines_banner_text machines_banner_cta_active machines_banner_cta_label
|
||||
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]
|
||||
events_banner_cta_url family_account]
|
||||
end
|
||||
|
||||
##
|
||||
|
@ -1773,6 +1773,9 @@ en:
|
||||
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"
|
||||
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"
|
||||
|
@ -1773,6 +1773,9 @@ fr:
|
||||
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"
|
||||
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"
|
||||
|
@ -697,6 +697,7 @@ en:
|
||||
trainings_authorization_validity_duration: "Trainings validity period duration"
|
||||
trainings_invalidation_rule: "Trainings automatic invalidation"
|
||||
trainings_invalidation_rule_period: "Grace period before invalidating a training"
|
||||
family_account: "Family account"
|
||||
#statuses of projects
|
||||
statuses:
|
||||
new: "New"
|
||||
|
@ -728,3 +728,5 @@ Setting.set('accounting_Error_code', 'ERROR') unless Setting.find_by(name: 'acco
|
||||
Setting.set('accounting_Error_label', 'Erroneous invoices to refund') unless Setting.find_by(name: 'accounting_Error_label').try(:value)
|
||||
|
||||
Setting.set('external_id', false) unless Setting.find_by(name: 'external_id').try(:value)
|
||||
|
||||
Setting.set('family_account', false) unless Setting.find_by(name: 'family_account').try(:value)
|
||||
|
8
test/fixtures/history_values.yml
vendored
8
test/fixtures/history_values.yml
vendored
@ -852,3 +852,11 @@ history_value_100:
|
||||
updated_at: 2023-04-05 09:16:08.000511500 Z
|
||||
invoicing_profile_id: 1
|
||||
|
||||
history_value_101:
|
||||
id: 101
|
||||
setting_id: 100
|
||||
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
|
||||
|
6
test/fixtures/settings.yml
vendored
6
test/fixtures/settings.yml
vendored
@ -586,3 +586,9 @@ setting_99:
|
||||
name: home_css
|
||||
created_at: 2023-04-05 09:16:08.000511500 Z
|
||||
updated_at: 2023-04-05 09:16:08.000511500 Z
|
||||
|
||||
setting_100:
|
||||
id: 100
|
||||
name: family_account
|
||||
created_at: 2023-03-31 14:38:40.000421500 Z
|
||||
updated_at: 2023-03-31 14:38:40.000421500 Z
|
||||
|
@ -825,6 +825,12 @@ export const settings: Array<Setting> = [
|
||||
value: 'https://www.sleede.com/',
|
||||
last_update: '2022-12-23T14:39:12+0100',
|
||||
localized: 'Url'
|
||||
},
|
||||
{
|
||||
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