feat: Add Transport module with repository, controller, and views

- Implemented TransportRepository for managing transport data with methods for listing, finding, saving, and retrieving transport costs.
- Created ShopTransportController to handle transport-related actions, including listing, editing, and saving transports.
- Added views for transport management: transports list and transport edit forms.
- Introduced JavaScript for responsive tabs in transport edit view.
- Updated testing suite with comprehensive unit tests for TransportRepository and ShopTransportController.
- Increased test coverage with new assertions and scenarios for transport functionalities.
This commit is contained in:
2026-02-14 20:16:18 +01:00
parent 818cd7f2c0
commit 7468dd0d3f
20 changed files with 1215 additions and 377 deletions

View File

@@ -36,7 +36,7 @@ Alternatywnie (Git Bash):
Ostatnio zweryfikowano: 2026-02-14
```text
OK (280 tests, 828 assertions)
OK (300 tests, 895 assertions)
```
## Struktura testow
@@ -57,6 +57,7 @@ tests/
| | |-- Promotion/PromotionRepositoryTest.php
| | |-- Settings/SettingsRepositoryTest.php
| | |-- ShopStatus/ShopStatusRepositoryTest.php
| | |-- Transport/TransportRepositoryTest.php
| | `-- User/UserRepositoryTest.php
| `-- admin/
| `-- Controllers/
@@ -69,6 +70,7 @@ tests/
| |-- ShopPaymentMethodControllerTest.php
| |-- ShopPromotionControllerTest.php
| |-- ShopStatusesControllerTest.php
| |-- ShopTransportControllerTest.php
| `-- UsersControllerTest.php
`-- Integration/
```
@@ -351,3 +353,25 @@ OK (254 tests, 736 assertions)
Nowe testy dodane 2026-02-14:
- `tests/Unit/Domain/ShopStatus/ShopStatusRepositoryTest.php` (9 testow: find z ID=0, find null apilo, save update, save z ID=0, empty apilo sets null, reject negative ID, getApiloStatusId, getByIntegrationStatusId, allStatuses, whitelist sortowania)
- `tests/Unit/admin/Controllers/ShopStatusesControllerTest.php` (5 testow: kontrakty metod, brak aliasow legacy, return types, DI konstruktora)
## Aktualizacja suite (ShopPaymentMethod refactor, ver. 0.268)
Ostatnio zweryfikowano: 2026-02-14
```text
OK (280 tests, 828 assertions)
```
Nowe testy dodane 2026-02-14:
- `tests/Unit/Domain/PaymentMethod/PaymentMethodRepositoryTest.php` (14 testow: find invalid/null/normalize, save update/null/non-numeric apilo, listForAdmin whitelist, allActive, allForAdmin, findActiveById, isActive, getApiloPaymentTypeId, forTransport)
- `tests/Unit/admin/Controllers/ShopPaymentMethodControllerTest.php` (5 testow: kontrakty metod, brak aliasow legacy, return types, DI konstruktora)
## Aktualizacja suite (ShopTransport refactor, ver. 0.269)
Ostatnio zweryfikowano: 2026-02-14
```text
OK (300 tests, 895 assertions)
```
Nowe testy dodane 2026-02-14:
- `tests/Unit/Domain/Transport/TransportRepositoryTest.php` (14 testow: find invalid/null/normalize/nullables, save insert/update/failure/default reset/switch normalization, listForAdmin whitelist, allActive, getApiloCarrierAccountId, getTransportCost, allForAdmin)
- `tests/Unit/admin/Controllers/ShopTransportControllerTest.php` (5 testow: kontrakty metod, brak aliasow legacy, return types, DI konstruktora z 2 repo)