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