From e3a6b60fa2ed2f5983986e1dc6beb148488bcadf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Sun, 20 Jul 2025 18:50:33 +0000 Subject: [PATCH] Revert "Merge branch 'ticket/supplementary-comments-on-motive' into 'master'" This reverts merge request !855 --- .../unreleased/Feature-20240530-160003.yaml | 6 - .../unreleased/Feature-20240531-190242.yaml | 6 - .editorconfig | 8 +- .eslint-baseline.json | 930 ++++++--- .prettierrc | 4 - .vscode/launch.json | 30 - .vscode/tasks.json | 23 - CONVENTIONS-fr.md | 2 +- composer.json | 1 - config/bundles.php | 1 - config/packages/chill_ticket.yaml | 4 - .../packages/doctrine_migrations_chill.yaml | 1 - config/routes/chill_ticket.yaml | 2 - .../development/create-a-new-bundle.rst | 98 +- package.json | 4 +- phpunit.xml.dist | 4 - .../Resources/public/vuejs/Activity/App.vue | 20 +- .../Activity/components/ConcernedGroups.vue | 457 ++-- .../ConcernedGroups/PersonBadge.vue | 38 +- .../ConcernedGroups/PersonsBloc.vue | 54 +- .../vuejs/Activity/components/Location.vue | 154 +- .../components/Location/NewLocation.vue | 664 +++--- .../Activity/components/SocialIssuesAcc.vue | 462 +++-- .../SocialIssuesAcc/CheckSocialAction.vue | 74 +- .../SocialIssuesAcc/CheckSocialIssue.vue | 64 +- .../Resources/public/types.ts | 88 +- .../Resources/public/vuejs/Calendar/App.vue | 677 +++--- .../Calendar/Components/CalendarActive.vue | 186 +- .../Resources/public/vuejs/Calendar/api.ts | 42 +- .../Resources/public/vuejs/Calendar/const.ts | 26 +- .../public/vuejs/Calendar/store/utils.ts | 150 +- .../Resources/public/vuejs/Invite/Answer.vue | 208 +- .../public/vuejs/MyCalendarRange/App2.vue | 650 +++--- .../Components/EditLocation.vue | 86 +- .../public/vuejs/MyCalendarRange/i18n.ts | 46 +- .../public/vuejs/MyCalendarRange/index2.ts | 16 +- .../vuejs/MyCalendarRange/store/index.ts | 58 +- .../store/modules/calendarLocals.ts | 172 +- .../store/modules/calendarRanges.ts | 653 +++--- .../store/modules/calendarRemotes.ts | 175 +- .../store/modules/fullcalendar.ts | 128 +- .../MyCalendarRange/store/modules/location.ts | 98 +- .../vuejs/MyCalendarRange/store/modules/me.ts | 26 +- .../CalendarUserSelector.vue | 445 ++-- .../public/vuejs/_components/PickTemplate.vue | 239 +-- .../public/js/async-upload/uploader.ts | 104 +- .../Resources/public/js/generic-doc-api.ts | 8 +- .../public/module/async_upload/index.ts | 187 +- .../public/module/button_download/index.ts | 42 +- .../document_action_buttons_group/index.ts | 118 +- .../Resources/public/types/generic_doc.ts | 54 +- .../Resources/public/types/index.ts | 172 +- .../vuejs/DocumentActionButtonsGroup.vue | 330 +-- .../public/vuejs/DocumentSignature/App.vue | 1470 ++++++------- .../public/vuejs/DocumentSignature/index.ts | 54 +- .../public/vuejs/DropFileWidget/DropFile.vue | 274 +-- .../vuejs/DropFileWidget/DropFileModal.vue | 108 +- .../vuejs/DropFileWidget/DropFileWidget.vue | 122 +- .../Resources/public/vuejs/FileIcon.vue | 70 +- .../StoredObjectButton/ConvertButton.vue | 56 +- .../StoredObjectButton/DesktopEditButton.vue | 116 +- .../StoredObjectButton/DownloadButton.vue | 175 +- .../StoredObjectButton/HistoryButton.vue | 68 +- .../HistoryButton/HistoryButtonList.vue | 70 +- .../HistoryButton/HistoryButtonListItem.vue | 270 +-- .../HistoryButton/HistoryButtonModal.vue | 50 +- .../HistoryButton/RestoreVersionButton.vue | 28 +- .../StoredObjectButton/HistoryButton/api.ts | 40 +- .../StoredObjectButton/WopiEditButton.vue | 56 +- .../vuejs/StoredObjectButton/helpers.ts | 414 ++-- src/Bundle/ChillMainBundle/Entity/User.php | 10 - .../Formatter/SpreadsheetListFormatter.php | 2 - .../Phonenumber/PhonenumberHelper.php | 18 - .../Resources/public/chill/js/date.ts | 212 +- .../Resources/public/lib/api/address.ts | 64 +- .../Resources/public/lib/api/apiMethods.ts | 388 ++-- .../Resources/public/lib/api/export.ts | 20 +- .../Resources/public/lib/api/locations.ts | 4 +- .../Resources/public/lib/api/return_path.ts | 2 +- .../Resources/public/lib/api/user.ts | 30 +- .../public/lib/entity-notification/api.ts | 28 +- .../public/lib/entity-workflow/api.ts | 22 +- .../localizationHelper/localizationHelper.ts | 50 +- .../public/lib/workflow/attachments.ts | 20 +- .../public/module/address-details/index.ts | 76 +- .../public/module/ckeditor5/editor_config.ts | 96 +- .../public/module/ckeditor5/index.ts | 46 +- .../public/module/collection/index.ts | 236 +-- .../module/notification/toggle_read_all.ts | 68 +- .../public/module/pick-entity/index.js | 7 +- .../ChillMainBundle/Resources/public/types.ts | 331 ++- .../Resources/public/vuejs/Address/App.vue | 230 +- .../Address/components/ActionButtons.vue | 48 +- .../vuejs/Address/components/AddAddress.vue | 1734 ++++++++-------- .../components/AddAddress/AddressMap.vue | 191 +- .../components/AddAddress/AddressMore.vue | 280 +-- .../AddAddress/AddressSelection.vue | 414 ++-- .../components/AddAddress/CitySelection.vue | 459 ++-- .../AddAddress/CountrySelection.vue | 140 +- .../vuejs/Address/components/DatePane.vue | 322 +-- .../vuejs/Address/components/EditPane.vue | 335 +-- .../vuejs/Address/components/ShowPane.vue | 359 ++-- .../vuejs/Address/components/SuggestPane.vue | 159 +- .../public/vuejs/DownloadExport/App.vue | 155 +- .../public/vuejs/DownloadExport/index.ts | 4 +- .../public/vuejs/HomepageWidget/App.vue | 252 +-- .../HomepageWidget/DashboardWidgets/News.vue | 42 +- .../DashboardWidgets/NewsItem.vue | 250 +-- .../HomepageWidget/MyAccompanyingCourses.vue | 175 +- .../public/vuejs/HomepageWidget/MyCustoms.vue | 270 +-- .../vuejs/HomepageWidget/MyEvaluations.vue | 227 +- .../vuejs/HomepageWidget/MyNotifications.vue | 196 +- .../public/vuejs/HomepageWidget/MyTasks.vue | 203 +- .../vuejs/HomepageWidget/MyWorkflows.vue | 30 +- .../vuejs/HomepageWidget/MyWorkflowsTable.vue | 156 +- .../public/vuejs/HomepageWidget/MyWorks.vue | 202 +- .../vuejs/HomepageWidget/TabCounter.vue | 18 +- .../public/vuejs/HomepageWidget/TabTable.vue | 24 +- .../Resources/public/vuejs/OnTheFly/App.vue | 60 +- .../vuejs/OnTheFly/components/Create.vue | 200 +- .../vuejs/OnTheFly/components/OnTheFly.vue | 638 +++--- .../public/vuejs/PickEntity/PickEntity.vue | 391 +--- .../vuejs/PickPostalCode/PickPostalCode.vue | 174 +- .../public/vuejs/SavedExportButtons/App.vue | 8 +- .../Component/GenerateButton.vue | 202 +- .../public/vuejs/SavedExportButtons/index.ts | 6 +- .../public/vuejs/WorkflowAttachment/App.vue | 72 +- .../Component/AttachmentList.vue | 66 +- .../Component/GenericDocItemBox.vue | 10 +- .../Component/PickGenericDoc.vue | 412 ++-- .../Component/PickGenericDocItem.vue | 132 +- .../Component/PickGenericDocModal.vue | 128 +- .../public/vuejs/WorkflowAttachment/index.ts | 177 +- .../AddressDetails/AddressDetailsButton.vue | 82 +- .../AddressDetails/AddressDetailsContent.vue | 28 +- .../AddressDetails/AddressModal.vue | 40 +- .../AddressDetailsGeographicalLayers.vue | 60 +- .../Parts/AddressDetailsMap.vue | 127 +- .../Parts/AddressDetailsRefMatching.vue | 266 +-- .../public/vuejs/_components/BadgeEntity.vue | 99 +- .../CommentEditor/CommentEditor.vue | 136 +- .../public/vuejs/_components/Confidential.vue | 52 +- .../_components/Entity/AddressRenderBox.vue | 218 +- .../Entity/GenderIconRenderBox.vue | 23 +- .../_components/Entity/UserGroupRenderBox.vue | 16 +- .../_components/Entity/UserRenderBoxBadge.vue | 42 +- .../EntityWorkflowVueSubscriber.vue | 126 +- .../EntityWorkflow/ListWorkflow.vue | 207 +- .../EntityWorkflow/ListWorkflowModal.vue | 142 +- .../EntityWorkflow/PickWorkflow.vue | 277 +-- .../public/vuejs/_components/Modal.vue | 128 +- .../NotificationReadAllToggle.vue | 70 +- .../Notification/NotificationReadToggle.vue | 184 +- .../Resources/public/vuejs/_js/i18n.ts | 145 +- .../public/vuejs/i18n/datetimeFormats.ts | 48 +- .../Resources/views/layout.html.twig | 52 +- .../Phonenumber/PhonenumberHelperTest.php | 45 - .../Validator/UserGroupDoNotExcludeTest.php | 91 - .../ChillMainBundle/chill.api.specs.yaml | 25 - .../translations/messages+intl-icu.fr.yaml | 55 - .../translations/messages.fr.yml | 31 - .../Repository/PersonACLAwareRepository.php | 25 - .../PersonACLAwareRepositoryInterface.php | 10 - .../Repository/PersonRepository.php | 39 - .../AccompanyingPeriodWorkSelector.ts | 74 +- .../Resources/public/types.ts | 534 ++--- .../public/vuejs/AccompanyingCourse/App.vue | 190 +- .../components/AdminLocation.vue | 170 +- .../AccompanyingCourse/components/Banner.vue | 257 +-- .../components/Banner/PersonsAssociated.vue | 210 +- .../components/Banner/SocialIssue.vue | 14 +- .../components/Banner/ToggleFlags.vue | 261 +-- .../components/ButtonLocation.vue | 153 +- .../AccompanyingCourse/components/Comment.vue | 304 +-- .../AccompanyingCourse/components/Confirm.vue | 429 ++-- .../components/CourseLocation.vue | 466 +++-- .../components/OriginDemand.vue | 143 +- .../components/PersonsAssociated.vue | 509 ++--- .../PersonsAssociated/ParticipationItem.vue | 437 ++-- .../components/Referrer.vue | 439 ++-- .../components/Requestor.vue | 877 ++++---- .../components/Resources.vue | 315 +-- .../components/Resources/ResourceItem.vue | 444 ++-- .../components/Resources/WriteComment.vue | 182 +- .../AccompanyingCourse/components/Scopes.vue | 91 +- .../components/SocialIssue.vue | 165 +- .../components/StartDate.vue | 139 +- .../components/StickyNav.vue | 352 ++-- .../components/StickyNav/Item.vue | 32 +- .../AccompanyingCourse/components/Test.vue | 277 +-- .../AccompanyingCourseWorkCreate/App.vue | 541 ++--- .../vuejs/AccompanyingCourseWorkEdit/App.vue | 1841 +++++++++-------- .../components/AddEvaluation.vue | 305 +-- .../components/AddResult.vue | 284 +-- .../components/FormEvaluation.vue | 1286 ++++++------ .../vuejs/ExportFormActionGoalResult/App.vue | 824 ++++---- .../vuejs/HouseholdMembersEditor/App.vue | 316 +-- .../components/Concerned.vue | 237 ++- .../components/Confirmation.vue | 46 +- .../components/CurrentHousehold.vue | 82 +- .../components/Dates.vue | 277 +-- .../components/Household.vue | 498 ++--- .../components/HouseholdAddress.vue | 131 +- .../components/MemberDetails.vue | 242 +-- .../components/PersonComment.vue | 38 +- .../components/Positioning.vue | 190 +- .../Resources/public/vuejs/VisGraph/App.vue | 1295 ++++++------ .../_api/{AddPersons.ts => AddPersons.js} | 37 +- ...ccompanyingCourseWorkEvaluationDocument.ts | 10 +- .../AccompanyingPeriod/SetReferrer.vue | 79 +- .../AccompanyingPeriodWorkItem.vue | 92 +- .../AccompanyingPeriodWorkList.vue | 42 +- .../AccompanyingPeriodWorkSelectorModal.vue | 140 +- .../public/vuejs/_components/AddPersons.vue | 956 ++++----- .../AddPersons/PersonSuggestion.vue | 220 +- .../_components/AddPersons/TypeHousehold.vue | 35 +- .../_components/AddPersons/TypePerson.vue | 73 +- .../_components/AddPersons/TypeThirdParty.vue | 223 +- .../vuejs/_components/AddPersons/TypeUser.vue | 52 +- .../_components/AddPersons/TypeUserGroup.vue | 36 +- .../_components/Entity/HouseholdRenderBox.vue | 293 +-- .../_components/Entity/PersonRenderBox.vue | 873 ++++---- .../vuejs/_components/Entity/PersonText.vue | 116 +- .../vuejs/_components/OnTheFly/Person.vue | 946 +++++---- .../Resources/public/vuejs/_js/i18n.ts | 117 +- .../PersonACLAwareRepositoryTest.php | 66 - .../translations/messages+intl-icu.fr.yaml | 56 - .../translations/messages.fr.yml | 45 - .../Repository/ThirdPartyRepository.php | 42 +- .../Resources/public/types.ts | 74 +- .../Entity/ThirdPartyRenderBox.vue | 382 ++-- .../_components/Entity/ThirdPartyText.vue | 38 +- .../vuejs/_components/OnTheFly/ThirdParty.vue | 823 ++++---- .../translations/messages.fr.yml | 13 - .../ChillTicketBundle/chill.api.specs.yaml | 521 ----- .../ChillTicketBundle/chill.webpack.config.js | 4 - .../UpdateCommentContentCommandHandler.php | 26 - ...eCommentContentCommandHandlerInterface.php | 20 - ...dateCommentDeletedStatusCommandHandler.php | 26 - ...ntDeletedStatusCommandHandlerInterface.php | 20 - .../Comment/UpdateCommentContentCommand.php | 30 - .../UpdateCommentDeletedStatusCommand.php | 27 - .../src/Action/Ticket/AddAddresseeCommand.php | 29 - .../src/Action/Ticket/AddCommentCommand.php | 25 - .../Ticket/AssociateByPhonenumberCommand.php | 19 - .../Ticket/ChangeEmergencyStateCommand.php | 24 - .../src/Action/Ticket/ChangeStateCommand.php | 24 - .../src/Action/Ticket/CreateTicketCommand.php | 19 - .../Handler/AddCommentCommandHandler.php | 33 - .../AssociateByPhonenumberCommandHandler.php | 46 - .../ChangeEmergencyStateCommandHandler.php | 49 - .../Handler/ChangeStateCommandHandler.php | 49 - .../Handler/CreateTicketCommandHandler.php | 37 - .../Handler/ReplaceMotiveCommandHandler.php | 63 - .../Handler/SetAddresseesCommandHandler.php | 56 - .../Handler/SetCallerCommandHandler.php | 50 - .../Handler/SetPersonsCommandHandler.php | 56 - .../Action/Ticket/ReplaceMotiveCommand.php | 25 - .../Action/Ticket/SetAddresseesCommand.php | 40 - .../src/Action/Ticket/SetCallerCommand.php | 29 - .../src/Action/Ticket/SetPersonsCommand.php | 30 - .../src/ChillTicketBundle.php | 16 - .../src/Controller/AddCommentController.php | 73 - .../ChangeEmergencyStateApiController.php | 73 - .../Controller/ChangeStateApiController.php | 73 - .../src/Controller/CreateTicketController.php | 75 - .../src/Controller/EditTicketController.php | 45 - .../src/Controller/FindCallerController.php | 58 - .../src/Controller/MotiveApiController.php | 25 - .../Controller/ReplaceMotiveController.php | 69 - .../Controller/SetAddresseesController.php | 85 - .../src/Controller/SetCallerApiController.php | 66 - .../src/Controller/SetPersonsController.php | 72 - .../SuggestPersonForTicketApiController.php | 45 - .../src/Controller/TicketControllerApi.php | 31 - .../Controller/TicketListApiController.php | 81 - .../src/Controller/TicketListController.php | 84 - .../Controller/UpdateCommentController.php | 69 - .../UpdateCommentDeletedStatusController.php | 66 - .../src/DataFixtures/ORM/LoadMotives.php | 98 - .../ChillTicketExtension.php | 69 - .../src/DependencyInjection/Configuration.php | 42 - .../src/Entity/AddresseeHistory.php | 137 -- .../src/Entity/CallerHistory.php | 148 -- .../ChillTicketBundle/src/Entity/Comment.php | 85 - .../src/Entity/EmergencyStatusEnum.php | 21 - .../src/Entity/EmergencyStatusHistory.php | 85 - .../src/Entity/InputHistory.php | 96 - .../ChillTicketBundle/src/Entity/Motive.php | 101 - .../src/Entity/MotiveHistory.php | 86 - .../src/Entity/PersonHistory.php | 103 - .../src/Entity/StateEnum.php | 30 - .../src/Entity/StateHistory.php | 85 - .../ChillTicketBundle/src/Entity/Ticket.php | 336 --- .../src/Menu/SectionMenuBuilder.php | 29 - .../src/Repository/MotiveRepository.php | 27 - .../PersonTicketACLAwareRepository.php | 60 - ...ersonTicketACLAwareRepositoryInterface.php | 29 - .../Repository/TicketACLAwareRepository.php | 79 - .../TicketACLAwareRepositoryInterface.php | 38 - .../src/Repository/TicketRepository.php | 64 - .../Repository/TicketRepositoryInterface.php | 28 - .../Resources/public/page/ticket/banner.scss | 24 - .../src/Resources/public/page/ticket/index.ts | 1 - .../src/Resources/public/types.ts | 157 -- .../Resources/public/vuejs/TicketApp/App.vue | 44 - .../components/ActionToolbarComponent.vue | 356 ---- .../components/AddCommentComponent.vue | 27 - .../components/AddresseeComponent.vue | 68 - .../components/AddresseeSelectorComponent.vue | 87 - .../TicketApp/components/BannerComponent.vue | 190 -- .../components/CallerSelectorComponent.vue | 85 - .../components/MotiveSelectorComponent.vue | 71 - .../components/PersonsSelectorComponent.vue | 90 - .../TicketHistoryAddresseeComponent.vue | 18 - .../TicketHistoryCommentComponent.vue | 46 - .../TicketHistoryCreateComponent.vue | 16 - .../TicketHistoryEmergencyComponent.vue | 18 - .../components/TicketHistoryListComponent.vue | 151 -- .../TicketHistoryMotiveComponent.vue | 14 - .../TicketHistoryPersonComponent.vue | 37 - .../TicketHistoryStateComponent.vue | 56 - .../components/TicketSelectorComponent.vue | 36 - .../TicketApp/components/ToggleFlags.vue | 67 - .../Resources/public/vuejs/TicketApp/index.ts | 25 - .../public/vuejs/TicketApp/store/index.ts | 24 - .../TicketApp/store/modules/addressee.ts | 86 - .../vuejs/TicketApp/store/modules/comment.ts | 38 - .../vuejs/TicketApp/store/modules/motive.ts | 66 - .../vuejs/TicketApp/store/modules/persons.ts | 86 - .../vuejs/TicketApp/store/modules/ticket.ts | 91 - .../Resources/views/Banner/banner.html.twig | 8 - .../src/Resources/views/Ticket/edit.html.twig | 19 - .../src/Resources/views/Ticket/list.html.twig | 99 - .../src/Resources/views/layout.html.twig | 17 - .../src/Security/Voter/CommentVoter.php | 50 - .../src/Security/Voter/TicketVoter.php | 37 - .../SetAddresseesCommandDenormalizer.php | 56 - .../SetPersonsCommandDenormalizer.php | 51 - .../Normalizer/TicketNormalizer.php | 275 --- .../Service/Ticket/SuggestPersonForTicket.php | 30 - .../SuggestPersonForTicketInterface.php | 26 - .../Validator/SetPersonCommandConstraint.php | 25 - .../SetPersonCommandConstraintValidator.php | 47 - .../ChillTicketBundle/src/config/routes.yaml | 3 - .../src/config/services.yaml | 36 - .../src/migrations/Version20240416145919.php | 139 -- .../src/migrations/Version20240423212824.php | 40 - .../src/migrations/Version20250603085035.php | 89 - .../src/migrations/Version20250620145414.php | 82 - .../src/migrations/Version20250620164517.php | 37 - .../src/migrations/Version20250624105842.php | 93 - .../src/migrations/Version20250711115128.php | 33 - .../src/migrations/Version20250711131126.php | 33 - .../src/translations/messages+intl-icu.fr.yml | 86 - ...UpdateCommentContentCommandHandlerTest.php | 50 - ...CommentDeletedStatusCommandHandlerTest.php | 55 - .../Handler/AddCommentCommandHandlerTest.php | 52 - ...sociateByPhonenumberCommandHandlerTest.php | 96 - ...ChangeEmergencyStateCommandHandlerTest.php | 118 -- .../Handler/ChangeStateCommandHandlerTest.php | 118 -- .../CreateTicketCommandHandlerTest.php | 55 - .../ReplaceMotiveCommandHandlerTest.php | 181 -- .../SetAddressesCommandHandlerTest.php | 112 - .../Handler/SetCallerCommandHandlerTest.php | 178 -- .../Handler/SetPersonsCommandHandlerTest.php | 112 - .../Controller/AddCommentControllerTest.php | 106 - .../ChangeEmergencyStateApiControllerTest.php | 144 -- .../ChangeStateApiControllerTest.php | 144 -- .../Controller/FindCallerControllerTest.php | 128 -- .../ReplaceMotiveControllerTest.php | 119 -- .../SetAddresseesControllerTest.php | 212 -- .../Controller/SetCallerApiControllerTest.php | 200 -- .../TicketListApiControllerTest.php | 302 --- .../Controller/TicketListControllerTest.php | 34 - .../UpdateCommentControllerTest.php | 134 -- ...dateCommentDeletedStatusControllerTest.php | 114 - .../tests/Entity/CallerHistoryTest.php | 63 - .../tests/Entity/TicketCallerTest.php | 82 - .../tests/Entity/TicketTest.php | 161 -- .../PersonTicketACLAwareRepositoryTest.php | 64 - .../TicketACLAwareRepositoryTest.php | 81 - .../SetAddresseesCommandDenormalizerTest.php | 66 - .../Normalizer/TicketNormalizerTest.php | 408 ---- .../Ticket/SuggestPersonForTicketTest.php | 70 - ...etPersonCommandConstraintValidatorTest.php | 90 - .../Resources/public/module/pending/index.ts | 44 +- src/shims-vue.d.ts | 6 +- src/vue-multiselect.d.ts | 18 +- src/vuex.d.ts | 8 +- tests/app/config/routes/chill_ticket.yaml | 3 - tsconfig.json | 3 +- 392 files changed, 24023 insertions(+), 35435 deletions(-) delete mode 100644 .changes/unreleased/Feature-20240530-160003.yaml delete mode 100644 .changes/unreleased/Feature-20240531-190242.yaml delete mode 100644 .prettierrc delete mode 100644 .vscode/launch.json delete mode 100644 .vscode/tasks.json delete mode 100644 config/packages/chill_ticket.yaml delete mode 100644 config/routes/chill_ticket.yaml delete mode 100644 src/Bundle/ChillMainBundle/Tests/Validation/Validator/UserGroupDoNotExcludeTest.php rename src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/{AddPersons.ts => AddPersons.js} (57%) delete mode 100644 src/Bundle/ChillTicketBundle/chill.api.specs.yaml delete mode 100644 src/Bundle/ChillTicketBundle/chill.webpack.config.js delete mode 100644 src/Bundle/ChillTicketBundle/src/Action/Comment/Handler/UpdateCommentContentCommandHandler.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Action/Comment/Handler/UpdateCommentContentCommandHandlerInterface.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Action/Comment/Handler/UpdateCommentDeletedStatusCommandHandler.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Action/Comment/Handler/UpdateCommentDeletedStatusCommandHandlerInterface.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Action/Comment/UpdateCommentContentCommand.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Action/Comment/UpdateCommentDeletedStatusCommand.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Action/Ticket/AddAddresseeCommand.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Action/Ticket/AddCommentCommand.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Action/Ticket/AssociateByPhonenumberCommand.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Action/Ticket/ChangeEmergencyStateCommand.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Action/Ticket/ChangeStateCommand.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Action/Ticket/CreateTicketCommand.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Action/Ticket/Handler/AddCommentCommandHandler.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Action/Ticket/Handler/AssociateByPhonenumberCommandHandler.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Action/Ticket/Handler/ChangeEmergencyStateCommandHandler.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Action/Ticket/Handler/ChangeStateCommandHandler.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Action/Ticket/Handler/CreateTicketCommandHandler.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Action/Ticket/Handler/ReplaceMotiveCommandHandler.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Action/Ticket/Handler/SetAddresseesCommandHandler.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Action/Ticket/Handler/SetCallerCommandHandler.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Action/Ticket/Handler/SetPersonsCommandHandler.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Action/Ticket/ReplaceMotiveCommand.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Action/Ticket/SetAddresseesCommand.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Action/Ticket/SetCallerCommand.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Action/Ticket/SetPersonsCommand.php delete mode 100644 src/Bundle/ChillTicketBundle/src/ChillTicketBundle.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Controller/AddCommentController.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Controller/ChangeEmergencyStateApiController.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Controller/ChangeStateApiController.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Controller/CreateTicketController.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Controller/EditTicketController.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Controller/FindCallerController.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Controller/MotiveApiController.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Controller/ReplaceMotiveController.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Controller/SetAddresseesController.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Controller/SetCallerApiController.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Controller/SetPersonsController.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Controller/SuggestPersonForTicketApiController.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Controller/TicketControllerApi.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Controller/TicketListApiController.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Controller/TicketListController.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Controller/UpdateCommentController.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Controller/UpdateCommentDeletedStatusController.php delete mode 100644 src/Bundle/ChillTicketBundle/src/DataFixtures/ORM/LoadMotives.php delete mode 100644 src/Bundle/ChillTicketBundle/src/DependencyInjection/ChillTicketExtension.php delete mode 100644 src/Bundle/ChillTicketBundle/src/DependencyInjection/Configuration.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Entity/AddresseeHistory.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Entity/CallerHistory.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Entity/Comment.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Entity/EmergencyStatusEnum.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Entity/EmergencyStatusHistory.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Entity/InputHistory.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Entity/Motive.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Entity/MotiveHistory.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Entity/PersonHistory.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Entity/StateEnum.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Entity/StateHistory.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Entity/Ticket.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Menu/SectionMenuBuilder.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Repository/MotiveRepository.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Repository/PersonTicketACLAwareRepository.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Repository/PersonTicketACLAwareRepositoryInterface.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Repository/TicketACLAwareRepository.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Repository/TicketACLAwareRepositoryInterface.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Repository/TicketRepository.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Repository/TicketRepositoryInterface.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/page/ticket/banner.scss delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/page/ticket/index.ts delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/types.ts delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/App.vue delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/components/ActionToolbarComponent.vue delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/components/AddCommentComponent.vue delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/components/AddresseeComponent.vue delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/components/AddresseeSelectorComponent.vue delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/components/BannerComponent.vue delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/components/CallerSelectorComponent.vue delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/components/MotiveSelectorComponent.vue delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/components/PersonsSelectorComponent.vue delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/components/TicketHistoryAddresseeComponent.vue delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/components/TicketHistoryCommentComponent.vue delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/components/TicketHistoryCreateComponent.vue delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/components/TicketHistoryEmergencyComponent.vue delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/components/TicketHistoryListComponent.vue delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/components/TicketHistoryMotiveComponent.vue delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/components/TicketHistoryPersonComponent.vue delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/components/TicketHistoryStateComponent.vue delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/components/TicketSelectorComponent.vue delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/components/ToggleFlags.vue delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/index.ts delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/store/index.ts delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/store/modules/addressee.ts delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/store/modules/comment.ts delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/store/modules/motive.ts delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/store/modules/persons.ts delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/store/modules/ticket.ts delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/views/Banner/banner.html.twig delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/views/Ticket/edit.html.twig delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/views/Ticket/list.html.twig delete mode 100644 src/Bundle/ChillTicketBundle/src/Resources/views/layout.html.twig delete mode 100644 src/Bundle/ChillTicketBundle/src/Security/Voter/CommentVoter.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Security/Voter/TicketVoter.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Serializer/Normalizer/SetAddresseesCommandDenormalizer.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Serializer/Normalizer/SetPersonsCommandDenormalizer.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Serializer/Normalizer/TicketNormalizer.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Service/Ticket/SuggestPersonForTicket.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Service/Ticket/SuggestPersonForTicketInterface.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Validation/Validator/SetPersonCommandConstraint.php delete mode 100644 src/Bundle/ChillTicketBundle/src/Validation/Validator/SetPersonCommandConstraintValidator.php delete mode 100644 src/Bundle/ChillTicketBundle/src/config/routes.yaml delete mode 100644 src/Bundle/ChillTicketBundle/src/config/services.yaml delete mode 100644 src/Bundle/ChillTicketBundle/src/migrations/Version20240416145919.php delete mode 100644 src/Bundle/ChillTicketBundle/src/migrations/Version20240423212824.php delete mode 100644 src/Bundle/ChillTicketBundle/src/migrations/Version20250603085035.php delete mode 100644 src/Bundle/ChillTicketBundle/src/migrations/Version20250620145414.php delete mode 100644 src/Bundle/ChillTicketBundle/src/migrations/Version20250620164517.php delete mode 100644 src/Bundle/ChillTicketBundle/src/migrations/Version20250624105842.php delete mode 100644 src/Bundle/ChillTicketBundle/src/migrations/Version20250711115128.php delete mode 100644 src/Bundle/ChillTicketBundle/src/migrations/Version20250711131126.php delete mode 100644 src/Bundle/ChillTicketBundle/src/translations/messages+intl-icu.fr.yml delete mode 100644 src/Bundle/ChillTicketBundle/tests/Action/Comment/Handler/UpdateCommentContentCommandHandlerTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Action/Comment/Handler/UpdateCommentDeletedStatusCommandHandlerTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Action/Ticket/Handler/AddCommentCommandHandlerTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Action/Ticket/Handler/AssociateByPhonenumberCommandHandlerTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Action/Ticket/Handler/ChangeEmergencyStateCommandHandlerTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Action/Ticket/Handler/ChangeStateCommandHandlerTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Action/Ticket/Handler/CreateTicketCommandHandlerTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Action/Ticket/Handler/ReplaceMotiveCommandHandlerTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Action/Ticket/Handler/SetAddressesCommandHandlerTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Action/Ticket/Handler/SetCallerCommandHandlerTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Action/Ticket/Handler/SetPersonsCommandHandlerTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Controller/AddCommentControllerTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Controller/ChangeEmergencyStateApiControllerTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Controller/ChangeStateApiControllerTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Controller/FindCallerControllerTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Controller/ReplaceMotiveControllerTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Controller/SetAddresseesControllerTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Controller/SetCallerApiControllerTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Controller/TicketListApiControllerTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Controller/TicketListControllerTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Controller/UpdateCommentControllerTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Controller/UpdateCommentDeletedStatusControllerTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Entity/CallerHistoryTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Entity/TicketCallerTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Entity/TicketTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Repository/PersonTicketACLAwareRepositoryTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Repository/TicketACLAwareRepositoryTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Serializer/Normalizer/SetAddresseesCommandDenormalizerTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Serializer/Normalizer/TicketNormalizerTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Service/Ticket/SuggestPersonForTicketTest.php delete mode 100644 src/Bundle/ChillTicketBundle/tests/Validation/Validator/SetPersonCommandConstraintValidatorTest.php delete mode 100644 tests/app/config/routes/chill_ticket.yaml diff --git a/.changes/unreleased/Feature-20240530-160003.yaml b/.changes/unreleased/Feature-20240530-160003.yaml deleted file mode 100644 index 6b6baedc5..000000000 --- a/.changes/unreleased/Feature-20240530-160003.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Feature -body: | - Upgrade import of address list to the last version of compiled addresses of belgian-best-address -time: 2024-05-30T16:00:03.440767606+02:00 -custom: - Issue: "" diff --git a/.changes/unreleased/Feature-20240531-190242.yaml b/.changes/unreleased/Feature-20240531-190242.yaml deleted file mode 100644 index 083298a26..000000000 --- a/.changes/unreleased/Feature-20240531-190242.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Feature -body: | - Upgrade CKEditor and refactor configuration with use of typescript -time: 2024-05-31T19:02:42.776662753+02:00 -custom: - Issue: "" diff --git a/.editorconfig b/.editorconfig index 49ea12528..bede621e3 100644 --- a/.editorconfig +++ b/.editorconfig @@ -19,11 +19,11 @@ max_line_length = 80 [COMMIT_EDITMSG] max_line_length = 0 -[*.{js,vue,ts}] +[*.{js, vue, ts}] indent_size = 2 indent_style = space -[*.rst] -indent_size = 3 -indent_style = space +[.rst] +ident_size = 3 +ident_style = space diff --git a/.eslint-baseline.json b/.eslint-baseline.json index 7b5d29c67..6483e47b3 100644 --- a/.eslint-baseline.json +++ b/.eslint-baseline.json @@ -7,6 +7,14 @@ "message": "'app' is assigned a value but never used.", "hash": "f8c2979921289906e3baabae31ba101ead91504f" }, + { + "path": "src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/index.js", + "line": 57, + "column": 23, + "ruleId": "@typescript-eslint/no-unused-vars", + "message": "'event' is defined but never used.", + "hash": "cf0cf378f71403f62a6425f384ccbbdec433d1f2" + }, { "path": "src/Bundle/ChillCalendarBundle/Resources/public/module/Invite/answer.js", "line": 7, @@ -17,19 +25,19 @@ }, { "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/Components/CalendarActive.vue", - "line": 10, - "column": 22, + "line": 19, + "column": 30, "ruleId": "vue/valid-v-else", "message": "'v-else' directives require no attribute value.", - "hash": "c4d34a0df38baaf72092179b2e066c91b6f6733a" + "hash": "505f99b24500a684eec3c6bf870426fcd841c20b" }, { "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/Components/CalendarActive.vue", - "line": 45, + "line": 54, "column": 10, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'mapGetters' is defined but never used.", - "hash": "8e80aff377fdd5af9686df6a89a4ba650911f02a" + "hash": "01e3928f7d9be0accb6db3894b158dd683a685ff" }, { "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/index.js", @@ -82,50 +90,90 @@ { "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/store/utils.ts", "line": 4, - "column": 3, + "column": 5, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'DateTime' is defined but never used.", - "hash": "88be21db222be347a0cf7f8fbfaba531d5cb0418" + "hash": "fdf38ad15813c4a931b93f4a85db985ca71105fc" }, { "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/store/utils.ts", "line": 14, - "column": 25, + "column": 27, "ruleId": "@typescript-eslint/no-empty-object-type", "message": "The `{}` (\"empty object\") type allows any non-nullish value, including literals like `0` and `\"\"`.\n- If that's what you want, disable this lint rule with an inline comment or configure the 'allowObjectTypes' rule option.\n- If you want a type meaning \"any object\", you probably want `object` instead.\n- If you want a type meaning \"any value\", you probably want `unknown` instead.", - "hash": "6c1437cbb501093bde9c9f7eeda4e4853e558c1a" + "hash": "9602ec11eda8f46ff5712d69dcd87419babcd6f0" }, { "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/store/utils.ts", "line": 16, - "column": 18, + "column": 20, "ruleId": "@typescript-eslint/no-empty-object-type", "message": "The `{}` (\"empty object\") type allows any non-nullish value, including literals like `0` and `\"\"`.\n- If that's what you want, disable this lint rule with an inline comment or configure the 'allowObjectTypes' rule option.\n- If you want a type meaning \"any object\", you probably want `object` instead.\n- If you want a type meaning \"any value\", you probably want `unknown` instead.", - "hash": "f03d8114bfe562d84f8160f5d122562e484b5de1" + "hash": "23f7a8a1c3cba955077ddbd604bad6805ce30ad2" }, { "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/store/utils.ts", "line": 18, - "column": 17, + "column": 19, "ruleId": "@typescript-eslint/no-empty-object-type", "message": "The `{}` (\"empty object\") type allows any non-nullish value, including literals like `0` and `\"\"`.\n- If that's what you want, disable this lint rule with an inline comment or configure the 'allowObjectTypes' rule option.\n- If you want a type meaning \"any object\", you probably want `object` instead.\n- If you want a type meaning \"any value\", you probably want `unknown` instead.", - "hash": "de706baa154ead33e72ce520c50cdd16a85d1265" + "hash": "abbc89e186c74d0f71f45cfda31c490339e39078" }, { "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Invite/Answer.vue", - "line": 86, - "column": 19, + "line": 95, + "column": 13, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'payload' is defined but never used.", - "hash": "8c189da3c258c22dfdd1e0a72d0f0ef5464c26eb" + "hash": "66c545917093ba30f1d6ca10ddaa676140e749bd" + }, + { + "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/App2.vue", + "line": 224, + "column": 10, + "ruleId": "@typescript-eslint/no-unused-vars", + "message": "'reactive' is defined but never used.", + "hash": "96ed76a9828138fb125fc36c4b55e900bbfe87c2" + }, + { + "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/App2.vue", + "line": 230, + "column": 5, + "ruleId": "@typescript-eslint/no-unused-vars", + "message": "'DropArg' is defined but never used.", + "hash": "bd405399a4091d65e8391404bfb0c4611816c8e0" + }, + { + "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/App2.vue", + "line": 251, + "column": 9, + "ruleId": "@typescript-eslint/no-unused-vars", + "message": "'t' is assigned a value but never used.", + "hash": "bc09207a496405f7a71c178e522b89aeb1f7ebd3" + }, + { + "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/App2.vue", + "line": 356, + "column": 32, + "ruleId": "@typescript-eslint/no-unused-vars", + "message": "'arg' is defined but never used.", + "hash": "aeae152f0669b946a1ad681dd52b0ef03393ae79" + }, + { + "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/App2.vue", + "line": 434, + "column": 11, + "ruleId": "@typescript-eslint/no-unused-vars", + "message": "'changedEvent' is assigned a value but never used.", + "hash": "a7a81a6bf09d00c0364e3aa8207ffad853f0547b" }, { "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/Components/EditLocation.vue", "line": 77, - "column": 12, + "column": 16, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'_' is defined but never used.", - "hash": "8040b05fb0422e91d049dd0d7fb4604b4455bf5e" + "hash": "d29fb2fc9299c48082167b2fa4c427c569716bd6" }, { "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/Components/EditLocation.vue", @@ -154,50 +202,50 @@ { "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/index2.ts", "line": 12, - "column": 9, + "column": 11, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'app' is assigned a value but never used.", - "hash": "3ebdc6637bc62a230176a4dff37a5900061e6eed" + "hash": "6422c0876b992a3c5174faa99ef06d8339b74b4e" }, { "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/store/index.ts", - "line": 44, - "column": 74, + "line": 46, + "column": 20, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'_' is defined but never used.", - "hash": "7ac3276b20b1029e510bcbbbc8572fc34400e204" + "hash": "5bf7ba0b0200fb6788d50df669e6b7701f8a87bb" }, { "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/store/modules/fullcalendar.ts", "line": 57, - "column": 20, + "column": 32, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'_' is defined but never used.", - "hash": "d25bbc0a04099c361d99f34b0c731892c7b008a7" + "hash": "a733a5edfe4c434ed63682bcbd5fe65f175a1b85" }, { "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/store/modules/fullcalendar.ts", "line": 64, - "column": 20, + "column": 32, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'_' is defined but never used.", - "hash": "7c53ad6034cebccfe119a1ee7dd011984a720676" + "hash": "d83b1879b5fc6179c045ad1981421f46a7cbbd56" }, { "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/store/modules/fullcalendar.ts", "line": 71, - "column": 20, + "column": 32, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'_' is defined but never used.", - "hash": "110e12e976ae0f8fe15cd70b974d99ee381bb6fb" + "hash": "222eed84495212735a60fa05e0c7f298c7bc33e1" }, { "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/store/modules/fullcalendar.ts", "line": 72, - "column": 18, + "column": 26, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'_' is defined but never used.", - "hash": "7919b6b2becd817e0fad8c51602b0f8c2fc0f5f2" + "hash": "0cf85eccce08b65a8590f7318cace58cbb21ea08" }, { "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/store/modules/me.ts", @@ -210,90 +258,90 @@ { "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/_components/CalendarUserSelector/CalendarUserSelector.vue", "line": 108, - "column": 35, + "column": 47, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'reject' is defined but never used.", - "hash": "e57ca97296d09e44a8e19573138a4f39f7777778" - }, - { - "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/_components/CalendarUserSelector/CalendarUserSelector.vue", - "line": 145, - "column": 15, - "ruleId": "vue/no-mutating-props", - "message": "Unexpected mutation of \"users\" prop.", - "hash": "26378799855b04bc15aa3e030b9ede95f3139c4d" + "hash": "1a771f9f65375cac2002ed7d706184355685d378" }, { "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/_components/CalendarUserSelector/CalendarUserSelector.vue", "line": 148, - "column": 15, + "column": 29, "ruleId": "vue/no-mutating-props", - "message": "Unexpected mutation of \"calendarEvents\" prop.", - "hash": "279aee22cdc99740903c9fee736897a65074a8bb" + "message": "Unexpected mutation of \"users\" prop.", + "hash": "d9f7e517892b6588be17516fd077c3149ccbefd9" }, { "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/_components/CalendarUserSelector/CalendarUserSelector.vue", "line": 151, - "column": 41, - "ruleId": "@typescript-eslint/no-unused-vars", - "message": "'reject' is defined but never used.", - "hash": "2c597422f93f4b397bfe96365007c602d349ad0c" - }, - { - "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/_components/CalendarUserSelector/CalendarUserSelector.vue", - "line": 152, - "column": 21, - "ruleId": "vue/no-mutating-props", - "message": "Unexpected mutation of \"users\" prop.", - "hash": "75af3ee3d935ce4d62c037461e552cef3ab0f291" - }, - { - "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/_components/CalendarUserSelector/CalendarUserSelector.vue", - "line": 158, - "column": 47, - "ruleId": "@typescript-eslint/no-unused-vars", - "message": "'reject' is defined but never used.", - "hash": "6ffe789bbd1d731daaf5c2bff4582372fd342dc1" - }, - { - "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/_components/CalendarUserSelector/CalendarUserSelector.vue", - "line": 170, - "column": 27, + "column": 29, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"calendarEvents\" prop.", - "hash": "ef1795af6c50719c19ec3bffd8e511d06a9bfac2" + "hash": "47c270d8c0bcda67ea04a83ba267eca3e70fa7fb" }, { "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/_components/CalendarUserSelector/CalendarUserSelector.vue", - "line": 197, - "column": 9, + "line": 154, + "column": 59, + "ruleId": "@typescript-eslint/no-unused-vars", + "message": "'reject' is defined but never used.", + "hash": "7cf30f0d2dc567ea0dfb44dadfc9ecf4977e7b95" + }, + { + "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/_components/CalendarUserSelector/CalendarUserSelector.vue", + "line": 155, + "column": 41, + "ruleId": "vue/no-mutating-props", + "message": "Unexpected mutation of \"users\" prop.", + "hash": "7876348a3eee16be7effd3e992a6aaa2334cfd24" + }, + { + "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/_components/CalendarUserSelector/CalendarUserSelector.vue", + "line": 164, + "column": 63, + "ruleId": "@typescript-eslint/no-unused-vars", + "message": "'reject' is defined but never used.", + "hash": "0f308d7417bfc294b28eea6890666a2d91e31ecd" + }, + { + "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/_components/CalendarUserSelector/CalendarUserSelector.vue", + "line": 185, + "column": 57, + "ruleId": "vue/no-mutating-props", + "message": "Unexpected mutation of \"calendarEvents\" prop.", + "hash": "5a021a581a33d3aeea21c65e023902f2123bb562" + }, + { + "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/_components/CalendarUserSelector/CalendarUserSelector.vue", + "line": 218, + "column": 17, "ruleId": "@typescript-eslint/prefer-for-of", "message": "Expected a `for-of` loop instead of a `for` loop with this simple iteration.", - "hash": "bc4a3fd50f5afd095d8e938885291d948c4ba689" + "hash": "655811d4dad8de23b3d37dfbf02f7fca18b6d8f2" }, { "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/_components/CalendarUserSelector/CalendarUserSelector.vue", - "line": 214, - "column": 7, + "line": 235, + "column": 13, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"calendarEvents\" prop.", - "hash": "6a27b96c77fc2747b4fd0f82ccfedc44138b0aa5" + "hash": "19317d9a564b8b10355cac1eeb9308c7d49c0dd1" }, { "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/_components/CalendarUserSelector/CalendarUserSelector.vue", - "line": 219, - "column": 7, + "line": 240, + "column": 13, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"users\" prop.", - "hash": "61c0ca5de675766483584b7363b048356f9c55f8" + "hash": "95e478eca53a2acfa8edd0aa5747e73b0da01d0c" }, { "path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/_components/CalendarUserSelector/CalendarUserSelector.vue", - "line": 225, - "column": 7, + "line": 246, + "column": 13, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"users\" prop.", - "hash": "d87ce5e7fbcefc884fb7be907d3c3fef53921ab4" + "hash": "0b66e38f0c0bbe17aa7c548dc127be033133ce06" }, { "path": "src/Bundle/ChillDocStoreBundle/Resources/public/js/async-upload/uploader.ts", @@ -351,6 +399,14 @@ "message": "'error' is defined but never used.", "hash": "e26e5e101e90d2b7ee84d6f5de8c819e52129c17" }, + { + "path": "src/Bundle/ChillDocStoreBundle/Resources/public/module/async_upload/index.ts", + "line": 29, + "column": 14, + "ruleId": "@typescript-eslint/no-unused-vars", + "message": "'vm' is defined but never used.", + "hash": "8e7f5e89dd72c54459cf82156389b88988f97d63" + }, { "path": "src/Bundle/ChillDocStoreBundle/Resources/public/module/async_upload/uploader.js", "line": 39, @@ -489,11 +545,11 @@ }, { "path": "src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentActionButtonsGroup.vue", - "line": 78, - "column": 3, + "line": 80, + "column": 5, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'StoredObjectVersion' is defined but never used.", - "hash": "da2ec95bcd2bb80819ef2032e40b0d7237acba31" + "hash": "2fadbe9e331a66f44b54782acc1420c4b487e1f6" }, { "path": "src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/index.ts", @@ -522,10 +578,10 @@ { "path": "src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/ConvertButton.vue", "line": 11, - "column": 3, + "column": 5, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'download_and_decrypt_doc' is defined but never used.", - "hash": "ddc9ed7c384b9da6ed1398551cefe7d244cb0c9e" + "hash": "9a803f1fe608ec60ab065aa8f76e50e2ef1fa4c2" }, { "path": "src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/ConvertButton.vue", @@ -537,11 +593,11 @@ }, { "path": "src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/ConvertButton.vue", - "line": 48, - "column": 9, + "line": 50, + "column": 11, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'reset_pending' is assigned a value but never used.", - "hash": "9919afcb6b2724f5b6be69caa1b487026b9260fe" + "hash": "96fde3634a150f1253fac2f2f2bdcfe6e0daf82a" }, { "path": "src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton.vue", @@ -559,21 +615,29 @@ "message": "'ref' is defined but never used.", "hash": "2a27cd6d06a26e1326654c929068e3704137e24b" }, + { + "path": "src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton/HistoryButtonList.vue", + "line": 57, + "column": 17, + "ruleId": "vue/valid-v-for", + "message": "Custom elements in iteration require 'v-bind:key' directives.", + "hash": "cce787939524e83dd135869e13738ef332d7156c" + }, { "path": "src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/WopiEditButton.vue", - "line": 13, + "line": 15, "column": 8, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'WopiEditButton' is defined but never used.", - "hash": "f197263cc1b8a5eeadd87e2e2c44eccc618375ec" + "hash": "80cb06a18ac4db47e8d120103704ec6988696b79" }, { "path": "src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/helpers.ts", "line": 3, - "column": 3, + "column": 5, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'StoredObjectStatus' is defined but never used.", - "hash": "ceb106361b5267900ff8852f6ff191698e065e13" + "hash": "e868cee022cd1499bb54f7b5503a8a822773e097" }, { "path": "src/Bundle/ChillJobBundle/src/Resources/public/module/cv_edit/index.js", @@ -697,27 +761,27 @@ }, { "path": "src/Bundle/ChillMainBundle/Resources/public/chill/js/date.ts", - "line": 71, - "column": 3, + "line": 73, + "column": 5, "ruleId": "prefer-const", "message": "'cal' is never reassigned. Use 'const' instead.", - "hash": "f6bce9a9d62ca55fec76a414f36ad445ffbb5f17" + "hash": "53586ea7ec719f07750a8874db79f5e76583d5e0" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/chill/js/date.ts", - "line": 77, - "column": 3, + "line": 79, + "column": 5, "ruleId": "prefer-const", "message": "'time' is never reassigned. Use 'const' instead.", - "hash": "7bb4fae8b43da52f82f65b50a87b22d0375b517f" + "hash": "19821279c0b2d7e69418db6877c317f8c6e2dacc" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/chill/js/date.ts", - "line": 83, - "column": 3, + "line": 85, + "column": 5, "ruleId": "prefer-const", "message": "'offset' is never reassigned. Use 'const' instead.", - "hash": "f91a4b071f6ad88a8408dfa241b3cec00c7d54db" + "hash": "244b65de0ab0791ec89219058c5cb4f2e11622c7" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/lib/download-report/download-report.js", @@ -850,26 +914,26 @@ { "path": "src/Bundle/ChillMainBundle/Resources/public/module/collection/index.ts", "line": 141, - "column": 3, + "column": 5, "ruleId": "@typescript-eslint/prefer-for-of", "message": "Expected a `for-of` loop instead of a `for` loop with this simple iteration.", - "hash": "c280bbe030fe9a793f531ce00c1a4a6c6fdcfdc0" + "hash": "cd5fc994be294fde5fef27ba841c9af454b81dc0" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/module/collection/index.ts", "line": 153, - "column": 3, + "column": 5, "ruleId": "@typescript-eslint/prefer-for-of", "message": "Expected a `for-of` loop instead of a `for` loop with this simple iteration.", - "hash": "98e7c2f525eddcfd8d0f839c9bf69b7c56c9d537" + "hash": "381830dd078845aeab5ea366757541cd7c77ca3f" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/module/collection/index.ts", "line": 162, - "column": 5, + "column": 9, "ruleId": "@typescript-eslint/prefer-for-of", "message": "Expected a `for-of` loop instead of a `for` loop with this simple iteration.", - "hash": "66a4dba7d1d666cbac1ed22eb2a7916cf97ca5ec" + "hash": "768b1976fb935d4a4b0890f00be2299b7ff60170" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/module/disable-buttons/index.js", @@ -919,6 +983,22 @@ "message": "'_e' is defined but never used.", "hash": "1d6448401778e8c56554020fe5abd47851ed33f3" }, + { + "path": "src/Bundle/ChillMainBundle/Resources/public/module/wopi-link/index.js", + "line": 21, + "column": 55, + "ruleId": "@typescript-eslint/no-unused-vars", + "message": "'e' is defined but never used.", + "hash": "eae499e4f6e9f43a9d17f9cd917cb6d3d97be25c" + }, + { + "path": "src/Bundle/ChillMainBundle/Resources/public/page/export/download-export.js", + "line": 3, + "column": 55, + "ruleId": "@typescript-eslint/no-unused-vars", + "message": "'e' is defined but never used.", + "hash": "088fd383e7807e484aefc9825209bc7c8942bd22" + }, { "path": "src/Bundle/ChillMainBundle/Resources/public/page/homepage_widget/index.js", "line": 9, @@ -994,514 +1074,514 @@ { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/App.vue", "line": 79, - "column": 39, + "column": 55, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'reject' is defined but never used.", - "hash": "3014fecdefbab379cc54e6abe7532c892cc788f6" + "hash": "29ea9ef3f1b2cb970e8103383bcde12a4ab66c25" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/App.vue", "line": 101, - "column": 39, + "column": 55, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'reject' is defined but never used.", - "hash": "03336dded33c9831e1f8c4b950591b0a24eac678" + "hash": "b81ee6947049c6876f81410cfbb499dc43da4374" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue", - "line": 244, - "column": 3, + "line": 247, + "column": 5, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'postAddressToPerson' is defined but never used.", - "hash": "0a60babcbc24fd0a410901c25994e93f1cd88acc" + "hash": "8a41c437cf2b5554cbbe1704cd51f3102b3d5994" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue", - "line": 245, - "column": 3, + "line": 248, + "column": 5, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'postAddressToHousehold' is defined but never used.", - "hash": "6022bfb8f8d94a3ce0fb2aca7a846c084c2170af" + "hash": "66dec84b2ece299daf21308e5e60d497ba442b27" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue", - "line": 486, - "column": 11, + "line": 490, + "column": 21, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"context\" prop.", - "hash": "26b7b1a24fd66b1763e131ad372ea9e9246ed2ca" + "hash": "0d3f40c47974a4371072b3b9ee04b197c830162d" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue", - "line": 487, - "column": 11, + "line": 491, + "column": 21, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"context\" prop.", - "hash": "1c8c8b1de3e43ec62a8193b0fa6efdfeade74677" + "hash": "8e877b7e588c30e182f7b572bdb9685360f9cf99" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue", - "line": 501, - "column": 35, + "line": 508, + "column": 47, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'reject' is defined but never used.", - "hash": "eca7f49f652654fcffdbe10ac410f108ff3fb28e" + "hash": "5a3e3401bc3c765d91faaf4cfde57697af1262b7" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue", - "line": 518, - "column": 35, + "line": 525, + "column": 47, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'reject' is defined but never used.", - "hash": "31097431dfeb6ebcaa0893d89aa5309de9ee774e" + "hash": "35a741d90379574b9323279f5802193d0c98a9dc" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue", - "line": 546, - "column": 35, + "line": 553, + "column": 47, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'reject' is defined but never used.", - "hash": "142f4ce9e45cf10df3d74345496c2a8919a138bc" + "hash": "c23d1ddf6c0d10ae97948e74aee9c14b9320b86c" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue", - "line": 565, - "column": 35, + "line": 572, + "column": 47, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'reject' is defined but never used.", - "hash": "e9973c9eb1f151f71f6386d2a0ce83f322ff2cf5" + "hash": "4322e81c6ea9d9734c680633a724d5bd4fabacb2" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue", - "line": 787, - "column": 35, + "line": 803, + "column": 47, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'reject' is defined but never used.", - "hash": "78f1d0e8d3b2fa2489f4e311db2d1215d77b1c46" + "hash": "7928a6461b9d394c7d97f048933553936f7d8963" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue", - "line": 836, - "column": 35, + "line": 852, + "column": 47, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'reject' is defined but never used.", - "hash": "cbabc9b1434c9a5690bc269aabd001c8841aeb1b" + "hash": "e5afdb8efccb5470a08dde48f755b1268fa947b5" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressMore.vue", "line": 93, - "column": 9, + "column": 17, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "9c66b7ec84cc786856badd8498414379ef4056ed" + "hash": "68f5e1cf5c03f9ada59c9e0afca0b74c7f3fca4b" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressMore.vue", "line": 101, - "column": 9, + "column": 17, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "92d482ada1514212e710c366a7700111eda96f1e" + "hash": "50d730f6109092baff2db66adc44dc1315e2bda2" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressMore.vue", "line": 109, - "column": 9, + "column": 17, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "f5c902853071084dfe7fd9a1c50e1c653e4c6a19" + "hash": "573e4c041ce663f28b933d7a675c2a525aba644c" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressMore.vue", "line": 117, - "column": 9, + "column": 17, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "409c69e33cdf563b7bc2d0c074f413f8d12c0307" + "hash": "293f845eeab515b1df4649d136c2d8219ed59c4d" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressMore.vue", "line": 125, - "column": 9, + "column": 17, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "ea78eb9d3d49445fc131568291b4d777e2e8d271" + "hash": "792310bc5def2c7b45f50da97cd8818d82862e8a" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressMore.vue", "line": 133, - "column": 9, + "column": 17, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "db792e379fcff91ef9388fbf88492552885efb66" + "hash": "a69e5335393f67a83d89720af34a4385a7d7e665" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressMore.vue", "line": 141, - "column": 9, + "column": 17, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "dbba8af7379ffc65a6d80b4fffd00ca658251fbe" + "hash": "2d5a5e680ff207ad97c7e7b7d999064b561dfd8a" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue", - "line": 104, - "column": 9, + "line": 106, + "column": 17, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "7c28ce533e2011e4f052d5ca0c7d57610b0461da" + "hash": "d52356f2af31d0167c02330ec22d09fbfa6b2b9f" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue", - "line": 112, - "column": 9, + "line": 114, + "column": 17, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "c40ccbcab1e9ceccd5a350ddd88ff7dd5c468ec3" + "hash": "c8e8e06f370f93bf05867e93b5f037dfa46937b1" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue", - "line": 126, - "column": 7, + "line": 128, + "column": 13, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "f407cd7f81bc5d33ed0831a592870074e6a4d6f1" + "hash": "9abaf71ca4b4f292b3b01e724d0a7733365e71f1" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue", - "line": 127, - "column": 7, + "line": 129, + "column": 13, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "5d974adadc72bf10bfa1a863bdc44fdc43c2207f" - }, - { - "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue", - "line": 130, - "column": 7, - "ruleId": "vue/no-mutating-props", - "message": "Unexpected mutation of \"entity\" prop.", - "hash": "1fbda9c797af826dbadcfd16dc945b8d21e3ddf0" - }, - { - "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue", - "line": 131, - "column": 7, - "ruleId": "vue/no-mutating-props", - "message": "Unexpected mutation of \"entity\" prop.", - "hash": "b0ff83b3f077f1a6143654e5914321e3cf29ac95" + "hash": "0b0743959778a9e3d93089b132608816ee4e6646" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue", "line": 132, - "column": 7, + "column": 13, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "19b7e3498b9e90d6a86b3be74338d040247465ab" + "hash": "9759da7b7859b8ee8efaf74876430658ac6b6fe2" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue", - "line": 137, - "column": 7, + "line": 133, + "column": 13, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "d7c45fd73ad1721055f23116102655bdd90a9528" + "hash": "dba8be9a27ab74ec743b7d9e07c05d857b407dd3" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue", - "line": 151, - "column": 39, + "line": 134, + "column": 13, + "ruleId": "vue/no-mutating-props", + "message": "Unexpected mutation of \"entity\" prop.", + "hash": "9b1f5bce779aafc46b19d7a5d266eaa29f8f9be9" + }, + { + "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue", + "line": 139, + "column": 13, + "ruleId": "vue/no-mutating-props", + "message": "Unexpected mutation of \"entity\" prop.", + "hash": "fe6fc4aea0994ba9da15b7c09d308842b67958cb" + }, + { + "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue", + "line": 153, + "column": 55, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'reject' is defined but never used.", - "hash": "bb2767a02ef0c4cd4598702d06ee95d7e79fced3" + "hash": "bd0e024fcad2e3f4566f15293e3c25c840f6dd3e" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue", - "line": 152, - "column": 19, + "line": 154, + "column": 37, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "ce6c91b98e94605fe9c5b6c4e358a42da79a3150" + "hash": "596c4b180b926b7829f987384328bf5636cd367a" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue", - "line": 168, + "line": 171, + "column": 59, + "ruleId": "@typescript-eslint/no-unused-vars", + "message": "'reject' is defined but never used.", + "hash": "5b41d5f9b45da074fb7bbbbd45e0da501da72071" + }, + { + "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue", + "line": 172, "column": 41, - "ruleId": "@typescript-eslint/no-unused-vars", - "message": "'reject' is defined but never used.", - "hash": "28a03efbb5ade5a575393d46f4ec87fd3ab3af57" + "ruleId": "vue/no-mutating-props", + "message": "Unexpected mutation of \"entity\" prop.", + "hash": "d92b92a25043244cca809bd129633b7e024e26b4" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue", - "line": 169, - "column": 21, + "line": 190, + "column": 17, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "7eede2e283dcaeeeba01fba092100c0839eacb37" + "hash": "dd9a85ea740742d620e864796f67c5bff834486d" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue", - "line": 186, - "column": 9, + "line": 191, + "column": 17, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "a7ff3bc5466588198108718a166980b73e87ee40" + "hash": "e3e59960d0d50709a57b336f66b586710b774892" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue", - "line": 187, - "column": 9, + "line": 192, + "column": 17, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "c87deccee6f42a977abbf54b25c12af2543c4ba6" + "hash": "fe11b0e54396511e7b3b08615a78d22fc27e2fad" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue", - "line": 188, - "column": 9, + "line": 222, + "column": 13, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "83029bfbb4c6e6e76f097dedad5c95b7efbf1d54" - }, - { - "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue", - "line": 218, - "column": 7, - "ruleId": "vue/no-mutating-props", - "message": "Unexpected mutation of \"entity\" prop.", - "hash": "f8cc21c434f3a41e97c1e659f3e3e41bc8ea3015" + "hash": "63c14c2150c33ec701bc4a0ff94efde69537d490" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", "line": 96, - "column": 14, + "column": 20, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "9f4994768baeedde467d8a6a594eddb96c8d4f35" + "hash": "d2a9fdaeef0e2810f480022d4c6f99e4f76a818e" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", "line": 96, - "column": 14, + "column": 20, "ruleId": "vue/no-side-effects-in-computed-properties", "message": "Unexpected side effect in \"cities\" computed property.", - "hash": "efdf2f0fa3127580834a1a71c05cc412cdffc17a" + "hash": "dd92a60a9b1ebefeb9a90941d45326fbfa483733" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", "line": 102, - "column": 9, + "column": 17, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "331da5bdcdaca996b5a86bbf9d074172d9a97de5" + "hash": "04be01ab638ce01f568fb0216929e65e1175ca23" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", "line": 110, - "column": 9, + "column": 17, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "1503a521d5aac26de71708193d5efe381fce1a91" + "hash": "8619c8e0b63e87d09268832f90e4fba06b87e41f" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", "line": 124, - "column": 7, + "column": 13, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "b7099b57a857083cd18ffca20e489fcc894675f0" + "hash": "281f918da00635079501418b1e6b2c05b62eb4a7" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", "line": 125, - "column": 7, + "column": 13, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "577790a8bd8c6081fe75e4d4ebbb99d251e7cf5a" + "hash": "c131b09fa67ab1d069f1d04a54582d6b0f206153" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", "line": 126, - "column": 7, + "column": 13, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "744ba1d220a69ca2c63c9b7dc1478ef71af0ec8e" + "hash": "3d3a2a4add64c291b8f5f1cddd90a173cd6a819d" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", "line": 131, - "column": 11, + "column": 21, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "e8134808053567607222487fcb4144183e0ffe86" - }, - { - "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", - "line": 143, - "column": 7, - "ruleId": "vue/no-mutating-props", - "message": "Unexpected mutation of \"entity\" prop.", - "hash": "fab57266818588096de456916ebe3fa88e89a4e4" - }, - { - "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", - "line": 144, - "column": 7, - "ruleId": "vue/no-mutating-props", - "message": "Unexpected mutation of \"entity\" prop.", - "hash": "f3d04b5c0a3a29bfa65e7eeeb1c50e989ec4821e" + "hash": "ed48f4988914d7897018a2e06830a97e6740b3e8" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", "line": 145, - "column": 7, + "column": 13, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "90b3e9a1ba5be62bd6894796ecc2e33e2f29329d" + "hash": "744f3a7610d4d6015e50e25149bceffd6c6e2763" + }, + { + "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", + "line": 146, + "column": 13, + "ruleId": "vue/no-mutating-props", + "message": "Unexpected mutation of \"entity\" prop.", + "hash": "eaaaaee5fb2e324ffe0a68eefe340dabdf162324" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", "line": 147, - "column": 9, + "column": 13, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "8a90e844f524ba01cc1c64806eeda052ab88957d" + "hash": "2de47b4a4ddbe546b3fce9898af48b72853364bf" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", "line": 149, - "column": 7, - "ruleId": "vue/no-mutating-props", - "message": "Unexpected mutation of \"entity\" prop.", - "hash": "e83c3118bc20776c00437d7edc3deaf24915bd66" - }, - { - "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", - "line": 158, - "column": 7, - "ruleId": "vue/no-mutating-props", - "message": "Unexpected mutation of \"entity\" prop.", - "hash": "378ccd9fa7cf74e41c905f1a21bdbf1f74c4015f" - }, - { - "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", - "line": 167, - "column": 37, - "ruleId": "@typescript-eslint/no-unused-vars", - "message": "'reject' is defined but never used.", - "hash": "5bbe7140e1370b411abbdfc0554d58d62472d0d7" - }, - { - "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", - "line": 168, "column": 17, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "b712ccec63c177608e199b9bc63f30bba6e6ecfe" + "hash": "1e7b1ad55866f708baaca72dfa4ff26d6f8e5d21" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", - "line": 186, - "column": 39, + "line": 152, + "column": 13, + "ruleId": "vue/no-mutating-props", + "message": "Unexpected mutation of \"entity\" prop.", + "hash": "84779331536ffceec8d4a8c5ca4307310b882549" + }, + { + "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", + "line": 161, + "column": 13, + "ruleId": "vue/no-mutating-props", + "message": "Unexpected mutation of \"entity\" prop.", + "hash": "0789999841be671a4d8ab080d6fdb679f843eb52" + }, + { + "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", + "line": 170, + "column": 51, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'reject' is defined but never used.", - "hash": "9a5b009d8e7f30e61c1991c97d390f0735d19968" + "hash": "bbb17afa114f016e2058d90aa32d2a625804f0d1" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", - "line": 187, - "column": 19, + "line": 171, + "column": 33, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "831be7f044c74b2c1a4244ffe3a065dd21e6247d" + "hash": "5fbe407ceceb37bff2ac800ceddd7942540132f1" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", - "line": 205, - "column": 9, - "ruleId": "vue/no-mutating-props", - "message": "Unexpected mutation of \"entity\" prop.", - "hash": "6c0fc8e55e3132c27cbaeabd2e84ca2838008247" + "line": 190, + "column": 55, + "ruleId": "@typescript-eslint/no-unused-vars", + "message": "'reject' is defined but never used.", + "hash": "e2af91def877befbabef8e93deba4c58a3ee2ded" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", - "line": 206, - "column": 9, + "line": 191, + "column": 37, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "4b66a3e1cf5476e4a0e2f1b3f3546222572abf8f" + "hash": "ee8544ee45681a650ed7d4918ae979685cdd8f0f" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", - "line": 207, - "column": 9, + "line": 210, + "column": 17, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "c685acbb0d48bab6c55b0af2dcc701f5edf993fe" + "hash": "5d9d2217c8c7e6571bc9f72a98ea5b370edb4968" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", - "line": 208, - "column": 9, + "line": 211, + "column": 17, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "0059a00f9459b29cb4a54eb2b273d9f59d7890af" + "hash": "6e04619b373c23c91f6c36c2aad314ac16cdb697" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", - "line": 240, - "column": 7, + "line": 212, + "column": 17, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "e66f10f1d6116821b3f0fb066bcbf50772ba5374" + "hash": "39df045639a62f64ccdb03a80e286bc3ad772587" + }, + { + "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", + "line": 213, + "column": 17, + "ruleId": "vue/no-mutating-props", + "message": "Unexpected mutation of \"entity\" prop.", + "hash": "c399a43fa797a8ce61c9d96a644a39cc84a387b7" + }, + { + "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue", + "line": 245, + "column": 13, + "ruleId": "vue/no-mutating-props", + "message": "Unexpected mutation of \"entity\" prop.", + "hash": "04337a07944caaa4819cfebcf29e1a7cbfdf248b" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CountrySelection.vue", - "line": 72, - "column": 7, + "line": 76, + "column": 13, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "037d3140ebf15fc52a0f58f7844a9a2af44a3d9c" + "hash": "373a2e31f110d138c66d77f1faf5dc61545c55af" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CountrySelection.vue", - "line": 77, - "column": 7, + "line": 81, + "column": 13, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "936e5eed1f826a51d129d97580bfb5084a6a4a48" + "hash": "421eb6a63224b4b1d81b216677a710c5c99ddee3" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/DatePane.vue", - "line": 92, - "column": 9, + "line": 95, + "column": 17, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "2058a778c66e3d4005cdfb4354ede1d93e8e1ab6" + "hash": "84e13d1fdc79f4568634a78df281adbe81739cbd" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/DatePane.vue", - "line": 100, - "column": 9, + "line": 103, + "column": 17, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "20b24f03b3260f915df456ce4d54775f2dda68b6" + "hash": "1eed832462e52537402a2825655733f0f2d391d9" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/EditPane.vue", - "line": 152, - "column": 9, + "line": 155, + "column": 17, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "849bea4394a838c6f9c75cb93a29049d9c7a3c9e" + "hash": "b3a822914fcb5e2fcf28efc331a45b9205002eeb" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/EditPane.vue", - "line": 161, - "column": 9, + "line": 164, + "column": 17, "ruleId": "vue/no-mutating-props", "message": "Unexpected mutation of \"entity\" prop.", - "hash": "56abd4aa323bb35e94cbd0264603b6d1848298d1" + "hash": "72c7d850f6cdeaf65b373a33234222f9766ee30b" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/index.js", @@ -1529,11 +1609,19 @@ }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/DashboardWidgets/NewsItem.vue", - "line": 136, - "column": 55, + "line": 142, + "column": 57, "ruleId": "@typescript-eslint/no-explicit-any", "message": "Unexpected any. Specify a different type.", - "hash": "2ca5e2fd1fccea428a772ad7d2dd0d001bdc413b" + "hash": "a68eeba7b2e1e603d83da0946c94cd221134aa99" + }, + { + "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue", + "line": 204, + "column": 22, + "ruleId": "vue/return-in-computed-property", + "message": "Expected to return a value in \"buttonMessage\" computed property.", + "hash": "b101c861dc11bc7024857fa2977118cb9f99c02c" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/index.js", @@ -1543,53 +1631,77 @@ "message": "'app' is assigned a value but never used.", "hash": "9e6125f4fc387dc362c69cc6e3ce360eb2851f1b" }, + { + "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/PickEntity/PickEntity.vue", + "line": 60, + "column": 22, + "ruleId": "vue/require-valid-default-prop", + "message": "Type of the default value for 'suggested' prop must be a function.", + "hash": "d30212820bc2e97fa02d75dbc3a014558693f169" + }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/Parts/AddressDetailsMap.vue", - "line": 21, + "line": 24, "column": 13, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'LatLngExpression' is defined but never used.", - "hash": "96b45c0371542f6e2a5b6f1b2d4f598698faff68" + "hash": "78f5a83dddf05b38aa9472ab93871e976719ef30" + }, + { + "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Entity/GenderIconRenderBox.vue", + "line": 6, + "column": 7, + "ruleId": "@typescript-eslint/no-unused-vars", + "message": "'props' is assigned a value but never used.", + "hash": "29fe0a5d52e46c479aa2e7bb23fb55c53df7b22e" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/PickWorkflow.vue", - "line": 107, - "column": 32, + "line": 114, + "column": 34, "ruleId": "vue/require-valid-default-prop", "message": "Type of the default value for 'goToGenerateWorkflowPayload' prop must be a function.", - "hash": "d86b61c318c09e12544ded19f252f6e281e8f985" + "hash": "d686fa87cfdc801aaaa08b24e827e503e81e86be" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/PickWorkflow.vue", - "line": 163, + "line": 170, "column": 7, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'goToDuplicateRelatedEntity' is assigned a value but never used.", - "hash": "a6b7b632e663f282e0f4951d95a6987fa70f4046" + "hash": "224ddf3abcff96e3e20a0facc7493883958d5a80" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/PickWorkflow.vue", - "line": 164, - "column": 3, + "line": 171, + "column": 5, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'event' is defined but never used.", - "hash": "dd3f0de245d7a2107ad5526965d1a0c29df0ef26" + "hash": "aa87fd5511528b5a45713fe1eaeda9ae0a8c0975" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/PickWorkflow.vue", - "line": 165, - "column": 3, + "line": 172, + "column": 5, "ruleId": "@typescript-eslint/no-unused-vars", "message": "'workflowName' is defined but never used.", - "hash": "d12891a4cc2df02d4b15f30b474edf8b01fd9766" + "hash": "e34bbcf245552e9329efdf7bd64ea3a56f0d4538" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/PickWorkflow.vue", - "line": 166, + "line": 173, "column": 12, "ruleId": "@typescript-eslint/no-empty-function", "message": "Unexpected empty arrow function.", - "hash": "3977a54eb58bc5c558dfb1ce043b14377a746441" + "hash": "8bdff7a5b3a7ac1506966a6066a1deb556d30efe" + }, + { + "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Modal.vue", + "line": 3, + "column": 9, + "ruleId": "vue/require-toggle-inside-transition", + "message": "The element inside `` is expected to have a `v-if` or `v-show` directive.", + "hash": "0594fb9d0984f4dd1612671aca21b571087ab8ee" }, { "path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.ts", @@ -1615,6 +1727,14 @@ "message": "'tags' is assigned a value but never used.", "hash": "ae9bb2e0651c118ed9efd227e88b86cc83f5d80d" }, + { + "path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/StickyNav.vue", + "line": 116, + "column": 18, + "ruleId": "@typescript-eslint/no-unused-vars", + "message": "'event' is defined but never used.", + "hash": "201f182769c6dfb87148b841e7d9b592be429669" + }, { "path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/index.js", "line": 19, @@ -1647,6 +1767,14 @@ "message": "'app' is assigned a value but never used.", "hash": "aaaaa63e7a60443b8cbf8191feb9142852ebdf1c" }, + { + "path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue", + "line": 79, + "column": 13, + "ruleId": "vue/require-v-for-key", + "message": "Elements in iteration expect to have 'v-bind:key' directives.", + "hash": "422f53925922e59655d0f71624c19af75d41628c" + }, { "path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/index.js", "line": 12, @@ -1687,6 +1815,22 @@ "message": "'evalFQDN' is assigned a value but never used.", "hash": "7fc32caafa23addddf44f3acbc5045b4523a0271" }, + { + "path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js", + "line": 611, + "column": 9, + "ruleId": "@typescript-eslint/no-unused-vars", + "message": "'errors' is assigned a value but never used.", + "hash": "c41cf979fc1626c38328dbf1028800c3395496bd" + }, + { + "path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/ExportFormActionGoalResult/App.vue", + "line": 282, + "column": 7, + "ruleId": "@typescript-eslint/no-unused-expressions", + "message": "Expected an assignment or function call and instead saw an expression.", + "hash": "de3a6e2bb10a80a2bacba665be74266c7efc7d64" + }, { "path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/ExportFormActionGoalResult/index.js", "line": 16, @@ -1703,6 +1847,38 @@ "message": "'app' is assigned a value but never used.", "hash": "2f161e663689e3e4dfe2c53b0d64c91a4d2b1a60" }, + { + "path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/App.vue", + "line": 263, + "column": 19, + "ruleId": "vue/return-in-computed-property", + "message": "Expected to return a value in \"refreshNetwork\" computed property.", + "hash": "2c1b08a49098c83b09058cedc0a962126e91e544" + }, + { + "path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/App.vue", + "line": 270, + "column": 7, + "ruleId": "vue/no-side-effects-in-computed-properties", + "message": "Unexpected side effect in \"legendLayers\" computed property.", + "hash": "760948d2187c853f17ac9a1bd7107e883092d4f4" + }, + { + "path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/App.vue", + "line": 281, + "column": 5, + "ruleId": "vue/no-dupe-keys", + "message": "Duplicate key 'checkedLayers'. May cause name collision in script or template tag.", + "hash": "447edb461e15e3ff5c60c8ecba88131e442539aa" + }, + { + "path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/App.vue", + "line": 353, + "column": 7, + "ruleId": "@typescript-eslint/no-unused-expressions", + "message": "Expected an assignment or function call and instead saw an expression.", + "hash": "9cf656cbf1eb3d7cc0082e63adcd320b6093d14f" + }, { "path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/index.js", "line": 20, @@ -1710,5 +1886,77 @@ "ruleId": "@typescript-eslint/no-unused-vars", "message": "'app' is assigned a value but never used.", "hash": "9e94e6412b8a44e47bfe8e66218cad09cff5bed4" + }, + { + "path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriod/SetReferrer.vue", + "line": 42, + "column": 16, + "ruleId": "@typescript-eslint/no-unused-vars", + "message": "'response' is defined but never used.", + "hash": "62de07b13c662e32332bb062038acee23978ea70" + }, + { + "path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue", + "line": 356, + "column": 28, + "ruleId": "@typescript-eslint/no-unused-vars", + "message": "'_response' is defined but never used.", + "hash": "097e7788a2b5dea500b80b8a3cf968e57063a66a" + }, + { + "path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeUserGroup.vue", + "line": 6, + "column": 8, + "ruleId": "@typescript-eslint/no-unused-vars", + "message": "'BadgeEntity' is defined but never used.", + "hash": "951a1b012bdec10c4b859af8b34dd894f63add23" + }, + { + "path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeUserGroup.vue", + "line": 7, + "column": 8, + "ruleId": "@typescript-eslint/no-unused-vars", + "message": "'UserRenderBoxBadge' is defined but never used.", + "hash": "99eba0d8633b2c9497417f4f61ec4194dbb2a96b" + }, + { + "path": "src/Bundle/ChillWopiBundle/src/Resources/public/module/pending/index.ts", + "line": 4, + "column": 3, + "ruleId": "@typescript-eslint/no-unused-vars", + "message": "'StoredObjectStatus' is defined but never used.", + "hash": "63f8c4572293916850d6165647774b27d4b732c6" + }, + { + "path": "src/Bundle/ChillWopiBundle/src/Resources/public/module/pending/index.ts", + "line": 5, + "column": 3, + "ruleId": "@typescript-eslint/no-unused-vars", + "message": "'StoredObjectStatusChange' is defined but never used.", + "hash": "a87c178e3eb5999bf0f46b3fa1c6da77e1be08b9" + }, + { + "path": "src/Bundle/ChillWopiBundle/src/Resources/public/module/pending/index.ts", + "line": 30, + "column": 61, + "ruleId": "@typescript-eslint/no-unused-vars", + "message": "'e' is defined but never used.", + "hash": "02953121583f4f73742a19adab099ab63df9076e" + }, + { + "path": "src/Bundle/ChillWopiBundle/src/Resources/public/module/pending/index.ts", + "line": 31, + "column": 32, + "ruleId": "@typescript-eslint/no-explicit-any", + "message": "Unexpected any. Specify a different type.", + "hash": "af48e21a1651b6017ede882dab249c00a818a44d" + }, + { + "path": "src/Bundle/ChillWopiBundle/src/Resources/public/module/pending/index.ts", + "line": 37, + "column": 16, + "ruleId": "@typescript-eslint/no-explicit-any", + "message": "Unexpected any. Specify a different type.", + "hash": "7513ea552a0a649ce4ab93b6cf9d40bfef4f68d9" } -] +] \ No newline at end of file diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 222861c34..000000000 --- a/.prettierrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "tabWidth": 2, - "useTabs": false -} diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index d7a227605..000000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "Chill Debug", - "type": "php", - "request": "launch", - "port": 9000, - "pathMappings": { - "/var/www/html": "${workspaceFolder}" - }, - "preLaunchTask": "symfony" - }, - { - "name": "Yarn Encore Dev (Watch)", - "type": "node-terminal", - "request": "launch", - "command": "yarn encore dev --watch", - "cwd": "${workspaceFolder}" - } - ], - "compounds": [ - { - "name": "Chill Debug + Yarn Encore Dev (Watch)", - "configurations": ["Chill Debug", "Yarn Encore Dev (Watch)"] - } - ] -} diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index a652cfe03..000000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "tasks": [ - { - "type": "shell", - "command": "symfony", - "args": [ - "server:start", - "--allow-http", - "--no-tls", - "--port=8000", - "--allow-all-ip", - "-d" - ], - "label": "symfony" - }, - { - "type": "shell", - "command": "yarn", - "args": ["encore", "dev", "--watch"], - "label": "webpack" - } - ] -} diff --git a/CONVENTIONS-fr.md b/CONVENTIONS-fr.md index 4462f4e08..028971ef2 100644 --- a/CONVENTIONS-fr.md +++ b/CONVENTIONS-fr.md @@ -54,7 +54,7 @@ Arborescence: - person - personvendee - household_edit_metadata - - index.ts + - index.js ``` ## Organisation des feuilles de styles diff --git a/composer.json b/composer.json index 94338ce42..8d36d4d07 100644 --- a/composer.json +++ b/composer.json @@ -133,7 +133,6 @@ "Chill\\TaskBundle\\": "src/Bundle/ChillTaskBundle", "Chill\\ThirdPartyBundle\\": "src/Bundle/ChillThirdPartyBundle", "Chill\\WopiBundle\\": "src/Bundle/ChillWopiBundle/src", - "Chill\\TicketBundle\\": "src/Bundle/ChillTicketBundle/src", "Chill\\Utils\\Rector\\": "utils/rector/src" } }, diff --git a/config/bundles.php b/config/bundles.php index 2eb99868b..ec11bc0b6 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -35,7 +35,6 @@ return [ Chill\ThirdPartyBundle\ChillThirdPartyBundle::class => ['all' => true], Chill\BudgetBundle\ChillBudgetBundle::class => ['all' => true], Chill\WopiBundle\ChillWopiBundle::class => ['all' => true], - Chill\TicketBundle\ChillTicketBundle::class => ['all' => true], Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true], Symfony\UX\Translator\UxTranslatorBundle::class => ['all' => true], ]; diff --git a/config/packages/chill_ticket.yaml b/config/packages/chill_ticket.yaml deleted file mode 100644 index acb5571dc..000000000 --- a/config/packages/chill_ticket.yaml +++ /dev/null @@ -1,4 +0,0 @@ -chill_ticket: - ticket: - person_per_ticket: one # One of "one"; "many" - diff --git a/config/packages/doctrine_migrations_chill.yaml b/config/packages/doctrine_migrations_chill.yaml index 29acb8a49..8b8bf539b 100644 --- a/config/packages/doctrine_migrations_chill.yaml +++ b/config/packages/doctrine_migrations_chill.yaml @@ -14,7 +14,6 @@ doctrine_migrations: 'Chill\Migrations\Calendar': '@ChillCalendarBundle/migrations' 'Chill\Migrations\Budget': '@ChillBudgetBundle/migrations' 'Chill\Migrations\Report': '@ChillReportBundle/migrations' - 'Chill\Migrations\Ticket': '@ChillTicketBundle/migrations' all_or_nothing: true diff --git a/config/routes/chill_ticket.yaml b/config/routes/chill_ticket.yaml deleted file mode 100644 index 311a51992..000000000 --- a/config/routes/chill_ticket.yaml +++ /dev/null @@ -1,2 +0,0 @@ -chill_ticket_bundle: - resource: '@ChillTicketBundle/config/routes.yaml' diff --git a/docs/source/development/create-a-new-bundle.rst b/docs/source/development/create-a-new-bundle.rst index 8206acee8..087487ff0 100644 --- a/docs/source/development/create-a-new-bundle.rst +++ b/docs/source/development/create-a-new-bundle.rst @@ -11,94 +11,24 @@ Create a new bundle ******************* +Create your own bundle is not a trivial task. + +The easiest way to achieve this is seems to be : + +1. Prepare a fresh installation of the chill project, in a new directory +2. Create a new bundle in this project, in the src directory +3. Initialize a git repository **at the root bundle**, and create your initial commit. +4. Register the bundle with composer/packagist. If you do not plan to distribute your bundle with packagist, you may use a custom repository for achieve this [#f1]_ +5. Move to a development installation, made as described in the :ref:`installation-for-development` section, and add your new repository to the composer.json file +6. Work as :ref:`usual ` + .. warning:: This part of the doc is not yet tested -Create a new directory with Bundle class ----------------------------------------- - -.. code-block:: bash - - mkdir -p src/Bundle/ChillSomeBundle/src/config - mkdir -p src/Bundle/ChillSomeBundle/src/Controller - -Add a bundle file - -.. code-block:: php - - ['all' => true], - -And import routes in :code:`config/routes/chill_some_bundle.yaml`: - -.. code-block:: yaml - - chill_ticket_bundle: - resource: '@ChillSomeBundle/config/routes.yaml' - -Add the doctrine_migration namespace ------------------------------------- - -Add the namespace to :code:`config/packages/doctrine_migrations_chill.yaml` - -.. code-block:: diff - - doctrine_migrations: - migrations_paths: - + 'Chill\Some\Ticket': '@ChillSomeBundle/migrations' - -Dump autoloading ----------------- - -.. code-block:: bash - - symfony composer dump-autoload +.. rubric:: Footnotes +.. [#f1] Be aware that we use the Affero GPL Licence, which ensure that all users must have access to derivative works done with this software. diff --git a/package.json b/package.json index ccabc5c25..fc50ba29c 100644 --- a/package.json +++ b/package.json @@ -79,12 +79,12 @@ "dev": "encore dev", "watch": "encore dev --watch", "build": "encore production --progress", - "specs-build": "yaml-merge src/Bundle/ChillMainBundle/chill.api.specs.yaml src/Bundle/ChillPersonBundle/chill.api.specs.yaml src/Bundle/ChillCalendarBundle/chill.api.specs.yaml src/Bundle/ChillThirdPartyBundle/chill.api.specs.yaml src/Bundle/ChillDocStoreBundle/chill.api.specs.yaml src/Bundle/ChillTicketBundle/chill.api.specs.yaml> templates/api/specs.yaml", + "specs-build": "yaml-merge src/Bundle/ChillMainBundle/chill.api.specs.yaml src/Bundle/ChillPersonBundle/chill.api.specs.yaml src/Bundle/ChillCalendarBundle/chill.api.specs.yaml src/Bundle/ChillThirdPartyBundle/chill.api.specs.yaml src/Bundle/ChillDocStoreBundle/chill.api.specs.yaml> templates/api/specs.yaml", "specs-validate": "swagger-cli validate templates/api/specs.yaml", "specs-create-dir": "mkdir -p templates/api", "specs": "yarn run specs-create-dir && yarn run specs-build && yarn run specs-validate", "version": "node --version", - "eslint": "eslint-baseline --fix \"src/**/*.{js,ts,vue}\"" + "eslint": "npx eslint-baseline --fix \"src/**/*.{js,ts,vue}\"" }, "private": true } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index d122aeb4c..cdc7468ec 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -58,10 +58,6 @@ src/Bundle/ChillPersonBundle/Tests/Controller/PersonDuplicateControllerViewTest.php - - - src/Bundle/ChillTicketBundle/tests/ - - +
+
+
+
+
{{ $t("copy_range_from_to") }}
+
+
+ +
+ + +
+
+
+ + + diff --git a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/Components/EditLocation.vue b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/Components/EditLocation.vue index 5f434052e..86d4a6c5a 100644 --- a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/Components/EditLocation.vue +++ b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/Components/EditLocation.vue @@ -1,28 +1,28 @@ diff --git a/src/Bundle/ChillDocGeneratorBundle/Resources/public/vuejs/_components/PickTemplate.vue b/src/Bundle/ChillDocGeneratorBundle/Resources/public/vuejs/_components/PickTemplate.vue index 3a2f4fd59..1bcc95fd0 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Resources/public/vuejs/_components/PickTemplate.vue +++ b/src/Bundle/ChillDocGeneratorBundle/Resources/public/vuejs/_components/PickTemplate.vue @@ -1,54 +1,59 @@ diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/js/async-upload/uploader.ts b/src/Bundle/ChillDocStoreBundle/Resources/public/js/async-upload/uploader.ts index 367ab0829..a09c4a5f6 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/js/async-upload/uploader.ts +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/js/async-upload/uploader.ts @@ -6,20 +6,20 @@ const algo = "AES-CBC"; const URL_POST = "/asyncupload/temp_url/generate/post"; const keyDefinition = { - name: algo, - length: 256, + name: algo, + length: 256, }; const createFilename = (): string => { - let text = ""; - const possible = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + let text = ""; + const possible = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; - for (let i = 0; i < 7; i++) { - text += possible.charAt(Math.floor(Math.random() * possible.length)); - } + for (let i = 0; i < 7; i++) { + text += possible.charAt(Math.floor(Math.random() * possible.length)); + } - return text; + return text; }; /** @@ -30,59 +30,59 @@ const createFilename = (): string => { * @returns {Promise} A Promise that resolves to the newly created StoredObject. */ export const fetchNewStoredObject = async (): Promise => { - return makeFetch("POST", "/api/1.0/doc-store/stored-object/create", null); + return makeFetch("POST", "/api/1.0/doc-store/stored-object/create", null); }; export const uploadVersion = async ( - uploadFile: ArrayBuffer, - storedObject: StoredObject, + uploadFile: ArrayBuffer, + storedObject: StoredObject, ): Promise => { - const params = new URLSearchParams(); - params.append("expires_delay", "180"); - params.append("submit_delay", "180"); - const asyncData: PostStoreObjectSignature = await makeFetch( - "GET", - `/api/1.0/doc-store/async-upload/temp_url/${storedObject.uuid}/generate/post` + - "?" + - params.toString(), - ); - const suffix = createFilename(); - const filename = asyncData.prefix + suffix; - const formData = new FormData(); - formData.append("redirect", asyncData.redirect); - formData.append("max_file_size", asyncData.max_file_size.toString()); - formData.append("max_file_count", asyncData.max_file_count.toString()); - formData.append("expires", asyncData.expires.toString()); - formData.append("signature", asyncData.signature); - formData.append(filename, new Blob([uploadFile]), suffix); + const params = new URLSearchParams(); + params.append("expires_delay", "180"); + params.append("submit_delay", "180"); + const asyncData: PostStoreObjectSignature = await makeFetch( + "GET", + `/api/1.0/doc-store/async-upload/temp_url/${storedObject.uuid}/generate/post` + + "?" + + params.toString(), + ); + const suffix = createFilename(); + const filename = asyncData.prefix + suffix; + const formData = new FormData(); + formData.append("redirect", asyncData.redirect); + formData.append("max_file_size", asyncData.max_file_size.toString()); + formData.append("max_file_count", asyncData.max_file_count.toString()); + formData.append("expires", asyncData.expires.toString()); + formData.append("signature", asyncData.signature); + formData.append(filename, new Blob([uploadFile]), suffix); - const response = await window.fetch(asyncData.url, { - method: "POST", - body: formData, - }); + const response = await window.fetch(asyncData.url, { + method: "POST", + body: formData, + }); - if (!response.ok) { - console.error("Error while sending file to store", response); - throw new Error(response.statusText); - } + if (!response.ok) { + console.error("Error while sending file to store", response); + throw new Error(response.statusText); + } - return Promise.resolve(filename); + return Promise.resolve(filename); }; export const encryptFile = async ( - originalFile: ArrayBuffer, + originalFile: ArrayBuffer, ): Promise<[ArrayBuffer, Uint8Array, JsonWebKey]> => { - const iv = crypto.getRandomValues(new Uint8Array(16)); - const key = await window.crypto.subtle.generateKey(keyDefinition, true, [ - "encrypt", - "decrypt", - ]); - const exportedKey = await window.crypto.subtle.exportKey("jwk", key); - const encrypted = await window.crypto.subtle.encrypt( - { name: algo, iv: iv }, - key, - originalFile, - ); + const iv = crypto.getRandomValues(new Uint8Array(16)); + const key = await window.crypto.subtle.generateKey(keyDefinition, true, [ + "encrypt", + "decrypt", + ]); + const exportedKey = await window.crypto.subtle.exportKey("jwk", key); + const encrypted = await window.crypto.subtle.encrypt( + { name: algo, iv: iv }, + key, + originalFile, + ); - return Promise.resolve([encrypted, iv, exportedKey]); + return Promise.resolve([encrypted, iv, exportedKey]); }; diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/js/generic-doc-api.ts b/src/Bundle/ChillDocStoreBundle/Resources/public/js/generic-doc-api.ts index aaff2a331..c15eff711 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/js/generic-doc-api.ts +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/js/generic-doc-api.ts @@ -2,9 +2,9 @@ import { fetchResults } from "ChillMainAssets/lib/api/apiMethods"; import { GenericDocForAccompanyingPeriod } from "ChillDocStoreAssets/types/generic_doc"; export function fetch_generic_docs_by_accompanying_period( - periodId: number, + periodId: number, ): Promise { - return fetchResults( - `/api/1.0/doc-store/generic-doc/by-period/${periodId}/index`, - ); + return fetchResults( + `/api/1.0/doc-store/generic-doc/by-period/${periodId}/index`, + ); } diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/module/async_upload/index.ts b/src/Bundle/ChillDocStoreBundle/Resources/public/module/async_upload/index.ts index 97e0d3aa3..30fe2b26a 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/module/async_upload/index.ts +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/module/async_upload/index.ts @@ -6,116 +6,117 @@ import { _createI18n } from "../../../../../ChillMainBundle/Resources/public/vue const i18n = _createI18n({}); const startApp = ( - divElement: HTMLDivElement, - collectionEntry: null | HTMLLIElement, + divElement: HTMLDivElement, + collectionEntry: null | HTMLLIElement, ): void => { - console.log("app started", divElement); + console.log("app started", divElement); - const inputTitle = collectionEntry?.querySelector("input[type='text']"); + const inputTitle = collectionEntry?.querySelector("input[type='text']"); - const input_stored_object: HTMLInputElement | null = divElement.querySelector( - "input[data-stored-object]", - ); - if (null === input_stored_object) { - throw new Error("input to stored object not found"); - } + const input_stored_object: HTMLInputElement | null = + divElement.querySelector("input[data-stored-object]"); + if (null === input_stored_object) { + throw new Error("input to stored object not found"); + } - let existingDoc: StoredObject | null = null; - if (input_stored_object.value !== "") { - existingDoc = JSON.parse(input_stored_object.value); - } - const app_container = document.createElement("div"); - divElement.appendChild(app_container); + let existingDoc: StoredObject | null = null; + if (input_stored_object.value !== "") { + existingDoc = JSON.parse(input_stored_object.value); + } + const app_container = document.createElement("div"); + divElement.appendChild(app_container); - const app = createApp({ - template: - '', - data() { - return { - existingDoc: existingDoc, - inputTitle: inputTitle, - }; - }, - components: { - DropFileWidget, - }, - methods: { - addDocument: function ({ - stored_object, - stored_object_version, - file_name, - }: { - stored_object: StoredObject; - stored_object_version: StoredObjectVersion; - file_name: string; - }): void { - stored_object.title = file_name; - console.log("object added", stored_object); - console.log("version added", stored_object_version); - this.$data.existingDoc = stored_object; - this.$data.existingDoc.currentVersion = stored_object_version; - input_stored_object.value = JSON.stringify(this.$data.existingDoc); - if (this.$data.inputTitle) { - if (!this.$data.inputTitle?.value) { - this.$data.inputTitle.value = file_name; - } - } - }, - removeDocument: function (object: StoredObject): void { - console.log("catch remove document", object); - input_stored_object.value = ""; - this.$data.existingDoc = undefined; - console.log("collectionEntry", collectionEntry); + const app = createApp({ + template: + '', + data() { + return { + existingDoc: existingDoc, + inputTitle: inputTitle, + }; + }, + components: { + DropFileWidget, + }, + methods: { + addDocument: function ({ + stored_object, + stored_object_version, + file_name, + }: { + stored_object: StoredObject; + stored_object_version: StoredObjectVersion; + file_name: string; + }): void { + stored_object.title = file_name; + console.log("object added", stored_object); + console.log("version added", stored_object_version); + this.$data.existingDoc = stored_object; + this.$data.existingDoc.currentVersion = stored_object_version; + input_stored_object.value = JSON.stringify( + this.$data.existingDoc, + ); + if (this.$data.inputTitle) { + if (!this.$data.inputTitle?.value) { + this.$data.inputTitle.value = file_name; + } + } + }, + removeDocument: function (object: StoredObject): void { + console.log("catch remove document", object); + input_stored_object.value = ""; + this.$data.existingDoc = undefined; + console.log("collectionEntry", collectionEntry); - if (null !== collectionEntry) { - console.log("will remove collection"); - collectionEntry.remove(); - } - }, - }, - }); + if (null !== collectionEntry) { + console.log("will remove collection"); + collectionEntry.remove(); + } + }, + }, + }); - app.use(i18n).mount(app_container); + app.use(i18n).mount(app_container); }; window.addEventListener("collection-add-entry", (( - e: CustomEvent, + e: CustomEvent, ) => { - const detail = e.detail; - const divElement: null | HTMLDivElement = detail.entry.querySelector( - "div[data-stored-object]", - ); + const detail = e.detail; + const divElement: null | HTMLDivElement = detail.entry.querySelector( + "div[data-stored-object]", + ); - if (null === divElement) { - throw new Error("div[data-stored-object] not found"); - } + if (null === divElement) { + throw new Error("div[data-stored-object] not found"); + } - startApp(divElement, detail.entry); + startApp(divElement, detail.entry); }) as EventListener); window.addEventListener("DOMContentLoaded", () => { - const upload_inputs: NodeListOf = document.querySelectorAll( - "div[data-stored-object]", - ); + const upload_inputs: NodeListOf = document.querySelectorAll( + "div[data-stored-object]", + ); - upload_inputs.forEach((input: HTMLDivElement): void => { - // test for a parent to check if this is a collection entry - let collectionEntry: null | HTMLLIElement = null; - const parent = input.parentElement; - console.log("parent", parent); - if (null !== parent) { - const grandParent = parent.parentElement; - console.log("grandParent", grandParent); - if (null !== grandParent) { - if ( - grandParent.tagName.toLowerCase() === "li" && - grandParent.classList.contains("entry") - ) { - collectionEntry = grandParent as HTMLLIElement; + upload_inputs.forEach((input: HTMLDivElement): void => { + // test for a parent to check if this is a collection entry + let collectionEntry: null | HTMLLIElement = null; + const parent = input.parentElement; + console.log("parent", parent); + if (null !== parent) { + const grandParent = parent.parentElement; + console.log("grandParent", grandParent); + if (null !== grandParent) { + if ( + grandParent.tagName.toLowerCase() === "li" && + grandParent.classList.contains("entry") + ) { + collectionEntry = grandParent as HTMLLIElement; + } + } } - } - } - startApp(input, collectionEntry); - }); + startApp(input, collectionEntry); + }); }); export {}; diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/module/button_download/index.ts b/src/Bundle/ChillDocStoreBundle/Resources/public/module/button_download/index.ts index 4ab819ddf..30b9e29d1 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/module/button_download/index.ts +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/module/button_download/index.ts @@ -9,26 +9,26 @@ import ToastPlugin from "vue-toast-notification"; const i18n = _createI18n({}); window.addEventListener("DOMContentLoaded", function (e) { - document - .querySelectorAll("div[data-download-button-single]") - .forEach((el) => { - const storedObject = JSON.parse( - el.dataset.storedObject as string, - ) as StoredObject; - const title = el.dataset.title as string; - const app = createApp({ - components: { DownloadButton }, - data() { - return { - storedObject, - title, - classes: { btn: true, "btn-outline-primary": true }, - }; - }, - template: - '', - }); + document + .querySelectorAll("div[data-download-button-single]") + .forEach((el) => { + const storedObject = JSON.parse( + el.dataset.storedObject as string, + ) as StoredObject; + const title = el.dataset.title as string; + const app = createApp({ + components: { DownloadButton }, + data() { + return { + storedObject, + title, + classes: { btn: true, "btn-outline-primary": true }, + }; + }, + template: + '', + }); - app.use(i18n).use(ToastPlugin).mount(el); - }); + app.use(i18n).use(ToastPlugin).mount(el); + }); }); diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/module/document_action_buttons_group/index.ts b/src/Bundle/ChillDocStoreBundle/Resources/public/module/document_action_buttons_group/index.ts index 080f63c66..5874e88fe 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/module/document_action_buttons_group/index.ts +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/module/document_action_buttons_group/index.ts @@ -8,66 +8,66 @@ import ToastPlugin from "vue-toast-notification"; const i18n = _createI18n({}); window.addEventListener("DOMContentLoaded", function (e) { - document - .querySelectorAll("div[data-download-buttons]") - .forEach((el) => { - const app = createApp({ - components: { DocumentActionButtonsGroup }, - data() { - const datasets = el.dataset as { - filename: string; - canEdit: string; - storedObject: string; - buttonSmall: string; - davLink: string; - davLinkExpiration: string; - }; + document + .querySelectorAll("div[data-download-buttons]") + .forEach((el) => { + const app = createApp({ + components: { DocumentActionButtonsGroup }, + data() { + const datasets = el.dataset as { + filename: string; + canEdit: string; + storedObject: string; + buttonSmall: string; + davLink: string; + davLinkExpiration: string; + }; - const storedObject = JSON.parse( - datasets.storedObject, - ) as StoredObject, - filename = datasets.filename, - canEdit = datasets.canEdit === "1", - small = datasets.buttonSmall === "1", - davLink = - "davLink" in datasets && datasets.davLink !== "" - ? datasets.davLink - : null, - davLinkExpiration = - "davLinkExpiration" in datasets - ? Number.parseInt(datasets.davLinkExpiration) - : null; - return { - storedObject, - filename, - canEdit, - small, - davLink, - davLinkExpiration, - }; - }, - template: - '', - methods: { - onStoredObjectStatusChange: function ( - newStatus: StoredObjectStatusChange, - ): void { - this.$data.storedObject.status = newStatus.status; - this.$data.storedObject.filename = newStatus.filename; - this.$data.storedObject.type = newStatus.type; + const storedObject = JSON.parse( + datasets.storedObject, + ) as StoredObject, + filename = datasets.filename, + canEdit = datasets.canEdit === "1", + small = datasets.buttonSmall === "1", + davLink = + "davLink" in datasets && datasets.davLink !== "" + ? datasets.davLink + : null, + davLinkExpiration = + "davLinkExpiration" in datasets + ? Number.parseInt(datasets.davLinkExpiration) + : null; + return { + storedObject, + filename, + canEdit, + small, + davLink, + davLinkExpiration, + }; + }, + template: + '', + methods: { + onStoredObjectStatusChange: function ( + newStatus: StoredObjectStatusChange, + ): void { + this.$data.storedObject.status = newStatus.status; + this.$data.storedObject.filename = newStatus.filename; + this.$data.storedObject.type = newStatus.type; - // remove eventual div which inform pending status - document - .querySelectorAll( - `[data-docgen-is-pending="${this.$data.storedObject.id}"]`, - ) - .forEach(function (el) { - el.remove(); - }); - }, - }, - }); + // remove eventual div which inform pending status + document + .querySelectorAll( + `[data-docgen-is-pending="${this.$data.storedObject.id}"]`, + ) + .forEach(function (el) { + el.remove(); + }); + }, + }, + }); - app.use(i18n).use(ToastPlugin).mount(el); - }); + app.use(i18n).use(ToastPlugin).mount(el); + }); }); diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/types/generic_doc.ts b/src/Bundle/ChillDocStoreBundle/Resources/public/types/generic_doc.ts index 9cda25cad..facc55e58 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/types/generic_doc.ts +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/types/generic_doc.ts @@ -2,7 +2,7 @@ import { DateTime } from "ChillMainAssets/types"; import { StoredObject } from "ChillDocStoreAssets/types/index"; export interface GenericDocMetadata { - isPresent: boolean; + isPresent: boolean; } /** @@ -15,57 +15,57 @@ export interface EmptyMetadata extends GenericDocMetadata {} * Minimal Metadata for a GenericDoc with a normalizer */ export interface BaseMetadata extends GenericDocMetadata { - title: string; + title: string; } /** * A generic doc is a document attached to a Person or an AccompanyingPeriod. */ export interface GenericDoc { - type: "doc_store_generic_doc"; - uniqueKey: string; - key: string; - identifiers: object; - context: "person" | "accompanying-period"; - doc_date: DateTime; - metadata: GenericDocMetadata; - storedObject: StoredObject | null; + type: "doc_store_generic_doc"; + uniqueKey: string; + key: string; + identifiers: object; + context: "person" | "accompanying-period"; + doc_date: DateTime; + metadata: GenericDocMetadata; + storedObject: StoredObject | null; } export interface GenericDocForAccompanyingPeriod extends GenericDoc { - context: "accompanying-period"; + context: "accompanying-period"; } interface BaseMetadataWithHtml extends BaseMetadata { - html: string; + html: string; } export interface GenericDocForAccompanyingCourseDocument - extends GenericDocForAccompanyingPeriod { - key: "accompanying_course_document"; - metadata: BaseMetadataWithHtml; + extends GenericDocForAccompanyingPeriod { + key: "accompanying_course_document"; + metadata: BaseMetadataWithHtml; } export interface GenericDocForAccompanyingCourseActivityDocument - extends GenericDocForAccompanyingPeriod { - key: "accompanying_course_activity_document"; - metadata: BaseMetadataWithHtml; + extends GenericDocForAccompanyingPeriod { + key: "accompanying_course_activity_document"; + metadata: BaseMetadataWithHtml; } export interface GenericDocForAccompanyingCourseCalendarDocument - extends GenericDocForAccompanyingPeriod { - key: "accompanying_course_calendar_document"; - metadata: BaseMetadataWithHtml; + extends GenericDocForAccompanyingPeriod { + key: "accompanying_course_calendar_document"; + metadata: BaseMetadataWithHtml; } export interface GenericDocForAccompanyingCoursePersonDocument - extends GenericDocForAccompanyingPeriod { - key: "person_document"; - metadata: BaseMetadataWithHtml; + extends GenericDocForAccompanyingPeriod { + key: "person_document"; + metadata: BaseMetadataWithHtml; } export interface GenericDocForAccompanyingCourseWorkEvaluationDocument - extends GenericDocForAccompanyingPeriod { - key: "accompanying_period_work_evaluation_document"; - metadata: BaseMetadataWithHtml; + extends GenericDocForAccompanyingPeriod { + key: "accompanying_period_work_evaluation_document"; + metadata: BaseMetadataWithHtml; } diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/types/index.ts b/src/Bundle/ChillDocStoreBundle/Resources/public/types/index.ts index f71ed0350..5b34b8f73 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/types/index.ts +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/types/index.ts @@ -4,73 +4,73 @@ import { SignedUrlGet } from "ChillDocStoreAssets/vuejs/StoredObjectButton/helpe export type StoredObjectStatus = "empty" | "ready" | "failure" | "pending"; export interface StoredObject { - id: number; - title: string | null; - uuid: string; - prefix: string; - status: StoredObjectStatus; - currentVersion: - | null - | StoredObjectVersionCreated - | StoredObjectVersionPersisted; - totalVersions: number; - datas: object; - /** @deprecated */ - creationDate: DateTime; - createdAt: DateTime | null; - createdBy: User | null; - _permissions: { - canEdit: boolean; - canSee: boolean; - }; - _links?: { - dav_link?: { - href: string; - expiration: number; + id: number; + title: string | null; + uuid: string; + prefix: string; + status: StoredObjectStatus; + currentVersion: + | null + | StoredObjectVersionCreated + | StoredObjectVersionPersisted; + totalVersions: number; + datas: object; + /** @deprecated */ + creationDate: DateTime; + createdAt: DateTime | null; + createdBy: User | null; + _permissions: { + canEdit: boolean; + canSee: boolean; + }; + _links?: { + dav_link?: { + href: string; + expiration: number; + }; + downloadLink?: SignedUrlGet; }; - downloadLink?: SignedUrlGet; - }; } export interface StoredObjectVersion { - /** - * filename of the object in the object storage - */ - filename: string; - iv: number[]; - keyInfos: JsonWebKey; - type: string; + /** + * filename of the object in the object storage + */ + filename: string; + iv: number[]; + keyInfos: JsonWebKey; + type: string; } export interface StoredObjectVersionCreated extends StoredObjectVersion { - persisted: false; + persisted: false; } export interface StoredObjectVersionPersisted - extends StoredObjectVersionCreated { - version: number; - id: number; - createdAt: DateTime | null; - createdBy: User | null; + extends StoredObjectVersionCreated { + version: number; + id: number; + createdAt: DateTime | null; + createdBy: User | null; } export interface StoredObjectStatusChange { - id: number; - filename: string; - status: StoredObjectStatus; - type: string; + id: number; + filename: string; + status: StoredObjectStatus; + type: string; } export interface StoredObjectVersionWithPointInTime - extends StoredObjectVersionPersisted { - "point-in-times": StoredObjectPointInTime[]; - "from-restored": StoredObjectVersionPersisted | null; + extends StoredObjectVersionPersisted { + "point-in-times": StoredObjectPointInTime[]; + "from-restored": StoredObjectVersionPersisted | null; } export interface StoredObjectPointInTime { - id: number; - byUser: User | null; - reason: "keep-before-conversion" | "keep-by-user"; + id: number; + byUser: User | null; + reason: "keep-before-conversion" | "keep-by-user"; } /** @@ -82,63 +82,63 @@ export type WopiEditButtonExecutableBeforeLeaveFunction = () => Promise; * Object containing information for performering a POST request to a swift object store */ export interface PostStoreObjectSignature { - method: "POST"; - max_file_size: number; - max_file_count: 1; - expires: number; - submit_delay: 180; - redirect: string; - prefix: string; - url: string; - signature: string; + method: "POST"; + max_file_size: number; + max_file_count: 1; + expires: number; + submit_delay: 180; + redirect: string; + prefix: string; + url: string; + signature: string; } export interface PDFPage { - index: number; - width: number; - height: number; + index: number; + width: number; + height: number; } export interface SignatureZone { - index: number | null; - x: number; - y: number; - width: number; - height: number; - PDFPage: PDFPage; + index: number | null; + x: number; + y: number; + width: number; + height: number; + PDFPage: PDFPage; } export interface Signature { - id: number; - storedObject: StoredObject; - zones: SignatureZone[]; + id: number; + storedObject: StoredObject; + zones: SignatureZone[]; } export type SignedState = - | "pending" - | "signed" - | "rejected" - | "canceled" - | "error"; + | "pending" + | "signed" + | "rejected" + | "canceled" + | "error"; export interface CheckSignature { - state: SignedState; - storedObject: StoredObject; + state: SignedState; + storedObject: StoredObject; } export type CanvasEvent = "select" | "add"; export interface ZoomLevel { - id: number; - zoom: number; - label: { - fr?: string; - nl?: string; - }; + id: number; + zoom: number; + label: { + fr?: string; + nl?: string; + }; } export interface GenericDoc { - type: "doc_store_generic_doc"; - key: string; - context: "person" | "accompanying-period"; - doc_date: DateTime; + type: "doc_store_generic_doc"; + key: string; + context: "person" | "accompanying-period"; + doc_date: DateTime; } diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentActionButtonsGroup.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentActionButtonsGroup.vue index 8fd348807..85548f6d3 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentActionButtonsGroup.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentActionButtonsGroup.vue @@ -1,65 +1,67 @@ diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/App.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/App.vue index 3021de36e..ea195da4b 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/App.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/App.vue @@ -1,338 +1,355 @@ diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/index.ts b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/index.ts index e3ace5b40..a46257b5e 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/index.ts +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/index.ts @@ -4,36 +4,36 @@ import { _createI18n } from "ChillMainAssets/vuejs/_js/i18n"; import App from "./App.vue"; const appMessages = { - fr: { - yes: "Oui", - are_you_sure: "Êtes-vous sûr·e?", - you_are_going_to_sign: "Vous allez signer le document", - signature_confirmation: "Confirmation de la signature", - sign: "Signer", - choose_another_signature: "Choisir une autre zone", - cancel: "Annuler", - last_sign_zone: "Zone de signature précédente", - next_sign_zone: "Zone de signature suivante", - add_sign_zone: "Ajouter une zone de signature", - click_on_document: "Cliquer sur le document", - last_zone: "Zone précédente", - next_zone: "Zone suivante", - add_zone: "Ajouter une zone", - another_zone: "Autre zone", - electronic_signature_in_progress: "Signature électronique en cours...", - loading: "Chargement...", - remove_sign_zone: "Enlever la zone", - return: "Retour", - see_all_pages: "Voir toutes les pages", - all_pages: "Toutes les pages", - }, + fr: { + yes: "Oui", + are_you_sure: "Êtes-vous sûr·e?", + you_are_going_to_sign: "Vous allez signer le document", + signature_confirmation: "Confirmation de la signature", + sign: "Signer", + choose_another_signature: "Choisir une autre zone", + cancel: "Annuler", + last_sign_zone: "Zone de signature précédente", + next_sign_zone: "Zone de signature suivante", + add_sign_zone: "Ajouter une zone de signature", + click_on_document: "Cliquer sur le document", + last_zone: "Zone précédente", + next_zone: "Zone suivante", + add_zone: "Ajouter une zone", + another_zone: "Autre zone", + electronic_signature_in_progress: "Signature électronique en cours...", + loading: "Chargement...", + remove_sign_zone: "Enlever la zone", + return: "Retour", + see_all_pages: "Voir toutes les pages", + all_pages: "Toutes les pages", + }, }; const i18n = _createI18n(appMessages); const app = createApp({ - template: ``, + template: ``, }) - .use(i18n) - .component("app", App) - .mount("#document-signature"); + .use(i18n) + .component("app", App) + .mount("#document-signature"); diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFile.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFile.vue index c731ef19f..017629ee4 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFile.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFile.vue @@ -1,206 +1,208 @@ diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFileModal.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFileModal.vue index bde094487..956b3e859 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFileModal.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFileModal.vue @@ -6,24 +6,24 @@ import { computed, reactive } from "vue"; import { useToast } from "vue-toast-notification"; interface DropFileConfig { - allowRemove: boolean; - existingDoc?: StoredObject; + allowRemove: boolean; + existingDoc?: StoredObject; } const props = withDefaults(defineProps(), { - allowRemove: false, + allowRemove: false, }); const emit = defineEmits<{ - ( - e: "addDocument", - { - stored_object: StoredObject, - stored_object_version: StoredObjectVersion, - file_name: string, - }, - ): void; - (e: "removeDocument"): void; + ( + e: "addDocument", + { + stored_object: StoredObject, + stored_object_version: StoredObjectVersion, + file_name: string, + }, + ): void; + (e: "removeDocument"): void; }>(); const $toast = useToast(); @@ -33,67 +33,67 @@ const state = reactive({ showModal: false }); const modalClasses = { "modal-dialog-centered": true, "modal-md": true }; const buttonState = computed<"add" | "replace">(() => { - if (props.existingDoc === undefined || props.existingDoc === null) { - return "add"; - } + if (props.existingDoc === undefined || props.existingDoc === null) { + return "add"; + } - return "replace"; + return "replace"; }); function onAddDocument({ - stored_object, - stored_object_version, - file_name, + stored_object, + stored_object_version, + file_name, }: { - stored_object: StoredObject; - stored_object_version: StoredObjectVersion; - file_name: string; + stored_object: StoredObject; + stored_object_version: StoredObjectVersion; + file_name: string; }): void { - const message = - buttonState.value === "add" ? "Document ajouté" : "Document remplacé"; - $toast.success(message); - emit("addDocument", { stored_object_version, stored_object, file_name }); - state.showModal = false; + const message = + buttonState.value === "add" ? "Document ajouté" : "Document remplacé"; + $toast.success(message); + emit("addDocument", { stored_object_version, stored_object, file_name }); + state.showModal = false; } function onRemoveDocument(): void { - emit("removeDocument"); + emit("removeDocument"); } function openModal(): void { - state.showModal = true; + state.showModal = true; } function closeModal(): void { - state.showModal = false; + state.showModal = false; } diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFileWidget.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFileWidget.vue index 8ead08b45..54f8ddf0c 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFileWidget.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFileWidget.vue @@ -5,97 +5,97 @@ import DropFile from "ChillDocStoreAssets/vuejs/DropFileWidget/DropFile.vue"; import DocumentActionButtonsGroup from "ChillDocStoreAssets/vuejs/DocumentActionButtonsGroup.vue"; interface DropFileConfig { - allowRemove: boolean; - existingDoc?: StoredObject; + allowRemove: boolean; + existingDoc?: StoredObject; } const props = withDefaults(defineProps(), { - allowRemove: false, + allowRemove: false, }); const emit = defineEmits<{ - ( - e: "addDocument", - { - stored_object: StoredObject, - stored_object_version: StoredObjectVersion, - file_name: string, - }, - ): void; - (e: "removeDocument"): void; + ( + e: "addDocument", + { + stored_object: StoredObject, + stored_object_version: StoredObjectVersion, + file_name: string, + }, + ): void; + (e: "removeDocument"): void; }>(); const has_existing_doc = computed(() => { - return props.existingDoc !== undefined && props.existingDoc !== null; + return props.existingDoc !== undefined && props.existingDoc !== null; }); const dav_link_expiration = computed(() => { - if (props.existingDoc === undefined || props.existingDoc === null) { - return undefined; - } - if (props.existingDoc.status !== "ready") { - return undefined; - } + if (props.existingDoc === undefined || props.existingDoc === null) { + return undefined; + } + if (props.existingDoc.status !== "ready") { + return undefined; + } - return props.existingDoc._links?.dav_link?.expiration; + return props.existingDoc._links?.dav_link?.expiration; }); const dav_link_href = computed(() => { - if (props.existingDoc === undefined || props.existingDoc === null) { - return undefined; - } - if (props.existingDoc.status !== "ready") { - return undefined; - } + if (props.existingDoc === undefined || props.existingDoc === null) { + return undefined; + } + if (props.existingDoc.status !== "ready") { + return undefined; + } - return props.existingDoc._links?.dav_link?.href; + return props.existingDoc._links?.dav_link?.href; }); const onAddDocument = ({ - stored_object, - stored_object_version, - file_name, + stored_object, + stored_object_version, + file_name, }: { - stored_object: StoredObject; - stored_object_version: StoredObjectVersion; - file_name: string; + stored_object: StoredObject; + stored_object_version: StoredObjectVersion; + file_name: string; }): void => { - emit("addDocument", { stored_object, stored_object_version, file_name }); + emit("addDocument", { stored_object, stored_object_version, file_name }); }; const onRemoveDocument = (e: Event): void => { - e.stopPropagation(); - e.preventDefault(); - emit("removeDocument"); + e.stopPropagation(); + e.preventDefault(); + emit("removeDocument"); }; diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/FileIcon.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/FileIcon.vue index ba2c44f6a..5260095fa 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/FileIcon.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/FileIcon.vue @@ -1,46 +1,46 @@ diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/ConvertButton.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/ConvertButton.vue index 8cb60bc12..b6c6a496f 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/ConvertButton.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/ConvertButton.vue @@ -1,28 +1,28 @@ diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/DesktopEditButton.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/DesktopEditButton.vue index f00889a8e..2b74f76bd 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/DesktopEditButton.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/DesktopEditButton.vue @@ -3,13 +3,13 @@ import Modal from "ChillMainAssets/vuejs/_components/Modal.vue"; import { computed, reactive } from "vue"; export interface DesktopEditButtonConfig { - editLink: null; - classes: Record; - expirationLink: number | Date; + editLink: null; + classes: Record; + expirationLink: number | Date; } interface DesktopEditButtonState { - modalOpened: boolean; + modalOpened: boolean; } const state: DesktopEditButtonState = reactive({ modalOpened: false }); @@ -17,76 +17,80 @@ const state: DesktopEditButtonState = reactive({ modalOpened: false }); const props = defineProps(); const buildCommand = computed( - () => "vnd.libreoffice.command:ofe|u|" + props.editLink, + () => "vnd.libreoffice.command:ofe|u|" + props.editLink, ); const editionUntilFormatted = computed(() => { - let d; + let d; - if (props.expirationLink instanceof Date) { - d = props.expirationLink; - } else { - d = new Date(props.expirationLink * 1000); - } - console.log(props.expirationLink); + if (props.expirationLink instanceof Date) { + d = props.expirationLink; + } else { + d = new Date(props.expirationLink * 1000); + } + console.log(props.expirationLink); - return new Intl.DateTimeFormat(undefined, { - dateStyle: "long", - timeStyle: "medium", - }).format(d); + return new Intl.DateTimeFormat(undefined, { + dateStyle: "long", + timeStyle: "medium", + }).format(d); }); diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/DownloadButton.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/DownloadButton.vue index 8316229ce..d28b49cdf 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/DownloadButton.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/DownloadButton.vue @@ -1,26 +1,26 @@ diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton.vue index f8c1c4ead..71a8d42ea 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton.vue @@ -1,20 +1,20 @@ diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton/HistoryButtonList.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton/HistoryButtonList.vue index cf70e3db3..ac4bf4591 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton/HistoryButtonList.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton/HistoryButtonList.vue @@ -1,26 +1,26 @@ diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton/HistoryButtonListItem.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton/HistoryButtonListItem.vue index 2a563d853..bf5e3fffb 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton/HistoryButtonListItem.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton/HistoryButtonListItem.vue @@ -1,8 +1,8 @@ diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton/HistoryButtonModal.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton/HistoryButtonModal.vue index 0d9a951e5..b9535ca2e 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton/HistoryButtonModal.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton/HistoryButtonModal.vue @@ -3,54 +3,54 @@ import Modal from "ChillMainAssets/vuejs/_components/Modal.vue"; import { reactive } from "vue"; import HistoryButtonList from "ChillDocStoreAssets/vuejs/StoredObjectButton/HistoryButton/HistoryButtonList.vue"; import { - StoredObject, - StoredObjectVersionWithPointInTime, + StoredObject, + StoredObjectVersionWithPointInTime, } from "./../../../types"; interface HistoryButtonListConfig { - versions: StoredObjectVersionWithPointInTime[]; - storedObject: StoredObject; - canEdit: boolean; + versions: StoredObjectVersionWithPointInTime[]; + storedObject: StoredObject; + canEdit: boolean; } const emit = defineEmits<{ - restoreVersion: [newVersion: StoredObjectVersionWithPointInTime]; + restoreVersion: [newVersion: StoredObjectVersionWithPointInTime]; }>(); interface HistoryButtonModalState { - opened: boolean; + opened: boolean; } const props = defineProps(); const state = reactive({ opened: false }); const open = () => { - state.opened = true; + state.opened = true; }; const onRestoreVersion = (payload: { - newVersion: StoredObjectVersionWithPointInTime; + newVersion: StoredObjectVersionWithPointInTime; }) => emit("restoreVersion", payload); defineExpose({ open }); diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton/RestoreVersionButton.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton/RestoreVersionButton.vue index 595d3781a..41ae8e978 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton/RestoreVersionButton.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton/RestoreVersionButton.vue @@ -1,17 +1,17 @@ diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton/api.ts b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton/api.ts index b003e26b7..cb7581eab 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton/api.ts +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton/api.ts @@ -1,33 +1,33 @@ import { - StoredObject, - StoredObjectVersionPersisted, - StoredObjectVersionWithPointInTime, + StoredObject, + StoredObjectVersionPersisted, + StoredObjectVersionWithPointInTime, } from "../../../types"; import { - fetchResults, - makeFetch, + fetchResults, + makeFetch, } from "../../../../../../ChillMainBundle/Resources/public/lib/api/apiMethods"; export const get_versions = async ( - storedObject: StoredObject, + storedObject: StoredObject, ): Promise => { - const versions = await fetchResults( - `/api/1.0/doc-store/stored-object/${storedObject.uuid}/versions`, - ); + const versions = await fetchResults( + `/api/1.0/doc-store/stored-object/${storedObject.uuid}/versions`, + ); - return versions.sort( - ( - a: StoredObjectVersionWithPointInTime, - b: StoredObjectVersionWithPointInTime, - ) => b.version - a.version, - ); + return versions.sort( + ( + a: StoredObjectVersionWithPointInTime, + b: StoredObjectVersionWithPointInTime, + ) => b.version - a.version, + ); }; export const restore_version = async ( - version: StoredObjectVersionPersisted, + version: StoredObjectVersionPersisted, ): Promise => { - return await makeFetch( - "POST", - `/api/1.0/doc-store/stored-object/restore-from-version/${version.id}`, - ); + return await makeFetch( + "POST", + `/api/1.0/doc-store/stored-object/restore-from-version/${version.id}`, + ); }; diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/WopiEditButton.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/WopiEditButton.vue index 97073e4e1..b57c1f188 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/WopiEditButton.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/WopiEditButton.vue @@ -1,27 +1,29 @@ diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/helpers.ts b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/helpers.ts index aceaa038b..ff1e6219d 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/helpers.ts +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/helpers.ts @@ -1,230 +1,235 @@ import { - StoredObject, - StoredObjectStatus, - StoredObjectStatusChange, - StoredObjectVersion, + StoredObject, + StoredObjectStatus, + StoredObjectStatusChange, + StoredObjectVersion, } from "../../types"; import { makeFetch } from "../../../../../ChillMainBundle/Resources/public/lib/api/apiMethods"; const MIMES_EDIT = new Set([ - "application/vnd.ms-powerpoint", - "application/vnd.ms-excel", - "application/vnd.oasis.opendocument.text", - "application/vnd.oasis.opendocument.text-flat-xml", - "application/vnd.oasis.opendocument.spreadsheet", - "application/vnd.oasis.opendocument.spreadsheet-flat-xml", - "application/vnd.oasis.opendocument.presentation", - "application/vnd.oasis.opendocument.presentation-flat-xml", - "application/vnd.oasis.opendocument.graphics", - "application/vnd.oasis.opendocument.graphics-flat-xml", - "application/vnd.oasis.opendocument.chart", - "application/msword", - "application/vnd.ms-excel", - "application/vnd.ms-powerpoint", - "application/vnd.openxmlformats-officedocument.wordprocessingml.document", - "application/vnd.ms-word.document.macroEnabled.12", - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", - "application/vnd.ms-excel.sheet.binary.macroEnabled.12", - "application/vnd.ms-excel.sheet.macroEnabled.12", - "application/vnd.openxmlformats-officedocument.presentationml.presentation", - "application/vnd.ms-powerpoint.presentation.macroEnabled.12", - "application/x-dif-document", - "text/spreadsheet", - "text/csv", - "application/x-dbase", - "text/rtf", - "text/plain", - "application/vnd.openxmlformats-officedocument.presentationml.slideshow", + "application/vnd.ms-powerpoint", + "application/vnd.ms-excel", + "application/vnd.oasis.opendocument.text", + "application/vnd.oasis.opendocument.text-flat-xml", + "application/vnd.oasis.opendocument.spreadsheet", + "application/vnd.oasis.opendocument.spreadsheet-flat-xml", + "application/vnd.oasis.opendocument.presentation", + "application/vnd.oasis.opendocument.presentation-flat-xml", + "application/vnd.oasis.opendocument.graphics", + "application/vnd.oasis.opendocument.graphics-flat-xml", + "application/vnd.oasis.opendocument.chart", + "application/msword", + "application/vnd.ms-excel", + "application/vnd.ms-powerpoint", + "application/vnd.openxmlformats-officedocument.wordprocessingml.document", + "application/vnd.ms-word.document.macroEnabled.12", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + "application/vnd.ms-excel.sheet.binary.macroEnabled.12", + "application/vnd.ms-excel.sheet.macroEnabled.12", + "application/vnd.openxmlformats-officedocument.presentationml.presentation", + "application/vnd.ms-powerpoint.presentation.macroEnabled.12", + "application/x-dif-document", + "text/spreadsheet", + "text/csv", + "application/x-dbase", + "text/rtf", + "text/plain", + "application/vnd.openxmlformats-officedocument.presentationml.slideshow", ]); const MIMES_VIEW = new Set([ - ...MIMES_EDIT, - [ - "image/svg+xml", - "application/vnd.sun.xml.writer", - "application/vnd.sun.xml.calc", - "application/vnd.sun.xml.impress", - "application/vnd.sun.xml.draw", - "application/vnd.sun.xml.writer.global", - "application/vnd.sun.xml.writer.template", - "application/vnd.sun.xml.calc.template", - "application/vnd.sun.xml.impress.template", - "application/vnd.sun.xml.draw.template", - "application/vnd.oasis.opendocument.text-master", - "application/vnd.oasis.opendocument.text-template", - "application/vnd.oasis.opendocument.text-master-template", - "application/vnd.oasis.opendocument.spreadsheet-template", - "application/vnd.oasis.opendocument.presentation-template", - "application/vnd.oasis.opendocument.graphics-template", - "application/vnd.ms-word.template.macroEnabled.12", - "application/vnd.openxmlformats-officedocument.spreadsheetml.template", - "application/vnd.ms-excel.template.macroEnabled.12", - "application/vnd.openxmlformats-officedocument.presentationml.template", - "application/vnd.ms-powerpoint.template.macroEnabled.12", - "application/vnd.wordperfect", - "application/x-aportisdoc", - "application/x-hwp", - "application/vnd.ms-works", - "application/x-mswrite", - "application/vnd.lotus-1-2-3", - "image/cgm", - "image/vnd.dxf", - "image/x-emf", - "image/x-wmf", - "application/coreldraw", - "application/vnd.visio2013", - "application/vnd.visio", - "application/vnd.ms-visio.drawing", - "application/x-mspublisher", - "application/x-sony-bbeb", - "application/x-gnumeric", - "application/macwriteii", - "application/x-iwork-numbers-sffnumbers", - "application/vnd.oasis.opendocument.text-web", - "application/x-pagemaker", - "application/x-fictionbook+xml", - "application/clarisworks", - "image/x-wpg", - "application/x-iwork-pages-sffpages", - "application/x-iwork-keynote-sffkey", - "application/x-abiword", - "image/x-freehand", - "application/vnd.sun.xml.chart", - "application/x-t602", - "image/bmp", - "image/png", - "image/gif", - "image/tiff", - "image/jpg", - "image/jpeg", - "application/pdf", - ], + ...MIMES_EDIT, + [ + "image/svg+xml", + "application/vnd.sun.xml.writer", + "application/vnd.sun.xml.calc", + "application/vnd.sun.xml.impress", + "application/vnd.sun.xml.draw", + "application/vnd.sun.xml.writer.global", + "application/vnd.sun.xml.writer.template", + "application/vnd.sun.xml.calc.template", + "application/vnd.sun.xml.impress.template", + "application/vnd.sun.xml.draw.template", + "application/vnd.oasis.opendocument.text-master", + "application/vnd.oasis.opendocument.text-template", + "application/vnd.oasis.opendocument.text-master-template", + "application/vnd.oasis.opendocument.spreadsheet-template", + "application/vnd.oasis.opendocument.presentation-template", + "application/vnd.oasis.opendocument.graphics-template", + "application/vnd.ms-word.template.macroEnabled.12", + "application/vnd.openxmlformats-officedocument.spreadsheetml.template", + "application/vnd.ms-excel.template.macroEnabled.12", + "application/vnd.openxmlformats-officedocument.presentationml.template", + "application/vnd.ms-powerpoint.template.macroEnabled.12", + "application/vnd.wordperfect", + "application/x-aportisdoc", + "application/x-hwp", + "application/vnd.ms-works", + "application/x-mswrite", + "application/vnd.lotus-1-2-3", + "image/cgm", + "image/vnd.dxf", + "image/x-emf", + "image/x-wmf", + "application/coreldraw", + "application/vnd.visio2013", + "application/vnd.visio", + "application/vnd.ms-visio.drawing", + "application/x-mspublisher", + "application/x-sony-bbeb", + "application/x-gnumeric", + "application/macwriteii", + "application/x-iwork-numbers-sffnumbers", + "application/vnd.oasis.opendocument.text-web", + "application/x-pagemaker", + "application/x-fictionbook+xml", + "application/clarisworks", + "image/x-wpg", + "application/x-iwork-pages-sffpages", + "application/x-iwork-keynote-sffkey", + "application/x-abiword", + "image/x-freehand", + "application/vnd.sun.xml.chart", + "application/x-t602", + "image/bmp", + "image/png", + "image/gif", + "image/tiff", + "image/jpg", + "image/jpeg", + "application/pdf", + ], ]); export interface SignedUrlGet { - method: "GET" | "HEAD"; - url: string; - expires: number; - object_name: string; + method: "GET" | "HEAD"; + url: string; + expires: number; + object_name: string; } function is_extension_editable(mimeType: string): boolean { - return MIMES_EDIT.has(mimeType); + return MIMES_EDIT.has(mimeType); } function is_extension_viewable(mimeType: string): boolean { - return MIMES_VIEW.has(mimeType); + return MIMES_VIEW.has(mimeType); } function build_convert_link(uuid: string) { - return `/chill/wopi/convert/${uuid}`; + return `/chill/wopi/convert/${uuid}`; } function build_download_info_link( - storedObject: StoredObject, - atVersion: null | StoredObjectVersion, + storedObject: StoredObject, + atVersion: null | StoredObjectVersion, ): string { - const url = `/api/1.0/doc-store/async-upload/temp_url/${storedObject.uuid}/generate/get`; + const url = `/api/1.0/doc-store/async-upload/temp_url/${storedObject.uuid}/generate/get`; - if (null !== atVersion) { - const params = new URLSearchParams({ version: atVersion.filename }); + if (null !== atVersion) { + const params = new URLSearchParams({ version: atVersion.filename }); - return url + "?" + params.toString(); - } + return url + "?" + params.toString(); + } - return url; + return url; } async function download_info_link( - storedObject: StoredObject, - atVersion: null | StoredObjectVersion, + storedObject: StoredObject, + atVersion: null | StoredObjectVersion, ): Promise { - return makeFetch("GET", build_download_info_link(storedObject, atVersion)); + return makeFetch("GET", build_download_info_link(storedObject, atVersion)); } function build_wopi_editor_link(uuid: string, returnPath?: string) { - if (returnPath === undefined) { - returnPath = - window.location.pathname + window.location.search + window.location.hash; - } + if (returnPath === undefined) { + returnPath = + window.location.pathname + + window.location.search + + window.location.hash; + } - return ( - `/chill/wopi/edit/${uuid}?returnPath=` + encodeURIComponent(returnPath) - ); + return ( + `/chill/wopi/edit/${uuid}?returnPath=` + encodeURIComponent(returnPath) + ); } function download_doc(url: string): Promise { - return window.fetch(url).then((r) => { - if (r.ok) { - return r.blob(); - } + return window.fetch(url).then((r) => { + if (r.ok) { + return r.blob(); + } - throw new Error("Could not download document"); - }); + throw new Error("Could not download document"); + }); } async function download_and_decrypt_doc( - storedObject: StoredObject, - atVersion: null | StoredObjectVersion, + storedObject: StoredObject, + atVersion: null | StoredObjectVersion, ): Promise { - const algo = "AES-CBC"; + const algo = "AES-CBC"; - const atVersionToDownload = atVersion ?? storedObject.currentVersion; + const atVersionToDownload = atVersion ?? storedObject.currentVersion; - if (null === atVersionToDownload) { - throw new Error("no version associated to stored object"); - } + if (null === atVersionToDownload) { + throw new Error("no version associated to stored object"); + } - // sometimes, the downloadInfo may be embedded into the storedObject - console.log("storedObject", storedObject); - let downloadInfo; - if ( - typeof storedObject._links !== "undefined" && - typeof storedObject._links.downloadLink !== "undefined" - ) { - downloadInfo = storedObject._links.downloadLink; - } else { - downloadInfo = await download_info_link(storedObject, atVersionToDownload); - } + // sometimes, the downloadInfo may be embedded into the storedObject + console.log("storedObject", storedObject); + let downloadInfo; + if ( + typeof storedObject._links !== "undefined" && + typeof storedObject._links.downloadLink !== "undefined" + ) { + downloadInfo = storedObject._links.downloadLink; + } else { + downloadInfo = await download_info_link( + storedObject, + atVersionToDownload, + ); + } - const rawResponse = await window.fetch(downloadInfo.url); + const rawResponse = await window.fetch(downloadInfo.url); - if (!rawResponse.ok) { - throw new Error( - "error while downloading raw file " + - rawResponse.status + - " " + - rawResponse.statusText, - ); - } + if (!rawResponse.ok) { + throw new Error( + "error while downloading raw file " + + rawResponse.status + + " " + + rawResponse.statusText, + ); + } - if (atVersionToDownload.iv.length === 0) { - return rawResponse.blob(); - } + if (atVersionToDownload.iv.length === 0) { + return rawResponse.blob(); + } - const rawBuffer = await rawResponse.arrayBuffer(); - try { - const key = await window.crypto.subtle.importKey( - "jwk", - atVersionToDownload.keyInfos, - { name: algo }, - false, - ["decrypt"], - ); - const iv = Uint8Array.from(atVersionToDownload.iv); - const decrypted = await window.crypto.subtle.decrypt( - { name: algo, iv: iv }, - key, - rawBuffer, - ); + const rawBuffer = await rawResponse.arrayBuffer(); + try { + const key = await window.crypto.subtle.importKey( + "jwk", + atVersionToDownload.keyInfos, + { name: algo }, + false, + ["decrypt"], + ); + const iv = Uint8Array.from(atVersionToDownload.iv); + const decrypted = await window.crypto.subtle.decrypt( + { name: algo, iv: iv }, + key, + rawBuffer, + ); - return Promise.resolve(new Blob([decrypted])); - } catch (e) { - console.error("encounter error while keys and decrypt operations"); - console.error(e); + return Promise.resolve(new Blob([decrypted])); + } catch (e) { + console.error("encounter error while keys and decrypt operations"); + console.error(e); - throw e; - } + throw e; + } } /** @@ -234,45 +239,48 @@ async function download_and_decrypt_doc( * storage. */ async function download_doc_as_pdf(storedObject: StoredObject): Promise { - if (null === storedObject.currentVersion) { - throw new Error("the stored object does not count any version"); - } + if (null === storedObject.currentVersion) { + throw new Error("the stored object does not count any version"); + } - if (storedObject.currentVersion?.type === "application/pdf") { - return download_and_decrypt_doc(storedObject, storedObject.currentVersion); - } + if (storedObject.currentVersion?.type === "application/pdf") { + return download_and_decrypt_doc( + storedObject, + storedObject.currentVersion, + ); + } - const convertLink = build_convert_link(storedObject.uuid); - const response = await fetch(convertLink); + const convertLink = build_convert_link(storedObject.uuid); + const response = await fetch(convertLink); - if (!response.ok) { - throw new Error("Could not convert the document: " + response.status); - } + if (!response.ok) { + throw new Error("Could not convert the document: " + response.status); + } - return response.blob(); + return response.blob(); } async function is_object_ready( - storedObject: StoredObject, + storedObject: StoredObject, ): Promise { - const new_status_response = await window.fetch( - `/api/1.0/doc-store/stored-object/${storedObject.uuid}/is-ready`, - ); + const new_status_response = await window.fetch( + `/api/1.0/doc-store/stored-object/${storedObject.uuid}/is-ready`, + ); - if (!new_status_response.ok) { - throw new Error("could not fetch the new status"); - } + if (!new_status_response.ok) { + throw new Error("could not fetch the new status"); + } - return await new_status_response.json(); + return await new_status_response.json(); } export { - build_convert_link, - build_wopi_editor_link, - download_and_decrypt_doc, - download_doc, - download_doc_as_pdf, - is_extension_editable, - is_extension_viewable, - is_object_ready, + build_convert_link, + build_wopi_editor_link, + download_and_decrypt_doc, + download_doc, + download_doc_as_pdf, + is_extension_editable, + is_extension_viewable, + is_object_ready, }; diff --git a/src/Bundle/ChillMainBundle/Entity/User.php b/src/Bundle/ChillMainBundle/Entity/User.php index 3325a9c83..8a31779f9 100644 --- a/src/Bundle/ChillMainBundle/Entity/User.php +++ b/src/Bundle/ChillMainBundle/Entity/User.php @@ -613,14 +613,4 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter return $this; } - - /** - * Check if the current object is an instance of User. - * - * @return bool returns true if the current object is an instance of User, false otherwise - */ - public function isUser(): bool - { - return true; - } } diff --git a/src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php b/src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php index b8105fe5f..27ee7f44c 100644 --- a/src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php +++ b/src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php @@ -27,8 +27,6 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Contracts\Translation\TranslatableInterface; use Symfony\Contracts\Translation\TranslatorInterface; -// command to get the report with curl : curl --user "center a_social:password" "http://localhost:8000/fr/exports/generate/count_person?export[filters][person_gender_filter][enabled]=&export[filters][person_nationality_filter][enabled]=&export[filters][person_nationality_filter][form][nationalities]=&export[aggregators][person_nationality_aggregator][order]=1&export[aggregators][person_nationality_aggregator][form][group_by_level]=country&export[submit]=&export[_token]=RHpjHl389GrK-bd6iY5NsEqrD5UKOTHH40QKE9J1edU" --globoff - /** * Create a CSV List for the export. */ diff --git a/src/Bundle/ChillMainBundle/Phonenumber/PhonenumberHelper.php b/src/Bundle/ChillMainBundle/Phonenumber/PhonenumberHelper.php index 8a7574ac0..a73c3c71c 100644 --- a/src/Bundle/ChillMainBundle/Phonenumber/PhonenumberHelper.php +++ b/src/Bundle/ChillMainBundle/Phonenumber/PhonenumberHelper.php @@ -76,24 +76,6 @@ final class PhonenumberHelper implements PhoneNumberHelperInterface ->formatOutOfCountryCallingNumber($phoneNumber, $this->config['default_carrier_code']); } - /** - * @throws NumberParseException - */ - public function parse(string $phoneNumber): PhoneNumber - { - $sanitizedPhoneNumber = $phoneNumber; - - if (str_starts_with($sanitizedPhoneNumber, '00')) { - $sanitizedPhoneNumber = '+'.substr($sanitizedPhoneNumber, 2, null); - } - - if (!str_starts_with($sanitizedPhoneNumber, '+') && !str_starts_with($sanitizedPhoneNumber, '0')) { - $sanitizedPhoneNumber = '+'.$sanitizedPhoneNumber; - } - - return $this->phoneNumberUtil->parse($sanitizedPhoneNumber, $this->config['default_carrier_code']); - } - /** * Get type (mobile, landline, ...) for phone number. */ diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/js/date.ts b/src/Bundle/ChillMainBundle/Resources/public/chill/js/date.ts index 233d802a0..8a0d7cce0 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/chill/js/date.ts +++ b/src/Bundle/ChillMainBundle/Resources/public/chill/js/date.ts @@ -13,15 +13,15 @@ * */ export const dateToISO = (date: Date | null): string | null => { - if (null === date) { - return null; - } + if (null === date) { + return null; + } - return [ - date.getFullYear(), - (date.getMonth() + 1).toString().padStart(2, "0"), - date.getDate().toString().padStart(2, "0"), - ].join("-"); + return [ + date.getFullYear(), + (date.getMonth() + 1).toString().padStart(2, "0"), + date.getDate().toString().padStart(2, "0"), + ].join("-"); }; /** @@ -30,16 +30,16 @@ export const dateToISO = (date: Date | null): string | null => { * **Experimental** */ export const ISOToDate = (str: string | null): Date | null => { - if (null === str) { - return null; - } - if ("" === str.trim()) { - return null; - } + if (null === str) { + return null; + } + if ("" === str.trim()) { + return null; + } - const [year, month, day] = str.split("-").map((p) => parseInt(p)); + const [year, month, day] = str.split("-").map((p) => parseInt(p)); - return new Date(year, month - 1, day, 0, 0, 0, 0); + return new Date(year, month - 1, day, 0, 0, 0, 0); }; /** @@ -47,19 +47,21 @@ export const ISOToDate = (str: string | null): Date | null => { * */ export const ISOToDatetime = (str: string | null): Date | null => { - if (null === str) { - return null; - } + if (null === str) { + return null; + } - const [cal, times] = str.split("T"), - [year, month, date] = cal.split("-").map((s) => parseInt(s)), - [time, timezone] = times.split(times.charAt(8)), - [hours, minutes, seconds] = time.split(":").map((s) => parseInt(s)); - if ("0000" === timezone) { - return new Date(Date.UTC(year, month - 1, date, hours, minutes, seconds)); - } + const [cal, times] = str.split("T"), + [year, month, date] = cal.split("-").map((s) => parseInt(s)), + [time, timezone] = times.split(times.charAt(8)), + [hours, minutes, seconds] = time.split(":").map((s) => parseInt(s)); + if ("0000" === timezone) { + return new Date( + Date.UTC(year, month - 1, date, hours, minutes, seconds), + ); + } - return new Date(year, month - 1, date, hours, minutes, seconds); + return new Date(year, month - 1, date, hours, minutes, seconds); }; /** @@ -67,94 +69,96 @@ export const ISOToDatetime = (str: string | null): Date | null => { * */ export const datetimeToISO = (date: Date): string => { - let cal, time, offset; - cal = [ - date.getFullYear(), - (date.getMonth() + 1).toString().padStart(2, "0"), - date.getDate().toString().padStart(2, "0"), - ].join("-"); + let cal, time, offset; + cal = [ + date.getFullYear(), + (date.getMonth() + 1).toString().padStart(2, "0"), + date.getDate().toString().padStart(2, "0"), + ].join("-"); - time = [ - date.getHours().toString().padStart(2, "0"), - date.getMinutes().toString().padStart(2, "0"), - date.getSeconds().toString().padStart(2, "0"), - ].join(":"); + time = [ + date.getHours().toString().padStart(2, "0"), + date.getMinutes().toString().padStart(2, "0"), + date.getSeconds().toString().padStart(2, "0"), + ].join(":"); - offset = [ - date.getTimezoneOffset() <= 0 ? "+" : "-", - Math.abs(Math.floor(date.getTimezoneOffset() / 60)) - .toString() - .padStart(2, "0"), - ":", - Math.abs(date.getTimezoneOffset() % 60) - .toString() - .padStart(2, "0"), - ].join(""); + offset = [ + date.getTimezoneOffset() <= 0 ? "+" : "-", + Math.abs(Math.floor(date.getTimezoneOffset() / 60)) + .toString() + .padStart(2, "0"), + ":", + Math.abs(date.getTimezoneOffset() % 60) + .toString() + .padStart(2, "0"), + ].join(""); - const x = cal + "T" + time + offset; + const x = cal + "T" + time + offset; - return x; + return x; }; export const intervalDaysToISO = (days: number | string | null): string => { - if (null === days) { - return "P0D"; - } + if (null === days) { + return "P0D"; + } - return `P${days}D`; + return `P${days}D`; }; export const intervalISOToDays = (str: string | null): number | null => { - if (null === str) { - return null; - } - - if ("" === str.trim()) { - return null; - } - - let days = 0; - let isDate = true; - let vstring = ""; - for (let i = 0; i < str.length; i = i + 1) { - if (!isDate) { - continue; + if (null === str) { + return null; } - switch (str.charAt(i)) { - case "P": - isDate = true; - break; - case "T": - isDate = false; - break; - case "0": - case "1": - case "2": - case "3": - case "4": - case "5": - case "6": - case "7": - case "8": - case "9": - vstring = vstring + str.charAt(i); - break; - case "Y": - days = days + Number.parseInt(vstring) * 365; - vstring = ""; - break; - case "M": - days = days + Number.parseInt(vstring) * 30; - vstring = ""; - break; - case "D": - days = days + Number.parseInt(vstring); - vstring = ""; - break; - default: - throw Error("this character should not appears: " + str.charAt(i)); - } - } - return days; + if ("" === str.trim()) { + return null; + } + + let days = 0; + let isDate = true; + let vstring = ""; + for (let i = 0; i < str.length; i = i + 1) { + if (!isDate) { + continue; + } + switch (str.charAt(i)) { + case "P": + isDate = true; + break; + case "T": + isDate = false; + break; + case "0": + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + vstring = vstring + str.charAt(i); + break; + case "Y": + days = days + Number.parseInt(vstring) * 365; + vstring = ""; + break; + case "M": + days = days + Number.parseInt(vstring) * 30; + vstring = ""; + break; + case "D": + days = days + Number.parseInt(vstring); + vstring = ""; + break; + default: + throw Error( + "this character should not appears: " + str.charAt(i), + ); + } + } + + return days; }; diff --git a/src/Bundle/ChillMainBundle/Resources/public/lib/api/address.ts b/src/Bundle/ChillMainBundle/Resources/public/lib/api/address.ts index 864f6cd52..896cbd323 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/lib/api/address.ts +++ b/src/Bundle/ChillMainBundle/Resources/public/lib/api/address.ts @@ -1,61 +1,61 @@ import { - Address, - GeographicalUnitLayer, - SimpleGeographicalUnit, + Address, + GeographicalUnitLayer, + SimpleGeographicalUnit, } from "../../types"; import { fetchResults, makeFetch } from "./apiMethods"; export const getAddressById = async (address_id: number): Promise
=> { - const url = `/api/1.0/main/address/${address_id}.json`; + const url = `/api/1.0/main/address/${address_id}.json`; - const response = await fetch(url); + const response = await fetch(url); - if (response.ok) { - return response.json(); - } + if (response.ok) { + return response.json(); + } - throw Error("Error with request resource response"); + throw Error("Error with request resource response"); }; export const getGeographicalUnitsByAddress = async ( - address: Address, + address: Address, ): Promise => { - return fetchResults( - `/api/1.0/main/geographical-unit/by-address/${address.address_id}.json`, - ); + return fetchResults( + `/api/1.0/main/geographical-unit/by-address/${address.address_id}.json`, + ); }; export const getAllGeographicalUnitLayers = async (): Promise< - GeographicalUnitLayer[] + GeographicalUnitLayer[] > => { - return fetchResults( - `/api/1.0/main/geographical-unit-layer.json`, - ); + return fetchResults( + `/api/1.0/main/geographical-unit-layer.json`, + ); }; export const syncAddressWithReference = async ( - address: Address, + address: Address, ): Promise
=> { - return makeFetch( - "POST", - `/api/1.0/main/address/reference-match/${address.address_id}/sync-with-reference`, - ); + return makeFetch( + "POST", + `/api/1.0/main/address/reference-match/${address.address_id}/sync-with-reference`, + ); }; export const markAddressReviewed = async ( - address: Address, + address: Address, ): Promise
=> { - return makeFetch( - "POST", - `/api/1.0/main/address/reference-match/${address.address_id}/set/reviewed`, - ); + return makeFetch( + "POST", + `/api/1.0/main/address/reference-match/${address.address_id}/set/reviewed`, + ); }; export const markAddressToReview = async ( - address: Address, + address: Address, ): Promise
=> { - return makeFetch( - "POST", - `/api/1.0/main/address/reference-match/${address.address_id}/set/to_review`, - ); + return makeFetch( + "POST", + `/api/1.0/main/address/reference-match/${address.address_id}/set/to_review`, + ); }; diff --git a/src/Bundle/ChillMainBundle/Resources/public/lib/api/apiMethods.ts b/src/Bundle/ChillMainBundle/Resources/public/lib/api/apiMethods.ts index 9bfb952b5..e8256b348 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/lib/api/apiMethods.ts +++ b/src/Bundle/ChillMainBundle/Resources/public/lib/api/apiMethods.ts @@ -6,57 +6,57 @@ export type fetchOption = Record; export type Params = Record; export interface PaginationResponse { - pagination: { - more: boolean; - items_per_page: number; - }; - results: T[]; - count: number; + pagination: { + more: boolean; + items_per_page: number; + }; + results: T[]; + count: number; } export type FetchParams = Record; export interface TransportExceptionInterface { - name: string; + name: string; } export interface ValidationExceptionInterface - extends TransportExceptionInterface { - name: "ValidationException"; - error: object; - violations: string[]; - titles: string[]; - propertyPaths: string[]; + extends TransportExceptionInterface { + name: "ValidationException"; + error: object; + violations: string[]; + titles: string[]; + propertyPaths: string[]; } export interface ValidationErrorResponse extends TransportExceptionInterface { - violations: { - title: string; - propertyPath: string; - }[]; + violations: { + title: string; + propertyPath: string; + }[]; } export interface AccessExceptionInterface extends TransportExceptionInterface { - name: "AccessException"; - violations: string[]; + name: "AccessException"; + violations: string[]; } export interface NotFoundExceptionInterface - extends TransportExceptionInterface { - name: "NotFoundException"; + extends TransportExceptionInterface { + name: "NotFoundException"; } export interface ServerExceptionInterface extends TransportExceptionInterface { - name: "ServerException"; - message: string; - code: number; - body: string; + name: "ServerException"; + message: string; + code: number; + body: string; } export interface ConflictHttpExceptionInterface - extends TransportExceptionInterface { - name: "ConflictHttpException"; - violations: string[]; + extends TransportExceptionInterface { + name: "ConflictHttpException"; + violations: string[]; } /** @@ -66,223 +66,223 @@ export interface ConflictHttpExceptionInterface * and use of the @link{fetchResults} method. */ export const makeFetch = ( - method: "POST" | "GET" | "PUT" | "PATCH" | "DELETE", - url: string, - body?: body | Input | null, - options?: FetchParams, + method: "POST" | "GET" | "PUT" | "PATCH" | "DELETE", + url: string, + body?: body | Input | null, + options?: FetchParams, ): Promise => { - let opts = { - method: method, - headers: { - "Content-Type": "application/json;charset=utf-8", - }, - }; - - if (body !== null && typeof body !== "undefined") { - Object.assign(opts, { body: JSON.stringify(body) }); - } - - if (typeof options !== "undefined") { - opts = Object.assign(opts, options); - } - return fetch(url, opts).then((response) => { - if (response.status === 204) { - return Promise.resolve(); - } - - if (response.ok) { - return response.json(); - } - - if (response.status === 422) { - return response.json().then((response) => { - throw ValidationException(response); - }); - } - - if (response.status === 403) { - throw AccessException(response); - } - - if (response.status === 409) { - throw ConflictHttpException(response); - } - - throw { - name: "Exception", - sta: response.status, - txt: response.statusText, - err: new Error(), - violations: response.body, + let opts = { + method: method, + headers: { + "Content-Type": "application/json;charset=utf-8", + }, }; - }); + + if (body !== null && typeof body !== "undefined") { + Object.assign(opts, { body: JSON.stringify(body) }); + } + + if (typeof options !== "undefined") { + opts = Object.assign(opts, options); + } + return fetch(url, opts).then((response) => { + if (response.status === 204) { + return Promise.resolve(); + } + + if (response.ok) { + return response.json(); + } + + if (response.status === 422) { + return response.json().then((response) => { + throw ValidationException(response); + }); + } + + if (response.status === 403) { + throw AccessException(response); + } + + if (response.status === 409) { + throw ConflictHttpException(response); + } + + throw { + name: "Exception", + sta: response.status, + txt: response.statusText, + err: new Error(), + violations: response.body, + }; + }); }; /** * Fetch results with certain parameters */ function _fetchAction( - page: number, - uri: string, - params?: FetchParams, + page: number, + uri: string, + params?: FetchParams, ): Promise> { - const item_per_page = 50; + const item_per_page = 50; - const searchParams = new URLSearchParams(); - searchParams.append("item_per_page", item_per_page.toString()); - searchParams.append("page", page.toString()); + const searchParams = new URLSearchParams(); + searchParams.append("item_per_page", item_per_page.toString()); + searchParams.append("page", page.toString()); - if (params !== undefined) { - Object.keys(params).forEach((key) => { - const v = params[key]; - if (typeof v === "string") { - searchParams.append(key, v); - } else if (typeof v === "number") { - searchParams.append(key, v.toString()); - } else if (v === null) { - searchParams.append(key, ""); - } - }); - } - - const url = uri + "?" + searchParams.toString(); - - return fetch(url, { - method: "GET", - headers: { - "Content-Type": "application/json;charset=utf-8", - }, - }) - .then((response) => { - if (response.ok) { - return response.json(); - } - - if (response.status === 404) { - throw NotFoundException(response); - } - - if (response.status === 422) { - return response.json().then((response) => { - throw ValidationException(response); + if (params !== undefined) { + Object.keys(params).forEach((key) => { + const v = params[key]; + if (typeof v === "string") { + searchParams.append(key, v); + } else if (typeof v === "number") { + searchParams.append(key, v.toString()); + } else if (v === null) { + searchParams.append(key, ""); + } }); - } + } - if (response.status === 403) { - throw AccessException(response); - } + const url = uri + "?" + searchParams.toString(); - if (response.status >= 500) { - return response.text().then((body) => { - throw ServerException(response.status, body); - }); - } - - throw new Error("other network error"); + return fetch(url, { + method: "GET", + headers: { + "Content-Type": "application/json;charset=utf-8", + }, }) - .catch( - ( - reason: - | NotFoundExceptionInterface - | ServerExceptionInterface - | ValidationExceptionInterface - | TransportExceptionInterface, - ) => { - console.error(reason); - throw reason; - }, - ); + .then((response) => { + if (response.ok) { + return response.json(); + } + + if (response.status === 404) { + throw NotFoundException(response); + } + + if (response.status === 422) { + return response.json().then((response) => { + throw ValidationException(response); + }); + } + + if (response.status === 403) { + throw AccessException(response); + } + + if (response.status >= 500) { + return response.text().then((body) => { + throw ServerException(response.status, body); + }); + } + + throw new Error("other network error"); + }) + .catch( + ( + reason: + | NotFoundExceptionInterface + | ServerExceptionInterface + | ValidationExceptionInterface + | TransportExceptionInterface, + ) => { + console.error(reason); + throw reason; + }, + ); } export const fetchResults = async ( - uri: string, - params?: FetchParams, + uri: string, + params?: FetchParams, ): Promise => { - const promises: Promise[] = []; - let page = 1; - const firstData: PaginationResponse = (await _fetchAction( - page, - uri, - params, - )) as PaginationResponse; + const promises: Promise[] = []; + let page = 1; + const firstData: PaginationResponse = (await _fetchAction( + page, + uri, + params, + )) as PaginationResponse; - promises.push(Promise.resolve(firstData.results)); + promises.push(Promise.resolve(firstData.results)); - if (firstData.pagination.more) { - do { - page = ++page; - promises.push( - _fetchAction(page, uri, params).then((r) => - Promise.resolve(r.results), - ), - ); - } while (page * firstData.pagination.items_per_page < firstData.count); - } + if (firstData.pagination.more) { + do { + page = ++page; + promises.push( + _fetchAction(page, uri, params).then((r) => + Promise.resolve(r.results), + ), + ); + } while (page * firstData.pagination.items_per_page < firstData.count); + } - return Promise.all(promises).then((values) => values.flat()); + return Promise.all(promises).then((values) => values.flat()); }; export const fetchScopes = (): Promise => { - return fetchResults("/api/1.0/main/scope.json"); + return fetchResults("/api/1.0/main/scope.json"); }; /** * Error objects to be thrown */ const ValidationException = ( - response: ValidationErrorResponse, + response: ValidationErrorResponse, ): ValidationExceptionInterface => { - const error = {} as ValidationExceptionInterface; - error.name = "ValidationException"; - error.violations = response.violations.map( - (violation) => `${violation.title}: ${violation.propertyPath}`, - ); - error.titles = response.violations.map((violation) => violation.title); - error.propertyPaths = response.violations.map( - (violation) => violation.propertyPath, - ); - return error; + const error = {} as ValidationExceptionInterface; + error.name = "ValidationException"; + error.violations = response.violations.map( + (violation) => `${violation.title}: ${violation.propertyPath}`, + ); + error.titles = response.violations.map((violation) => violation.title); + error.propertyPaths = response.violations.map( + (violation) => violation.propertyPath, + ); + return error; }; // eslint-disable-next-line @typescript-eslint/no-unused-vars const AccessException = (response: Response): AccessExceptionInterface => { - const error = {} as AccessExceptionInterface; - error.name = "AccessException"; - error.violations = ["You are not allowed to perform this action"]; + const error = {} as AccessExceptionInterface; + error.name = "AccessException"; + error.violations = ["You are not allowed to perform this action"]; - return error; + return error; }; // eslint-disable-next-line @typescript-eslint/no-unused-vars const NotFoundException = (response: Response): NotFoundExceptionInterface => { - const error = {} as NotFoundExceptionInterface; - error.name = "NotFoundException"; + const error = {} as NotFoundExceptionInterface; + error.name = "NotFoundException"; - return error; + return error; }; const ServerException = ( - code: number, - body: string, + code: number, + body: string, ): ServerExceptionInterface => { - const error = {} as ServerExceptionInterface; - error.name = "ServerException"; - error.code = code; - error.body = body; + const error = {} as ServerExceptionInterface; + error.name = "ServerException"; + error.code = code; + error.body = body; - return error; + return error; }; const ConflictHttpException = ( - // eslint-disable-next-line @typescript-eslint/no-unused-vars - response: Response, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + response: Response, ): ConflictHttpExceptionInterface => { - const error = {} as ConflictHttpExceptionInterface; + const error = {} as ConflictHttpExceptionInterface; - error.name = "ConflictHttpException"; - error.violations = [ - "Sorry, but someone else has already changed this entity. Please refresh the page and apply the changes again", - ]; + error.name = "ConflictHttpException"; + error.violations = [ + "Sorry, but someone else has already changed this entity. Please refresh the page and apply the changes again", + ]; - return error; + return error; }; diff --git a/src/Bundle/ChillMainBundle/Resources/public/lib/api/export.ts b/src/Bundle/ChillMainBundle/Resources/public/lib/api/export.ts index 6e66122e7..7e350b102 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/lib/api/export.ts +++ b/src/Bundle/ChillMainBundle/Resources/public/lib/api/export.ts @@ -2,17 +2,17 @@ import { makeFetch } from "ChillMainAssets/lib/api/apiMethods"; import { ExportGeneration } from "ChillMainAssets/types"; export const fetchExportGenerationStatus = async ( - exportGenerationId: string, + exportGenerationId: string, ): Promise => - makeFetch( - "GET", - `/api/1.0/main/export-generation/${exportGenerationId}/object`, - ); + makeFetch( + "GET", + `/api/1.0/main/export-generation/${exportGenerationId}/object`, + ); export const generateFromSavedExport = async ( - savedExportUuid: string, + savedExportUuid: string, ): Promise => - makeFetch( - "POST", - `/api/1.0/main/export/export-generation/create-from-saved-export/${savedExportUuid}`, - ); + makeFetch( + "POST", + `/api/1.0/main/export/export-generation/create-from-saved-export/${savedExportUuid}`, + ); diff --git a/src/Bundle/ChillMainBundle/Resources/public/lib/api/locations.ts b/src/Bundle/ChillMainBundle/Resources/public/lib/api/locations.ts index 375881924..3c326ba78 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/lib/api/locations.ts +++ b/src/Bundle/ChillMainBundle/Resources/public/lib/api/locations.ts @@ -2,7 +2,7 @@ import { fetchResults } from "./apiMethods"; import { Location, LocationType } from "../../types"; export const getLocations = (): Promise => - fetchResults("/api/1.0/main/location.json"); + fetchResults("/api/1.0/main/location.json"); export const getLocationTypes = (): Promise => - fetchResults("/api/1.0/main/location-type.json"); + fetchResults("/api/1.0/main/location-type.json"); diff --git a/src/Bundle/ChillMainBundle/Resources/public/lib/api/return_path.ts b/src/Bundle/ChillMainBundle/Resources/public/lib/api/return_path.ts index 54a12c030..e444aa2e5 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/lib/api/return_path.ts +++ b/src/Bundle/ChillMainBundle/Resources/public/lib/api/return_path.ts @@ -1,3 +1,3 @@ export function buildReturnPath(location: Location): string { - return location.pathname + location.search; + return location.pathname + location.search; } diff --git a/src/Bundle/ChillMainBundle/Resources/public/lib/api/user.ts b/src/Bundle/ChillMainBundle/Resources/public/lib/api/user.ts index e51d09abb..62703b740 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/lib/api/user.ts +++ b/src/Bundle/ChillMainBundle/Resources/public/lib/api/user.ts @@ -2,23 +2,23 @@ import { User } from "../../types"; import { makeFetch } from "./apiMethods"; export const whoami = (): Promise => { - const url = `/api/1.0/main/whoami.json`; - return fetch(url).then((response) => { - if (response.ok) { - return response.json(); - } - throw { - msg: "Error while getting whoami.", - sta: response.status, - txt: response.statusText, - err: new Error(), - body: response.body, - }; - }); + const url = `/api/1.0/main/whoami.json`; + return fetch(url).then((response) => { + if (response.ok) { + return response.json(); + } + throw { + msg: "Error while getting whoami.", + sta: response.status, + txt: response.statusText, + err: new Error(), + body: response.body, + }; + }); }; export const whereami = (): Promise => { - const url = `/api/1.0/main/user-current-location.json`; + const url = `/api/1.0/main/user-current-location.json`; - return makeFetch("GET", url); + return makeFetch("GET", url); }; diff --git a/src/Bundle/ChillMainBundle/Resources/public/lib/entity-notification/api.ts b/src/Bundle/ChillMainBundle/Resources/public/lib/entity-notification/api.ts index 97ba98d75..47cf9b1e9 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/lib/entity-notification/api.ts +++ b/src/Bundle/ChillMainBundle/Resources/public/lib/entity-notification/api.ts @@ -1,22 +1,22 @@ const buildLinkCreate = function ( - relatedEntityClass: string, - relatedEntityId: number, - to: number | null, - returnPath: string | null, + relatedEntityClass: string, + relatedEntityId: number, + to: number | null, + returnPath: string | null, ): string { - const params = new URLSearchParams(); - params.append("entityClass", relatedEntityClass); - params.append("entityId", relatedEntityId.toString()); + const params = new URLSearchParams(); + params.append("entityClass", relatedEntityClass); + params.append("entityId", relatedEntityId.toString()); - if (null !== to) { - params.append("tos[0]", to.toString()); - } + if (null !== to) { + params.append("tos[0]", to.toString()); + } - if (null !== returnPath) { - params.append("returnPath", returnPath); - } + if (null !== returnPath) { + params.append("returnPath", returnPath); + } - return `/fr/notification/create?${params.toString()}`; + return `/fr/notification/create?${params.toString()}`; }; export { buildLinkCreate }; diff --git a/src/Bundle/ChillMainBundle/Resources/public/lib/entity-workflow/api.ts b/src/Bundle/ChillMainBundle/Resources/public/lib/entity-workflow/api.ts index 4f9dea715..a9955f31b 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/lib/entity-workflow/api.ts +++ b/src/Bundle/ChillMainBundle/Resources/public/lib/entity-workflow/api.ts @@ -10,17 +10,17 @@ * @throws {Error} If the related entity ID is undefined. */ export const buildLinkCreate = ( - workflowName: string, - relatedEntityClass: string, - relatedEntityId: number | undefined, + workflowName: string, + relatedEntityClass: string, + relatedEntityId: number | undefined, ): string => { - if (typeof relatedEntityId === "undefined") { - throw new Error("the related entity id is not set"); - } - const params = new URLSearchParams(); - params.set("entityClass", relatedEntityClass); - params.set("entityId", relatedEntityId.toString(10)); - params.set("workflow", workflowName); + if (typeof relatedEntityId === "undefined") { + throw new Error("the related entity id is not set"); + } + const params = new URLSearchParams(); + params.set("entityClass", relatedEntityClass); + params.set("entityId", relatedEntityId.toString(10)); + params.set("workflow", workflowName); - return `/fr/main/workflow/create?` + params.toString(); + return `/fr/main/workflow/create?` + params.toString(); }; diff --git a/src/Bundle/ChillMainBundle/Resources/public/lib/localizationHelper/localizationHelper.ts b/src/Bundle/ChillMainBundle/Resources/public/lib/localizationHelper/localizationHelper.ts index b2fa260d2..9cd1dcb51 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/lib/localizationHelper/localizationHelper.ts +++ b/src/Bundle/ChillMainBundle/Resources/public/lib/localizationHelper/localizationHelper.ts @@ -9,33 +9,33 @@ import { TranslatableString } from "ChillMainAssets/types"; * @returns The localized string or null if no translation is available */ export function localizeString( - translatableString: TranslatableString | null | undefined, - locale?: string, + translatableString: TranslatableString | null | undefined, + locale?: string, ): string { - if (!translatableString || Object.keys(translatableString).length === 0) { - return ""; - } - - const currentLocale = locale || navigator.language.split("-")[0] || "fr"; - - if (translatableString[currentLocale]) { - return translatableString[currentLocale]; - } - - // Define fallback locales - const fallbackLocales: string[] = ["fr", "en"]; - - for (const fallbackLocale of fallbackLocales) { - if (translatableString[fallbackLocale]) { - return translatableString[fallbackLocale]; + if (!translatableString || Object.keys(translatableString).length === 0) { + return ""; } - } - // No fallback translation found, use the first available - const availableLocales = Object.keys(translatableString); - if (availableLocales.length > 0) { - return translatableString[availableLocales[0]]; - } + const currentLocale = locale || navigator.language.split("-")[0] || "fr"; - return ""; + if (translatableString[currentLocale]) { + return translatableString[currentLocale]; + } + + // Define fallback locales + const fallbackLocales: string[] = ["fr", "en"]; + + for (const fallbackLocale of fallbackLocales) { + if (translatableString[fallbackLocale]) { + return translatableString[fallbackLocale]; + } + } + + // No fallback translation found, use the first available + const availableLocales = Object.keys(translatableString); + if (availableLocales.length > 0) { + return translatableString[availableLocales[0]]; + } + + return ""; } diff --git a/src/Bundle/ChillMainBundle/Resources/public/lib/workflow/attachments.ts b/src/Bundle/ChillMainBundle/Resources/public/lib/workflow/attachments.ts index 05c745099..7e2f23f57 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/lib/workflow/attachments.ts +++ b/src/Bundle/ChillMainBundle/Resources/public/lib/workflow/attachments.ts @@ -3,20 +3,20 @@ import { GenericDocForAccompanyingPeriod } from "ChillDocStoreAssets/types/gener import { makeFetch } from "ChillMainAssets/lib/api/apiMethods"; export const find_attachments_by_workflow = async ( - workflowId: number, + workflowId: number, ): Promise => - makeFetch("GET", `/api/1.0/main/workflow/${workflowId}/attachment`); + makeFetch("GET", `/api/1.0/main/workflow/${workflowId}/attachment`); export const create_attachment = async ( - workflowId: number, - genericDoc: GenericDocForAccompanyingPeriod, + workflowId: number, + genericDoc: GenericDocForAccompanyingPeriod, ): Promise => - makeFetch("POST", `/api/1.0/main/workflow/${workflowId}/attachment`, { - relatedGenericDocKey: genericDoc.key, - relatedGenericDocIdentifiers: genericDoc.identifiers, - }); + makeFetch("POST", `/api/1.0/main/workflow/${workflowId}/attachment`, { + relatedGenericDocKey: genericDoc.key, + relatedGenericDocIdentifiers: genericDoc.identifiers, + }); export const delete_attachment = async ( - attachment: WorkflowAttachment, + attachment: WorkflowAttachment, ): Promise => - makeFetch("DELETE", `/api/1.0/main/workflow/attachment/${attachment.id}`); + makeFetch("DELETE", `/api/1.0/main/workflow/attachment/${attachment.id}`); diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/address-details/index.ts b/src/Bundle/ChillMainBundle/Resources/public/module/address-details/index.ts index d41a70499..abe516934 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/module/address-details/index.ts +++ b/src/Bundle/ChillMainBundle/Resources/public/module/address-details/index.ts @@ -7,43 +7,43 @@ import { Address } from "../../types"; const i18n = _createI18n({}); document - .querySelectorAll("span[data-address-details]") - .forEach((el) => { - const dataset = el.dataset as { - addressId: string; - addressRefStatus: string; - }; - - const app = createApp({ - components: { AddressDetailsButton }, - data() { - return { - addressId: Number.parseInt(dataset.addressId), - addressRefStatus: dataset.addressRefStatus, + .querySelectorAll("span[data-address-details]") + .forEach((el) => { + const dataset = el.dataset as { + addressId: string; + addressRefStatus: string; }; - }, - template: - '', - methods: { - onUpdateAddress: (address: Address): void => { - if ( - address.refStatus === "to_review" || - address.refStatus === "reviewed" - ) { - // in this two case, the address content do not change - return; - } - if ( - window.confirm( - "L'adresse a été modifiée. Vous pouvez continuer votre travail. Cependant, pour afficher les données immédiatement, veuillez recharger la page. \n\n Voulez-vous recharger la page immédiatement ?", - ) - ) { - window.location.reload(); - } - }, - }, - }); - app.use(i18n); - app.mount(el); - }); + const app = createApp({ + components: { AddressDetailsButton }, + data() { + return { + addressId: Number.parseInt(dataset.addressId), + addressRefStatus: dataset.addressRefStatus, + }; + }, + template: + '', + methods: { + onUpdateAddress: (address: Address): void => { + if ( + address.refStatus === "to_review" || + address.refStatus === "reviewed" + ) { + // in this two case, the address content do not change + return; + } + if ( + window.confirm( + "L'adresse a été modifiée. Vous pouvez continuer votre travail. Cependant, pour afficher les données immédiatement, veuillez recharger la page. \n\n Voulez-vous recharger la page immédiatement ?", + ) + ) { + window.location.reload(); + } + }, + }, + }); + + app.use(i18n); + app.mount(el); + }); diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/ckeditor5/editor_config.ts b/src/Bundle/ChillMainBundle/Resources/public/module/ckeditor5/editor_config.ts index fbbbb5881..a396da295 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/module/ckeditor5/editor_config.ts +++ b/src/Bundle/ChillMainBundle/Resources/public/module/ckeditor5/editor_config.ts @@ -1,16 +1,16 @@ import { - Essentials, - Bold, - Italic, - Paragraph, - Markdown, - BlockQuote, - Heading, - Link, - List, - Emoji, - Mention, - Fullscreen, + Essentials, + Bold, + Italic, + Paragraph, + Markdown, + BlockQuote, + Heading, + Link, + List, + Emoji, + Mention, + Fullscreen, } from "ckeditor5"; import coreTranslations from "ckeditor5/translations/fr.js"; @@ -19,41 +19,41 @@ import "ckeditor5/ckeditor5.css"; import "./index.scss"; export default { - plugins: [ - Essentials, - Markdown, - Bold, - Italic, - BlockQuote, - Heading, - Link, - List, - Paragraph, - // both Emoji and Mention are required for Emoji feature - Emoji, - Mention, - // to enable fullscreen - Fullscreen, - ], - toolbar: { - items: [ - "heading", - "|", - "bold", - "italic", - "link", - "bulletedList", - "numberedList", - "blockQuote", - "|", - "emoji", - "|", - "undo", - "redo", - "|", - "fullscreen", + plugins: [ + Essentials, + Markdown, + Bold, + Italic, + BlockQuote, + Heading, + Link, + List, + Paragraph, + // both Emoji and Mention are required for Emoji feature + Emoji, + Mention, + // to enable fullscreen + Fullscreen, ], - }, - translations: [coreTranslations], - licenseKey: "GPL", + toolbar: { + items: [ + "heading", + "|", + "bold", + "italic", + "link", + "bulletedList", + "numberedList", + "blockQuote", + "|", + "emoji", + "|", + "undo", + "redo", + "|", + "fullscreen", + ], + }, + translations: [coreTranslations], + licenseKey: "GPL", }; diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/ckeditor5/index.ts b/src/Bundle/ChillMainBundle/Resources/public/module/ckeditor5/index.ts index f8e0cb48b..783c0acfa 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/module/ckeditor5/index.ts +++ b/src/Bundle/ChillMainBundle/Resources/public/module/ckeditor5/index.ts @@ -2,31 +2,31 @@ import { createApp } from "vue"; import CommentEditor from "ChillMainAssets/vuejs/_components/CommentEditor/CommentEditor.vue"; const ckeditorFields: NodeListOf = - document.querySelectorAll("textarea[ckeditor]"); + document.querySelectorAll("textarea[ckeditor]"); ckeditorFields.forEach((field: HTMLTextAreaElement): void => { - const content = field.value; - const div = document.createElement("div"); + const content = field.value; + const div = document.createElement("div"); - if (field.parentNode !== null) { - field.parentNode.insertBefore(div, field); - } else { - throw "parent is null"; - } + if (field.parentNode !== null) { + field.parentNode.insertBefore(div, field); + } else { + throw "parent is null"; + } - createApp({ - components: { CommentEditor }, - template: ``, - data() { - return { - content, - }; - }, - methods: { - handleInput() { - field.value = this.content; - }, - }, - }).mount(div); + createApp({ + components: { CommentEditor }, + template: ``, + data() { + return { + content, + }; + }, + methods: { + handleInput() { + field.value = this.content; + }, + }, + }).mount(div); - field.style.display = "none"; + field.style.display = "none"; }); diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/collection/index.ts b/src/Bundle/ChillMainBundle/Resources/public/module/collection/index.ts index 1c45f468d..77ff044ec 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/module/collection/index.ts +++ b/src/Bundle/ChillMainBundle/Resources/public/module/collection/index.ts @@ -31,157 +31,157 @@ import "./collection.scss"; declare global { - interface GlobalEventHandlersEventMap { - "show-hide-show": CustomEvent<{ - id: number; - froms: HTMLElement[]; - container: HTMLElement; - }>; - } + interface GlobalEventHandlersEventMap { + "show-hide-show": CustomEvent<{ + id: number; + froms: HTMLElement[]; + container: HTMLElement; + }>; + } } export class CollectionEventPayload { - collection: HTMLUListElement; - entry: HTMLLIElement; + collection: HTMLUListElement; + entry: HTMLLIElement; - constructor(collection: HTMLUListElement, entry: HTMLLIElement) { - this.collection = collection; - this.entry = entry; - } + constructor(collection: HTMLUListElement, entry: HTMLLIElement) { + this.collection = collection; + this.entry = entry; + } } export const handleAdd = (button: any): void => { - const form_name = button.dataset.collectionAddTarget, - prototype = button.dataset.formPrototype, - collection: HTMLUListElement | null = document.querySelector( - 'ul[data-collection-name="' + form_name + '"]', - ); + const form_name = button.dataset.collectionAddTarget, + prototype = button.dataset.formPrototype, + collection: HTMLUListElement | null = document.querySelector( + 'ul[data-collection-name="' + form_name + '"]', + ); - if (collection === null) { - return; - } - - const empty_explain: HTMLLIElement | null = collection.querySelector( - "li[data-collection-empty-explain]", - ), - entry = document.createElement("li"), - counter = collection.querySelectorAll("li.entry").length, // Updated counter logic - content = prototype.replace(/__name__/g, counter.toString()), - event = new CustomEvent("collection-add-entry", { - detail: new CollectionEventPayload(collection, entry), - }); - - console.log(counter); - console.log(content); - - entry.innerHTML = content; - entry.classList.add("entry"); - - if ("collectionRegular" in collection.dataset) { - initializeRemove(collection, entry); - if (empty_explain !== null) { - empty_explain.remove(); + if (collection === null) { + return; } - } - collection.appendChild(entry); - collection.dispatchEvent(event); - window.dispatchEvent(event); + const empty_explain: HTMLLIElement | null = collection.querySelector( + "li[data-collection-empty-explain]", + ), + entry = document.createElement("li"), + counter = collection.querySelectorAll("li.entry").length, // Updated counter logic + content = prototype.replace(/__name__/g, counter.toString()), + event = new CustomEvent("collection-add-entry", { + detail: new CollectionEventPayload(collection, entry), + }); + + console.log(counter); + console.log(content); + + entry.innerHTML = content; + entry.classList.add("entry"); + + if ("collectionRegular" in collection.dataset) { + initializeRemove(collection, entry); + if (empty_explain !== null) { + empty_explain.remove(); + } + } + + collection.appendChild(entry); + collection.dispatchEvent(event); + window.dispatchEvent(event); }; const initializeRemove = ( - collection: HTMLUListElement, - entry: HTMLLIElement, + collection: HTMLUListElement, + entry: HTMLLIElement, ): void => { - const button = buildRemoveButton(collection, entry); - if (null === button) { - return; - } - entry.appendChild(button); + const button = buildRemoveButton(collection, entry); + if (null === button) { + return; + } + entry.appendChild(button); }; export const buildRemoveButton = ( - collection: HTMLUListElement, - entry: HTMLLIElement, + collection: HTMLUListElement, + entry: HTMLLIElement, ): HTMLButtonElement | null => { - const button = document.createElement("button"), - isPersisted = entry.dataset.collectionIsPersisted || "", - content = collection.dataset.collectionButtonRemoveLabel || "", - allowDelete = collection.dataset.collectionAllowDelete || "", - event = new CustomEvent("collection-remove-entry", { - detail: new CollectionEventPayload(collection, entry), + const button = document.createElement("button"), + isPersisted = entry.dataset.collectionIsPersisted || "", + content = collection.dataset.collectionButtonRemoveLabel || "", + allowDelete = collection.dataset.collectionAllowDelete || "", + event = new CustomEvent("collection-remove-entry", { + detail: new CollectionEventPayload(collection, entry), + }); + + if (allowDelete === "0" && isPersisted === "1") { + return null; + } + button.classList.add("btn", "btn-delete", "remove-entry"); + button.textContent = content; + button.addEventListener("click", (e: Event) => { + e.preventDefault(); + entry.remove(); + collection.dispatchEvent(event); + window.dispatchEvent(event); }); - if (allowDelete === "0" && isPersisted === "1") { - return null; - } - button.classList.add("btn", "btn-delete", "remove-entry"); - button.textContent = content; - button.addEventListener("click", (e: Event) => { - e.preventDefault(); - entry.remove(); - collection.dispatchEvent(event); - window.dispatchEvent(event); - }); - - return button; + return button; }; const collectionsInit = new Set(); const buttonsInit = new Set(); const initialize = function (target: Document | Element): void { - const addButtons: NodeListOf = document.querySelectorAll( - "button[data-collection-add-target]", - ), - collections: NodeListOf = document.querySelectorAll( - "ul[data-collection-regular]", - ); + const addButtons: NodeListOf = document.querySelectorAll( + "button[data-collection-add-target]", + ), + collections: NodeListOf = document.querySelectorAll( + "ul[data-collection-regular]", + ); - for (let i = 0; i < addButtons.length; i++) { - const addButton = addButtons[i]; - const uniqid = addButton.dataset.uniqid as string; - if (buttonsInit.has(uniqid)) { - continue; + for (let i = 0; i < addButtons.length; i++) { + const addButton = addButtons[i]; + const uniqid = addButton.dataset.uniqid as string; + if (buttonsInit.has(uniqid)) { + continue; + } + buttonsInit.add(uniqid); + addButton.addEventListener("click", (e: Event) => { + e.preventDefault(); + handleAdd(e.target); + }); } - buttonsInit.add(uniqid); - addButton.addEventListener("click", (e: Event) => { - e.preventDefault(); - handleAdd(e.target); - }); - } - for (let i = 0; i < collections.length; i++) { - const collection = collections[i]; - const uniqid = collection.dataset.uniqid as string; - if (collectionsInit.has(uniqid)) { - continue; + for (let i = 0; i < collections.length; i++) { + const collection = collections[i]; + const uniqid = collection.dataset.uniqid as string; + if (collectionsInit.has(uniqid)) { + continue; + } + collectionsInit.add(uniqid); + const entries: NodeListOf = + collection.querySelectorAll(":scope > li"); + for (let j = 0; j < entries.length; j++) { + if (entries[j].dataset.collectionEmptyExplain === "1") { + continue; + } + initializeRemove(collections[i], entries[j]); + } } - collectionsInit.add(uniqid); - const entries: NodeListOf = - collection.querySelectorAll(":scope > li"); - for (let j = 0; j < entries.length; j++) { - if (entries[j].dataset.collectionEmptyExplain === "1") { - continue; - } - initializeRemove(collections[i], entries[j]); - } - } }; window.addEventListener("DOMContentLoaded", () => { - initialize(document); + initialize(document); }); window.addEventListener( - "show-hide-show", - ( - event: CustomEvent<{ - id: number; - container: HTMLElement; - froms: HTMLElement[]; - }>, - ) => { - const container = event.detail.container as HTMLElement; - initialize(container); - }, + "show-hide-show", + ( + event: CustomEvent<{ + id: number; + container: HTMLElement; + froms: HTMLElement[]; + }>, + ) => { + const container = event.detail.container as HTMLElement; + initialize(container); + }, ); diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/notification/toggle_read_all.ts b/src/Bundle/ChillMainBundle/Resources/public/module/notification/toggle_read_all.ts index d07a7e815..97697fca5 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/module/notification/toggle_read_all.ts +++ b/src/Bundle/ChillMainBundle/Resources/public/module/notification/toggle_read_all.ts @@ -5,39 +5,39 @@ import NotificationReadAllToggle from "../../vuejs/_components/Notification/Noti const i18n = _createI18n({}); document.addEventListener("DOMContentLoaded", function () { - const elements = document.querySelectorAll(".notification_all_read"); + const elements = document.querySelectorAll(".notification_all_read"); - elements.forEach((element) => { - console.log("launch"); - createApp({ - template: ``, - components: { - NotificationReadAllToggle, - }, - methods: { - markAsRead(id: number) { - const el = document.querySelector( - `div.notification-status[data-notification-id="${id}"]`, - ); - if (el === null) { - return; - } - el.classList.add("read"); - el.classList.remove("unread"); - }, - markAsUnread(id: number) { - const el = document.querySelector( - `div.notification-status[data-notification-id="${id}"]`, - ); - if (el === null) { - return; - } - el.classList.remove("read"); - el.classList.add("unread"); - }, - }, - }) - .use(i18n) - .mount(element); - }); + elements.forEach((element) => { + console.log("launch"); + createApp({ + template: ``, + components: { + NotificationReadAllToggle, + }, + methods: { + markAsRead(id: number) { + const el = document.querySelector( + `div.notification-status[data-notification-id="${id}"]`, + ); + if (el === null) { + return; + } + el.classList.add("read"); + el.classList.remove("unread"); + }, + markAsUnread(id: number) { + const el = document.querySelector( + `div.notification-status[data-notification-id="${id}"]`, + ); + if (el === null) { + return; + } + el.classList.remove("read"); + el.classList.add("unread"); + }, + }, + }) + .use(i18n) + .mount(element); + }); }); diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js b/src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js index 8d9484bb1..9f6bb753e 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js +++ b/src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js @@ -124,10 +124,9 @@ function loadDynamicPicker(element) { removeEntity({ entity }) { if ( -1 === - this.suggested.findIndex( - (e) => e.type === entity.type && e.id === entity.id, - ) && - "me" !== entity + this.suggested.findIndex( + (e) => e.type === entity.type && e.id === entity.id, + ) ) { this.suggested.push(entity); } diff --git a/src/Bundle/ChillMainBundle/Resources/public/types.ts b/src/Bundle/ChillMainBundle/Resources/public/types.ts index fecb9a578..2cd83bc64 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/types.ts +++ b/src/Bundle/ChillMainBundle/Resources/public/types.ts @@ -2,279 +2,216 @@ import { GenericDoc } from "ChillDocStoreAssets/types/generic_doc"; import { StoredObject, StoredObjectStatus } from "ChillDocStoreAssets/types"; export interface DateTime { - datetime: string; - datetime8601: string; + datetime: string; + datetime8601: string; } export interface Civility { - id: number; - // TODO -} - -export interface Household { - type: "household"; - id: number; + id: number; + // TODO } export interface Job { - id: number; - type: "user_job"; - label: { - fr: string; // could have other key. How to do that in ts ? - }; + id: number; + type: "user_job"; + label: { + fr: string; // could have other key. How to do that in ts ? + }; } export interface Center { - id: number; - type: "center"; - name: string; + id: number; + type: "center"; + name: string; } export interface Scope { - id: number; - type: "scope"; - name: { - fr: string; - }; + id: number; + type: "scope"; + name: { + fr: string; + }; } export interface ResultItem { - result: T; - relevance: number; + result: T; + relevance: number; } export interface User { - type: "user"; - id: number; - username: string; - text: string; - text_without_absence: string; - email: string; - user_job: Job; - label: string; - // todo: mainCenter; mainJob; etc.. + type: "user"; + id: number; + username: string; + text: string; + text_without_absence: string; + email: string; + user_job: Job; + label: string; + // todo: mainCenter; mainJob; etc.. } export interface UserGroup { - type: "user_group"; - id: number; - label: TranslatableString; - backgroundColor: string; - foregroundColor: string; - excludeKey: string; - text: string; + type: "user_group"; + id: number; + label: TranslatableString; + backgroundColor: string; + foregroundColor: string; + excludeKey: string; + text: string; } export type UserGroupOrUser = User | UserGroup; export interface UserAssociatedInterface { - type: "user"; - id: number; + type: "user"; + id: number; } export type TranslatableString = Record; export interface Postcode { - id: number; - name: string; - code: string; - center: Point; + id: number; + name: string; + code: string; + center: Point; } export interface Point { - type: "Point"; - coordinates: [lat: number, lon: number]; + type: "Point"; + coordinates: [lat: number, lon: number]; } export interface Country { - id: number; - name: TranslatableString; - code: string; + id: number; + name: TranslatableString; + code: string; } export type AddressRefStatus = "match" | "to_review" | "reviewed"; export interface Address { - type: "address"; - address_id: number; - text: string; - street: string; - streetNumber: string; - postcode: Postcode; - country: Country; - floor: string | null; - corridor: string | null; - steps: string | null; - flat: string | null; - buildingName: string | null; - distribution: string | null; - extra: string | null; - confidential: boolean; - lines: string[]; - addressReference: AddressReference | null; - validFrom: DateTime; - validTo: DateTime | null; - point: Point | null; - refStatus: AddressRefStatus; - isNoAddress: boolean; + type: "address"; + address_id: number; + text: string; + street: string; + streetNumber: string; + postcode: Postcode; + country: Country; + floor: string | null; + corridor: string | null; + steps: string | null; + flat: string | null; + buildingName: string | null; + distribution: string | null; + extra: string | null; + confidential: boolean; + lines: string[]; + addressReference: AddressReference | null; + validFrom: DateTime; + validTo: DateTime | null; + point: Point | null; + refStatus: AddressRefStatus; + isNoAddress: boolean; } export interface AddressWithPoint extends Address { - point: Point; + point: Point; } export interface AddressReference { - id: number; - createdAt: DateTime | null; - deletedAt: DateTime | null; - municipalityCode: string; - point: Point; - postcode: Postcode; - refId: string; - source: string; - street: string; - streetNumber: string; - updatedAt: DateTime | null; + id: number; + createdAt: DateTime | null; + deletedAt: DateTime | null; + municipalityCode: string; + point: Point; + postcode: Postcode; + refId: string; + source: string; + street: string; + streetNumber: string; + updatedAt: DateTime | null; } export interface SimpleGeographicalUnit { - id: number; - layerId: number; - unitName: string; - unitRefId: string; + id: number; + layerId: number; + unitName: string; + unitRefId: string; } export interface GeographicalUnitLayer { - id: number; - name: TranslatableString; - refId: string; + id: number; + name: TranslatableString; + refId: string; } export interface Location { - type: "location"; - id: number; - active: boolean; - address: Address | null; - availableForUsers: boolean; - createdAt: DateTime | null; - createdBy: User | null; - updatedAt: DateTime | null; - updatedBy: User | null; - email: string | null; - name: string; - phonenumber1: string | null; - phonenumber2: string | null; - locationType: LocationType; + type: "location"; + id: number; + active: boolean; + address: Address | null; + availableForUsers: boolean; + createdAt: DateTime | null; + createdBy: User | null; + updatedAt: DateTime | null; + updatedBy: User | null; + email: string | null; + name: string; + phonenumber1: string | null; + phonenumber2: string | null; + locationType: LocationType; } export interface LocationAssociated { - type: "location"; - id: number; + type: "location"; + id: number; } export interface LocationType { - type: "location-type"; - id: number; - active: boolean; - addressRequired: "optional" | "required"; - availableForUsers: boolean; - editableByUsers: boolean; - contactData: "optional" | "required"; - title: TranslatableString; + type: "location-type"; + id: number; + active: boolean; + addressRequired: "optional" | "required"; + availableForUsers: boolean; + editableByUsers: boolean; + contactData: "optional" | "required"; + title: TranslatableString; } export interface NewsItemType { - id: number; - title: string; - content: string; - startDate: DateTime; - endDate: DateTime | null; + id: number; + title: string; + content: string; + startDate: DateTime; + endDate: DateTime | null; } export interface WorkflowAvailable { - name: string; - text: string; + name: string; + text: string; } export interface WorkflowAttachment { - id: number; - relatedGenericDocKey: string; - relatedGenericDocIdentifiers: object; - createdAt: DateTime | null; - createdBy: User | null; - updatedAt: DateTime | null; - updatedBy: User | null; - genericDoc: null | GenericDoc; + id: number; + relatedGenericDocKey: string; + relatedGenericDocIdentifiers: object; + createdAt: DateTime | null; + createdBy: User | null; + updatedAt: DateTime | null; + updatedBy: User | null; + genericDoc: null | GenericDoc; } export interface ExportGeneration { - id: string; - type: "export_generation"; - exportAlias: string; - createdBy: User | null; - createdAt: DateTime | null; - status: StoredObjectStatus; - storedObject: StoredObject; + id: string; + type: "export_generation"; + exportAlias: string; + createdBy: User | null; + createdAt: DateTime | null; + status: StoredObjectStatus; + storedObject: StoredObject; } export interface PrivateCommentEmbeddable { - comments: Record; -} - -// API Exception types -export interface TransportExceptionInterface { - name: string; -} - -export interface ValidationExceptionInterface - extends TransportExceptionInterface { - name: "ValidationException"; - error: object; - violations: string[]; - titles: string[]; - propertyPaths: string[]; -} - -export interface AccessExceptionInterface extends TransportExceptionInterface { - name: "AccessException"; - violations: string[]; -} - -export interface NotFoundExceptionInterface - extends TransportExceptionInterface { - name: "NotFoundException"; -} - -export interface ServerExceptionInterface extends TransportExceptionInterface { - name: "ServerException"; - message: string; - code: number; - body: string; -} - -export interface ConflictHttpExceptionInterface - extends TransportExceptionInterface { - name: "ConflictHttpException"; - violations: string[]; -} - -export type ApiException = - | ValidationExceptionInterface - | AccessExceptionInterface - | NotFoundExceptionInterface - | ServerExceptionInterface - | ConflictHttpExceptionInterface; - -export interface Modal { - showModal: boolean; - modalDialogClass: string; -} - -export interface Selected { - result: UserGroupOrUser; -} - -export interface addNewEntities { - selected: Selected[]; - modal: Modal; + comments: Record; } diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/App.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/App.vue index d259d0cae..075bf6d65 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/App.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/App.vue @@ -1,130 +1,130 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ActionButtons.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ActionButtons.vue index fda84c817..5d90bf818 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ActionButtons.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ActionButtons.vue @@ -1,32 +1,32 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue index ede1b3778..103849e3a 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue @@ -1,248 +1,251 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressMap.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressMap.vue index 4aa44f4a6..167b3b981 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressMap.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressMap.vue @@ -1,5 +1,5 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressMore.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressMore.vue index 3e9da5da4..4b59efbc6 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressMore.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressMore.vue @@ -1,149 +1,149 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue index 6ad8965b4..fd1740a40 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue @@ -1,223 +1,227 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue index 74520310e..0d85c69f9 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue @@ -1,60 +1,60 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CountrySelection.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CountrySelection.vue index 47feab563..37decf15e 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CountrySelection.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CountrySelection.vue @@ -1,23 +1,23 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/DatePane.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/DatePane.vue index 3e8e1f4bb..96e67f952 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/DatePane.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/DatePane.vue @@ -1,66 +1,69 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/EditPane.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/EditPane.vue index cf808ed2a..df5ea56dc 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/EditPane.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/EditPane.vue @@ -1,101 +1,104 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ShowPane.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ShowPane.vue index d0796bc0d..a17ce719d 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ShowPane.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ShowPane.vue @@ -1,98 +1,109 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/SuggestPane.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/SuggestPane.vue index 2e62b5963..ddaed6219 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/SuggestPane.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/SuggestPane.vue @@ -1,64 +1,67 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/DownloadExport/App.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/DownloadExport/App.vue index d1389a748..033eb6cac 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/DownloadExport/App.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/DownloadExport/App.vue @@ -1,10 +1,10 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/DownloadExport/index.ts b/src/Bundle/ChillMainBundle/Resources/public/vuejs/DownloadExport/index.ts index ae77fbb08..e970e51b9 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/DownloadExport/index.ts +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/DownloadExport/index.ts @@ -4,8 +4,8 @@ import App from "./App.vue"; const el = document.getElementById("app"); if (null === el) { - console.error("div element app was not found"); - throw new Error("div element app was not found"); + console.error("div element app was not found"); + throw new Error("div element app was not found"); } const exportGenerationId = el?.dataset.exportGenerationId as string; diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/App.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/App.vue index c550d1c0d..8686b59a7 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/App.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/App.vue @@ -1,36 +1,36 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/DashboardWidgets/News.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/DashboardWidgets/News.vue index 4f664d6a5..5633d3133 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/DashboardWidgets/News.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/DashboardWidgets/News.vue @@ -1,13 +1,13 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/DashboardWidgets/NewsItem.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/DashboardWidgets/NewsItem.vue index 5cbd33712..997eae58b 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/DashboardWidgets/NewsItem.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/DashboardWidgets/NewsItem.vue @@ -1,38 +1,40 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyAccompanyingCourses.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyAccompanyingCourses.vue index bd3b5cdf8..9f7edf8e7 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyAccompanyingCourses.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyAccompanyingCourses.vue @@ -1,65 +1,76 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyCustoms.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyCustoms.vue index 5b10dc89c..1f76a5a0a 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyCustoms.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyCustoms.vue @@ -1,103 +1,105 @@ @@ -144,18 +146,18 @@ export default { div.custom4, div.custom3, div.custom2 { - font-style: italic; - color: var(--bs-chill-gray); + font-style: italic; + color: var(--bs-chill-gray); } span.counter { - & > span { - background-color: unset; - } + & > span { + background-color: unset; + } } div.news { - max-height: 22rem; - overflow: hidden; - overflow-y: scroll; + max-height: 22rem; + overflow: hidden; + overflow-y: scroll; } diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyEvaluations.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyEvaluations.vue index b7db53a53..71bf654e7 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyEvaluations.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyEvaluations.vue @@ -1,81 +1,96 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyNotifications.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyNotifications.vue index 21fd1a9b7..377903c01 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyNotifications.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyNotifications.vue @@ -1,46 +1,46 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyTasks.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyTasks.vue index cc043461e..ca30197a8 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyTasks.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyTasks.vue @@ -1,78 +1,83 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyWorkflows.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyWorkflows.vue index 453ed19b4..68ac0bc1e 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyWorkflows.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyWorkflows.vue @@ -1,13 +1,13 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyWorkflowsTable.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyWorkflowsTable.vue index b10cbacfe..61dfa420d 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyWorkflowsTable.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyWorkflowsTable.vue @@ -1,57 +1,59 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyWorks.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyWorks.vue index 84400dfc2..8f7dea7ef 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyWorks.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyWorks.vue @@ -1,77 +1,85 @@ // CURRENTLY NOT IN USE diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/TabCounter.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/TabCounter.vue index 231d101bf..daec6db4a 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/TabCounter.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/TabCounter.vue @@ -1,17 +1,17 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/TabTable.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/TabTable.vue index d96f88dc5..c8899aa86 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/TabTable.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/TabTable.vue @@ -1,20 +1,20 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/App.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/App.vue index ca60c23c7..24c5421a8 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/App.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/App.vue @@ -1,42 +1,42 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/Create.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/Create.vue index b4f972b2c..9a4325060 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/Create.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/Create.vue @@ -1,115 +1,113 @@ - diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue index dc66a0000..452ac0396 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue @@ -1,354 +1,328 @@ - diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickPostalCode/PickPostalCode.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickPostalCode/PickPostalCode.vue index fe5fcbe17..191bafc76 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickPostalCode/PickPostalCode.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickPostalCode/PickPostalCode.vue @@ -1,27 +1,27 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/SavedExportButtons/App.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/SavedExportButtons/App.vue index bef3028dc..6f021ac80 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/SavedExportButtons/App.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/SavedExportButtons/App.vue @@ -2,15 +2,17 @@ import GenerateButton from "ChillMainAssets/vuejs/SavedExportButtons/Component/GenerateButton.vue"; interface SavedExportButtonsConfig { - savedExportUuid: string; - savedExportAlias: string; + savedExportUuid: string; + savedExportAlias: string; } const props = defineProps(); diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/SavedExportButtons/Component/GenerateButton.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/SavedExportButtons/Component/GenerateButton.vue index 99fa852c9..f4dafd006 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/SavedExportButtons/Component/GenerateButton.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/SavedExportButtons/Component/GenerateButton.vue @@ -1,15 +1,15 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/SavedExportButtons/index.ts b/src/Bundle/ChillMainBundle/Resources/public/vuejs/SavedExportButtons/index.ts index a7d0105e8..518746dea 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/SavedExportButtons/index.ts +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/SavedExportButtons/index.ts @@ -3,11 +3,11 @@ import { createApp } from "vue"; import App from "./App.vue"; const buttons = document.querySelectorAll( - "[data-generate-export-button]", + "[data-generate-export-button]", ); buttons.forEach((button) => { - const savedExportUuid = button.dataset.savedExportUuid as string; + const savedExportUuid = button.dataset.savedExportUuid as string; - createApp(App, { savedExportUuid, savedExportAlias: "" }).mount(button); + createApp(App, { savedExportUuid, savedExportAlias: "" }).mount(button); }); diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/App.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/App.vue index ac061782a..9164e134b 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/App.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/App.vue @@ -7,17 +7,17 @@ import AttachmentList from "ChillMainAssets/vuejs/WorkflowAttachment/Component/A import { GenericDoc } from "ChillDocStoreAssets/types"; interface AppConfig { - workflowId: number; - accompanyingPeriodId: number; - attachments: WorkflowAttachment[]; + workflowId: number; + accompanyingPeriodId: number; + attachments: WorkflowAttachment[]; } const emit = defineEmits<{ - ( - e: "pickGenericDoc", - payload: { genericDoc: GenericDocForAccompanyingPeriod }, - ): void; - (e: "removeAttachment", payload: { attachment: WorkflowAttachment }): void; + ( + e: "pickGenericDoc", + payload: { genericDoc: GenericDocForAccompanyingPeriod }, + ): void; + (e: "removeAttachment", payload: { attachment: WorkflowAttachment }): void; }>(); type PickGenericModalType = InstanceType; @@ -26,49 +26,49 @@ const pickDocModal = useTemplateRef("pickDocModal"); const props = defineProps(); const attachedGenericDoc = computed( - () => - props.attachments - .map((a: WorkflowAttachment) => a.genericDoc) - .filter( - (g: GenericDoc | null) => g !== null, - ) as GenericDocForAccompanyingPeriod[], + () => + props.attachments + .map((a: WorkflowAttachment) => a.genericDoc) + .filter( + (g: GenericDoc | null) => g !== null, + ) as GenericDocForAccompanyingPeriod[], ); const openModal = function () { - pickDocModal.value?.openModal(); + pickDocModal.value?.openModal(); }; const onPickGenericDoc = ({ - genericDoc, + genericDoc, }: { - genericDoc: GenericDocForAccompanyingPeriod; + genericDoc: GenericDocForAccompanyingPeriod; }) => { - emit("pickGenericDoc", { genericDoc }); + emit("pickGenericDoc", { genericDoc }); }; const onRemoveAttachment = (payload: { attachment: WorkflowAttachment }) => { - emit("removeAttachment", payload); + emit("removeAttachment", payload); }; diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/Component/AttachmentList.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/Component/AttachmentList.vue index 59705642a..06e6ca6f4 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/Component/AttachmentList.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/Component/AttachmentList.vue @@ -4,49 +4,49 @@ import GenericDocItemBox from "ChillMainAssets/vuejs/WorkflowAttachment/Componen import DocumentActionButtonsGroup from "ChillDocStoreAssets/vuejs/DocumentActionButtonsGroup.vue"; interface AttachmentListProps { - attachments: WorkflowAttachment[]; + attachments: WorkflowAttachment[]; } const emit = defineEmits<{ - // eslint-disable-next-line @typescript-eslint/prefer-function-type - (e: "removeAttachment", payload: { attachment: WorkflowAttachment }): void; + // eslint-disable-next-line @typescript-eslint/prefer-function-type + (e: "removeAttachment", payload: { attachment: WorkflowAttachment }): void; }>(); const props = defineProps(); diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/Component/GenericDocItemBox.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/Component/GenericDocItemBox.vue index 32b76bdcd..8b96b4eea 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/Component/GenericDocItemBox.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/Component/GenericDocItemBox.vue @@ -2,17 +2,17 @@ import { GenericDocForAccompanyingPeriod } from "ChillDocStoreAssets/types/generic_doc"; interface GenericDocItemBoxProps { - genericDoc: GenericDocForAccompanyingPeriod; + genericDoc: GenericDocForAccompanyingPeriod; } const props = defineProps(); diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/Component/PickGenericDoc.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/Component/PickGenericDoc.vue index f2a587cd1..01e9c3a0e 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/Component/PickGenericDoc.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/Component/PickGenericDoc.vue @@ -1,45 +1,45 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/Component/PickGenericDocItem.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/Component/PickGenericDocItem.vue index 51c7dbc4b..2e1cf6d04 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/Component/PickGenericDocItem.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/Component/PickGenericDocItem.vue @@ -4,85 +4,93 @@ import GenericDocItemBox from "ChillMainAssets/vuejs/WorkflowAttachment/Componen import DocumentActionButtonsGroup from "ChillDocStoreAssets/vuejs/DocumentActionButtonsGroup.vue"; interface PickGenericDocItemProps { - genericDoc: GenericDocForAccompanyingPeriod; - accompanyingPeriodId: number; - isPicked: boolean; + genericDoc: GenericDocForAccompanyingPeriod; + accompanyingPeriodId: number; + isPicked: boolean; } const props = defineProps(); const emit = defineEmits<{ - ( - e: "pickGenericDoc", - payload: { genericDoc: GenericDocForAccompanyingPeriod }, - ): void; + ( + e: "pickGenericDoc", + payload: { genericDoc: GenericDocForAccompanyingPeriod }, + ): void; - ( - e: "removeGenericDoc", - payload: { genericDoc: GenericDocForAccompanyingPeriod }, - ): void; + ( + e: "removeGenericDoc", + payload: { genericDoc: GenericDocForAccompanyingPeriod }, + ): void; }>(); const clickOnAddButton = () => { - emit("pickGenericDoc", { genericDoc: props.genericDoc }); + emit("pickGenericDoc", { genericDoc: props.genericDoc }); }; diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/Component/PickGenericDocModal.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/Component/PickGenericDocModal.vue index cb3c8df00..cd3e9253d 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/Component/PickGenericDocModal.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/Component/PickGenericDocModal.vue @@ -5,19 +5,19 @@ import PickGenericDoc from "ChillMainAssets/vuejs/WorkflowAttachment/Component/P import { GenericDocForAccompanyingPeriod } from "ChillDocStoreAssets/types/generic_doc"; interface PickGenericDocModalProps { - accompanyingPeriodId: number; - toRemove: GenericDocForAccompanyingPeriod[]; + accompanyingPeriodId: number; + toRemove: GenericDocForAccompanyingPeriod[]; } type PickGenericDocType = InstanceType; const props = defineProps(); const emit = defineEmits<{ - // eslint-disable-next-line @typescript-eslint/prefer-function-type - ( - e: "pickGenericDoc", - payload: { genericDoc: GenericDocForAccompanyingPeriod }, - ): void; + // eslint-disable-next-line @typescript-eslint/prefer-function-type + ( + e: "pickGenericDoc", + payload: { genericDoc: GenericDocForAccompanyingPeriod }, + ): void; }>(); const picker = useTemplateRef("picker"); const modalOpened = ref(false); @@ -27,87 +27,87 @@ const modalClasses = { "modal-xl": true, "modal-dialog-scrollable": true }; const numberOfPicked = computed(() => pickeds.value.length); const onPicked = ({ - genericDoc, + genericDoc, }: { - genericDoc: GenericDocForAccompanyingPeriod; + genericDoc: GenericDocForAccompanyingPeriod; }) => { - pickeds.value.push(genericDoc); + pickeds.value.push(genericDoc); }; const onRemove = ({ - genericDoc, + genericDoc, }: { - genericDoc: GenericDocForAccompanyingPeriod; + genericDoc: GenericDocForAccompanyingPeriod; }) => { - const index = pickeds.value.findIndex( - (item) => item.uniqueKey === genericDoc.uniqueKey, - ); + const index = pickeds.value.findIndex( + (item) => item.uniqueKey === genericDoc.uniqueKey, + ); - if (index === -1) { - throw new Error("Remove generic doc that doesn't exist"); - } + if (index === -1) { + throw new Error("Remove generic doc that doesn't exist"); + } - pickeds.value.splice(index, 1); + pickeds.value.splice(index, 1); }; const onConfirm = () => { - for (let genericDoc of pickeds.value) { - emit("pickGenericDoc", { genericDoc }); - } - pickeds.value = []; - closeModal(); + for (let genericDoc of pickeds.value) { + emit("pickGenericDoc", { genericDoc }); + } + pickeds.value = []; + closeModal(); }; const closeModal = function () { - modalOpened.value = false; + modalOpened.value = false; }; const openModal = function () { - modalOpened.value = true; + modalOpened.value = true; }; defineExpose({ openModal, closeModal }); diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/index.ts b/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/index.ts index de3d2e3ef..872e6c251 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/index.ts +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/index.ts @@ -3,102 +3,107 @@ import App from "./App.vue"; import { _createI18n } from "../_js/i18n"; import { WorkflowAttachment } from "ChillMainAssets/types"; import { - create_attachment, - delete_attachment, - find_attachments_by_workflow, + create_attachment, + delete_attachment, + find_attachments_by_workflow, } from "ChillMainAssets/lib/workflow/attachments"; import { GenericDocForAccompanyingPeriod } from "ChillDocStoreAssets/types/generic_doc"; import ToastPlugin from "vue-toast-notification"; import "vue-toast-notification/dist/theme-bootstrap.css"; window.addEventListener("DOMContentLoaded", () => { - const attachments = document.querySelectorAll( - 'div[data-app="workflow_attachments"]', - ); - - attachments.forEach(async (el) => { - const workflowId = parseInt(el.dataset.entityWorkflowId || ""); - const accompanyingPeriodId = parseInt( - el.dataset.relatedAccompanyingPeriodId || "", + const attachments = document.querySelectorAll( + 'div[data-app="workflow_attachments"]', ); - const attachments = await find_attachments_by_workflow(workflowId); - const app = createApp({ - template: - '', - components: { App }, - data: function () { - return { workflowId, accompanyingPeriodId, attachments }; - }, - methods: { - onRemoveAttachment: async function ({ - attachment, - }: { - attachment: WorkflowAttachment; - }): Promise { - const index = this.$data.attachments.findIndex( - (el: WorkflowAttachment) => el.id === attachment.id, - ); - if (-1 === index) { - console.warn( - "this attachment is not associated with the workflow", - attachment, - ); - this.$toast.error( - "This attachment is not associated with the workflow", - ); - return; - } + attachments.forEach(async (el) => { + const workflowId = parseInt(el.dataset.entityWorkflowId || ""); + const accompanyingPeriodId = parseInt( + el.dataset.relatedAccompanyingPeriodId || "", + ); + const attachments = await find_attachments_by_workflow(workflowId); - try { - await delete_attachment(attachment); - } catch (error) { - console.error(error); - this.$toast.error("Error while removing element"); - throw error; - } - this.$data.attachments.splice(index, 1); - this.$toast.success("Pièce jointe supprimée"); - }, - onPickGenericDoc: async function ({ - genericDoc, - }: { - genericDoc: GenericDocForAccompanyingPeriod; - }): Promise { - console.log("picked generic doc", genericDoc); + const app = createApp({ + template: + '', + components: { App }, + data: function () { + return { workflowId, accompanyingPeriodId, attachments }; + }, + methods: { + onRemoveAttachment: async function ({ + attachment, + }: { + attachment: WorkflowAttachment; + }): Promise { + const index = this.$data.attachments.findIndex( + (el: WorkflowAttachment) => el.id === attachment.id, + ); + if (-1 === index) { + console.warn( + "this attachment is not associated with the workflow", + attachment, + ); + this.$toast.error( + "This attachment is not associated with the workflow", + ); + return; + } - // prevent to create double attachment: - if ( - -1 !== - this.$data.attachments.findIndex( - (el: WorkflowAttachment) => - el.genericDoc?.key === genericDoc.key && - JSON.stringify(el.genericDoc?.identifiers) == - JSON.stringify(genericDoc.identifiers), - ) - ) { - console.warn( - "this document is already attached to the workflow", - genericDoc, - ); - this.$toast.error("Ce document est déjà attaché au workflow"); - return; - } + try { + await delete_attachment(attachment); + } catch (error) { + console.error(error); + this.$toast.error("Error while removing element"); + throw error; + } + this.$data.attachments.splice(index, 1); + this.$toast.success("Pièce jointe supprimée"); + }, + onPickGenericDoc: async function ({ + genericDoc, + }: { + genericDoc: GenericDocForAccompanyingPeriod; + }): Promise { + console.log("picked generic doc", genericDoc); - try { - const attachment = await create_attachment(workflowId, genericDoc); - this.$data.attachments.push(attachment); - } catch (error) { - console.error(error); - throw error; - } - }, - }, + // prevent to create double attachment: + if ( + -1 !== + this.$data.attachments.findIndex( + (el: WorkflowAttachment) => + el.genericDoc?.key === genericDoc.key && + JSON.stringify(el.genericDoc?.identifiers) == + JSON.stringify(genericDoc.identifiers), + ) + ) { + console.warn( + "this document is already attached to the workflow", + genericDoc, + ); + this.$toast.error( + "Ce document est déjà attaché au workflow", + ); + return; + } + + try { + const attachment = await create_attachment( + workflowId, + genericDoc, + ); + this.$data.attachments.push(attachment); + } catch (error) { + console.error(error); + throw error; + } + }, + }, + }); + const i18n = _createI18n({}); + app.use(i18n); + app.use(ToastPlugin); + + app.mount(el); }); - const i18n = _createI18n({}); - app.use(i18n); - app.use(ToastPlugin); - - app.mount(el); - }); }); diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/AddressDetailsButton.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/AddressDetailsButton.vue index eb26ff738..e5838089e 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/AddressDetailsButton.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/AddressDetailsButton.vue @@ -1,23 +1,23 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/AddressDetailsContent.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/AddressDetailsContent.vue index 46ec986aa..41bb00025 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/AddressDetailsContent.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/AddressDetailsContent.vue @@ -1,16 +1,16 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/AddressModal.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/AddressModal.vue index 96e32ba04..7c00066be 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/AddressModal.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/AddressModal.vue @@ -1,17 +1,17 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/Parts/AddressDetailsGeographicalLayers.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/Parts/AddressDetailsGeographicalLayers.vue index e740cce17..c104df1dc 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/Parts/AddressDetailsGeographicalLayers.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/Parts/AddressDetailsGeographicalLayers.vue @@ -1,59 +1,59 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/Parts/AddressDetailsMap.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/Parts/AddressDetailsMap.vue index e3503c9e4..3fe075fcc 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/Parts/AddressDetailsMap.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/Parts/AddressDetailsMap.vue @@ -1,17 +1,20 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/Parts/AddressDetailsRefMatching.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/Parts/AddressDetailsRefMatching.vue index 43dea5d4b..c3d421411 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/Parts/AddressDetailsRefMatching.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/Parts/AddressDetailsRefMatching.vue @@ -1,124 +1,140 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/BadgeEntity.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/BadgeEntity.vue index b74b64054..1c5d2b6da 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/BadgeEntity.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/BadgeEntity.vue @@ -1,63 +1,66 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/CommentEditor/CommentEditor.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/CommentEditor/CommentEditor.vue index 97242ffa2..d6019fabe 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/CommentEditor/CommentEditor.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/CommentEditor/CommentEditor.vue @@ -4,9 +4,9 @@ import { Ckeditor } from "@ckeditor/ckeditor5-vue"; import { ClassicEditor } from "ckeditor5"; import classicEditorConfig from "ChillMainAssets/module/ckeditor5/editor_config"; import { - trans, - EDITOR_SWITCH_TO_SIMPLE, - EDITOR_SWITCH_TO_COMPLEX, + trans, + EDITOR_SWITCH_TO_SIMPLE, + EDITOR_SWITCH_TO_COMPLEX, } from "translator"; const EDITOR_MODE_KEY = "editorMode"; @@ -16,101 +16,107 @@ const value = defineModel({ required: true }); const isSimple = computed(() => kind.value === "simple"); const toggleButtonClass = computed(() => { - return { - ["toggle-button"]: true, - onEditor: !isSimple.value, - onSimple: isSimple.value, - }; + return { + ["toggle-button"]: true, + onEditor: !isSimple.value, + onSimple: isSimple.value, + }; }); const toggleEditor = () => { - let newValue; + let newValue; - newValue = kind.value === "simple" ? "rich" : "simple"; - kind.value = "rich"; - window.localStorage.setItem(EDITOR_MODE_KEY, newValue); + newValue = kind.value === "simple" ? "rich" : "simple"; + kind.value = "rich"; + window.localStorage.setItem(EDITOR_MODE_KEY, newValue); - window.dispatchEvent(new Event("toggleEditorKind")); + window.dispatchEvent(new Event("toggleEditorKind")); }; const onKindChange = function (/* event: StorageEvent | Event */) { - const newValue = window.localStorage.getItem(EDITOR_MODE_KEY); + const newValue = window.localStorage.getItem(EDITOR_MODE_KEY); - if (null === newValue || !(newValue === "rich" || newValue === "simple")) { - throw "invalid new value: " + newValue; - } + if (null === newValue || !(newValue === "rich" || newValue === "simple")) { + throw "invalid new value: " + newValue; + } - if (kind.value !== newValue) { - kind.value = newValue; - } + if (kind.value !== newValue) { + kind.value = newValue; + } }; onMounted(function () { - const storage = window.localStorage; - const savedKind = storage.getItem(EDITOR_MODE_KEY); + const storage = window.localStorage; + const savedKind = storage.getItem(EDITOR_MODE_KEY); - if (null !== kind.value && (savedKind === "simple" || savedKind === "rich")) { - kind.value = savedKind; - } + if ( + null !== kind.value && + (savedKind === "simple" || savedKind === "rich") + ) { + kind.value = savedKind; + } - window.addEventListener("storage", onKindChange); - window.addEventListener("toggleEditorKind", onKindChange); + window.addEventListener("storage", onKindChange); + window.addEventListener("toggleEditorKind", onKindChange); }); onUnmounted(function () { - window.removeEventListener("storage", onKindChange); - window.removeEventListener("toggleEditorKind", onKindChange); + window.removeEventListener("storage", onKindChange); + window.removeEventListener("toggleEditorKind", onKindChange); }); diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Confidential.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Confidential.vue index 9c010e8d1..13459b390 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Confidential.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Confidential.vue @@ -1,40 +1,40 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Entity/AddressRenderBox.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Entity/AddressRenderBox.vue index 7085b3b18..86f4155b6 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Entity/AddressRenderBox.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Entity/AddressRenderBox.vue @@ -1,77 +1,83 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Entity/GenderIconRenderBox.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Entity/GenderIconRenderBox.vue index 794771014..d47b9b777 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Entity/GenderIconRenderBox.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Entity/GenderIconRenderBox.vue @@ -1,28 +1,9 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Entity/UserGroupRenderBox.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Entity/UserGroupRenderBox.vue index 81f836c62..7c37e98a9 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Entity/UserGroupRenderBox.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Entity/UserGroupRenderBox.vue @@ -4,23 +4,23 @@ import { computed } from "vue"; import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper"; interface UserGroupRenderBoxProps { - userGroup: UserGroup; + userGroup: UserGroup; } const props = defineProps(); const styles = computed<{ color: string; "background-color": string }>(() => { - return { - color: props.userGroup.foregroundColor, - "background-color": props.userGroup.backgroundColor, - }; + return { + color: props.userGroup.foregroundColor, + "background-color": props.userGroup.backgroundColor, + }; }); diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Entity/UserRenderBoxBadge.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Entity/UserRenderBoxBadge.vue index 4bae3b541..63c43c37f 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Entity/UserRenderBoxBadge.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Entity/UserRenderBoxBadge.vue @@ -1,31 +1,31 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/EntityWorkflowVueSubscriber.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/EntityWorkflowVueSubscriber.vue index 4d817a2f9..332849ef5 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/EntityWorkflowVueSubscriber.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/EntityWorkflowVueSubscriber.vue @@ -1,83 +1,83 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/ListWorkflowModal.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/ListWorkflowModal.vue index 658c0f9e9..59dcd80f4 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/ListWorkflowModal.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/ListWorkflowModal.vue @@ -1,45 +1,49 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Modal.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Modal.vue index 4808e2bda..06e1bfa1a 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Modal.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Modal.vue @@ -1,39 +1,42 @@ @@ -79,17 +73,17 @@ const emits = defineEmits<{ * This is a mask behind the modal. */ .modal-mask { - position: fixed; - z-index: 9998; - top: 0; - left: 0; - width: 100%; - height: 100%; - background-color: rgba(0, 0, 0, 0.75); - transition: opacity 0.3s ease; + position: fixed; + z-index: 9998; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.75); + transition: opacity 0.3s ease; } .modal-header .close { - border-top-right-radius: 0.3rem; + border-top-right-radius: 0.3rem; } /* * The following styles are auto-applied to elements with @@ -100,23 +94,23 @@ const emits = defineEmits<{ * these styles. */ .modal-enter { - opacity: 0; + opacity: 0; } .modal-leave-active { - opacity: 0; + opacity: 0; } .modal-enter .modal-container, .modal-leave-active .modal-container { - -webkit-transform: scale(1.1); - transform: scale(1.1); + -webkit-transform: scale(1.1); + transform: scale(1.1); } h3.modal-title { - font-size: 1.5rem; - font-weight: bold; + font-size: 1.5rem; + font-weight: bold; } div.modal-footer { - button:first-child { - margin-right: auto; - } + button:first-child { + margin-right: auto; + } } diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Notification/NotificationReadAllToggle.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Notification/NotificationReadAllToggle.vue index bb7a43c92..57f7fd7f8 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Notification/NotificationReadAllToggle.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Notification/NotificationReadAllToggle.vue @@ -1,17 +1,17 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Notification/NotificationReadToggle.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Notification/NotificationReadToggle.vue index fb94af80f..cc64d4835 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Notification/NotificationReadToggle.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Notification/NotificationReadToggle.vue @@ -1,96 +1,96 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.ts b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.ts index cbee6bf25..db9a37104 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.ts +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.ts @@ -2,86 +2,87 @@ import { createI18n } from "vue-i18n"; import datetimeFormats from "../i18n/datetimeFormats"; const messages = { - fr: { - action: { - actions: "Actions", - show: "Voir", - edit: "Modifier", - create: "Créer", - remove: "Enlever", - delete: "Supprimer", - save: "Enregistrer", - valid: "Valider", - valid_and_see: "Valider et voir", - add: "Ajouter", - show_modal: "Ouvrir une modale", - ok: "OK", - cancel: "Annuler", - close: "Fermer", - back: "Retour", - check_all: "cocher tout", - reset: "réinitialiser", - redirect: { - person: "Quitter la page et ouvrir la fiche de l'usager", - thirdparty: "Quitter la page et voir le tiers", - }, - refresh: "Rafraîchir", - addContact: "Ajouter un contact", + fr: { + action: { + actions: "Actions", + show: "Voir", + edit: "Modifier", + create: "Créer", + remove: "Enlever", + delete: "Supprimer", + save: "Enregistrer", + valid: "Valider", + valid_and_see: "Valider et voir", + add: "Ajouter", + show_modal: "Ouvrir une modale", + ok: "OK", + cancel: "Annuler", + close: "Fermer", + back: "Retour", + check_all: "cocher tout", + reset: "réinitialiser", + redirect: { + person: "Quitter la page et ouvrir la fiche de l'usager", + thirdparty: "Quitter la page et voir le tiers", + }, + refresh: "Rafraîchir", + addContact: "Ajouter un contact", + }, + nav: { + next: "Suivant", + previous: "Précédent", + top: "Haut", + bottom: "Bas", + }, + renderbox: { + person: "Usager", + birthday: { + man: "Né le", + woman: "Née le", + neutral: "Né·e le", + unknown: "Né·e le", + }, + deathdate: "Date de décès", + household_without_address: "Le ménage de l'usager est sans adresse", + no_data: "Aucune information renseignée", + type: { + thirdparty: "Tiers", + person: "Usager", + }, + holder: "Titulaire", + years_old: "1 an | {n} an | {n} ans", + residential_address: "Adresse de résidence", + located_at: "réside chez", + }, }, - nav: { - next: "Suivant", - previous: "Précédent", - top: "Haut", - bottom: "Bas", - }, - renderbox: { - person: "Usager", - birthday: { - man: "Né le", - woman: "Née le", - neutral: "Né·e le", - unknown: "Né·e le", - }, - deathdate: "Date de décès", - household_without_address: "Le ménage de l'usager est sans adresse", - no_data: "Aucune information renseignée", - type: { - thirdparty: "Tiers", - person: "Usager", - }, - holder: "Titulaire", - years_old: "1 an | {n} an | {n} ans", - residential_address: "Adresse de résidence", - located_at: "réside chez", - }, - }, }; const _createI18n = (appMessages: any, legacy?: boolean) => { - Object.assign(messages.fr, appMessages.fr); - return createI18n({ - legacy: typeof legacy === undefined ? true : legacy, - locale: "fr", - fallbackLocale: "fr", - // @ts-ignore - datetimeFormats, - messages, - }); + Object.assign(messages.fr, appMessages.fr); + return createI18n({ + legacy: typeof legacy === undefined ? true : legacy, + locale: "fr", + fallbackLocale: "fr", + // @ts-ignore + datetimeFormats, + messages, + }); }; export { _createI18n }; export const multiSelectMessages = { - fr: { - multiselect: { - placeholder: "Choisir", - tag_placeholder: "Créer un nouvel élément", - select_label: '"Entrée" ou cliquez pour sélectionner', - deselect_label: '"Entrée" ou cliquez pour désélectionner', - select_group_label: 'Appuyer sur "Entrée" pour sélectionner ce groupe', - deselect_group_label: - 'Appuyer sur "Entrée" pour désélectionner ce groupe', - selected_label: "Sélectionné", + fr: { + multiselect: { + placeholder: "Choisir", + tag_placeholder: "Créer un nouvel élément", + select_label: '"Entrée" ou cliquez pour sélectionner', + deselect_label: '"Entrée" ou cliquez pour désélectionner', + select_group_label: + 'Appuyer sur "Entrée" pour sélectionner ce groupe', + deselect_group_label: + 'Appuyer sur "Entrée" pour désélectionner ce groupe', + selected_label: "Sélectionné", + }, }, - }, }; diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/i18n/datetimeFormats.ts b/src/Bundle/ChillMainBundle/Resources/public/vuejs/i18n/datetimeFormats.ts index aca1328ac..fe20cb217 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/i18n/datetimeFormats.ts +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/i18n/datetimeFormats.ts @@ -1,27 +1,27 @@ export default { - fr: { - short: { - year: "numeric", - month: "numeric", - day: "numeric", + fr: { + short: { + year: "numeric", + month: "numeric", + day: "numeric", + }, + text: { + year: "numeric", + month: "long", + day: "numeric", + }, + long: { + year: "numeric", + month: "numeric", + day: "numeric", + hour: "numeric", + minute: "numeric", + hour12: false, + }, + hoursOnly: { + hour: "numeric", + minute: "numeric", + hour12: false, + }, }, - text: { - year: "numeric", - month: "long", - day: "numeric", - }, - long: { - year: "numeric", - month: "numeric", - day: "numeric", - hour: "numeric", - minute: "numeric", - hour12: false, - }, - hoursOnly: { - hour: "numeric", - minute: "numeric", - hour12: false, - }, - }, }; diff --git a/src/Bundle/ChillMainBundle/Resources/views/layout.html.twig b/src/Bundle/ChillMainBundle/Resources/views/layout.html.twig index d92f2e260..30f84c855 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/layout.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/layout.html.twig @@ -69,37 +69,35 @@ {% endif %} - {% block wrapping_content %} - {% block content %} - - {# DISABLED {{ chill_widget('homepage', {} ) }} #} + {# DISABLED {{ chill_widget('homepage', {} ) }} #} - {% include '@ChillMain/Homepage/index.html.twig' %} + {% include '@ChillMain/Homepage/index.html.twig' %} - {% endblock %} {% endblock %} diff --git a/src/Bundle/ChillMainBundle/Tests/Phonenumber/PhonenumberHelperTest.php b/src/Bundle/ChillMainBundle/Tests/Phonenumber/PhonenumberHelperTest.php index cae0cdd48..182980dd0 100644 --- a/src/Bundle/ChillMainBundle/Tests/Phonenumber/PhonenumberHelperTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Phonenumber/PhonenumberHelperTest.php @@ -12,7 +12,6 @@ declare(strict_types=1); namespace Chill\MainBundle\Tests\Phonenumber; use Chill\MainBundle\Phonenumber\PhonenumberHelper; -use libphonenumber\PhoneNumber; use libphonenumber\PhoneNumberUtil; use Psr\Log\NullLogger; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; @@ -32,7 +31,6 @@ final class PhonenumberHelperTest extends KernelTestCase public function testFormatPhonenumbers(string $defaultCarrierCode, string $phoneNumber, string $expected) { $util = PhoneNumberUtil::getInstance(); - $subject = new PhonenumberHelper( new ArrayAdapter(), new ParameterBag([ @@ -72,47 +70,4 @@ final class PhonenumberHelperTest extends KernelTestCase '00 33 6 23 12 45 54', ]; } - - /** - * @dataProvider providePhoneNumbersToParse - */ - public function testParsePhonenumbers(string $defaultCarrierCode, string $phoneNumber, PhoneNumber $expected): void - { - $subject = new PhonenumberHelper( - new ArrayAdapter(), - new ParameterBag([ - 'chill_main.phone_helper' => [ - 'default_carrier_code' => $defaultCarrierCode, - ], - ]), - new NullLogger() - ); - - $actual = $subject->parse($phoneNumber); - - self::assertTrue($expected->equals($actual)); - } - - public static function providePhoneNumbersToParse(): iterable - { - $util = PhoneNumberUtil::getInstance(); - - yield [ - 'FR', - '+32486544999', - $util->parse('+32486544999', 'FR'), - ]; - - yield [ - 'FR', - '32486544999', - $util->parse('+32486544999', 'FR'), - ]; - - yield [ - 'FR', - '0228858040', - $util->parse('+33228858040', 'FR'), - ]; - } } diff --git a/src/Bundle/ChillMainBundle/Tests/Validation/Validator/UserGroupDoNotExcludeTest.php b/src/Bundle/ChillMainBundle/Tests/Validation/Validator/UserGroupDoNotExcludeTest.php deleted file mode 100644 index d6d1c9887..000000000 --- a/src/Bundle/ChillMainBundle/Tests/Validation/Validator/UserGroupDoNotExcludeTest.php +++ /dev/null @@ -1,91 +0,0 @@ -validator->validate([], new \Chill\MainBundle\Validation\Constraint\UserGroupDoNotExclude()); - - $this->assertNoViolation(); - } - - public function testMixedUserGroupAndUsersIsValid(): void - { - $this->validator->validate( - [new User(), new UserGroup()], - new \Chill\MainBundle\Validation\Constraint\UserGroupDoNotExclude() - ); - - $this->assertNoViolation(); - } - - public function testDifferentExcludeKeysIsValid(): void - { - $this->validator->validate( - [(new UserGroup())->setExcludeKey('A'), (new UserGroup())->setExcludeKey('B')], - new \Chill\MainBundle\Validation\Constraint\UserGroupDoNotExclude() - ); - - $this->assertNoViolation(); - } - - public function testMultipleGroupsWithEmptyExcludeKeyIsValid(): void - { - $this->validator->validate( - [(new UserGroup())->setExcludeKey(''), (new UserGroup())->setExcludeKey('')], - new \Chill\MainBundle\Validation\Constraint\UserGroupDoNotExclude() - ); - - $this->assertNoViolation(); - } - - public function testSameExclusionKeyWillRaiseError(): void - { - $this->validator->validate( - [ - (new UserGroup())->setExcludeKey('A')->setLabel(['fr' => 'Group 1']), - (new UserGroup())->setExcludeKey('A')->setLabel(['fr' => 'Group 2']), - ], - new \Chill\MainBundle\Validation\Constraint\UserGroupDoNotExclude() - ); - - $this->buildViolation('The groups {{ excluded_groups }} do exclude themselves. Please choose one between them') - ->setParameter('excluded_groups', 'Group 1, Group 2') - ->setCode('e16c8226-0090-11ef-8560-f7239594db09') - ->assertRaised(); - } -} diff --git a/src/Bundle/ChillMainBundle/chill.api.specs.yaml b/src/Bundle/ChillMainBundle/chill.api.specs.yaml index 047f69675..d87a0eb71 100644 --- a/src/Bundle/ChillMainBundle/chill.api.specs.yaml +++ b/src/Bundle/ChillMainBundle/chill.api.specs.yaml @@ -10,31 +10,6 @@ servers: components: schemas: - Collection: - type: object - properties: - count: - type: number - format: u64 - pagination: - type: object - properties: - first: - type: number - format: u64 - items_per_page: - type: number - format: u64 - next: - type: string - format: uri - nullable: true - previous: - type: string - format: uri - nullable: true - more: - type: boolean EntityWorkflowAttachment: type: object properties: diff --git a/src/Bundle/ChillMainBundle/translations/messages+intl-icu.fr.yaml b/src/Bundle/ChillMainBundle/translations/messages+intl-icu.fr.yaml index 0d1b30ef8..2982d94db 100644 --- a/src/Bundle/ChillMainBundle/translations/messages+intl-icu.fr.yaml +++ b/src/Bundle/ChillMainBundle/translations/messages+intl-icu.fr.yaml @@ -130,58 +130,3 @@ filter_order: Search: Chercher dans la liste By date: Filtrer par date search_box: Filtrer par contenu -renderbox: - person: "Usager" - birthday: - man: "Né le" - woman: "Née le" - neutral: "Né·e le" - unknown: "Né·e le" - deathdate: "Date de décès" - household_without_address: "Le ménage de l'usager est sans adresse" - no_data: "Aucune information renseignée" - type: - thirdparty: "Tiers" - person: "Usager" - holder: "Titulaire" - years_old: >- - {n, plural, - =0 {0 an} - one {1 an} - other {# ans} - } - residential_address: "Adresse de résidence" - located_at: "réside chez" - household_number: "Ménage n°{number}" - current_members: "Membres actuels" - no_current_address: "Sans adresse actuellement" - new_household: "Nouveau ménage" - no_members_yet: "Aucun membre actuellement" - -pick_entity: - add: "Ajouter" - modal_title: >- - {count, plural, - one {Indiquer un} - other {Ajouter des} - } - user: >- - {count, plural, - one {Utilisateur} - other {Utilisateurs} - } - user_group: >- - {count, plural, - one {Groupe d'utilisateur} - other {Groupes d'utilisateurs} - } - person: >- - {count, plural, - one {Usager} - other {Usagers} - } - thirdparty: >- - {count, plural, - one {Tiers} - other {Tiers} - } diff --git a/src/Bundle/ChillMainBundle/translations/messages.fr.yml b/src/Bundle/ChillMainBundle/translations/messages.fr.yml index 5e591fba8..d3498cba9 100644 --- a/src/Bundle/ChillMainBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillMainBundle/translations/messages.fr.yml @@ -941,34 +941,3 @@ multiselect: editor: switch_to_simple: Éditeur simple switch_to_complex: Éditeur riche -action: - actions: Actions - show: Voir - edit: Modifier - create: Créer - remove: Enlever - delete: Supprimer - save: Enregistrer - valid: Valider - valid_and_see: Valider et voir - add: Ajouter - show_modal: Ouvrir une modale - ok: OK - cancel: Annuler - close: Fermer - back: Retour - check_all: cocher tout - reset: réinitialiser - redirect: - person: Quitter la page et ouvrir la fiche de l'usager - thirdparty: Quitter la page et voir le tiers - refresh: Rafraîchir - addContact: Ajouter un contact - -nav: - next: "Suivant" - previous: "Précédent" - top: "Haut" - bottom: "Bas" - - diff --git a/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepository.php b/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepository.php index 0d972914d..686022ca3 100644 --- a/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepository.php @@ -21,8 +21,6 @@ use Chill\PersonBundle\Security\Authorization\PersonVoter; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\NonUniqueResultException; use Doctrine\ORM\Query; -use libphonenumber\PhoneNumber; -use libphonenumber\PhoneNumberFormat; use Symfony\Component\Security\Core\Security; final readonly class PersonACLAwareRepository implements PersonACLAwareRepositoryInterface @@ -300,27 +298,4 @@ final readonly class PersonACLAwareRepository implements PersonACLAwareRepositor \array_map(static fn (Center $c) => $c->getId(), $authorizedCenters) ); } - - public function findByPhone(PhoneNumber $phoneNumber, int $start = 0, int $limit = 20): array - { - $authorizedCenters = $this->authorizationHelper - ->getReachableCenters($this->security->getUser(), PersonVoter::SEE); - - if ([] === $authorizedCenters) { - return []; - } - - $util = \libphonenumber\PhoneNumberUtil::getInstance(); - - return $this->em->createQuery( - 'SELECT p FROM '.Person::class.' p LEFT JOIN p.otherPhoneNumbers opn JOIN p.centerCurrent pcc '. - 'WHERE (p.phonenumber LIKE :phone OR p.mobilenumber LIKE :phone OR opn.phonenumber LIKE :phone) '. - 'AND pcc.center IN (:centers)' - ) - ->setMaxResults($limit) - ->setFirstResult($start) - ->setParameter('phone', $util->format($phoneNumber, PhoneNumberFormat::E164)) - ->setParameter('centers', $authorizedCenters) - ->getResult(); - } } diff --git a/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepositoryInterface.php b/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepositoryInterface.php index aeaefecd4..50fdcd4b3 100644 --- a/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepositoryInterface.php +++ b/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepositoryInterface.php @@ -13,7 +13,6 @@ namespace Chill\PersonBundle\Repository; use Chill\MainBundle\Search\SearchApiQuery; use Chill\PersonBundle\Entity\Person; -use libphonenumber\PhoneNumber; interface PersonACLAwareRepositoryInterface { @@ -61,13 +60,4 @@ interface PersonACLAwareRepositoryInterface ?string $phonenumber = null, ?string $city = null, ): array; - - /** - * @return list - */ - public function findByPhone( - PhoneNumber $phoneNumber, - int $start = 0, - int $limit = 20, - ): array; } diff --git a/src/Bundle/ChillPersonBundle/Repository/PersonRepository.php b/src/Bundle/ChillPersonBundle/Repository/PersonRepository.php index 8d5e244ea..6d6373999 100644 --- a/src/Bundle/ChillPersonBundle/Repository/PersonRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/PersonRepository.php @@ -12,12 +12,10 @@ declare(strict_types=1); namespace Chill\PersonBundle\Repository; use Chill\PersonBundle\Entity\Person; -use Chill\PersonBundle\Entity\PersonPhone; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; use Doctrine\ORM\QueryBuilder; use Doctrine\Persistence\ObjectRepository; -use libphonenumber\PhoneNumber; class PersonRepository implements ObjectRepository { @@ -31,8 +29,6 @@ class PersonRepository implements ObjectRepository /** * @throws \Doctrine\ORM\NoResultException * @throws \Doctrine\ORM\NonUniqueResultException - * - * @deprecated */ public function countByPhone( string $phonenumber, @@ -75,8 +71,6 @@ class PersonRepository implements ObjectRepository /** * @throws \Exception - * - * @deprecated Use @see{self::findByPhoneNumber} or use a dedicated method in PersonACLAwareRepository */ public function findByPhone( string $phonenumber, @@ -97,25 +91,6 @@ class PersonRepository implements ObjectRepository return $qb->getQuery()->getResult(); } - /** - * Find a person which is associated to the given phonenumber, without restrictions - * on any. - * - * @return list - */ - public function findByPhoneNumber(PhoneNumber $phoneNumber, int $firstResult = 0, int $maxResults = 50): array - { - $qb = $this->repository->createQueryBuilder('p'); - $qb->select('p'); - - $this->searchByPhoneNumbers($qb, $phoneNumber); - - $qb->setFirstResult($firstResult) - ->setMaxResults($maxResults); - - return $qb->getQuery()->getResult(); - } - public function findOneBy(array $criteria) { return $this->repository->findOneBy($criteria); @@ -134,20 +109,6 @@ class PersonRepository implements ObjectRepository } } - private function searchByPhoneNumbers(QueryBuilder $qb, PhoneNumber $phoneNumber): void - { - $qb->setParameter('number', $phoneNumber, 'phone_number'); - - $orX = $qb->expr()->orX(); - $orX->add($qb->expr()->eq('p.mobilenumber', ':number')); - $orX->add($qb->expr()->eq('p.phonenumber', ':number')); - $orX->add( - $qb->expr()->exists('SELECT 1 FROM '.PersonPhone::class.' k WHERE k.phonenumber = :number AND k.person = p') - ); - - $qb->andWhere($orX); - } - /** * @throws \Exception */ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/mod/DuplicateSelector/AccompanyingPeriodWorkSelector.ts b/src/Bundle/ChillPersonBundle/Resources/public/mod/DuplicateSelector/AccompanyingPeriodWorkSelector.ts index 6ceb64b98..8f117d6ef 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/mod/DuplicateSelector/AccompanyingPeriodWorkSelector.ts +++ b/src/Bundle/ChillPersonBundle/Resources/public/mod/DuplicateSelector/AccompanyingPeriodWorkSelector.ts @@ -3,47 +3,49 @@ import AccompanyingPeriodWorkSelectorModal from "../../vuejs/_components/Accompa import { AccompanyingPeriodWork } from "../../types"; document.addEventListener("DOMContentLoaded", () => { - const elements = document.querySelectorAll( - 'div[data-pick-entities-type="acpw"]', - ); - elements.forEach((el) => { - const uniqid = el.dataset.inputUniqid; - - if (undefined === uniqid) { - throw "Uniqid not found on this element"; - } - - const input = document.querySelector( - `input[data-input-uniqid="${uniqid}"]`, + const elements = document.querySelectorAll( + 'div[data-pick-entities-type="acpw"]', ); + elements.forEach((el) => { + const uniqid = el.dataset.inputUniqid; - if (null === input) { - throw "Element with uniqid not found: " + uniqid; - } + if (undefined === uniqid) { + throw "Uniqid not found on this element"; + } - const accompanyingPeriodIdAsString = input.dataset.accompanyingPeriodId; + const input = document.querySelector( + `input[data-input-uniqid="${uniqid}"]`, + ); - if (undefined === accompanyingPeriodIdAsString) { - throw "accompanying period id not found"; - } + if (null === input) { + throw "Element with uniqid not found: " + uniqid; + } - const accompanyingPeriodId = Number.parseInt(accompanyingPeriodIdAsString); + const accompanyingPeriodIdAsString = input.dataset.accompanyingPeriodId; - const app = createApp({ - template: - '', - components: { AccompanyingPeriodWorkSelectorModal }, - data() { - return { accompanyingPeriodId }; - }, - methods: { - pickWork: function (payload: { work: AccompanyingPeriodWork }) { - console.log("payload", payload); - input.value = payload.work.id.toString(); - }, - }, + if (undefined === accompanyingPeriodIdAsString) { + throw "accompanying period id not found"; + } + + const accompanyingPeriodId = Number.parseInt( + accompanyingPeriodIdAsString, + ); + + const app = createApp({ + template: + '', + components: { AccompanyingPeriodWorkSelectorModal }, + data() { + return { accompanyingPeriodId }; + }, + methods: { + pickWork: function (payload: { work: AccompanyingPeriodWork }) { + console.log("payload", payload); + input.value = payload.work.id.toString(); + }, + }, + }); + + app.mount(el); }); - - app.mount(el); - }); }); diff --git a/src/Bundle/ChillPersonBundle/Resources/public/types.ts b/src/Bundle/ChillPersonBundle/Resources/public/types.ts index 32dc24f73..7d641c859 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/types.ts +++ b/src/Bundle/ChillPersonBundle/Resources/public/types.ts @@ -1,329 +1,253 @@ import { - Address, - Center, - Civility, - DateTime, - User, - UserGroup, - Household, - WorkflowAvailable, - Scope, - Job, - PrivateCommentEmbeddable, + Address, + Scope, + Center, + Civility, + DateTime, + User, + WorkflowAvailable, + Job, + PrivateCommentEmbeddable, } from "ChillMainAssets/types"; import { StoredObject } from "ChillDocStoreAssets/types"; import { Thirdparty } from "../../../ChillThirdPartyBundle/Resources/public/types"; import { Calendar } from "../../../ChillCalendarBundle/Resources/public/types"; -export interface AltName { - label: string; - key: string; -} - export interface Person { - id: number; - type: "person"; - text: string; - textAge: string; - firstName: string; - lastName: string; - altNames: AltName[]; - suffixText: string; - current_household_address: Address | null; - birthdate: DateTime | null; - deathdate: DateTime | null; - age: number; - phonenumber: string; - mobilenumber: string; - email: string; - gender: "woman" | "man" | "other"; - centers: Center[]; - civility: Civility | null; - current_household_id: number; - current_residential_addresses: Address[]; + id: number; + type: "person"; + text: string; + textAge: string; + firstName: string; + lastName: string; + current_household_address: Address | null; + birthdate: DateTime | null; + deathdate: DateTime | null; + age: number; + phonenumber: string; + mobilenumber: string; + email: string; + gender: "woman" | "man" | "other"; + centers: Center[]; + civility: Civility | null; + current_household_id: number; + current_residential_addresses: Address[]; } export interface AccompanyingPeriod { - id: number; - addressLocation?: Address | null; - administrativeLocation?: Location | null; - calendars: Calendar[]; - closingDate?: Date | null; - closingMotive?: ClosingMotive | null; - comments: Comment[]; - confidential: boolean; - createdAt?: Date | null; - createdBy?: User | null; - emergency: boolean; - intensity?: "occasional" | "regular"; - job?: Job | null; - locationHistories: AccompanyingPeriodLocationHistory[]; - openingDate?: Date | null; - origin?: Origin | null; - participations: AccompanyingPeriodParticipation[]; - personLocation?: Person | null; - pinnedComment?: Comment | null; - preventUserIsChangedNotification: boolean; - remark: string; - requestorAnonymous: boolean; - requestorPerson?: Person | null; - requestorThirdParty?: Thirdparty | null; - resources: AccompanyingPeriodResource[]; - scopes: Scope[]; - socialIssues: SocialIssue[]; - step?: - | "CLOSED" - | "CONFIRMED" - | "CONFIRMED_INACTIVE_SHORT" - | "CONFIRMED_INACTIVE_LONG" - | "DRAFT"; -} - -export interface AccompanyingPeriodWork { - id: number; - accompanyingPeriod?: AccompanyingPeriod; - accompanyingPeriodWorkEvaluations: AccompanyingPeriodWorkEvaluation[]; - createdAt?: string; - createdAutomatically: boolean; - createdAutomaticallyReason: string; - createdBy: User; - endDate?: string; - goals: AccompanyingPeriodWorkGoal[]; - handlingThierParty?: Thirdparty; - note: string; - persons: Person[]; - privateComment: PrivateCommentEmbeddable; - referrersHistory: AccompanyingPeriodWorkReferrerHistory[]; - results: Result[]; - socialAction?: SocialAction; - startDate?: string; - thirdParties: Thirdparty[]; - updatedAt?: string; - updatedBy: User; - version: number; -} - -export interface SocialAction { - id: number; - parent?: SocialAction | null; - children: SocialAction[]; - issue?: SocialIssue | null; - ordering: number; - title: { - fr: string; - }; - defaultNotificationDelay?: string | null; - desactivationDate?: string | null; - evaluations: Evaluation[]; - goals: Goal[]; - results: Result[]; -} - -export interface AccompanyingPeriodResource { - id: number; - accompanyingPeriod: AccompanyingPeriod; - comment?: string | null; - person?: Person | null; - thirdParty?: Thirdparty | null; -} - -export interface Origin { - id: number; - label: { - fr: string; - }; - noActiveAfter: DateTime; -} - -export interface ClosingMotive { - id: number; - active: boolean; - name: { - fr: string; - }; - ordering: number; - isCanceledAccompanyingPeriod: boolean; - parent?: ClosingMotive | null; - children: ClosingMotive[]; -} - -export interface AccompanyingPeriodParticipation { - id: number; - startDate: DateTime; - endDate?: DateTime | null; - accompanyingPeriod: AccompanyingPeriod; - person: Person; -} - -export interface AccompanyingPeriodLocationHistory { - id: number; - startDate: DateTime; - endDate?: DateTime | null; - addressLocation?: Address | null; - period: AccompanyingPeriod; - personLocation?: Person | null; -} - -export interface SocialIssue { - id: number; - parent?: SocialIssue | null; - children: SocialIssue[]; - socialActions?: SocialAction[] | null; - ordering: number; - title: { - fr: string; - }; - desactivationDate?: string | null; -} - -export interface Goal { - id: number; - results: Result[]; - socialActions?: SocialAction[] | null; - title: { - fr: string; - }; -} - -export interface Result { - id: number; - accompanyingPeriodWorks: AccompanyingPeriodWork[]; - accompanyingPeriodWorkGoals: AccompanyingPeriodWorkGoal[]; - goals: Goal[]; - socialActions: SocialAction[]; - title: { - fr: string; - }; - desactivationDate?: string | null; -} - -export interface AccompanyingPeriodWorkGoal { - id: number; - accompanyingPeriodWork: AccompanyingPeriodWork; - goal: Goal; - note: string; - results: Result[]; -} - -export interface AccompanyingPeriodWorkEvaluation { - accompanyingPeriodWork: AccompanyingPeriodWork | null; - comment: string; - createdAt: DateTime | null; - createdBy: User | null; - documents: AccompanyingPeriodWorkEvaluationDocument[]; - endDate: DateTime | null; - evaluation: Evaluation | null; - id: number | null; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - key: any; - maxDate: DateTime | null; - startDate: DateTime | null; - updatedAt: DateTime | null; - updatedBy: User | null; - warningInterval: string | null; - timeSpent: number | null; -} - -export interface Evaluation { - id: number; - url: string; - socialActions: SocialAction[]; - title: { - fr: string; - }; - active: boolean; - delay: string; - notificationDelay: string; -} - -export interface AccompanyingPeriodWorkReferrerHistory { - id: number; - accompanyingPeriodWork: AccompanyingPeriodWork; - user: User; - startDate: DateTime; - endDate: DateTime | null; - createdAt: DateTime; - updatedAt: DateTime | null; - createdBy: User; - updatedBy: User | null; + id: number; + addressLocation?: Address | null; + administrativeLocation?: Location | null; + calendars: Calendar[]; + closingDate?: Date | null; + closingMotive?: ClosingMotive | null; + comments: Comment[]; + confidential: boolean; + createdAt?: Date | null; + createdBy?: User | null; + emergency: boolean; + intensity?: "occasional" | "regular"; + job?: Job | null; + locationHistories: AccompanyingPeriodLocationHistory[]; + openingDate?: Date | null; + origin?: Origin | null; + participations: AccompanyingPeriodParticipation[]; + personLocation?: Person | null; + pinnedComment?: Comment | null; + preventUserIsChangedNotification: boolean; + remark: string; + requestorAnonymous: boolean; + requestorPerson?: Person | null; + requestorThirdParty?: Thirdparty | null; + resources: AccompanyingPeriodResource[]; + scopes: Scope[]; + socialIssues: SocialIssue[]; + step?: + | "CLOSED" + | "CONFIRMED" + | "CONFIRMED_INACTIVE_SHORT" + | "CONFIRMED_INACTIVE_LONG" + | "DRAFT"; } export interface AccompanyingPeriodWorkEvaluationDocument { - id: number; - type: "accompanying_period_work_evaluation_document"; - storedObject: StoredObject; - title: string; - createdAt: DateTime | null; - createdBy: User | null; - updatedAt: DateTime | null; - updatedBy: User | null; - workflows_availables: WorkflowAvailable[]; - workflows: object[]; + id: number; + type: "accompanying_period_work_evaluation_document"; + storedObject: StoredObject; + title: string; + createdAt: DateTime | null; + createdBy: User | null; + updatedAt: DateTime | null; + updatedBy: User | null; + workflows_availables: WorkflowAvailable[]; + workflows: object[]; } -export type EntityType = - | "user_group" - | "user" - | "person" - | "thirdparty" - | "household"; - -export type Entities = (UserGroup | User | Person | Thirdparty | Household) & { - address?: Address | null; - kind?: string; - text?: string; - profession?: string; -}; - -export type EntitiesOrMe = "me" | Entities; - -export type AddPersonResult = Entities & { - parent?: Entities | null; -}; - -export interface Suggestion { - key: string; - relevance: number; - result: AddPersonResult; +export interface AccompanyingPeriodWork { + id: number; + accompanyingPeriod?: AccompanyingPeriod; + accompanyingPeriodWorkEvaluations: AccompanyingPeriodWorkEvaluation[]; + createdAt?: string; + createdAutomatically: boolean; + createdAutomaticallyReason: string; + createdBy: User; + endDate?: string; + goals: AccompanyingPeriodWorkGoal[]; + handlingThierParty?: Thirdparty; + note: string; + persons: Person[]; + privateComment: PrivateCommentEmbeddable; + referrersHistory: AccompanyingPeriodWorkReferrerHistory[]; + results: Result[]; + socialAction?: SocialAction; + startDate?: string; + thirdParties: Thirdparty[]; + updatedAt?: string; + updatedBy: User; + version: number; } -export interface SearchPagination { - first: number; - items_per_page: number; - next: number | null; - previous: number | null; - more: boolean; +interface SocialAction { + id: number; + parent?: SocialAction | null; + children: SocialAction[]; + issue?: SocialIssue | null; + ordering: number; + title: { + fr: string; + }; + defaultNotificationDelay?: string | null; + desactivationDate?: string | null; + evaluations: Evaluation[]; + goals: Goal[]; + results: Result[]; } -export interface Search { - count: number; - pagination: SearchPagination; - results: Suggestion[]; +export interface AccompanyingPeriodResource { + id: number; + accompanyingPeriod: AccompanyingPeriod; + comment?: string | null; + person?: Person | null; + thirdParty?: Thirdparty | null; } -export interface SearchOptions { - uniq: boolean; - type: string[]; - priority: number | null; - button: { - size: string; - class: string; - type: string; - display: string; - }; +export interface Origin { + id: number; + label: { + fr: string; + }; + noActiveAfter: DateTime; } -export class MakeFetchException extends Error { - sta: number; - txt: string; - violations: unknown | null; - - constructor(txt: string, sta: number, violations: unknown | null = null) { - super(txt); - this.name = "ValidationException"; - this.sta = sta; - this.txt = txt; - this.violations = violations; - Object.setPrototypeOf(this, MakeFetchException.prototype); - } +export interface ClosingMotive { + id: number; + active: boolean; + name: { + fr: string; + }; + ordering: number; + isCanceledAccompanyingPeriod: boolean; + parent?: ClosingMotive | null; + children: ClosingMotive[]; +} + +export interface AccompanyingPeriodParticipation { + id: number; + startDate: DateTime; + endDate?: DateTime | null; + accompanyingPeriod: AccompanyingPeriod; + person: Person; +} + +export interface AccompanyingPeriodLocationHistory { + id: number; + startDate: DateTime; + endDate?: DateTime | null; + addressLocation?: Address | null; + period: AccompanyingPeriod; + personLocation?: Person | null; +} + +export interface SocialIssue { + id: number; + parent?: SocialIssue | null; + children: SocialIssue[]; + socialActions?: SocialAction[] | null; + ordering: number; + title: { + fr: string; + }; + desactivationDate?: string | null; +} + +export interface Goal { + id: number; + results: Result[]; + socialActions?: SocialAction[] | null; + title: { + fr: string; + }; +} + +export interface Result { + id: number; + accompanyingPeriodWorks: AccompanyingPeriodWork[]; + accompanyingPeriodWorkGoals: AccompanyingPeriodWorkGoal[]; + goals: Goal[]; + socialActions: SocialAction[]; + title: { + fr: string; + }; + desactivationDate?: string | null; +} + +export interface AccompanyingPeriodWorkGoal { + id: number; + accompanyingPeriodWork: AccompanyingPeriodWork; + goal: Goal; + note: string; + results: Result[]; +} + +export interface AccompanyingPeriodWorkEvaluation { + accompanyingPeriodWork: AccompanyingPeriodWork | null; + comment: string; + createdAt: DateTime | null; + createdBy: User | null; + documents: AccompanyingPeriodWorkEvaluationDocument[]; + endDate: DateTime | null; + evaluation: Evaluation | null; + id: number | null; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + key: any; + maxDate: DateTime | null; + startDate: DateTime | null; + updatedAt: DateTime | null; + updatedBy: User | null; + warningInterval: string | null; + timeSpent: number | null; +} + +export interface Evaluation { + id: number; + url: string; + socialActions: SocialAction[]; + title: { + fr: string; + }; + active: boolean; + delay: string; + notificationDelay: string; +} + +export interface AccompanyingPeriodWorkReferrerHistory { + id: number; + accompanyingPeriodWork: AccompanyingPeriodWork; + user: User; + startDate: DateTime; + endDate: DateTime | null; + createdAt: DateTime; + updatedAt: DateTime | null; + createdBy: User; + updatedBy: User | null; } diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue index e81949711..85f031a64 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue @@ -1,28 +1,28 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Confirm.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Confirm.vue index 3ce902daa..408852711 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Confirm.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Confirm.vue @@ -1,120 +1,127 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/CourseLocation.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/CourseLocation.vue index af985e502..f781eca0b 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/CourseLocation.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/CourseLocation.vue @@ -1,85 +1,95 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/OriginDemand.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/OriginDemand.vue index 053eb058f..641c9ef37 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/OriginDemand.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/OriginDemand.vue @@ -1,33 +1,33 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue index b4e0e70b8..d6979928b 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue @@ -1,106 +1,121 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated/ParticipationItem.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated/ParticipationItem.vue index c2dbd6e0c..61a9d2571 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated/ParticipationItem.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated/ParticipationItem.vue @@ -1,97 +1,98 @@ - - + + + + + diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Referrer.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Referrer.vue index 963ff65b5..dbb21fa40 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Referrer.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Referrer.vue @@ -1,113 +1,116 @@ - - - + -
- + - + +
- +
+
    +
  • + +
  • +
+
- - - +
+ {{ $t("job.not_valid") }} +
- -
-
    -
  • - -
  • -
-
- -
- {{ $t("job.not_valid") }} -
- diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue index 5858cdb00..c2b9acfc4 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue @@ -1,239 +1,263 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources.vue index fa600bfdd..1ef9bfe45 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources.vue @@ -1,57 +1,57 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources/ResourceItem.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources/ResourceItem.vue index 87daacf47..8a52748d4 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources/ResourceItem.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources/ResourceItem.vue @@ -1,107 +1,107 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources/WriteComment.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources/WriteComment.vue index 416c6085c..26b561c5d 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources/WriteComment.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources/WriteComment.vue @@ -1,32 +1,34 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Scopes.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Scopes.vue index fee6a89ad..1d05e0bbe 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Scopes.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Scopes.vue @@ -1,25 +1,25 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/SocialIssue.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/SocialIssue.vue index 21c290f48..02d3b0c84 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/SocialIssue.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/SocialIssue.vue @@ -1,30 +1,30 @@ @@ -91,20 +96,20 @@ export default { @import "ChillPersonAssets/chill/scss/mixins"; @import "ChillMainAssets/chill/scss/chill_variables"; div#accompanying-course { - span.multiselect__tag { - @include badge_social($social-issue-color); - background: $chill-l-gray; - color: $dark; - } - span.multiselect__option--highlight { - &::after { - background: $green; + span.multiselect__tag { + @include badge_social($social-issue-color); + background: $chill-l-gray; + color: $dark; } - &.multiselect__option--selected { - &::after { - background: $red; - } + span.multiselect__option--highlight { + &::after { + background: $green; + } + &.multiselect__option--selected { + &::after { + background: $red; + } + } } - } } diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/StartDate.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/StartDate.vue index d3e9ae97a..0bfd87b18 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/StartDate.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/StartDate.vue @@ -1,22 +1,22 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/StickyNav.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/StickyNav.vue index 3ff18f03a..890aa5153 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/StickyNav.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/StickyNav.vue @@ -1,195 +1,207 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/StickyNav/Item.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/StickyNav/Item.vue index ecdf3026c..8e175f72b 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/StickyNav/Item.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/StickyNav/Item.vue @@ -1,22 +1,26 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Test.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Test.vue index 929b4edd8..904d4ff42 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Test.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Test.vue @@ -1,146 +1,155 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkCreate/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkCreate/App.vue index f8b5389f4..745317211 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkCreate/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkCreate/App.vue @@ -1,135 +1,152 @@ @@ -267,46 +288,46 @@ export default { @import "ChillPersonAssets/chill/scss/mixins"; @import "ChillMainAssets/chill/scss/chill_variables"; span.badge { - @include badge_social($social-issue-color); - font-size: 95%; - margin-bottom: 5px; - margin-right: 1em; - margin-left: 1em; + @include badge_social($social-issue-color); + font-size: 95%; + margin-bottom: 5px; + margin-right: 1em; + margin-left: 1em; } diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue index bd87224b2..f3404e2de 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue @@ -1,453 +1,482 @@ @@ -806,172 +841,172 @@ export default { @import "~ChillMainAssets/chill/scss/mixins"; div#workEditor { - display: grid; - grid-template-columns: 50%; - column-gap: 0rem; - grid-template-areas: - "title title" - "startDate endDate" - "comment comment" - "privateComment privateComment" - "objectives objectives" - "evaluations evaluations" - "persons persons" - "referrers referrers" - "handling handling" - "tparties tparties" - "errors errors"; + display: grid; + grid-template-columns: 50%; + column-gap: 0rem; + grid-template-areas: + "title title" + "startDate endDate" + "comment comment" + "privateComment privateComment" + "objectives objectives" + "evaluations evaluations" + "persons persons" + "referrers referrers" + "handling handling" + "tparties tparties" + "errors errors"; - #title { - grid-area: title; - } - #startDate { - grid-area: startDate; - } - #endDate { - grid-area: endDate; - } - #comment { - grid-area: comment; - } - #privateComment { - grid-area: privateComment; - } - #objectives { - grid-area: objectives; - } - #evaluations { - grid-area: evaluations; - } - #persons { - grid-area: persons; - } - #handlingThirdParty { - grid-area: handling; - } - #thirdParties { - grid-area: tparties; - } - #referrers { - grid-area: referrers; - } - #errors { - grid-area: errors; - } - - div.action-row { - @include border-collapse; - padding: 1em; - - &#title { - label { - margin-bottom: 0; - } - p { - margin-top: 0; - font-weight: bold; - font-size: 1rem; - } + #title { + grid-area: title; + } + #startDate { + grid-area: startDate; + } + #endDate { + grid-area: endDate; + } + #comment { + grid-area: comment; + } + #privateComment { + grid-area: privateComment; + } + #objectives { + grid-area: objectives; + } + #evaluations { + grid-area: evaluations; + } + #persons { + grid-area: persons; + } + #handlingThirdParty { + grid-area: handling; + } + #thirdParties { + grid-area: tparties; + } + #referrers { + grid-area: referrers; + } + #errors { + grid-area: errors; } - &#objectives { - & > div { - display: grid; - grid-template-columns: 50%; - column-gap: 0rem; - grid-template-areas: "obj res"; - - & > div { - @include border-collapse; - padding: 1em; - - &:nth-child(1) { - grid-area: obj; - } - - &:nth-child(2) { - grid-area: res; - } - } - - & > div.results_without_objective { - background: repeating-linear-gradient( - 45deg, - $gray-200, - $gray-200 10px, - $gray-100 10px, - $gray-100 20px - ); - text-align: center; - font-weight: 700; - padding-top: 1.5rem; - } - } - } - - &#evaluations { - & > div { + div.action-row { @include border-collapse; padding: 1em; - } - } - &#objectives, - &#evaluations { - padding: 0; - - & > div.title { - background-color: $gray-200; - color: $gray-700; - - h3 { - text-align: center; + &#title { + label { + margin-bottom: 0; + } + p { + margin-top: 0; + font-weight: bold; + font-size: 1rem; + } } - } - .item-title { - font-weight: bold; - } - .item-details { - margin: 1em 2em; - font-size: 85%; - } + &#objectives { + & > div { + display: grid; + grid-template-columns: 50%; + column-gap: 0rem; + grid-template-areas: "obj res"; - i.fa { - padding: 0.25rem; - color: $white; + & > div { + @include border-collapse; + padding: 1em; - &.fa-times { - color: $red; + &:nth-child(1) { + grid-area: obj; + } + + &:nth-child(2) { + grid-area: res; + } + } + + & > div.results_without_objective { + background: repeating-linear-gradient( + 45deg, + $gray-200, + $gray-200 10px, + $gray-100 10px, + $gray-100 20px + ); + text-align: center; + font-weight: 700; + padding-top: 1.5rem; + } + } + } + + &#evaluations { + & > div { + @include border-collapse; + padding: 1em; + } + } + + &#objectives, + &#evaluations { + padding: 0; + + & > div.title { + background-color: $gray-200; + color: $gray-700; + + h3 { + text-align: center; + } + } + + .item-title { + font-weight: bold; + } + .item-details { + margin: 1em 2em; + font-size: 85%; + } + + i.fa { + padding: 0.25rem; + color: $white; + + &.fa-times { + color: $red; + } + } + } + + &#persons { + margin-top: 1.5em; + } + + ul.record_actions { + margin-bottom: 0; } - } } - &#persons { - margin-top: 1.5em; + div#errors { + &.alert { + margin-top: 2em; + } } - - ul.record_actions { - margin-bottom: 0; - } - } - - div#errors { - &.alert { - margin-top: 2em; - } - } } .accordion-item:first-of-type, .accordion-item:last-of-type { - border-radius: 0rem; - border: 0px; - .accordion-button { - padding: 0.25rem; - border: 1px solid rgba(17, 17, 17, 0.125); - margin-top: 20px; - margin-bottom: 20px; - } + border-radius: 0rem; + border: 0px; + .accordion-button { + padding: 0.25rem; + border: 1px solid rgba(17, 17, 17, 0.125); + margin-top: 20px; + margin-bottom: 20px; + } } diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/AddEvaluation.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/AddEvaluation.vue index ee8cca532..77b6810bb 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/AddEvaluation.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/AddEvaluation.vue @@ -1,67 +1,70 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/AddResult.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/AddResult.vue index f25de72c8..aa8948a4e 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/AddResult.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/AddResult.vue @@ -1,167 +1,179 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue index 30bb2a2dd..b54baf09a 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue @@ -1,11 +1,11 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/ExportFormActionGoalResult/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/ExportFormActionGoalResult/App.vue index 7922362ca..29b707842 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/ExportFormActionGoalResult/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/ExportFormActionGoalResult/App.vue @@ -1,447 +1,445 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/App.vue index a58b8a98a..b8e8ee8c4 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/App.vue @@ -1,53 +1,53 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Concerned.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Concerned.vue index ae422f150..d4bacd855 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Concerned.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Concerned.vue @@ -1,74 +1,88 @@ @@ -78,61 +92,62 @@ import AddPersons from "ChillPersonAssets/vuejs/_components/AddPersons.vue"; import PersonText from "ChillPersonAssets/vuejs/_components/Entity/PersonText.vue"; export default { - name: "Concerned", - components: { - AddPersons, - PersonText, - }, - computed: { - ...mapState(["concerned", "household"]), - ...mapGetters(["persons"]), - noPerson() { - return this.$store.getters.persons.length === 0; + name: "Concerned", + components: { + AddPersons, + PersonText, }, - concernedPersonsWithHouseholds() { - if (this.$store.state.household) { - return this.$store.state.concerned.filter( - (c) => - c.person.current_household_id !== null && - c.person.current_household_id !== this.$store.state.household.id, - ); - } else { - return []; - } - }, - }, - data() { - return { - addPersons: { - key: "household_members_editor_concerned", - options: { - type: ["person"], - priority: null, - uniq: false, + computed: { + ...mapState(["concerned", "household"]), + ...mapGetters(["persons"]), + noPerson() { + return this.$store.getters.persons.length === 0; + }, + concernedPersonsWithHouseholds() { + if (this.$store.state.household) { + return this.$store.state.concerned.filter( + (c) => + c.person.current_household_id !== null && + c.person.current_household_id !== + this.$store.state.household.id, + ); + } else { + return []; + } }, - }, - }; - }, - methods: { - addNewPersons({ selected, modal }) { - selected.forEach(function (item) { - this.$store.dispatch("addConcerned", item.result); - }, this); - this.$refs.addPersons.resetSearch(); // to cast child method - modal.showModal = false; }, - removeConcerned(concerned) { - console.log("removedconcerned", concerned); + data() { + return { + addPersons: { + key: "household_members_editor_concerned", + options: { + type: ["person"], + priority: null, + uniq: false, + }, + }, + }; + }, + methods: { + addNewPersons({ selected, modal }) { + selected.forEach(function (item) { + this.$store.dispatch("addConcerned", item.result); + }, this); + this.$refs.addPersons.resetSearch(); // to cast child method + modal.showModal = false; + }, + removeConcerned(concerned) { + console.log("removedconcerned", concerned); - if (!concerned.allowRemove) { - return; - } + if (!concerned.allowRemove) { + return; + } - this.$store.dispatch("removePerson", concerned.person); + this.$store.dispatch("removePerson", concerned.person); + }, + makeHouseholdLink(id) { + return `/fr/person/household/${id}/summary`; + }, }, - makeHouseholdLink(id) { - return `/fr/person/household/${id}/summary`; - }, - }, }; diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Confirmation.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Confirmation.vue index 5441bc1af..902e95648 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Confirmation.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Confirmation.vue @@ -1,20 +1,20 @@ @@ -23,14 +23,14 @@ import { mapState } from "vuex"; export default { - name: "Confirmation", - computed: { - ...mapState({ - hasWarnings: (state) => - state.warnings.length > 0 || state.errors.length > 0, - warnings: (state) => state.warnings, - errors: (state) => state.errors, - }), - }, + name: "Confirmation", + computed: { + ...mapState({ + hasWarnings: (state) => + state.warnings.length > 0 || state.errors.length > 0, + warnings: (state) => state.warnings, + errors: (state) => state.errors, + }), + }, }; diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/CurrentHousehold.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/CurrentHousehold.vue index 3ae8c1ab6..34002972c 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/CurrentHousehold.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/CurrentHousehold.vue @@ -1,35 +1,37 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Dates.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Dates.vue index 1139d2fe9..8757f23bc 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Dates.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Dates.vue @@ -1,83 +1,83 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Household.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Household.vue index 56798341a..9773d178e 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Household.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Household.vue @@ -1,116 +1,130 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/HouseholdAddress.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/HouseholdAddress.vue index c7d9d8aac..af6f00d84 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/HouseholdAddress.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/HouseholdAddress.vue @@ -1,26 +1,30 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/MemberDetails.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/MemberDetails.vue index 3bdfb9d03..13515efec 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/MemberDetails.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/MemberDetails.vue @@ -1,102 +1,104 @@ @@ -106,44 +108,44 @@ import PersonRenderBox from "ChillPersonAssets/vuejs/_components/Entity/PersonRe import CommentEditor from "ChillMainAssets/vuejs/_components/CommentEditor/CommentEditor.vue"; export default { - name: "MemberDetails", - components: { - PersonRenderBox, - CommentEditor, - }, - props: ["conc"], - computed: { - ...mapGetters(["concByPersonId"]), - classicEditor: () => ClassicEditor, - editorConfig: () => classicEditorConfig, - isHolder() { - return this.conc.holder; + name: "MemberDetails", + components: { + PersonRenderBox, + CommentEditor, }, - comment: { - get() { - return this.conc.comment; - }, - set(text) { - console.log("set comment"); - console.log("comment", text); + props: ["conc"], + computed: { + ...mapGetters(["concByPersonId"]), + classicEditor: () => ClassicEditor, + editorConfig: () => classicEditorConfig, + isHolder() { + return this.conc.holder; + }, + comment: { + get() { + return this.conc.comment; + }, + set(text) { + console.log("set comment"); + console.log("comment", text); - this.$store.dispatch("setComment", { - conc: this.conc, - comment: text, - }); - }, + this.$store.dispatch("setComment", { + conc: this.conc, + comment: text, + }); + }, + }, }, - }, - methods: { - toggleHolder() { - this.$store.dispatch("toggleHolder", this.conc); + methods: { + toggleHolder() { + this.$store.dispatch("toggleHolder", this.conc); + }, + removePosition() { + this.$store.dispatch("removePosition", this.conc); + }, + removeConcerned() { + this.$store.dispatch("removeConcerned", this.conc); + }, }, - removePosition() { - this.$store.dispatch("removePosition", this.conc); - }, - removeConcerned() { - this.$store.dispatch("removeConcerned", this.conc); - }, - }, }; diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/PersonComment.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/PersonComment.vue index 99fb3ebfa..6630a72f1 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/PersonComment.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/PersonComment.vue @@ -1,30 +1,30 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Positioning.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Positioning.vue index 26ab0058e..a19d80c7a 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Positioning.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Positioning.vue @@ -1,57 +1,57 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/App.vue index e9ee85164..401f41be5 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/App.vue @@ -1,181 +1,211 @@ + + + + +
    +
  • + - {{ layer.label }} - - - - - - - - - - - - - -
      -
    • - -
    • -
    +
  • +
@@ -645,21 +694,21 @@ export default { diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/AddPersons.ts b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/AddPersons.js similarity index 57% rename from src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/AddPersons.ts rename to src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/AddPersons.js index 519a3d3e7..1d0a607ed 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/AddPersons.ts +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/AddPersons.js @@ -1,15 +1,7 @@ -import { Search, SearchOptions } from "ChillPersonAssets/types"; - /* * Build query string with query and options */ -const parametersToString = ({ - query, - options, -}: { - query: string; - options: SearchOptions; -}) => { +const parametersToString = ({ query, options }) => { let types = ""; options.type.forEach(function (type) { types += "&type[]=" + type; @@ -24,13 +16,11 @@ const parametersToString = ({ * @query string - the query to search for * @deprecated */ -export function searchPersons( - { query, options }: { query: string; options: SearchOptions }, - signal: AbortSignal, -): Promise { - const queryStr = parametersToString({ query, options }); - const url = `/fr/search.json?name=person_regular&${queryStr}`; - const fetchOpts = { +const searchPersons = ({ query, options }, signal) => { + console.err("deprecated"); + let queryStr = parametersToString({ query, options }); + let url = `/fr/search.json?name=person_regular&${queryStr}`; + let fetchOpts = { method: "GET", headers: { "Content-Type": "application/json;charset=utf-8", @@ -44,7 +34,7 @@ export function searchPersons( } throw Error("Error with request resource response"); }); -} +}; /* * Endpoint v.2 chill_main_search_global @@ -53,16 +43,15 @@ export function searchPersons( * @param query string - the query to search for * */ -export function searchEntities( - { query, options }: { query: string; options: SearchOptions }, - signal: AbortSignal, -): Promise { - const queryStr = parametersToString({ query, options }); - const url = `/api/1.0/search.json?${queryStr}`; +const searchEntities = ({ query, options }, signal) => { + let queryStr = parametersToString({ query, options }); + let url = `/api/1.0/search.json?${queryStr}`; return fetch(url, { signal }).then((response) => { if (response.ok) { return response.json(); } throw Error("Error with request resource response"); }); -} +}; + +export { searchPersons, searchEntities }; diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/accompanyingCourseWorkEvaluationDocument.ts b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/accompanyingCourseWorkEvaluationDocument.ts index 577c4b52b..ddb37fab1 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/accompanyingCourseWorkEvaluationDocument.ts +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/accompanyingCourseWorkEvaluationDocument.ts @@ -2,10 +2,10 @@ import { AccompanyingPeriodWorkEvaluationDocument } from "../../types"; import { makeFetch } from "../../../../../ChillMainBundle/Resources/public/lib/api/apiMethods"; export const duplicate = async ( - id: number, + id: number, ): Promise => { - return makeFetch( - "POST", - `/api/1.0/person/accompanying-course-work-evaluation-document/${id}/duplicate`, - ); + return makeFetch( + "POST", + `/api/1.0/person/accompanying-course-work-evaluation-document/${id}/duplicate`, + ); }; diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriod/SetReferrer.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriod/SetReferrer.vue index 0a8d07f30..8391fbbb6 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriod/SetReferrer.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriod/SetReferrer.vue @@ -1,44 +1,53 @@ - diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkItem.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkItem.vue index 98668a65b..330423a20 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkItem.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkItem.vue @@ -1,45 +1,51 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkList.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkList.vue index c3615c959..b2ebc5f1c 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkList.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkList.vue @@ -1,24 +1,24 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkSelectorModal.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkSelectorModal.vue index ee2c7c66c..4b4f3ddba 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkSelectorModal.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkSelectorModal.vue @@ -1,52 +1,62 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue index 24cdca24e..5e81b8241 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue @@ -1,489 +1,517 @@ - diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/PersonSuggestion.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/PersonSuggestion.vue index 4499b40c8..bb90557b7 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/PersonSuggestion.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/PersonSuggestion.vue @@ -1,124 +1,136 @@ - diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeHousehold.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeHousehold.vue index a1e33c4de..86a58737a 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeHousehold.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeHousehold.vue @@ -1,25 +1,26 @@ - diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypePerson.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypePerson.vue index 98119bd8e..259029f73 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypePerson.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypePerson.vue @@ -1,48 +1,43 @@ - diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeThirdParty.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeThirdParty.vue index 28be7c119..8c97d2e29 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeThirdParty.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeThirdParty.vue @@ -1,137 +1,126 @@ - diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeUser.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeUser.vue index 74f80c321..56b3afe17 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeUser.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeUser.vue @@ -1,40 +1,40 @@ - diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeUserGroup.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeUserGroup.vue index ca3aa2cb8..1daf921e1 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeUserGroup.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeUserGroup.vue @@ -1,24 +1,32 @@ - - + + diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/HouseholdRenderBox.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/HouseholdRenderBox.vue index e6f50708b..ad996a375 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/HouseholdRenderBox.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/HouseholdRenderBox.vue @@ -1,161 +1,168 @@ - diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue index 0d9e3ec5f..cdc143f76 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue @@ -1,418 +1,493 @@ - + + diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonText.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonText.vue index 10302ee30..f157fac6a 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonText.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonText.vue @@ -1,51 +1,75 @@ - diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/OnTheFly/Person.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/OnTheFly/Person.vue index 3a93a305d..ff4b312f1 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/OnTheFly/Person.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/OnTheFly/Person.vue @@ -1,466 +1,530 @@ - + + diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_js/i18n.ts b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_js/i18n.ts index 088ff11ea..ba7637544 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_js/i18n.ts +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_js/i18n.ts @@ -1,63 +1,64 @@ const personMessages = { - fr: { - add_persons: { - title: "Ajouter des usagers", - suggested_counter: "Pas de résultats | 1 résultat | {count} résultats", - selected_counter: " 1 sélectionné | {count} sélectionnés", - search_some_persons: "Rechercher des personnes..", + fr: { + add_persons: { + title: "Ajouter des usagers", + suggested_counter: + "Pas de résultats | 1 résultat | {count} résultats", + selected_counter: " 1 sélectionné | {count} sélectionnés", + search_some_persons: "Rechercher des personnes..", + }, + item: { + type_person: "Usager", + type_user: "TMS", + type_thirdparty: "Tiers professionnel", + type_household: "Ménage", + }, + person: { + firstname: "Prénom", + lastname: "Nom", + born: (ctx: { gender: "man" | "woman" | "neutral" }) => { + if (ctx.gender === "man") { + return "Né le"; + } else if (ctx.gender === "woman") { + return "Née le"; + } else { + return "Né·e le"; + } + }, + center_id: "Identifiant du centre", + center_type: "Type de centre", + center_name: "Territoire", // vendée + phonenumber: "Téléphone", + mobilenumber: "Mobile", + altnames: "Autres noms", + email: "Courriel", + gender: { + title: "Genre", + placeholder: "Choisissez le genre de l'usager", + woman: "Féminin", + man: "Masculin", + neutral: "Neutre, non binaire", + unknown: "Non renseigné", + undefined: "Non renseigné", + }, + civility: { + title: "Civilité", + placeholder: "Choisissez la civilité", + }, + address: { + create_address: "Ajouter une adresse", + show_address_form: + "Ajouter une adresse pour un usager non suivi et seul dans un ménage", + warning: + "Un nouveau ménage va être créé. L'usager sera membre de ce ménage.", + }, + center: { + placeholder: "Choisissez un centre", + title: "Centre", + }, + }, + error_only_one_person: "Une seule personne peut être sélectionnée !", }, - item: { - type_person: "Usager", - type_user: "TMS", - type_thirdparty: "Tiers professionnel", - type_household: "Ménage", - }, - person: { - firstname: "Prénom", - lastname: "Nom", - born: (ctx: { gender: "man" | "woman" | "neutral" }) => { - if (ctx.gender === "man") { - return "Né le"; - } else if (ctx.gender === "woman") { - return "Née le"; - } else { - return "Né·e le"; - } - }, - center_id: "Identifiant du centre", - center_type: "Type de centre", - center_name: "Territoire", // vendée - phonenumber: "Téléphone", - mobilenumber: "Mobile", - altnames: "Autres noms", - email: "Courriel", - gender: { - title: "Genre", - placeholder: "Choisissez le genre de l'usager", - woman: "Féminin", - man: "Masculin", - neutral: "Neutre, non binaire", - unknown: "Non renseigné", - undefined: "Non renseigné", - }, - civility: { - title: "Civilité", - placeholder: "Choisissez la civilité", - }, - address: { - create_address: "Ajouter une adresse", - show_address_form: - "Ajouter une adresse pour un usager non suivi et seul dans un ménage", - warning: - "Un nouveau ménage va être créé. L'usager sera membre de ce ménage.", - }, - center: { - placeholder: "Choisissez un centre", - title: "Centre", - }, - }, - error_only_one_person: "Une seule personne peut être sélectionnée !", - }, }; export { personMessages }; diff --git a/src/Bundle/ChillPersonBundle/Tests/Repository/PersonACLAwareRepositoryTest.php b/src/Bundle/ChillPersonBundle/Tests/Repository/PersonACLAwareRepositoryTest.php index 667242111..94df35d88 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Repository/PersonACLAwareRepositoryTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Repository/PersonACLAwareRepositoryTest.php @@ -11,17 +11,14 @@ declare(strict_types=1); namespace Chill\PersonBundle\Tests\Repository; -use Chill\MainBundle\Entity\Center; use Chill\MainBundle\Entity\User; use Chill\MainBundle\Repository\CenterRepositoryInterface; use Chill\MainBundle\Repository\CountryRepository; use Chill\MainBundle\Security\Authorization\AuthorizationHelperInterface; use Chill\PersonBundle\Entity\Person; -use Chill\PersonBundle\Entity\PersonPhone; use Chill\PersonBundle\Repository\PersonACLAwareRepository; use Chill\PersonBundle\Security\Authorization\PersonVoter; use Doctrine\ORM\EntityManagerInterface; -use PHPUnit\Framework\Attributes\DataProvider; use Prophecy\Argument; use Prophecy\PhpUnit\ProphecyTrait; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; @@ -101,67 +98,4 @@ final class PersonACLAwareRepositoryTest extends KernelTestCase $this->assertStringContainsString('diallo', strtolower($person->getFirstName().' '.$person->getLastName())); } } - - /** - * @dataProvider providePersonsWithPhoneNumbers - */ - public function testFindByPhonenumber(\libphonenumber\PhoneNumber $phoneNumber, ?int $expectedId): void - { - $user = new User(); - - $authorizationHelper = $this->prophesize(AuthorizationHelperInterface::class); - $authorizationHelper->getReachableCenters(Argument::exact($user), Argument::exact(PersonVoter::SEE)) - ->willReturn($this->centerRepository->findAll()); - - $security = $this->prophesize(Security::class); - $security->getUser()->willReturn($user); - - $repository = new PersonACLAwareRepository( - $security->reveal(), - $this->entityManager, - $this->countryRepository, - $authorizationHelper->reveal() - ); - - $actual = $repository->findByPhone($phoneNumber, 0, 10); - - if (null === $expectedId) { - self::assertCount(0, $actual); - } else { - $actualIds = array_map(fn (Person $person) => $person->getId(), $actual); - - self::assertContains($expectedId, $actualIds); - } - } - - public static function providePersonsWithPhoneNumbers(): iterable - { - self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); - $center = $em->createQuery('SELECT c FROM '.Center::class.' c ')->setMaxResults(1) - ->getSingleResult(); - $util = \libphonenumber\PhoneNumberUtil::getInstance(); - - $mobile = $util->parse('+32486123456'); - $fixed = $util->parse('+3281136917'); - $anotherMobile = $util->parse('+32486123478'); - $person = (new Person())->setFirstName('diallo')->setLastName('diallo')->setCenter($center); - $person->setMobilenumber($mobile)->setPhonenumber($fixed); - $otherPhone = new PersonPhone(); - $otherPhone->setPerson($person); - $otherPhone->setPhonenumber($anotherMobile); - $otherPhone->setType('mobile'); - - $em->persist($person); - $em->persist($otherPhone); - - $em->flush(); - - self::ensureKernelShutdown(); - - yield [$mobile, $person->getId()]; - yield [$anotherMobile, $person->getId()]; - yield [$fixed, $person->getId()]; - yield [$util->parse('+331234567890'), null]; - } } diff --git a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml index ae7ac6284..6e42a362b 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml +++ b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml @@ -206,59 +206,3 @@ accompanying_course_evaluation_document: accompanying_period_work: title: Action d'accompagnement (n°{id}) - {action_title} - -add_persons: - title: "Ajouter des usagers" - suggested_counter: >- - {count, plural, - =0 {Pas de résultats} - =1 {1 résultat} - other {# résultats} - } - selected_counter: >- - {count, plural, - =1 {1 sélectionné} - other {# sélectionnés} - } - search_some_persons: "Rechercher des personnes.." - - item: - type_person: "Usager" - type_user: "TMS" - type_thirdparty: "Tiers professionnel" - type_household: "Ménage" - - person: - firstname: "Prénom" - lastname: "Nom" - born: - man: "Né le" - woman: "Née le" - neutral: "Né·e le" - center_id: "Identifiant du centre" - center_type: "Type de centre" - center_name: "Territoire" - phonenumber: "Téléphone" - mobilenumber: "Mobile" - altnames: "Autres noms" - email: "Courriel" - gender: - title: "Genre" - placeholder: "Choisissez le genre de l'usager" - woman: "Féminin" - man: "Masculin" - neutral: "Neutre, non binaire" - unknown: "Non renseigné" - undefined: "Non renseigné" - civility: - title: "Civilité" - placeholder: "Choisissez la civilité" - address: - create_address: "Ajouter une adresse" - show_address_form: "Ajouter une adresse pour un usager non suivi et seul dans un ménage" - warning: "Un nouveau ménage va être créé. L'usager sera membre de ce ménage." - center: - placeholder: "Choisissez un centre" - title: "Centre" - - error_only_one_person: "Une seule personne peut être sélectionnée !" diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 6c271fd80..c9f1af282 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -1522,48 +1522,3 @@ my_parcours_filters: parcours_intervening: Intervenant is_open: Parcours ouverts is_closed: Parcours clôturés - -person_messages: - add_persons: - title: "Ajouter des usagers" - suggested_counter: "Pas de résultats | 1 résultat | {count} résultats" - selected_counter: " 1 sélectionné | {count} sélectionnés" - search_some_persons: "Rechercher des personnes.." - item: - type_person: "Usager" - type_user: "TMS" - type_thirdparty: "Tiers professionnel" - type_household: "Ménage" - person: - firstname: "Prénom" - lastname: "Nom" - born: - man: "Né le" - woman: "Née le" - neutral: "Né·e le" - center_id: "Identifiant du centre" - center_type: "Type de centre" - center_name: "Territoire" - phonenumber: "Téléphone" - mobilenumber: "Mobile" - altnames: "Autres noms" - email: "Courriel" - gender: - title: "Genre" - placeholder: "Choisissez le genre de l'usager" - woman: "Féminin" - man: "Masculin" - neutral: "Neutre, non binaire" - unknown: "Non renseigné" - undefined: "Non renseigné" - civility: - title: "Civilité" - placeholder: "Choisissez la civilité" - address: - create_address: "Ajouter une adresse" - show_address_form: "Ajouter une adresse pour un usager non suivi et seul dans un ménage" - warning: "Un nouveau ménage va être créé. L'usager sera membre de ce ménage." - center: - placeholder: "Choisissez un centre" - title: "Centre" - error_only_one_person: "Une seule personne peut être sélectionnée !" diff --git a/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyRepository.php b/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyRepository.php index 3153713bb..111be4089 100644 --- a/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyRepository.php +++ b/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyRepository.php @@ -18,15 +18,12 @@ use Doctrine\ORM\EntityRepository; use Doctrine\ORM\Query; use Doctrine\ORM\QueryBuilder; use Doctrine\Persistence\ObjectRepository; -use libphonenumber\PhoneNumber; -use libphonenumber\PhoneNumberFormat; -use libphonenumber\PhoneNumberUtil; class ThirdPartyRepository implements ObjectRepository { private readonly EntityRepository $repository; - public function __construct(EntityManagerInterface $em, private readonly Connection $connection, private readonly PhoneNumberUtil $phonenumberUtil) + public function __construct(EntityManagerInterface $em, private readonly Connection $connection) { $this->repository = $em->getRepository(ThirdParty::class); } @@ -125,43 +122,6 @@ class ThirdPartyRepository implements ObjectRepository return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } - /** - * Finds third-party records by phone number. - * - * The search is performed agains every phonenumber field (there are two phonenumber on a thirdParty). - * - * @param string|PhoneNumber $phonenumber The phone number to search for. Can be a string or a PhoneNumber object. - * @param int $firstResult the index of the first result to retrieve (pagination start) - * @param int $maxResults the maximum number of results to retrieve (pagination limit) - * - * @return list the result set containing matching third-party records - */ - public function findByPhonenumber(string|PhoneNumber $phonenumber, int $firstResult = 0, int $maxResults = 20): array - { - if ('' === $phonenumber) { - return []; - } - - $qb = $this->createQueryBuilder('tp'); - $qb->select('tp'); - - $qb->where( - $qb->expr()->orX( - $qb->expr()->eq('tp.telephone', ':phonenumber'), - $qb->expr()->eq('tp.telephone2', ':phonenumber') - ) - ); - - $qb->setParameter( - 'phonenumber', - is_string($phonenumber) ? $phonenumber : $this->phonenumberUtil->format($phonenumber, PhoneNumberFormat::E164) - ); - - $qb->setFirstResult($firstResult)->setMaxResults($maxResults); - - return $qb->getQuery()->getResult(); - } - /** * Search amongst parties associated to $centers, with $terms parameters. * diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/types.ts b/src/Bundle/ChillThirdPartyBundle/Resources/public/types.ts index 2d2acc42b..20ae3309b 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/types.ts +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/types.ts @@ -1,49 +1,47 @@ import { - Address, - Center, - Civility, - DateTime, - User, + Address, + Center, + Civility, + DateTime, + User, } from "ChillMainAssets/types"; export interface Thirdparty { - type: "thirdparty"; - text: string; - acronym: string | null; - active: boolean; - address: Address | null; - canonicalized: string | null; - categories: ThirdpartyCategory[]; - centers: Center[]; - children: Thirdparty[]; - civility: Civility | null; - comment: string | null; - contactDataAnonymous: boolean; - createdAt: DateTime; - createdBy: User | null; - email: string | null; - firstname: string | null; - id: number | null; - kind: string; - name: string; - nameCompany: string | null; - parent: Thirdparty | null; - profession: string; - telephone: string | null; - thirdPartyTypes: ThirdpartyType[] | null; - updatedAt: DateTime | null; - updatedBy: User | null; + acronym: string | null; + active: boolean; + address: Address | null; + canonicalized: string | null; + categories: ThirdpartyCategory[]; + centers: Center[]; + children: Thirdparty[]; + civility: Civility | null; + comment: string | null; + contactDataAnonymous: boolean; + createdAt: DateTime; + createdBy: User | null; + email: string | null; + firstname: string | null; + id: number | null; + kind: string; + name: string; + nameCompany: string | null; + parent: Thirdparty | null; + profession: string; + telephone: string | null; + thirdPartyTypes: ThirdpartyType[] | null; + updatedAt: DateTime | null; + updatedBy: User | null; } interface ThirdpartyType { - key: string; - value: string; + key: string; + value: string; } export interface ThirdpartyCategory { - id: number; - active: boolean; - name: { - fr: string; - }; + id: number; + active: boolean; + name: { + fr: string; + }; } diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue index 3413861ae..0fee3dcdb 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue @@ -1,131 +1,158 @@ diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyText.vue b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyText.vue index dfd46efd9..2214605e2 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyText.vue +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyText.vue @@ -1,28 +1,28 @@ diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue index e3b2338bd..623926807 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue @@ -1,450 +1,449 @@