Commit Graph

4201 Commits

Author SHA1 Message Date
870907804b Refactor PersonCreate flow to introduce PersonCreateDTO
- Replaced `Person` entity binding with `PersonCreateDTO` in `CreationPersonType` to enable better data handling.
- Added `PersonCreateDTOFactory` for creating and mapping `PersonCreateDTO` instances.
- Extracted `newAction` logic into `PersonCreateController` for clearer separation of responsibilities.
- Updated `PersonIdentifiersDataMapper` and `PersonIdentifierWorker` to support default identifier values.
- Adjusted related services, configurations, and templates accordingly.
2025-10-21 14:24:43 +02:00
e9e6c05e3d Refactor PersonEdit flow to introduce PersonEditDTO
- Replaced `Person` entity binding with `PersonEditDTO` in `PersonType` to decouple data transfer and entity manipulation.
- Added `PersonEditDTOFactory` for creating and mapping `PersonEditDTO` instances.
- Simplified `PersonAltNameDataMapper` and `PersonIdentifiersDataMapper`.
- Updated `PersonEditController` to use `PersonEditDTO` for better separation of concerns.
- Adjusted related tests, configurations, and templates accordingly.
2025-10-21 13:22:04 +02:00
189a9337b4 Search person by phonenumber: allow searching though identifier and phonenumber 2025-10-07 18:28:59 +02:00
c030232a73 Temporarily desactivate the search by phonenumber 2025-10-07 11:53:24 +02:00
8740025dbd Handle case where form is null in PersonIdentifiersDataMapper
- Added a null check for forms in `PersonIdentifiersDataMapper` to prevent potential errors: a form is not present at all steps (on creation / on edit)
- Skips processing if the form is not found.
2025-10-07 11:40:01 +02:00
60eab628ee Clarify documentation in PersonIdentifierManagerInterface and fix formatting in SQL query
- Updated PHPDoc in `getWorkers` method to explicitly state that only active definitions are returned.
- Standardized number formatting in SQL query for better readability and consistency.
2025-10-07 11:24:17 +02:00
1fd559b722 Refactor validation of PersonIdentifier 2025-10-07 09:59:52 +02:00
b526e802d7 Add validation logic and tests for StringIdentifier
- Implemented `validate` method in `StringIdentifier` to enforce `only_numbers` and `fixed_length` constraints.
- Created `StringIdentifierValidationTest` to cover validation rules.
2025-10-06 15:16:20 +02:00
60937152c3 Add validate method to PersonIdentifierEngineInterface and related classes
- Introduced `validate` method in `PersonIdentifierEngineInterface`.
- Added `ValidIdentifierConstraint` to `PersonIdentifier` entity.
- Updated `PersonIdentifierWorker` to implement the new `validate` method.
2025-10-06 15:16:12 +02:00
e566f60a4a Apply minor UI update to PersonChooseModal.vue create button
- Added `btn btn-submit` CSS classes to the create button for improved styling.
- Removed outdated and commented-out `on-the-fly` implementation.
2025-10-01 10:51:58 +02:00
c06531cddb Merge branch 'ticket-app-master' into ticket/64-identifiants-person 2025-09-30 16:01:33 +02:00
Boris Waaub
b43aeebc3c FIX des bugs du merge request 884 2025-09-30 13:49:04 +00:00
be3b9f0f56 Fix issue in PersonIdentifierDataMapper: find the PersonIdentifier against his definition 2025-09-26 15:03:02 +02:00
ee006f55d6 Add unique constraint for definition_id and person_id in PersonIdentifier
- Update entity to include the new database-level unique constraint.
- Add migration script to apply the unique constraint and handle rollback.
2025-09-26 14:44:31 +02:00
13b1c45271 Simplify and modernize entity components and translations for better performance and consistency
- Replace fragmented name rendering with unified `person.text` in Vue components.
- Migrate `GenderIconRenderBox` to use Bootstrap icons and TypeScript.
- Introduce `GenderTranslation` type and helper for gender rendering.
- Refactor `PersonRenderBox` to streamline rendering logic and improve maintainability. Migrate to typescript
- Update French translations for consistency with new gender rendering.
2025-09-26 14:25:38 +02:00
ad2b6d63ac Handle identifier uniqueness validation for same Person in UniqueIdentifierConstraintValidator
- Add logic to skip validation errors for duplicate identifiers belonging to the same Person.
- Update test case to verify no violation is raised for such duplicates.
- Refactor repository query logic to support the new validation scenario.
2025-09-26 13:55:40 +02:00
bfbde078b7 Add personId serialization to PersonJsonNormalizer
- Inject `PersonIdRenderingInterface` into `PersonJsonNormalizer` for generating `personId`.
- Update `PersonJsonNormalizer` to include `personId` in serialized output.
- Extend TypeScript definitions to support `personId` property.
- Enhance unit tests to cover `personId` serialization.
2025-09-25 15:00:11 +02:00
d42a1296c4 Add integration and unit tests for PersonJsonNormalizer to verify normalization behavior
- Introduce `PersonJsonNormalizerIntegrationTest` to test database-driven normalization scenarios.
- Expand `PersonJsonNormalizerTest` with cases covering minimal group normalization and extended keys.
- Refactor test setup to use mock objects and improve coverage of normalization logic.
2025-09-25 14:51:39 +02:00
4b7e3c1601 Restrict deletion of identifier_definition to prevent errors and ensure data integrity
- Updated foreign key constraint on `chill_person_identifier.definition_id` to use `ON DELETE RESTRICT` instead of `ON DELETE CASCADE`.
- Adjusted migration script to handle both the upgrade and downgrade paths for the new restriction.
2025-09-24 12:40:37 +02:00
6ea9af588b Replace value with canonical in PersonIdentifier unique constraint, repository logic, and tests
- Update unique constraint on `PersonIdentifier` to use `canonical` instead of `value`.
- Refactor repository method `findByDefinitionAndValue` to `findByDefinitionAndCanonical`, updating logic accordingly.
- Adjust validation logic in `UniqueIdentifierConstraintValidator` to align with the new canonical-based approach.
- Modify related integration and unit tests to support the changes.
- Inject `PersonIdentifierManagerInterface` into the repository to handle canonical value generation.
2025-09-24 12:40:16 +02:00
0fd76d3fa8 Add PersonIdentifierManagerInterface to PersonACLAwareRepository and enhance search logic for identifiers
- Inject `PersonIdentifierManagerInterface` into `PersonACLAwareRepository` for improved identifier handling.
- Update search queries to include logic for filtering and matching `PersonIdentifier` values.
- Modify test cases to support the new dependency and ensure proper coverage.
2025-09-24 00:01:28 +02:00
34af53130b Refactor and enhance ValidationException handling across types and components
- Simplify and extend type definitions in `types.ts` for dynamic and normalized keys.
- Update `ValidationExceptionInterface` to include new methods for filtering violations.
- Refactor `apiMethods.ts` to leverage updated exception types and key parsing.
- Adjust `WritePersonViolationMap` for stricter type definitions.
- Enhance `PersonEdit.vue` to use refined violation methods, improving validation error handling.
2025-09-23 21:26:12 +02:00
a1fd395868 Add unique constraint for PersonIdentifier, implement UniqueIdentifierConstraint with validation logic, and include supporting tests
- Introduce `UniqueIdentifierConstraint` and its validator for ensuring identifier uniqueness.
- Add a database-level unique constraint on `PersonIdentifier` (`definition_id`, `value`).
- Implement repository method to fetch identifiers by definition and value.
- Include integration and unit tests for validation and repository functionality.
- Update `Person` entity with `Assert\Valid` annotation for `identifiers`.
2025-09-23 12:36:30 +02:00
b8a7cbb321 Add identifiers field in CreationPersonType and handle on_create logic in PersonIdentifiersType
- Introduce `identifiers` field to `CreationPersonType` with a dedicated form type.
- Update `PersonIdentifiersType` to support `step` option (`on_create` and `on_edit`).
- Skip certain identifiers in `on_create` step based on presence configuration.
- Adjust Twig template to display `identifiers` conditionally.
2025-09-22 14:03:59 +02:00
6124eb9e34 Fix isEmpty logic in StringIdentifier: Correct boolean comparison for trimmed content. 2025-09-22 14:03:58 +02:00
a5b06de92a Refactor validation handling in PersonEdit.vue: Replace hasValidationError and validationError with hasViolation and violationTitles. Introduce hasViolationWithParameter and violationTitlesWithParameter for enhanced field validation. Update RequiredIdentifierConstraint messages, improve API error mapping, and refine ValidationException structure with violationsList. Add tests and translations for identifier validation. 2025-09-22 14:03:58 +02:00
52404956d2 Trim PersonIdentifier values during denormalization, implement RequiredIdentifierConstraint and validator, and add tests for empty value validation. 2025-09-22 14:03:57 +02:00
4207efd6bf Remove empty PersonIdentifier values during denormalization and add isEmpty logic to PersonIdentifierWorker. Include tests for empty value handling. 2025-09-22 14:03:57 +02:00
840fde4ad4 Filter PersonIdentifierWorker by presence during initialization and update type definitions. Add presence field to PersonIdentifierWorkerNormalizer. 2025-09-22 14:03:56 +02:00
3611ea2518 Refactor PersonIdentifierDefinition: Replace fully qualified \Doctrine\DBAL\Types\Types references with simplified Types aliases. 2025-09-22 14:03:55 +02:00
bbd4292cb9 Enhance PersonEdit form: Add birthdate input with validation, improve field error handling using hasValidationError, refactor birthDate to respect timezone offsets, and update translations for better user feedback. Replace DateTimeCreate with DateTimeWrite across types and components. 2025-09-22 14:03:55 +02:00
c19206be0c Enhance validation in PersonEdit: Introduce hasValidationError and validationError helpers for form inputs. Improve error feedback for fields such as firstName, lastName, gender, and others. Refactor postPerson to handle validation exceptions and map errors to specific fields. Update related methods, styles, and API error type definitions. 2025-09-22 14:03:53 +02:00
4a73aaae94 Replace PhonenumberConstraint with MisdPhoneNumberConstraint across entities, deprecate outdated validation logic, and remove unused methods for improved phone number validation. 2025-09-22 14:03:53 +02:00
ff2c567d05 Update default center type fallback in PersonEdit.vue to "center" for consistency. 2025-09-22 14:03:52 +02:00
a734e84f28 Remove unused Person.vue import from types.ts for cleanup and improved code maintainability. 2025-09-22 14:03:51 +02:00
4367ed086e Enhance person creation workflow: Add onPersonCreated event handling in Create, CreateModal, and AddPersons. Update type definitions and integrate event emission for streamlined person management. 2025-09-22 14:03:51 +02:00
3227bfcd3a Remove serializer.yaml configuration, update PersonJsonNormalizer and PersonJsonDenormalizer for improved logic handling, adjust type hints in closures, and rename id to definition_id in PersonIdentifierWorkerNormalizer. 2025-09-22 14:03:50 +02:00
8d29fb260a Add validation and support for identifiers in PersonJsonDenormalizer, enhance altNames handling, and update tests for improved coverage. Adjust PersonIdentifierManager to handle identifier definitions by ID. 2025-09-22 14:03:50 +02:00
d9b730627f Introduce PersonJsonReadDenormalizer and PersonJsonDenormalizer to separate responsibilities for handling person denormalization. Add corresponding test classes for improved coverage. Refactor PersonJsonNormalizer to remove denormalization logic. 2025-09-22 14:03:49 +02:00
27548ad654 Add support for person identifiers workflow: update PersonEdit component, API methods, and modals for identifier handling during person creation. Adjust related types for improved consistency. 2025-09-22 14:03:48 +02:00
bec7297039 Add an api list of available person identifiers 2025-09-22 14:03:48 +02:00
852523e644 Refactor person management workflow: Introduce SetGender, SetCivility, and SetCenter lightweight interfaces. Replace PersonState with PersonEdit for streamlined type usage. Enhance queryItems logic and API methods for better consistency. Adjust AddPersons modal to handle query input. 2025-09-22 14:03:47 +02:00
c05d0aad47 Refactor person creation workflow: Introduce PersonEdit component and integrate it across Create, Person.vue, and modals for improved modularity. Update type definitions and API methods for consistency. 2025-09-22 14:03:47 +02:00
1c0ed9abc8 Enhance entity creation: Add CreateModal and integrate with AddPersons workflow. 2025-09-22 14:03:42 +02:00
e4fe5bff68 Allow creating new entities directly from AddPersons modal 2025-09-22 14:03:25 +02:00
4c73c4d9d0 Refactor AddPersons modal into a separate PersonChooseModal component for improved modularity and reusability. 2025-09-22 14:03:24 +02:00
Boris Waaub
0ba2cbc1e8 Misc: homepage widget with tickets, and improvements in ticket list 2025-09-16 11:16:57 +00:00
8e2e676e3d Add ticket filtering "byTicketId" 2025-09-15 11:11:40 +02:00
2665e43a61 Merge branch 'master' into ticket-app-master
# Conflicts:
#	.eslint-baseline.json
#	src/Bundle/ChillMainBundle/Entity/User.php
#	src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue
#	src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressMore.vue
#	src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue
#	src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue
#	src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CountrySelection.vue
#	src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/EditPane.vue
#	src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ShowPane.vue
#	src/Bundle/ChillThirdPartyBundle/translations/messages.fr.yml
2025-09-05 18:32:01 +02:00
Boris Waaub
e7c04e34a9 Améliorations du dernier MR multiple-tasks-from-board-78 2025-09-01 13:35:15 +00:00