Fix edit screen.

Signed-off-by: James Cole <thegrumpydictator@gmail.com>
This commit is contained in:
James Cole
2016-10-22 11:53:34 +02:00
parent 0d87f7c4ca
commit a147e9b74a

View File

@@ -157,6 +157,7 @@ class PiggyBankController extends Controller
$subTitle = trans('firefly.update_piggy_title', ['name' => $piggyBank->name]); $subTitle = trans('firefly.update_piggy_title', ['name' => $piggyBank->name]);
$subTitleIcon = 'fa-pencil'; $subTitleIcon = 'fa-pencil';
$targetDate = null; $targetDate = null;
$note = $piggyBank->notes()->first();
/* /*
* Flash some data to fill the form. * Flash some data to fill the form.
*/ */
@@ -168,7 +169,7 @@ class PiggyBankController extends Controller
'account_id' => $piggyBank->account_id, 'account_id' => $piggyBank->account_id,
'targetamount' => $piggyBank->targetamount, 'targetamount' => $piggyBank->targetamount,
'targetdate' => $targetDate, 'targetdate' => $targetDate,
'note' => $piggyBank->notes()->first()->text, 'note' => is_null($note) ? '' : $note->text,
]; ];
Session::flash('preFilled', $preFilled); Session::flash('preFilled', $preFilled);
Session::flash('gaEventCategory', 'piggy-banks'); Session::flash('gaEventCategory', 'piggy-banks');