mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
Fix help for transaction thing.
This commit is contained in:
@@ -63,12 +63,11 @@ class CreateController extends Controller
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function create()
|
||||
public function create(?string $objectType)
|
||||
{
|
||||
/** @var AccountRepositoryInterface $repository */
|
||||
$repository = app(AccountRepositoryInterface::class);
|
||||
$cash = $repository->getCashAccount();
|
||||
$objectType = TransactionType::WITHDRAWAL;
|
||||
$preFilled = session()->has('preFilled') ? session('preFilled') : [];
|
||||
$subTitle = (string)trans('breadcrumbs.create_new_transaction');
|
||||
$subTitleIcon = 'fa-plus';
|
||||
|
@@ -167,6 +167,8 @@ trait RequestInformation
|
||||
$page = $this->getPageName();
|
||||
$specificPage = $this->getSpecificPageName();
|
||||
|
||||
|
||||
|
||||
// indicator if user has seen the help for this page ( + special page):
|
||||
$key = sprintf('shown_demo_%s%s', $page, $specificPage);
|
||||
// is there an intro for this route?
|
||||
|
@@ -40,15 +40,30 @@ return [
|
||||
'accounts_create' => [
|
||||
'iban' => ['element' => '#ffInput_iban'],
|
||||
],
|
||||
|
||||
// transactions: create
|
||||
'transactions_create' => [
|
||||
'transactions_create_withdrawal' => [
|
||||
'source' => ['element' => 'input[name="source[]"]'],
|
||||
'destination' => ['element' => 'input[name="destination[]"]'],
|
||||
'foreign_currency' => ['element' => 'select[name="foreign_currency[]"]'],
|
||||
'more_meta' => ['element' => 'input[name="category[]"]'],
|
||||
'split_add' => ['element' => '.split_add_btn'],
|
||||
],
|
||||
|
||||
'transactions_create_deposit' => [
|
||||
'source' => ['element' => 'input[name="source[]"]'],
|
||||
'destination' => ['element' => 'input[name="destination[]"]'],
|
||||
'foreign_currency' => ['element' => 'select[name="foreign_currency[]"]'],
|
||||
'more_meta' => ['element' => 'input[name="category[]"]'],
|
||||
'split_add' => ['element' => '.split_add_btn'],
|
||||
],
|
||||
|
||||
'transactions_create_transfer' => [
|
||||
'source' => ['element' => 'input[name="source[]"]'],
|
||||
'destination' => ['element' => 'input[name="destination[]"]'],
|
||||
'foreign_currency' => ['element' => 'select[name="foreign_currency[]"]'],
|
||||
'more_meta' => ['element' => 'input[name="category[]"]'],
|
||||
'split_add' => ['element' => '.split_add_btn'],
|
||||
],
|
||||
|
||||
// extra text for asset account creation.
|
||||
'accounts_create_asset' => [
|
||||
|
@@ -32,6 +32,27 @@ return [
|
||||
'index_sidebar-toggle' => 'To create new transactions, accounts or other things, use the menu under this icon.',
|
||||
'index_cash_account' => 'These are the accounts created so far. You can use the cash account to track cash expenses but it\'s not mandatory of course.',
|
||||
|
||||
// transactions (withdrawal)
|
||||
'transactions_create_withdrawal_source' => 'Select your favorite asset account or liability from this dropdown.',
|
||||
'transactions_create_withdrawal_destination' => 'Select an expense account here. Leave it empty if you want to make a cash expense.',
|
||||
'transactions_create_withdrawal_foreign_currency' => 'Use this field to set a foreign currency and amount.',
|
||||
'transactions_create_withdrawal_more_meta' => 'Plenty of other meta data you set in these fields.',
|
||||
'transactions_create_withdrawal_split_add' => 'If you want to split a transaction, add more splits with this button',
|
||||
|
||||
// transactions (deposit)
|
||||
'transactions_create_deposit_source' => 'Select or type the payee in this auto-completing dropdown/textbox. Leave it empty if you want to make a cash deposit.',
|
||||
'transactions_create_deposit_destination' => 'Select an asset or liability account here.',
|
||||
'transactions_create_deposit_foreign_currency' => 'Use this field to set a foreign currency and amount.',
|
||||
'transactions_create_deposit_more_meta' => 'Plenty of other meta data you set in these fields.',
|
||||
'transactions_create_deposit_split_add' => 'If you want to split a transaction, add more splits with this button',
|
||||
|
||||
// transactions (transfer)
|
||||
'transactions_create_transfer_source' => 'Select the source asset account here.',
|
||||
'transactions_create_transfer_destination' => 'Select the destination asset account here.',
|
||||
'transactions_create_transfer_foreign_currency' => 'Use this field to set a foreign currency and amount.',
|
||||
'transactions_create_transfer_more_meta' => 'Plenty of other meta data you set in these fields.',
|
||||
'transactions_create_transfer_split_add' => 'If you want to split a transaction, add more splits with this button',
|
||||
|
||||
// create account:
|
||||
'accounts_create_iban' => 'Give your accounts a valid IBAN. This could make a data import very easy in the future.',
|
||||
'accounts_create_asset_opening_balance' => 'Assets accounts may have an "opening balance", indicating the start of this account\'s history in Firefly III.',
|
||||
|
@@ -81,7 +81,7 @@
|
||||
<div class="btn-group" role="group" aria-label="...">
|
||||
|
||||
<div class="btn-group" role="group">
|
||||
<a href="{{ route('transactions.create') }}" class="btn btn-success"><i
|
||||
<a href="{{ route('transactions.create', ['withdrawal']) }}" class="btn btn-success"><i
|
||||
class="fa fa-plus fa-fw"></i> {{ 'create_new_transaction'|_ }}</a>
|
||||
</div>
|
||||
<a class="btn btn-default"
|
||||
|
@@ -4,11 +4,29 @@
|
||||
<h3 class="control-sidebar-heading">{{ 'create_new_stuff'|_ }}</h3>
|
||||
<ul class='control-sidebar-menu'>
|
||||
<li>
|
||||
<a href="{{ route('transactions.create') }}">
|
||||
<a href="{{ route('transactions.create', 'withdrawal') }}">
|
||||
<i class="menu-icon fa fa-long-arrow-left bg-red"></i>
|
||||
|
||||
<div class="menu-info">
|
||||
<h4 class="control-sidebar-subheading">{{ 'new_transaction'|_ }}</h4>
|
||||
<h4 class="control-sidebar-subheading">{{ 'new_withdrawal'|_ }}</h4>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('transactions.create', 'deposit') }}">
|
||||
<i class="menu-icon fa fa-long-arrow-right bg-green"></i>
|
||||
|
||||
<div class="menu-info">
|
||||
<h4 class="control-sidebar-subheading">{{ 'new_deposit'|_ }}</h4>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('transactions.create', 'transfer') }}">
|
||||
<i class="menu-icon fa fa-exchange bg-blue"></i>
|
||||
|
||||
<div class="menu-info">
|
||||
<h4 class="control-sidebar-subheading">{{ 'new_transfer'|_ }}</h4>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
@@ -24,7 +24,7 @@
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<div style="padding:8px;">
|
||||
<a href="{{ route('transactions.create') }}" class="btn btn-success"><i class="fa fa-plus fa-fw"></i> {{ 'create_new_transaction'|_ }}</a>
|
||||
<a href="{{ route('transactions.create', ['withdrawal']) }}" class="btn btn-success"><i class="fa fa-plus fa-fw"></i> {{ 'create_new_transaction'|_ }}</a>
|
||||
</div>
|
||||
{# actual list #}
|
||||
{% include 'list.groups' %}
|
||||
|
@@ -874,7 +874,7 @@ Route::group(
|
||||
);
|
||||
|
||||
// create group:
|
||||
Route::get('create', ['uses' => 'Transaction\CreateController@create', 'as' => 'create']);
|
||||
Route::get('create/{objectType}', ['uses' => 'Transaction\CreateController@create', 'as' => 'create']);
|
||||
Route::post('store', ['uses' => 'Transaction\CreateController@store', 'as' => 'store']);
|
||||
|
||||
// edit group
|
||||
|
Reference in New Issue
Block a user