mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-10 12:24:50 +00:00
Clean up some code.
This commit is contained in:
@@ -428,7 +428,7 @@ return [
|
||||
'transfers' => 'fa-exchange',
|
||||
],
|
||||
|
||||
'bindables' => [
|
||||
'bindables' => [
|
||||
// models
|
||||
'account' => Account::class,
|
||||
'attachment' => Attachment::class,
|
||||
@@ -486,7 +486,7 @@ return [
|
||||
'userGroupBill' => UserGroupBill::class,
|
||||
'userGroup' => UserGroup::class,
|
||||
],
|
||||
'rule-actions' => [
|
||||
'rule-actions' => [
|
||||
'set_category' => SetCategory::class,
|
||||
'clear_category' => ClearCategory::class,
|
||||
'set_budget' => SetBudget::class,
|
||||
@@ -520,7 +520,7 @@ return [
|
||||
// 'set_foreign_amount' => SetForeignAmount::class,
|
||||
// 'set_foreign_currency' => SetForeignCurrency::class,
|
||||
],
|
||||
'context-rule-actions' => [
|
||||
'context-rule-actions' => [
|
||||
'set_category',
|
||||
'set_budget',
|
||||
'add_tag',
|
||||
@@ -539,16 +539,16 @@ return [
|
||||
'convert_transfer',
|
||||
],
|
||||
|
||||
'test-triggers' => [
|
||||
'test-triggers' => [
|
||||
'limit' => 10,
|
||||
'range' => 200,
|
||||
],
|
||||
|
||||
// expected source types for each transaction type, in order of preference.
|
||||
'expected_source_types' => [
|
||||
'expected_source_types' => [
|
||||
'source' => [
|
||||
TransactionTypeEnum::WITHDRAWAL->value => [AccountTypeEnum::ASSET->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value],
|
||||
TransactionTypeEnum::DEPOSIT->value => [AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value, AccountTypeEnum::REVENUE->value, AccountTypeEnum::CASH->value],
|
||||
TransactionTypeEnum::DEPOSIT->value => [AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value, AccountTypeEnum::REVENUE->value, AccountTypeEnum::CASH->value],
|
||||
TransactionTypeEnum::TRANSFER->value => [AccountTypeEnum::ASSET->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value],
|
||||
TransactionTypeEnum::OPENING_BALANCE->value => [
|
||||
AccountTypeEnum::INITIAL_BALANCE->value,
|
||||
@@ -560,7 +560,7 @@ return [
|
||||
TransactionTypeEnum::RECONCILIATION->value => [AccountTypeEnum::RECONCILIATION->value, AccountTypeEnum::ASSET->value],
|
||||
TransactionTypeEnum::LIABILITY_CREDIT->value => [AccountTypeEnum::LIABILITY_CREDIT->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value],
|
||||
// in case no transaction type is known yet, it could be anything.
|
||||
'none' => [
|
||||
'none' => [
|
||||
AccountTypeEnum::ASSET->value,
|
||||
AccountTypeEnum::EXPENSE->value,
|
||||
AccountTypeEnum::REVENUE->value,
|
||||
@@ -577,7 +577,7 @@ return [
|
||||
AccountTypeEnum::EXPENSE->value,
|
||||
AccountTypeEnum::CASH->value,
|
||||
],
|
||||
TransactionTypeEnum::DEPOSIT->value => [AccountTypeEnum::ASSET->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value],
|
||||
TransactionTypeEnum::DEPOSIT->value => [AccountTypeEnum::ASSET->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value],
|
||||
TransactionTypeEnum::TRANSFER->value => [AccountTypeEnum::ASSET->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value],
|
||||
TransactionTypeEnum::OPENING_BALANCE->value => [
|
||||
AccountTypeEnum::INITIAL_BALANCE->value,
|
||||
@@ -590,7 +590,7 @@ return [
|
||||
TransactionTypeEnum::LIABILITY_CREDIT->value => [AccountTypeEnum::LIABILITY_CREDIT->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value],
|
||||
],
|
||||
],
|
||||
'allowed_opposing_types' => [
|
||||
'allowed_opposing_types' => [
|
||||
'source' => [
|
||||
AccountTypeEnum::ASSET->value => [
|
||||
AccountTypeEnum::ASSET->value,
|
||||
@@ -680,7 +680,7 @@ return [
|
||||
],
|
||||
],
|
||||
// depending on the account type, return the allowed transaction types:
|
||||
'allowed_transaction_types' => [
|
||||
'allowed_transaction_types' => [
|
||||
'source' => [
|
||||
AccountTypeEnum::ASSET->value => [
|
||||
TransactionTypeEnum::WITHDRAWAL->value,
|
||||
@@ -749,7 +749,7 @@ return [
|
||||
],
|
||||
|
||||
// having the source + dest will tell you the transaction type.
|
||||
'account_to_transaction' => [
|
||||
'account_to_transaction' => [
|
||||
AccountTypeEnum::ASSET->value => [
|
||||
AccountTypeEnum::ASSET->value => TransactionTypeEnum::TRANSFER->value,
|
||||
AccountTypeEnum::CASH->value => TransactionTypeEnum::WITHDRAWAL->value,
|
||||
@@ -814,14 +814,14 @@ return [
|
||||
],
|
||||
|
||||
// allowed source -> destination accounts.
|
||||
'source_dests' => [
|
||||
'source_dests' => [
|
||||
TransactionTypeEnum::WITHDRAWAL->value => [
|
||||
AccountTypeEnum::ASSET->value => [AccountTypeEnum::EXPENSE->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value, AccountTypeEnum::CASH->value],
|
||||
AccountTypeEnum::LOAN->value => [AccountTypeEnum::EXPENSE->value, AccountTypeEnum::CASH->value],
|
||||
AccountTypeEnum::DEBT->value => [AccountTypeEnum::EXPENSE->value, AccountTypeEnum::CASH->value],
|
||||
AccountTypeEnum::MORTGAGE->value => [AccountTypeEnum::EXPENSE->value, AccountTypeEnum::CASH->value],
|
||||
],
|
||||
TransactionTypeEnum::DEPOSIT->value => [
|
||||
TransactionTypeEnum::DEPOSIT->value => [
|
||||
AccountTypeEnum::REVENUE->value => [AccountTypeEnum::ASSET->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value],
|
||||
AccountTypeEnum::CASH->value => [AccountTypeEnum::ASSET->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value],
|
||||
AccountTypeEnum::LOAN->value => [AccountTypeEnum::ASSET->value],
|
||||
@@ -853,7 +853,7 @@ return [
|
||||
],
|
||||
],
|
||||
// if you add fields to this array, don't forget to update the export routine (ExportDataGenerator).
|
||||
'journal_meta_fields' => [
|
||||
'journal_meta_fields' => [
|
||||
// sepa
|
||||
'sepa_cc',
|
||||
'sepa_ct_op',
|
||||
@@ -887,31 +887,31 @@ return [
|
||||
'recurrence_count',
|
||||
'recurrence_date',
|
||||
],
|
||||
'webhooks' => [
|
||||
'webhooks' => [
|
||||
'max_attempts' => env('WEBHOOK_MAX_ATTEMPTS', 3),
|
||||
],
|
||||
'can_have_virtual_amounts' => [AccountTypeEnum::ASSET->value],
|
||||
'can_have_opening_balance' => [AccountTypeEnum::ASSET->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value],
|
||||
'dynamic_creation_allowed' => [
|
||||
'can_have_virtual_amounts' => [AccountTypeEnum::ASSET->value],
|
||||
'can_have_opening_balance' => [AccountTypeEnum::ASSET->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value],
|
||||
'dynamic_creation_allowed' => [
|
||||
AccountTypeEnum::EXPENSE->value,
|
||||
AccountTypeEnum::REVENUE->value,
|
||||
AccountTypeEnum::INITIAL_BALANCE->value,
|
||||
AccountTypeEnum::RECONCILIATION->value,
|
||||
AccountTypeEnum::LIABILITY_CREDIT->value,
|
||||
],
|
||||
'valid_asset_fields' => ['account_role', 'account_number', 'currency_id', 'BIC', 'include_net_worth'],
|
||||
'valid_cc_fields' => ['account_role', 'cc_monthly_payment_date', 'cc_type', 'account_number', 'currency_id', 'BIC', 'include_net_worth'],
|
||||
'valid_account_fields' => ['account_number', 'currency_id', 'BIC', 'interest', 'interest_period', 'include_net_worth', 'liability_direction'],
|
||||
'valid_asset_fields' => ['account_role', 'account_number', 'currency_id', 'BIC', 'include_net_worth'],
|
||||
'valid_cc_fields' => ['account_role', 'cc_monthly_payment_date', 'cc_type', 'account_number', 'currency_id', 'BIC', 'include_net_worth'],
|
||||
'valid_account_fields' => ['account_number', 'currency_id', 'BIC', 'interest', 'interest_period', 'include_net_worth', 'liability_direction'],
|
||||
|
||||
// dynamic date ranges are as follows:
|
||||
'dynamic_date_ranges' => ['last7', 'last30', 'last90', 'last365', 'MTD', 'QTD', 'YTD'],
|
||||
'dynamic_date_ranges' => ['last7', 'last30', 'last90', 'last365', 'MTD', 'QTD', 'YTD'],
|
||||
|
||||
// only used in v1
|
||||
'allowed_sort_parameters' => ['order', 'name', 'iban'],
|
||||
'allowed_sort_parameters' => ['order', 'name', 'iban'],
|
||||
|
||||
// preselected account lists possibilities:
|
||||
'preselected_accounts' => ['all', 'assets', 'liabilities'],
|
||||
'preselected_accounts' => ['all', 'assets', 'liabilities'],
|
||||
|
||||
// allowed to store a piggy bank in:
|
||||
'piggy_bank_account_types' => [AccountTypeEnum::ASSET->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value],
|
||||
'piggy_bank_account_types' => [AccountTypeEnum::ASSET->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value],
|
||||
];
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* notifications.php
|
||||
* Copyright (c) 2024 james@firefly-iii.org.
|
||||
@@ -20,14 +21,15 @@
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'channels' => [
|
||||
'email' => ['enabled' => true, 'ui_configurable' => 0,],
|
||||
'slack' => ['enabled' => true, 'ui_configurable' => 1,],
|
||||
'ntfy' => ['enabled' => true, 'ui_configurable' => 1,],
|
||||
'pushover' => ['enabled' => true, 'ui_configurable' => 1,],
|
||||
'gotify' => ['enabled' => false, 'ui_configurable' => 0,],
|
||||
'pushbullet' => ['enabled' => false, 'ui_configurable' => 0,],
|
||||
'email' => ['enabled' => true, 'ui_configurable' => 0],
|
||||
'slack' => ['enabled' => true, 'ui_configurable' => 1],
|
||||
'ntfy' => ['enabled' => true, 'ui_configurable' => 1],
|
||||
'pushover' => ['enabled' => true, 'ui_configurable' => 1],
|
||||
'gotify' => ['enabled' => false, 'ui_configurable' => 0],
|
||||
'pushbullet' => ['enabled' => false, 'ui_configurable' => 0],
|
||||
],
|
||||
'notifications' => [
|
||||
'user' => [
|
||||
@@ -49,13 +51,13 @@ return [
|
||||
'new_backup_codes' => ['enabled' => true, 'configurable' => false],
|
||||
],
|
||||
'owner' => [
|
||||
//'invitation_created' => ['enabled' => true],
|
||||
// 'invitation_created' => ['enabled' => true],
|
||||
// 'some_notification' => ['enabled' => true],
|
||||
'admin_new_reg' => ['enabled' => true],
|
||||
'user_new_reg' => ['enabled' => true],
|
||||
'new_version' => ['enabled' => true],
|
||||
'invite_created' => ['enabled' => true],
|
||||
'invite_redeemed' => ['enabled' => true],
|
||||
'admin_new_reg' => ['enabled' => true],
|
||||
'user_new_reg' => ['enabled' => true],
|
||||
'new_version' => ['enabled' => true],
|
||||
'invite_created' => ['enabled' => true],
|
||||
'invite_redeemed' => ['enabled' => true],
|
||||
'unknown_user_attempt' => ['enabled' => true],
|
||||
],
|
||||
],
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
// config for Wijourdil/NtfyNotificationChannel
|
||||
return [
|
||||
|
||||
'server' => 'https://ntfy.sh',
|
||||
'topic' => '',
|
||||
'server' => 'https://ntfy.sh',
|
||||
'topic' => '',
|
||||
'authentication' => [
|
||||
'enabled' => false,
|
||||
'enabled' => false,
|
||||
'username' => '',
|
||||
'password' => '',
|
||||
],
|
||||
|
||||
@@ -61,8 +61,8 @@ return [
|
||||
'mandrill' => [
|
||||
'secret' => env('MANDRILL_SECRET'),
|
||||
],
|
||||
'pushover' => [
|
||||
'token' => 'fake_token',
|
||||
'pushover' => [
|
||||
'token' => 'fake_token',
|
||||
'user_token' => 'fake_token',
|
||||
],
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user