mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
Some code cleanup.
This commit is contained in:
@@ -214,7 +214,7 @@ class RuleController extends Controller
|
||||
$repository->reorderRuleActions($rule, $ids);
|
||||
}
|
||||
|
||||
return Response::json(true);
|
||||
return Response::json('true');
|
||||
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ class RuleController extends Controller
|
||||
$repository->reorderRuleTriggers($rule, $ids);
|
||||
}
|
||||
|
||||
return Response::json(true);
|
||||
return Response::json('true');
|
||||
|
||||
}
|
||||
|
||||
@@ -446,21 +446,21 @@ class RuleController extends Controller
|
||||
{
|
||||
$newIndex = 0;
|
||||
$actions = [];
|
||||
if (is_array(Input::old('rule-action'))) {
|
||||
foreach (Input::old('rule-action') as $index => $entry) {
|
||||
$count = ($newIndex + 1);
|
||||
$checked = isset(Input::old('rule-action-stop')[$index]) ? true : false;
|
||||
$actions[] = view(
|
||||
'rules.partials.action',
|
||||
[
|
||||
'oldTrigger' => $entry,
|
||||
'oldValue' => Input::old('rule-action-value')[$index],
|
||||
'oldChecked' => $checked,
|
||||
'count' => $count,
|
||||
]
|
||||
)->render();
|
||||
$newIndex++;
|
||||
}
|
||||
/** @var array $oldActions */
|
||||
$oldActions = is_array(Input::old('rule-action')) ? Input::old('rule-action') : [];
|
||||
foreach ($oldActions as $index => $entry) {
|
||||
$count = ($newIndex + 1);
|
||||
$checked = isset(Input::old('rule-action-stop')[$index]) ? true : false;
|
||||
$actions[] = view(
|
||||
'rules.partials.action',
|
||||
[
|
||||
'oldTrigger' => $entry,
|
||||
'oldValue' => Input::old('rule-action-value')[$index],
|
||||
'oldChecked' => $checked,
|
||||
'count' => $count,
|
||||
]
|
||||
)->render();
|
||||
$newIndex++;
|
||||
}
|
||||
|
||||
return $actions;
|
||||
@@ -473,21 +473,21 @@ class RuleController extends Controller
|
||||
{
|
||||
$newIndex = 0;
|
||||
$triggers = [];
|
||||
if (is_array(Input::old('rule-trigger'))) {
|
||||
foreach (Input::old('rule-trigger') as $index => $entry) {
|
||||
$count = ($newIndex + 1);
|
||||
$oldChecked = isset(Input::old('rule-trigger-stop')[$index]) ? true : false;
|
||||
$triggers[] = view(
|
||||
'rules.partials.trigger',
|
||||
[
|
||||
'oldTrigger' => $entry,
|
||||
'oldValue' => Input::old('rule-trigger-value')[$index],
|
||||
'oldChecked' => $oldChecked,
|
||||
'count' => $count,
|
||||
]
|
||||
)->render();
|
||||
$newIndex++;
|
||||
}
|
||||
/** @var array $oldTriggers */
|
||||
$oldTriggers = is_array(Input::old('rule-trigger')) ? Input::old('rule-trigger') : [];
|
||||
foreach ($oldTriggers as $index => $entry) {
|
||||
$count = ($newIndex + 1);
|
||||
$oldChecked = isset(Input::old('rule-trigger-stop')[$index]) ? true : false;
|
||||
$triggers[] = view(
|
||||
'rules.partials.trigger',
|
||||
[
|
||||
'oldTrigger' => $entry,
|
||||
'oldValue' => Input::old('rule-trigger-value')[$index],
|
||||
'oldChecked' => $oldChecked,
|
||||
'count' => $count,
|
||||
]
|
||||
)->render();
|
||||
$newIndex++;
|
||||
}
|
||||
|
||||
return $triggers;
|
||||
|
@@ -37,6 +37,8 @@ use Watson\Validating\ValidatingTrait;
|
||||
* @property string $endBalance
|
||||
* @property float $difference
|
||||
* @property Carbon $lastActivityDate
|
||||
* @property float $piggyBalance
|
||||
* @property float $percentage
|
||||
*/
|
||||
class Account extends Model
|
||||
{
|
||||
|
@@ -24,6 +24,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
* @property string $dateFormatted
|
||||
* @property float $spent
|
||||
* @property Carbon $lastActivity
|
||||
* @property string $type
|
||||
*/
|
||||
class Category extends Model
|
||||
{
|
||||
|
@@ -28,6 +28,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
* @property-read Collection|PiggyBankRepetition[] $piggyBankRepetitions
|
||||
* @property-read Collection|PiggyBankEvent[] $piggyBankEvents
|
||||
* @property string $reminder
|
||||
* @property PiggyBankRepetition $currentRep
|
||||
*/
|
||||
class PiggyBank extends Model
|
||||
{
|
||||
|
@@ -22,6 +22,8 @@ use Watson\Validating\ValidatingTrait;
|
||||
* @property-read TransactionJournal $transactionJournal
|
||||
* @method static Builder|Transaction after($date)
|
||||
* @method static Builder|Transaction before($date)
|
||||
* @property float $before
|
||||
* @property float $after
|
||||
*/
|
||||
class Transaction extends Model
|
||||
{
|
||||
|
@@ -56,6 +56,7 @@ use Watson\Validating\ValidatingTrait;
|
||||
* @method static Builder|TransactionJournal onDate($date)
|
||||
* @method static Builder|TransactionJournal transactionTypes($types)
|
||||
* @method static Builder|TransactionJournal withRelevantData()
|
||||
* @property string $type
|
||||
*/
|
||||
class TransactionJournal extends Model
|
||||
{
|
||||
|
Reference in New Issue
Block a user