Commit graph

84 commits

Author SHA1 Message Date
Jérémy Munsch
d9edcd7f6b
test(uuid): migrate test suite to UuidHelper and add missing describe blocks 2026-11-17 12:15:39 +01:00
Jérémy Munsch
d2a7afc020
Merge branch 'develop' into to-pvc-less
# Conflicts:
#	app/Services/EmployeeCsvReaderService.php
#	tests/Feature/App/Console/Commands/UpsertEmployeesFormFileTest.php
#	tests/Unit/App/Services/EmployeeCsvReaderServiceTest.php
2026-11-17 10:36:59 +01:00
Jérémy Munsch
3a1b34602c
fix(ImportEmployees): include matricule in error messages
fix(UpsertEmployeesFormFile): return failure on import errors

test(UpsertEmployeesFormFileTest): add tests for CSV import error handling

test(EmployeeCsvReaderServiceTest): validate error messages for invalid headers
2026-11-17 10:32:25 +01:00
Jérémy Munsch
df885e3805
test(EmployeeCsvReaderService): add tests for CSV import with different encodings
Added tests to verify employee import functionality from comma-delimited Windows-1252 and UTF-16LE BOM tab-delimited CSV files.
2026-11-17 10:25:21 +01:00
Jérémy Munsch
b6c5660d5e
feat(EmployeeCsvReaderService): refactor CSV reader creation
Updated the importEmployeesFromCsv method to use a dedicated createCsvReader method for better encoding handling and improved readability.
2026-11-17 09:49:03 +01:00
Jérémy Munsch
101d0ff018
feat(EmployeeCsvReaderService): refactor CSV reader creation
Updated the importEmployeesFromCsv method to use a dedicated createCsvReader method for better encoding handling and improved readability.
2026-11-17 09:46:05 +01:00
Jérémy Munsch
c58a2c8b23
feat(orders): add checkout lock, FAIL/PENDING isolation, and stale pending expiration 2026-11-16 20:05:35 +01:00
Jérémy Munsch
757f9aebaa
fix(casts): treat empty string as null in FilePathCast 2026-11-16 18:34:09 +01:00
Jérémy Munsch
14fd20c303
test(quality): resolve PHPStan level 10 errors in Feature tests and wrap long test lines 2026-11-16 16:29:17 +01:00
Jérémy Munsch
1b44f9d178
test(quality): resolve all PHPStan level 10 errors in Unit and Integration tests 2026-11-16 16:13:14 +01:00
Jérémy Munsch
c083d74032
test(phpstan): remove all 145 redundant Pest expectations 2026-11-16 15:43:10 +01:00
Jérémy Munsch
7ad5acebd3
test(requests): overhaul FO request tests and lock Architecture rules 2026-11-16 15:31:41 +01:00
Jérémy Munsch
1c304b78b2
test(decouple): remove expect(true)->toBeTrue() and move ProductPolicy INCO checks to WithApp 2026-11-16 15:12:42 +01:00
Jérémy Munsch
4f2b7ba0c0
test(tests): update ArcadiaIncoServiceTest for null safety
Refactor assertions to use null-safe operator and simplify instantiation of IncoNutriscore.
2026-11-16 15:07:53 +01:00
Jérémy Munsch
8a6b1442e6
test(tests): remove Reflection attribute/constructor hacks and pass-through InitializeOrderTunnel (lot 4A) 2026-11-16 15:01:17 +01:00
Jérémy Munsch
588a93cbcf
test(tests): add PSR-4 namespaces to Unit test files 2026-11-16 14:18:42 +01:00
Jérémy Munsch
3f4856efa2
test(tests): move Laravel-bound tests out of Unit and group Unit Cqs tests (lot 3B) 2026-11-16 13:02:15 +01:00
Jérémy Munsch
ec6e220138
test(tests): update Carbon usage in GetPickTimeSlotQueryTest and IcsGeneratorServiceTest
Refactor date handling to use CarbonImmutable for consistency in tests.
2026-11-16 12:54:30 +01:00
Jérémy Munsch
a2fd843398
test(tests): add unit tests for session-based basket repository
Added tests for the SessionBasketRepository to ensure correct behavior when finding, persisting, and deleting baskets in the session.
2026-11-16 12:53:27 +01:00
Jérémy Munsch
4c8280d932
test(tests): prune constructor-only DTO tests and consolidate contracts (lot 2C) 2026-11-16 12:50:19 +01:00
Jérémy Munsch
712d42ed96
test(tests): remove generic enum, exception string, and invariant-free input tests (lot 2B) 2026-11-16 12:47:36 +01:00
Jérémy Munsch
80d3478dbe
test(tests): merge unique assertions and remove strict duplicate test files (lot 2A) 2026-11-16 12:46:06 +01:00
Jérémy Munsch
875d6dd01d
test(tests): apply step 1 hygiene, clock reset, and explicit Arcadia policy skips 2026-11-16 12:39:21 +01:00
Jérémy Munsch
3d1c798c08
refactor(orders): split pending placement, non-transactional Regate SMTP export and final confirmation 2026-11-16 03:32:57 +01:00
Jérémy Munsch
3e4dfdad4e
feat(tunnel): detect basket price changes during order finalization 2026-11-16 03:10:25 +01:00
Jérémy Munsch
285f42c684
fix(shopper): evaluate employee calendar dates in Europe/Paris and document BO order cancel 2026-11-16 02:10:50 +01:00
Jérémy Munsch
550f2a11c8
fix(fo): use ProductWithPricingDto for product policy checks in FO views 2026-11-16 01:16:56 +01:00
Jérémy Munsch
3ff21bdd49
feat(orders): implement CancelOrder action with output handling
Added CancelOrder action to handle order cancellations with appropriate output responses.
2026-11-15 20:12:16 +01:00
Jérémy Munsch
6a599b9855
feat(ProductIncos): implement Associate and Sync actions with output handling
- Added AssociateProductIncoOutput and SyncProductIncoOutput classes to handle action results.
- Updated AssociateProductInco and SyncProductInco actions to return structured output instead of raw models.
- Enhanced error handling for API interactions in both actions.
- Refactored ProductIncosController to utilize new output structures for better response management.
- Introduced new enums for status handling in actions and queries.
- Added tests for new output handling and error scenarios in Associate and Sync actions.
2026-11-15 20:11:28 +01:00
Jérémy Munsch
0aa4b449b4
feat(orders): implement ApplyPickTimeSlot action and output handling
- Introduced ApplyPickTimeSlotOutput class for structured output.
- Updated ApplyPickTimeSlot action to return ApplyPickTimeSlotOutput.
- Added ApplyPickTimeSlotStatus enum for status representation.
- Modified TunnelController to handle new output structure.
- Enhanced tests for ApplyPickTimeSlot to validate new behavior.
2026-11-15 20:08:25 +01:00
Jérémy Munsch
8892a55322
feat(orders): implement CancelOrder action and output enum
Added CancelOrder action with output handling for order cancellation.
Introduced CancelOrderOutput enum to represent cancellation states.
Refactored ShopPolicy to simplify user checks in viewPickupTimeslots.
Updated tests to reflect changes in policy behavior.
2026-11-15 20:05:41 +01:00
Jérémy Munsch
4dd7cc82fe
feat(order): add InactiveShopperException handling in order finalization
- Introduced InactiveShopperException to manage inactive shopper scenarios.
- Updated FinalizeOrder and FinalizeOrderOutput to handle new exception.
- Enhanced TunnelController and tests to ensure proper redirection and error handling.
2026-11-15 19:59:17 +01:00
Jérémy Munsch
0ae05e031d
feat(jobs): enhance SendMissingOrderReminderJob with ICS content generation
- Added IcsGeneratorService for generating ICS content.
- Updated MissingOrderReminderNotification to include cutoff date and ICS content.
- Refactored SendMissingOrderReminderJob to utilize new ICS generation logic.
- Introduced IcsContent value object for better ICS content handling.
- Added tests for new functionality in SendMissingOrderReminderJob and IcsGeneratorService.
2026-11-15 19:49:48 +01:00
Jérémy Munsch
5197e796c0
test(casts): add tests for various cast classes
- Implement tests for DiscountValueCast to validate percentage and amount handling.
- Add tests for EmailCast to ensure proper email handling.
- Create tests for EmployeeSitesCast to validate JSON and array handling.
- Implement tests for MatriculeCast to validate matricule handling.
- Add tests for MoneyCast to ensure proper money handling.
- Create tests for NutritionalValuesCast to validate nutritional values handling.
- Implement tests for OrderEmployeeCast to validate employee data handling.
- Add tests for OrderLineProductCast to validate order line product handling.
- Create tests for OrderReferenceCast to validate order reference handling.
- Implement tests for ShopperEstablishmentCodeCast to validate establishment code handling.
- Add tests for ShopperServiceCodeCast to validate service code handling.
- Create tests for ShopperSiteCodeCast to validate site code handling.
2026-11-15 18:56:19 +01:00
Jérémy Munsch
5f6ccaa35d refactor(orders): rename App\Services\OrderService to OrderOwnershipService 2026-11-15 17:55:55 +01:00
Jérémy Munsch
bb23dae81e
perf(basket): eliminate N+1 queries and return BasketDto from GetBasketQuery 2026-11-15 16:59:45 +01:00
Jérémy Munsch
2f76a874d9
refactor(orders): decouple basket and order tunnel via domain events 2026-11-15 16:45:06 +01:00
Jérémy Munsch
6dfef2c7a1
feat(cqs): buffer domain events until commit and add action lifecycle hooks 2026-11-15 16:45:01 +01:00
Jérémy Munsch
79ae763e88
fix(orders): serialize order finalization with distributed lock via #[Locked] attribute 2026-11-15 16:45:01 +01:00
Jérémy Munsch
4c3fa373da
fix(orders): revalidate timeslot cutoff, product orderability and use contractual FinalizeOrderOutput 2026-11-15 16:45:01 +01:00
Jérémy Munsch
93e4b202da
feat(products): enhance product form data with additional fields
Added support for new product attributes including tax rate, invoicing unit, order unit, and orderable dates. Updated related queries and views to accommodate these changes.
2026-11-15 16:45:00 +01:00
Jérémy Munsch
97f6085622
test(isolation): decouple unit and integration tests from service container and enforce arch rules 2026-11-15 16:45:00 +01:00
Jérémy Munsch
9808ef9769
refactor(products): decouple views, policies and queries from Eloquent model via ProductDtoAssemblerService 2026-11-15 16:44:58 +01:00
Jérémy Munsch
cfba7f4756
refactor(storage): migrate media models, basket value objects and CQS actions to S3 2026-11-15 16:44:58 +01:00
Jérémy Munsch
aaf7d442b3
fix(employee): handle expected end date, upsert errors, and employee persistence 2026-11-15 16:44:54 +01:00
Jérémy Munsch
083357f746
test(EmployeeCsvImportLineService): fix end date format in test
Updated the expected end date format in the test to match the correct 'Y-m-d' format.
2026-11-14 08:47:52 +01:00
Jérémy Munsch
552d220b69
refactor(csv): replace Fusonic CSV reader with League CSV
Updated the CSV reading implementation to use the League CSV library, enhancing flexibility and maintainability.
Removed the EnhancedCsvReader class and adjusted the EmployeeCsvReaderService accordingly.
2026-11-14 08:25:50 +01:00
Jérémy Munsch
b2989b4967
refactor(employee): update import handling and output structure
- Replaced resource handling with SplFileObject for better readability.
- Introduced ImportEmployeesOutput class for structured results.
- Updated related services and tests to accommodate new structures.
2026-11-10 19:31:34 +01:00
Jérémy Munsch
74ab9b3041
refactor: reorganize imports across multiple controllers and jobs
This commit refactors the import statements in various controllers and jobs
to improve code organization and readability. Unused imports were removed,
and necessary imports were added to ensure proper functionality.
2026-11-10 18:15:32 +01:00
Jérémy Munsch
7a2004637d
feat(employee): implement employee import functionality
- Added EmployeesImportResults class to encapsulate import results.
- Created ImportEmployees action to handle CSV import and upsert employees.
- Introduced ImportEmployeesInput class for input validation.
- Developed EmployeeCsvReaderService for reading and parsing CSV files.
- Implemented EmployeeCsvImportLine to map CSV rows to employee data.
- Added EnhancedCsvReader for improved CSV handling.
- Updated composer.json to include fusonic/csv-reader dependency.
- Created tests for the new employee import functionality.
2026-11-10 18:08:41 +01:00