Compare commits

..

176 commits

Author SHA1 Message Date
Jérémy Munsch
eda60066b1
Merge branch 'trunk' 2026-11-17 10:39:34 +01:00
Jérémy Munsch
276be44fa4
Merge branch 'develop' into trunk 2026-11-17 10:32:33 +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
d016a66601
Merge branch 'develop' into trunk 2026-11-17 10:26:20 +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
178f2e0bda
Merge branch 'develop' into trunk 2026-11-17 09:50:22 +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
f7ce006c58 Merge branch 'refactor-in-order-to-reintroduce-import' into 'develop'
Add employee Import command Closes #128

See merge request ldc-web/projets/boutique-cnc-sable!89
2026-11-16 17:10:52 +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
87136fcc42
refactor(test): update query path for naming conventions
Adjusted the path for query tests to reflect the new directory structure.
2026-11-10 19:48:29 +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
454695928b
refactor: format PHPDoc for query implementations
Improves readability of PHPDoc annotations across multiple query classes.
2026-11-10 18:17:04 +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
Jérémy Munsch
2dacdbabd6
refactor(service): reintroduce EmployeeUpsertService and related classes
- Moved employee upsert logic to a new service for better separation of concerns.
- Updated EmployeeSyncService to utilize the new EmployeeUpsertService.
- Added tests for EmployeeUpsertService to ensure correct functionality.
2026-11-10 15:14:24 +01:00
Jérémy Munsch
d0efb0f527
refactor: update namespaces for actions and queries
Refactored the codebase to change the namespaces of various actions and queries from `App\Actions` to `App\Cqs\Actions` and `App\Queries` to `App\Cqs\Queries`. This restructuring improves organization and clarity in the codebase.
2026-11-10 15:13:26 +01:00
Jérémy Munsch
9d2c5323ae
Merge branch 'trunk' 2026-11-02 16:44:33 +01:00
Jérémy Munsch
bd8e90b5e4
Merge branch 'develop' into trunk 2026-11-02 16:35:09 +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
d5ed718874
Merge branch 'develop' into trunk 2026-11-02 15:36:37 +01:00
Jérémy Munsch
0d527654ae
chore(deps): remove overrides for js-yaml, glob, and minimatch 2026-11-02 15:36:27 +01:00
Jérémy Munsch
64d418dcc9
refactor(component): remove unused imports from ImageInputComponent
Cleaned up the code by removing unnecessary imports to improve readability.
2026-11-02 15:29:24 +01:00
Jérémy Munsch
946342d975
Merge branch 'develop' into trunk 2026-11-02 15:24:42 +01:00
Jérémy Munsch
081c7a3599
chore(deps): update eslint, sass-embedded, and vue-tsc
Updated eslint to version 10.14.0, sass-embedded to 1.107.1,
and vue-tsc to 3.3.14 for improved performance and compatibility.
2026-11-02 15:24:34 +01:00
Jérémy Munsch
e9454f9dbb
Merge branch 'develop' into trunk 2026-11-02 15:21:43 +01:00
Jérémy Munsch
78466ec482
style(tests): format code for consistency in OrderLineDtoTest 2026-11-02 15:21:39 +01:00
Jérémy Munsch
eca7a9adbf
Merge branch 'develop' into trunk 2026-11-02 15:19:07 +01:00
Jérémy Munsch
192e72f554
refactor(dto): enhance OrderLineDto with flattened product properties
- Added new properties for product details in OrderLineDto.
- Updated fromModel method to map product properties correctly.
- Adjusted toArray method to include new properties.
- Improved unit tests for OrderLineDto to validate new behavior.
2026-11-02 14:53:17 +01:00
Jérémy Munsch
327defbee0
Merge branch 'trunk' 2026-11-02 11:33:05 +01:00
Jérémy Munsch
dd4f4ce253
Merge branch 'develop' into trunk 2026-11-02 11:24:12 +01:00
Jérémy Munsch
fab265cd68
fix: Mauvais identifiant inco envoyé sur les commandes, on ne donnait pas le no_art a la place de l'auto increment 2026-11-02 11:22:59 +01:00
Jeremy Munsch
24c151cc99
Merge branch 'trunk' 2026-10-30 11:00:55 +01:00
Jérémy Munsch
e8a6ab07de
Merge branch 'develop' into trunk 2026-10-29 21:16:37 +01:00
Jérémy Munsch
cd7d5f5fe9
feat(orders): implement default sorting for order queries
Added default sorting by date in descending order for order queries.
Updated related views and tests to reflect this change.
2026-10-29 21:16:06 +01:00
Jérémy Munsch
0e05779f89
feat(sliders): enhance carousel controls and responsiveness
Added padding for carousel controls on larger screens and improved button styles for better visibility and interaction.
2026-10-29 20:59:30 +01:00
Jérémy Munsch
28d6200136
Merge branch 'develop' into trunk 2026-10-29 20:35:49 +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
da0c3afc14
refactor(MoneyServiceProvider, ViewServiceProvider): streamline boot methods
Removed unnecessary conditionals and improved method calls for clarity.
2026-10-29 20:13:15 +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
08354b44b6
style(tests): format code for better readability
Improved code formatting in ChangeOrderBladeTest for consistency.
2026-10-29 19:13:31 +01:00
Jérémy Munsch
ed593c25b0
test(UpdateShopPickupExceptionsRequest): remove redundant message test and update error messages
Updated error messages for better clarity and removed unnecessary test for custom messages.
2026-10-29 19:12:21 +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
7b910c5af6
refactor(UpdateShopPickupExceptionsRequest): remove unused messages method
Cleaned up the code by removing the messages method as it was not utilized.
2026-10-29 18:43:02 +01:00
Jérémy Munsch
961829a0c7
fix(pickup-exceptions): update noReplacement logic for checkbox state
Ensure noReplacement reflects checkbox status for accurate behavior.
2026-10-29 18:24:21 +01:00
Jérémy Munsch
36faed679e
fix(pickup-exceptions): correct spelling of 'Blocked week'
Updated the text from 'Bloqued week' to 'Blocked week' for consistency in error messages.
2026-10-29 18:23:36 +01:00
Jérémy Munsch
cef7a4e4b0
style(pickup-exceptions): fix formatting for readability
Adjusted indentation for better code clarity.
2026-10-29 18:22:51 +01:00
Jérémy Munsch
a87f5756b2
fix(PickupSchedulingService): use equals method for exception ID comparison
Updated the comparison of exception IDs to use the equals method for better accuracy.
2026-10-29 18:21:22 +01:00
Jérémy Munsch
f174aa74cf
Merge branch 'develop' into trunk 2026-10-29 17:10:19 +01:00
Jérémy Munsch
0874259eba
style(FilteredProductResource): fix indentation for nutriscore line 2026-10-29 17:10:13 +01:00
Jérémy Munsch
dfaa74be01
Merge branch 'develop' into trunk 2026-10-29 17:08:21 +01:00
Jérémy Munsch
3ac3cbc7ff
style(products): format change-selected-order route for readability 2026-10-29 17:08:16 +01:00
Jérémy Munsch
62363253ce
Merge branch 'develop' into trunk 2026-10-29 17:06:40 +01:00
Jérémy Munsch
16dfc32f73
Merge branch 'issue-82' into develop 2026-10-29 17:06:27 +01:00
Jérémy Munsch
65df9aa04e
test(SettingsController): update assertions to check forbidden access
Updated test cases to assert forbidden responses instead of successful ones for employee site settings.
2026-10-29 17:05:34 +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
5d36639705
fix(lang): correct typo in French translation for replacement date
Fixes a typo in the French language file for the replacement date message.
2026-10-29 16:42:41 +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
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
4d6ff9b726
fix(SettingPolicy): enable Arcadia refresh job dispatching
The Arcadia refresh job dispatching is currently disabled and needs to be enabled when the API is available.
2026-10-29 15:26:45 +01:00
Jérémy Munsch
82697ed416
fix(products): respect is_old_price_displayed discount setting in product cards
- Condition strikethrough price display on showStrippedPrice in ProductCard.vue
- Add showStrippedPrice to product Zod schemas, TypeScript types, repositories and store
- Optimize showStrippedPrice in FilteredProductResource using eager-loaded validDiscount
- Add unit tests for productModelSchema and integration tests in ProductsControllerTest
2026-10-29 15:08:53 +01:00
Jérémy Munsch
0d5958aae6
fix(products): update discount logic for price display
Corrected the logic for displaying discounted prices in the product views.
2026-10-29 14:56:35 +01:00
Jérémy Munsch
e66f3ce17d
Merge branch 'develop' into trunk 2026-10-28 15:25:32 +01:00
Jérémy Munsch
0edef37e50
fix(orders): correct closing tag for order reference span
This change fixes a typo in the order reference display by correcting the closing tag.
2026-10-28 15:25:28 +01:00
Jérémy Munsch
eb72abb9d2
Merge branch 'develop' into trunk 2026-10-28 15:19:02 +01:00
Jérémy Munsch
0ea946a2f6
style(orders): update button alignment and styling for order references
Improve button presentation for better visual consistency.
2026-10-28 15:18:56 +01:00
Jérémy Munsch
8be89194e3
Merge branch 'develop' into trunk 2026-10-28 15:13:49 +01:00
Jérémy Munsch
f882b431b7
refactor(AisleViewer): update page title logic and imports
Improved the logic for displaying the page title based on search criteria.
2026-10-28 15:08:46 +01:00
Jérémy Munsch
889cc66c07
style(faq): update accordion button states for consistency
Adjusted button classes and attributes for accordion items to ensure consistent behavior and appearance.
2026-10-28 15:06:19 +01:00
Jérémy Munsch
9d28162ec4
style(logging): update comment formatting for clarity
Improved the formatting of comments in the logging configuration file for better readability.
2026-10-28 15:03:25 +01:00
Jérémy Munsch
5ca0f4ddde
Merge branch 'develop' into trunk 2026-10-28 13:16:00 +01:00
Jérémy Munsch
db684cf35f
refactor(products): update column classes for filter form
Adjusted column classes from 'col-md' to 'col-xl' for better responsiveness in the product filter form.
2026-10-28 13:15:30 +01:00
Jérémy Munsch
7a5c91e55e
refactor(crud): simplify no results messages in views
Updated no results messages to remove model references for consistency across various views.
2026-10-28 13:04:46 +01:00
Jérémy Munsch
e2263911f3
refactor(products): order tags by 'order' in query
This change ensures that the tags are retrieved in a consistent order.
2026-10-28 12:59:37 +01:00
Jérémy Munsch
aef658645b
refactor(slides): update column definitions and formatting
- Removed unused 'label' and 'text' columns.
- Adjusted 'tableColSorter' parameters for clarity.
2026-10-28 12:55:44 +01:00
Jérémy Munsch
1e1172b757
feat(validation): update address attribute to use postal_address
Updated the address attribute in multiple requests and views to use the new 'postal_address' translation key for consistency.
2026-10-28 12:51:06 +01:00
Jérémy Munsch
a15cc29a61
style(faq, legal-notice, privacy, terms): add padding to section containers 2026-10-28 12:19:38 +01:00
Jérémy Munsch
b31602b040
feat(faq): implement accordion for FAQ section
Enhances the FAQ page by replacing the list with an accordion component for better user experience.
2026-10-28 12:18:54 +01:00
Jérémy Munsch
8d43d71370
Merge branch 'develop' into trunk 2026-10-28 11:58:00 +01:00
Jérémy Munsch
020e2f8526
test(DiscountProductDto): update tests to include picture attribute
Added picture attribute to the DiscountProductDto tests to ensure proper serialization.
2026-10-28 11:57:37 +01:00
Jérémy Munsch
35306547c9
Merge branch 'develop' into trunk 2026-10-28 11:53:30 +01:00
Jérémy Munsch
c5fe5987da
feat(fontawesome): add cash register icon to library
feat(confirmation): update button with cash register icon

feat(pick-time-slot): update back button with chevron icon
2026-10-28 11:53:21 +01:00
Jérémy Munsch
4b0775b5ea
feat(ProductFilterViewModel): enhance URL parameter handling
Improve loading of search, ranges, tags, and brands from URL.
Trigger loading state and refresh list when filters are applied.
2026-10-28 11:36:40 +01:00
Jérémy Munsch
7a6c154e5f
feat(products): add price info section to product details
This update introduces a new price information section in the product details view, enhancing user experience by providing clear pricing details.
2026-10-28 11:26:23 +01:00
Jérémy Munsch
769949b3c3
feat(AisleViewer): update page title based on search state
Add computed properties to dynamically change the page title
between "Your search" and "All aisles" based on user input.
2026-10-28 11:10:05 +01:00
Jérémy Munsch
5a0cc6c519
feat(ContactFormRequest): add attributes method for validation messages
Added a method to define custom attribute names for validation.
2026-10-28 10:56:39 +01:00
Jérémy Munsch
99586179d7
feat(services): update pickup day text in services view
Updated the text for selecting the pickup day in the services view for better clarity.
2026-10-28 10:51:55 +01:00
Jérémy Munsch
87e66c1d13
style(navbar): update button styles for consistency and visibility
Updated button styles to use 'btn-tertiary' and added focus rings for better accessibility.
2026-10-28 10:43:44 +01:00
Jérémy Munsch
b3dc0ff3c4
style(BasketPanel): update button styles for better visibility
Improved button text weight for enhanced readability.
2026-10-28 10:41:08 +01:00
Jérémy Munsch
14ceb300cf
feat(ui): update button styles and add focus ring
- Added new tertiary button style with focus ring.
- Updated button classes in navbar and basket components for consistency.
2026-10-28 10:41:03 +01:00
Jérémy Munsch
44ffc4d34e
feat(DiscountProductDto): add picture property and update fromModel method
feat(ProductDragAndDropComponent): enhance product display with picture and improve layout
2026-10-28 10:02:43 +01:00
Jérémy Munsch
b166fa01e1
Merge branch 'develop' into trunk 2026-10-28 08:57:43 +01:00
Jérémy Munsch
f9ded6d01c
refactor(ToolboxHelper): remove unused getValidatedEnum method
Cleaned up ToolboxHelper by removing the unused getValidatedEnum method to enhance code clarity.
2026-10-28 08:57:35 +01:00
Jérémy Munsch
4ff3daecab
refactor(Auth): improve reset URL handling and validation
refactor(Helpers): update parameter types and remove ignores

refactor(Models): streamline order assignment logic

refactor(Enums): clarify unused constant warnings

refactor(Services): encapsulate cutoff week offset logic
2026-10-28 08:53:34 +01:00
Jérémy Munsch
6388c2a085
Merge branch 'develop' into trunk 2026-10-27 20:20:57 +01:00
Jérémy Munsch
1899fd1f0e
chore: phpcs fix 2026-10-27 20:20:52 +01:00
Jérémy Munsch
46e9a873ab
Merge branch 'develop' into trunk 2026-10-27 20:18:15 +01:00
Jérémy Munsch
8e213e2e33
fix: htmlsanitizer and contact form validation 2026-10-27 20:18:08 +01:00
Jérémy Munsch
644b3f6c16
Merge branch 'develop' into trunk 2026-10-27 20:02:47 +01:00
Jérémy Munsch
c7535d3d04
feat(Providers): bind CsvGenerator to CsvGeneratorImpl
Add binding for CsvGenerator service to its implementation.
2026-10-27 19:59:49 +01:00
Jérémy Munsch
87bd150f6b
Merge branch 'develop' into trunk 2026-10-27 18:57:57 +01:00
Jérémy Munsch
b8a0f16efa
fix(Crm): update customer input handling in UpdateCustomer action
Refactor input validation and data preparation for customer updates.
2026-10-27 18:57:46 +01:00
Jérémy Munsch
283038e5f4
Merge branch 'develop' into trunk 2026-10-27 17:33:48 +01:00
Jérémy Munsch
57e12e06b6
docs: to force rebuild 2026-10-27 17:33:42 +01:00
Jérémy Munsch
46a3ae4dc3
Merge branch 'develop' into trunk 2026-10-27 17:08:05 +01:00
Jérémy Munsch
afdd6cd0a7
fix(config): correct environment variable usage for phone reception
Ensure the default phone reception number is used correctly when the environment variable is not set.
2026-10-27 17:07:15 +01:00
Jérémy Munsch
99822b5a51
Merge branch 'develop' into trunk 2026-10-27 16:39:30 +01:00
Jérémy Munsch
aeb8addbb8
fix(config): simplify environment variable usage for default settings
Updated the default settings in filesystems, mail, and session configurations to use a more concise syntax for environment variable retrieval.
2026-10-27 16:39:23 +01:00
Jérémy Munsch
0ca572537c
Merge branch 'develop' into trunk 2026-10-27 16:21:00 +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
c4e1bfa80a
Merge branch 'develop' into trunk 2026-10-27 16:17:53 +01:00
Jérémy Munsch
1cf15950c6
fix: add missing CACHE_STORE environment variable
This change ensures that the CACHE_STORE environment variable is defined for the testing environment.
2026-10-27 16:17:40 +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
Jérémy Munsch
91a82af969
fix: add missing logging config file 2026-10-27 16:08:23 +01:00
Jérémy Munsch
b67ea17584
Merge branch 'develop' into trunk 2026-10-27 15:23:47 +01:00
Jérémy Munsch
d8f419cd2c
docs: rgpd to force rebuild 2026-10-27 15:23:42 +01:00
Jérémy Munsch
055ce2eb5d
Merge branch 'develop' into trunk 2026-10-27 13:55:36 +01:00
Jérémy Munsch
c1ab6ef066
build fix docker image 2026-10-27 13:55:27 +01:00
Jérémy Munsch
53f86fce63
Merge branch 'develop' into trunk 2026-10-27 13:53:47 +01:00
Jérémy Munsch
0a1bfc9aed
build: fix build npm-security 2026-10-27 13:53:22 +01:00
Jérémy Munsch
fee9609907
build: fix build npm-security 2026-10-27 13:50:35 +01:00
Jérémy Munsch
cecd808a80
build: fix build npm-security 2026-10-27 13:50:27 +01:00
Jérémy Munsch
75646a5f49
build: fix build npm-security 2026-10-27 13:48:57 +01:00
Jérémy Munsch
81dc370134
build: fix build npm-security 2026-10-27 13:44:56 +01:00
Jérémy Munsch
ce28473860
Merge branch 'develop' into trunk 2026-10-27 13:03:33 +01:00
Jérémy Munsch
bd0cb02389
build: fix multistage 2026-10-27 13:03:28 +01:00
Jérémy Munsch
534e14f2e8
Merge branch 'develop' into trunk 2026-10-27 12:48:07 +01:00
Jérémy Munsch
146bbf57bf
build: fix build config 2026-10-27 12:47:58 +01:00
Jérémy Munsch
38de1011ee
Merge branch 'develop' into trunk 2026-10-27 12:40:26 +01:00
Jérémy Munsch
c8eba4a932
fix: sentry config optimization 2026-10-27 12:25:38 +01:00
Jérémy Munsch
f29ef10a43
Merge branch 'develop' into trunk 2026-10-27 11:43:50 +01:00
Jérémy
639a8459d2 Merge branch 'massive-bump' into 'develop'
Massive bump

See merge request ldc-web/projets/boutique-cnc-sable!84
2026-10-27 11:40:27 +01:00
K Muller
53e5f47bcf Merge branch 'trunk' 2026-10-08 10:28:46 +02:00
K Muller
c9b64d4fe5 Merge branch 'develop' into trunk 2026-10-08 10:28:26 +02:00
Noah Lancien
7125bf8ead Merge branch 'trunk' 2026-05-11 14:25:51 +02:00
Noah Lancien
e5f3ea4d04 Merge branch 'develop' into trunk 2026-05-11 11:39:47 +02:00
Noix
772cd92f85 Merge branch 'vb-fix-timeslots' into 'master'
fix: Fix timeslot db request

See merge request ldc-web/projets/boutique-cnc-sable!85
2026-05-04 10:24:45 +00:00
Vincent BRIDIER
f8537635bc fix: Fix timeslot db request 2026-05-04 12:19:44 +02:00
Noah Lancien
a3c7193e05 Merge branch 'trunk' 2026-04-21 14:50:57 +02:00
Noah Lancien
2740798612 Merge branch 'develop' into trunk 2026-04-21 14:50:50 +02:00
Noah Lancien
f07fae78a2 Merge branch 'trunk' 2026-04-21 14:37:19 +02:00
Noah Lancien
eb91d4d17f Merge branch 'develop' into trunk 2026-04-21 14:23:14 +02:00
Noah Lancien
5cad93d548 Merge branch 'trunk' 2026-04-16 16:02:05 +02:00
Noah Lancien
152bc58474 Merge branch 'develop' into trunk 2026-04-16 16:01:49 +02:00
Noah Lancien
5d2d58cd7a Merge branch 'trunk' 2026-03-26 16:16:29 +01:00
Noah Lancien
6ff2257144 Merge branch 'develop' into trunk 2026-03-03 10:59:09 +01:00
Noah Lancien
f352408c40 Merge branch 'develop' into trunk 2026-03-03 09:49:18 +01:00
Noah Lancien
c7c2175625 Merge branch 'develop' into trunk 2026-02-26 14:13:08 +01:00
Noah Lancien
2c63b95f86 Merge branch 'trunk' 2026-02-12 10:57:47 +01:00
Noah Lancien
d74badf9b8 Merge branch 'develop' into trunk 2026-02-12 10:56:57 +01:00
Noah Lancien
43a33daa01 Merge branch 'trunk' 2026-02-05 17:17:49 +01:00
Noah Lancien
4f5be11730 Merge branch 'develop' into trunk 2026-02-05 17:17:33 +01:00
Noah Lancien
ed77e6aef9 Merge branch 'trunk' 2026-02-04 12:12:04 +01:00
Noah Lancien
2cf1a2761a Merge branch 'develop' into trunk 2026-02-04 12:11:46 +01:00
Noah Lancien
3c2f785441 Merge branch 'trunk' 2026-02-03 09:37:11 +01:00
Noah Lancien
7661bba6ca Merge branch 'develop' into trunk 2026-02-03 09:36:54 +01:00
Noah Lancien
8db9c7dc4c Merge branch 'trunk' 2026-02-03 09:25:45 +01:00
Noah Lancien
9a8d7b400a Merge branch 'develop' into trunk 2026-02-03 09:25:27 +01:00
Noah Lancien
60497326fe Merge branch 'trunk' 2026-02-03 09:22:13 +01:00
Noah Lancien
2c0961dcc3 Merge branch 'develop' into trunk 2026-02-03 09:21:26 +01:00
Noah Lancien
1f32078053 Merge branch 'trunk' 2025-11-12 17:22:19 +01:00
Noah Lancien
38771721ea Merge branch 'develop' into trunk 2025-11-12 17:21:59 +01:00
Noah Lancien
7ccd63db5f Merge branch 'trunk' 2025-07-08 16:59:29 +02:00
Noah Lancien
5758a1d40c Merge branch 'develop' into trunk 2025-07-08 16:44:51 +02:00
Vincent BRIDIER
28448a34a7
Merge branch 'trunk' 2025-05-12 15:35:00 +02:00
Karl Muller
f984799a02 Merge branch 'develop' into trunk 2025-04-28 14:46:33 +00:00
Karl Muller
a94589fb13 Merge branch 'develop' into trunk 2025-04-02 08:34:54 +00:00
Noah Lancien
24cfb976f6 Merge branch 'develop' into trunk 2025-02-24 15:31:41 +01:00
Noah Lancien
931a79444b Merge branch 'develop' into trunk 2025-02-14 16:20:47 +01:00
Noah Lancien
c287334426 Merge branch 'develop' into trunk 2025-02-13 15:07:20 +01:00
Noah Lancien
7547491e46 Merge branch 'develop' into trunk 2025-02-13 15:02:00 +01:00
546 changed files with 7029 additions and 2518 deletions

View file

@ -15,7 +15,7 @@ include:
file: "build/composer.yml"
- project: "ldc-web/shared-ci"
ref: "main"
file: "build/docker.yml"
file: "build/docker-multistage.yml"
- project: "ldc-web/shared-ci"
ref: "main"
file: "test/test.yml"
@ -313,3 +313,16 @@ npm-build:
script:
- echo "Frontend is built directly within Docker multi-stage build"
npm-security:
stage: security
script:
- echo "Npm security would run bun security"
dependencies:
- bun-security
needs:
- job: bun-security
optional: true
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "trunk" || $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main"
- if: $CI_COMMIT_TAG != null

View file

@ -1,3 +1,5 @@
ARG PHP_8_5_TAG=latest
FROM composer:2.9 AS vendor
ARG GITLAB_USER
@ -8,7 +10,7 @@ COPY database/ database/
COPY composer.json composer.json
COPY composer.lock composer.lock
RUN composer config gitlab-token.lab.s-web.fr ${GITLAB_USER} ${GITLAB_PASSWORD}
RUN composer config gitlab-token.lab.s-web.fr "${GITLAB_USER}" "${GITLAB_PASSWORD}"
RUN composer install \
--ignore-platform-reqs \
--no-interaction \
@ -35,13 +37,13 @@ RUN echo "@ldc-web:registry=https://lab.s-web.fr/api/v4/packages/npm/" >> .npmrc
RUN bun install --frozen-lockfile && bun run prod
ARG PHP_8_5_TAG
FROM registry.s-web.fr/ldc-web/projets/ldc-web-images-docker/uwil-production-8.5:${PHP_8_5_TAG}
ARG USER=www-data
COPY --chown=${USER}:${USER} . /app/srcs
COPY --chown=${USER}:${USER} ./resources/favicon/front/ /app/srcs/public/
COPY --chown=${USER}:${USER} ./resources/favicon/back/ /app/srcs/public/back/
COPY --chown=${USER}:${USER} ./resources/favicon/ /app/srcs/public/
COPY --from=vendor --chown=${USER}:${USER} /app/vendor/ /app/srcs/vendor/
COPY --from=frontend --chown=${USER}:${USER} /app/public/build/ /app/srcs/public/build/

51
RGPD.md
View file

@ -2,16 +2,17 @@
## Site
### En base de données
| Table | Colonne | Contenu | Utilisation |
| ----------- | ------------------ | ----------------------------------------------- | -------------------------------------------------------- |
| customers | email | Adresse email | Identifiant du client |
| customers | hashcode | Code unique de l'utilisateur en CRM | Identifiant du client en CRM |
| customers | created_at | Date | Suivi d'activité |
| customers | updated_at | Date | Suivi d'activité |
| customers | last_login_at | Date | Suivi de la dernière connexion au compte client |
| --- | --- | --- | --- |
| Table | Colonne | Contenu | Utilisation |
| ----------- | -------------------------- | ----------------------------------------------- | -------------------------------------------------------- |
| customers | email | Adresse email | Identifiant du client |
| customers | hashcode | Code unique de l'utilisateur en CRM | Identifiant du client en CRM |
| customers | created_at | Date | Suivi d'activité |
| customers | updated_at | Date | Suivi d'activité |
| customers | last_login_at | Date | Suivi de la dernière connexion au compte client |
| --- | --- | --- | --- |
| orders | employee.matricule | Matricule de l'employé | Identifiant unique de l'employé lié à la commande |
| orders | employee.firstname | Prénom de l'employé | Affichage et personnalisation de la commande |
| orders | employee.lastname | Nom de l'employé | Affichage et personnalisation de la commande |
@ -26,23 +27,23 @@
| orders | delivery_address.latitude | Latitude de l'adresse de livraison | Géolocalisation pour optimiser la livraison |
| orders | delivery_address.longitude | Longitude de l'adresse de livraison | Géolocalisation pour optimiser la livraison |
| orders | employee_matricule | Matricule de l'employé (colonne virtuelle) | Indexation et recherche rapide des commandes par employé |
| --- | --- | --- | --- |
| order_lines | product_id | Identifiant du produit présent dans la commande | Détail de la commande |
| order_lines | quantité | Quantité du produit présent dans la commande | Détail de la commande |
| --- | --- | --- | --- |
| employees | customer_id | Identifiant client | Permet de relier un salarié à un compte client du site |
| employees | matricule | Matricule | Matricule du salarié |
| employees | nom | Nom | Nom du salarié |
| employees | prenom | Prénom | Prénom du salarié |
| employees | start_date | Date de début du contrat | Activation du compte |
| employees | end_date | Date de fin du contrat | Désactivation du compte |
| employees | etablissement | Identifiant établissement | Localiser l'employé pour le dépôt de la commande |
| employees | site | Identifiant site | Localiser l'employé pour le dépôt de la commande |
| employees | service | Identifiant service | Localiser l'employé pour le dépôt de la commande |
| --- | --- | --- | --- |
| users | first_name | Prénom | Affichage à différents endroits du BO |
| users | last_name | Nom | Affichage à différents endroits du BO |
| users | email | Adresse mail | Identifiant, sert à la connexion au BO |
| --- | --- | --- | --- |
| order_lines | product_id | Identifiant du produit présent dans la commande | Détail de la commande |
| order_lines | quantité | Quantité du produit présent dans la commande | Détail de la commande |
| --- | --- | --- | --- |
| employees | customer_id | Identifiant client | Permet de relier un salarié à un compte client du site |
| employees | matricule | Matricule | Matricule du salarié |
| employees | nom | Nom | Nom du salarié |
| employees | prenom | Prénom | Prénom du salarié |
| employees | start_date | Date de début du contrat | Activation du compte |
| employees | end_date | Date de fin du contrat | Désactivation du compte |
| employees | etablissement | Identifiant établissement | Localiser l'employé pour le dépôt de la commande |
| employees | site | Identifiant site | Localiser l'employé pour le dépôt de la commande |
| employees | service | Identifiant service | Localiser l'employé pour le dépôt de la commande |
| --- | --- | --- | --- |
| users | first_name | Prénom | Affichage à différents endroits du BO |
| users | last_name | Nom | Affichage à différents endroits du BO |
| users | email | Adresse mail | Identifiant, sert à la connexion au BO |
### Formulaire de contact (marketing)

View file

@ -1,53 +0,0 @@
<?php
declare(strict_types=1);
namespace App\Actions\Crm;
use App\Contracts\Action;
use App\Contracts\ActionInput;
use App\Services\CrmService;
use Infrastructure\Adapters\Services\AppCustomerAuthService;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Crm\UpdateCustomerInput, \App\Actions\Crm\UpdateCustomerOutput>
*/
final class UpdateCustomer implements Action
{
public function __construct(
private readonly AppCustomerAuthService $authService,
private readonly CrmService $crmService
) {
}
#[\Override]
public function __invoke(ActionInput $input): UpdateCustomerOutput
{
Assert::isInstanceOf($input, UnsubscribeFromNewsletterInput::class);
$customer = $this->authService->getCustomerAsMandatory();
try {
$result = $this->crmService->updateCustomerInfos(
$customer,
[
'firstname' => $input->firstname,
'lastname' => $input->lastname,
'birth_date' => $input->birthDate,
'phone' => $input->phone,
'address' => $input->address,
'postcode' => $input->postcode,
'city' => $input->city,
'opt_in' => $input->optIn,
]
);
return new UpdateCustomerOutput($result);
} catch (\Throwable $e) {
report($e);
return new UpdateCustomerOutput(false);
}
}
}

View file

@ -35,6 +35,13 @@ class OrderLineProductCast implements CastsAttributes
$data = Arr::wrap(json_decode($value, true));
$taxRate = Arr::get($data, 'tax_rate');
$taxRate = is_numeric($taxRate) ? (float) $taxRate : null;
if (is_null($taxRate)) {
throw new \InvalidArgumentException('The tax rate cannot be null.');
}
return new OrderLineProduct(
incoId: new IncoId(Arr::integer($data, 'inco_id')),
originalId: new ProductId(Uuid::fromString(
@ -50,14 +57,8 @@ class OrderLineProductCast implements CastsAttributes
price: new MoneyCast()->get($model, 'price', Arr::get($data, 'price'), []),
discountedPrice: new MoneyCast()->get($model, 'discounted_price', Arr::get($data, 'discounted_price'), []),
priceKgTtc: new MoneyCast()->get($model, 'price_kg_ttc', Arr::get($data, 'price_kg_ttc'), []),
taxRate: match ((float) Arr::float($data, 'tax_rate')) {
TaxRate::TVA_20->percent() => TaxRate::TVA_20,
TaxRate::TVA_5_5->percent() => TaxRate::TVA_5_5,
default => throw new \UnexpectedValueException(
'Unhandled tax'
)
},
picture: Arr::string($data, 'picture', null),
taxRate: TaxRate::fromPercent($taxRate),
picture: is_string($picture = Arr::get($data, 'picture')) ? $picture : null,
);
}

View file

@ -6,7 +6,6 @@ namespace App\Casts;
use Domain\Models\ValueObjects\OrderReference;
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
use Ramsey\Uuid\Uuid;
/**
* @implements CastsAttributes<OrderReference,OrderReference>
@ -20,7 +19,7 @@ class OrderReferenceCast implements CastsAttributes
throw new \UnexpectedValueException('OrderReference cannot be null.');
}
return new OrderReference(Uuid::fromString($value));
return OrderReference::fromString($value);
}
/** @param array<string, mixed> $attributes */
@ -30,6 +29,6 @@ class OrderReferenceCast implements CastsAttributes
throw new \UnexpectedValueException('The given value is not an instance of OrderReference.');
}
return $value->value->toString();
return (string) $value;
}
}

View file

@ -4,9 +4,9 @@ declare(strict_types=1);
namespace App\Console\Commands;
use App\Actions\ProductIncos\SynchronizeProductIncosWithArcadiaApi;
use App\Contracts\ActionInputEmpty;
use App\Contracts\Executor;
use App\Cqs\Actions\ProductIncos\SynchronizeProductIncosWithArcadiaApi;
use App\Jobs\FetchAndUpsertArcadiaProductIncos;
use Illuminate\Console\Attributes\Description;
use Illuminate\Console\Attributes\Signature;

View file

@ -0,0 +1,56 @@
<?php
declare(strict_types=1);
namespace App\Console\Commands;
use App\Contracts\Executor;
use App\Cqs\Actions\Employee\ImportEmployees;
use App\Cqs\Actions\Employee\ImportEmployeesInput;
use Illuminate\Console\Attributes\Description;
use Illuminate\Console\Attributes\Signature;
use Illuminate\Console\Command;
#[Description('Synchronize all employees from a CSV file with Arcadia API')]
#[Signature('uwil:employees:upsert {file : The CSV file to import}')]
class UpsertEmployeesFormFile extends Command
{
public function handle(
Executor $executor,
ImportEmployees $action
): int {
$file = $this->argument('file');
if (! file_exists($file)) {
$this->error("File not found: {$file}");
return self::FAILURE;
}
$this->info('Starting synchronous employee import from CSV...');
$stream = new \SplFileObject($file, 'r');
if (! $stream->isReadable()) {
$this->error("Failed to open file: {$file}");
return self::FAILURE;
}
$importResult = $executor->execute($action, new ImportEmployeesInput($stream));
$this->info("Successfully inserted {$importResult->insertedCount} employees.");
$this->info("Successfully updated {$importResult->updatedCount} employees.");
if (! empty($importResult->errors)) {
$this->error('Errors occurred during import:');
foreach ($importResult->errors as $error) {
$this->error($error);
}
return self::FAILURE;
}
return self::SUCCESS;
}
}

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Basket;
namespace App\Cqs\Actions\Basket;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -10,7 +10,7 @@ use Domain\Services\BasketService;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Basket\AddToBasketInput, void>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Basket\AddToBasketInput, void>
*/
final class AddToBasket implements Action
{

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Basket;
namespace App\Cqs\Actions\Basket;
use App\Contracts\ActionInput;
use Domain\Models\ValueObjects\Entities\ProductId;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Basket;
namespace App\Cqs\Actions\Basket;
use App\Contracts\Action;
use App\Contracts\ActionInput;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Basket;
namespace App\Cqs\Actions\Basket;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -10,7 +10,7 @@ use Domain\Services\BasketService;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Basket\RemoveQuantityFromBasketInput|\App\Actions\Basket\RemoveProductFromBasketInput, void>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Basket\RemoveQuantityFromBasketInput|\App\Cqs\Actions\Basket\RemoveProductFromBasketInput, void>
*/
final class RemoveFromBasket implements Action
{

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Basket;
namespace App\Cqs\Actions\Basket;
use App\Contracts\ActionInput;
use Domain\Models\ValueObjects\Entities\ProductId;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Basket;
namespace App\Cqs\Actions\Basket;
use App\Contracts\ActionInput;
use Domain\Models\ValueObjects\Entities\ProductId;

View file

@ -2,24 +2,26 @@
declare(strict_types=1);
namespace App\Actions\Common;
namespace App\Cqs\Actions\Common;
use App\Contracts\Action;
use App\Contracts\ActionInput;
use App\Interfaces\ModelWithOrder;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use SortDirection;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Common\ChangeModelOrderInput, bool>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Common\ChangeModelOrderInput, bool>
*/
final class ChangeModelOrder implements Action
{
private const int MAX_ORDER_VALUE = 4294967295;
/**
* @param \App\Actions\Common\ChangeModelOrderInput $input
* @param \App\Cqs\Actions\Common\ChangeModelOrderInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): bool
@ -30,8 +32,17 @@ final class ChangeModelOrder implements Action
$goUp = $input->direction === SortDirection::Ascending;
$currentOrder = $model->getOrder();
$usesSoftDeletes = in_array(SoftDeletes::class, class_uses_recursive($model), true)
|| method_exists($model, 'trashed');
/** @var Builder<Model&ModelWithOrder> $baseQuery */
$baseQuery = $usesSoftDeletes
// @phpstan-ignore method.notFound (withTrashed)
? $model::query()->withTrashed()
: $model::query();
/** @var (Model&ModelWithOrder)|null $adjacentModel */
$adjacentModel = $model::query()
$adjacentModel = $baseQuery
->where('order', $goUp ? '<' : '>', $currentOrder)
->orderBy('order', $goUp ? SortDirection::Descending : SortDirection::Ascending)
->first();

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Common;
namespace App\Cqs\Actions\Common;
use App\Contracts\ActionInput;
use App\Interfaces\ModelWithOrder;

View file

@ -0,0 +1,102 @@
<?php
declare(strict_types=1);
namespace App\Cqs\Actions\Common;
use App\Contracts\Action;
use App\Contracts\ActionInput;
use App\Interfaces\ModelWithOrder;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Cqs\Actions\Common\ChangeModelOrderPositionInput, bool>
*/
final class ChangeModelOrderPosition implements Action
{
private const int MAX_ORDER_VALUE = 4294967295;
/**
* @param \App\Cqs\Actions\Common\ChangeModelOrderPositionInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): bool
{
Assert::isInstanceOf($input, ChangeModelOrderPositionInput::class);
$model = $input->model;
$currentOrder = $model->getOrder();
$targetOrder = $input->targetOrder;
if ($currentOrder === $targetOrder) {
return true;
}
$usesSoftDeletes = in_array(SoftDeletes::class, class_uses_recursive($model), true)
|| method_exists($model, 'trashed');
/** @var Builder<Model&ModelWithOrder> $baseQuery */
$baseQuery = $usesSoftDeletes
// @phpstan-ignore method.notFound (withTrashed)
? $model::query()->withTrashed()
: $model::query();
/** @var int|null $maxOrder */
$maxOrder = (clone $baseQuery)->max('order');
if ($maxOrder !== null && $targetOrder > $maxOrder) {
$targetOrder = (int) $maxOrder;
}
if ($currentOrder === $targetOrder) {
return true;
}
// Deactivate timestamps
$model->timestamps = false;
// Step 1: Temporarily park the moving model at MAX_ORDER_VALUE
$model->setOrder(self::MAX_ORDER_VALUE);
$model->saveQuietly();
if ($targetOrder < $currentOrder) {
// Moving UP
/** @var \Illuminate\Database\Eloquent\Collection<int, Model&ModelWithOrder> $itemsToShift */
$itemsToShift = (clone $baseQuery)
->where('order', '>=', $targetOrder)
->where('order', '<', $currentOrder)
->whereKeyNot($model->getKey())
->orderBy('order', 'desc')
->get();
foreach ($itemsToShift as $item) {
$item->timestamps = false;
$item->setOrder($item->getOrder() + 1);
$item->saveQuietly();
}
} else {
// Moving DOWN
/** @var \Illuminate\Database\Eloquent\Collection<int, Model&ModelWithOrder> $itemsToShift */
$itemsToShift = (clone $baseQuery)
->where('order', '>', $currentOrder)
->where('order', '<=', $targetOrder)
->whereKeyNot($model->getKey())
->orderBy('order', 'asc')
->get();
foreach ($itemsToShift as $item) {
$item->timestamps = false;
$item->setOrder($item->getOrder() - 1);
$item->saveQuietly();
}
}
// Step 2: Set the moving model to the target order
$model->setOrder($targetOrder);
$model->saveQuietly();
return true;
}
}

View file

@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
namespace App\Cqs\Actions\Common;
use App\Contracts\ActionInput;
use App\Interfaces\ModelWithOrder;
use Illuminate\Database\Eloquent\Model;
use Webmozart\Assert\Assert;
final readonly class ChangeModelOrderPositionInput implements ActionInput
{
public function __construct(
public Model & ModelWithOrder $model,
public int $targetOrder,
) {
Assert::isInstanceOf($this->model, Model::class);
Assert::isInstanceOf($this->model, ModelWithOrder::class);
Assert::greaterThanEq($this->targetOrder, 1);
}
}

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Common;
namespace App\Cqs\Actions\Common;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -13,12 +13,12 @@ use Illuminate\Database\Eloquent\Model;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Common\ExecuteMassActionInput, int>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Common\ExecuteMassActionInput, int>
*/
final class ExecuteMassAction implements Action
{
/**
* @param \App\Actions\Common\ExecuteMassActionInput $input
* @param \App\Cqs\Actions\Common\ExecuteMassActionInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): int

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Common;
namespace App\Cqs\Actions\Common;
use App\Contracts\ActionInput;
use App\Enums\MassActionType;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Common;
namespace App\Cqs\Actions\Common;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -11,12 +11,12 @@ use Illuminate\Database\Eloquent\Model;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Common\ToggleModelStarInput, \Illuminate\Database\Eloquent\Model&\App\Interfaces\ModelWithStar>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Common\ToggleModelStarInput, \Illuminate\Database\Eloquent\Model&\App\Interfaces\ModelWithStar>
*/
final class ToggleModelStar implements Action
{
/**
* @param \App\Actions\Common\ToggleModelStarInput $input
* @param \App\Cqs\Actions\Common\ToggleModelStarInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): Model & ModelWithStar

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Common;
namespace App\Cqs\Actions\Common;
use App\Contracts\ActionInput;
use App\Interfaces\ModelWithStar;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Common;
namespace App\Cqs\Actions\Common;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -11,12 +11,15 @@ use Illuminate\Database\Eloquent\Model;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Common\ToggleModelStatusInput, \Illuminate\Database\Eloquent\Model&\App\Interfaces\ModelWithStatus>
* @implements \App\Contracts\Action<
* \App\Cqs\Actions\Common\ToggleModelStatusInput,
* \Illuminate\Database\Eloquent\Model&\App\Interfaces\ModelWithStatus
* >
*/
final class ToggleModelStatus implements Action
{
/**
* @param \App\Actions\Common\ToggleModelStatusInput $input
* @param \App\Cqs\Actions\Common\ToggleModelStatusInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): Model & ModelWithStatus

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Common;
namespace App\Cqs\Actions\Common;
use App\Contracts\ActionInput;
use App\Interfaces\ModelWithStatus;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Crm;
namespace App\Cqs\Actions\Crm;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -10,7 +10,7 @@ use App\Services\CrmService;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Crm\UnsubscribeFromNewsletterInput, \App\Actions\Crm\UnsubscribeFromNewsletterOutput>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Crm\UnsubscribeFromNewsletterInput, \App\Cqs\Actions\Crm\UnsubscribeFromNewsletterOutput>
*/
final class UnsubscribeFromNewsletter implements Action
{

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Crm;
namespace App\Cqs\Actions\Crm;
use App\Contracts\ActionInput;
use Shared\ValueObjects\CrmHashcode;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Crm;
namespace App\Cqs\Actions\Crm;
enum UnsubscribeFromNewsletterOutput
{

View file

@ -0,0 +1,62 @@
<?php
declare(strict_types=1);
namespace App\Cqs\Actions\Crm;
use App\Contracts\Action;
use App\Contracts\ActionInput;
use App\Services\CrmService;
use Infrastructure\Adapters\Services\AppCustomerAuthService;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Cqs\Actions\Crm\UpdateCustomerInput, \App\Cqs\Actions\Crm\UpdateCustomerOutput>
*/
final class UpdateCustomer implements Action
{
public function __construct(
private readonly AppCustomerAuthService $authService,
private readonly CrmService $crmService
) {
}
#[\Override]
public function __invoke(ActionInput $input): UpdateCustomerOutput
{
Assert::isInstanceOf($input, UpdateCustomerInput::class);
$customer = $this->authService->getCustomerAsMandatory();
try {
/** @var array{firstname:string,lastname:string,birth_date:string,phone?:string,address?:string,postcode:string,city:string,opt_in?:bool} $data */
$data = [
'firstname' => $input->firstname,
'lastname' => $input->lastname,
'birth_date' => $input->birthDate,
'postcode' => $input->postcode,
'city' => $input->city,
'opt_in' => $input->optIn,
];
if ($input->phone !== null) {
$data['phone'] = $input->phone;
}
if ($input->address !== null) {
$data['address'] = $input->address;
}
$result = $this->crmService->updateCustomerInfos(
$customer,
$data
);
return new UpdateCustomerOutput($result);
} catch (\Throwable $e) {
report($e);
return new UpdateCustomerOutput(false);
}
}
}

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Crm;
namespace App\Cqs\Actions\Crm;
use App\Contracts\ActionInput;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Crm;
namespace App\Cqs\Actions\Crm;
use Domain\Models\ValueObjects\CrmCustomer;
use Illuminate\Validation\ValidationException;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Crm;
namespace App\Cqs\Actions\Crm;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -12,7 +12,7 @@ use Infrastructure\Adapters\Services\AppCustomerAuthService;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Crm\UpdateCustomerPasswordInput, \App\Actions\Crm\UpdateCustomerPasswordOutput>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Crm\UpdateCustomerPasswordInput, \App\Cqs\Actions\Crm\UpdateCustomerPasswordOutput>
*/
final class UpdateCustomerPassword implements Action
{

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Crm;
namespace App\Cqs\Actions\Crm;
use App\Contracts\ActionInput;
use Webmozart\Assert\Assert;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Crm;
namespace App\Cqs\Actions\Crm;
use Domain\Models\ValueObjects\CrmCustomer;
use Illuminate\Validation\ValidationException;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Customers;
namespace App\Cqs\Actions\Customers;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -21,7 +21,7 @@ use Shared\ValueObjects\CrmHashcode;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Customers\RegisterCustomerInput, \App\Models\Customer>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Customers\RegisterCustomerInput, \App\Models\Customer>
*/
final class RegisterCustomer implements Action
{
@ -33,7 +33,7 @@ final class RegisterCustomer implements Action
}
/**
* @param \App\Actions\Customers\RegisterCustomerInput $input
* @param \App\Cqs\Actions\Customers\RegisterCustomerInput $input
*
* @throws ValidationException
* @throws \UnexpectedValueException

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Customers;
namespace App\Cqs\Actions\Customers;
use App\Contracts\ActionInput;
use Domain\Models\ValueObjects\Code;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Discounts;
namespace App\Cqs\Actions\Discounts;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -12,12 +12,12 @@ use Illuminate\Support\Carbon;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Discounts\CreateDiscountInput, \App\Models\Discount>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Discounts\CreateDiscountInput, \App\Models\Discount>
*/
final class CreateDiscount implements Action
{
/**
* @param \App\Actions\Discounts\CreateDiscountInput $input
* @param \App\Cqs\Actions\Discounts\CreateDiscountInput $input
*/
public function __invoke(ActionInput $input): Discount
{

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Discounts;
namespace App\Cqs\Actions\Discounts;
use App\Contracts\ActionInput;
use Domain\Enums\DiscountType;

View file

@ -2,19 +2,19 @@
declare(strict_types=1);
namespace App\Actions\Discounts;
namespace App\Cqs\Actions\Discounts;
use App\Contracts\Action;
use App\Contracts\ActionInput;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Discounts\DeleteDiscountInput, bool>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Discounts\DeleteDiscountInput, bool>
*/
final class DeleteDiscount implements Action
{
/**
* @param \App\Actions\Discounts\DeleteDiscountInput $input
* @param \App\Cqs\Actions\Discounts\DeleteDiscountInput $input
*/
public function __invoke(ActionInput $input): bool
{

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Discounts;
namespace App\Cqs\Actions\Discounts;
use App\Contracts\ActionInput;
use App\Models\Discount;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Discounts;
namespace App\Cqs\Actions\Discounts;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -12,12 +12,12 @@ use Illuminate\Support\Carbon;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Discounts\UpdateDiscountInput, \App\Models\Discount>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Discounts\UpdateDiscountInput, \App\Models\Discount>
*/
final class UpdateDiscount implements Action
{
/**
* @param \App\Actions\Discounts\UpdateDiscountInput $input
* @param \App\Cqs\Actions\Discounts\UpdateDiscountInput $input
*/
public function __invoke(ActionInput $input): Discount
{

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Discounts;
namespace App\Cqs\Actions\Discounts;
use App\Contracts\ActionInput;
use App\Models\Discount;

View file

@ -0,0 +1,106 @@
<?php
declare(strict_types=1);
namespace App\Cqs\Actions\Employee;
use App\Contracts\Action;
use App\Contracts\ActionInput;
use App\Services\ArcadiaEmployee;
use App\Services\EmployeeCsvImportLineService as ServicesEmployeeCsvImportLine;
use App\Services\EmployeeCsvReaderService;
use App\Services\EmployeeUpsertService;
use Domain\Models\ValueObjects\Matricule;
use Domain\Models\ValueObjects\ShopperEstablishmentCode;
use Domain\Models\ValueObjects\ShopperServiceCode;
use Domain\Models\ValueObjects\ShopperSiteCode;
use Psr\Log\LoggerInterface;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Cqs\Actions\Employee\ImportEmployeesInput, \App\Cqs\Actions\Employee\ImportEmployeesOutput>
*/
final class ImportEmployees implements Action
{
public function __construct(
private readonly LoggerInterface $logger,
private readonly EmployeeCsvReaderService $employeeCsvReaderService,
private readonly EmployeeUpsertService $employeeUpsertService,
) {
}
/** @param \App\Cqs\Actions\Employee\ImportEmployeesInput $input */
public function __invoke(ActionInput $input): ImportEmployeesOutput
{
Assert::isAOf($input, ImportEmployeesInput::class);
$csvLines = $this->employeeCsvReaderService->importEmployeesFromCsv($input->inputStream);
$this->logger->debug('Retrieved employees from CSV.', [
'count' => count([...$csvLines]),
]);
$csvErrors = array_filter(
$csvLines,
fn ($employee) => is_string($employee)
);
$importedEmployees = array_map(
fn (ServicesEmployeeCsvImportLine $csvLine) => $this->mapToArcadiaEmployee($csvLine),
array_filter(
$csvLines,
fn ($employee) => $employee instanceof ServicesEmployeeCsvImportLine
)
);
$employees = array_filter(
$importedEmployees,
fn ($employee) => $employee instanceof ArcadiaEmployee
);
$mappingErrors = array_filter(
$importedEmployees,
fn ($employee) => is_string($employee)
);
$result = $this->employeeUpsertService->upsertEmployees($employees);
$totalInserted = $result->insertedCount;
$totalUpdated = $result->updatedCount;
$errors = array_values([
...$csvErrors,
...$mappingErrors,
...$result->errors,
]);
$this->logger->info('Employee synchronization completed successfully.', [
'total_inserted' => $totalInserted,
'total_updated' => $totalUpdated,
'errors_count' => count($errors),
]);
return new ImportEmployeesOutput(
insertedCount: $totalInserted,
updatedCount: $totalUpdated,
errors: $errors,
);
}
private function mapToArcadiaEmployee(ServicesEmployeeCsvImportLine $csvLine): ArcadiaEmployee | string
{
try {
return new ArcadiaEmployee(
matricule: new Matricule($csvLine->matricule),
lastname: $csvLine->lastName,
firstname: $csvLine->firstName,
startDate: $csvLine->startDate,
endDate: $csvLine->endDate ?? $csvLine->expectedEndDate,
etablissement: new ShopperEstablishmentCode($csvLine->establishment),
site: new ShopperSiteCode($csvLine->site),
service: new ShopperServiceCode($csvLine->service),
);
} catch (\Throwable $e) {
return "Matricule {$csvLine->matricule}: {$e->getMessage()}";
}
}
}

View file

@ -0,0 +1,18 @@
<?php
declare(strict_types=1);
namespace App\Cqs\Actions\Employee;
use App\Contracts\ActionInput;
final readonly class ImportEmployeesInput implements ActionInput
{
public function __construct(
public \SplFileObject $inputStream
) {
if (! $inputStream->isReadable()) {
throw new \InvalidArgumentException('Input stream must be readable.');
}
}
}

View file

@ -0,0 +1,23 @@
<?php
declare(strict_types=1);
namespace App\Cqs\Actions\Employee;
use Webmozart\Assert\Assert;
final readonly class ImportEmployeesOutput
{
/**
* @param array<int, string> $errors
*/
public function __construct(
public int $insertedCount,
public int $updatedCount,
public array $errors
) {
Assert::greaterThanEq($insertedCount, 0);
Assert::greaterThanEq($updatedCount, 0);
Assert::allString($errors);
}
}

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Employee;
namespace App\Cqs\Actions\Employee;
use App\Contracts\Action;
use App\Contracts\ActionInput;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Faqs;
namespace App\Cqs\Actions\Faqs;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -10,12 +10,12 @@ use App\Models\Faq;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Faqs\CreateFaqInput, \App\Models\Faq>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Faqs\CreateFaqInput, \App\Models\Faq>
*/
final class CreateFaq implements Action
{
/**
* @param \App\Actions\Faqs\CreateFaqInput $input
* @param \App\Cqs\Actions\Faqs\CreateFaqInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): Faq

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Faqs;
namespace App\Cqs\Actions\Faqs;
use App\Contracts\ActionInput;
use Webmozart\Assert\Assert;

View file

@ -2,19 +2,19 @@
declare(strict_types=1);
namespace App\Actions\Faqs;
namespace App\Cqs\Actions\Faqs;
use App\Contracts\Action;
use App\Contracts\ActionInput;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Faqs\DeleteFaqInput, void>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Faqs\DeleteFaqInput, void>
*/
final class DeleteFaq implements Action
{
/**
* @param \App\Actions\Faqs\DeleteFaqInput $input
* @param \App\Cqs\Actions\Faqs\DeleteFaqInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): void

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Faqs;
namespace App\Cqs\Actions\Faqs;
use App\Contracts\ActionInput;
use App\Models\Faq;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Faqs;
namespace App\Cqs\Actions\Faqs;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -10,12 +10,12 @@ use App\Models\Faq;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Faqs\UpdateFaqInput, \App\Models\Faq>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Faqs\UpdateFaqInput, \App\Models\Faq>
*/
final class UpdateFaq implements Action
{
/**
* @param \App\Actions\Faqs\UpdateFaqInput $input
* @param \App\Cqs\Actions\Faqs\UpdateFaqInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): Faq

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Faqs;
namespace App\Cqs\Actions\Faqs;
use App\Contracts\ActionInput;
use App\Models\Faq;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Orders;
namespace App\Cqs\Actions\Orders;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -11,7 +11,7 @@ use Domain\Services\OrderTunnelService;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Orders\ApplyPickTimeSlotInput, ?\Domain\Models\ValueObjects\PickupTimeSlot>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Orders\ApplyPickTimeSlotInput, ?\Domain\Models\ValueObjects\PickupTimeSlot>
*/
final class ApplyPickTimeSlot implements Action
{
@ -21,7 +21,7 @@ final class ApplyPickTimeSlot implements Action
}
/**
* @param \App\Actions\Orders\ApplyPickTimeSlotInput $input
* @param \App\Cqs\Actions\Orders\ApplyPickTimeSlotInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): ?PickupTimeSlot

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Orders;
namespace App\Cqs\Actions\Orders;
use App\Contracts\ActionInput;
use Carbon\CarbonInterface;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Orders;
namespace App\Cqs\Actions\Orders;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -10,7 +10,7 @@ use Domain\Services\OrderService as DomainOrderService;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Orders\CancelOrderInput, void>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Orders\CancelOrderInput, void>
*/
final class CancelOrder implements Action
{
@ -20,7 +20,7 @@ final class CancelOrder implements Action
}
/**
* @param \App\Actions\Orders\CancelOrderInput $input
* @param \App\Cqs\Actions\Orders\CancelOrderInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): void

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Orders;
namespace App\Cqs\Actions\Orders;
use App\Contracts\ActionInput;
use App\Models\Order;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Orders;
namespace App\Cqs\Actions\Orders;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -11,7 +11,7 @@ use Domain\Services\OrderTunnelService;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Orders\FinalizeOrderInput, \Domain\Models\ValueObjects\OrderReference>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Orders\FinalizeOrderInput, \Domain\Models\ValueObjects\OrderReference>
*/
final class FinalizeOrder implements Action
{
@ -21,7 +21,7 @@ final class FinalizeOrder implements Action
}
/**
* @param \App\Actions\Orders\FinalizeOrderInput $input
* @param \App\Cqs\Actions\Orders\FinalizeOrderInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): OrderReference

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Orders;
namespace App\Cqs\Actions\Orders;
use App\Contracts\ActionInput;
use Domain\Models\ValueObjects\Entities\ShopperId;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Orders;
namespace App\Cqs\Actions\Orders;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -10,7 +10,7 @@ use Domain\Services\OrderTunnelService;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Orders\InitializeOrderTunnelInput, void>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Orders\InitializeOrderTunnelInput, void>
*/
final class InitializeOrderTunnel implements Action
{
@ -20,7 +20,7 @@ final class InitializeOrderTunnel implements Action
}
/**
* @param \App\Actions\Orders\InitializeOrderTunnelInput $input
* @param \App\Cqs\Actions\Orders\InitializeOrderTunnelInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): void

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Orders;
namespace App\Cqs\Actions\Orders;
use App\Contracts\ActionInput;
use Domain\Models\Entities\Basket;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Pages;
namespace App\Cqs\Actions\Pages;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -10,12 +10,12 @@ use App\Models\Page;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Pages\UpdatePageInput, \App\Models\Page>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Pages\UpdatePageInput, \App\Models\Page>
*/
final class UpdatePage implements Action
{
/**
* @param \App\Actions\Pages\UpdatePageInput $input
* @param \App\Cqs\Actions\Pages\UpdatePageInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): Page

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Pages;
namespace App\Cqs\Actions\Pages;
use App\Contracts\ActionInput;
use App\Models\Page;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\PickupExceptions;
namespace App\Cqs\Actions\PickupExceptions;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -10,12 +10,12 @@ use App\Models\PickupException;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\PickupExceptions\CreatePickupExceptionInput, \App\Models\PickupException>
* @implements \App\Contracts\Action<\App\Cqs\Actions\PickupExceptions\CreatePickupExceptionInput, \App\Models\PickupException>
*/
final class CreatePickupException implements Action
{
/**
* @param \App\Actions\PickupExceptions\CreatePickupExceptionInput $input
* @param \App\Cqs\Actions\PickupExceptions\CreatePickupExceptionInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): PickupException

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\PickupExceptions;
namespace App\Cqs\Actions\PickupExceptions;
use App\Contracts\ActionInput;
use Domain\Enums\RepeatFrequency;

View file

@ -2,19 +2,19 @@
declare(strict_types=1);
namespace App\Actions\PickupExceptions;
namespace App\Cqs\Actions\PickupExceptions;
use App\Contracts\Action;
use App\Contracts\ActionInput;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\PickupExceptions\DeletePickupExceptionInput, bool>
* @implements \App\Contracts\Action<\App\Cqs\Actions\PickupExceptions\DeletePickupExceptionInput, bool>
*/
final class DeletePickupException implements Action
{
/**
* @param \App\Actions\PickupExceptions\DeletePickupExceptionInput $input
* @param \App\Cqs\Actions\PickupExceptions\DeletePickupExceptionInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): bool

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\PickupExceptions;
namespace App\Cqs\Actions\PickupExceptions;
use App\Contracts\ActionInput;
use App\Models\PickupException;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\PickupExceptions;
namespace App\Cqs\Actions\PickupExceptions;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -10,12 +10,12 @@ use App\Models\PickupException;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\PickupExceptions\UpdatePickupExceptionInput, \App\Models\PickupException>
* @implements \App\Contracts\Action<\App\Cqs\Actions\PickupExceptions\UpdatePickupExceptionInput, \App\Models\PickupException>
*/
final class UpdatePickupException implements Action
{
/**
* @param \App\Actions\PickupExceptions\UpdatePickupExceptionInput $input
* @param \App\Cqs\Actions\PickupExceptions\UpdatePickupExceptionInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): PickupException

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\PickupExceptions;
namespace App\Cqs\Actions\PickupExceptions;
use App\Contracts\ActionInput;
use App\Models\PickupException;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\ProductIncos;
namespace App\Cqs\Actions\ProductIncos;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -11,7 +11,7 @@ use App\Services\ArcadiaIncoService;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\ProductIncos\AssociateProductIncoInput, \App\Models\ProductInco>
* @implements \App\Contracts\Action<\App\Cqs\Actions\ProductIncos\AssociateProductIncoInput, \App\Models\ProductInco>
*/
final class AssociateProductInco implements Action
{
@ -21,7 +21,7 @@ final class AssociateProductInco implements Action
}
/**
* @param \App\Actions\ProductIncos\AssociateProductIncoInput $input
* @param \App\Cqs\Actions\ProductIncos\AssociateProductIncoInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): ProductInco

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\ProductIncos;
namespace App\Cqs\Actions\ProductIncos;
use App\Contracts\ActionInput;
use App\Models\Product;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\ProductIncos;
namespace App\Cqs\Actions\ProductIncos;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -11,7 +11,7 @@ use App\Services\ArcadiaIncoService;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\ProductIncos\SyncProductIncoInput, \App\Models\ProductInco>
* @implements \App\Contracts\Action<\App\Cqs\Actions\ProductIncos\SyncProductIncoInput, \App\Models\ProductInco>
*/
final class SyncProductInco implements Action
{
@ -21,7 +21,7 @@ final class SyncProductInco implements Action
}
/**
* @param \App\Actions\ProductIncos\SyncProductIncoInput $input
* @param \App\Cqs\Actions\ProductIncos\SyncProductIncoInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): ProductInco

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\ProductIncos;
namespace App\Cqs\Actions\ProductIncos;
use App\Contracts\ActionInput;
use App\Models\Product;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\ProductIncos;
namespace App\Cqs\Actions\ProductIncos;
use App\Contracts\Action;
use App\Contracts\ActionInput;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Products;
namespace App\Cqs\Actions\Products;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -13,12 +13,12 @@ use Illuminate\Support\Str;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Products\CreateProductInput, \App\Models\Product>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Products\CreateProductInput, \App\Models\Product>
*/
final class CreateProduct implements Action
{
/**
* @param \App\Actions\Products\CreateProductInput $input
* @param \App\Cqs\Actions\Products\CreateProductInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): Product

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Products;
namespace App\Cqs\Actions\Products;
use App\Contracts\ActionInput;
use Carbon\CarbonInterface;

View file

@ -2,19 +2,19 @@
declare(strict_types=1);
namespace App\Actions\Products;
namespace App\Cqs\Actions\Products;
use App\Contracts\Action;
use App\Contracts\ActionInput;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Products\DeleteProductInput, bool>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Products\DeleteProductInput, bool>
*/
final class DeleteProduct implements Action
{
/**
* @param \App\Actions\Products\DeleteProductInput $input
* @param \App\Cqs\Actions\Products\DeleteProductInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): bool

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Products;
namespace App\Cqs\Actions\Products;
use App\Contracts\ActionInput;
use App\Models\Product;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Products;
namespace App\Cqs\Actions\Products;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -13,12 +13,12 @@ use Illuminate\Support\Str;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Products\UpdateProductInput, \App\Models\Product>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Products\UpdateProductInput, \App\Models\Product>
*/
final class UpdateProduct implements Action
{
/**
* @param \App\Actions\Products\UpdateProductInput $input
* @param \App\Cqs\Actions\Products\UpdateProductInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): Product

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Products;
namespace App\Cqs\Actions\Products;
use App\Contracts\ActionInput;
use App\Models\Product;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Ranges;
namespace App\Cqs\Actions\Ranges;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -10,12 +10,12 @@ use App\Models\Range;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Ranges\CreateRangeInput, \App\Models\Range>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Ranges\CreateRangeInput, \App\Models\Range>
*/
final class CreateRange implements Action
{
/**
* @param \App\Actions\Ranges\CreateRangeInput $input
* @param \App\Cqs\Actions\Ranges\CreateRangeInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): Range

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Ranges;
namespace App\Cqs\Actions\Ranges;
use App\Contracts\ActionInput;
use Domain\Models\ValueObjects\PictureMetadata;

View file

@ -2,19 +2,19 @@
declare(strict_types=1);
namespace App\Actions\Ranges;
namespace App\Cqs\Actions\Ranges;
use App\Contracts\Action;
use App\Contracts\ActionInput;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Ranges\DeleteRangeInput, bool>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Ranges\DeleteRangeInput, bool>
*/
final class DeleteRange implements Action
{
/**
* @param \App\Actions\Ranges\DeleteRangeInput $input
* @param \App\Cqs\Actions\Ranges\DeleteRangeInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): bool

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Ranges;
namespace App\Cqs\Actions\Ranges;
use App\Contracts\ActionInput;
use App\Models\Range;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Ranges;
namespace App\Cqs\Actions\Ranges;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -10,12 +10,12 @@ use App\Models\Range;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Ranges\UpdateRangeInput, \App\Models\Range>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Ranges\UpdateRangeInput, \App\Models\Range>
*/
final class UpdateRange implements Action
{
/**
* @param \App\Actions\Ranges\UpdateRangeInput $input
* @param \App\Cqs\Actions\Ranges\UpdateRangeInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): Range

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Ranges;
namespace App\Cqs\Actions\Ranges;
use App\Contracts\ActionInput;
use App\Models\Range;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Settings;
namespace App\Cqs\Actions\Settings;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -11,12 +11,12 @@ use Domain\Models\ValueObjects\ShopperSiteCode;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Settings\UpdateSettingsInput, \App\Models\Setting>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Settings\UpdateSettingsInput, \App\Models\Setting>
*/
final class UpdateSettings implements Action
{
/**
* @param \App\Actions\Settings\UpdateSettingsInput $input
* @param \App\Cqs\Actions\Settings\UpdateSettingsInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): Setting

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Settings;
namespace App\Cqs\Actions\Settings;
use App\Contracts\ActionInput;
use Domain\Models\ValueObjects\ShopperSiteCode;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Shops;
namespace App\Cqs\Actions\Shops;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -10,12 +10,12 @@ use App\Models\Shop;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Shops\CreateShopInput, \App\Models\Shop>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Shops\CreateShopInput, \App\Models\Shop>
*/
final class CreateShop implements Action
{
/**
* @param \App\Actions\Shops\CreateShopInput $input
* @param \App\Cqs\Actions\Shops\CreateShopInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): Shop

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Shops;
namespace App\Cqs\Actions\Shops;
use App\Contracts\ActionInput;
use Domain\Models\ValueObjects\Coordinates;

View file

@ -2,19 +2,19 @@
declare(strict_types=1);
namespace App\Actions\Shops;
namespace App\Cqs\Actions\Shops;
use App\Contracts\Action;
use App\Contracts\ActionInput;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Shops\DeleteShopInput, bool>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Shops\DeleteShopInput, bool>
*/
final class DeleteShop implements Action
{
/**
* @param \App\Actions\Shops\DeleteShopInput $input
* @param \App\Cqs\Actions\Shops\DeleteShopInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): bool

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Shops;
namespace App\Cqs\Actions\Shops;
use App\Contracts\ActionInput;
use App\Models\Shop;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Shops;
namespace App\Cqs\Actions\Shops;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -10,12 +10,12 @@ use App\Models\Shop;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Shops\UpdateShopInput, \App\Models\Shop>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Shops\UpdateShopInput, \App\Models\Shop>
*/
final class UpdateShop implements Action
{
/**
* @param \App\Actions\Shops\UpdateShopInput $input
* @param \App\Cqs\Actions\Shops\UpdateShopInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): Shop

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Shops;
namespace App\Cqs\Actions\Shops;
use App\Contracts\ActionInput;
use App\Models\Shop;

View file

@ -2,19 +2,19 @@
declare(strict_types=1);
namespace App\Actions\Shops;
namespace App\Cqs\Actions\Shops;
use App\Contracts\Action;
use App\Contracts\ActionInput;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Shops\UpdateShopPickupExceptionsInput, bool>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Shops\UpdateShopPickupExceptionsInput, bool>
*/
final class UpdateShopPickupExceptions implements Action
{
/**
* @param \App\Actions\Shops\UpdateShopPickupExceptionsInput $input
* @param \App\Cqs\Actions\Shops\UpdateShopPickupExceptionsInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): bool

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Shops;
namespace App\Cqs\Actions\Shops;
use App\Contracts\ActionInput;
use App\Models\Shop;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Slides;
namespace App\Cqs\Actions\Slides;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -11,12 +11,12 @@ use Illuminate\Support\Carbon;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Slides\CreateSlideInput, \App\Models\Slide>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Slides\CreateSlideInput, \App\Models\Slide>
*/
final class CreateSlide implements Action
{
/**
* @param \App\Actions\Slides\CreateSlideInput $input
* @param \App\Cqs\Actions\Slides\CreateSlideInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): Slide

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Slides;
namespace App\Cqs\Actions\Slides;
use App\Contracts\ActionInput;
use Domain\Models\ValueObjects\DatePeriod;

View file

@ -2,19 +2,19 @@
declare(strict_types=1);
namespace App\Actions\Slides;
namespace App\Cqs\Actions\Slides;
use App\Contracts\Action;
use App\Contracts\ActionInput;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Slides\DeleteSlideInput, bool>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Slides\DeleteSlideInput, bool>
*/
final class DeleteSlide implements Action
{
/**
* @param \App\Actions\Slides\DeleteSlideInput $input
* @param \App\Cqs\Actions\Slides\DeleteSlideInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): bool

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Slides;
namespace App\Cqs\Actions\Slides;
use App\Contracts\ActionInput;
use App\Models\Slide;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Slides;
namespace App\Cqs\Actions\Slides;
use App\Contracts\Action;
use App\Contracts\ActionInput;
@ -11,12 +11,12 @@ use Illuminate\Support\Carbon;
use Webmozart\Assert\Assert;
/**
* @implements \App\Contracts\Action<\App\Actions\Slides\UpdateSlideInput, \App\Models\Slide>
* @implements \App\Contracts\Action<\App\Cqs\Actions\Slides\UpdateSlideInput, \App\Models\Slide>
*/
final class UpdateSlide implements Action
{
/**
* @param \App\Actions\Slides\UpdateSlideInput $input
* @param \App\Cqs\Actions\Slides\UpdateSlideInput $input
*/
#[\Override]
public function __invoke(ActionInput $input): Slide

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace App\Actions\Slides;
namespace App\Cqs\Actions\Slides;
use App\Contracts\ActionInput;
use App\Models\Slide;

Some files were not shown because too many files have changed in this diff Show more