fix: Custom fields delete bug — usunięcie wszystkich pól produktu nie działało
Dodano hidden marker custom_field_name_present w formularzu edycji produktu.
Zmieniono warunek w ProductRepository z array_key_exists('custom_field_name')
na array_key_exists('custom_field_name_present') — jQuery .serialize() pomijał
klucz pustej tablicy gdy wszystkie pola usunięte. Test jednostkowy dodany.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
14
.paul/changelog/2026-04-16.md
Normal file
14
.paul/changelog/2026-04-16.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# 2026-04-16
|
||||
|
||||
## Co zrobiono
|
||||
|
||||
- [Phase 14, Plan 01] Fix: usunięcie wszystkich dodatkowych pól produktu nie działało
|
||||
- Dodano hidden marker `custom_field_name_present` w formularzu edycji produktu
|
||||
- Zmieniono warunek w ProductRepository na sprawdzanie markera zamiast obecności tablicy pól
|
||||
- Dodano test jednostkowy testSaveCustomFieldsDeletesAllWhenEmpty
|
||||
|
||||
## Zmienione pliki
|
||||
|
||||
- `autoload/admin/Controllers/ShopProductController.php`
|
||||
- `autoload/Domain/Product/ProductRepository.php`
|
||||
- `tests/Unit/Domain/Product/ProductRepositoryTest.php`
|
||||
Reference in New Issue
Block a user