Commit graph

37 commits

Author SHA1 Message Date
Jérémy Munsch
75784ae719
refactor(uuid): migrate app, domain, infra, and factories to UuidHelper 2026-11-17 12:15:34 +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
49c17d61f0
chore(tests): upgrade to Pest 5, PHPUnit 13, pest-plugin-phpstan and phpstan-webmozart-assert 2026-11-16 14:49:53 +01:00
Jérémy Munsch
d1f0b21ad5
refactor(EntityId): move UUID validation to EntityId constructor
Refactored the EntityId class to include UUID v7 validation in the constructor, ensuring all derived classes inherit this behavior.
2026-11-16 11:39:52 +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
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
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
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
d430fa01d2
fix(product): adjust orderable end condition to include equality
Updated the condition for orderable end to include equality, ensuring products are excluded correctly when the current date matches the orderable end date.
2026-11-15 19:43:45 +01:00
Jérémy Munsch
93dc942152 test(arch): fix entity/naming test namespaces and allow mutable domain entities 2026-11-15 17:50:56 +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
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
758fec824d
refactor(phpstan): reach PHPStan level 10 compliance and enforce global namespace prefixes 2026-11-15 16:44:59 +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
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
dd05d9166c
fix(value-objects): simplify Uuid usage in OrderReference
Refactor the OrderReference class to use the Uuid alias directly for better readability.
2026-10-27 16:20:50 +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
a7354cb051
feat: Add StringEncoder and StringHelper for encoding utilities
- Introduced StringEncoder for converting various encodings to UTF-8.
- Added StringHelper with methods for string manipulation and transliteration.
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
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
Jérémy Munsch
c997b37047
feat(bo): refactor ShopsController to strict CQS with actions, queries, VOs, and DTOs 2026-10-27 09:58:38 +01:00
Jérémy Munsch
42bdae01cc
feat: implement pagination using Pagination value object
- Updated DataTableService to accept a Pagination object for pagination parameters.
- Refactored paginateQuery method to utilize pageSize and pageNumber from Pagination.

refactor: replace ActionExecutor with Executor in controller traits

- Updated ChangesModelOrder, TogglesModelStar, and TogglesModelStatus traits to use Executor interface instead of ActionExecutor.

feat: add PictureMetadata and Slug value objects

- Introduced PictureMetadata for managing image metadata with validation.
- Added Slug value object for slug generation and validation.

feat: update breadcrumbs to support RangeDto

- Modified breadcrumbs-bo.php to accept RangeDto in the edit route.

test: add tests for RangesController

- Added tests for accessing, creating, updating, and deleting ranges.
- Included tests for toggling range status.

test: add integration tests for range actions

- Created tests for CreateRange, DeleteRange, and UpdateRange actions.
- Validated input handling and database interactions.

test: add unit tests for range input classes

- Implemented tests for CreateRangeInput and UpdateRangeInput to validate input constraints.

test: add unit tests for value objects

- Added tests for PictureMetadata and Slug to ensure proper validation and instantiation.

test: add unit tests for RangeDto

- Created tests to verify RangeDto mapping from Range model.

test: add unit tests for RangePolicy

- Implemented tests for RangePolicy to validate permissions based on user roles.
2026-10-27 09:58:34 +01:00
Jérémy Munsch
e2e2a357f7
refactor(slides): implement CQS actions, query, DTO, and DatePeriod VO for slides 2026-10-27 09:58:33 +01:00
Jérémy Munsch
1fd2a3a1d8
refactor(pages): implement CQS action, query, DTO, and SeoMetadata VO for pages 2026-10-27 09:58:33 +01:00
Jérémy Munsch
a1ad396a0e
fix(types): resolve phpstan typing issues in ContactFormRequest and Basket entity 2026-10-27 09:58:28 +01:00
Jérémy Munsch
29fa8a1b7d
fix(order): revalidate basket prices and discounts during order finalization [AUD-DSA-001] 2026-10-27 09:58:26 +01:00
Jérémy Munsch
58af50b5c5
refactor: massive bump refactor 2026-10-27 09:58:12 +01:00