Commit graph

38 commits

Author SHA1 Message Date
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
cfac370e2e
feat(discount): implement published discounts filtering logic
Added logic to filter published discounts, including those with null start or end dates.
2026-10-29 19:19:22 +01:00
Jérémy Munsch
c52b13cc51
feat(order): implement soft delete handling in order changes
Added support for soft-deleted models in ChangeModelOrder and ChangeModelOrderPosition actions.
This allows for proper order adjustments even when models are soft-deleted.
2026-10-29 19:04:46 +01:00
Jérémy Munsch
584fee7e69
fix(EloquentPickupExceptionRepository): include pivot data in exception mapping
Updated the mapping function to include pivot data for pickup exceptions, ensuring accurate retrieval of associated order deadlines and replacement dates.
2026-10-29 17:02:07 +01:00
Jérémy Munsch
8e42639134
feat(order): implement change selected order functionality
Add functionality to change the order of models in the product list.
This includes new actions, requests, and UI components for user interaction.
2026-10-29 16:39:23 +01:00
Jérémy Munsch
a94d8a4b49
feat(products): add discount filtering to product index
- Implement discount filtering in product queries and views.
- Update related request and response handling for discounts.
2026-10-29 16:09:41 +01:00
Jérémy Munsch
fa5abe7470
test(EmployeeSyncService): add logger to EmployeeSyncService instantiation
This change ensures that the logger is properly injected into the EmployeeSyncService for better logging capabilities during tests.
2026-10-27 09:59:01 +01:00
Jérémy Munsch
3e4732bcb4
fix: Bind mocked CrmService to container in RegisterCustomerTest
Ensure that all mocked dependencies in RegisterCustomerTest are properly bound
to the Laravel service container using App::instance(). This prevents any code
that resolves dependencies via container injection from getting real service
instances instead of mocks.

This fix aligns the Integration test pattern with Feature tests which already
use App::instance() to bind mocks to the container.

Changes:
- Add import for Illuminate\Support\Facades\App
- Add App::instance() calls after each mock creation in all 6 test cases
- Add mockCrmService() helper method to TestCase base class for future tests

Fixes CI failures where CRM service was being called in real instead of being mocked.
2026-10-27 09:58:59 +01:00
Jérémy Munsch
87661b2a60
refactor: migrate customer registration and mass actions to actions 2026-10-27 09:58:55 +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
4165bfecb5
fix(tests): use valid UUID v7 for order references in integration tests 2026-10-27 09:58:54 +01:00
Jérémy Munsch
50df658d58
feat(product-incos): implement actions, queries, sync job and command for Arcadia INCO sheets 2026-10-27 09:58:53 +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
d29561fe64
test: annotate Pest closures using $this with \Tests\TestCase 2026-10-27 09:58:50 +01:00
Jérémy Munsch
3c309dc356
feat(slides): indicate visibility in BO and fix conditional slider display in FO 2026-10-27 09:58:47 +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
9ebf712170
refactor(cqs): complete Fo/PageController, BO FormRequest input mappings, and decouple Directories 2026-10-27 09:58:44 +01:00
Jérémy Munsch
aad9586ca9
refactor(tunnel): migrate Fo\TunnelController to CQS pattern 2026-10-27 09:58:43 +01:00
Jérémy Munsch
8dd54f8824
fix(bo): fix MissingAttributeException in GetProductFormDataQuery 2026-10-27 09:58:42 +01:00
Jérémy Munsch
9aab392350
feat(bo): refactor ProductIncosController to strict CQS with actions, DTOs, and request mapping 2026-10-27 09:58:41 +01:00
Jérémy Munsch
0fef2cfc98
refactor(fo): refactor ContactController using GetShopQuery and CQS 2026-10-27 09:58:40 +01:00
Jérémy Munsch
55ae6553d8
refactor(bo): refactor DiscountsController to strict CQS pattern with actions, queries and DTOs 2026-10-27 09:58:40 +01:00
Jérémy Munsch
26992f52ff
feat(bo): refactor PickupExceptionsController to strict CQS with actions, queries, and DTOs 2026-10-27 09:58:39 +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
797d1da1b2
refactor(faqs): implement CQS actions, query, and DTO for faqs 2026-10-27 09:58:32 +01:00
Jérémy Munsch
3ac95cc6f8
refactor(common): implement generic actions for controller traits (order, status, star) 2026-10-27 09:58:32 +01:00
Jérémy Munsch
98e580d327
refactor(tags): implement CRUD actions for tags
- Added CreateTag, UpdateTag, and DeleteTag actions.
- Introduced CreateTagInput and UpdateTagInput for input validation.
- Implemented ActionExecutor for executing actions with logging.
- Added tests for all new actions and input validation.
2026-10-27 09:58:30 +01:00
Jérémy Munsch
8db44cdd53
chore: pint pass 2026-10-27 09:58:24 +01:00
Jérémy Munsch
149edff185
refactor: Closes #123 change the way stats are calculated and fixes employee radiation date 2026-10-27 09:58:15 +01:00
Jérémy Munsch
58af50b5c5
refactor: massive bump refactor 2026-10-27 09:58:12 +01:00