mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-01 13:09:35 -06:00
This commit is contained in:
parent
3ee100e71e
commit
70767678ba
@ -53,6 +53,7 @@ class UpdateRequest extends FormRequest
|
|||||||
'strict' => ['strict', 'boolean'],
|
'strict' => ['strict', 'boolean'],
|
||||||
'stop_processing' => ['stop_processing', 'boolean'],
|
'stop_processing' => ['stop_processing', 'boolean'],
|
||||||
'active' => ['active', 'boolean'],
|
'active' => ['active', 'boolean'],
|
||||||
|
'order' => ['order', 'integer'],
|
||||||
];
|
];
|
||||||
|
|
||||||
$return = $this->getAllData($fields);
|
$return = $this->getAllData($fields);
|
||||||
@ -150,6 +151,7 @@ class UpdateRequest extends FormRequest
|
|||||||
'strict' => [new IsBoolean],
|
'strict' => [new IsBoolean],
|
||||||
'stop_processing' => [new IsBoolean],
|
'stop_processing' => [new IsBoolean],
|
||||||
'active' => [new IsBoolean],
|
'active' => [new IsBoolean],
|
||||||
|
'order' => 'numeric|between:1,1337',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -466,6 +466,15 @@ class RuleRepository implements RuleRepositoryInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$rule->save();
|
$rule->save();
|
||||||
|
$rule->refresh();
|
||||||
|
$group = $rule->ruleGroup;
|
||||||
|
// update the order:
|
||||||
|
$this->resetRuleOrder($group);
|
||||||
|
if (array_key_exists('order', $data)) {
|
||||||
|
$this->moveRule($rule, $group, (int)$data['order']);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// update the triggers:
|
// update the triggers:
|
||||||
if (array_key_exists('trigger', $data) && 'update-journal' === $data['trigger']) {
|
if (array_key_exists('trigger', $data) && 'update-journal' === $data['trigger']) {
|
||||||
$this->setRuleTrigger('update-journal', $rule);
|
$this->setRuleTrigger('update-journal', $rule);
|
||||||
|
Loading…
Reference in New Issue
Block a user