Add admin interface to enable the self service functionality
This commit is contained in:
parent
e6061e6760
commit
00f1dddd3d
5 changed files with 7 additions and 3 deletions
|
@ -12,6 +12,7 @@
|
||||||
= config_input_field form, :minimum_balance, as: :decimal, class: 'input-small'
|
= config_input_field form, :minimum_balance, as: :decimal, class: 'input-small'
|
||||||
= config_input form, :charge_members_manually, as: :boolean
|
= config_input form, :charge_members_manually, as: :boolean
|
||||||
= config_input form, :use_iban, as: :boolean
|
= config_input form, :use_iban, as: :boolean
|
||||||
|
= config_input form, :use_self_service, as: :boolean
|
||||||
|
|
||||||
%h4= t '.schedule_title'
|
%h4= t '.schedule_title'
|
||||||
= form.simple_fields_for :order_schedule do |fields|
|
= form.simple_fields_for :order_schedule do |fields|
|
||||||
|
|
|
@ -602,6 +602,7 @@ de:
|
||||||
use_boxfill: Wenn aktiviert, können Benutzer nahe am Ende der Bestellung diese nur mehr so verändern, dass sich die Gesamtsumme erhöht. Dies hilft beim auffüllen der verbleibenden Kisten. Es muss trotzdem noch das Kistenauffülldatum bei der Bestellung gesetzt werden.
|
use_boxfill: Wenn aktiviert, können Benutzer nahe am Ende der Bestellung diese nur mehr so verändern, dass sich die Gesamtsumme erhöht. Dies hilft beim auffüllen der verbleibenden Kisten. Es muss trotzdem noch das Kistenauffülldatum bei der Bestellung gesetzt werden.
|
||||||
use_iban: Zusätzlich Feld für die internationale Kontonummer bei Benutzern und Lieferanten anzeigen
|
use_iban: Zusätzlich Feld für die internationale Kontonummer bei Benutzern und Lieferanten anzeigen
|
||||||
use_nick: Benutzernamen anstatt reale Namen zeigen und verwenden, jeder Benutzer muss dazu einen Benutzernamen (Spitznamen) haben.
|
use_nick: Benutzernamen anstatt reale Namen zeigen und verwenden, jeder Benutzer muss dazu einen Benutzernamen (Spitznamen) haben.
|
||||||
|
use_self_service: Wenn aktiviert, können Benutzer_innen selbständig dafür freigegebene Abrechungsfunktionen nutzen.
|
||||||
webstats_tracking_code: Tracking Code für Webseitenanalyse (wie Piwik oder Google Analytics), leer lassen wenn keine Analyse erfolgt
|
webstats_tracking_code: Tracking Code für Webseitenanalyse (wie Piwik oder Google Analytics), leer lassen wenn keine Analyse erfolgt
|
||||||
keys:
|
keys:
|
||||||
applepear_url: Hilfe URL für das Äpfel Punktesystem zum Engagement
|
applepear_url: Hilfe URL für das Äpfel Punktesystem zum Engagement
|
||||||
|
@ -659,6 +660,7 @@ de:
|
||||||
use_boxfill: Kistenauffüllphase
|
use_boxfill: Kistenauffüllphase
|
||||||
use_iban: IBAN verwenden
|
use_iban: IBAN verwenden
|
||||||
use_nick: Benutzernamen verwenden
|
use_nick: Benutzernamen verwenden
|
||||||
|
use_self_service: Selbstbedienung verwenden
|
||||||
webstats_tracking_code: Code für Websiteanalysetool
|
webstats_tracking_code: Code für Websiteanalysetool
|
||||||
tabs:
|
tabs:
|
||||||
applications: Apps
|
applications: Apps
|
||||||
|
|
|
@ -603,6 +603,7 @@ en:
|
||||||
use_boxfill: When enabled, near end of an order, members are only able to change their order when increases the total amount ordered. This helps to fill any remaining boxes. You still need to set a box-fill date for the orders.
|
use_boxfill: When enabled, near end of an order, members are only able to change their order when increases the total amount ordered. This helps to fill any remaining boxes. You still need to set a box-fill date for the orders.
|
||||||
use_iban: When enabled, supplier and user provide an additonal field for storing the international bank account number.
|
use_iban: When enabled, supplier and user provide an additonal field for storing the international bank account number.
|
||||||
use_nick: Show and use nicknames instead of real names. When enabling this, please check that each user has a nickname.
|
use_nick: Show and use nicknames instead of real names. When enabling this, please check that each user has a nickname.
|
||||||
|
use_self_service: When enabled, members are able to use selected balancing functions on their own.
|
||||||
webstats_tracking_code: Tracking code for web analytics (like Piwik or Google analytics). Leave empty for no tracking.
|
webstats_tracking_code: Tracking code for web analytics (like Piwik or Google analytics). Leave empty for no tracking.
|
||||||
keys:
|
keys:
|
||||||
applepear_url: Apple system help URL
|
applepear_url: Apple system help URL
|
||||||
|
@ -660,6 +661,7 @@ en:
|
||||||
use_boxfill: Box-fill phase
|
use_boxfill: Box-fill phase
|
||||||
use_iban: Use IBAN
|
use_iban: Use IBAN
|
||||||
use_nick: Use nicknames
|
use_nick: Use nicknames
|
||||||
|
use_self_service: Use self service
|
||||||
webstats_tracking_code: Tracking code
|
webstats_tracking_code: Tracking code
|
||||||
tabs:
|
tabs:
|
||||||
applications: Apps
|
applications: Apps
|
||||||
|
|
|
@ -90,7 +90,7 @@ paths:
|
||||||
security:
|
security:
|
||||||
- foodsoft_auth: ['finance:user']
|
- foodsoft_auth: ['finance:user']
|
||||||
post:
|
post:
|
||||||
summary: create new financial transaction
|
summary: create new financial transaction (requires enabled self service)
|
||||||
tags:
|
tags:
|
||||||
- 1. User
|
- 1. User
|
||||||
- 6. FinancialTransaction
|
- 6. FinancialTransaction
|
||||||
|
@ -114,7 +114,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/Error401'
|
$ref: '#/definitions/Error401'
|
||||||
403:
|
403:
|
||||||
description: user has no ordergroup, is below minimum balance, or missing scope
|
description: user has no ordergroup, is below minimum balance, self service is disabled, or missing scope
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/Error403'
|
$ref: '#/definitions/Error403'
|
||||||
404:
|
404:
|
||||||
|
|
|
@ -50,7 +50,6 @@ describe 'API v1', type: :apivore, order: :defined do
|
||||||
|
|
||||||
let(:create_params) { {'_data' => {financial_transaction: {amount: 1, financial_transaction_type_id: ft_1.financial_transaction_type.id, note: 'note'}}} }
|
let(:create_params) { {'_data' => {financial_transaction: {amount: 1, financial_transaction_type_id: ft_1.financial_transaction_type.id, note: 'note'}}} }
|
||||||
|
|
||||||
|
|
||||||
context 'without using self service' do
|
context 'without using self service' do
|
||||||
it { is_expected.to validate(:post, '/user/financial_transactions', 403, api_auth(create_params)) }
|
it { is_expected.to validate(:post, '/user/financial_transactions', 403, api_auth(create_params)) }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue