22 lines
791 B
Markdown
22 lines
791 B
Markdown
---
|
|
phase: 58-automation-form-preserve
|
|
plan: 01
|
|
status: complete
|
|
completed: 2026-03-30
|
|
---
|
|
|
|
## Summary
|
|
|
|
Zachowanie danych formularza automatyzacji po bledzie walidacji — re-render z danymi z request zamiast redirect.
|
|
|
|
## What Was Built
|
|
|
|
- `AutomationController::buildRuleFromRequest()` — buduje $rule z POST data (conditions, actions, name, event_type, is_active)
|
|
- `renderForm()` z parametrem $errorMessage — priorytet nad Flash
|
|
- `store()` i `update()` — re-render zamiast redirect przy bledzie walidacji i DB error
|
|
- form.php: $isEdit oparty na isset($rule['id']), conditions/actions wyciagane z $rule niezaleznie
|
|
|
|
## Deviations
|
|
|
|
- Zmiana w form.php (poza boundaries) — konieczna aby $isEdit poprawnie rozroznial nowy formularz od edycji gdy $rule jest ustawione z request data
|