mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 10:47:00 +00:00 
			
		
		
		
	Can edit rule group #794
This commit is contained in:
		| @@ -166,10 +166,13 @@ class RuleController extends Controller | ||||
|      */ | ||||
|     public function edit(Request $request, RuleRepositoryInterface $repository, Rule $rule) | ||||
|     { | ||||
|         $oldTriggers  = $this->getCurrentTriggers($rule); | ||||
|         $triggerCount = count($oldTriggers); | ||||
|         $oldActions   = $this->getCurrentActions($rule); | ||||
|         $actionCount  = count($oldActions); | ||||
|         /** @var RuleGroupRepositoryInterface $ruleGroupRepository */ | ||||
|         $ruleGroupRepository = app(RuleGroupRepositoryInterface::class); | ||||
|         $oldTriggers         = $this->getCurrentTriggers($rule); | ||||
|         $triggerCount        = count($oldTriggers); | ||||
|         $oldActions          = $this->getCurrentActions($rule); | ||||
|         $actionCount         = count($oldActions); | ||||
|         $ruleGroups          = ExpandedForm::makeSelectList($ruleGroupRepository->get()); | ||||
|  | ||||
|         // has old input? | ||||
|         if ($request->old()) { | ||||
| @@ -191,7 +194,8 @@ class RuleController extends Controller | ||||
|         Session::flash('gaEventCategory', 'rules'); | ||||
|         Session::flash('gaEventAction', 'edit-rule'); | ||||
|  | ||||
|         return view('rules.rule.edit', compact('rule', 'subTitle', 'primaryTrigger', 'oldTriggers', 'oldActions', 'triggerCount', 'actionCount')); | ||||
|         return view('rules.rule.edit', compact('rule', 'subTitle', | ||||
|                                                'primaryTrigger', 'oldTriggers', 'oldActions', 'triggerCount', 'actionCount','ruleGroups')); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -39,6 +39,7 @@ class RuleFormRequest extends Request | ||||
|     { | ||||
|         return [ | ||||
|             'title'               => $this->string('title'), | ||||
|             'rule_group_id'       => $this->integer('rule_group_id'), | ||||
|             'active'              => $this->boolean('active'), | ||||
|             'trigger'             => $this->string('trigger'), | ||||
|             'description'         => $this->string('description'), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user