Commit graph

56 commits

Author SHA1 Message Date
Jérémy Munsch
aba49edaee
chore(config,tests): disable local disk serving route and freeze time in ShopperTest 2026-11-17 12:32:21 +01:00
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
7a701328f9
test(orders): verify selected HTML option, failed status filter, and all OrderStatus cases 2026-11-16 20:39:50 +01:00
Jérémy Munsch
758605be09
refactor(domain,orders): convert OrderStatus enum to lowercase string 2026-11-16 20:31:25 +01:00
Jérémy Munsch
3b24436263
feat(stats,orders): track tunnel attempts in DB to preserve waiting stats 2026-11-16 20:19:31 +01:00
Jérémy Munsch
53f49fea9c
refactor(domain,infra): isolate PENDING/FAILED order states and add lockForUpdate 2026-11-16 19:57:06 +01:00
Jérémy Munsch
b4384c00a7
chore(lint): resolve remaining PHPCS warnings across domain, infra, shared, and unit tests 2026-11-16 16:34:21 +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
c9d53f43c0
test(clock): add global clock reset and freeze time across 22 test files 2026-11-16 15:49:48 +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
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
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
a87e5a0c94
test(tests): add unit tests for Pagination value object 2026-11-16 14:19:02 +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
7b27f532ee
test(tests): fix PHPStan level 10 errors in OrderTunnelServiceTest and PickupSchedulingServiceTest 2026-11-16 13:00:47 +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
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
92dd038cb9
fix(pickup): align scheduling on Europe/Paris cutoff and attach holidays on shop creation 2026-11-16 01:58:44 +01:00
Jérémy Munsch
c427b60210
feat(jobs): handle shop pickup exceptions, chunking, and cache deduplication in SendMissingOrderReminderJob 2026-11-15 21:39:33 +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
5a19f01270
test(product): add tests for orderable date boundaries
Added tests to verify behavior of canBeOrderOn method
when the date equals orderable_start and orderable_end.
2026-11-15 19:49:55 +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
c4d9c84408
feat(policy): implement customer order limit policy with config values
Added CustomerOrderLimitPolicy to manage order limits based on configuration values.
Updated tests to reflect changes in constructor parameters.
2026-11-15 19:39:35 +01:00
Jérémy Munsch
ee6a6607dc
fix(employee): enforce start_date and align active status rules 2026-11-15 16:45:07 +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
4fe2d48f68
refactor(builders): split OrderBuilder into immutable step classes 2026-11-15 16:45:06 +01:00
Jérémy Munsch
d1d0585b34
fix(contact): update orderRef to use OrderReference value object
Refactor orderRef handling in contact forms to ensure proper validation and type safety.
2026-11-15 16:45:05 +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
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
ef674986c2
refactor(service): update PickupSchedulingService for timezone handling
- Added timezone handling for cutoff times in PickupSchedulingService.
- Updated MissingOrderReminderNotification to use Paris timezone.
- Enhanced tests to validate cutoff behavior based on timezone.
2026-11-02 16:35:02 +01:00
Jérémy Munsch
c8f895c759
refactor: simplify use statements and type hints
- Removed fully qualified names for better readability.
- Streamlined code by using direct class references.
2026-10-29 20:35:35 +01:00
Jérémy Munsch
c40016bba1
feat(order): implement order placement and related DTOs
- Add methods to convert OrderLine and DeliveryAddress to DTOs.
- Introduce toPlacedEvent method in Order to generate domain event.
- Enhance OrderUnit with Regate code mapping.
- Implement tests for new functionality and ensure correctness.
2026-10-29 20:35:13 +01:00
Jérémy Munsch
71e0d65f31
refactor(OrderService): simplify order creation from basket
Updated the OrderService to utilize the new fromBasket method for creating orders, enhancing code clarity and maintainability. Removed the ProductAvailabilityService as its functionality is now integrated into the ProductRepository.
2026-10-29 20:21:32 +01:00
Jérémy Munsch
e857a58d00
test(Product): add comprehensive tests for Product entity
- Implement tests for product publication status.
- Add tests for product orderability based on various conditions.
- Enhance pricing calculation tests for different discount scenarios.
- Remove outdated PricingServiceTest and refactor ProductAvailabilityServiceTest.
2026-10-29 19:48:38 +01:00
Jérémy Munsch
b9999caf8d
feat(discounts): add discount logic for piece pricing
Implement discount calculations that apply to the piece (sold unit) for products invoiced by weight.
2026-10-29 15:43:37 +01:00
Jérémy Munsch
713c937890
fix(casts): update OrderReferenceCast to use base58 encoding
Refactor OrderReferenceCast to utilize base58 encoding for order references instead of UUID.
This change improves compatibility with the new OrderReference implementation.
2026-10-27 16:17:28 +01:00
Jeremy Munsch
46e9c58ad2
refactor: battle test employee sync 2026-10-27 09:58:59 +01:00
Jérémy Munsch
17f898e3f9
feat(domain): introduce DiscountRate VO and eliminate float rounding in pricing calculations 2026-10-27 09:58:54 +01:00
Jérémy Munsch
5492ffe217
refactor(orders): simplify OrderReference to wrap UuidInterface directly and remove obsolete UuidConverter 2026-10-27 09:58:51 +01:00
Jérémy Munsch
e0c4b34ed8
feat(employees): implement deterministic 6-character code generation using SerialCaster
- Add kwaadpepper/serial-int-caster and SerialCasterServiceProvider
- Update CodeGenerationService to encode Matricule deterministically with length 6
- Update Code value object to support lengths between 6 and 10 with 53 non-ambiguous characters
- Add database migration to sanitize legacy ambiguous codes
- Recreate and update unit and integration tests for CodeGenerationService and Code value object
2026-10-27 09:58:46 +01:00
Jérémy Munsch
8b96ce90be
test(casts): add tests for EmployeeSitesCast functionality
test(casts): add tests for ShopperEstablishmentCodeCast functionality

test(casts): add tests for ShopperServiceCodeCast functionality

test(casts): add tests for ShopperSiteCodeCast functionality

test(dto): update ProductDtoTest to include additional fields

test(dto): update SettingDtoTest to remove arcadiaSites assertions

test(events): update AnOrderHasBeenPlacedTest to use value objects

test(entities): update OrderTest to use value objects for employee details

test(value-objects): update EmployeeUpsertDataTest to use value objects

test(pagination): update PaginationTest to access value properties

test(services): update AppCustomerAuthServiceTest to use CrmHashcode

test(services): update CrmServiceTest to use CrmHashcode for customer retrieval
2026-10-27 09:58:45 +01:00
Jérémy Munsch
3398aacc86
refactor(casts): update exception handling to use fully qualified class names
Refactored exception handling in various cast classes to use fully qualified class names for InvalidArgumentException and UnexpectedValueException.
2026-10-27 09:58:45 +01:00
Jérémy Munsch
3b3997d547
feat(employees): automated sync with Arcadia API, BO settings, Shopper value objects, and pagination migration
- Implement automated synchronization of employees via Arcadia API (EmployeeSyncService, SynchronizeEmployeesWithArcadiaApi, FetchAndUpsertArcadiaEmployees)
- Add Back-Office application settings for employee sites (Setting singleton, GetSettingsQuery, UpdateSettings, SettingsController, EmployeeSitesInputComponent.vue)
- Strongly type Employee attributes using Domain Value Objects (ShopperEstablishmentCode, ShopperSiteCode, ShopperServiceCode) and Eloquent Casts
- Migrate pagination from Domain to Shared\Pagination namespace across queries and inputs
- Remove legacy and dead CSV employee import/export code
- Restore Domain\Ports\Services\CsvGenerator interface for Regate order generation
- Add comprehensive Pest unit, integration, and feature test coverage
2026-10-27 09:58:44 +01:00
Jérémy Munsch
9f1b4242b9
refactor(bo): encapsulate pickup exception filter in IndexShopRequest, align VOs and DTOs 2026-10-27 09:58:39 +01:00