From c27268443cb409023856e6452feccd2ce734bd89 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 5 Jul 2021 17:40:21 +0200 Subject: [PATCH 001/100] start creation AsideActivity bundle --- .../ChillAsideActivityBundle/CHANGELOG.md | 0 .../ChillAsideActivityBundle.php | 9 + .../Entity/AsideActivity.php | 42 ++ .../Entity/AsideActivityType.php | 100 +++ src/Bundle/ChillAsideActivityBundle/LICENSE | 661 ++++++++++++++++++ src/Bundle/ChillAsideActivityBundle/README.md | 3 + .../Repository/AsideActivityRepository.php | 50 ++ .../AsideActivityTypeRepository.php | 50 ++ .../chill.webpack.config.js | 3 + .../ChillAsideActivityBundle/composer.json | 94 +++ 10 files changed, 1012 insertions(+) create mode 100644 src/Bundle/ChillAsideActivityBundle/CHANGELOG.md create mode 100644 src/Bundle/ChillAsideActivityBundle/ChillAsideActivityBundle.php create mode 100644 src/Bundle/ChillAsideActivityBundle/Entity/AsideActivity.php create mode 100644 src/Bundle/ChillAsideActivityBundle/Entity/AsideActivityType.php create mode 100644 src/Bundle/ChillAsideActivityBundle/LICENSE create mode 100644 src/Bundle/ChillAsideActivityBundle/README.md create mode 100644 src/Bundle/ChillAsideActivityBundle/Repository/AsideActivityRepository.php create mode 100644 src/Bundle/ChillAsideActivityBundle/Repository/AsideActivityTypeRepository.php create mode 100644 src/Bundle/ChillAsideActivityBundle/chill.webpack.config.js create mode 100644 src/Bundle/ChillAsideActivityBundle/composer.json diff --git a/src/Bundle/ChillAsideActivityBundle/CHANGELOG.md b/src/Bundle/ChillAsideActivityBundle/CHANGELOG.md new file mode 100644 index 000000000..e69de29bb diff --git a/src/Bundle/ChillAsideActivityBundle/ChillAsideActivityBundle.php b/src/Bundle/ChillAsideActivityBundle/ChillAsideActivityBundle.php new file mode 100644 index 000000000..d5dc2cf9a --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/ChillAsideActivityBundle.php @@ -0,0 +1,9 @@ +id; + } + + public function getType(): ?AsideActivityType + { + return $this->type; + } + + public function setType(?AsideActivityType $type): self + { + $this->type = $type; + + return $this; + } +} \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/Entity/AsideActivityType.php b/src/Bundle/ChillAsideActivityBundle/Entity/AsideActivityType.php new file mode 100644 index 000000000..05a063892 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/Entity/AsideActivityType.php @@ -0,0 +1,100 @@ +asideActivities = new ArrayCollection(); + } + + public function getId(): ?int + { + return $this->id; + } + + public function getTitle(): ?string + { + return $this->title; + } + + public function setTitle(string $title): self + { + $this->title = $title; + + return $this; + } + + public function getIsActive(): ?bool + { + return $this->isActive; + } + + public function setIsActive(bool $isActive): self + { + $this->isActive = $isActive; + + return $this; + } + + /** + * @return Collection|AsideActivity[] + */ + public function getAsideActivities(): Collection + { + return $this->asideActivities; + } + + public function addAsideActivity(AsideActivity $asideActivity): self + { + if (!$this->asideActivities->contains($asideActivity)) { + $this->asideActivities[] = $asideActivity; + $asideActivity->setType($this); + } + + return $this; + } + + public function removeAsideActivity(AsideActivity $asideActivity): self + { + if ($this->asideActivities->removeElement($asideActivity)) { + // set the owning side to null (unless already changed) + if ($asideActivity->getType() === $this) { + $asideActivity->setType(null); + } + } + + return $this; + } +} \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/LICENSE b/src/Bundle/ChillAsideActivityBundle/LICENSE new file mode 100644 index 000000000..ddfcbd34e --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/LICENSE @@ -0,0 +1,661 @@ +GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + +Copyright (C) 2007 Free Software Foundation, Inc. +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + + Preamble + +The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + +The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + +When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + +Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + +A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + +The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + +An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + +The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + +0. Definitions. + +"This License" refers to version 3 of the GNU Affero General Public License. + +"Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + +"The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + +To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + +A "covered work" means either the unmodified Program or a work based +on the Program. + +To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + +To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + +An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + +1. Source Code. + +The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + +A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + +The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + +The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + +The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + +The Corresponding Source for a work in source code form is that +same work. + +2. Basic Permissions. + +All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + +3. Protecting Users' Legal Rights From Anti-Circumvention Law. + +No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + +When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + +4. Conveying Verbatim Copies. + +You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + +5. Conveying Modified Source Versions. + +You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + +a) The work must carry prominent notices stating that you modified +it, and giving a relevant date. + +b) The work must carry prominent notices stating that it is +released under this License and any conditions added under section +7. This requirement modifies the requirement in section 4 to +"keep intact all notices". + +c) You must license the entire work, as a whole, under this +License to anyone who comes into possession of a copy. This +License will therefore apply, along with any applicable section 7 +additional terms, to the whole of the work, and all its parts, +regardless of how they are packaged. This License gives no +permission to license the work in any other way, but it does not +invalidate such permission if you have separately received it. + +d) If the work has interactive user interfaces, each must display +Appropriate Legal Notices; however, if the Program has interactive +interfaces that do not display Appropriate Legal Notices, your +work need not make them do so. + +A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + +6. Conveying Non-Source Forms. + +You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + +a) Convey the object code in, or embodied in, a physical product +(including a physical distribution medium), accompanied by the +Corresponding Source fixed on a durable physical medium +customarily used for software interchange. + +b) Convey the object code in, or embodied in, a physical product +(including a physical distribution medium), accompanied by a +written offer, valid for at least three years and valid for as +long as you offer spare parts or customer support for that product +model, to give anyone who possesses the object code either (1) a +copy of the Corresponding Source for all the software in the +product that is covered by this License, on a durable physical +medium customarily used for software interchange, for a price no +more than your reasonable cost of physically performing this +conveying of source, or (2) access to copy the +Corresponding Source from a network server at no charge. + +c) Convey individual copies of the object code with a copy of the +written offer to provide the Corresponding Source. This +alternative is allowed only occasionally and noncommercially, and +only if you received the object code with such an offer, in accord +with subsection 6b. + +d) Convey the object code by offering access from a designated +place (gratis or for a charge), and offer equivalent access to the +Corresponding Source in the same way through the same place at no +further charge. You need not require recipients to copy the +Corresponding Source along with the object code. If the place to +copy the object code is a network server, the Corresponding Source +may be on a different server (operated by you or a third party) +that supports equivalent copying facilities, provided you maintain +clear directions next to the object code saying where to find the +Corresponding Source. Regardless of what server hosts the +Corresponding Source, you remain obligated to ensure that it is +available for as long as needed to satisfy these requirements. + +e) Convey the object code using peer-to-peer transmission, provided +you inform other peers where the object code and Corresponding +Source of the work are being offered to the general public at no +charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + +A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + +"Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + +If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + +The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + +Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + +7. Additional Terms. + +"Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + +a) Disclaiming warranty or limiting liability differently from the +terms of sections 15 and 16 of this License; or + +b) Requiring preservation of specified reasonable legal notices or +author attributions in that material or in the Appropriate Legal +Notices displayed by works containing it; or + +c) Prohibiting misrepresentation of the origin of that material, or +requiring that modified versions of such material be marked in +reasonable ways as different from the original version; or + +d) Limiting the use for publicity purposes of names of licensors or +authors of the material; or + +e) Declining to grant rights under trademark law for use of some +trade names, trademarks, or service marks; or + +f) Requiring indemnification of licensors and authors of that +material by anyone who conveys the material (or modified versions of +it) with contractual assumptions of liability to the recipient, for +any liability that these contractual assumptions directly impose on +those licensors and authors. + +All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + +8. Termination. + +You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + +However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + +9. Acceptance Not Required for Having Copies. + +You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + +10. Automatic Licensing of Downstream Recipients. + +Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + +An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + +11. Patents. + +A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + +A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + +In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + +If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + +A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + +12. No Surrender of Others' Freedom. + +If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + +13. Remote Network Interaction; Use with the GNU General Public License. + +Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + +Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + +14. Revised Versions of this License. + +The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + +If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + +Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + +15. Disclaimer of Warranty. + +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. Limitation of Liability. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + +17. Interpretation of Sections 15 and 16. + +If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + +Copyright (C) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + +If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + +You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/src/Bundle/ChillAsideActivityBundle/README.md b/src/Bundle/ChillAsideActivityBundle/README.md new file mode 100644 index 000000000..8a151c17e --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/README.md @@ -0,0 +1,3 @@ +# Aside activities module + +This module offers the possibility to add extra curricular activities per user (eg. administrative tasks, formation, meetings) not immediately related to client support. diff --git a/src/Bundle/ChillAsideActivityBundle/Repository/AsideActivityRepository.php b/src/Bundle/ChillAsideActivityBundle/Repository/AsideActivityRepository.php new file mode 100644 index 000000000..a11705db5 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/Repository/AsideActivityRepository.php @@ -0,0 +1,50 @@ +createQueryBuilder('a') + ->andWhere('a.exampleField = :val') + ->setParameter('val', $value) + ->orderBy('a.id', 'ASC') + ->setMaxResults(10) + ->getQuery() + ->getResult() + ; + } + */ + + /* + public function findOneBySomeField($value): ?AsideActivity + { + return $this->createQueryBuilder('a') + ->andWhere('a.exampleField = :val') + ->setParameter('val', $value) + ->getQuery() + ->getOneOrNullResult() + ; + } + */ +} \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/Repository/AsideActivityTypeRepository.php b/src/Bundle/ChillAsideActivityBundle/Repository/AsideActivityTypeRepository.php new file mode 100644 index 000000000..1942e8e32 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/Repository/AsideActivityTypeRepository.php @@ -0,0 +1,50 @@ +createQueryBuilder('a') + ->andWhere('a.exampleField = :val') + ->setParameter('val', $value) + ->orderBy('a.id', 'ASC') + ->setMaxResults(10) + ->getQuery() + ->getResult() + ; + } + */ + + /* + public function findOneBySomeField($value): ?AsideActivityType + { + return $this->createQueryBuilder('a') + ->andWhere('a.exampleField = :val') + ->setParameter('val', $value) + ->getQuery() + ->getOneOrNullResult() + ; + } + */ +} \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/chill.webpack.config.js b/src/Bundle/ChillAsideActivityBundle/chill.webpack.config.js new file mode 100644 index 000000000..98569ccae --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/chill.webpack.config.js @@ -0,0 +1,3 @@ +module.exports = function(encore, entries) { + entries.push(__dirname + '/Resources/public/index.js'); +}; diff --git a/src/Bundle/ChillAsideActivityBundle/composer.json b/src/Bundle/ChillAsideActivityBundle/composer.json new file mode 100644 index 000000000..8d4b22fd6 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/composer.json @@ -0,0 +1,94 @@ +{ + "name": "chill-project/chill-bundles", + "license": "AGPL-3.0-only", + "type": "library", + "description": "Most used bundles for chill-project", + "keywords": [ + "chill", + "social worker" + ], + "autoload": { + "psr-4": { + "Chill\\ActivityBundle\\": "src/Bundle/ChillActivityBundle", + "Chill\\BudgetBundle\\": "src/Bundle/ChillBudgetBundle", + "Chill\\CustomFieldsBundle\\": "src/Bundle/ChillCustomFieldsBundle", + "Chill\\DocStoreBundle\\": "src/Bundle/ChillDocStoreBundle", + "Chill\\EventBundle\\": "src/Bundle/ChillEventBundle", + "Chill\\FamilyMemberBundle\\": "src/Bundle/ChillFamilyMemberBundle", + "Chill\\MainBundle\\": "src/Bundle/ChillMainBundle", + "Chill\\PersonBundle\\": "src/Bundle/ChillPersonBundle", + "Chill\\ReportBundle\\": "src/Bundle/ChillReportBundle", + "Chill\\TaskBundle\\": "src/Bundle/ChillTaskBundle", + "Chill\\ThirdPartyBundle\\": "src/Bundle/ChillThirdPartyBundle", + "Chill\\AsideActivityBundle\\": "src/Bundle/ChillAsideActivityBundle" + } + }, + "autoload-dev": { + "psr-4": { + "App\\": "tests/app/src/" + } + }, + "require": { + "champs-libres/async-uploader-bundle": "dev-sf4", + "graylog2/gelf-php": "^1.5", + "symfony/form": "4.*", + "symfony/twig-bundle": "^4.4", + "twig/extra-bundle": "^2.12|^3.0", + "twig/twig": "^2.12|^3.0", + "composer/package-versions-deprecated": "^1.10", + "doctrine/doctrine-bundle": "^2.1", + "doctrine/doctrine-migrations-bundle": "^3.0", + "doctrine/orm": "^2.7", + "symfony/asset": "4.*", + "symfony/monolog-bundle": "^3.5", + "symfony/security-bundle": "4.*", + "symfony/translation": "4.*", + "symfony/validator": "4.*", + "sensio/framework-extra-bundle": "^5.5", + "symfony/yaml": "4.*", + "symfony/webpack-encore-bundle": "^1.11", + "knplabs/knp-menu": "^3.1", + "knplabs/knp-menu-bundle": "^3.0", + "symfony/templating": "4.*", + "twig/intl-extra": "^3.0", + "symfony/workflow": "4.*", + "symfony/expression-language": "4.*", + "knplabs/knp-time-bundle": "^1.12", + "symfony/intl": "4.*", + "symfony/swiftmailer-bundle": "^3.5", + "league/csv": "^9.6", + "phpoffice/phpspreadsheet": "^1.16", + "symfony/browser-kit": "^5.2", + "symfony/css-selector": "^5.2", + "twig/markdown-extra": "^3.3", + "erusev/parsedown": "^1.7", + "symfony/serializer": "^5.2", + "symfony/webpack-encore-bundle": "^1.11" + }, + "conflict": { + "symfony/symfony": "*" + }, + "require-dev": { + "fakerphp/faker": "^1.13", + "phpunit/phpunit": "^7.0", + "symfony/dotenv": "^5.1", + "symfony/maker-bundle": "^1.20", + "doctrine/doctrine-fixtures-bundle": "^3.3", + "symfony/stopwatch": "^5.1", + "symfony/web-profiler-bundle": "^5.0", + "symfony/var-dumper": "4.*", + "symfony/debug-bundle": "^5.1", + "symfony/phpunit-bridge": "^5.2", + "nelmio/alice": "^3.8" + }, + "scripts": { + "auto-scripts": { + "cache:clear": "symfony-cmd", + "assets:install %PUBLIC_DIR%": "symfony-cmd" + } + }, + "config": { + "vendor-dir": "tests/app/vendor", + "bin-dir": "bin" + } +} \ No newline at end of file From 10de2d796659bc2715f67505ff480bfc70518464 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 6 Jul 2021 14:08:44 +0200 Subject: [PATCH 002/100] start of AsideActivity entities --- .../ChillAsideActivityBundle.php | 9 -- .../Entity/AsideActivity.php | 42 -------- .../Entity/AsideActivityType.php | 100 ------------------ .../Repository/AsideActivityRepository.php | 50 --------- .../AsideActivityTypeRepository.php | 50 --------- 5 files changed, 251 deletions(-) delete mode 100644 src/Bundle/ChillAsideActivityBundle/ChillAsideActivityBundle.php delete mode 100644 src/Bundle/ChillAsideActivityBundle/Entity/AsideActivity.php delete mode 100644 src/Bundle/ChillAsideActivityBundle/Entity/AsideActivityType.php delete mode 100644 src/Bundle/ChillAsideActivityBundle/Repository/AsideActivityRepository.php delete mode 100644 src/Bundle/ChillAsideActivityBundle/Repository/AsideActivityTypeRepository.php diff --git a/src/Bundle/ChillAsideActivityBundle/ChillAsideActivityBundle.php b/src/Bundle/ChillAsideActivityBundle/ChillAsideActivityBundle.php deleted file mode 100644 index d5dc2cf9a..000000000 --- a/src/Bundle/ChillAsideActivityBundle/ChillAsideActivityBundle.php +++ /dev/null @@ -1,9 +0,0 @@ -id; - } - - public function getType(): ?AsideActivityType - { - return $this->type; - } - - public function setType(?AsideActivityType $type): self - { - $this->type = $type; - - return $this; - } -} \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/Entity/AsideActivityType.php b/src/Bundle/ChillAsideActivityBundle/Entity/AsideActivityType.php deleted file mode 100644 index 05a063892..000000000 --- a/src/Bundle/ChillAsideActivityBundle/Entity/AsideActivityType.php +++ /dev/null @@ -1,100 +0,0 @@ -asideActivities = new ArrayCollection(); - } - - public function getId(): ?int - { - return $this->id; - } - - public function getTitle(): ?string - { - return $this->title; - } - - public function setTitle(string $title): self - { - $this->title = $title; - - return $this; - } - - public function getIsActive(): ?bool - { - return $this->isActive; - } - - public function setIsActive(bool $isActive): self - { - $this->isActive = $isActive; - - return $this; - } - - /** - * @return Collection|AsideActivity[] - */ - public function getAsideActivities(): Collection - { - return $this->asideActivities; - } - - public function addAsideActivity(AsideActivity $asideActivity): self - { - if (!$this->asideActivities->contains($asideActivity)) { - $this->asideActivities[] = $asideActivity; - $asideActivity->setType($this); - } - - return $this; - } - - public function removeAsideActivity(AsideActivity $asideActivity): self - { - if ($this->asideActivities->removeElement($asideActivity)) { - // set the owning side to null (unless already changed) - if ($asideActivity->getType() === $this) { - $asideActivity->setType(null); - } - } - - return $this; - } -} \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/Repository/AsideActivityRepository.php b/src/Bundle/ChillAsideActivityBundle/Repository/AsideActivityRepository.php deleted file mode 100644 index a11705db5..000000000 --- a/src/Bundle/ChillAsideActivityBundle/Repository/AsideActivityRepository.php +++ /dev/null @@ -1,50 +0,0 @@ -createQueryBuilder('a') - ->andWhere('a.exampleField = :val') - ->setParameter('val', $value) - ->orderBy('a.id', 'ASC') - ->setMaxResults(10) - ->getQuery() - ->getResult() - ; - } - */ - - /* - public function findOneBySomeField($value): ?AsideActivity - { - return $this->createQueryBuilder('a') - ->andWhere('a.exampleField = :val') - ->setParameter('val', $value) - ->getQuery() - ->getOneOrNullResult() - ; - } - */ -} \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/Repository/AsideActivityTypeRepository.php b/src/Bundle/ChillAsideActivityBundle/Repository/AsideActivityTypeRepository.php deleted file mode 100644 index 1942e8e32..000000000 --- a/src/Bundle/ChillAsideActivityBundle/Repository/AsideActivityTypeRepository.php +++ /dev/null @@ -1,50 +0,0 @@ -createQueryBuilder('a') - ->andWhere('a.exampleField = :val') - ->setParameter('val', $value) - ->orderBy('a.id', 'ASC') - ->setMaxResults(10) - ->getQuery() - ->getResult() - ; - } - */ - - /* - public function findOneBySomeField($value): ?AsideActivityType - { - return $this->createQueryBuilder('a') - ->andWhere('a.exampleField = :val') - ->setParameter('val', $value) - ->getQuery() - ->getOneOrNullResult() - ; - } - */ -} \ No newline at end of file From eff1d6e797c90acfbcd95767952c523b1c5cdc58 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 6 Jul 2021 14:10:36 +0200 Subject: [PATCH 003/100] start of AsideActivity entities --- .../src/ChillAsideActivityBundle.php | 11 + .../ChillAsideActivityExtension.php | 33 +++ .../src/Entity/AsideActivity.php | 199 ++++++++++++++++++ .../src/Entity/AsideActivityType.php | 100 +++++++++ .../src/Form/AsideActivityType.php | 35 +++ .../Repository/AsideActivityRepository.php | 52 +++++ .../AsideActivityTypeRepository.php | 52 +++++ .../src/Resources/config/services.php | 14 ++ 8 files changed, 496 insertions(+) create mode 100644 src/Bundle/ChillAsideActivityBundle/src/ChillAsideActivityBundle.php create mode 100644 src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/ChillAsideActivityExtension.php create mode 100644 src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php create mode 100644 src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityType.php create mode 100644 src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityType.php create mode 100644 src/Bundle/ChillAsideActivityBundle/src/Repository/AsideActivityRepository.php create mode 100644 src/Bundle/ChillAsideActivityBundle/src/Repository/AsideActivityTypeRepository.php create mode 100644 src/Bundle/ChillAsideActivityBundle/src/Resources/config/services.php diff --git a/src/Bundle/ChillAsideActivityBundle/src/ChillAsideActivityBundle.php b/src/Bundle/ChillAsideActivityBundle/src/ChillAsideActivityBundle.php new file mode 100644 index 000000000..c9640d370 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/ChillAsideActivityBundle.php @@ -0,0 +1,11 @@ +load('services.php'); + } +} \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php new file mode 100644 index 000000000..3b6cd18d1 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php @@ -0,0 +1,199 @@ +id; + } + + public function getType(): ?AsideActivityType + { + return $this->type; + } + + public function setType(?AsideActivityType $type): self + { + $this->type = $type; + + return $this; + } + + public function getCreatedBy(): ?User + { + return $this->createdBy; + } + + public function setCreatedBy(?User $createdBy): self + { + $this->createdBy = $createdBy; + + return $this; + } + + public function getCreatedAt(): ?\DateTimeInterface + { + return $this->createdAt; + } + + public function setCreatedAt(\DateTimeInterface $createdAt): self + { + $this->createdAt = $createdAt; + + return $this; + } + + public function getUpdatedBy(): ?User + { + return $this->updatedBy; + } + + public function setUpdatedBy(?User $updatedBy): self + { + $this->updatedBy = $updatedBy; + + return $this; + } + + public function getUpdatedAt(): ?\DateTimeImmutable + { + return $this->updatedAt; + } + + public function setUpdatedAt(?\DateTimeImmutable $updatedAt): self + { + $this->updatedAt = $updatedAt; + + return $this; + } + + public function getAgent(): ?User + { + return $this->agent; + } + + public function setAgent(?User $agent): self + { + $this->agent = $agent; + + return $this; + } + + public function getDate(): ?\DateTimeInterface + { + return $this->date; + } + + public function setDate(\DateTimeInterface $date): self + { + $this->date = $date; + + return $this; + } + + public function getDuration(): ?\DateTimeInterface + { + return $this->duration; + } + + public function setDuration(?\DateTimeInterface $duration): self + { + $this->duration = $duration; + + return $this; + } + + public function getLocation(): ?string + { + return $this->location; + } + + public function setLocation(?string $location): self + { + $this->location = $location; + + return $this; + } + + public function getNote(): ?string + { + return $this->note; + } + + public function setNote(?string $note): self + { + $this->note = $note; + + return $this; + } +} \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityType.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityType.php new file mode 100644 index 000000000..ce94b4c93 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityType.php @@ -0,0 +1,100 @@ +asideActivities = new ArrayCollection(); + } + + public function getId(): ?int + { + return $this->id; + } + + public function getTitle(): ?string + { + return $this->title; + } + + public function setTitle(string $title): self + { + $this->title = $title; + + return $this; + } + + public function getIsActive(): ?bool + { + return $this->isActive; + } + + public function setIsActive(bool $isActive): self + { + $this->isActive = $isActive; + + return $this; + } + + /** + * @return Collection|AsideActivity[] + */ + public function getAsideActivities(): Collection + { + return $this->asideActivities; + } + + public function addAsideActivity(AsideActivity $asideActivity): self + { + if (!$this->asideActivities->contains($asideActivity)) { + $this->asideActivities[] = $asideActivity; + $asideActivity->setType($this); + } + + return $this; + } + + public function removeAsideActivity(AsideActivity $asideActivity): self + { + if ($this->asideActivities->removeElement($asideActivity)) { + // set the owning side to null (unless already changed) + if ($asideActivity->getType() === $this) { + $asideActivity->setType(null); + } + } + + return $this; + } +} \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityType.php b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityType.php new file mode 100644 index 000000000..6497c25c0 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityType.php @@ -0,0 +1,35 @@ +add('date', DateType::class, [ + 'label' => 'Nom' + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver + ->setDefault('class', \Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive::class) + ; + } +} \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/src/Repository/AsideActivityRepository.php b/src/Bundle/ChillAsideActivityBundle/src/Repository/AsideActivityRepository.php new file mode 100644 index 000000000..054259b63 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/Repository/AsideActivityRepository.php @@ -0,0 +1,52 @@ +repository = $entityManager->getRepository(AsideActivity::class); + } + + public function find($id): ?AsideActivity + { + return $this->repository->find($id); + } + + /** + * @return AsideActivity[] + */ + public function findAll(): array + { + return $this->repository->findAll(); + } + + /** + * @return AsideActivity[] + */ + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array + { + return $this->repository->findBy($criteria, $orderBy, $limit, $offset); + } + + public function findOneBy(array $criteria): ?AsideActivity + { + return $this->repository->findOneBy($criteria); + } + + public function getClassName(): string + { + return AsideActivity::class; + } + +} \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/src/Repository/AsideActivityTypeRepository.php b/src/Bundle/ChillAsideActivityBundle/src/Repository/AsideActivityTypeRepository.php new file mode 100644 index 000000000..8cb2daad9 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/Repository/AsideActivityTypeRepository.php @@ -0,0 +1,52 @@ +repository = $entityManager->getRepository(AsideActivityType::class); + } + + + public function find($id): ?AsideActivityType + { + return $this->repository->find($id); + } + + /** + * @return AsideActivityType[] + */ + public function findAll(): array + { + return $this->repository->findAll(); + } + + /** + * @return AsideActivityType[] + */ + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array + { + return $this->repository->findBy($criteria, $orderBy, $limit, $offset); + } + + public function findOneBy(array $criteria): ?AsideActivityType + { + return $this->repository->findOneBy($criteria); + } + + public function getClassName(): string + { + return AsideActivityType::class; + } +} \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/config/services.php b/src/Bundle/ChillAsideActivityBundle/src/Resources/config/services.php new file mode 100644 index 000000000..827fa1765 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/config/services.php @@ -0,0 +1,14 @@ + Date: Tue, 6 Jul 2021 14:11:06 +0200 Subject: [PATCH 004/100] changes to composer.json --- composer.json | 15 +-- .../chill.webpack.config.js | 3 - .../ChillAsideActivityBundle/composer.json | 94 ------------------- 3 files changed, 9 insertions(+), 103 deletions(-) delete mode 100644 src/Bundle/ChillAsideActivityBundle/chill.webpack.config.js delete mode 100644 src/Bundle/ChillAsideActivityBundle/composer.json diff --git a/composer.json b/composer.json index fb0d2dcd1..dd761a99d 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,10 @@ "license": "AGPL-3.0-only", "type": "library", "description": "Most used bundles for chill-project", - "keywords": ["chill", "social worker"], + "keywords": [ + "chill", + "social worker" + ], "autoload": { "psr-4": { "Chill\\ActivityBundle\\": "src/Bundle/ChillActivityBundle", @@ -16,12 +19,13 @@ "Chill\\PersonBundle\\": "src/Bundle/ChillPersonBundle", "Chill\\ReportBundle\\": "src/Bundle/ChillReportBundle", "Chill\\TaskBundle\\": "src/Bundle/ChillTaskBundle", - "Chill\\ThirdPartyBundle\\": "src/Bundle/ChillThirdPartyBundle" + "Chill\\ThirdPartyBundle\\": "src/Bundle/ChillThirdPartyBundle", + "Chill\\AsideActivityBundle\\": "src/Bundle/ChillAsideActivityBundle/src" } }, "autoload-dev": { "psr-4": { - "App\\": "tests/app/src/" + "App\\": "tests/app/src/" } }, "require": { @@ -84,7 +88,6 @@ } }, "config": { - "vendor-dir": "tests/app/vendor", - "bin-dir": "bin" + "bin-dir": "bin" } -} +} \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/chill.webpack.config.js b/src/Bundle/ChillAsideActivityBundle/chill.webpack.config.js deleted file mode 100644 index 98569ccae..000000000 --- a/src/Bundle/ChillAsideActivityBundle/chill.webpack.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function(encore, entries) { - entries.push(__dirname + '/Resources/public/index.js'); -}; diff --git a/src/Bundle/ChillAsideActivityBundle/composer.json b/src/Bundle/ChillAsideActivityBundle/composer.json deleted file mode 100644 index 8d4b22fd6..000000000 --- a/src/Bundle/ChillAsideActivityBundle/composer.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "name": "chill-project/chill-bundles", - "license": "AGPL-3.0-only", - "type": "library", - "description": "Most used bundles for chill-project", - "keywords": [ - "chill", - "social worker" - ], - "autoload": { - "psr-4": { - "Chill\\ActivityBundle\\": "src/Bundle/ChillActivityBundle", - "Chill\\BudgetBundle\\": "src/Bundle/ChillBudgetBundle", - "Chill\\CustomFieldsBundle\\": "src/Bundle/ChillCustomFieldsBundle", - "Chill\\DocStoreBundle\\": "src/Bundle/ChillDocStoreBundle", - "Chill\\EventBundle\\": "src/Bundle/ChillEventBundle", - "Chill\\FamilyMemberBundle\\": "src/Bundle/ChillFamilyMemberBundle", - "Chill\\MainBundle\\": "src/Bundle/ChillMainBundle", - "Chill\\PersonBundle\\": "src/Bundle/ChillPersonBundle", - "Chill\\ReportBundle\\": "src/Bundle/ChillReportBundle", - "Chill\\TaskBundle\\": "src/Bundle/ChillTaskBundle", - "Chill\\ThirdPartyBundle\\": "src/Bundle/ChillThirdPartyBundle", - "Chill\\AsideActivityBundle\\": "src/Bundle/ChillAsideActivityBundle" - } - }, - "autoload-dev": { - "psr-4": { - "App\\": "tests/app/src/" - } - }, - "require": { - "champs-libres/async-uploader-bundle": "dev-sf4", - "graylog2/gelf-php": "^1.5", - "symfony/form": "4.*", - "symfony/twig-bundle": "^4.4", - "twig/extra-bundle": "^2.12|^3.0", - "twig/twig": "^2.12|^3.0", - "composer/package-versions-deprecated": "^1.10", - "doctrine/doctrine-bundle": "^2.1", - "doctrine/doctrine-migrations-bundle": "^3.0", - "doctrine/orm": "^2.7", - "symfony/asset": "4.*", - "symfony/monolog-bundle": "^3.5", - "symfony/security-bundle": "4.*", - "symfony/translation": "4.*", - "symfony/validator": "4.*", - "sensio/framework-extra-bundle": "^5.5", - "symfony/yaml": "4.*", - "symfony/webpack-encore-bundle": "^1.11", - "knplabs/knp-menu": "^3.1", - "knplabs/knp-menu-bundle": "^3.0", - "symfony/templating": "4.*", - "twig/intl-extra": "^3.0", - "symfony/workflow": "4.*", - "symfony/expression-language": "4.*", - "knplabs/knp-time-bundle": "^1.12", - "symfony/intl": "4.*", - "symfony/swiftmailer-bundle": "^3.5", - "league/csv": "^9.6", - "phpoffice/phpspreadsheet": "^1.16", - "symfony/browser-kit": "^5.2", - "symfony/css-selector": "^5.2", - "twig/markdown-extra": "^3.3", - "erusev/parsedown": "^1.7", - "symfony/serializer": "^5.2", - "symfony/webpack-encore-bundle": "^1.11" - }, - "conflict": { - "symfony/symfony": "*" - }, - "require-dev": { - "fakerphp/faker": "^1.13", - "phpunit/phpunit": "^7.0", - "symfony/dotenv": "^5.1", - "symfony/maker-bundle": "^1.20", - "doctrine/doctrine-fixtures-bundle": "^3.3", - "symfony/stopwatch": "^5.1", - "symfony/web-profiler-bundle": "^5.0", - "symfony/var-dumper": "4.*", - "symfony/debug-bundle": "^5.1", - "symfony/phpunit-bridge": "^5.2", - "nelmio/alice": "^3.8" - }, - "scripts": { - "auto-scripts": { - "cache:clear": "symfony-cmd", - "assets:install %PUBLIC_DIR%": "symfony-cmd" - } - }, - "config": { - "vendor-dir": "tests/app/vendor", - "bin-dir": "bin" - } -} \ No newline at end of file From 8389afb4a834ee46c3babbb3394f108e4502b8b1 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 6 Jul 2021 15:56:21 +0200 Subject: [PATCH 005/100] first migration: creation entities AsideActivity(Type) --- .../src/migrations/Version20210706124644.php | 220 ++++++++++++++++++ 1 file changed, 220 insertions(+) create mode 100644 src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210706124644.php diff --git a/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210706124644.php b/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210706124644.php new file mode 100644 index 000000000..77e2b76ce --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210706124644.php @@ -0,0 +1,220 @@ +addSql('CREATE SEQUENCE AsideActivity_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE AsideActivityType_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE TABLE AsideActivity (id INT NOT NULL, type_id INT NOT NULL, agent_id INT NOT NULL, createdAt TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, updatedAt TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, date TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, duration TIME(0) WITHOUT TIME ZONE DEFAULT NULL, location VARCHAR(100) DEFAULT NULL, note TEXT DEFAULT NULL, createdBy_id INT NOT NULL, updatedBy_id INT DEFAULT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE INDEX IDX_E9FA2191C54C8C93 ON AsideActivity (type_id)'); + $this->addSql('CREATE INDEX IDX_E9FA21913174800F ON AsideActivity (createdBy_id)'); + $this->addSql('CREATE INDEX IDX_E9FA219165FF1AEC ON AsideActivity (updatedBy_id)'); + $this->addSql('CREATE INDEX IDX_E9FA21913414710B ON AsideActivity (agent_id)'); + $this->addSql('COMMENT ON COLUMN AsideActivity.updatedAt IS \'(DC2Type:datetime_immutable)\''); + $this->addSql('CREATE TABLE AsideActivityType (id INT NOT NULL, title VARCHAR(255) NOT NULL, isActive BOOLEAN NOT NULL, PRIMARY KEY(id))'); + $this->addSql('ALTER TABLE AsideActivity ADD CONSTRAINT FK_E9FA2191C54C8C93 FOREIGN KEY (type_id) REFERENCES AsideActivityType (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE AsideActivity ADD CONSTRAINT FK_E9FA21913174800F FOREIGN KEY (createdBy_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE AsideActivity ADD CONSTRAINT FK_E9FA219165FF1AEC FOREIGN KEY (updatedBy_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE AsideActivity ADD CONSTRAINT FK_E9FA21913414710B FOREIGN KEY (agent_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + // this up() migration is auto-generated, please modify it to your needs + + // $this->addSql('DROP TABLE chill_main_address_legacy'); + // $this->addSql('ALTER INDEX idx_55026b0ca76ed395 RENAME TO IDX_AC74095AA76ED395'); + // $this->addSql('ALTER INDEX idx_55026b0cc54c8c93 RENAME TO IDX_AC74095AC54C8C93'); + // $this->addSql('ALTER INDEX idx_55026b0c682b5931 RENAME TO IDX_AC74095A682B5931'); + // $this->addSql('ALTER INDEX idx_55026b0c217bbb47 RENAME TO IDX_AC74095A217BBB47'); + // $this->addSql('ALTER INDEX idx_ac74095a550b0c53 RENAME TO IDX_AC74095AD7FA8EF0'); + // $this->addSql('ALTER TABLE activityreason ALTER name SET NOT NULL'); + // $this->addSql('COMMENT ON COLUMN activityreason.name IS \'(DC2Type:json_array)\''); + // $this->addSql('ALTER INDEX idx_654a2fcd12469de2 RENAME TO IDX_AF82522312469DE2'); + // $this->addSql('ALTER TABLE activityreasoncategory ALTER name SET NOT NULL'); + // $this->addSql('COMMENT ON COLUMN activityreasoncategory.name IS \'(DC2Type:json_array)\''); + // $this->addSql('ALTER TABLE activitytype ALTER category_id DROP DEFAULT'); + // $this->addSql('ALTER TABLE chill_main_address DROP customs'); + // $this->addSql('ALTER TABLE chill_main_address ALTER isnoaddress DROP DEFAULT'); + // $this->addSql('ALTER TABLE chill_main_address ALTER point TYPE geometry(POINT,4326)'); + // $this->addSql('ALTER TABLE chill_main_address ALTER point DROP DEFAULT'); + // $this->addSql('ALTER TABLE chill_main_address_reference ALTER point TYPE geometry(POINT,4326)'); + // $this->addSql('ALTER TABLE chill_main_address_reference ALTER point DROP DEFAULT'); + // $this->addSql('CREATE INDEX search_name_code ON chill_main_postal_code (code, label)'); + // $this->addSql('ALTER INDEX idx_64a4a621504cb38d RENAME TO IDX_E260A868504CB38D'); + // $this->addSql('ALTER TABLE chill_person_accompanying_period_closingmotive ALTER ordering DROP DEFAULT'); + // $this->addSql('ALTER INDEX idx_92351ece727aca70 RENAME TO IDX_72D110E8727ACA70'); + // $this->addSql('ALTER TABLE chill_person_accompanying_period_participation ALTER startdate DROP DEFAULT'); + // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER startdate TYPE DATE'); + // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER startdate DROP DEFAULT'); + // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER enddate TYPE DATE'); + // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER enddate DROP DEFAULT'); + // $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work.startDate IS \'(DC2Type:date_immutable)\''); + // $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work.endDate IS \'(DC2Type:date_immutable)\''); + // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ADD CONSTRAINT FK_B694FB365FF1AEC FOREIGN KEY (updatedBy_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + // $this->addSql('CREATE INDEX IDX_B694FB365FF1AEC ON chill_person_accompanying_period_work (updatedBy_id)'); + // $this->addSql('ALTER TABLE chill_person_household DROP CONSTRAINT fk_household_comment_embeddable_user'); + // $this->addSql('DROP INDEX IDX_BE50A270116F5FA9'); + // $this->addSql('DROP INDEX household_members_not_overlaps'); + // $this->addSql('ALTER TABLE chill_person_household_members ALTER startdate TYPE DATE'); + // $this->addSql('ALTER TABLE chill_person_household_members ALTER startdate DROP DEFAULT'); + // $this->addSql('ALTER TABLE chill_person_household_members ALTER enddate TYPE DATE'); + // $this->addSql('ALTER TABLE chill_person_household_members ALTER enddate DROP DEFAULT'); + // $this->addSql('COMMENT ON COLUMN chill_person_household_members.startDate IS \'(DC2Type:date_immutable)\''); + // $this->addSql('COMMENT ON COLUMN chill_person_household_members.endDate IS \'(DC2Type:date_immutable)\''); + // $this->addSql('ALTER TABLE chill_person_marital_status ALTER id TYPE VARCHAR(7)'); + // $this->addSql('COMMENT ON COLUMN chill_person_marital_status.name IS \'(DC2Type:json_array)\''); + // $this->addSql('DROP INDEX mobilenumber_trgm_idx'); + // $this->addSql('DROP INDEX fullnamecanonical_trgm_idx'); + // $this->addSql('DROP INDEX phonenumber_trgm_idx'); + // $this->addSql('ALTER TABLE chill_person_person DROP cfdata_old'); + // $this->addSql('ALTER TABLE chill_person_person ALTER maritalstatus_id TYPE VARCHAR(7)'); + // $this->addSql('ALTER TABLE chill_person_person ALTER cfdata SET NOT NULL'); + // $this->addSql('COMMENT ON COLUMN chill_person_person.cFData IS \'(DC2Type:json_array)\''); + // $this->addSql('ALTER INDEX idx_3370d4403818da5 RENAME TO IDX_BF210A143818DA5'); + // $this->addSql('ALTER INDEX idx_3370d4401c9da55 RENAME TO IDX_BF210A141C9DA55'); + // $this->addSql('ALTER INDEX idx_bf210a145521be40 RENAME TO IDX_BF210A14D7D03CE3'); + // $this->addSql('ALTER INDEX idx_person_center RENAME TO IDX_BF210A145932F377'); + // $this->addSql('ALTER TABLE persons_spoken_languages DROP CONSTRAINT FK_7201106F217BBB47'); + // $this->addSql('ALTER TABLE persons_spoken_languages DROP CONSTRAINT FK_7201106F82F1BAF4'); + // $this->addSql('ALTER TABLE persons_spoken_languages ADD CONSTRAINT FK_7201106F217BBB47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + // $this->addSql('ALTER TABLE persons_spoken_languages ADD CONSTRAINT FK_7201106F82F1BAF4 FOREIGN KEY (language_id) REFERENCES language (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + // $this->addSql('ALTER TABLE chill_person_social_action ALTER defaultnotificationdelay SET NOT NULL'); + // $this->addSql('ALTER TABLE chill_person_social_work_evaluation ALTER delay SET NOT NULL'); + // $this->addSql('ALTER TABLE chill_person_social_work_evaluation ALTER notificationdelay SET NOT NULL'); + // $this->addSql('COMMENT ON COLUMN country.name IS \'(DC2Type:json_array)\''); + // $this->addSql('ALTER TABLE custom_field_long_choice_options ALTER internal_key DROP DEFAULT'); + // $this->addSql('COMMENT ON COLUMN custom_field_long_choice_options.text IS \'(DC2Type:json_array)\''); + // $this->addSql('ALTER TABLE customfield ALTER required DROP DEFAULT'); + // $this->addSql('ALTER TABLE customfield ALTER required SET NOT NULL'); + // $this->addSql('COMMENT ON COLUMN customfield.name IS \'(DC2Type:json_array)\''); + // $this->addSql('COMMENT ON COLUMN customfield.options IS \'(DC2Type:json_array)\''); + // $this->addSql('ALTER INDEX idx_40fb5d6dfec418b RENAME TO IDX_7A6FDBEFEC418B'); + // $this->addSql('ALTER INDEX idx_286dc95df53b66 RENAME TO IDX_7A48DF7F5DF53B66'); + // $this->addSql('ALTER TABLE customfieldsgroup ALTER options DROP DEFAULT'); + // $this->addSql('ALTER TABLE customfieldsgroup ALTER options SET NOT NULL'); + // $this->addSql('COMMENT ON COLUMN customfieldsgroup.name IS \'(DC2Type:json_array)\''); + // $this->addSql('COMMENT ON COLUMN customfieldsgroup.options IS \'(DC2Type:json_array)\''); + // $this->addSql('ALTER INDEX idx_a14d8f3d447bbb3b RENAME TO IDX_A14D8F3D96DF1F10'); + // $this->addSql('COMMENT ON COLUMN language.name IS \'(DC2Type:json_array)\''); + // $this->addSql('ALTER TABLE permission_groups ALTER flags DROP DEFAULT'); + // $this->addSql('COMMENT ON COLUMN scopes.name IS \'(DC2Type:json_array)\''); + // $this->addSql('ALTER INDEX chill_3party.idx_c65d4397c7d3a8e6 RENAME TO IDX_14DC4475C7D3A8E6'); + // $this->addSql('ALTER INDEX chill_3party.idx_c65d43975932f377 RENAME TO IDX_14DC44755932F377'); + // $this->addSql('ALTER TABLE users ALTER usernamecanonical SET NOT NULL'); + // $this->addSql('DROP INDEX uniq_93f763ae217bbb47'); + // $this->addSql('ALTER TABLE chill_vendee.vendeeperson_entourage ADD CONSTRAINT FK_4D319FFEF57537C3 FOREIGN KEY (vendeeperson_id) REFERENCES chill_vendee.vendee_person (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + // $this->addSql('ALTER INDEX chill_vendee.idx_1a4b602deef79338 RENAME TO IDX_DD0A4C00EEF79338'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE AsideActivity DROP CONSTRAINT FK_E9FA2191C54C8C93'); + $this->addSql('DROP SEQUENCE AsideActivity_id_seq CASCADE'); + $this->addSql('DROP SEQUENCE AsideActivityType_id_seq CASCADE'); + // $this->addSql('CREATE TABLE chill_main_address_legacy (id INT DEFAULT NULL, postcode_id INT DEFAULT NULL, street VARCHAR(255) DEFAULT NULL, streetnumber VARCHAR(255) DEFAULT NULL, validfrom DATE DEFAULT NULL, isnoaddress BOOLEAN DEFAULT NULL, customs JSONB DEFAULT NULL, floor VARCHAR(16) DEFAULT NULL, corridor VARCHAR(16) DEFAULT NULL, steps VARCHAR(16) DEFAULT NULL, buildingname VARCHAR(255) DEFAULT NULL, flat VARCHAR(16) DEFAULT NULL, distribution VARCHAR(255) DEFAULT NULL, extra VARCHAR(255) DEFAULT NULL, validto DATE DEFAULT NULL, point VARCHAR(255) DEFAULT NULL, linkedtothirdparty_id INT DEFAULT NULL)'); + $this->addSql('DROP TABLE AsideActivity'); + $this->addSql('DROP TABLE AsideActivityType'); + /* + $this->addSql('CREATE SCHEMA public'); + + $this->addSql('COMMENT ON COLUMN scopes.name IS NULL'); + $this->addSql('ALTER INDEX idx_7a48df7f5df53b66 RENAME TO idx_286dc95df53b66'); + $this->addSql('COMMENT ON COLUMN country.name IS NULL'); + $this->addSql('ALTER TABLE persons_spoken_languages DROP CONSTRAINT fk_7201106f217bbb47'); + $this->addSql('ALTER TABLE persons_spoken_languages DROP CONSTRAINT fk_7201106f82f1baf4'); + $this->addSql('ALTER TABLE persons_spoken_languages ADD CONSTRAINT fk_7201106f217bbb47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE persons_spoken_languages ADD CONSTRAINT fk_7201106f82f1baf4 FOREIGN KEY (language_id) REFERENCES language (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('COMMENT ON COLUMN language.name IS NULL'); + $this->addSql('ALTER TABLE customfieldsgroup ALTER options SET DEFAULT \'{}\''); + $this->addSql('ALTER TABLE customfieldsgroup ALTER options DROP NOT NULL'); + $this->addSql('COMMENT ON COLUMN customfieldsgroup.name IS NULL'); + $this->addSql('COMMENT ON COLUMN customfieldsgroup.options IS NULL'); + $this->addSql('ALTER TABLE activityreasoncategory ALTER name DROP NOT NULL'); + $this->addSql('COMMENT ON COLUMN activityreasoncategory.name IS NULL'); + $this->addSql('ALTER TABLE activityreason ALTER name DROP NOT NULL'); + $this->addSql('COMMENT ON COLUMN activityreason.name IS NULL'); + $this->addSql('ALTER INDEX idx_af82522312469de2 RENAME TO idx_654a2fcd12469de2'); + $this->addSql('ALTER INDEX idx_a14d8f3d96df1f10 RENAME TO idx_a14d8f3d447bbb3b'); + $this->addSql('ALTER TABLE customfield ALTER required SET DEFAULT \'false\''); + $this->addSql('ALTER TABLE customfield ALTER required DROP NOT NULL'); + $this->addSql('COMMENT ON COLUMN customfield.options IS NULL'); + $this->addSql('COMMENT ON COLUMN customfield.name IS NULL'); + $this->addSql('ALTER INDEX idx_7a6fdbefec418b RENAME TO idx_40fb5d6dfec418b'); + $this->addSql('ALTER TABLE custom_field_long_choice_options ALTER internal_key SET DEFAULT \'\''); + $this->addSql('COMMENT ON COLUMN custom_field_long_choice_options.text IS NULL'); + $this->addSql('ALTER TABLE chill_person_marital_status ALTER id TYPE VARCHAR(10)'); + $this->addSql('COMMENT ON COLUMN chill_person_marital_status.name IS NULL'); + $this->addSql('ALTER TABLE permission_groups ALTER flags SET DEFAULT \'[]\''); + $this->addSql('ALTER INDEX chill_3party.idx_14dc4475c7d3a8e6 RENAME TO idx_c65d4397c7d3a8e6'); + $this->addSql('ALTER INDEX chill_3party.idx_14dc44755932f377 RENAME TO idx_c65d43975932f377'); + $this->addSql('ALTER TABLE users ALTER usernameCanonical DROP NOT NULL'); + $this->addSql('ALTER TABLE chill_person_accompanying_period_closingmotive ALTER ordering SET DEFAULT \'0\''); + $this->addSql('ALTER INDEX idx_72d110e8727aca70 RENAME TO idx_92351ece727aca70'); + $this->addSql('ALTER TABLE chill_person_accompanying_period_participation ALTER startDate SET DEFAULT \'1970-01-01\''); + $this->addSql('ALTER TABLE chill_person_social_action ALTER defaultNotificationDelay DROP NOT NULL'); + $this->addSql('ALTER TABLE chill_person_social_work_evaluation ALTER delay DROP NOT NULL'); + $this->addSql('ALTER TABLE chill_person_social_work_evaluation ALTER notificationDelay DROP NOT NULL'); + $this->addSql('ALTER TABLE chill_main_address_reference ALTER point TYPE VARCHAR(255)'); + $this->addSql('ALTER TABLE chill_main_address_reference ALTER point DROP DEFAULT'); + $this->addSql('ALTER TABLE chill_main_address ADD customs JSONB DEFAULT \'[]\''); + $this->addSql('ALTER TABLE chill_main_address ALTER isNoAddress SET DEFAULT \'false\''); + $this->addSql('ALTER TABLE chill_main_address ALTER point TYPE VARCHAR(255)'); + $this->addSql('ALTER TABLE chill_main_address ALTER point DROP DEFAULT'); + $this->addSql('ALTER INDEX idx_e260a868504cb38d RENAME TO idx_64a4a621504cb38d'); + $this->addSql('ALTER INDEX idx_ac74095aa76ed395 RENAME TO idx_55026b0ca76ed395'); + $this->addSql('ALTER INDEX idx_ac74095a682b5931 RENAME TO idx_55026b0c682b5931'); + $this->addSql('ALTER INDEX idx_ac74095a217bbb47 RENAME TO idx_55026b0c217bbb47'); + $this->addSql('ALTER INDEX idx_ac74095ac54c8c93 RENAME TO idx_55026b0cc54c8c93'); + $this->addSql('ALTER INDEX idx_ac74095ad7fa8ef0 RENAME TO IDX_AC74095A550B0C53'); + $this->addSql('ALTER TABLE chill_person_household_members ALTER startDate TYPE DATE'); + $this->addSql('ALTER TABLE chill_person_household_members ALTER startDate DROP DEFAULT'); + $this->addSql('ALTER TABLE chill_person_household_members ALTER endDate TYPE DATE'); + $this->addSql('ALTER TABLE chill_person_household_members ALTER endDate DROP DEFAULT'); + $this->addSql('COMMENT ON COLUMN chill_person_household_members.startdate IS NULL'); + $this->addSql('COMMENT ON COLUMN chill_person_household_members.enddate IS NULL'); + $this->addSql('CREATE INDEX household_members_not_overlaps ON chill_person_household_members (person_id) WHERE (sharedhousehold IS TRUE)'); + $this->addSql('ALTER TABLE activitytype ALTER category_id SET DEFAULT 1'); + $this->addSql('ALTER TABLE chill_person_household ADD CONSTRAINT fk_household_comment_embeddable_user FOREIGN KEY (comment_members_userid) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('CREATE INDEX IDX_BE50A270116F5FA9 ON chill_person_household (comment_members_userid)'); + $this->addSql('DROP INDEX search_name_code'); + $this->addSql('ALTER TABLE chill_person_person ADD cfdata_old TEXT DEFAULT NULL'); + $this->addSql('ALTER TABLE chill_person_person ALTER cFData DROP NOT NULL'); + $this->addSql('ALTER TABLE chill_person_person ALTER maritalStatus_id TYPE VARCHAR(10)'); + $this->addSql('COMMENT ON COLUMN chill_person_person.cfdata_old IS \'(DC2Type:array)\''); + $this->addSql('COMMENT ON COLUMN chill_person_person.cfdata IS NULL'); + $this->addSql('CREATE INDEX mobilenumber_trgm_idx ON chill_person_person (mobilenumber)'); + $this->addSql('CREATE INDEX fullnamecanonical_trgm_idx ON chill_person_person (fullnamecanonical)'); + $this->addSql('CREATE INDEX phonenumber_trgm_idx ON chill_person_person (phonenumber)'); + $this->addSql('ALTER INDEX idx_bf210a141c9da55 RENAME TO idx_3370d4401c9da55'); + $this->addSql('ALTER INDEX idx_bf210a143818da5 RENAME TO idx_3370d4403818da5'); + $this->addSql('ALTER INDEX idx_bf210a145932f377 RENAME TO idx_person_center'); + $this->addSql('ALTER INDEX idx_bf210a14d7d03ce3 RENAME TO IDX_BF210A145521BE40'); + $this->addSql('ALTER TABLE chill_person_accompanying_period_work DROP CONSTRAINT FK_B694FB365FF1AEC'); + $this->addSql('DROP INDEX IDX_B694FB365FF1AEC'); + $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER startDate TYPE TIMESTAMP(0) WITHOUT TIME ZONE'); + $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER startDate DROP DEFAULT'); + $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER endDate TYPE TIMESTAMP(0) WITHOUT TIME ZONE'); + $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER endDate DROP DEFAULT'); + $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work.startdate IS \'(DC2Type:datetime_immutable)\''); + $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work.enddate IS \'(DC2Type:datetime_immutable)\''); + $this->addSql('CREATE UNIQUE INDEX uniq_93f763ae217bbb47 ON chill_vendee.vendee_person (person_id)'); + $this->addSql('ALTER TABLE chill_vendee.vendeeperson_entourage DROP CONSTRAINT FK_4D319FFEF57537C3'); + $this->addSql('ALTER INDEX chill_vendee.idx_dd0a4c00eef79338 RENAME TO idx_1a4b602deef79338'); + */ + } +} \ No newline at end of file From e7c76734a6b9d7e459870db80c24990446909c3c Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 6 Jul 2021 15:56:55 +0200 Subject: [PATCH 006/100] start form --- .../src/Form/AsideActivityType.php | 61 +++++++++++++++---- 1 file changed, 49 insertions(+), 12 deletions(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityType.php b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityType.php index 6497c25c0..00c227bcb 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityType.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityType.php @@ -2,34 +2,71 @@ namespace Chill\AsideActivityBundle\Form; +use Chill\MainBundle\Entity\User; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; -use Chill\PersonBundle\Form\Type\ClosingMotivePickerType; -use Chill\MainBundle\Form\Type\TranslatableStringFormType; -use Symfony\Component\Form\Extension\Core\Type\CheckboxType; -use Symfony\Component\Form\Extension\Core\Type\NumberType; use Symfony\Component\Form\Extension\Core\Type\DateType; +use Symfony\Component\Form\Extension\Core\Type\NumberType; +use Symfony\Component\Form\Extension\Core\Type\TextareaType; +use Symfony\Component\Form\Extension\Core\Type\TextType; /** * * */ -class ClosingMotiveType extends AbstractType +class AsideActivityType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { $builder - ->add('date', DateType::class, [ - 'label' => 'Nom' + ->add('createdBy', 'entity', + array( + 'class' => User::class, + 'choice_label' => 'username' + ), + [ + 'label' => 'Utilisateur', + 'required' => true ]) - ; + ->add('agent', 'entity', + array( + 'class' => User::class, + 'choice_label' => 'username' + ), + [ + 'label' => 'Agent', + 'required' => true + ]) + ->add('type', 'entity', + array( + 'class' => AsideActivityType::class, + 'choice_label' => 'title' + ), + [ + 'label' => 'Type', + 'required' => true + ]) + ->add('date', DateType::class, [ + 'label' => 'Date', + 'required' => true + ]) + ->add('duration', NumberType::class, [ + 'label' => 'Durée' + ]) + ->add('location', TextType::class, [ + 'label' => 'Lieu' + ]) + ->add('note', TextareaType::class, [ + 'label' => 'Note' + ]) +; } - public function configureOptions(OptionsResolver $resolver) + public function configureOptions(OptionsResolver $resolver): void { - $resolver - ->setDefault('class', \Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive::class) - ; + $resolver->setDefaults([ + 'data_class' => AsideActivity::class, + ]); } } \ No newline at end of file From ea2d6eac7b07db7d32bfbce58b224157b1f4c3ca Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 7 Jul 2021 16:24:41 +0200 Subject: [PATCH 007/100] AsideActivityType entity changed to AsideActivityCategory + building forms for both entities --- .../Controller/AsideActivityController.php | 17 +++++++++ .../src/Entity/AsideActivity.php | 11 +++--- ...vityType.php => AsideActivityCategory.php} | 7 ++-- .../src/Form/AsideActivityCategoryType.php | 25 +++++++++++++ .../src/Form/AsideActivityType.php | 36 ++++++++----------- ...hp => AsideActivityCategoryRepository.php} | 16 ++++----- .../src/Templates/asideActivity_new.html.twig | 11 ++++++ 7 files changed, 84 insertions(+), 39 deletions(-) create mode 100644 src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityController.php rename src/Bundle/ChillAsideActivityBundle/src/Entity/{AsideActivityType.php => AsideActivityCategory.php} (93%) create mode 100644 src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityCategoryType.php rename src/Bundle/ChillAsideActivityBundle/src/Repository/{AsideActivityTypeRepository.php => AsideActivityCategoryRepository.php} (69%) create mode 100644 src/Bundle/ChillAsideActivityBundle/src/Templates/asideActivity_new.html.twig diff --git a/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityController.php b/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityController.php new file mode 100644 index 000000000..9642257c4 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityController.php @@ -0,0 +1,17 @@ +createForm(AsideActivityType::class); + + return $this->render('asideActivity_new.html.twig', [ + 'asideActivityForm' => $form->createView(), + ]); + } +} diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php index 3b6cd18d1..3a16a8df0 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php @@ -2,8 +2,6 @@ namespace Chill\AsideActivityBundle\Entity; -use Chill\AsideActivityBundle\Repository\AsideActivityRepository; -use Chill\AsideActivityBundle\Entity\AsideActivityType; use Chill\MainBundle\Entity\User; use Doctrine\ORM\Mapping as ORM; @@ -20,7 +18,7 @@ class AsideActivity private $id; /** - * @ORM\ManyToOne(targetEntity=AsideActivityType::class, inversedBy="asideActivities") + * @ORM\ManyToOne(targetEntity=AsideActivityCategory::class, inversedBy="asideActivities") * @ORM\JoinColumn(nullable=false) */ private $type; @@ -49,6 +47,7 @@ class AsideActivity /** * @ORM\ManyToOne(targetEntity=User::class) * @ORM\JoinColumn(nullable=false) + * @Assert\NotBlank(message="Vous devez choisir un agent") */ private $agent; @@ -77,12 +76,12 @@ class AsideActivity return $this->id; } - public function getType(): ?AsideActivityType + public function getType(): ?AsideActivityCategory { return $this->type; } - public function setType(?AsideActivityType $type): self + public function setType(?AsideActivityCategory $type): self { $this->type = $type; @@ -196,4 +195,4 @@ class AsideActivity return $this; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityType.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php similarity index 93% rename from src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityType.php rename to src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php index ce94b4c93..a81745791 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityType.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php @@ -2,15 +2,14 @@ namespace Chill\AsideActivityBundle\Entity; -use Chill\AsideActivityBundle\Entity\AsideActivity; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; /** - * @ORM\Entity(repositoryClass=AsideActivityTypeRepository::class) + * @ORM\Entity */ -class AsideActivityType +class AsideActivityCategory { /** * @ORM\Id @@ -97,4 +96,4 @@ class AsideActivityType return $this; } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityCategoryType.php b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityCategoryType.php new file mode 100644 index 000000000..5c7054ded --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityCategoryType.php @@ -0,0 +1,25 @@ +add('title', TextType::class, + [ + 'label' => 'Nom', + ]) + ->add('isActive', ChoiceType::class, + [ + 'choices' => [ + 'Yes' => true, + 'No' => false + ], + 'expanded' => true + ]); + } +} diff --git a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityType.php b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityType.php index 00c227bcb..b03822a76 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityType.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityType.php @@ -2,14 +2,16 @@ namespace Chill\AsideActivityBundle\Form; +use Chill\AsideActivityBundle\Entity\AsideActivityCategory; use Chill\MainBundle\Entity\User; +use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\Form\Extension\Core\Type\DateType; use Symfony\Component\Form\Extension\Core\Type\NumberType; use Symfony\Component\Form\Extension\Core\Type\TextareaType; -use Symfony\Component\Form\Extension\Core\Type\TextType; + /** * @@ -20,32 +22,27 @@ class AsideActivityType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder - ->add('createdBy', 'entity', - array( - 'class' => User::class, - 'choice_label' => 'username' - ), + ->add('createdBy', EntityType::class, [ 'label' => 'Utilisateur', - 'required' => true - ]) - ->add('agent', 'entity', - array( + 'required' => true, 'class' => User::class, 'choice_label' => 'username' - ), + ]) + ->add('agent', EntityType::class, [ 'label' => 'Agent', - 'required' => true + 'required' => true, + 'class' => User::class, + 'placeholder' => 'L’agent pour qui l\'activité annexe est créée', + 'choice_label' => 'username' ]) - ->add('type', 'entity', - array( - 'class' => AsideActivityType::class, - 'choice_label' => 'title' - ), + ->add('type', EntityType::class, [ 'label' => 'Type', - 'required' => true + 'required' => true, + 'class' => AsideActivityCategory::class, + 'choice_label' => 'title' ]) ->add('date', DateType::class, [ 'label' => 'Date', @@ -54,9 +51,6 @@ class AsideActivityType extends AbstractType ->add('duration', NumberType::class, [ 'label' => 'Durée' ]) - ->add('location', TextType::class, [ - 'label' => 'Lieu' - ]) ->add('note', TextareaType::class, [ 'label' => 'Note' ]) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Repository/AsideActivityTypeRepository.php b/src/Bundle/ChillAsideActivityBundle/src/Repository/AsideActivityCategoryRepository.php similarity index 69% rename from src/Bundle/ChillAsideActivityBundle/src/Repository/AsideActivityTypeRepository.php rename to src/Bundle/ChillAsideActivityBundle/src/Repository/AsideActivityCategoryRepository.php index 8cb2daad9..bcae0ef2c 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Repository/AsideActivityTypeRepository.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Repository/AsideActivityCategoryRepository.php @@ -4,28 +4,28 @@ declare(strict_types=1); namespace Chill\AsideActivityBundle\Repository; -use Chill\AsideActivityBundle\Entity\AsideActivityType; +use Chill\AsideActivityBundle\Entity\AsideActivityCategory; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; use Doctrine\Persistence\ObjectRepository; -class AsideActivityTypeRepository implements ObjectRepository +class AsideActivityCategoryRepository implements ObjectRepository { private EntityRepository $repository; public function __construct(EntityManagerInterface $entityManager) { - $this->repository = $entityManager->getRepository(AsideActivityType::class); + $this->repository = $entityManager->getRepository(AsideActivityCategory::class); } - public function find($id): ?AsideActivityType + public function find($id): ?AsideActivityCategory { return $this->repository->find($id); } /** - * @return AsideActivityType[] + * @return AsideActivityCategory[] */ public function findAll(): array { @@ -33,20 +33,20 @@ class AsideActivityTypeRepository implements ObjectRepository } /** - * @return AsideActivityType[] + * @return AsideActivityCategory[] */ public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } - public function findOneBy(array $criteria): ?AsideActivityType + public function findOneBy(array $criteria): ?AsideActivityCategory { return $this->repository->findOneBy($criteria); } public function getClassName(): string { - return AsideActivityType::class; + return AsideActivityCategory::class; } } \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/src/Templates/asideActivity_new.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Templates/asideActivity_new.html.twig new file mode 100644 index 000000000..0781272a1 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/Templates/asideActivity_new.html.twig @@ -0,0 +1,11 @@ +{% extends '@ChillMain/Admin/layout.html.twig' %} + +{% block title %} +{% include('@ChillMain/CRUD/_new_title.html.twig') %} +{% endblock %} + +{% block admin_content %} +{% embed '@ChillMain/CRUD/_new_content.html.twig' %} + {% block content_form_actions_save_and_show %}{% endblock %} +{% endembed %} +{% endblock %} \ No newline at end of file From 645252fd85fced06ecc5d1fd4ddcb4bed309d48a Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 15 Jul 2021 16:15:46 +0200 Subject: [PATCH 008/100] start CRUD controllers asideActivityBundle --- .../AsideActivityCategoryController.php | 16 +++++ .../Controller/AsideActivityController.php | 24 ++++---- .../ChillAsideActivityExtension.php | 58 +++++++++++++++--- .../src/Form/AsideActivityCategoryType.php | 2 + .../src/Form/AsideActivityType.php | 22 +------ .../src/Resources/config/services.php | 14 ----- .../views/asideActivity/new.html.twig | 27 +++++++++ .../asideActivityCategory/edit.html.twig | 12 ++++ .../asideActivityCategory/index.html.twig | 60 +++++++++++++++++++ .../views/asideActivityCategory/new.html.twig | 11 ++++ .../src/Templates/asideActivity_new.html.twig | 11 ---- .../src/config/routes.yaml | 3 + .../src/config/services.yaml | 0 .../src/translations/messages.yaml | 0 14 files changed, 195 insertions(+), 65 deletions(-) create mode 100644 src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityCategoryController.php delete mode 100644 src/Bundle/ChillAsideActivityBundle/src/Resources/config/services.php create mode 100644 src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/new.html.twig create mode 100644 src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/edit.html.twig create mode 100644 src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/index.html.twig create mode 100644 src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/new.html.twig delete mode 100644 src/Bundle/ChillAsideActivityBundle/src/Templates/asideActivity_new.html.twig create mode 100644 src/Bundle/ChillAsideActivityBundle/src/config/routes.yaml create mode 100644 src/Bundle/ChillAsideActivityBundle/src/config/services.yaml create mode 100644 src/Bundle/ChillAsideActivityBundle/src/translations/messages.yaml diff --git a/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityCategoryController.php b/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityCategoryController.php new file mode 100644 index 000000000..60007b179 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityCategoryController.php @@ -0,0 +1,16 @@ +createForm(AsideActivityType::class); - - return $this->render('asideActivity_new.html.twig', [ - 'asideActivityForm' => $form->createView(), - ]); - } + } diff --git a/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/ChillAsideActivityExtension.php b/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/ChillAsideActivityExtension.php index 087ae6456..952dd1400 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/ChillAsideActivityExtension.php +++ b/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/ChillAsideActivityExtension.php @@ -12,9 +12,10 @@ namespace Chill\AsideActivityBundle\DependencyInjection; use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Extension\Extension; -use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; +use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; +use Symfony\Component\DependencyInjection\Loader; -final class ChillAsideActivityExtension extends Extension +final class ChillAsideActivityExtension extends Extension implements PrependExtensionInterface { /** * {@inheritdoc} @@ -23,11 +24,54 @@ final class ChillAsideActivityExtension extends Extension */ public function load(array $configs, ContainerBuilder $container): void { - $loader = new PhpFileLoader( - $container, - new FileLocator(__DIR__ . '/../Resources/config') - ); + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../config')); + $loader->load('services.yaml'); + } - $loader->load('services.php'); + public function prepend(ContainerBuilder $container) + { + $this->prependRoute($container); + $this->prependCruds($container); + } + + protected function prependRoute(ContainerBuilder $container) + { + //declare routes for task bundle + $container->prependExtensionConfig('chill_main', array( + 'routing' => array( + 'resources' => array( + '@ChillAsideActivityBundle/config/routes.yaml', + ) + ) + )); + } + + protected function prependCruds(ContainerBuilder $container) + { + $container->prependExtensionConfig('chill_main', [ + 'cruds' => [ + [ + 'class' => \Chill\AsideActivityBundle\Entity\AsideActivityCategory::class, + 'name' => 'aside_activity_category', + 'base_path' => '/admin/asideactivity/category', + 'form_class' => \Chill\AsideActivityBundle\Form\AsideActivityCategoryType::class, + 'controller' => \Chill\AsideActivityBundle\Controller\AsideActivityCategoryController::class, + 'actions' => [ + 'index' => [ + 'template' => '@ChillAsideActivity/asideActivityCategory/index.html.twig', + 'role' => 'ROLE_ADMIN' + ], + 'new' => [ + 'role' => 'ROLE_ADMIN', + 'template' => '@ChillAsideActivity/asideActivityCategory/new.html.twig', + ], + 'edit' => [ + 'role' => 'ROLE_ADMIN', + 'template' => '@ChillAsideActivity/asideActivityCategory/edit.html.twig', + ] + ] + ], + ] + ]); } } \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityCategoryType.php b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityCategoryType.php index 5c7054ded..36c818b4c 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityCategoryType.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityCategoryType.php @@ -1,5 +1,7 @@ 'L’agent pour qui l\'activité annexe est créée', 'choice_label' => 'username' ]) - ->add('type', EntityType::class, - [ - 'label' => 'Type', - 'required' => true, - 'class' => AsideActivityCategory::class, - 'choice_label' => 'title' - ]) - ->add('date', DateType::class, [ - 'label' => 'Date', - 'required' => true - ]) - ->add('duration', NumberType::class, [ - 'label' => 'Durée' - ]) ->add('note', TextareaType::class, [ 'label' => 'Note' ]) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/config/services.php b/src/Bundle/ChillAsideActivityBundle/src/Resources/config/services.php deleted file mode 100644 index 827fa1765..000000000 --- a/src/Bundle/ChillAsideActivityBundle/src/Resources/config/services.php +++ /dev/null @@ -1,14 +0,0 @@ -Creér un activité annexe + + {{ form_start(asideActivityForm) }} + + + + + {{ form_widget(asideActivityForm) }} + + + {{ form_end(asideActivityForm)}} + +{% endblock %} \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/edit.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/edit.html.twig new file mode 100644 index 000000000..dacee767c --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/edit.html.twig @@ -0,0 +1,12 @@ +{% extends "@ChillActivity/Admin/layout_activity.html.twig" %} + +{% block title %} + {% include('@ChillMain/CRUD/_edit_title.html.twig') %} +{% endblock %} + +{% block layout_wvm_content %} + {% embed '@ChillMain/CRUD/_edit_content.html.twig' %} + {% block content_form_actions_view %}{% endblock %} + {% block content_form_actions_save_and_show %}{% endblock %} + {% endembed %} +{% endblock %} diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/index.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/index.html.twig new file mode 100644 index 000000000..fd1fd8e29 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/index.html.twig @@ -0,0 +1,60 @@ +{# + * Copyright (C) 2014, Champs Libres Cooperative SCRLFS, + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . +#} +{% extends "@ChillActivity/Admin/layout_activity.html.twig" %} + +{% block admin_content %} +

{{ 'ActivityType list'|trans }}

+ + + + + + + + + + + {% for entity in entities %} + + + + + + {% endfor %} + +
{{ 'Name'|trans }}{{ 'Active'|trans }}{{ 'Actions'|trans }}
{{ entity.name|localize_translatable_string }} + {%- if entity.active -%} + + {%- else -%} + + {%- endif -%} + +
    +
  • + +
  • +
+
+ + + {% endblock %} diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/new.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/new.html.twig new file mode 100644 index 000000000..d7ac89752 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/new.html.twig @@ -0,0 +1,11 @@ +{% extends "@ChillActivity/Admin/layout_activity.html.twig" %} + +{% block title %} + {% include('@ChillMain/CRUD/_new_title.html.twig') %} +{% endblock %} + +{% block layout_wvm_content %} + {% embed '@ChillMain/CRUD/_new_content.html.twig' %} + {% block content_form_actions_save_and_show %}{% endblock %} + {% endembed %} +{% endblock %} diff --git a/src/Bundle/ChillAsideActivityBundle/src/Templates/asideActivity_new.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Templates/asideActivity_new.html.twig deleted file mode 100644 index 0781272a1..000000000 --- a/src/Bundle/ChillAsideActivityBundle/src/Templates/asideActivity_new.html.twig +++ /dev/null @@ -1,11 +0,0 @@ -{% extends '@ChillMain/Admin/layout.html.twig' %} - -{% block title %} -{% include('@ChillMain/CRUD/_new_title.html.twig') %} -{% endblock %} - -{% block admin_content %} -{% embed '@ChillMain/CRUD/_new_content.html.twig' %} - {% block content_form_actions_save_and_show %}{% endblock %} -{% endembed %} -{% endblock %} \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/src/config/routes.yaml b/src/Bundle/ChillAsideActivityBundle/src/config/routes.yaml new file mode 100644 index 000000000..622102e34 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/config/routes.yaml @@ -0,0 +1,3 @@ +chill_asideactivities_controllers: + resource: "@ChillAsideActivityBundle/Controller" + type: annotation \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/src/config/services.yaml b/src/Bundle/ChillAsideActivityBundle/src/config/services.yaml new file mode 100644 index 000000000..e69de29bb diff --git a/src/Bundle/ChillAsideActivityBundle/src/translations/messages.yaml b/src/Bundle/ChillAsideActivityBundle/src/translations/messages.yaml new file mode 100644 index 000000000..e69de29bb From e72a8fe5a0f703152d2d0fceb4113fd4dc7941d8 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 3 Aug 2021 10:20:35 +0200 Subject: [PATCH 009/100] bootstrap class added --- .../src/Resources/views/asideActivityCategory/index.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/index.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/index.html.twig index fd1fd8e29..fa8d6573b 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/index.html.twig +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/index.html.twig @@ -19,7 +19,7 @@ {% block admin_content %}

{{ 'ActivityType list'|trans }}

- +
From 4fa1820d8d12a450c1f5b9d5e93263bbaa5fdaac Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 3 Aug 2021 10:37:42 +0200 Subject: [PATCH 010/100] bootstrap classes added --- .../Resources/views/asideActivityCategory/index.html.twig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/index.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/index.html.twig index fa8d6573b..03efb0197 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/index.html.twig +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/index.html.twig @@ -39,9 +39,9 @@ {%- endif -%} @@ -52,7 +52,7 @@
  • - + {{ 'Create a new activity type'|trans }}
  • From ee8e9f1ebc84e2d828c3c58b331f82982a130355 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 3 Aug 2021 10:39:27 +0200 Subject: [PATCH 011/100] commented out lines deleted from migration --- .../src/migrations/Version20210706124644.php | 172 ------------------ 1 file changed, 172 deletions(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210706124644.php b/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210706124644.php index 77e2b76ce..8fdcb64e3 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210706124644.php +++ b/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210706124644.php @@ -34,90 +34,6 @@ final class Version20210706124644 extends AbstractMigration $this->addSql('ALTER TABLE AsideActivity ADD CONSTRAINT FK_E9FA219165FF1AEC FOREIGN KEY (updatedBy_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); $this->addSql('ALTER TABLE AsideActivity ADD CONSTRAINT FK_E9FA21913414710B FOREIGN KEY (agent_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); // this up() migration is auto-generated, please modify it to your needs - - // $this->addSql('DROP TABLE chill_main_address_legacy'); - // $this->addSql('ALTER INDEX idx_55026b0ca76ed395 RENAME TO IDX_AC74095AA76ED395'); - // $this->addSql('ALTER INDEX idx_55026b0cc54c8c93 RENAME TO IDX_AC74095AC54C8C93'); - // $this->addSql('ALTER INDEX idx_55026b0c682b5931 RENAME TO IDX_AC74095A682B5931'); - // $this->addSql('ALTER INDEX idx_55026b0c217bbb47 RENAME TO IDX_AC74095A217BBB47'); - // $this->addSql('ALTER INDEX idx_ac74095a550b0c53 RENAME TO IDX_AC74095AD7FA8EF0'); - // $this->addSql('ALTER TABLE activityreason ALTER name SET NOT NULL'); - // $this->addSql('COMMENT ON COLUMN activityreason.name IS \'(DC2Type:json_array)\''); - // $this->addSql('ALTER INDEX idx_654a2fcd12469de2 RENAME TO IDX_AF82522312469DE2'); - // $this->addSql('ALTER TABLE activityreasoncategory ALTER name SET NOT NULL'); - // $this->addSql('COMMENT ON COLUMN activityreasoncategory.name IS \'(DC2Type:json_array)\''); - // $this->addSql('ALTER TABLE activitytype ALTER category_id DROP DEFAULT'); - // $this->addSql('ALTER TABLE chill_main_address DROP customs'); - // $this->addSql('ALTER TABLE chill_main_address ALTER isnoaddress DROP DEFAULT'); - // $this->addSql('ALTER TABLE chill_main_address ALTER point TYPE geometry(POINT,4326)'); - // $this->addSql('ALTER TABLE chill_main_address ALTER point DROP DEFAULT'); - // $this->addSql('ALTER TABLE chill_main_address_reference ALTER point TYPE geometry(POINT,4326)'); - // $this->addSql('ALTER TABLE chill_main_address_reference ALTER point DROP DEFAULT'); - // $this->addSql('CREATE INDEX search_name_code ON chill_main_postal_code (code, label)'); - // $this->addSql('ALTER INDEX idx_64a4a621504cb38d RENAME TO IDX_E260A868504CB38D'); - // $this->addSql('ALTER TABLE chill_person_accompanying_period_closingmotive ALTER ordering DROP DEFAULT'); - // $this->addSql('ALTER INDEX idx_92351ece727aca70 RENAME TO IDX_72D110E8727ACA70'); - // $this->addSql('ALTER TABLE chill_person_accompanying_period_participation ALTER startdate DROP DEFAULT'); - // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER startdate TYPE DATE'); - // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER startdate DROP DEFAULT'); - // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER enddate TYPE DATE'); - // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER enddate DROP DEFAULT'); - // $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work.startDate IS \'(DC2Type:date_immutable)\''); - // $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work.endDate IS \'(DC2Type:date_immutable)\''); - // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ADD CONSTRAINT FK_B694FB365FF1AEC FOREIGN KEY (updatedBy_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - // $this->addSql('CREATE INDEX IDX_B694FB365FF1AEC ON chill_person_accompanying_period_work (updatedBy_id)'); - // $this->addSql('ALTER TABLE chill_person_household DROP CONSTRAINT fk_household_comment_embeddable_user'); - // $this->addSql('DROP INDEX IDX_BE50A270116F5FA9'); - // $this->addSql('DROP INDEX household_members_not_overlaps'); - // $this->addSql('ALTER TABLE chill_person_household_members ALTER startdate TYPE DATE'); - // $this->addSql('ALTER TABLE chill_person_household_members ALTER startdate DROP DEFAULT'); - // $this->addSql('ALTER TABLE chill_person_household_members ALTER enddate TYPE DATE'); - // $this->addSql('ALTER TABLE chill_person_household_members ALTER enddate DROP DEFAULT'); - // $this->addSql('COMMENT ON COLUMN chill_person_household_members.startDate IS \'(DC2Type:date_immutable)\''); - // $this->addSql('COMMENT ON COLUMN chill_person_household_members.endDate IS \'(DC2Type:date_immutable)\''); - // $this->addSql('ALTER TABLE chill_person_marital_status ALTER id TYPE VARCHAR(7)'); - // $this->addSql('COMMENT ON COLUMN chill_person_marital_status.name IS \'(DC2Type:json_array)\''); - // $this->addSql('DROP INDEX mobilenumber_trgm_idx'); - // $this->addSql('DROP INDEX fullnamecanonical_trgm_idx'); - // $this->addSql('DROP INDEX phonenumber_trgm_idx'); - // $this->addSql('ALTER TABLE chill_person_person DROP cfdata_old'); - // $this->addSql('ALTER TABLE chill_person_person ALTER maritalstatus_id TYPE VARCHAR(7)'); - // $this->addSql('ALTER TABLE chill_person_person ALTER cfdata SET NOT NULL'); - // $this->addSql('COMMENT ON COLUMN chill_person_person.cFData IS \'(DC2Type:json_array)\''); - // $this->addSql('ALTER INDEX idx_3370d4403818da5 RENAME TO IDX_BF210A143818DA5'); - // $this->addSql('ALTER INDEX idx_3370d4401c9da55 RENAME TO IDX_BF210A141C9DA55'); - // $this->addSql('ALTER INDEX idx_bf210a145521be40 RENAME TO IDX_BF210A14D7D03CE3'); - // $this->addSql('ALTER INDEX idx_person_center RENAME TO IDX_BF210A145932F377'); - // $this->addSql('ALTER TABLE persons_spoken_languages DROP CONSTRAINT FK_7201106F217BBB47'); - // $this->addSql('ALTER TABLE persons_spoken_languages DROP CONSTRAINT FK_7201106F82F1BAF4'); - // $this->addSql('ALTER TABLE persons_spoken_languages ADD CONSTRAINT FK_7201106F217BBB47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - // $this->addSql('ALTER TABLE persons_spoken_languages ADD CONSTRAINT FK_7201106F82F1BAF4 FOREIGN KEY (language_id) REFERENCES language (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - // $this->addSql('ALTER TABLE chill_person_social_action ALTER defaultnotificationdelay SET NOT NULL'); - // $this->addSql('ALTER TABLE chill_person_social_work_evaluation ALTER delay SET NOT NULL'); - // $this->addSql('ALTER TABLE chill_person_social_work_evaluation ALTER notificationdelay SET NOT NULL'); - // $this->addSql('COMMENT ON COLUMN country.name IS \'(DC2Type:json_array)\''); - // $this->addSql('ALTER TABLE custom_field_long_choice_options ALTER internal_key DROP DEFAULT'); - // $this->addSql('COMMENT ON COLUMN custom_field_long_choice_options.text IS \'(DC2Type:json_array)\''); - // $this->addSql('ALTER TABLE customfield ALTER required DROP DEFAULT'); - // $this->addSql('ALTER TABLE customfield ALTER required SET NOT NULL'); - // $this->addSql('COMMENT ON COLUMN customfield.name IS \'(DC2Type:json_array)\''); - // $this->addSql('COMMENT ON COLUMN customfield.options IS \'(DC2Type:json_array)\''); - // $this->addSql('ALTER INDEX idx_40fb5d6dfec418b RENAME TO IDX_7A6FDBEFEC418B'); - // $this->addSql('ALTER INDEX idx_286dc95df53b66 RENAME TO IDX_7A48DF7F5DF53B66'); - // $this->addSql('ALTER TABLE customfieldsgroup ALTER options DROP DEFAULT'); - // $this->addSql('ALTER TABLE customfieldsgroup ALTER options SET NOT NULL'); - // $this->addSql('COMMENT ON COLUMN customfieldsgroup.name IS \'(DC2Type:json_array)\''); - // $this->addSql('COMMENT ON COLUMN customfieldsgroup.options IS \'(DC2Type:json_array)\''); - // $this->addSql('ALTER INDEX idx_a14d8f3d447bbb3b RENAME TO IDX_A14D8F3D96DF1F10'); - // $this->addSql('COMMENT ON COLUMN language.name IS \'(DC2Type:json_array)\''); - // $this->addSql('ALTER TABLE permission_groups ALTER flags DROP DEFAULT'); - // $this->addSql('COMMENT ON COLUMN scopes.name IS \'(DC2Type:json_array)\''); - // $this->addSql('ALTER INDEX chill_3party.idx_c65d4397c7d3a8e6 RENAME TO IDX_14DC4475C7D3A8E6'); - // $this->addSql('ALTER INDEX chill_3party.idx_c65d43975932f377 RENAME TO IDX_14DC44755932F377'); - // $this->addSql('ALTER TABLE users ALTER usernamecanonical SET NOT NULL'); - // $this->addSql('DROP INDEX uniq_93f763ae217bbb47'); - // $this->addSql('ALTER TABLE chill_vendee.vendeeperson_entourage ADD CONSTRAINT FK_4D319FFEF57537C3 FOREIGN KEY (vendeeperson_id) REFERENCES chill_vendee.vendee_person (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - // $this->addSql('ALTER INDEX chill_vendee.idx_1a4b602deef79338 RENAME TO IDX_DD0A4C00EEF79338'); } public function down(Schema $schema): void @@ -126,95 +42,7 @@ final class Version20210706124644 extends AbstractMigration $this->addSql('ALTER TABLE AsideActivity DROP CONSTRAINT FK_E9FA2191C54C8C93'); $this->addSql('DROP SEQUENCE AsideActivity_id_seq CASCADE'); $this->addSql('DROP SEQUENCE AsideActivityType_id_seq CASCADE'); - // $this->addSql('CREATE TABLE chill_main_address_legacy (id INT DEFAULT NULL, postcode_id INT DEFAULT NULL, street VARCHAR(255) DEFAULT NULL, streetnumber VARCHAR(255) DEFAULT NULL, validfrom DATE DEFAULT NULL, isnoaddress BOOLEAN DEFAULT NULL, customs JSONB DEFAULT NULL, floor VARCHAR(16) DEFAULT NULL, corridor VARCHAR(16) DEFAULT NULL, steps VARCHAR(16) DEFAULT NULL, buildingname VARCHAR(255) DEFAULT NULL, flat VARCHAR(16) DEFAULT NULL, distribution VARCHAR(255) DEFAULT NULL, extra VARCHAR(255) DEFAULT NULL, validto DATE DEFAULT NULL, point VARCHAR(255) DEFAULT NULL, linkedtothirdparty_id INT DEFAULT NULL)'); $this->addSql('DROP TABLE AsideActivity'); $this->addSql('DROP TABLE AsideActivityType'); - /* - $this->addSql('CREATE SCHEMA public'); - - $this->addSql('COMMENT ON COLUMN scopes.name IS NULL'); - $this->addSql('ALTER INDEX idx_7a48df7f5df53b66 RENAME TO idx_286dc95df53b66'); - $this->addSql('COMMENT ON COLUMN country.name IS NULL'); - $this->addSql('ALTER TABLE persons_spoken_languages DROP CONSTRAINT fk_7201106f217bbb47'); - $this->addSql('ALTER TABLE persons_spoken_languages DROP CONSTRAINT fk_7201106f82f1baf4'); - $this->addSql('ALTER TABLE persons_spoken_languages ADD CONSTRAINT fk_7201106f217bbb47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE persons_spoken_languages ADD CONSTRAINT fk_7201106f82f1baf4 FOREIGN KEY (language_id) REFERENCES language (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('COMMENT ON COLUMN language.name IS NULL'); - $this->addSql('ALTER TABLE customfieldsgroup ALTER options SET DEFAULT \'{}\''); - $this->addSql('ALTER TABLE customfieldsgroup ALTER options DROP NOT NULL'); - $this->addSql('COMMENT ON COLUMN customfieldsgroup.name IS NULL'); - $this->addSql('COMMENT ON COLUMN customfieldsgroup.options IS NULL'); - $this->addSql('ALTER TABLE activityreasoncategory ALTER name DROP NOT NULL'); - $this->addSql('COMMENT ON COLUMN activityreasoncategory.name IS NULL'); - $this->addSql('ALTER TABLE activityreason ALTER name DROP NOT NULL'); - $this->addSql('COMMENT ON COLUMN activityreason.name IS NULL'); - $this->addSql('ALTER INDEX idx_af82522312469de2 RENAME TO idx_654a2fcd12469de2'); - $this->addSql('ALTER INDEX idx_a14d8f3d96df1f10 RENAME TO idx_a14d8f3d447bbb3b'); - $this->addSql('ALTER TABLE customfield ALTER required SET DEFAULT \'false\''); - $this->addSql('ALTER TABLE customfield ALTER required DROP NOT NULL'); - $this->addSql('COMMENT ON COLUMN customfield.options IS NULL'); - $this->addSql('COMMENT ON COLUMN customfield.name IS NULL'); - $this->addSql('ALTER INDEX idx_7a6fdbefec418b RENAME TO idx_40fb5d6dfec418b'); - $this->addSql('ALTER TABLE custom_field_long_choice_options ALTER internal_key SET DEFAULT \'\''); - $this->addSql('COMMENT ON COLUMN custom_field_long_choice_options.text IS NULL'); - $this->addSql('ALTER TABLE chill_person_marital_status ALTER id TYPE VARCHAR(10)'); - $this->addSql('COMMENT ON COLUMN chill_person_marital_status.name IS NULL'); - $this->addSql('ALTER TABLE permission_groups ALTER flags SET DEFAULT \'[]\''); - $this->addSql('ALTER INDEX chill_3party.idx_14dc4475c7d3a8e6 RENAME TO idx_c65d4397c7d3a8e6'); - $this->addSql('ALTER INDEX chill_3party.idx_14dc44755932f377 RENAME TO idx_c65d43975932f377'); - $this->addSql('ALTER TABLE users ALTER usernameCanonical DROP NOT NULL'); - $this->addSql('ALTER TABLE chill_person_accompanying_period_closingmotive ALTER ordering SET DEFAULT \'0\''); - $this->addSql('ALTER INDEX idx_72d110e8727aca70 RENAME TO idx_92351ece727aca70'); - $this->addSql('ALTER TABLE chill_person_accompanying_period_participation ALTER startDate SET DEFAULT \'1970-01-01\''); - $this->addSql('ALTER TABLE chill_person_social_action ALTER defaultNotificationDelay DROP NOT NULL'); - $this->addSql('ALTER TABLE chill_person_social_work_evaluation ALTER delay DROP NOT NULL'); - $this->addSql('ALTER TABLE chill_person_social_work_evaluation ALTER notificationDelay DROP NOT NULL'); - $this->addSql('ALTER TABLE chill_main_address_reference ALTER point TYPE VARCHAR(255)'); - $this->addSql('ALTER TABLE chill_main_address_reference ALTER point DROP DEFAULT'); - $this->addSql('ALTER TABLE chill_main_address ADD customs JSONB DEFAULT \'[]\''); - $this->addSql('ALTER TABLE chill_main_address ALTER isNoAddress SET DEFAULT \'false\''); - $this->addSql('ALTER TABLE chill_main_address ALTER point TYPE VARCHAR(255)'); - $this->addSql('ALTER TABLE chill_main_address ALTER point DROP DEFAULT'); - $this->addSql('ALTER INDEX idx_e260a868504cb38d RENAME TO idx_64a4a621504cb38d'); - $this->addSql('ALTER INDEX idx_ac74095aa76ed395 RENAME TO idx_55026b0ca76ed395'); - $this->addSql('ALTER INDEX idx_ac74095a682b5931 RENAME TO idx_55026b0c682b5931'); - $this->addSql('ALTER INDEX idx_ac74095a217bbb47 RENAME TO idx_55026b0c217bbb47'); - $this->addSql('ALTER INDEX idx_ac74095ac54c8c93 RENAME TO idx_55026b0cc54c8c93'); - $this->addSql('ALTER INDEX idx_ac74095ad7fa8ef0 RENAME TO IDX_AC74095A550B0C53'); - $this->addSql('ALTER TABLE chill_person_household_members ALTER startDate TYPE DATE'); - $this->addSql('ALTER TABLE chill_person_household_members ALTER startDate DROP DEFAULT'); - $this->addSql('ALTER TABLE chill_person_household_members ALTER endDate TYPE DATE'); - $this->addSql('ALTER TABLE chill_person_household_members ALTER endDate DROP DEFAULT'); - $this->addSql('COMMENT ON COLUMN chill_person_household_members.startdate IS NULL'); - $this->addSql('COMMENT ON COLUMN chill_person_household_members.enddate IS NULL'); - $this->addSql('CREATE INDEX household_members_not_overlaps ON chill_person_household_members (person_id) WHERE (sharedhousehold IS TRUE)'); - $this->addSql('ALTER TABLE activitytype ALTER category_id SET DEFAULT 1'); - $this->addSql('ALTER TABLE chill_person_household ADD CONSTRAINT fk_household_comment_embeddable_user FOREIGN KEY (comment_members_userid) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('CREATE INDEX IDX_BE50A270116F5FA9 ON chill_person_household (comment_members_userid)'); - $this->addSql('DROP INDEX search_name_code'); - $this->addSql('ALTER TABLE chill_person_person ADD cfdata_old TEXT DEFAULT NULL'); - $this->addSql('ALTER TABLE chill_person_person ALTER cFData DROP NOT NULL'); - $this->addSql('ALTER TABLE chill_person_person ALTER maritalStatus_id TYPE VARCHAR(10)'); - $this->addSql('COMMENT ON COLUMN chill_person_person.cfdata_old IS \'(DC2Type:array)\''); - $this->addSql('COMMENT ON COLUMN chill_person_person.cfdata IS NULL'); - $this->addSql('CREATE INDEX mobilenumber_trgm_idx ON chill_person_person (mobilenumber)'); - $this->addSql('CREATE INDEX fullnamecanonical_trgm_idx ON chill_person_person (fullnamecanonical)'); - $this->addSql('CREATE INDEX phonenumber_trgm_idx ON chill_person_person (phonenumber)'); - $this->addSql('ALTER INDEX idx_bf210a141c9da55 RENAME TO idx_3370d4401c9da55'); - $this->addSql('ALTER INDEX idx_bf210a143818da5 RENAME TO idx_3370d4403818da5'); - $this->addSql('ALTER INDEX idx_bf210a145932f377 RENAME TO idx_person_center'); - $this->addSql('ALTER INDEX idx_bf210a14d7d03ce3 RENAME TO IDX_BF210A145521BE40'); - $this->addSql('ALTER TABLE chill_person_accompanying_period_work DROP CONSTRAINT FK_B694FB365FF1AEC'); - $this->addSql('DROP INDEX IDX_B694FB365FF1AEC'); - $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER startDate TYPE TIMESTAMP(0) WITHOUT TIME ZONE'); - $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER startDate DROP DEFAULT'); - $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER endDate TYPE TIMESTAMP(0) WITHOUT TIME ZONE'); - $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER endDate DROP DEFAULT'); - $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work.startdate IS \'(DC2Type:datetime_immutable)\''); - $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work.enddate IS \'(DC2Type:datetime_immutable)\''); - $this->addSql('CREATE UNIQUE INDEX uniq_93f763ae217bbb47 ON chill_vendee.vendee_person (person_id)'); - $this->addSql('ALTER TABLE chill_vendee.vendeeperson_entourage DROP CONSTRAINT FK_4D319FFEF57537C3'); - $this->addSql('ALTER INDEX chill_vendee.idx_dd0a4c00eef79338 RENAME TO idx_1a4b602deef79338'); - */ } } \ No newline at end of file From ccf5b9095124e32b0693f9de706a60374f6088de Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 3 Aug 2021 10:40:29 +0200 Subject: [PATCH 012/100] filename changed to fix error --- .../Form/{AsideActivityType.php => AsideActivityFormType.php} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename src/Bundle/ChillAsideActivityBundle/src/Form/{AsideActivityType.php => AsideActivityFormType.php} (96%) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityType.php b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php similarity index 96% rename from src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityType.php rename to src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php index 804f25d7b..40633c362 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityType.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php @@ -11,7 +11,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\Form\Extension\Core\Type\TextareaType; -class AsideActivityType extends AbstractType +class AsideActivityFormType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { From 9ac31d2d8b1ec22e258095f2b6e4fa8e2c50c8d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 3 Aug 2021 08:54:36 +0000 Subject: [PATCH 013/100] Apply 1 suggestion(s) to 1 file(s) --- .../ChillAsideActivityBundle/src/Entity/AsideActivity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php index 3a16a8df0..47c014afd 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php @@ -30,7 +30,7 @@ class AsideActivity private $createdBy; /** - * @ORM\Column(type="datetime") + * @ORM\Column(type="datetime_immutable") */ private $createdAt; From 1edcb399c4011e22daf1525a8a58bc505e5cbc2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 3 Aug 2021 08:54:55 +0000 Subject: [PATCH 014/100] Apply 1 suggestion(s) to 1 file(s) --- .../ChillAsideActivityBundle/src/Entity/AsideActivity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php index 47c014afd..e6adfe5a6 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php @@ -52,7 +52,7 @@ class AsideActivity private $agent; /** - * @ORM\Column(type="datetime") + * @ORM\Column(type="datetime_immutable") */ private $date; From f9195aa881f5841518f12c9c0d048f7390522d04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 3 Aug 2021 09:13:02 +0000 Subject: [PATCH 015/100] Apply 1 suggestion(s) to 1 file(s) --- .../ChillAsideActivityBundle/src/Entity/AsideActivity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php index e6adfe5a6..3a22ae384 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php @@ -15,7 +15,7 @@ class AsideActivity * @ORM\GeneratedValue * @ORM\Column(type="integer") */ - private $id; + private ?int $id; /** * @ORM\ManyToOne(targetEntity=AsideActivityCategory::class, inversedBy="asideActivities") From 2290da6f3bb741ca88775f3681ec0b543f36a8a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 3 Aug 2021 09:14:21 +0000 Subject: [PATCH 016/100] Apply 1 suggestion(s) to 1 file(s) --- .../src/Entity/AsideActivityCategory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php index a81745791..965282319 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php @@ -19,7 +19,7 @@ class AsideActivityCategory private $id; /** - * @ORM\Column(type="string", length=255) + * @ORM\Column(type="json", length=255) */ private $title; From 94d743c5b6cf350fdf2cb78c176ad261b8b3611c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 3 Aug 2021 09:14:50 +0000 Subject: [PATCH 017/100] Apply 1 suggestion(s) to 1 file(s) --- .../src/Entity/AsideActivityCategory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php index 965282319..6623a603f 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php @@ -21,7 +21,7 @@ class AsideActivityCategory /** * @ORM\Column(type="json", length=255) */ - private $title; + private array $title; /** * @ORM\Column(type="boolean") From c13f63b3baf411c2b38990d6eae73051f5a5b183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 3 Aug 2021 09:15:04 +0000 Subject: [PATCH 018/100] Apply 1 suggestion(s) to 1 file(s) --- .../src/Entity/AsideActivityCategory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php index 6623a603f..88f2c75cc 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php @@ -26,7 +26,7 @@ class AsideActivityCategory /** * @ORM\Column(type="boolean") */ - private $isActive; + private bool $isActive = true; /** * @ORM\OneToMany(targetEntity=AsideActivity::class, mappedBy="type") From 7b8a067002494f761283018d1e75e726ef52e83c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 3 Aug 2021 09:15:15 +0000 Subject: [PATCH 019/100] Apply 1 suggestion(s) to 1 file(s) --- .../src/Entity/AsideActivityCategory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php index 88f2c75cc..b6821fbad 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php @@ -55,7 +55,7 @@ class AsideActivityCategory return $this; } - public function getIsActive(): ?bool + public function getIsActive(): bool { return $this->isActive; } From ff58816ee03b5945c1ec48cdee6565cb59a960de Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 3 Aug 2021 11:20:43 +0200 Subject: [PATCH 020/100] changed duration type into integer --- .../ChillAsideActivityBundle/src/Entity/AsideActivity.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php index e6adfe5a6..10be3d0e3 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php @@ -4,7 +4,7 @@ namespace Chill\AsideActivityBundle\Entity; use Chill\MainBundle\Entity\User; use Doctrine\ORM\Mapping as ORM; - +use Symfony\Component\Validator\Constraints as Assert; /** * @ORM\Entity */ @@ -57,7 +57,7 @@ class AsideActivity private $date; /** - * @ORM\Column(type="time", nullable=true) + * @ORM\Column(type="integer", nullable=true) */ private $duration; From 4cd2dc63c5520dc9e4e96081e81721abd7aa5831 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 3 Aug 2021 11:21:20 +0200 Subject: [PATCH 021/100] asideActivities property removed + corresponding methods --- .../src/Entity/AsideActivityCategory.php | 40 ------------------- 1 file changed, 40 deletions(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php index a81745791..fff0cf5e7 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php @@ -28,16 +28,6 @@ class AsideActivityCategory */ private $isActive; - /** - * @ORM\OneToMany(targetEntity=AsideActivity::class, mappedBy="type") - */ - private $asideActivities; - - public function __construct() - { - $this->asideActivities = new ArrayCollection(); - } - public function getId(): ?int { return $this->id; @@ -66,34 +56,4 @@ class AsideActivityCategory return $this; } - - /** - * @return Collection|AsideActivity[] - */ - public function getAsideActivities(): Collection - { - return $this->asideActivities; - } - - public function addAsideActivity(AsideActivity $asideActivity): self - { - if (!$this->asideActivities->contains($asideActivity)) { - $this->asideActivities[] = $asideActivity; - $asideActivity->setType($this); - } - - return $this; - } - - public function removeAsideActivity(AsideActivity $asideActivity): self - { - if ($this->asideActivities->removeElement($asideActivity)) { - // set the owning side to null (unless already changed) - if ($asideActivity->getType() === $this) { - $asideActivity->setType(null); - } - } - - return $this; - } } From 23bc71a38ccf4296560ba1048f66709d46193c39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 3 Aug 2021 09:26:03 +0000 Subject: [PATCH 022/100] Apply 1 suggestion(s) to 1 file(s) --- .../src/migrations/Version20210706124644.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210706124644.php b/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210706124644.php index 8fdcb64e3..59fa35be4 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210706124644.php +++ b/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210706124644.php @@ -21,7 +21,7 @@ final class Version20210706124644 extends AbstractMigration { $this->addSql('CREATE SEQUENCE AsideActivity_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); - $this->addSql('CREATE SEQUENCE AsideActivityType_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE AsideActivityType_id_seq INCREMENT BY 1 MINVALUE 1 START 1000'); $this->addSql('CREATE TABLE AsideActivity (id INT NOT NULL, type_id INT NOT NULL, agent_id INT NOT NULL, createdAt TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, updatedAt TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, date TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, duration TIME(0) WITHOUT TIME ZONE DEFAULT NULL, location VARCHAR(100) DEFAULT NULL, note TEXT DEFAULT NULL, createdBy_id INT NOT NULL, updatedBy_id INT DEFAULT NULL, PRIMARY KEY(id))'); $this->addSql('CREATE INDEX IDX_E9FA2191C54C8C93 ON AsideActivity (type_id)'); $this->addSql('CREATE INDEX IDX_E9FA21913174800F ON AsideActivity (createdBy_id)'); From 0bc894836f7b972415256afe99ee1c63d945ad5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 3 Aug 2021 12:39:50 +0000 Subject: [PATCH 023/100] Apply 1 suggestion(s) to 1 file(s) --- .../src/Entity/AsideActivityCategory.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php index bd9318040..7c9b0f102 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php @@ -8,6 +8,7 @@ use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity + * @Table(schema="chill_asideactivity") */ class AsideActivityCategory { From a5948259d9456207eca7a291f4737684567a0f9c Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 3 Aug 2021 14:41:01 +0200 Subject: [PATCH 024/100] templates added for aside activities --- .../views/asideActivity/edit.html.twig | 12 +++++ .../views/asideActivity/index.html.twig | 44 +++++++++++++++++++ .../asideActivityCategory/index.html.twig | 16 ------- 3 files changed, 56 insertions(+), 16 deletions(-) create mode 100644 src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/edit.html.twig create mode 100644 src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/index.html.twig diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/edit.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/edit.html.twig new file mode 100644 index 000000000..dacee767c --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/edit.html.twig @@ -0,0 +1,12 @@ +{% extends "@ChillActivity/Admin/layout_activity.html.twig" %} + +{% block title %} + {% include('@ChillMain/CRUD/_edit_title.html.twig') %} +{% endblock %} + +{% block layout_wvm_content %} + {% embed '@ChillMain/CRUD/_edit_content.html.twig' %} + {% block content_form_actions_view %}{% endblock %} + {% block content_form_actions_save_and_show %}{% endblock %} + {% endembed %} +{% endblock %} diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/index.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/index.html.twig new file mode 100644 index 000000000..3e0a4f404 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/index.html.twig @@ -0,0 +1,44 @@ +{% extends "@ChillActivity/Admin/layout_activity.html.twig" %} + +{% block admin_content %} +

    {{ 'ActivityType list'|trans }}

    + +
{{ 'Name'|trans }} -
    +
    • - +
+ + + + + + + + + {% for entity in entities %} + + + + + + {% endfor %} + +
{{ 'Name'|trans }}{{ 'Active'|trans }}{{ 'Actions'|trans }}
{{ entity.name|localize_translatable_string }} + {%- if entity.active -%} + + {%- else -%} + + {%- endif -%} + +
    +
  • + +
  • +
+
+ + + {% endblock %} diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/index.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/index.html.twig index 03efb0197..3e0a4f404 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/index.html.twig +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/index.html.twig @@ -1,19 +1,3 @@ -{# - * Copyright (C) 2014, Champs Libres Cooperative SCRLFS, - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . -#} {% extends "@ChillActivity/Admin/layout_activity.html.twig" %} {% block admin_content %} From 357b87dadba5c49db79aea764178361127508f18 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 3 Aug 2021 14:43:23 +0200 Subject: [PATCH 025/100] crud config added for aside activity --- .../ChillAsideActivityExtension.php | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/ChillAsideActivityExtension.php b/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/ChillAsideActivityExtension.php index 952dd1400..fb24d5d46 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/ChillAsideActivityExtension.php +++ b/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/ChillAsideActivityExtension.php @@ -71,6 +71,27 @@ final class ChillAsideActivityExtension extends Extension implements PrependExte ] ] ], + [ + 'class' => \Chill\AsideActivityBundle\Entity\AsideActivity::class, + 'name' => 'aside_activity', + 'base_path' => '/asideactivity', + 'form_class' => \Chill\AsideActivityBundle\Form\AsideActivityFormType::class, + 'controller' => \Chill\AsideActivityBundle\Controller\AsideActivityController::class, + 'actions' => [ + 'index' => [ + 'template' => '@ChillAsideActivity/asideActivity/index.html.twig', + 'role' => 'ROLE_USER' + ], + 'new' => [ + 'role' => 'ROLE_USER', + 'template' => '@ChillAsideActivity/asideActivity/new.html.twig', + ], + 'edit' => [ + 'role' => 'ROLE_USER', + 'template' => '@ChillAsideActivity/asideActivity/edit.html.twig', + ] + ] + ], ] ]); } From b571620e6cd26ec6a7d24c7e04da025d1b87f5d0 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 3 Aug 2021 14:45:21 +0200 Subject: [PATCH 026/100] aside activity category changed into final class --- .../src/Entity/AsideActivityCategory.php | 2 +- .../views/asideActivity/new.html.twig | 28 ++++--------------- 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php index bd9318040..5ac22ced4 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php @@ -9,7 +9,7 @@ use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity */ -class AsideActivityCategory +final class AsideActivityCategory { /** * @ORM\Id diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/new.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/new.html.twig index e6283d8d4..d7ac89752 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/new.html.twig +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/new.html.twig @@ -1,27 +1,11 @@ -{% extends '@ChillMain/Admin/layout.html.twig' %} +{% extends "@ChillActivity/Admin/layout_activity.html.twig" %} {% block title %} -{% include('@ChillMain/CRUD/_new_title.html.twig') %} + {% include('@ChillMain/CRUD/_new_title.html.twig') %} {% endblock %} -{% block admin_content %} -{% embed '@ChillMain/CRUD/_new_content.html.twig' %} - {% block content_form_actions_save_and_show %}{% endblock %} -{% endembed %} +{% block layout_wvm_content %} + {% embed '@ChillMain/CRUD/_new_content.html.twig' %} + {% block content_form_actions_save_and_show %}{% endblock %} + {% endembed %} {% endblock %} - -{% block body %} - -

Creér un activité annexe

- - {{ form_start(asideActivityForm) }} - - - - - {{ form_widget(asideActivityForm) }} - - - {{ form_end(asideActivityForm)}} - -{% endblock %} \ No newline at end of file From 82841f47c8de1cf30dc214bf1644e4e489577f4f Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 3 Aug 2021 14:46:10 +0200 Subject: [PATCH 027/100] aside activity changed into final class and implements trackUpdateInterface, TrackCreationInterface --- .../ChillAsideActivityBundle/src/Entity/AsideActivity.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php index 479396482..18ca4e715 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php @@ -2,13 +2,15 @@ namespace Chill\AsideActivityBundle\Entity; +use Chill\MainBundle\Doctrine\Model\TrackCreationInterface; +use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface; use Chill\MainBundle\Entity\User; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; /** * @ORM\Entity */ -class AsideActivity +final class AsideActivity implements TrackUpdateInterface, TrackCreationInterface { /** * @ORM\Id From a0154331de7bd356df7ece0de54e5c9029d32c70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 3 Aug 2021 12:51:40 +0000 Subject: [PATCH 028/100] Apply 1 suggestion(s) to 1 file(s) --- src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php index 18ca4e715..15070542d 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php @@ -9,6 +9,7 @@ use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; /** * @ORM\Entity + * @Table(schema="chill_asideactivity") */ final class AsideActivity implements TrackUpdateInterface, TrackCreationInterface { From e42a5217be43b9f22de4989d3cf65cca1aa71326 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 3 Aug 2021 14:53:39 +0200 Subject: [PATCH 029/100] createdBy field deleted from form --- .../src/Form/AsideActivityFormType.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php index 40633c362..72da5bfca 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php @@ -16,13 +16,6 @@ class AsideActivityFormType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder - ->add('createdBy', EntityType::class, - [ - 'label' => 'Utilisateur', - 'required' => true, - 'class' => User::class, - 'choice_label' => 'username' - ]) ->add('agent', EntityType::class, [ 'label' => 'Agent', From 3e498c34e5a4a87f2de7cae882bb46952d1f80a1 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 3 Aug 2021 16:49:02 +0200 Subject: [PATCH 030/100] aside activity category commented out of form --- .../src/Form/AsideActivityFormType.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php index 72da5bfca..db735eac3 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php @@ -3,6 +3,7 @@ namespace Chill\AsideActivityBundle\Form; use Chill\AsideActivityBundle\Entity\AsideActivity; +use Chill\AsideActivityBundle\Entity\AsideActivityCategory; use Chill\MainBundle\Entity\User; use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\AbstractType; @@ -21,11 +22,20 @@ class AsideActivityFormType extends AbstractType 'label' => 'Agent', 'required' => true, 'class' => User::class, - 'placeholder' => 'L’agent pour qui l\'activité annexe est créée', + 'placeholder' => 'Choissisez l\'agent pour qui l\'activité est créée', 'choice_label' => 'username' ]) + // ->add('type', EntityType::class, + // [ + // 'label' => 'Type', + // 'required' => true, + // 'class' => AsideActivityCategory::class, + // 'placeholder' => 'Choissisez le type d\'activité', + // 'choice_label' => 'title' + // ]) ->add('note', TextareaType::class, [ - 'label' => 'Note' + 'label' => 'Note', + 'required' => false, ]) ; } From fadf2d62b01474f4d51d34c5721af1bd991a0672 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 3 Aug 2021 16:49:51 +0200 Subject: [PATCH 031/100] use statements added and typehint updatedAt fixed --- .../ChillAsideActivityBundle/src/Entity/AsideActivity.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php index 15070542d..9adad4b83 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php @@ -9,7 +9,7 @@ use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; /** * @ORM\Entity - * @Table(schema="chill_asideactivity") + * @ORM\Table(schema="chill_asideactivity") */ final class AsideActivity implements TrackUpdateInterface, TrackCreationInterface { @@ -132,7 +132,7 @@ final class AsideActivity implements TrackUpdateInterface, TrackCreationInterfac return $this->updatedAt; } - public function setUpdatedAt(?\DateTimeImmutable $updatedAt): self + public function setUpdatedAt(\DateTimeInterface $updatedAt): self { $this->updatedAt = $updatedAt; From 85b7e4add8cb777a1e903c8cfeb80cfdd5e79eda Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 3 Aug 2021 16:50:07 +0200 Subject: [PATCH 032/100] use statement added --- .../src/Entity/AsideActivityCategory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php index c3d64661f..ba1856091 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php @@ -8,7 +8,7 @@ use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity - * @Table(schema="chill_asideactivity") + * @ORM\Table(schema="chill_asideactivity") */ final class AsideActivityCategory { From 7f3b2662094a5a149b0bffff8d12c312eb4d9e33 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 4 Aug 2021 10:34:39 +0200 Subject: [PATCH 033/100] new migration --- .../src/migrations/Version20210804082249.php | 232 ++++++++++++++++++ 1 file changed, 232 insertions(+) create mode 100644 src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210804082249.php diff --git a/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210804082249.php b/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210804082249.php new file mode 100644 index 000000000..00d353368 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210804082249.php @@ -0,0 +1,232 @@ +addSql('CREATE SCHEMA chill_asideactivity'); + $this->addSql('ALTER TABLE asideactivity DROP CONSTRAINT fk_e9fa2191c54c8c93'); + $this->addSql('DROP SEQUENCE asideactivity_id_seq CASCADE'); + $this->addSql('DROP SEQUENCE asideactivitytype_id_seq CASCADE'); + $this->addSql('CREATE SEQUENCE chill_asideactivity.AsideActivity_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE chill_asideactivity.AsideActivityCategory_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE TABLE chill_asideactivity.AsideActivity (id INT NOT NULL, type_id INT NOT NULL, agent_id INT NOT NULL, createdAt TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, updatedAt TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, date TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, duration INT DEFAULT NULL, location VARCHAR(100) DEFAULT NULL, note TEXT DEFAULT NULL, createdBy_id INT NOT NULL, updatedBy_id INT DEFAULT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE INDEX IDX_A866DA0EC54C8C93 ON chill_asideactivity.AsideActivity (type_id)'); + $this->addSql('CREATE INDEX IDX_A866DA0E3174800F ON chill_asideactivity.AsideActivity (createdBy_id)'); + $this->addSql('CREATE INDEX IDX_A866DA0E65FF1AEC ON chill_asideactivity.AsideActivity (updatedBy_id)'); + $this->addSql('CREATE INDEX IDX_A866DA0E3414710B ON chill_asideactivity.AsideActivity (agent_id)'); + $this->addSql('COMMENT ON COLUMN chill_asideactivity.AsideActivity.createdAt IS \'(DC2Type:datetime_immutable)\''); + $this->addSql('COMMENT ON COLUMN chill_asideactivity.AsideActivity.updatedAt IS \'(DC2Type:datetime_immutable)\''); + $this->addSql('COMMENT ON COLUMN chill_asideactivity.AsideActivity.date IS \'(DC2Type:datetime_immutable)\''); + $this->addSql('CREATE TABLE chill_asideactivity.AsideActivityCategory (id INT NOT NULL, title JSON NOT NULL, isActive BOOLEAN NOT NULL, PRIMARY KEY(id))'); + $this->addSql('ALTER TABLE chill_asideactivity.AsideActivity ADD CONSTRAINT FK_A866DA0EC54C8C93 FOREIGN KEY (type_id) REFERENCES chill_asideactivity.AsideActivityCategory (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_asideactivity.AsideActivity ADD CONSTRAINT FK_A866DA0E3174800F FOREIGN KEY (createdBy_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_asideactivity.AsideActivity ADD CONSTRAINT FK_A866DA0E65FF1AEC FOREIGN KEY (updatedBy_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_asideactivity.AsideActivity ADD CONSTRAINT FK_A866DA0E3414710B FOREIGN KEY (agent_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('DROP TABLE asideactivitytype'); + $this->addSql('DROP TABLE asideactivity'); + // $this->addSql('DROP TABLE chill_main_address_legacy'); + // $this->addSql('ALTER INDEX idx_55026b0ca76ed395 RENAME TO IDX_AC74095AA76ED395'); + // $this->addSql('ALTER INDEX idx_55026b0cc54c8c93 RENAME TO IDX_AC74095AC54C8C93'); + // $this->addSql('ALTER INDEX idx_55026b0c682b5931 RENAME TO IDX_AC74095A682B5931'); + // $this->addSql('ALTER INDEX idx_55026b0c217bbb47 RENAME TO IDX_AC74095A217BBB47'); + // $this->addSql('ALTER INDEX idx_ac74095a550b0c53 RENAME TO IDX_AC74095AD7FA8EF0'); + // $this->addSql('ALTER TABLE activityreason ALTER name SET NOT NULL'); + // $this->addSql('COMMENT ON COLUMN activityreason.name IS \'(DC2Type:json_array)\''); + // $this->addSql('ALTER INDEX idx_654a2fcd12469de2 RENAME TO IDX_AF82522312469DE2'); + // $this->addSql('ALTER TABLE activityreasoncategory ALTER name SET NOT NULL'); + // $this->addSql('COMMENT ON COLUMN activityreasoncategory.name IS \'(DC2Type:json_array)\''); + // $this->addSql('ALTER TABLE activitytype ALTER category_id DROP DEFAULT'); + // $this->addSql('ALTER TABLE chill_main_address DROP customs'); + // $this->addSql('ALTER TABLE chill_main_address ALTER isnoaddress DROP DEFAULT'); + // $this->addSql('ALTER TABLE chill_main_address ALTER point TYPE geometry(POINT,4326)'); + // $this->addSql('ALTER TABLE chill_main_address ALTER point DROP DEFAULT'); + // $this->addSql('ALTER TABLE chill_main_address_reference ALTER point TYPE geometry(POINT,4326)'); + // $this->addSql('ALTER TABLE chill_main_address_reference ALTER point DROP DEFAULT'); + // $this->addSql('CREATE INDEX search_name_code ON chill_main_postal_code (code, label)'); + // $this->addSql('ALTER INDEX idx_64a4a621504cb38d RENAME TO IDX_E260A868504CB38D'); + // $this->addSql('ALTER TABLE chill_person_accompanying_period_closingmotive ALTER ordering DROP DEFAULT'); + // $this->addSql('ALTER INDEX idx_92351ece727aca70 RENAME TO IDX_72D110E8727ACA70'); + // $this->addSql('ALTER TABLE chill_person_accompanying_period_participation ALTER startdate DROP DEFAULT'); + // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER startdate TYPE DATE'); + // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER startdate DROP DEFAULT'); + // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER enddate TYPE DATE'); + // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER enddate DROP DEFAULT'); + // $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work.startDate IS \'(DC2Type:date_immutable)\''); + // $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work.endDate IS \'(DC2Type:date_immutable)\''); + // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ADD CONSTRAINT FK_B694FB365FF1AEC FOREIGN KEY (updatedBy_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + // $this->addSql('CREATE INDEX IDX_B694FB365FF1AEC ON chill_person_accompanying_period_work (updatedBy_id)'); + // $this->addSql('ALTER TABLE chill_person_household DROP CONSTRAINT fk_household_comment_embeddable_user'); + // $this->addSql('DROP INDEX IDX_BE50A270116F5FA9'); + // $this->addSql('DROP INDEX household_members_not_overlaps'); + // $this->addSql('ALTER TABLE chill_person_household_members ALTER startdate TYPE DATE'); + // $this->addSql('ALTER TABLE chill_person_household_members ALTER startdate DROP DEFAULT'); + // $this->addSql('ALTER TABLE chill_person_household_members ALTER enddate TYPE DATE'); + // $this->addSql('ALTER TABLE chill_person_household_members ALTER enddate DROP DEFAULT'); + // $this->addSql('COMMENT ON COLUMN chill_person_household_members.startDate IS \'(DC2Type:date_immutable)\''); + // $this->addSql('COMMENT ON COLUMN chill_person_household_members.endDate IS \'(DC2Type:date_immutable)\''); + // $this->addSql('ALTER TABLE chill_person_marital_status ALTER id TYPE VARCHAR(7)'); + // $this->addSql('COMMENT ON COLUMN chill_person_marital_status.name IS \'(DC2Type:json_array)\''); + // $this->addSql('DROP INDEX mobilenumber_trgm_idx'); + // $this->addSql('DROP INDEX fullnamecanonical_trgm_idx'); + // $this->addSql('DROP INDEX phonenumber_trgm_idx'); + // $this->addSql('ALTER TABLE chill_person_person DROP cfdata_old'); + // $this->addSql('ALTER TABLE chill_person_person ALTER maritalstatus_id TYPE VARCHAR(7)'); + // $this->addSql('ALTER TABLE chill_person_person ALTER cfdata SET NOT NULL'); + // $this->addSql('COMMENT ON COLUMN chill_person_person.cFData IS \'(DC2Type:json_array)\''); + // $this->addSql('ALTER INDEX idx_3370d4403818da5 RENAME TO IDX_BF210A143818DA5'); + // $this->addSql('ALTER INDEX idx_3370d4401c9da55 RENAME TO IDX_BF210A141C9DA55'); + // $this->addSql('ALTER INDEX idx_bf210a145521be40 RENAME TO IDX_BF210A14D7D03CE3'); + // $this->addSql('ALTER INDEX idx_person_center RENAME TO IDX_BF210A145932F377'); + // $this->addSql('ALTER TABLE persons_spoken_languages DROP CONSTRAINT FK_7201106F217BBB47'); + // $this->addSql('ALTER TABLE persons_spoken_languages DROP CONSTRAINT FK_7201106F82F1BAF4'); + // $this->addSql('ALTER TABLE persons_spoken_languages ADD CONSTRAINT FK_7201106F217BBB47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + // $this->addSql('ALTER TABLE persons_spoken_languages ADD CONSTRAINT FK_7201106F82F1BAF4 FOREIGN KEY (language_id) REFERENCES language (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + // $this->addSql('ALTER TABLE chill_person_social_work_evaluation ALTER notificationdelay SET NOT NULL'); + // $this->addSql('COMMENT ON COLUMN country.name IS \'(DC2Type:json_array)\''); + // $this->addSql('ALTER TABLE custom_field_long_choice_options ALTER internal_key DROP DEFAULT'); + // $this->addSql('COMMENT ON COLUMN custom_field_long_choice_options.text IS \'(DC2Type:json_array)\''); + // $this->addSql('ALTER TABLE customfield ALTER required DROP DEFAULT'); + // $this->addSql('ALTER TABLE customfield ALTER required SET NOT NULL'); + // $this->addSql('COMMENT ON COLUMN customfield.name IS \'(DC2Type:json_array)\''); + // $this->addSql('COMMENT ON COLUMN customfield.options IS \'(DC2Type:json_array)\''); + // $this->addSql('ALTER INDEX idx_40fb5d6dfec418b RENAME TO IDX_7A6FDBEFEC418B'); + // $this->addSql('ALTER INDEX idx_286dc95df53b66 RENAME TO IDX_7A48DF7F5DF53B66'); + // $this->addSql('ALTER TABLE customfieldsgroup ALTER options DROP DEFAULT'); + // $this->addSql('ALTER TABLE customfieldsgroup ALTER options SET NOT NULL'); + // $this->addSql('COMMENT ON COLUMN customfieldsgroup.name IS \'(DC2Type:json_array)\''); + // $this->addSql('COMMENT ON COLUMN customfieldsgroup.options IS \'(DC2Type:json_array)\''); + // $this->addSql('ALTER INDEX idx_a14d8f3d447bbb3b RENAME TO IDX_A14D8F3D96DF1F10'); + // $this->addSql('COMMENT ON COLUMN language.name IS \'(DC2Type:json_array)\''); + // $this->addSql('ALTER TABLE permission_groups ALTER flags DROP DEFAULT'); + // $this->addSql('COMMENT ON COLUMN scopes.name IS \'(DC2Type:json_array)\''); + // $this->addSql('ALTER INDEX chill_3party.idx_c65d4397c7d3a8e6 RENAME TO IDX_14DC4475C7D3A8E6'); + // $this->addSql('ALTER INDEX chill_3party.idx_c65d43975932f377 RENAME TO IDX_14DC44755932F377'); + // $this->addSql('ALTER TABLE users ALTER usernamecanonical SET NOT NULL'); + // $this->addSql('DROP INDEX uniq_93f763ae217bbb47'); + // $this->addSql('ALTER TABLE chill_vendee.vendeeperson_entourage ADD CONSTRAINT FK_4D319FFEF57537C3 FOREIGN KEY (vendeeperson_id) REFERENCES chill_vendee.vendee_person (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + // $this->addSql('ALTER INDEX chill_vendee.idx_1a4b602deef79338 RENAME TO IDX_DD0A4C00EEF79338'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('CREATE SCHEMA public'); + $this->addSql('ALTER TABLE chill_asideactivity.AsideActivity DROP CONSTRAINT FK_A866DA0EC54C8C93'); + $this->addSql('DROP SEQUENCE chill_asideactivity.AsideActivity_id_seq CASCADE'); + $this->addSql('DROP SEQUENCE chill_asideactivity.AsideActivityCategory_id_seq CASCADE'); + $this->addSql('CREATE SEQUENCE asideactivity_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE asideactivitytype_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE TABLE asideactivitytype (id INT NOT NULL, title VARCHAR(255) NOT NULL, isactive BOOLEAN NOT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE TABLE asideactivity (id INT NOT NULL, type_id INT NOT NULL, agent_id INT NOT NULL, createdby_id INT NOT NULL, updatedby_id INT DEFAULT NULL, createdat TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, updatedat TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, date TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, duration TIME(0) WITHOUT TIME ZONE DEFAULT NULL, location VARCHAR(100) DEFAULT NULL, note TEXT DEFAULT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE INDEX idx_e9fa21913174800f ON asideactivity (createdby_id)'); + $this->addSql('CREATE INDEX idx_e9fa2191c54c8c93 ON asideactivity (type_id)'); + $this->addSql('CREATE INDEX idx_e9fa219165ff1aec ON asideactivity (updatedby_id)'); + $this->addSql('CREATE INDEX idx_e9fa21913414710b ON asideactivity (agent_id)'); + $this->addSql('COMMENT ON COLUMN asideactivity.updatedat IS \'(DC2Type:datetime_immutable)\''); + $this->addSql('CREATE TABLE chill_main_address_legacy (id INT DEFAULT NULL, postcode_id INT DEFAULT NULL, street VARCHAR(255) DEFAULT NULL, streetnumber VARCHAR(255) DEFAULT NULL, validfrom DATE DEFAULT NULL, isnoaddress BOOLEAN DEFAULT NULL, customs JSONB DEFAULT NULL, floor VARCHAR(16) DEFAULT NULL, corridor VARCHAR(16) DEFAULT NULL, steps VARCHAR(16) DEFAULT NULL, buildingname VARCHAR(255) DEFAULT NULL, flat VARCHAR(16) DEFAULT NULL, distribution VARCHAR(255) DEFAULT NULL, extra VARCHAR(255) DEFAULT NULL, validto DATE DEFAULT NULL, point VARCHAR(255) DEFAULT NULL, linkedtothirdparty_id INT DEFAULT NULL)'); + $this->addSql('ALTER TABLE asideactivity ADD CONSTRAINT fk_e9fa2191c54c8c93 FOREIGN KEY (type_id) REFERENCES asideactivitytype (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE asideactivity ADD CONSTRAINT fk_e9fa21913174800f FOREIGN KEY (createdby_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE asideactivity ADD CONSTRAINT fk_e9fa219165ff1aec FOREIGN KEY (updatedby_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE asideactivity ADD CONSTRAINT fk_e9fa21913414710b FOREIGN KEY (agent_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('DROP TABLE chill_asideactivity.AsideActivity'); + $this->addSql('DROP TABLE chill_asideactivity.AsideActivityCategory'); + // $this->addSql('COMMENT ON COLUMN scopes.name IS NULL'); + // $this->addSql('ALTER INDEX idx_7a48df7f5df53b66 RENAME TO idx_286dc95df53b66'); + // $this->addSql('COMMENT ON COLUMN country.name IS NULL'); + // $this->addSql('ALTER TABLE persons_spoken_languages DROP CONSTRAINT fk_7201106f217bbb47'); + // $this->addSql('ALTER TABLE persons_spoken_languages DROP CONSTRAINT fk_7201106f82f1baf4'); + // $this->addSql('ALTER TABLE persons_spoken_languages ADD CONSTRAINT fk_7201106f217bbb47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + // $this->addSql('ALTER TABLE persons_spoken_languages ADD CONSTRAINT fk_7201106f82f1baf4 FOREIGN KEY (language_id) REFERENCES language (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + // $this->addSql('COMMENT ON COLUMN language.name IS NULL'); + // $this->addSql('ALTER TABLE customfieldsgroup ALTER options SET DEFAULT \'{}\''); + // $this->addSql('ALTER TABLE customfieldsgroup ALTER options DROP NOT NULL'); + // $this->addSql('COMMENT ON COLUMN customfieldsgroup.name IS NULL'); + // $this->addSql('COMMENT ON COLUMN customfieldsgroup.options IS NULL'); + // $this->addSql('ALTER TABLE activityreasoncategory ALTER name DROP NOT NULL'); + // $this->addSql('COMMENT ON COLUMN activityreasoncategory.name IS NULL'); + // $this->addSql('ALTER TABLE activityreason ALTER name DROP NOT NULL'); + // $this->addSql('COMMENT ON COLUMN activityreason.name IS NULL'); + // $this->addSql('ALTER INDEX idx_af82522312469de2 RENAME TO idx_654a2fcd12469de2'); + // $this->addSql('ALTER INDEX idx_a14d8f3d96df1f10 RENAME TO idx_a14d8f3d447bbb3b'); + // $this->addSql('ALTER TABLE customfield ALTER required SET DEFAULT \'false\''); + // $this->addSql('ALTER TABLE customfield ALTER required DROP NOT NULL'); + // $this->addSql('COMMENT ON COLUMN customfield.options IS NULL'); + // $this->addSql('COMMENT ON COLUMN customfield.name IS NULL'); + // $this->addSql('ALTER INDEX idx_7a6fdbefec418b RENAME TO idx_40fb5d6dfec418b'); + // $this->addSql('ALTER TABLE custom_field_long_choice_options ALTER internal_key SET DEFAULT \'\''); + // $this->addSql('COMMENT ON COLUMN custom_field_long_choice_options.text IS NULL'); + // $this->addSql('ALTER TABLE chill_person_marital_status ALTER id TYPE VARCHAR(10)'); + // $this->addSql('COMMENT ON COLUMN chill_person_marital_status.name IS NULL'); + // $this->addSql('ALTER TABLE permission_groups ALTER flags SET DEFAULT \'[]\''); + // $this->addSql('ALTER INDEX chill_3party.idx_14dc4475c7d3a8e6 RENAME TO idx_c65d4397c7d3a8e6'); + // $this->addSql('ALTER INDEX chill_3party.idx_14dc44755932f377 RENAME TO idx_c65d43975932f377'); + // $this->addSql('ALTER TABLE users ALTER usernameCanonical DROP NOT NULL'); + // $this->addSql('ALTER TABLE chill_person_accompanying_period_closingmotive ALTER ordering SET DEFAULT \'0\''); + // $this->addSql('ALTER INDEX idx_72d110e8727aca70 RENAME TO idx_92351ece727aca70'); + // $this->addSql('ALTER TABLE chill_person_accompanying_period_participation ALTER startDate SET DEFAULT \'1970-01-01\''); + // $this->addSql('ALTER TABLE chill_person_social_work_evaluation ALTER notificationDelay DROP NOT NULL'); + // $this->addSql('ALTER TABLE chill_main_address_reference ALTER point TYPE VARCHAR(255)'); + // $this->addSql('ALTER TABLE chill_main_address_reference ALTER point DROP DEFAULT'); + // $this->addSql('ALTER TABLE chill_main_address ADD customs JSONB DEFAULT \'[]\''); + // $this->addSql('ALTER TABLE chill_main_address ALTER isNoAddress SET DEFAULT \'false\''); + // $this->addSql('ALTER TABLE chill_main_address ALTER point TYPE VARCHAR(255)'); + // $this->addSql('ALTER TABLE chill_main_address ALTER point DROP DEFAULT'); + // $this->addSql('ALTER INDEX idx_e260a868504cb38d RENAME TO idx_64a4a621504cb38d'); + // $this->addSql('ALTER INDEX idx_ac74095aa76ed395 RENAME TO idx_55026b0ca76ed395'); + // $this->addSql('ALTER INDEX idx_ac74095a682b5931 RENAME TO idx_55026b0c682b5931'); + // $this->addSql('ALTER INDEX idx_ac74095a217bbb47 RENAME TO idx_55026b0c217bbb47'); + // $this->addSql('ALTER INDEX idx_ac74095ac54c8c93 RENAME TO idx_55026b0cc54c8c93'); + // $this->addSql('ALTER INDEX idx_ac74095ad7fa8ef0 RENAME TO IDX_AC74095A550B0C53'); + // $this->addSql('ALTER TABLE chill_person_household_members ALTER startDate TYPE DATE'); + // $this->addSql('ALTER TABLE chill_person_household_members ALTER startDate DROP DEFAULT'); + // $this->addSql('ALTER TABLE chill_person_household_members ALTER endDate TYPE DATE'); + // $this->addSql('ALTER TABLE chill_person_household_members ALTER endDate DROP DEFAULT'); + // $this->addSql('COMMENT ON COLUMN chill_person_household_members.startdate IS NULL'); + // $this->addSql('COMMENT ON COLUMN chill_person_household_members.enddate IS NULL'); + // $this->addSql('CREATE INDEX household_members_not_overlaps ON chill_person_household_members (person_id) WHERE (sharedhousehold IS TRUE)'); + // $this->addSql('ALTER TABLE activitytype ALTER category_id SET DEFAULT 1'); + // $this->addSql('ALTER TABLE chill_person_household ADD CONSTRAINT fk_household_comment_embeddable_user FOREIGN KEY (comment_members_userid) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + // $this->addSql('CREATE INDEX IDX_BE50A270116F5FA9 ON chill_person_household (comment_members_userid)'); + // $this->addSql('DROP INDEX search_name_code'); + // $this->addSql('ALTER TABLE chill_person_person ADD cfdata_old TEXT DEFAULT NULL'); + // $this->addSql('ALTER TABLE chill_person_person ALTER cFData DROP NOT NULL'); + // $this->addSql('ALTER TABLE chill_person_person ALTER maritalStatus_id TYPE VARCHAR(10)'); + // $this->addSql('COMMENT ON COLUMN chill_person_person.cfdata_old IS \'(DC2Type:array)\''); + // $this->addSql('COMMENT ON COLUMN chill_person_person.cfdata IS NULL'); + // $this->addSql('CREATE INDEX mobilenumber_trgm_idx ON chill_person_person (mobilenumber)'); + // $this->addSql('CREATE INDEX fullnamecanonical_trgm_idx ON chill_person_person (fullnamecanonical)'); + // $this->addSql('CREATE INDEX phonenumber_trgm_idx ON chill_person_person (phonenumber)'); + // $this->addSql('ALTER INDEX idx_bf210a141c9da55 RENAME TO idx_3370d4401c9da55'); + // $this->addSql('ALTER INDEX idx_bf210a143818da5 RENAME TO idx_3370d4403818da5'); + // $this->addSql('ALTER INDEX idx_bf210a145932f377 RENAME TO idx_person_center'); + // $this->addSql('ALTER INDEX idx_bf210a14d7d03ce3 RENAME TO IDX_BF210A145521BE40'); + // $this->addSql('ALTER TABLE chill_person_accompanying_period_work DROP CONSTRAINT FK_B694FB365FF1AEC'); + // $this->addSql('DROP INDEX IDX_B694FB365FF1AEC'); + // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER startDate TYPE TIMESTAMP(0) WITHOUT TIME ZONE'); + // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER startDate DROP DEFAULT'); + // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER endDate TYPE TIMESTAMP(0) WITHOUT TIME ZONE'); + // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER endDate DROP DEFAULT'); + // $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work.startdate IS \'(DC2Type:datetime_immutable)\''); + // $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work.enddate IS \'(DC2Type:datetime_immutable)\''); + // $this->addSql('CREATE UNIQUE INDEX uniq_93f763ae217bbb47 ON chill_vendee.vendee_person (person_id)'); + // $this->addSql('ALTER TABLE chill_vendee.vendeeperson_entourage DROP CONSTRAINT FK_4D319FFEF57537C3'); + // $this->addSql('ALTER INDEX chill_vendee.idx_dd0a4c00eef79338 RENAME TO idx_1a4b602deef79338'); + } +} From eec913375e14ad549d5dbb7039213c5148dbd64c Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 4 Aug 2021 15:12:44 +0200 Subject: [PATCH 034/100] obsolete annotation deleted @packages --- .../src/Controller/AsideActivityCategoryController.php | 2 -- .../src/Controller/AsideActivityController.php | 3 --- 2 files changed, 5 deletions(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityCategoryController.php b/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityCategoryController.php index 60007b179..37f10c343 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityCategoryController.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityCategoryController.php @@ -7,8 +7,6 @@ use Chill\MainBundle\CRUD\Controller\CRUDController; /** * Class AsideActivityBundle - * - * @package Chill\AsideActivityBundle\Controller */ class AsideActivityCategoryController extends CRUDController { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityController.php b/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityController.php index 1ba9212c2..55af4a6ab 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityController.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityController.php @@ -7,10 +7,7 @@ use Chill\MainBundle\CRUD\Controller\CRUDController; /** * Class AsideActivityBundle - * - * @package Chill\AsideActivityBundle\Controller */ - class AsideActivityController extends CRUDController { From 61d8e06975d7a10cfe2dcc443683a70dc0546658 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 4 Aug 2021 15:13:45 +0200 Subject: [PATCH 035/100] typehints fixed --- .../ChillAsideActivityBundle/src/Entity/AsideActivity.php | 2 ++ .../src/Entity/AsideActivityCategory.php | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php index 9adad4b83..8c4d3777b 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php @@ -1,5 +1,7 @@ id; } - public function getTitle(): ?string + public function getTitle(): ?array { return $this->title; } - public function setTitle(string $title): self + public function setTitle(array $title): self { $this->title = $title; From 3d630eeedfafa7e7e780807ec030416fe2ab4aaa Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 4 Aug 2021 15:19:43 +0200 Subject: [PATCH 036/100] PaginatorFactory error fixed provisionary. This should probably be done with dependency injection throughout the whole file though, to be checked --- src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php b/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php index ca28b1d14..18d37c99c 100644 --- a/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php +++ b/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php @@ -1137,11 +1137,12 @@ class CRUDController extends AbstractController } /** + * @todo (check how to do this with dependency injection and make changes...) * @return PaginatorFactory */ protected function getPaginatorFactory(): PaginatorFactory { - return $this->container->get(PaginatorFactory::class); + return $this->container->get('chill_main.paginator_factory'); } /** From 4716ab3e3c08b920db96089ad6b99141352e51e0 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 4 Aug 2021 15:20:21 +0200 Subject: [PATCH 037/100] twig template adapted to use with asideActivityCategory --- .../Resources/views/asideActivityCategory/index.html.twig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/index.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/index.html.twig index 3e0a4f404..c932eb594 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/index.html.twig +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivityCategory/index.html.twig @@ -14,9 +14,9 @@ {% for entity in entities %} - {{ entity.name|localize_translatable_string }} + {{ entity.title|localize_translatable_string }} - {%- if entity.active -%} + {%- if entity.isActive -%} {%- else -%} @@ -25,7 +25,7 @@
  • - +
From 51f4d2ab0eb51a370b1c672e482c150f0287ffdf Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 4 Aug 2021 15:21:08 +0200 Subject: [PATCH 038/100] changed TextType to TranslatableStringFormType --- .../src/Form/AsideActivityCategoryType.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityCategoryType.php b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityCategoryType.php index 36c818b4c..16657e18e 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityCategoryType.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityCategoryType.php @@ -2,16 +2,18 @@ namespace Chill\AsideActivityBundle\Form; +use Chill\AsideActivityBundle\Entity\AsideActivityCategory; +use Chill\MainBundle\Form\Type\TranslatableStringFormType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; -use Symfony\Component\Form\Extension\Core\Type\TextType; + use Symfony\Component\Form\FormBuilderInterface; class AsideActivityCategoryType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { - $builder->add('title', TextType::class, + $builder->add('title', TranslatableStringFormType::class, [ 'label' => 'Nom', ]) From 7a56ff7d290f4f3d706d1d24f96b7ab550f5602e Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 4 Aug 2021 16:30:27 +0200 Subject: [PATCH 039/100] translations yaml file created --- .../src/translations/messages.fr.yml | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/Bundle/ChillAsideActivityBundle/src/translations/messages.fr.yml diff --git a/src/Bundle/ChillAsideActivityBundle/src/translations/messages.fr.yml b/src/Bundle/ChillAsideActivityBundle/src/translations/messages.fr.yml new file mode 100644 index 000000000..521b33d74 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/translations/messages.fr.yml @@ -0,0 +1,30 @@ +# Crud +crud: + aside_activity: + title_new: Nouveau type d'activité + title_edit: Edition d'un type d'activité + aside_activity_category: + title_new: Nouvelle catégorie de type d'activité + title_edit: Edition d'une catégorie de type d'activité + +#forms +Activity creation: Nouvelle activité +Create: Créer +Back to the list: Retour à la liste +Save activity: Sauver l'activité +Reset form: Remise à zéro du formulaire +Choose the agent for whom this activity is created: Choissisez l'agent pour qui l'activitée est creeé. +Choose the duration: Choisir la durée +Choose a category: Choisir un categorie +5 minutes: 5 minutes +10 minutes: 10 minutes +15 minutes: 15 minutes +20 minutes: 20 minutes +25 minutes: 25 minutes +30 minutes: 30 minutes +45 minutes: 45 minutes +1 hour: 1 heure +1 hour 15: 1 heure 15 +1 hour 30: 1 heure 30 +1 hour 45: 1 heure 45 +2 hours: 2 heures \ No newline at end of file From 72b43e9a9999670d1a0ae5446b942990c7de8cfe Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 4 Aug 2021 16:32:06 +0200 Subject: [PATCH 040/100] form type created to handle selection of asideactivity categories, not yet operational --- .../TranslatableAsideActivityCategory.php | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/Bundle/ChillAsideActivityBundle/src/Form/Type/TranslatableAsideActivityCategory.php diff --git a/src/Bundle/ChillAsideActivityBundle/src/Form/Type/TranslatableAsideActivityCategory.php b/src/Bundle/ChillAsideActivityBundle/src/Form/Type/TranslatableAsideActivityCategory.php new file mode 100644 index 000000000..7340afd80 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/Form/Type/TranslatableAsideActivityCategory.php @@ -0,0 +1,54 @@ +requestStack = $requestStack; + } + + public function getBlockPrefix() + { + return 'translatable_aside_activity_category'; + } + + public function getParent() + { + return EntityType::class; + } + + public function configureOptions(OptionsResolver $resolver) + { + $locale = $this->requestStack->getCurrentRequest()->getLocale(); + $resolver->setDefaults( + array( + 'class' => 'ChillAsideActivityBundle:AsideActivityCategory', + 'choice_label' => 'name['.$locale.']', + 'query_builder' => function (EntityRepository $er) { + return $er->createQueryBuilder('c') + ->where('c.active = true'); + } + ) + ); + } +} \ No newline at end of file From 0072f4c6766e7612fddce3b851742c94ca9ee80c Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 4 Aug 2021 16:34:13 +0200 Subject: [PATCH 041/100] start of two new fields to select category and duration, but not working... problem with construct method in form --- .../src/Entity/AsideActivity.php | 2 +- .../src/Form/AsideActivityFormType.php | 26 ++++++++++++++++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php index 8c4d3777b..816dd88a0 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php @@ -52,7 +52,7 @@ final class AsideActivity implements TrackUpdateInterface, TrackCreationInterfac /** * @ORM\ManyToOne(targetEntity=User::class) * @ORM\JoinColumn(nullable=false) - * @Assert\NotBlank(message="Vous devez choisir un agent") + * @Assert\NotBlank() */ private $agent; diff --git a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php index db735eac3..1cd299576 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php @@ -4,6 +4,7 @@ namespace Chill\AsideActivityBundle\Form; use Chill\AsideActivityBundle\Entity\AsideActivity; use Chill\AsideActivityBundle\Entity\AsideActivityCategory; +use Chill\AsideActivityBundle\Form\Type\TranslatableAsideActivityCategory; use Chill\MainBundle\Entity\User; use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\AbstractType; @@ -14,17 +15,31 @@ use Symfony\Component\Form\Extension\Core\Type\TextareaType; class AsideActivityFormType extends AbstractType { + protected array $timeChoices; + + public function __construct (array $timeChoices){ + $this->timeChoices = $timeChoices; + } + public function buildForm(FormBuilderInterface $builder, array $options) { + $timeChoices = []; + $durationTimeOptions = [ + 'choices' => $timeChoices, + 'placeholder' => 'Choose the duration', + ]; + $builder ->add('agent', EntityType::class, [ 'label' => 'Agent', 'required' => true, 'class' => User::class, - 'placeholder' => 'Choissisez l\'agent pour qui l\'activité est créée', + //translate + 'placeholder' => 'Choose the agent for whom this activity is created', 'choice_label' => 'username' ]) + // ->add('category', TranslatableAsideActivityCategory::class) // ->add('type', EntityType::class, // [ // 'label' => 'Type', @@ -33,11 +48,11 @@ class AsideActivityFormType extends AbstractType // 'placeholder' => 'Choissisez le type d\'activité', // 'choice_label' => 'title' // ]) + ->add('durationTime', ChoiceType::class, $durationTimeOptions) ->add('note', TextareaType::class, [ 'label' => 'Note', 'required' => false, - ]) -; + ]); } public function configureOptions(OptionsResolver $resolver): void @@ -46,4 +61,9 @@ class AsideActivityFormType extends AbstractType 'data_class' => AsideActivity::class, ]); } + + public function getBlockPrefix(): string + { + return 'chill_activitybundle_activity'; + } } \ No newline at end of file From d948ba0cd53cd2cbaac4317f387abe8895f31a3c Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 4 Aug 2021 17:46:20 +0200 Subject: [PATCH 042/100] form.yaml created in attempt to fix translatableasideactivitycategory form type --- .../ChillAsideActivityBundle/src/config/services/form.yaml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/Bundle/ChillAsideActivityBundle/src/config/services/form.yaml diff --git a/src/Bundle/ChillAsideActivityBundle/src/config/services/form.yaml b/src/Bundle/ChillAsideActivityBundle/src/config/services/form.yaml new file mode 100644 index 000000000..928484735 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/config/services/form.yaml @@ -0,0 +1,7 @@ +services: + chill.asideactivity.form.type.translatableasideactivitycategory: + class: Chill\AsideActivityBundle\Form\Type\TranslatableAsideActivityCategory + arguments: + - "@request_stack" + tags: + - { name: form.type, alias: translatable_asideactivity_category } \ No newline at end of file From d67b99b269a9f7bc401cd570101869fd211d84b0 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 6 Aug 2021 11:26:37 +0200 Subject: [PATCH 043/100] class changed into final class --- .../src/Form/AsideActivityCategoryType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityCategoryType.php b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityCategoryType.php index 16657e18e..1bfc6ed37 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityCategoryType.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityCategoryType.php @@ -9,7 +9,7 @@ use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\FormBuilderInterface; -class AsideActivityCategoryType extends AbstractType +final class AsideActivityCategoryType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { From 8649d49d982f8b7c4d55ddef232a94080dc8261a Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 6 Aug 2021 11:27:31 +0200 Subject: [PATCH 044/100] date field added and activity type field. Form listed as service in services.yaml asideactivity form added as service to inject necessary arguments --- .../src/Form/AsideActivityFormType.php | 63 ++++++++++++------- .../src/config/services.yaml | 9 +++ 2 files changed, 51 insertions(+), 21 deletions(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php index 1cd299576..fadfffce9 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php @@ -4,8 +4,9 @@ namespace Chill\AsideActivityBundle\Form; use Chill\AsideActivityBundle\Entity\AsideActivity; use Chill\AsideActivityBundle\Entity\AsideActivityCategory; -use Chill\AsideActivityBundle\Form\Type\TranslatableAsideActivityCategory; use Chill\MainBundle\Entity\User; +use Chill\MainBundle\Form\Type\ChillDateType; +use Chill\MainBundle\Templating\TranslatableStringHelper; use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; @@ -13,21 +14,28 @@ use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\Form\Extension\Core\Type\TextareaType; -class AsideActivityFormType extends AbstractType +final class AsideActivityFormType extends AbstractType { - protected array $timeChoices; + // protected array $timeChoices; + private TranslatableStringHelper $translatableStringHelper; - public function __construct (array $timeChoices){ - $this->timeChoices = $timeChoices; + public function __construct (TranslatableStringHelper $translatableStringHelper){ + // $this->timeChoices = $timeChoices; + $this->translatableStringHelper = $translatableStringHelper; } public function buildForm(FormBuilderInterface $builder, array $options) { - $timeChoices = []; - $durationTimeOptions = [ - 'choices' => $timeChoices, - 'placeholder' => 'Choose the duration', - ]; + // $timeChoices = []; + + // foreach ($this->timeChoices as $e) { + // $timeChoices[$e['label']] = $e['seconds']; + // } + + // $durationTimeOptions = [ + // 'choices' => $timeChoices, + // 'placeholder' => 'Choose the duration', + // ]; $builder ->add('agent', EntityType::class, @@ -39,16 +47,29 @@ class AsideActivityFormType extends AbstractType 'placeholder' => 'Choose the agent for whom this activity is created', 'choice_label' => 'username' ]) - // ->add('category', TranslatableAsideActivityCategory::class) - // ->add('type', EntityType::class, - // [ - // 'label' => 'Type', - // 'required' => true, - // 'class' => AsideActivityCategory::class, - // 'placeholder' => 'Choissisez le type d\'activité', - // 'choice_label' => 'title' - // ]) - ->add('durationTime', ChoiceType::class, $durationTimeOptions) + ->add('date', ChillDateType::class, + [ + 'label' => 'date', + 'data' => new \DateTime(), + //SETTING RANGE ONLY POSSIBLE WITH WIDGET 'CHOICE' AND NOT 'SINGLE_TEXT'? + // 'widget' => 'choice', + // 'years' => range(2020, date('Y')), + // 'months' => range(1, date('m')), + // 'days' => range(1, date('d')), + 'required' => true + ]) + ->add('type', EntityType::class, + [ + 'label' => 'Type', + 'required' => true, + 'class' => AsideActivityCategory::class, + 'placeholder' => 'Choose the activity category', + // 'choice_label' => 'title[""]' + 'choice_label' => function (AsideActivityCategory $asideActivityCategory) { + return $this->translatableStringHelper->localize($asideActivityCategory->getTitle()); + }, + ]) + // ->add('durationTime', ChoiceType::class, $durationTimeOptions) ->add('note', TextareaType::class, [ 'label' => 'Note', 'required' => false, @@ -64,6 +85,6 @@ class AsideActivityFormType extends AbstractType public function getBlockPrefix(): string { - return 'chill_activitybundle_activity'; + return 'chill_asideactivitybundle_asideactivity'; } } \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/src/config/services.yaml b/src/Bundle/ChillAsideActivityBundle/src/config/services.yaml index e69de29bb..fbf073f6d 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/config/services.yaml +++ b/src/Bundle/ChillAsideActivityBundle/src/config/services.yaml @@ -0,0 +1,9 @@ +services: + chill.asideactivity.form.type.asideactivity: + class: Chill\AsideActivityBundle\Form\AsideActivityFormType + arguments: + # - "@doctrine.orm.entity_manager" + - "@chill.main.helper.translatable_string" + # - "%chill_activity.form.time_duration%" + tags: + - { name: form.type, alias: chill_asideactivitybundle_asideactivity } \ No newline at end of file From 5d598bf46b26e206e83f323fee1bd9abab1ee01b Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 6 Aug 2021 11:30:35 +0200 Subject: [PATCH 045/100] translations adjusted --- .../src/translations/messages.fr.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/translations/messages.fr.yml b/src/Bundle/ChillAsideActivityBundle/src/translations/messages.fr.yml index 521b33d74..d3f80c703 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/translations/messages.fr.yml +++ b/src/Bundle/ChillAsideActivityBundle/src/translations/messages.fr.yml @@ -1,19 +1,20 @@ # Crud crud: aside_activity: - title_new: Nouveau type d'activité + title_new: Nouveau activité annexe title_edit: Edition d'un type d'activité aside_activity_category: - title_new: Nouvelle catégorie de type d'activité + title_new: Nouvelle catégorie d'activité annexe title_edit: Edition d'une catégorie de type d'activité #forms -Activity creation: Nouvelle activité +Activity creation: Nouvelle activité annexe Create: Créer Back to the list: Retour à la liste Save activity: Sauver l'activité Reset form: Remise à zéro du formulaire Choose the agent for whom this activity is created: Choissisez l'agent pour qui l'activitée est creeé. +Choose the activity category: Choissisez le type d'activité Choose the duration: Choisir la durée Choose a category: Choisir un categorie 5 minutes: 5 minutes From 9ee140a7d89721d974a1615cdc6054ab329d660d Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 6 Aug 2021 11:52:01 +0200 Subject: [PATCH 046/100] loading of asideactivityform service moved to form.yaml --- .../ChillAsideActivityExtension.php | 3 ++- .../src/config/services.yaml | 17 ++++++++--------- .../src/config/services/form.yaml | 9 +++++---- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/ChillAsideActivityExtension.php b/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/ChillAsideActivityExtension.php index fb24d5d46..523c04495 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/ChillAsideActivityExtension.php +++ b/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/ChillAsideActivityExtension.php @@ -25,7 +25,8 @@ final class ChillAsideActivityExtension extends Extension implements PrependExte public function load(array $configs, ContainerBuilder $container): void { $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../config')); - $loader->load('services.yaml'); + // $loader->load('services.yaml'); + $loader->load('services/form.yaml'); } public function prepend(ContainerBuilder $container) diff --git a/src/Bundle/ChillAsideActivityBundle/src/config/services.yaml b/src/Bundle/ChillAsideActivityBundle/src/config/services.yaml index fbf073f6d..727efaa38 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/config/services.yaml +++ b/src/Bundle/ChillAsideActivityBundle/src/config/services.yaml @@ -1,9 +1,8 @@ -services: - chill.asideactivity.form.type.asideactivity: - class: Chill\AsideActivityBundle\Form\AsideActivityFormType - arguments: - # - "@doctrine.orm.entity_manager" - - "@chill.main.helper.translatable_string" - # - "%chill_activity.form.time_duration%" - tags: - - { name: form.type, alias: chill_asideactivitybundle_asideactivity } \ No newline at end of file +# services: +# chill.asideactivity.form.type.asideactivity: +# class: Chill\AsideActivityBundle\Form\AsideActivityFormType +# arguments: +# - "@chill.main.helper.translatable_string" +# # - "%chill_activity.form.time_duration%" +# tags: +# - { name: form.type, alias: chill_asideactivitybundle_asideactivity } \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/src/config/services/form.yaml b/src/Bundle/ChillAsideActivityBundle/src/config/services/form.yaml index 928484735..52228fdcb 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/config/services/form.yaml +++ b/src/Bundle/ChillAsideActivityBundle/src/config/services/form.yaml @@ -1,7 +1,8 @@ services: - chill.asideactivity.form.type.translatableasideactivitycategory: - class: Chill\AsideActivityBundle\Form\Type\TranslatableAsideActivityCategory + chill.asideactivity.form.type.asideactivity: + class: Chill\AsideActivityBundle\Form\AsideActivityFormType arguments: - - "@request_stack" + - "@chill.main.helper.translatable_string" + # - "%chill_activity.form.time_duration%" tags: - - { name: form.type, alias: translatable_asideactivity_category } \ No newline at end of file + - { name: form.type, alias: chill_asideactivitybundle_asideactivity } \ No newline at end of file From 94b0432bb91f1e61f7dd69d44be191fef883ef36 Mon Sep 17 00:00:00 2001 From: Marc Ducobu Date: Wed, 12 May 2021 15:54:05 +0200 Subject: [PATCH 047/100] Removing spaces at the end of line --- .../DependencyInjection/ChillPersonExtension.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php index c9ad36319..3745c6849 100644 --- a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php +++ b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php @@ -355,6 +355,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac 'actions' => [ '_entity' => [ 'roles' => [ +<<<<<<< HEAD Request::METHOD_GET => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, Request::METHOD_PATCH => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, Request::METHOD_PUT => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, @@ -363,6 +364,9 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac Request::METHOD_GET => true, Request::METHOD_PUT => true, Request::METHOD_PATCH => true, +======= + Request::METHOD_GET => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE +>>>>>>> Removing spaces at the end of line ] ], 'participation' => [ @@ -376,6 +380,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, Request::METHOD_DELETE=> \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE ] +<<<<<<< HEAD ], 'resource' => [ 'methods' => [ @@ -462,6 +467,10 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, ] ], +======= + ] + +>>>>>>> Removing spaces at the end of line ] ], [ From c32ca59c76b6372e2bee7c62e523dd53c06af83f Mon Sep 17 00:00:00 2001 From: Marc Ducobu Date: Wed, 12 May 2021 15:57:19 +0200 Subject: [PATCH 048/100] Removing spaces at the end of line --- src/Bundle/ChillPersonBundle/config/services.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Bundle/ChillPersonBundle/config/services.yaml b/src/Bundle/ChillPersonBundle/config/services.yaml index aedea4396..922081d05 100644 --- a/src/Bundle/ChillPersonBundle/config/services.yaml +++ b/src/Bundle/ChillPersonBundle/config/services.yaml @@ -2,9 +2,12 @@ parameters: # cl_chill_person.example.class: Chill\PersonBundle\Example services: +<<<<<<< HEAD _defaults: autowire: true autoconfigure: true +======= +>>>>>>> Removing spaces at the end of line Chill\PersonBundle\Service\: resource: '../Service/' From 25eee8869320f0dd8c93fb543cd55ea23c0cd2c2 Mon Sep 17 00:00:00 2001 From: Marc Ducobu Date: Tue, 18 May 2021 10:56:36 +0200 Subject: [PATCH 049/100] Add license text --- .../SocialWork/SocialIssueRepository.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/Bundle/ChillPersonBundle/Repository/SocialWork/SocialIssueRepository.php b/src/Bundle/ChillPersonBundle/Repository/SocialWork/SocialIssueRepository.php index b0324ba33..51ced6976 100644 --- a/src/Bundle/ChillPersonBundle/Repository/SocialWork/SocialIssueRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/SocialWork/SocialIssueRepository.php @@ -1,6 +1,25 @@ , + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ namespace Chill\PersonBundle\Repository\SocialWork; From ad5eed4c2654f48993c101f37b7e39145f041e12 Mon Sep 17 00:00:00 2001 From: Marc Ducobu Date: Tue, 18 May 2021 16:24:27 +0200 Subject: [PATCH 050/100] SocialIssues became editable via admin --- .../SocialWork/AdminSocialIssueController.php | 33 ++++++++ .../ChillPersonExtension.php | 30 +++++-- .../Form/SocialWork/SocialIssueType.php | 83 +++++++++++++++++++ .../Repository/PersonRepository.php | 11 +++ .../SocialWork/SocialIssue/edit.html.twig | 12 +++ .../SocialWork/SocialIssue/index.html.twig | 27 ++++++ .../SocialWork/SocialIssue/new.html.twig | 11 +++ .../ChillPersonBundle/config/routes.yaml | 10 +++ .../ChillPersonBundle/config/services.yaml | 3 - .../config/services/form.yaml | 8 +- .../translations/messages.fr.yml | 7 ++ 11 files changed, 222 insertions(+), 13 deletions(-) create mode 100644 src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminSocialIssueController.php create mode 100644 src/Bundle/ChillPersonBundle/Form/SocialWork/SocialIssueType.php create mode 100644 src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialIssue/edit.html.twig create mode 100644 src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialIssue/index.html.twig create mode 100644 src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialIssue/new.html.twig diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminSocialIssueController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminSocialIssueController.php new file mode 100644 index 000000000..35b0df4a2 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminSocialIssueController.php @@ -0,0 +1,33 @@ + + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +namespace Chill\PersonBundle\Controller\SocialWork; + +use Chill\MainBundle\CRUD\Controller\CRUDController; + +/** + * Class AdminSocialIssueController + * Controller for social issues + * + * @package Chill\PersonBundle\Controller + */ +class AdminSocialIssueController extends CRUDController +{ +} diff --git a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php index 3745c6849..ecc390f59 100644 --- a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php +++ b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php @@ -345,6 +345,27 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac ] ] ], + [ + 'class' => \Chill\PersonBundle\Entity\SocialWork\SocialIssue::class, + 'name' => 'social_issue', + 'base_path' => '/admin/social-issue', + 'form_class' => \Chill\PersonBundle\Form\SocialWork\SocialIssueType::class, + 'controller' => \Chill\PersonBundle\Controller\SocialWork\AdminSocialIssueController::class, + 'actions' => [ + 'index' => [ + 'role' => 'ROLE_ADMIN', + 'template' => '@ChillPerson/SocialWork/SocialIssue/index.html.twig', + ], + 'new' => [ + 'role' => 'ROLE_ADMIN', + 'template' => '@ChillPerson/SocialWork/SocialIssue/new.html.twig', + ], + 'edit' => [ + 'role' => 'ROLE_ADMIN', + 'template' => '@ChillPerson/SocialWork/SocialIssue/edit.html.twig', + ] + ] + ] ], 'apis' => [ [ @@ -355,7 +376,6 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac 'actions' => [ '_entity' => [ 'roles' => [ -<<<<<<< HEAD Request::METHOD_GET => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, Request::METHOD_PATCH => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, Request::METHOD_PUT => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, @@ -364,9 +384,6 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac Request::METHOD_GET => true, Request::METHOD_PUT => true, Request::METHOD_PATCH => true, -======= - Request::METHOD_GET => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE ->>>>>>> Removing spaces at the end of line ] ], 'participation' => [ @@ -380,7 +397,6 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, Request::METHOD_DELETE=> \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE ] -<<<<<<< HEAD ], 'resource' => [ 'methods' => [ @@ -467,10 +483,6 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, ] ], -======= - ] - ->>>>>>> Removing spaces at the end of line ] ], [ diff --git a/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialIssueType.php b/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialIssueType.php new file mode 100644 index 000000000..482ff60f3 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialIssueType.php @@ -0,0 +1,83 @@ + + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +namespace Chill\PersonBundle\Form\SocialWork; + +use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; +use Chill\MainBundle\Form\Type\TranslatableStringFormType; +use Symfony\Component\Form\Extension\Core\Type\DateType; +use Chill\MainBundle\Templating\TranslatableStringHelper; +use Symfony\Bridge\Doctrine\Form\Type\EntityType; +use Chill\PersonBundle\Entity\SocialWork\SocialIssue; + +/** + * Class SocialIssueType + * + * @package Chill\PersonBundle\Form + */ +class SocialIssueType extends AbstractType +{ + /** + * + * @var TranslatableStringHelper + */ + protected $translatableStringHelper; + + public function __construct(TranslatableStringHelper $translatableStringHelper) { + $this->translatableStringHelper = $translatableStringHelper; + } + + /** + * @param FormBuilderInterface $builder + * @param array $options + */ + public function buildForm(FormBuilderInterface $builder, array $options) + { + $builder + ->add('title', TranslatableStringFormType::class, [ + 'label' => 'Nom' + ]) + + ->add('parent', EntityType::class, [ + 'class' => SocialIssue::class, + 'required' => false, + 'choice_label' => function (SocialIssue $issue) { + return $this->translatableStringHelper->localize($issue->getTitle()); + } + ]) + + ->add('desactivationDate', DateType::class, array( + 'attr' => array('class' => 'datepicker'), + 'widget'=> 'single_text', + 'format' => 'dd-MM-yyyy', + 'required' => false, + )); +} + + /** + * @param OptionsResolver $resolver + */ + public function configureOptions(OptionsResolver $resolver) + { + $resolver + ->setDefault('class', SocialIssue::class) + ; + } +} diff --git a/src/Bundle/ChillPersonBundle/Repository/PersonRepository.php b/src/Bundle/ChillPersonBundle/Repository/PersonRepository.php index d99ab590e..6686b55b7 100644 --- a/src/Bundle/ChillPersonBundle/Repository/PersonRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/PersonRepository.php @@ -18,11 +18,13 @@ namespace Chill\PersonBundle\Repository; + use Chill\PersonBundle\Entity\Person; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; use Doctrine\ORM\QueryBuilder; + final class PersonRepository { private EntityRepository $repository; @@ -113,11 +115,20 @@ final class PersonRepository $qb->setParameter('phonenumber', '%'.$phonenumber.'%'); } + + /** + * @param $phonenumber + * @return string + */ protected function parsePhoneNumber(string $phonenumber): string { return \str_replace(' ', '', $phonenumber); } + /** + * @param QueryBuilder $qb + * @param array $centers + */ protected function addByCenters(QueryBuilder $qb, array $centers): void { if (count($centers) > 0) { diff --git a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialIssue/edit.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialIssue/edit.html.twig new file mode 100644 index 000000000..0ae8754fe --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialIssue/edit.html.twig @@ -0,0 +1,12 @@ +{% extends '@ChillPerson/Admin/layout.html.twig' %} + +{% block title %} +{% include('@ChillMain/CRUD/_edit_title.html.twig') %} +{% endblock %} + +{% block layout_wvm_content %} +{% embed '@ChillMain/CRUD/_edit_content.html.twig' %} + {% block content_form_actions_view %}{% endblock %} + {% block content_form_actions_save_and_show %}{% endblock %} +{% endembed %} +{% endblock %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialIssue/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialIssue/index.html.twig new file mode 100644 index 000000000..44627852e --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialIssue/index.html.twig @@ -0,0 +1,27 @@ +{% extends '@ChillPerson/Admin/layout.html.twig' %} + +{% block layout_wvm_content %} + {% embed '@ChillMain/CRUD/_index.html.twig' %} + {% block table_entities_thead_tr %} + {{ 'Id'|trans }} + {{ 'Title'|trans }} +   + {% endblock %} + + {% block table_entities_tbody %} + {% for entity in entities %} + + {{ entity.id }} + {{ entity.title|localize_translatable_string }} + +
    +
  • + +
  • +
+ + + {% endfor %} + {% endblock %} + {% endembed %} +{% endblock %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialIssue/new.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialIssue/new.html.twig new file mode 100644 index 000000000..cc6021021 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialIssue/new.html.twig @@ -0,0 +1,11 @@ +{% extends '@ChillPerson/Admin/layout.html.twig' %} + +{% block title %} +{% include('@ChillMain/CRUD/_new_title.html.twig') %} +{% endblock %} + +{% block layout_wvm_content %} +{% embed '@ChillMain/CRUD/_new_content.html.twig' %} + {% block content_form_actions_save_and_show %}{% endblock %} +{% endembed %} +{% endblock %} diff --git a/src/Bundle/ChillPersonBundle/config/routes.yaml b/src/Bundle/ChillPersonBundle/config/routes.yaml index cd0de3ea3..8b5065bff 100644 --- a/src/Bundle/ChillPersonBundle/config/routes.yaml +++ b/src/Bundle/ChillPersonBundle/config/routes.yaml @@ -136,6 +136,16 @@ chill_person_maritalstatus_admin: order: 120 label: 'person_admin.marital status' +chill_person_socialissue_admin: + path: /{_locale}/admin/social-issue + controller: cscrud_social_issue_controller:index + options: + menus: + admin_person: + order: 150 + label: 'person_admin.social_issue' + + chill_person_controllers: resource: "@ChillPersonBundle/Controller" type: annotation diff --git a/src/Bundle/ChillPersonBundle/config/services.yaml b/src/Bundle/ChillPersonBundle/config/services.yaml index 922081d05..aedea4396 100644 --- a/src/Bundle/ChillPersonBundle/config/services.yaml +++ b/src/Bundle/ChillPersonBundle/config/services.yaml @@ -2,12 +2,9 @@ parameters: # cl_chill_person.example.class: Chill\PersonBundle\Example services: -<<<<<<< HEAD _defaults: autowire: true autoconfigure: true -======= ->>>>>>> Removing spaces at the end of line Chill\PersonBundle\Service\: resource: '../Service/' diff --git a/src/Bundle/ChillPersonBundle/config/services/form.yaml b/src/Bundle/ChillPersonBundle/config/services/form.yaml index aa6f36b28..0f415acac 100644 --- a/src/Bundle/ChillPersonBundle/config/services/form.yaml +++ b/src/Bundle/ChillPersonBundle/config/services/form.yaml @@ -32,7 +32,7 @@ services: chill.person.form.type.pick_person: class: Chill\PersonBundle\Form\Type\PickPersonType arguments: - - "@chill.person.repository.person" + - '@Chill\PersonBundle\Repository\PersonRepository' - "@security.token_storage" - "@chill.main.security.authorization.helper" - '@Symfony\Component\Routing\Generator\UrlGeneratorInterface' @@ -53,3 +53,9 @@ services: $em: '@Doctrine\ORM\EntityManagerInterface' tags: - { name: form.type } + + Chill\PersonBundle\Form\SocialWork\SocialIssueType: + arguments: + $translatableStringHelper: '@chill.main.helper.translatable_string' + tags: + - { name: form.type } diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 52254295b..5871c4733 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -304,6 +304,12 @@ crud: add_new: Ajouter un nouveau title_new: Nouvel état civil title_edit: Modifier l'état civil + social_issue: + index: + title: Liste des problématiques sociales + add_new: Ajouter une nouvelle problématique sociale + title_new: Nouvelle problématique sociale + title_edit: Modifier la problématique sociale # specific to closing motive closing_motive: @@ -322,6 +328,7 @@ person_admin: marital status list: Liste des états civils marital status explanation: > Configurer la liste des états civils. + social_issue: Problématiques sociales # specific to accompanying period accompanying_period: From 88847cb19c9df824e9b88e81f34f6dce9618917a Mon Sep 17 00:00:00 2001 From: Marc Ducobu Date: Wed, 19 May 2021 14:48:26 +0200 Subject: [PATCH 051/100] Other social entities became editable via admin --- .../SocialWork/AdminEvaluationController.php | 33 +++++++ .../SocialWork/AdminGoalController.php | 33 +++++++ .../SocialWork/AdminResultController.php | 33 +++++++ .../AdminSocialActionController.php | 33 +++++++ .../ChillPersonExtension.php | 92 ++++++++++++++++++- .../Form/SocialWork/EvaluationType.php | 87 ++++++++++++++++++ .../Form/SocialWork/GoalType.php | 87 ++++++++++++++++++ .../Form/SocialWork/ResultType.php | 76 +++++++++++++++ .../Form/SocialWork/SocialActionType.php | 90 ++++++++++++++++++ .../Form/SocialWork/SocialIssueType.php | 6 +- .../SocialWork/Evaluation/index.html.twig | 27 ++++++ .../views/SocialWork/Goal/index.html.twig | 27 ++++++ .../views/SocialWork/Result/index.html.twig | 27 ++++++ .../SocialWork/SocialAction/index.html.twig | 27 ++++++ .../{SocialIssue => }/edit.html.twig | 0 .../{SocialIssue => }/new.html.twig | 0 .../ChillPersonBundle/config/routes.yaml | 40 +++++++- .../config/services/form.yaml | 26 ++++++ .../translations/messages.fr.yml | 23 +++++ 19 files changed, 759 insertions(+), 8 deletions(-) create mode 100644 src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminEvaluationController.php create mode 100644 src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminGoalController.php create mode 100644 src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminResultController.php create mode 100644 src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminSocialActionController.php create mode 100644 src/Bundle/ChillPersonBundle/Form/SocialWork/EvaluationType.php create mode 100644 src/Bundle/ChillPersonBundle/Form/SocialWork/GoalType.php create mode 100644 src/Bundle/ChillPersonBundle/Form/SocialWork/ResultType.php create mode 100644 src/Bundle/ChillPersonBundle/Form/SocialWork/SocialActionType.php create mode 100644 src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Evaluation/index.html.twig create mode 100644 src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Goal/index.html.twig create mode 100644 src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Result/index.html.twig create mode 100644 src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialAction/index.html.twig rename src/Bundle/ChillPersonBundle/Resources/views/SocialWork/{SocialIssue => }/edit.html.twig (100%) rename src/Bundle/ChillPersonBundle/Resources/views/SocialWork/{SocialIssue => }/new.html.twig (100%) diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminEvaluationController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminEvaluationController.php new file mode 100644 index 000000000..134cedc74 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminEvaluationController.php @@ -0,0 +1,33 @@ + + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +namespace Chill\PersonBundle\Controller\SocialWork; + +use Chill\MainBundle\CRUD\Controller\CRUDController; + +/** + * Class AdminSocialIssueController + * Controller for social issues + * + * @package Chill\PersonBundle\Controller + */ +class AdminEvaluationController extends CRUDController +{ +} diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminGoalController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminGoalController.php new file mode 100644 index 000000000..18e1c9f3b --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminGoalController.php @@ -0,0 +1,33 @@ + + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +namespace Chill\PersonBundle\Controller\SocialWork; + +use Chill\MainBundle\CRUD\Controller\CRUDController; + +/** + * Class AdminSocialIssueController + * Controller for social issues + * + * @package Chill\PersonBundle\Controller + */ +class AdminGoalController extends CRUDController +{ +} diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminResultController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminResultController.php new file mode 100644 index 000000000..80d552282 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminResultController.php @@ -0,0 +1,33 @@ + + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +namespace Chill\PersonBundle\Controller\SocialWork; + +use Chill\MainBundle\CRUD\Controller\CRUDController; + +/** + * Class AdminSocialIssueController + * Controller for social issues + * + * @package Chill\PersonBundle\Controller + */ +class AdminResultController extends CRUDController +{ +} diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminSocialActionController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminSocialActionController.php new file mode 100644 index 000000000..695ec75a1 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminSocialActionController.php @@ -0,0 +1,33 @@ + + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +namespace Chill\PersonBundle\Controller\SocialWork; + +use Chill\MainBundle\CRUD\Controller\CRUDController; + +/** + * Class AdminSocialIssueController + * Controller for social issues + * + * @package Chill\PersonBundle\Controller + */ +class AdminSocialActionController extends CRUDController +{ +} diff --git a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php index ecc390f59..9cc026909 100644 --- a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php +++ b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php @@ -348,7 +348,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac [ 'class' => \Chill\PersonBundle\Entity\SocialWork\SocialIssue::class, 'name' => 'social_issue', - 'base_path' => '/admin/social-issue', + 'base_path' => '/admin/social-work/social-issue', 'form_class' => \Chill\PersonBundle\Form\SocialWork\SocialIssueType::class, 'controller' => \Chill\PersonBundle\Controller\SocialWork\AdminSocialIssueController::class, 'actions' => [ @@ -358,14 +358,98 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac ], 'new' => [ 'role' => 'ROLE_ADMIN', - 'template' => '@ChillPerson/SocialWork/SocialIssue/new.html.twig', + 'template' => '@ChillPerson/SocialWork/new.html.twig', ], 'edit' => [ 'role' => 'ROLE_ADMIN', - 'template' => '@ChillPerson/SocialWork/SocialIssue/edit.html.twig', + 'template' => '@ChillPerson/SocialWork/edit.html.twig', ] ] - ] + ], + [ + 'class' => \Chill\PersonBundle\Entity\SocialWork\SocialAction::class, + 'name' => 'social_action', + 'base_path' => '/admin/social-work/social-action', + 'form_class' => \Chill\PersonBundle\Form\SocialWork\SocialActionType::class, + 'controller' => \Chill\PersonBundle\Controller\SocialWork\AdminSocialActionController::class, + 'actions' => [ + 'index' => [ + 'role' => 'ROLE_ADMIN', + 'template' => '@ChillPerson/SocialWork/SocialAction/index.html.twig', + ], + 'new' => [ + 'role' => 'ROLE_ADMIN', + 'template' => '@ChillPerson/SocialWork/new.html.twig', + ], + 'edit' => [ + 'role' => 'ROLE_ADMIN', + 'template' => '@ChillPerson/SocialWork/edit.html.twig', + ] + ] + ], + [ + 'class' => \Chill\PersonBundle\Entity\SocialWork\Goal::class, + 'name' => 'social_goal', + 'base_path' => '/admin/social-work/goal', + 'form_class' => \Chill\PersonBundle\Form\SocialWork\GoalType::class, + 'controller' => \Chill\PersonBundle\Controller\SocialWork\AdminGoalController::class, + 'actions' => [ + 'index' => [ + 'role' => 'ROLE_ADMIN', + 'template' => '@ChillPerson/SocialWork/Goal/index.html.twig', + ], + 'new' => [ + 'role' => 'ROLE_ADMIN', + 'template' => '@ChillPerson/SocialWork/new.html.twig', + ], + 'edit' => [ + 'role' => 'ROLE_ADMIN', + 'template' => '@ChillPerson/SocialWork/edit.html.twig', + ] + ] + ], + [ + 'class' => \Chill\PersonBundle\Entity\SocialWork\Result::class, + 'name' => 'social_result', + 'base_path' => '/admin/social-work/result', + 'form_class' => \Chill\PersonBundle\Form\SocialWork\ResultType::class, + 'controller' => \Chill\PersonBundle\Controller\SocialWork\AdminResultController::class, + 'actions' => [ + 'index' => [ + 'role' => 'ROLE_ADMIN', + 'template' => '@ChillPerson/SocialWork/Result/index.html.twig', + ], + 'new' => [ + 'role' => 'ROLE_ADMIN', + 'template' => '@ChillPerson/SocialWork/new.html.twig', + ], + 'edit' => [ + 'role' => 'ROLE_ADMIN', + 'template' => '@ChillPerson/SocialWork/edit.html.twig', + ] + ] + ], + [ + 'class' => \Chill\PersonBundle\Entity\SocialWork\Evaluation::class, + 'name' => 'social_evaluation', + 'base_path' => '/admin/social-work/evaluation', + 'form_class' => \Chill\PersonBundle\Form\SocialWork\EvaluationType::class, + 'controller' => \Chill\PersonBundle\Controller\SocialWork\AdminEvaluationController::class, + 'actions' => [ + 'index' => [ + 'role' => 'ROLE_ADMIN', + 'template' => '@ChillPerson/SocialWork/Evaluation/index.html.twig', + ], + 'new' => [ + 'role' => 'ROLE_ADMIN', + 'template' => '@ChillPerson/SocialWork/new.html.twig', + ], + 'edit' => [ + 'role' => 'ROLE_ADMIN', + 'template' => '@ChillPerson/SocialWork/edit.html.twig', + ] + ] + ], ], 'apis' => [ [ diff --git a/src/Bundle/ChillPersonBundle/Form/SocialWork/EvaluationType.php b/src/Bundle/ChillPersonBundle/Form/SocialWork/EvaluationType.php new file mode 100644 index 000000000..41f44a8fd --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Form/SocialWork/EvaluationType.php @@ -0,0 +1,87 @@ + + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +namespace Chill\PersonBundle\Form\SocialWork; + +use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; +use Chill\MainBundle\Form\Type\TranslatableStringFormType; +use Symfony\Component\Form\Extension\Core\Type\DateType; +use Chill\MainBundle\Templating\TranslatableStringHelper; +use Symfony\Bridge\Doctrine\Form\Type\EntityType; +use Chill\PersonBundle\Entity\SocialWork\Evaluation; + +/** + * Class EvaluationType + * + * @package Chill\PersonBundle\Form + */ +class EvaluationType extends AbstractType +{ + /** + * + * @var TranslatableStringHelper + */ + protected $translatableStringHelper; + + public function __construct(TranslatableStringHelper $translatableStringHelper) { + $this->translatableStringHelper = $translatableStringHelper; + } + + /** + * @param FormBuilderInterface $builder + * @param array $options + */ + public function buildForm(FormBuilderInterface $builder, array $options) + { + $builder + ->add('title', TranslatableStringFormType::class, [ + 'label' => 'Nom', + ]) + ->add('delay') + + ->add('notificationDelay'); + /* ]) + + ->add('parent', EntityType::class, [ + 'class' => SocialIssue::class, + 'required' => false, + 'choice_label' => function (SocialIssue $issue) { + return $this->translatableStringHelper->localize($issue->getTitle()); + } + ]) + + ->add('desactivationDate', DateType::class, array( + 'attr' => array('class' => 'datepicker'), + 'widget'=> 'single_text', + 'format' => 'dd-MM-yyyy', + 'required' => false, */ + // ]); +} + + /** + * @param OptionsResolver $resolver + */ + public function configureOptions(OptionsResolver $resolver) + { + $resolver + ->setDefault('class', Evaluation::class) + ; + } +} diff --git a/src/Bundle/ChillPersonBundle/Form/SocialWork/GoalType.php b/src/Bundle/ChillPersonBundle/Form/SocialWork/GoalType.php new file mode 100644 index 000000000..9cf9013dc --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Form/SocialWork/GoalType.php @@ -0,0 +1,87 @@ + + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +namespace Chill\PersonBundle\Form\SocialWork; + +use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; +use Chill\MainBundle\Form\Type\TranslatableStringFormType; +use Symfony\Component\Form\Extension\Core\Type\DateType; +use Chill\MainBundle\Templating\TranslatableStringHelper; +use Symfony\Bridge\Doctrine\Form\Type\EntityType; +use Chill\PersonBundle\Entity\SocialWork\Goal; +use Chill\PersonBundle\Entity\SocialWork\SocialAction; + +/** + * Class GoalType + * + * @package Chill\PersonBundle\Form + */ +class GoalType extends AbstractType +{ + /** + * + * @var TranslatableStringHelper + */ + protected $translatableStringHelper; + + public function __construct(TranslatableStringHelper $translatableStringHelper) { + $this->translatableStringHelper = $translatableStringHelper; + } + + /** + * @param FormBuilderInterface $builder + * @param array $options + */ + public function buildForm(FormBuilderInterface $builder, array $options) + { + $builder + ->add('title', TranslatableStringFormType::class, [ + 'label' => 'Nom' + ]) + + // ->add('socialActions') + + ->add('socialActions', EntityType::class, [ + 'class' => SocialAction::class, + 'required' => false, + 'multiple' => true, + 'choice_label' => function (SocialAction $issue) { + return $this->translatableStringHelper->localize($issue->getTitle()); + } + ]) + + ->add('desactivationDate', DateType::class, [ + 'attr' => array('class' => 'datepicker'), + 'widget'=> 'single_text', + 'format' => 'dd-MM-yyyy', + 'required' => false, + ]); +} + + /** + * @param OptionsResolver $resolver + */ + public function configureOptions(OptionsResolver $resolver) + { + $resolver + ->setDefault('class', Goal::class) + ; + } +} diff --git a/src/Bundle/ChillPersonBundle/Form/SocialWork/ResultType.php b/src/Bundle/ChillPersonBundle/Form/SocialWork/ResultType.php new file mode 100644 index 000000000..ee2cefe48 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Form/SocialWork/ResultType.php @@ -0,0 +1,76 @@ + + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +namespace Chill\PersonBundle\Form\SocialWork; + +use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; +use Chill\MainBundle\Form\Type\TranslatableStringFormType; +use Symfony\Component\Form\Extension\Core\Type\DateType; +use Chill\MainBundle\Templating\TranslatableStringHelper; +use Symfony\Bridge\Doctrine\Form\Type\EntityType; +use Chill\PersonBundle\Entity\SocialWork\Result; + +/** + * Class ResultType + * + * @package Chill\PersonBundle\Form + */ +class ResultType extends AbstractType +{ + /** + * + * @var TranslatableStringHelper + */ + protected $translatableStringHelper; + + public function __construct(TranslatableStringHelper $translatableStringHelper) { + $this->translatableStringHelper = $translatableStringHelper; + } + + /** + * @param FormBuilderInterface $builder + * @param array $options + */ + public function buildForm(FormBuilderInterface $builder, array $options) + { + $builder + ->add('title', TranslatableStringFormType::class, [ + 'label' => 'Nom' + ]) + ->add('accompanyingPeriodWorks') + ->add('accompanyingPeriodWorkGoals') + ->add('desactivationDate', DateType::class, [ + 'attr' => array('class' => 'datepicker'), + 'widget'=> 'single_text', + 'format' => 'dd-MM-yyyy', + 'required' => false, + ]); +} + + /** + * @param OptionsResolver $resolver + */ + public function configureOptions(OptionsResolver $resolver) + { + $resolver + ->setDefault('class', Result::class) + ; + } +} diff --git a/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialActionType.php b/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialActionType.php new file mode 100644 index 000000000..7613bc2c7 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialActionType.php @@ -0,0 +1,90 @@ + + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +namespace Chill\PersonBundle\Form\SocialWork; + +use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; +use Chill\MainBundle\Form\Type\TranslatableStringFormType; +use Symfony\Component\Form\Extension\Core\Type\DateType; +use Chill\MainBundle\Templating\TranslatableStringHelper; +use Symfony\Bridge\Doctrine\Form\Type\EntityType; +use Chill\PersonBundle\Entity\SocialWork\SocialAction; +use Chill\PersonBundle\Entity\SocialWork\SocialIssue; + + +/** + * Class SocialActionType + * + * @package Chill\PersonBundle\Form + */ +class SocialActionType extends AbstractType +{ + /** + * + * @var TranslatableStringHelper + */ + protected $translatableStringHelper; + + public function __construct(TranslatableStringHelper $translatableStringHelper) { + $this->translatableStringHelper = $translatableStringHelper; + } + + /** + * @param FormBuilderInterface $builder + * @param array $options + */ + public function buildForm(FormBuilderInterface $builder, array $options) + { + $builder + ->add('title', TranslatableStringFormType::class, [ + 'label' => 'Nom' + ]) + ->add('issue', EntityType::class, [ + 'class' => SocialIssue::class, + 'choice_label' => function (SocialIssue $issue) { + return $this->translatableStringHelper->localize($issue->getTitle()); + } + ]) + ->add('parent', EntityType::class, [ + 'class' => SocialAction::class, + 'required' => false, + 'choice_label' => function (SocialAction $issue) { + return $this->translatableStringHelper->localize($issue->getTitle()); + } + ]) + ->add('defaultNotificationDelay') + ->add('desactivationDate', DateType::class, [ + 'attr' => array('class' => 'datepicker'), + 'widget'=> 'single_text', + 'format' => 'dd-MM-yyyy', + 'required' => false, + ]); +} + + /** + * @param OptionsResolver $resolver + */ + public function configureOptions(OptionsResolver $resolver) + { + $resolver + ->setDefault('class', SocialIssue::class) + ; + } +} diff --git a/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialIssueType.php b/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialIssueType.php index 482ff60f3..1f21defd9 100644 --- a/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialIssueType.php +++ b/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialIssueType.php @@ -63,12 +63,12 @@ class SocialIssueType extends AbstractType } ]) - ->add('desactivationDate', DateType::class, array( - 'attr' => array('class' => 'datepicker'), + ->add('desactivationDate', DateType::class, [ + 'attr' => ['class' => 'datepicker'], 'widget'=> 'single_text', 'format' => 'dd-MM-yyyy', 'required' => false, - )); + ]); } /** diff --git a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Evaluation/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Evaluation/index.html.twig new file mode 100644 index 000000000..186b2f3ec --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Evaluation/index.html.twig @@ -0,0 +1,27 @@ +{% extends '@ChillPerson/Admin/layout.html.twig' %} + +{% block layout_wvm_content %} + {% embed '@ChillMain/CRUD/_index.html.twig' %} + {% block table_entities_thead_tr %} + {{ 'Id'|trans }} + {{ 'Title'|trans }} +   + {% endblock %} + + {% block table_entities_tbody %} + {% for entity in entities %} + + {{ entity.id }} + {{ entity.title|localize_translatable_string }} + +
    +
  • + +
  • +
+ + + {% endfor %} + {% endblock %} + {% endembed %} +{% endblock %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Goal/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Goal/index.html.twig new file mode 100644 index 000000000..aa7c239ba --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Goal/index.html.twig @@ -0,0 +1,27 @@ +{% extends '@ChillPerson/Admin/layout.html.twig' %} + +{% block layout_wvm_content %} + {% embed '@ChillMain/CRUD/_index.html.twig' %} + {% block table_entities_thead_tr %} + {{ 'Id'|trans }} + {{ 'Title'|trans }} +   + {% endblock %} + + {% block table_entities_tbody %} + {% for entity in entities %} + + {{ entity.id }} + {{ entity.title|localize_translatable_string }} + +
    +
  • + +
  • +
+ + + {% endfor %} + {% endblock %} + {% endembed %} +{% endblock %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Result/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Result/index.html.twig new file mode 100644 index 000000000..f1081aebe --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Result/index.html.twig @@ -0,0 +1,27 @@ +{% extends '@ChillPerson/Admin/layout.html.twig' %} + +{% block layout_wvm_content %} + {% embed '@ChillMain/CRUD/_index.html.twig' %} + {% block table_entities_thead_tr %} + {{ 'Id'|trans }} + {{ 'Title'|trans }} +   + {% endblock %} + + {% block table_entities_tbody %} + {% for entity in entities %} + + {{ entity.id }} + {{ entity.title|localize_translatable_string }} + +
    +
  • + +
  • +
+ + + {% endfor %} + {% endblock %} + {% endembed %} +{% endblock %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialAction/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialAction/index.html.twig new file mode 100644 index 000000000..4c1d5a59d --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialAction/index.html.twig @@ -0,0 +1,27 @@ +{% extends '@ChillPerson/Admin/layout.html.twig' %} + +{% block layout_wvm_content %} + {% embed '@ChillMain/CRUD/_index.html.twig' %} + {% block table_entities_thead_tr %} + {{ 'Id'|trans }} + {{ 'Title'|trans }} +   + {% endblock %} + + {% block table_entities_tbody %} + {% for entity in entities %} + + {{ entity.id }} + {{ entity.title|localize_translatable_string }} + +
    +
  • + +
  • +
+ + + {% endfor %} + {% endblock %} + {% endembed %} +{% endblock %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialIssue/edit.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/edit.html.twig similarity index 100% rename from src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialIssue/edit.html.twig rename to src/Bundle/ChillPersonBundle/Resources/views/SocialWork/edit.html.twig diff --git a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialIssue/new.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/new.html.twig similarity index 100% rename from src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialIssue/new.html.twig rename to src/Bundle/ChillPersonBundle/Resources/views/SocialWork/new.html.twig diff --git a/src/Bundle/ChillPersonBundle/config/routes.yaml b/src/Bundle/ChillPersonBundle/config/routes.yaml index 8b5065bff..bbcb7c39b 100644 --- a/src/Bundle/ChillPersonBundle/config/routes.yaml +++ b/src/Bundle/ChillPersonBundle/config/routes.yaml @@ -137,7 +137,7 @@ chill_person_maritalstatus_admin: label: 'person_admin.marital status' chill_person_socialissue_admin: - path: /{_locale}/admin/social-issue + path: /{_locale}/admin/social-work/social-issue controller: cscrud_social_issue_controller:index options: menus: @@ -145,6 +145,44 @@ chill_person_socialissue_admin: order: 150 label: 'person_admin.social_issue' +chill_person_socialaction_admin: + path: /{_locale}/admin/social-work/social-action + controller: cscrud_social_action_controller:index + options: + menus: + admin_person: + order: 160 + label: 'person_admin.social_action' + + +chill_person_social_evaluation_admin: + path: /{_locale}/admin/social-work/evaluation + controller: cscrud_social_evaluation_controller:index + options: + menus: + admin_person: + order: 170 + label: 'person_admin.social_evaluation' + +chill_person_social_goal_admin: + path: /{_locale}/admin/social-work/goal + controller: cscrud_social_goal_controller:index + options: + menus: + admin_person: + order: 180 + label: 'person_admin.social_goal' + +chill_person_social_result_admin: + path: /{_locale}/admin/social-work/result + controller: cscrud_social_result_controller:index + options: + menus: + admin_person: + order: 190 + label: 'person_admin.social_result' + + chill_person_controllers: resource: "@ChillPersonBundle/Controller" diff --git a/src/Bundle/ChillPersonBundle/config/services/form.yaml b/src/Bundle/ChillPersonBundle/config/services/form.yaml index 0f415acac..b61de615d 100644 --- a/src/Bundle/ChillPersonBundle/config/services/form.yaml +++ b/src/Bundle/ChillPersonBundle/config/services/form.yaml @@ -59,3 +59,29 @@ services: $translatableStringHelper: '@chill.main.helper.translatable_string' tags: - { name: form.type } + + Chill\PersonBundle\Form\SocialWork\SocialActionType: + arguments: + $translatableStringHelper: '@chill.main.helper.translatable_string' + tags: + - { name: form.type } + + Chill\PersonBundle\Form\SocialWork\EvaluationType: + arguments: + $translatableStringHelper: '@chill.main.helper.translatable_string' + tags: + - { name: form.type } + + + Chill\PersonBundle\Form\SocialWork\GoalType: + arguments: + $translatableStringHelper: '@chill.main.helper.translatable_string' + tags: + - { name: form.type } + + + Chill\PersonBundle\Form\SocialWork\ResultType: + arguments: + $translatableStringHelper: '@chill.main.helper.translatable_string' + tags: + - { name: form.type } diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 5871c4733..98523a762 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -310,6 +310,25 @@ crud: add_new: Ajouter une nouvelle problématique sociale title_new: Nouvelle problématique sociale title_edit: Modifier la problématique sociale + social_action: + index: + title: Liste des actions d'accompagnements + add_new: Ajouter une nouvelle action d'accompagnements + title_new: Nouvelle action d'accompagnements + title_edit: Modifier l'action d'accompagnements + social_goal: + index: + title: Liste des objectifs d'action d'accompagnements + add_new: Ajouter un nouvel objectif d'action d'accompagnements + title_new: Nouvel objectif + title_edit: Modifier l'objectif + social_result: + index: + title: Liste des résultats d'action d'accompagnements + add_new: Ajouter un nouveau résultat d'action d'accompagnements + title_new: Nouveau résultat + title_edit: Modifier le résultat + # specific to closing motive closing_motive: @@ -329,6 +348,10 @@ person_admin: marital status explanation: > Configurer la liste des états civils. social_issue: Problématiques sociales + social_action: Actions d'accompagnement + social_goal: Buts + social_result: Résultats + social_evaluation: Évaluations # specific to accompanying period accompanying_period: From 3be024bf6bb35c8d2ca26d6b2f4de8085b8537da Mon Sep 17 00:00:00 2001 From: Marc Ducobu Date: Wed, 19 May 2021 15:26:06 +0200 Subject: [PATCH 052/100] Removing un-used code --- .../Form/SocialWork/EvaluationType.php | 18 +----------------- .../Form/SocialWork/GoalType.php | 2 -- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Form/SocialWork/EvaluationType.php b/src/Bundle/ChillPersonBundle/Form/SocialWork/EvaluationType.php index 41f44a8fd..b45cd327e 100644 --- a/src/Bundle/ChillPersonBundle/Form/SocialWork/EvaluationType.php +++ b/src/Bundle/ChillPersonBundle/Form/SocialWork/EvaluationType.php @@ -57,23 +57,7 @@ class EvaluationType extends AbstractType ->add('delay') ->add('notificationDelay'); - /* ]) - - ->add('parent', EntityType::class, [ - 'class' => SocialIssue::class, - 'required' => false, - 'choice_label' => function (SocialIssue $issue) { - return $this->translatableStringHelper->localize($issue->getTitle()); - } - ]) - - ->add('desactivationDate', DateType::class, array( - 'attr' => array('class' => 'datepicker'), - 'widget'=> 'single_text', - 'format' => 'dd-MM-yyyy', - 'required' => false, */ - // ]); -} + } /** * @param OptionsResolver $resolver diff --git a/src/Bundle/ChillPersonBundle/Form/SocialWork/GoalType.php b/src/Bundle/ChillPersonBundle/Form/SocialWork/GoalType.php index 9cf9013dc..c86a7d6b9 100644 --- a/src/Bundle/ChillPersonBundle/Form/SocialWork/GoalType.php +++ b/src/Bundle/ChillPersonBundle/Form/SocialWork/GoalType.php @@ -56,8 +56,6 @@ class GoalType extends AbstractType 'label' => 'Nom' ]) - // ->add('socialActions') - ->add('socialActions', EntityType::class, [ 'class' => SocialAction::class, 'required' => false, From b74f9cf5dc43ca2db55d40bbbaa483a16c8c56c1 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 6 Aug 2021 17:35:46 +0200 Subject: [PATCH 053/100] getting all the asideActivity form to work with all fields. Still bug with DateTimeImmutable value somehwere --- .../src/Entity/AsideActivity.php | 22 +++--- .../src/Form/AsideActivityFormType.php | 76 +++++++++++++++---- .../TranslatableAsideActivityCategory.php | 54 ------------- .../src/config/services/form.yaml | 3 +- .../src/translations/messages.yaml | 0 5 files changed, 74 insertions(+), 81 deletions(-) delete mode 100644 src/Bundle/ChillAsideActivityBundle/src/Form/Type/TranslatableAsideActivityCategory.php delete mode 100644 src/Bundle/ChillAsideActivityBundle/src/translations/messages.yaml diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php index 816dd88a0..0da691ff2 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php @@ -32,39 +32,39 @@ final class AsideActivity implements TrackUpdateInterface, TrackCreationInterfac * @ORM\ManyToOne(targetEntity=User::class) * @ORM\JoinColumn(nullable=false) */ - private $createdBy; + private \Chill\MainBundle\Entity\User $createdBy; /** * @ORM\Column(type="datetime_immutable") */ - private $createdAt; + private \DateTimeInterface $createdAt; /** * @ORM\ManyToOne(targetEntity=User::class) */ - private $updatedBy; + private \Chill\MainBundle\Entity\User $updatedBy; /** * @ORM\Column(type="datetime_immutable", nullable=true) */ - private $updatedAt; + private \DateTimeInterface $updatedAt; /** * @ORM\ManyToOne(targetEntity=User::class) * @ORM\JoinColumn(nullable=false) * @Assert\NotBlank() */ - private $agent; + private \Chill\MainBundle\Entity\User $agent; /** * @ORM\Column(type="datetime_immutable") */ - private $date; + private \DateTimeInterface $date; /** - * @ORM\Column(type="integer", nullable=true) + * @ORM\Column(type="time", nullable=true) */ - private $duration; + private ?\DateTime $duration = null; /** * @ORM\Column(type="string", length=100, nullable=true) @@ -129,7 +129,7 @@ final class AsideActivity implements TrackUpdateInterface, TrackCreationInterfac return $this; } - public function getUpdatedAt(): ?\DateTimeImmutable + public function getUpdatedAt(): ?\DateTimeInterface { return $this->updatedAt; } @@ -165,12 +165,12 @@ final class AsideActivity implements TrackUpdateInterface, TrackCreationInterfac return $this; } - public function getDuration(): ?\DateTimeInterface + public function getDuration(): ?\DateTime { return $this->duration; } - public function setDuration(?\DateTimeInterface $duration): self + public function setDuration(?\DateTime $duration): self { $this->duration = $duration; diff --git a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php index fadfffce9..b34e5bdf9 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php @@ -6,36 +6,41 @@ use Chill\AsideActivityBundle\Entity\AsideActivity; use Chill\AsideActivityBundle\Entity\AsideActivityCategory; use Chill\MainBundle\Entity\User; use Chill\MainBundle\Form\Type\ChillDateType; +use Chill\MainBundle\Form\Type\ChillTextareaType; use Chill\MainBundle\Templating\TranslatableStringHelper; use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToTimestampTransformer; +use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\Form\Extension\Core\Type\TextareaType; - +use Symfony\Component\Form\FormEvent; +use Symfony\Component\Form\FormEvents; final class AsideActivityFormType extends AbstractType { - // protected array $timeChoices; + protected array $timeChoices; private TranslatableStringHelper $translatableStringHelper; - public function __construct (TranslatableStringHelper $translatableStringHelper){ - // $this->timeChoices = $timeChoices; + public function __construct (TranslatableStringHelper $translatableStringHelper, array $timeChoices){ + $this->timeChoices = $timeChoices; $this->translatableStringHelper = $translatableStringHelper; } public function buildForm(FormBuilderInterface $builder, array $options) { - // $timeChoices = []; + $timeChoices = []; - // foreach ($this->timeChoices as $e) { - // $timeChoices[$e['label']] = $e['seconds']; - // } + foreach ($this->timeChoices as $e) { + $timeChoices[$e['label']] = $e['seconds']; + } - // $durationTimeOptions = [ - // 'choices' => $timeChoices, - // 'placeholder' => 'Choose the duration', - // ]; + $durationTimeTransformer = new DateTimeToTimestampTransformer('GMT', 'GMT'); + $durationTimeOptions = [ + 'choices' => $timeChoices, + 'placeholder' => 'Choose the duration', + ]; $builder ->add('agent', EntityType::class, @@ -50,7 +55,7 @@ final class AsideActivityFormType extends AbstractType ->add('date', ChillDateType::class, [ 'label' => 'date', - 'data' => new \DateTime(), + 'data' => new \DateTimeImmutable(), //SETTING RANGE ONLY POSSIBLE WITH WIDGET 'CHOICE' AND NOT 'SINGLE_TEXT'? // 'widget' => 'choice', // 'years' => range(2020, date('Y')), @@ -69,11 +74,52 @@ final class AsideActivityFormType extends AbstractType return $this->translatableStringHelper->localize($asideActivityCategory->getTitle()); }, ]) - // ->add('durationTime', ChoiceType::class, $durationTimeOptions) - ->add('note', TextareaType::class, [ + ->add('duration', ChoiceType::class, $durationTimeOptions) + ->add('note', ChillTextareaType::class, [ 'label' => 'Note', 'required' => false, ]); + + foreach (['duration'] as $fieldName) + { + $builder->get($fieldName) + ->addModelTransformer($durationTimeTransformer); + + $builder->get($fieldName) + ->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $formEvent) use ( + $timeChoices, + $builder, + $durationTimeTransformer, + $durationTimeOptions, + $fieldName + ) { + // set the timezone to GMT, and fix the difference between current and GMT + // the datetimetransformer will then handle timezone as GMT + $timezoneUTC = new \DateTimeZone('GMT'); + /* @var $data \DateTime */ + $data = $formEvent->getData() === NULL ? + \DateTime::createFromFormat('U', 300) : + $formEvent->getData(); + $seconds = $data->getTimezone()->getOffset($data); + $data->setTimeZone($timezoneUTC); + $data->add(new \DateInterval('PT'.$seconds.'S')); + + // test if the timestamp is in the choices. + // If not, recreate the field with the new timestamp + if (!in_array($data->getTimestamp(), $timeChoices)) { + // the data are not in the possible values. add them + $timeChoices[$data->format('H:i')] = $data->getTimestamp(); + $form = $builder->create($fieldName, ChoiceType::class, array_merge( + $durationTimeOptions, [ + 'choices' => $timeChoices, + 'auto_initialize' => false + ] + )); + $form->addModelTransformer($durationTimeTransformer); + $formEvent->getForm()->getParent()->add($form->getForm()); + } + }); + } } public function configureOptions(OptionsResolver $resolver): void diff --git a/src/Bundle/ChillAsideActivityBundle/src/Form/Type/TranslatableAsideActivityCategory.php b/src/Bundle/ChillAsideActivityBundle/src/Form/Type/TranslatableAsideActivityCategory.php deleted file mode 100644 index 7340afd80..000000000 --- a/src/Bundle/ChillAsideActivityBundle/src/Form/Type/TranslatableAsideActivityCategory.php +++ /dev/null @@ -1,54 +0,0 @@ -requestStack = $requestStack; - } - - public function getBlockPrefix() - { - return 'translatable_aside_activity_category'; - } - - public function getParent() - { - return EntityType::class; - } - - public function configureOptions(OptionsResolver $resolver) - { - $locale = $this->requestStack->getCurrentRequest()->getLocale(); - $resolver->setDefaults( - array( - 'class' => 'ChillAsideActivityBundle:AsideActivityCategory', - 'choice_label' => 'name['.$locale.']', - 'query_builder' => function (EntityRepository $er) { - return $er->createQueryBuilder('c') - ->where('c.active = true'); - } - ) - ); - } -} \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/src/config/services/form.yaml b/src/Bundle/ChillAsideActivityBundle/src/config/services/form.yaml index 52228fdcb..193c61ed0 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/config/services/form.yaml +++ b/src/Bundle/ChillAsideActivityBundle/src/config/services/form.yaml @@ -1,8 +1,9 @@ +--- services: chill.asideactivity.form.type.asideactivity: class: Chill\AsideActivityBundle\Form\AsideActivityFormType arguments: - "@chill.main.helper.translatable_string" - # - "%chill_activity.form.time_duration%" + - "%chill_activity.form.time_duration%" tags: - { name: form.type, alias: chill_asideactivitybundle_asideactivity } \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/src/translations/messages.yaml b/src/Bundle/ChillAsideActivityBundle/src/translations/messages.yaml deleted file mode 100644 index e69de29bb..000000000 From fb43980a2a87dd390354a1e4a09452c32453adac Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 10 Aug 2021 10:56:45 +0200 Subject: [PATCH 054/100] everything changed to datetime --- .../src/Entity/AsideActivity.php | 18 +++++++++--------- .../src/Entity/AsideActivityCategory.php | 2 +- .../src/Form/AsideActivityFormType.php | 5 +++-- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php index 0da691ff2..fda40ea1a 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php @@ -35,9 +35,9 @@ final class AsideActivity implements TrackUpdateInterface, TrackCreationInterfac private \Chill\MainBundle\Entity\User $createdBy; /** - * @ORM\Column(type="datetime_immutable") + * @ORM\Column(type="datetime") */ - private \DateTimeInterface $createdAt; + private $createdAt; /** * @ORM\ManyToOne(targetEntity=User::class) @@ -45,9 +45,9 @@ final class AsideActivity implements TrackUpdateInterface, TrackCreationInterfac private \Chill\MainBundle\Entity\User $updatedBy; /** - * @ORM\Column(type="datetime_immutable", nullable=true) + * @ORM\Column(type="datetime", nullable=true) */ - private \DateTimeInterface $updatedAt; + private $updatedAt; /** * @ORM\ManyToOne(targetEntity=User::class) @@ -57,14 +57,14 @@ final class AsideActivity implements TrackUpdateInterface, TrackCreationInterfac private \Chill\MainBundle\Entity\User $agent; /** - * @ORM\Column(type="datetime_immutable") + * @ORM\Column(type="datetime") */ - private \DateTimeInterface $date; + private $date; /** * @ORM\Column(type="time", nullable=true) */ - private ?\DateTime $duration = null; + private ?\DateTimeInterface $duration = null; /** * @ORM\Column(type="string", length=100, nullable=true) @@ -165,12 +165,12 @@ final class AsideActivity implements TrackUpdateInterface, TrackCreationInterfac return $this; } - public function getDuration(): ?\DateTime + public function getDuration(): ?\DateTimeInterface { return $this->duration; } - public function setDuration(?\DateTime $duration): self + public function setDuration(?\DateTimeInterface $duration): self { $this->duration = $duration; diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php index ae22b4d7e..6c580394b 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php @@ -12,7 +12,7 @@ use Doctrine\ORM\Mapping as ORM; * @ORM\Entity * @ORM\Table(schema="chill_asideactivity") */ -final class AsideActivityCategory +class AsideActivityCategory { /** * @ORM\Id diff --git a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php index b34e5bdf9..0ee91a9fe 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php @@ -55,7 +55,7 @@ final class AsideActivityFormType extends AbstractType ->add('date', ChillDateType::class, [ 'label' => 'date', - 'data' => new \DateTimeImmutable(), + 'data' => new \DateTime(), //SETTING RANGE ONLY POSSIBLE WITH WIDGET 'CHOICE' AND NOT 'SINGLE_TEXT'? // 'widget' => 'choice', // 'years' => range(2020, date('Y')), @@ -96,13 +96,14 @@ final class AsideActivityFormType extends AbstractType // set the timezone to GMT, and fix the difference between current and GMT // the datetimetransformer will then handle timezone as GMT $timezoneUTC = new \DateTimeZone('GMT'); - /* @var $data \DateTime */ + /* @var $data \DateTimeImmutable */ $data = $formEvent->getData() === NULL ? \DateTime::createFromFormat('U', 300) : $formEvent->getData(); $seconds = $data->getTimezone()->getOffset($data); $data->setTimeZone($timezoneUTC); $data->add(new \DateInterval('PT'.$seconds.'S')); + dump($data); // test if the timestamp is in the choices. // If not, recreate the field with the new timestamp From a1ed0d3ce48b40256c572ef08ab5b06b2aa85073 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 10 Aug 2021 11:32:27 +0200 Subject: [PATCH 055/100] list.html.twig template added and adapted to display list of aside activities, still need to adapt to show only activities of logged in user --- .../ChillAsideActivityExtension.php | 2 +- .../views/asideActivity/index.html.twig | 4 +- .../views/asideActivity/list.html.twig | 79 +++++++++++++++++++ 3 files changed, 82 insertions(+), 3 deletions(-) create mode 100644 src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/list.html.twig diff --git a/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/ChillAsideActivityExtension.php b/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/ChillAsideActivityExtension.php index 523c04495..69bde308e 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/ChillAsideActivityExtension.php +++ b/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/ChillAsideActivityExtension.php @@ -80,7 +80,7 @@ final class ChillAsideActivityExtension extends Extension implements PrependExte 'controller' => \Chill\AsideActivityBundle\Controller\AsideActivityController::class, 'actions' => [ 'index' => [ - 'template' => '@ChillAsideActivity/asideActivity/index.html.twig', + 'template' => '@ChillAsideActivity/asideActivity/list.html.twig', 'role' => 'ROLE_USER' ], 'new' => [ diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/index.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/index.html.twig index 3e0a4f404..0ad5ea3ee 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/index.html.twig +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/index.html.twig @@ -6,7 +6,7 @@ - + {# #} @@ -14,7 +14,7 @@ {% for entity in entities %} - + {# #}
{{ 'Name'|trans }}{{ 'Name'|trans }}{{ 'Active'|trans }} {{ 'Actions'|trans }}
{{ entity.name|localize_translatable_string }}{{ entity.name|localize_translatable_string }} {%- if entity.active -%} diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/list.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/list.html.twig new file mode 100644 index 000000000..0b1810452 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/list.html.twig @@ -0,0 +1,79 @@ +{# {% set person_id = null %} +{% if person %} + {% set person_id = person.id %} +{% endif %} #} +{% extends "@ChillActivity/Admin/layout_activity.html.twig" %} + +{% block admin_content %} +

{{ 'Activity list' |trans }}

+ +{% if entities|length == 0 %} +

+ {{ "There isn't any activities."|trans }} + +

+{% else %} + +
+ + {% for entity in entities %} + {% set t = entity.type %} +
+
+
+ + {% if entity.date %} +

{{ entity.date|format_date('long') }}

+ {% endif %} + +
+

+ + {{ entity.duration|date('H:i') }} +

+
+ +
+
+
    + {% if entity.createdBy %} +
  • + {{ 'by'|trans }}{{ entity.createdBy.usernameCanonical }} +
  • + {% endif %} + +
  • + {{ entity.type.title | localize_translatable_string }} +
  • + +
+
+
+ {% + if entity.note is not empty + or entity.createdBy|length > 0 + %} +
+ {% if entity.note is not empty %} +
+ {{ entity.note|chill_entity_render_box( { 'limit_lines': 3, 'metadata': false } ) }} +
+ {% endif %} +
+ {% endif %} + +
+ {% endfor %} +
+{% endif %} + +{# TODO set this condition in configuration #} + + + {% endblock %} From bbb69bcfe050976e47e0b911930716dd2974d9e8 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 10 Aug 2021 14:18:37 +0200 Subject: [PATCH 056/100] list template adapted to display aside activities ordered by date (DESC) --- .../views/asideActivity/index.html.twig | 44 -------------- .../views/asideActivity/list.html.twig | 58 ++++++++++++++----- .../src/translations/messages.fr.yml | 7 ++- 3 files changed, 49 insertions(+), 60 deletions(-) delete mode 100644 src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/index.html.twig diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/index.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/index.html.twig deleted file mode 100644 index 0ad5ea3ee..000000000 --- a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/index.html.twig +++ /dev/null @@ -1,44 +0,0 @@ -{% extends "@ChillActivity/Admin/layout_activity.html.twig" %} - -{% block admin_content %} -

{{ 'ActivityType list'|trans }}

- - - - - {# #} - - - - - - {% for entity in entities %} - - {# #} - - - - {% endfor %} - -
{{ 'Name'|trans }}{{ 'Active'|trans }}{{ 'Actions'|trans }}
{{ entity.name|localize_translatable_string }} - {%- if entity.active -%} - - {%- else -%} - - {%- endif -%} - -
    -
  • - -
  • -
-
- - - {% endblock %} diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/list.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/list.html.twig index 0b1810452..ad8e62d24 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/list.html.twig +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/list.html.twig @@ -1,11 +1,7 @@ -{# {% set person_id = null %} -{% if person %} - {% set person_id = person.id %} -{% endif %} #} {% extends "@ChillActivity/Admin/layout_activity.html.twig" %} {% block admin_content %} -

{{ 'Activity list' |trans }}

+

{{ 'My aside activities' |trans }}

{% if entities|length == 0 %}

@@ -15,15 +11,23 @@ {% else %}

- - {% for entity in entities %} + {# Sort activities according to date in descending order #} + {% for entity in entities|sort ((a, b) => b.date <=> a.date) %} {% set t = entity.type %} + + {# only load aside activities of current user. #} + {% if entity.agent == app.user %} +
+

+ {{ entity.type.title | localize_translatable_string }} +

+ {% if entity.date %} -

{{ entity.date|format_date('long') }}

+

{{ entity.date|format_date('long') }}

{% endif %}
@@ -38,17 +42,13 @@
    {% if entity.createdBy %}
  • - {{ 'by'|trans }}{{ entity.createdBy.usernameCanonical }} + {{ 'Created by: '|trans }}{{ entity.createdBy.usernameCanonical }}
  • {% endif %} - -
  • - {{ entity.type.title | localize_translatable_string }} -
  • -
+ {% if entity.note is not empty or entity.createdBy|length > 0 @@ -59,14 +59,42 @@ {{ entity.note|chill_entity_render_box( { 'limit_lines': 3, 'metadata': false } ) }}
{% endif %} +
{% endif %} - +
+
    +
      + {#
    • + +
    • #} + {# TOOD + {% if is_granted('CHILL_ACTIVITY_UPDATE', activity) %} + #} +
    • + +
    • + {# TOOD + {% endif %} + {% if is_granted('CHILL_ACTIVITY_DELETE', activity) %} + #} + {#
    • + +
    • #} + {# + {% endif %} + #} +
    +
+
+ {% endif %} {% endfor %} {% endif %} + + {# TODO set this condition in configuration #}
  • diff --git a/src/Bundle/ChillAsideActivityBundle/src/translations/messages.fr.yml b/src/Bundle/ChillAsideActivityBundle/src/translations/messages.fr.yml index d3f80c703..3746f4dda 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/translations/messages.fr.yml +++ b/src/Bundle/ChillAsideActivityBundle/src/translations/messages.fr.yml @@ -28,4 +28,9 @@ Choose a category: Choisir un categorie 1 hour 15: 1 heure 15 1 hour 30: 1 heure 30 1 hour 45: 1 heure 45 -2 hours: 2 heures \ No newline at end of file +2 hours: 2 heures + +#list +My aside activities: Mes activités annexes +Date: Date +Created by: Creér par From 4c7129a3b2a16119eb175cf8f944704476b57eb6 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 10 Aug 2021 14:19:01 +0200 Subject: [PATCH 057/100] aside activities added to user menu --- src/Bundle/ChillTaskBundle/Menu/UserMenuBuilder.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Bundle/ChillTaskBundle/Menu/UserMenuBuilder.php b/src/Bundle/ChillTaskBundle/Menu/UserMenuBuilder.php index e29239679..8a1b4c10e 100644 --- a/src/Bundle/ChillTaskBundle/Menu/UserMenuBuilder.php +++ b/src/Bundle/ChillTaskBundle/Menu/UserMenuBuilder.php @@ -114,6 +114,14 @@ class UserMenuBuilder implements LocalMenuBuilderInterface 'order' => -10, 'icon' => 'tasks' ]); + + $menu->addChild("My aside activities", [ + 'route' => 'chill_crud_aside_activity_index' + ]) + ->setExtras([ + 'order' => -10, + 'icon' => 'tasks' + ]); } protected function addItemInMenu(MenuItem $menu, User $u, $message, $title, $status, $number, $order) From fc6a9ad64f0b4529d596ee4de713a5cb86f90260 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 10 Aug 2021 14:23:07 +0200 Subject: [PATCH 058/100] migration files moved into bundle --- .../src/migrations/Version20210806140343.php | 31 ++++++++++++ .../src/migrations/Version20210806140710.php | 32 +++++++++++++ .../src/migrations/Version20210810084456.php | 48 +++++++++++++++++++ 3 files changed, 111 insertions(+) create mode 100644 src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210806140343.php create mode 100644 src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210806140710.php create mode 100644 src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210810084456.php diff --git a/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210806140343.php b/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210806140343.php new file mode 100644 index 000000000..f05da8643 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210806140343.php @@ -0,0 +1,31 @@ +addSql('ALTER TABLE chill_asideactivity.asideactivity DROP duration'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE chill_asideactivity.AsideActivity ADD duration INT DEFAULT NULL'); + } +} diff --git a/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210806140710.php b/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210806140710.php new file mode 100644 index 000000000..e71cd50d2 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210806140710.php @@ -0,0 +1,32 @@ +addSql('ALTER TABLE chill_asideactivity.asideactivity ADD duration TIME(0) WITHOUT TIME ZONE DEFAULT NULL'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE chill_asideactivity.AsideActivity DROP duration'); + + } +} diff --git a/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210810084456.php b/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210810084456.php new file mode 100644 index 000000000..51e9c0571 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210810084456.php @@ -0,0 +1,48 @@ +addSql('ALTER TABLE chill_asideactivity.asideactivity ALTER createdat TYPE TIMESTAMP(0) WITHOUT TIME ZONE'); + $this->addSql('ALTER TABLE chill_asideactivity.asideactivity ALTER createdat DROP DEFAULT'); + $this->addSql('ALTER TABLE chill_asideactivity.asideactivity ALTER updatedat TYPE TIMESTAMP(0) WITHOUT TIME ZONE'); + $this->addSql('ALTER TABLE chill_asideactivity.asideactivity ALTER updatedat DROP DEFAULT'); + $this->addSql('ALTER TABLE chill_asideactivity.asideactivity ALTER date TYPE TIMESTAMP(0) WITHOUT TIME ZONE'); + $this->addSql('ALTER TABLE chill_asideactivity.asideactivity ALTER date DROP DEFAULT'); + $this->addSql('COMMENT ON COLUMN chill_asideactivity.asideactivity.createdAt IS NULL'); + $this->addSql('COMMENT ON COLUMN chill_asideactivity.asideactivity.updatedAt IS NULL'); + $this->addSql('COMMENT ON COLUMN chill_asideactivity.asideactivity.date IS NULL'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE chill_asideactivity.AsideActivity ALTER createdAt TYPE TIMESTAMP(0) WITHOUT TIME ZONE'); + $this->addSql('ALTER TABLE chill_asideactivity.AsideActivity ALTER createdAt DROP DEFAULT'); + $this->addSql('ALTER TABLE chill_asideactivity.AsideActivity ALTER updatedAt TYPE TIMESTAMP(0) WITHOUT TIME ZONE'); + $this->addSql('ALTER TABLE chill_asideactivity.AsideActivity ALTER updatedAt DROP DEFAULT'); + $this->addSql('ALTER TABLE chill_asideactivity.AsideActivity ALTER date TYPE TIMESTAMP(0) WITHOUT TIME ZONE'); + $this->addSql('ALTER TABLE chill_asideactivity.AsideActivity ALTER date DROP DEFAULT'); + $this->addSql('COMMENT ON COLUMN chill_asideactivity.AsideActivity.createdat IS \'(DC2Type:datetime_immutable)\''); + $this->addSql('COMMENT ON COLUMN chill_asideactivity.AsideActivity.updatedat IS \'(DC2Type:datetime_immutable)\''); + $this->addSql('COMMENT ON COLUMN chill_asideactivity.AsideActivity.date IS \'(DC2Type:datetime_immutable)\''); + + } +} From 7d97889cbf2ee3d1c607ba38af222dacdd0edf83 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 10 Aug 2021 15:45:00 +0200 Subject: [PATCH 059/100] templates changed to use the standard CRUD templates + delete template added --- .../ChillAsideActivityExtension.php | 8 ++++ .../views/asideActivity/_delete.html.twig | 37 +++++++++++++++++++ .../views/asideActivity/_index.html.twig | 0 .../views/asideActivity/delete.html.twig | 8 ++++ .../views/asideActivity/edit.html.twig | 15 ++++---- .../views/asideActivity/index.html.twig | 8 ++++ .../views/asideActivity/list.html.twig | 6 +-- .../views/asideActivity/new.html.twig | 14 +++---- .../views/asideActivity/view.html.twig | 16 ++++++++ 9 files changed, 95 insertions(+), 17 deletions(-) create mode 100644 src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/_delete.html.twig create mode 100644 src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/_index.html.twig create mode 100644 src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/delete.html.twig create mode 100644 src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/index.html.twig create mode 100644 src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/view.html.twig diff --git a/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/ChillAsideActivityExtension.php b/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/ChillAsideActivityExtension.php index 69bde308e..bbc4c8f8b 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/ChillAsideActivityExtension.php +++ b/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/ChillAsideActivityExtension.php @@ -87,9 +87,17 @@ final class ChillAsideActivityExtension extends Extension implements PrependExte 'role' => 'ROLE_USER', 'template' => '@ChillAsideActivity/asideActivity/new.html.twig', ], + 'view' => [ + 'role' => 'ROLE_USER', + 'template' => '@ChillAsideActivity/asideActivity/view.html.twig', + ], 'edit' => [ 'role' => 'ROLE_USER', 'template' => '@ChillAsideActivity/asideActivity/edit.html.twig', + ], + 'delete' => [ + 'role' => 'ROLE_USER', + 'template' => '@ChillAsideActivity/asideActivity/delete.html.twig', ] ] ], diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/_delete.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/_delete.html.twig new file mode 100644 index 000000000..85df29a9c --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/_delete.html.twig @@ -0,0 +1,37 @@ +
    + {% block crud_content_header %} +

    {{ ('crud.'~crud_name~'.title_delete')|trans({ '%as_string%': entity|chill_entity_render_string }) }}

    + {% endblock crud_content_header %} + +

    {{ ('crud.'~crud_name~'.confirm_message_delete')|trans({ '%as_string%': entity|chill_entity_render_string }) }}

    + + {{ form_start(form) }} + +
      + {% block content_form_actions_back %} +
    • + + {{ 'Cancel'|trans }} + +
    • + {% endblock %} + {% block content_form_actions_before %}{% endblock %} + {% block content_form_actions_view %} + {% if is_granted(chill_crud_config('role', crud_name, 'view'), entity) %} +
    • + + {{ 'crud.edit.back_to_view'|trans }} + +
    • + {% endif %} + {% endblock %} + {% block content_form_actions_confirm_delete %} +
    • + +
    • + {% endblock content_form_actions_confirm_delete %} + {% block content_form_actions_after %}{% endblock %} +
    + + {{ form_end(form) }} +
    \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/_index.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/_index.html.twig new file mode 100644 index 000000000..e69de29bb diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/delete.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/delete.html.twig new file mode 100644 index 000000000..de2d28c90 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/delete.html.twig @@ -0,0 +1,8 @@ +{% extends '@ChillMain/layout.html.twig' %} + +{% block title %}{{ ('crud.' ~ crud_name ~ '.delete.title')|trans({'%crud_name%': crud_name}) }}{% endblock %} + +{% block content %} + {% embed '@ChillAsideActivity/AsideActivity/_delete.html.twig' %} + {% endembed %} +{% endblock content %} \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/edit.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/edit.html.twig index dacee767c..b0b6fed0f 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/edit.html.twig +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/edit.html.twig @@ -1,12 +1,13 @@ -{% extends "@ChillActivity/Admin/layout_activity.html.twig" %} +{% extends '@ChillMain/Admin/layout.html.twig' %} {% block title %} - {% include('@ChillMain/CRUD/_edit_title.html.twig') %} +{% include('@ChillMain/CRUD/_edit_title.html.twig') %} {% endblock %} -{% block layout_wvm_content %} - {% embed '@ChillMain/CRUD/_edit_content.html.twig' %} - {% block content_form_actions_view %}{% endblock %} - {% block content_form_actions_save_and_show %}{% endblock %} - {% endembed %} +{% block admin_content %} +{# {% as we are in the admin layout, we override the admin content with the CRUD content %} #} +{% embed '@ChillMain/CRUD/_edit_content.html.twig' %} + {# we do not have "view" page. We empty the corresponding block #} + {% block content_form_actions_view %}{% endblock %} +{% endembed %} {% endblock %} diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/index.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/index.html.twig new file mode 100644 index 000000000..0e8ea0506 --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/index.html.twig @@ -0,0 +1,8 @@ +{% extends '@ChillMain/layout.html.twig' %} + +{% block title %}{{ ('crud.' ~ crud_name ~ '.index.title')|trans({'%crud_name%': crud_name}) }}{% endblock %} + +{% block content %} + {% embed '@ChillAsideActivity/AsideActivity/_index.html.twig' %} + {% endembed %} +{% endblock content %} \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/list.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/list.html.twig index ad8e62d24..f474dcf1b 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/list.html.twig +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/list.html.twig @@ -78,9 +78,9 @@ {% endif %} {% if is_granted('CHILL_ACTIVITY_DELETE', activity) %} #} - {#
  • - -
  • #} +
  • + +
  • {# {% endif %} #} diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/new.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/new.html.twig index d7ac89752..0781272a1 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/new.html.twig +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/new.html.twig @@ -1,11 +1,11 @@ -{% extends "@ChillActivity/Admin/layout_activity.html.twig" %} +{% extends '@ChillMain/Admin/layout.html.twig' %} {% block title %} - {% include('@ChillMain/CRUD/_new_title.html.twig') %} +{% include('@ChillMain/CRUD/_new_title.html.twig') %} {% endblock %} -{% block layout_wvm_content %} - {% embed '@ChillMain/CRUD/_new_content.html.twig' %} - {% block content_form_actions_save_and_show %}{% endblock %} - {% endembed %} -{% endblock %} +{% block admin_content %} +{% embed '@ChillMain/CRUD/_new_content.html.twig' %} + {% block content_form_actions_save_and_show %}{% endblock %} +{% endembed %} +{% endblock %} \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/view.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/view.html.twig new file mode 100644 index 000000000..5f1d2319a --- /dev/null +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/view.html.twig @@ -0,0 +1,16 @@ +{% extends '@ChillPerson/Person/layout.html.twig' %} + +{% set person = entity.person %} +{% set activeRouteKey = '' %} + +{% block title %} +{% include('@ChillPerson/CRUD/_view_title.html.twig') %} +{% endblock %} + +{% block personcontent %} +{% embed '@ChillPerson/CRUD/_view_content.html.twig' %} + {% block crud_content_header %} +

    {{ ('crud.' ~ crud_name ~ '.title_view')|trans({'%person%': person|chill_entity_render_string }) }}

    + {% endblock crud_content_header %} +{% endembed %} +{% endblock %} \ No newline at end of file From 8829d234ec85751c8f6706214b1b3acc1574944d Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 12 Aug 2021 11:50:11 +0200 Subject: [PATCH 060/100] adapt to show date of death. it adapts but does not show actual date of death yet --- .../Resources/views/Entity/person.html.twig | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig index 1c75bcac1..81af4d567 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig @@ -57,6 +57,15 @@ (person.gender == 'man') ? 'man' : 'neuter' %}

    + + {%- if person.deathdate is not null -%} + + + + + {%- else -%}

    {%- endif -%} {#- tricks to remove easily whitespace after template -#} From a6001c195a2e47717b8d56d027ce3f90ceb782ca Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 12 Aug 2021 11:53:04 +0200 Subject: [PATCH 061/100] templates added and adapted for delete, list en view of aside activity --- .../src/Entity/AsideActivity.php | 6 +++ .../views/asideActivity/_delete.html.twig | 4 +- .../views/asideActivity/delete.html.twig | 2 +- .../views/asideActivity/list.html.twig | 25 +++++------ .../views/asideActivity/view.html.twig | 11 +++-- .../src/translations/messages.fr.yml | 42 ++++++++++++++++++- 6 files changed, 68 insertions(+), 22 deletions(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php index fda40ea1a..40d8aa6cd 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php @@ -200,4 +200,10 @@ final class AsideActivity implements TrackUpdateInterface, TrackCreationInterfac return $this; } + + // public function __toString() + // { + // // dump($this->type->getTitle()); + // return $this->type->getTitle(); + // } } diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/_delete.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/_delete.html.twig index 85df29a9c..fdbccb838 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/_delete.html.twig +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/_delete.html.twig @@ -1,9 +1,9 @@
    {% block crud_content_header %} -

    {{ ('crud.'~crud_name~'.title_delete')|trans({ '%as_string%': entity|chill_entity_render_string }) }}

    +

    {{ ('crud.'~crud_name~'.title_delete')|trans({ '%as_string%': 'Aside Activity' }) }}

    {% endblock crud_content_header %} -

    {{ ('crud.'~crud_name~'.confirm_message_delete')|trans({ '%as_string%': entity|chill_entity_render_string }) }}

    +

    {{ ('crud.'~crud_name~'.confirm_message_delete')|trans({ '%as_string%': 'Aside Activity' }) }}

    {{ form_start(form) }} diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/delete.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/delete.html.twig index de2d28c90..9c8a1ff59 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/delete.html.twig +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/delete.html.twig @@ -1,6 +1,6 @@ {% extends '@ChillMain/layout.html.twig' %} -{% block title %}{{ ('crud.' ~ crud_name ~ '.delete.title')|trans({'%crud_name%': crud_name}) }}{% endblock %} +{# {% block title %}{{ ('crud.' ~ crud_name ~ '.delete.title')|trans({'%crud_name%': crud_name}) }}{% endblock %} #} {% block content %} {% embed '@ChillAsideActivity/AsideActivity/_delete.html.twig' %} diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/list.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/list.html.twig index f474dcf1b..4017a7055 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/list.html.twig +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/list.html.twig @@ -1,6 +1,7 @@ -{% extends "@ChillActivity/Admin/layout_activity.html.twig" %} +{% extends "@ChillMain/layout.html.twig" %} -{% block admin_content %} +{% block content %} +

    {{ 'My aside activities' |trans }}

    {% if entities|length == 0 %} @@ -10,7 +11,7 @@

    {% else %} -
    +
    {# Sort activities according to date in descending order #} {% for entity in entities|sort ((a, b) => b.date <=> a.date) %} {% set t = entity.type %} @@ -29,13 +30,13 @@ {% if entity.date %}

    {{ entity.date|format_date('long') }}

    {% endif %} - +{#

    {{ entity.duration|date('H:i') }}

    -
    +
    #}
    @@ -49,25 +50,25 @@
    - {% + {# {% if entity.note is not empty or entity.createdBy|length > 0 %}
    {% if entity.note is not empty %}
    - {{ entity.note|chill_entity_render_box( { 'limit_lines': 3, 'metadata': false } ) }} + {{ entity.note|chill_markdown_to_html }}
    {% endif %}
    - {% endif %} + {% endif %} #}
        - {#
      • - -
      • #} +
      • + +
      • {# TOOD {% if is_granted('CHILL_ACTIVITY_UPDATE', activity) %} #} @@ -103,5 +104,5 @@
      - +
    {% endblock %} diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/view.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/view.html.twig index 5f1d2319a..4553e1c6f 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/view.html.twig +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/view.html.twig @@ -1,16 +1,15 @@ -{% extends '@ChillPerson/Person/layout.html.twig' %} +{% extends '@ChillMain/layout.html.twig' %} -{% set person = entity.person %} {% set activeRouteKey = '' %} {% block title %} -{% include('@ChillPerson/CRUD/_view_title.html.twig') %} +{% include('@ChillMain/CRUD/_view_title.html.twig') %} {% endblock %} -{% block personcontent %} -{% embed '@ChillPerson/CRUD/_view_content.html.twig' %} +{% block content %} +{% embed '@ChillMain/CRUD/_view_content.html.twig' %} {% block crud_content_header %} -

    {{ ('crud.' ~ crud_name ~ '.title_view')|trans({'%person%': person|chill_entity_render_string }) }}

    +

    {{ ('crud.' ~ crud_name ~ '.title_view')|trans }}

    {% endblock crud_content_header %} {% endembed %} {% endblock %} \ No newline at end of file diff --git a/src/Bundle/ChillAsideActivityBundle/src/translations/messages.fr.yml b/src/Bundle/ChillAsideActivityBundle/src/translations/messages.fr.yml index 3746f4dda..6ddc70e6d 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/translations/messages.fr.yml +++ b/src/Bundle/ChillAsideActivityBundle/src/translations/messages.fr.yml @@ -1,8 +1,42 @@ +#general +Show the aside activity: Voir l'activité annexe +Edit the aside activity: Modifier l'activité annexe +Aside activity: Activité annexe +Duration time: Durée +durationTime: durée +user_username: nom de l'utilisateur +Remark: Commentaire +No comments: Aucun commentaire +Add a new aside activity: Ajouter une nouvelle activité annexe +Aside activity list: Liste des activités annexes +present: présent +not present: absent +Delete: Supprimer +Update: Mettre à jour +Update activity: Modifier l'activité +Aside activity data: Données de l'activité annexe +No reason associated: Aucun sujet +There aren't any aside activities.: Aucune activité annexe enregistrée. +type_name: type de l'activité +Type: Type +Invisible: Invisible +Optional: Optionnel +Required: Obligatoire +Persons: Personnes +Users: Utilisateurs +Emergency: Urgent +by: 'Par ' +location: Lieu + # Crud crud: aside_activity: + title_view: Détail de l'activité annexe title_new: Nouveau activité annexe - title_edit: Edition d'un type d'activité + title_edit: Edition d'une activité annexe + title_delete: Supprimation d'une activité annexe + button_delete: Supprimer + confirm_message_delete: Êtes-vous sûr de vouloir supprimer cet activité annexe? aside_activity_category: title_new: Nouvelle catégorie d'activité annexe title_edit: Edition d'une catégorie de type d'activité @@ -34,3 +68,9 @@ Choose a category: Choisir un categorie My aside activities: Mes activités annexes Date: Date Created by: Creér par + + +#Aside activity delete +Delete aside activity: Supprimer une activité annexe +Are you sure you want to remove the aside activity concerning "%name%" ?: Êtes-vous sûr de vouloir supprimer une activité annexe qui concerne "%name%" ? +The activity has been successfully removed.: L'activité a été supprimée. \ No newline at end of file From f6376118a002138646d83a776408409faaf83c21 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 12 Aug 2021 11:54:50 +0200 Subject: [PATCH 062/100] commented out unneccesary lines for migration --- .../src/migrations/Version20210804082249.php | 162 ------------------ 1 file changed, 162 deletions(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210804082249.php b/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210804082249.php index 00d353368..8a0e98b9a 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210804082249.php +++ b/src/Bundle/ChillAsideActivityBundle/src/migrations/Version20210804082249.php @@ -41,87 +41,6 @@ final class Version20210804082249 extends AbstractMigration $this->addSql('ALTER TABLE chill_asideactivity.AsideActivity ADD CONSTRAINT FK_A866DA0E3414710B FOREIGN KEY (agent_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); $this->addSql('DROP TABLE asideactivitytype'); $this->addSql('DROP TABLE asideactivity'); - // $this->addSql('DROP TABLE chill_main_address_legacy'); - // $this->addSql('ALTER INDEX idx_55026b0ca76ed395 RENAME TO IDX_AC74095AA76ED395'); - // $this->addSql('ALTER INDEX idx_55026b0cc54c8c93 RENAME TO IDX_AC74095AC54C8C93'); - // $this->addSql('ALTER INDEX idx_55026b0c682b5931 RENAME TO IDX_AC74095A682B5931'); - // $this->addSql('ALTER INDEX idx_55026b0c217bbb47 RENAME TO IDX_AC74095A217BBB47'); - // $this->addSql('ALTER INDEX idx_ac74095a550b0c53 RENAME TO IDX_AC74095AD7FA8EF0'); - // $this->addSql('ALTER TABLE activityreason ALTER name SET NOT NULL'); - // $this->addSql('COMMENT ON COLUMN activityreason.name IS \'(DC2Type:json_array)\''); - // $this->addSql('ALTER INDEX idx_654a2fcd12469de2 RENAME TO IDX_AF82522312469DE2'); - // $this->addSql('ALTER TABLE activityreasoncategory ALTER name SET NOT NULL'); - // $this->addSql('COMMENT ON COLUMN activityreasoncategory.name IS \'(DC2Type:json_array)\''); - // $this->addSql('ALTER TABLE activitytype ALTER category_id DROP DEFAULT'); - // $this->addSql('ALTER TABLE chill_main_address DROP customs'); - // $this->addSql('ALTER TABLE chill_main_address ALTER isnoaddress DROP DEFAULT'); - // $this->addSql('ALTER TABLE chill_main_address ALTER point TYPE geometry(POINT,4326)'); - // $this->addSql('ALTER TABLE chill_main_address ALTER point DROP DEFAULT'); - // $this->addSql('ALTER TABLE chill_main_address_reference ALTER point TYPE geometry(POINT,4326)'); - // $this->addSql('ALTER TABLE chill_main_address_reference ALTER point DROP DEFAULT'); - // $this->addSql('CREATE INDEX search_name_code ON chill_main_postal_code (code, label)'); - // $this->addSql('ALTER INDEX idx_64a4a621504cb38d RENAME TO IDX_E260A868504CB38D'); - // $this->addSql('ALTER TABLE chill_person_accompanying_period_closingmotive ALTER ordering DROP DEFAULT'); - // $this->addSql('ALTER INDEX idx_92351ece727aca70 RENAME TO IDX_72D110E8727ACA70'); - // $this->addSql('ALTER TABLE chill_person_accompanying_period_participation ALTER startdate DROP DEFAULT'); - // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER startdate TYPE DATE'); - // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER startdate DROP DEFAULT'); - // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER enddate TYPE DATE'); - // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER enddate DROP DEFAULT'); - // $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work.startDate IS \'(DC2Type:date_immutable)\''); - // $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work.endDate IS \'(DC2Type:date_immutable)\''); - // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ADD CONSTRAINT FK_B694FB365FF1AEC FOREIGN KEY (updatedBy_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - // $this->addSql('CREATE INDEX IDX_B694FB365FF1AEC ON chill_person_accompanying_period_work (updatedBy_id)'); - // $this->addSql('ALTER TABLE chill_person_household DROP CONSTRAINT fk_household_comment_embeddable_user'); - // $this->addSql('DROP INDEX IDX_BE50A270116F5FA9'); - // $this->addSql('DROP INDEX household_members_not_overlaps'); - // $this->addSql('ALTER TABLE chill_person_household_members ALTER startdate TYPE DATE'); - // $this->addSql('ALTER TABLE chill_person_household_members ALTER startdate DROP DEFAULT'); - // $this->addSql('ALTER TABLE chill_person_household_members ALTER enddate TYPE DATE'); - // $this->addSql('ALTER TABLE chill_person_household_members ALTER enddate DROP DEFAULT'); - // $this->addSql('COMMENT ON COLUMN chill_person_household_members.startDate IS \'(DC2Type:date_immutable)\''); - // $this->addSql('COMMENT ON COLUMN chill_person_household_members.endDate IS \'(DC2Type:date_immutable)\''); - // $this->addSql('ALTER TABLE chill_person_marital_status ALTER id TYPE VARCHAR(7)'); - // $this->addSql('COMMENT ON COLUMN chill_person_marital_status.name IS \'(DC2Type:json_array)\''); - // $this->addSql('DROP INDEX mobilenumber_trgm_idx'); - // $this->addSql('DROP INDEX fullnamecanonical_trgm_idx'); - // $this->addSql('DROP INDEX phonenumber_trgm_idx'); - // $this->addSql('ALTER TABLE chill_person_person DROP cfdata_old'); - // $this->addSql('ALTER TABLE chill_person_person ALTER maritalstatus_id TYPE VARCHAR(7)'); - // $this->addSql('ALTER TABLE chill_person_person ALTER cfdata SET NOT NULL'); - // $this->addSql('COMMENT ON COLUMN chill_person_person.cFData IS \'(DC2Type:json_array)\''); - // $this->addSql('ALTER INDEX idx_3370d4403818da5 RENAME TO IDX_BF210A143818DA5'); - // $this->addSql('ALTER INDEX idx_3370d4401c9da55 RENAME TO IDX_BF210A141C9DA55'); - // $this->addSql('ALTER INDEX idx_bf210a145521be40 RENAME TO IDX_BF210A14D7D03CE3'); - // $this->addSql('ALTER INDEX idx_person_center RENAME TO IDX_BF210A145932F377'); - // $this->addSql('ALTER TABLE persons_spoken_languages DROP CONSTRAINT FK_7201106F217BBB47'); - // $this->addSql('ALTER TABLE persons_spoken_languages DROP CONSTRAINT FK_7201106F82F1BAF4'); - // $this->addSql('ALTER TABLE persons_spoken_languages ADD CONSTRAINT FK_7201106F217BBB47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - // $this->addSql('ALTER TABLE persons_spoken_languages ADD CONSTRAINT FK_7201106F82F1BAF4 FOREIGN KEY (language_id) REFERENCES language (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - // $this->addSql('ALTER TABLE chill_person_social_work_evaluation ALTER notificationdelay SET NOT NULL'); - // $this->addSql('COMMENT ON COLUMN country.name IS \'(DC2Type:json_array)\''); - // $this->addSql('ALTER TABLE custom_field_long_choice_options ALTER internal_key DROP DEFAULT'); - // $this->addSql('COMMENT ON COLUMN custom_field_long_choice_options.text IS \'(DC2Type:json_array)\''); - // $this->addSql('ALTER TABLE customfield ALTER required DROP DEFAULT'); - // $this->addSql('ALTER TABLE customfield ALTER required SET NOT NULL'); - // $this->addSql('COMMENT ON COLUMN customfield.name IS \'(DC2Type:json_array)\''); - // $this->addSql('COMMENT ON COLUMN customfield.options IS \'(DC2Type:json_array)\''); - // $this->addSql('ALTER INDEX idx_40fb5d6dfec418b RENAME TO IDX_7A6FDBEFEC418B'); - // $this->addSql('ALTER INDEX idx_286dc95df53b66 RENAME TO IDX_7A48DF7F5DF53B66'); - // $this->addSql('ALTER TABLE customfieldsgroup ALTER options DROP DEFAULT'); - // $this->addSql('ALTER TABLE customfieldsgroup ALTER options SET NOT NULL'); - // $this->addSql('COMMENT ON COLUMN customfieldsgroup.name IS \'(DC2Type:json_array)\''); - // $this->addSql('COMMENT ON COLUMN customfieldsgroup.options IS \'(DC2Type:json_array)\''); - // $this->addSql('ALTER INDEX idx_a14d8f3d447bbb3b RENAME TO IDX_A14D8F3D96DF1F10'); - // $this->addSql('COMMENT ON COLUMN language.name IS \'(DC2Type:json_array)\''); - // $this->addSql('ALTER TABLE permission_groups ALTER flags DROP DEFAULT'); - // $this->addSql('COMMENT ON COLUMN scopes.name IS \'(DC2Type:json_array)\''); - // $this->addSql('ALTER INDEX chill_3party.idx_c65d4397c7d3a8e6 RENAME TO IDX_14DC4475C7D3A8E6'); - // $this->addSql('ALTER INDEX chill_3party.idx_c65d43975932f377 RENAME TO IDX_14DC44755932F377'); - // $this->addSql('ALTER TABLE users ALTER usernamecanonical SET NOT NULL'); - // $this->addSql('DROP INDEX uniq_93f763ae217bbb47'); - // $this->addSql('ALTER TABLE chill_vendee.vendeeperson_entourage ADD CONSTRAINT FK_4D319FFEF57537C3 FOREIGN KEY (vendeeperson_id) REFERENCES chill_vendee.vendee_person (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - // $this->addSql('ALTER INDEX chill_vendee.idx_1a4b602deef79338 RENAME TO IDX_DD0A4C00EEF79338'); } public function down(Schema $schema): void @@ -147,86 +66,5 @@ final class Version20210804082249 extends AbstractMigration $this->addSql('ALTER TABLE asideactivity ADD CONSTRAINT fk_e9fa21913414710b FOREIGN KEY (agent_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); $this->addSql('DROP TABLE chill_asideactivity.AsideActivity'); $this->addSql('DROP TABLE chill_asideactivity.AsideActivityCategory'); - // $this->addSql('COMMENT ON COLUMN scopes.name IS NULL'); - // $this->addSql('ALTER INDEX idx_7a48df7f5df53b66 RENAME TO idx_286dc95df53b66'); - // $this->addSql('COMMENT ON COLUMN country.name IS NULL'); - // $this->addSql('ALTER TABLE persons_spoken_languages DROP CONSTRAINT fk_7201106f217bbb47'); - // $this->addSql('ALTER TABLE persons_spoken_languages DROP CONSTRAINT fk_7201106f82f1baf4'); - // $this->addSql('ALTER TABLE persons_spoken_languages ADD CONSTRAINT fk_7201106f217bbb47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - // $this->addSql('ALTER TABLE persons_spoken_languages ADD CONSTRAINT fk_7201106f82f1baf4 FOREIGN KEY (language_id) REFERENCES language (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - // $this->addSql('COMMENT ON COLUMN language.name IS NULL'); - // $this->addSql('ALTER TABLE customfieldsgroup ALTER options SET DEFAULT \'{}\''); - // $this->addSql('ALTER TABLE customfieldsgroup ALTER options DROP NOT NULL'); - // $this->addSql('COMMENT ON COLUMN customfieldsgroup.name IS NULL'); - // $this->addSql('COMMENT ON COLUMN customfieldsgroup.options IS NULL'); - // $this->addSql('ALTER TABLE activityreasoncategory ALTER name DROP NOT NULL'); - // $this->addSql('COMMENT ON COLUMN activityreasoncategory.name IS NULL'); - // $this->addSql('ALTER TABLE activityreason ALTER name DROP NOT NULL'); - // $this->addSql('COMMENT ON COLUMN activityreason.name IS NULL'); - // $this->addSql('ALTER INDEX idx_af82522312469de2 RENAME TO idx_654a2fcd12469de2'); - // $this->addSql('ALTER INDEX idx_a14d8f3d96df1f10 RENAME TO idx_a14d8f3d447bbb3b'); - // $this->addSql('ALTER TABLE customfield ALTER required SET DEFAULT \'false\''); - // $this->addSql('ALTER TABLE customfield ALTER required DROP NOT NULL'); - // $this->addSql('COMMENT ON COLUMN customfield.options IS NULL'); - // $this->addSql('COMMENT ON COLUMN customfield.name IS NULL'); - // $this->addSql('ALTER INDEX idx_7a6fdbefec418b RENAME TO idx_40fb5d6dfec418b'); - // $this->addSql('ALTER TABLE custom_field_long_choice_options ALTER internal_key SET DEFAULT \'\''); - // $this->addSql('COMMENT ON COLUMN custom_field_long_choice_options.text IS NULL'); - // $this->addSql('ALTER TABLE chill_person_marital_status ALTER id TYPE VARCHAR(10)'); - // $this->addSql('COMMENT ON COLUMN chill_person_marital_status.name IS NULL'); - // $this->addSql('ALTER TABLE permission_groups ALTER flags SET DEFAULT \'[]\''); - // $this->addSql('ALTER INDEX chill_3party.idx_14dc4475c7d3a8e6 RENAME TO idx_c65d4397c7d3a8e6'); - // $this->addSql('ALTER INDEX chill_3party.idx_14dc44755932f377 RENAME TO idx_c65d43975932f377'); - // $this->addSql('ALTER TABLE users ALTER usernameCanonical DROP NOT NULL'); - // $this->addSql('ALTER TABLE chill_person_accompanying_period_closingmotive ALTER ordering SET DEFAULT \'0\''); - // $this->addSql('ALTER INDEX idx_72d110e8727aca70 RENAME TO idx_92351ece727aca70'); - // $this->addSql('ALTER TABLE chill_person_accompanying_period_participation ALTER startDate SET DEFAULT \'1970-01-01\''); - // $this->addSql('ALTER TABLE chill_person_social_work_evaluation ALTER notificationDelay DROP NOT NULL'); - // $this->addSql('ALTER TABLE chill_main_address_reference ALTER point TYPE VARCHAR(255)'); - // $this->addSql('ALTER TABLE chill_main_address_reference ALTER point DROP DEFAULT'); - // $this->addSql('ALTER TABLE chill_main_address ADD customs JSONB DEFAULT \'[]\''); - // $this->addSql('ALTER TABLE chill_main_address ALTER isNoAddress SET DEFAULT \'false\''); - // $this->addSql('ALTER TABLE chill_main_address ALTER point TYPE VARCHAR(255)'); - // $this->addSql('ALTER TABLE chill_main_address ALTER point DROP DEFAULT'); - // $this->addSql('ALTER INDEX idx_e260a868504cb38d RENAME TO idx_64a4a621504cb38d'); - // $this->addSql('ALTER INDEX idx_ac74095aa76ed395 RENAME TO idx_55026b0ca76ed395'); - // $this->addSql('ALTER INDEX idx_ac74095a682b5931 RENAME TO idx_55026b0c682b5931'); - // $this->addSql('ALTER INDEX idx_ac74095a217bbb47 RENAME TO idx_55026b0c217bbb47'); - // $this->addSql('ALTER INDEX idx_ac74095ac54c8c93 RENAME TO idx_55026b0cc54c8c93'); - // $this->addSql('ALTER INDEX idx_ac74095ad7fa8ef0 RENAME TO IDX_AC74095A550B0C53'); - // $this->addSql('ALTER TABLE chill_person_household_members ALTER startDate TYPE DATE'); - // $this->addSql('ALTER TABLE chill_person_household_members ALTER startDate DROP DEFAULT'); - // $this->addSql('ALTER TABLE chill_person_household_members ALTER endDate TYPE DATE'); - // $this->addSql('ALTER TABLE chill_person_household_members ALTER endDate DROP DEFAULT'); - // $this->addSql('COMMENT ON COLUMN chill_person_household_members.startdate IS NULL'); - // $this->addSql('COMMENT ON COLUMN chill_person_household_members.enddate IS NULL'); - // $this->addSql('CREATE INDEX household_members_not_overlaps ON chill_person_household_members (person_id) WHERE (sharedhousehold IS TRUE)'); - // $this->addSql('ALTER TABLE activitytype ALTER category_id SET DEFAULT 1'); - // $this->addSql('ALTER TABLE chill_person_household ADD CONSTRAINT fk_household_comment_embeddable_user FOREIGN KEY (comment_members_userid) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - // $this->addSql('CREATE INDEX IDX_BE50A270116F5FA9 ON chill_person_household (comment_members_userid)'); - // $this->addSql('DROP INDEX search_name_code'); - // $this->addSql('ALTER TABLE chill_person_person ADD cfdata_old TEXT DEFAULT NULL'); - // $this->addSql('ALTER TABLE chill_person_person ALTER cFData DROP NOT NULL'); - // $this->addSql('ALTER TABLE chill_person_person ALTER maritalStatus_id TYPE VARCHAR(10)'); - // $this->addSql('COMMENT ON COLUMN chill_person_person.cfdata_old IS \'(DC2Type:array)\''); - // $this->addSql('COMMENT ON COLUMN chill_person_person.cfdata IS NULL'); - // $this->addSql('CREATE INDEX mobilenumber_trgm_idx ON chill_person_person (mobilenumber)'); - // $this->addSql('CREATE INDEX fullnamecanonical_trgm_idx ON chill_person_person (fullnamecanonical)'); - // $this->addSql('CREATE INDEX phonenumber_trgm_idx ON chill_person_person (phonenumber)'); - // $this->addSql('ALTER INDEX idx_bf210a141c9da55 RENAME TO idx_3370d4401c9da55'); - // $this->addSql('ALTER INDEX idx_bf210a143818da5 RENAME TO idx_3370d4403818da5'); - // $this->addSql('ALTER INDEX idx_bf210a145932f377 RENAME TO idx_person_center'); - // $this->addSql('ALTER INDEX idx_bf210a14d7d03ce3 RENAME TO IDX_BF210A145521BE40'); - // $this->addSql('ALTER TABLE chill_person_accompanying_period_work DROP CONSTRAINT FK_B694FB365FF1AEC'); - // $this->addSql('DROP INDEX IDX_B694FB365FF1AEC'); - // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER startDate TYPE TIMESTAMP(0) WITHOUT TIME ZONE'); - // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER startDate DROP DEFAULT'); - // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER endDate TYPE TIMESTAMP(0) WITHOUT TIME ZONE'); - // $this->addSql('ALTER TABLE chill_person_accompanying_period_work ALTER endDate DROP DEFAULT'); - // $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work.startdate IS \'(DC2Type:datetime_immutable)\''); - // $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work.enddate IS \'(DC2Type:datetime_immutable)\''); - // $this->addSql('CREATE UNIQUE INDEX uniq_93f763ae217bbb47 ON chill_vendee.vendee_person (person_id)'); - // $this->addSql('ALTER TABLE chill_vendee.vendeeperson_entourage DROP CONSTRAINT FK_4D319FFEF57537C3'); - // $this->addSql('ALTER INDEX chill_vendee.idx_dd0a4c00eef79338 RENAME TO idx_1a4b602deef79338'); } } From 54c4524b2718d5c447846a169ddce0d0931d639d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 16 Aug 2021 14:39:18 +0200 Subject: [PATCH 063/100] extend search api to users --- .../Controller/SearchController.php | 73 ++++++++++--------- .../Search/Entity/SearchUserApiProvider.php | 59 +++++++++++++++ .../ChillMainBundle/Search/SearchApi.php | 19 +++-- .../Search/SearchApiNoQueryException.php | 23 ++++++ .../ChillMainBundle/chill.api.specs.yaml | 3 +- .../config/services/search.yaml | 5 ++ 6 files changed, 140 insertions(+), 42 deletions(-) create mode 100644 src/Bundle/ChillMainBundle/Search/Entity/SearchUserApiProvider.php create mode 100644 src/Bundle/ChillMainBundle/Search/SearchApiNoQueryException.php diff --git a/src/Bundle/ChillMainBundle/Controller/SearchController.php b/src/Bundle/ChillMainBundle/Controller/SearchController.php index 7c88d24fe..4ecc215f7 100644 --- a/src/Bundle/ChillMainBundle/Controller/SearchController.php +++ b/src/Bundle/ChillMainBundle/Controller/SearchController.php @@ -22,7 +22,9 @@ namespace Chill\MainBundle\Controller; +use Chill\MainBundle\Search\SearchApiNoQueryException; use Chill\MainBundle\Serializer\Model\Collection; +use GuzzleHttp\Psr7\Response; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Request; use Chill\MainBundle\Search\UnknowSearchDomainException; @@ -33,6 +35,7 @@ use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\Extension\Core\Type\FormType; use Symfony\Component\HttpFoundation\JsonResponse; use Chill\MainBundle\Search\SearchProvider; +use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; use Symfony\Contracts\Translation\TranslatorInterface; use Chill\MainBundle\Pagination\PaginatorFactory; use Chill\MainBundle\Search\SearchApi; @@ -46,15 +49,15 @@ use Symfony\Component\HttpFoundation\Exception\BadRequestException; class SearchController extends AbstractController { protected SearchProvider $searchProvider; - + protected TranslatorInterface $translator; - + protected PaginatorFactory $paginatorFactory; protected SearchApi $searchApi; - + function __construct( - SearchProvider $searchProvider, + SearchProvider $searchProvider, TranslatorInterface $translator, PaginatorFactory $paginatorFactory, SearchApi $searchApi @@ -65,14 +68,14 @@ class SearchController extends AbstractController $this->searchApi = $searchApi; } - + public function searchAction(Request $request, $_format) { $pattern = $request->query->get('q', ''); - + if ($pattern === ''){ switch($_format) { - case 'html': + case 'html': return $this->render('@ChillMain/Search/error.html.twig', array( 'message' => $this->translator->trans("Your search is empty. " @@ -86,16 +89,16 @@ class SearchController extends AbstractController ]); } } - + $name = $request->query->get('name', NULL); - + try { if ($name === NULL) { if ($_format === 'json') { return new JsonResponse('Currently, we still do not aggregate results ' . 'from different providers', JsonResponse::HTTP_BAD_REQUEST); } - + // no specific search selected. Rendering result in "preview" mode $results = $this->searchProvider ->getSearchResults( @@ -119,7 +122,7 @@ class SearchController extends AbstractController ), $_format )]; - + if ($_format === 'json') { return new JsonResponse(\reset($results)); } @@ -141,8 +144,8 @@ class SearchController extends AbstractController 'pattern' => $pattern )); } - - + + return $this->render('@ChillMain/Search/list.html.twig', array('results' => $results, 'pattern' => $pattern) ); @@ -159,29 +162,33 @@ class SearchController extends AbstractController ." one type"); } - $collection = $this->searchApi->getResults($query, $types, []); + try { + $collection = $this->searchApi->getResults($query, $types, []); + } catch (SearchApiNoQueryException $e) { + throw new BadRequestHttpException($e->getMessage(), $e); + } - return $this->json($collection); + return $this->json($collection, \Symfony\Component\HttpFoundation\Response::HTTP_OK, [], [ "groups" => ["read"]]); } - + public function advancedSearchListAction(Request $request) { /* @var $variable Chill\MainBundle\Search\SearchProvider */ $searchProvider = $this->searchProvider; $advancedSearchProviders = $searchProvider ->getHasAdvancedFormSearchServices(); - + if(\count($advancedSearchProviders) === 1) { \reset($advancedSearchProviders); - + return $this->redirectToRoute('chill_main_advanced_search', [ 'name' => \key($advancedSearchProviders) ]); } - + return $this->render('@ChillMain/Search/choose_list.html.twig'); } - + public function advancedSearchAction($name, Request $request) { try { @@ -190,22 +197,22 @@ class SearchController extends AbstractController /* @var $variable Chill\MainBundle\Search\HasAdvancedSearchFormInterface */ $search = $this->searchProvider ->getHasAdvancedFormByName($name); - + } catch (\Chill\MainBundle\Search\UnknowSearchNameException $e) { throw $this->createNotFoundException("no advanced search for " . "$name"); } - + if ($request->query->has('q')) { $data = $search->convertTermsToFormData($searchProvider->parse( $request->query->get('q'))); } - + $form = $this->createAdvancedSearchForm($name, $data ?? []); - + if ($request->isMethod(Request::METHOD_POST)) { $form->handleRequest($request); - + if ($form->isValid()) { $pattern = $this->searchProvider ->getHasAdvancedFormByName($name) @@ -215,8 +222,8 @@ class SearchController extends AbstractController 'q' => $pattern, 'name' => $name ]); } - } - + } + return $this->render('@ChillMain/Search/advanced_search.html.twig', [ 'form' => $form->createView(), @@ -224,15 +231,15 @@ class SearchController extends AbstractController 'title' => $search->getAdvancedSearchTitle() ]); } - + protected function createAdvancedSearchForm($name, array $data = []) { $builder = $this ->get('form.factory') ->createNamedBuilder( null, - FormType::class, - $data, + FormType::class, + $data, [ 'method' => Request::METHOD_POST ] ); @@ -240,12 +247,12 @@ class SearchController extends AbstractController ->getHasAdvancedFormByName($name) ->buildForm($builder) ; - + $builder->add('submit', SubmitType::class, [ 'label' => 'Search' ]); - + return $builder->getForm(); } - + } diff --git a/src/Bundle/ChillMainBundle/Search/Entity/SearchUserApiProvider.php b/src/Bundle/ChillMainBundle/Search/Entity/SearchUserApiProvider.php new file mode 100644 index 000000000..e4061cea1 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Search/Entity/SearchUserApiProvider.php @@ -0,0 +1,59 @@ +userRepository = $userRepository; + } + + public function provideQuery(string $pattern, array $parameters): SearchApiQuery + { + $query = new SearchApiQuery(); + $query + ->setSelectKey("user") + ->setSelectJsonbMetadata("jsonb_build_object('id', u.id)") + ->setSelectPertinence("GREATEST(SIMILARITY(LOWER(UNACCENT(?)), u.usernamecanonical), + SIMILARITY(LOWER(UNACCENT(?)), u.emailcanonical))", [ $pattern, $pattern ]) + ->setFromClause("users AS u") + ->setWhereClause("SIMILARITY(LOWER(UNACCENT(?)), u.usernamecanonical) > 0.15 + OR + SIMILARITY(LOWER(UNACCENT(?)), u.emailcanonical) > 0.15 + ", [ $pattern, $pattern ]); + + return $query; + } + + public function supportsTypes(string $pattern, array $types, array $parameters): bool + { + return \in_array('user', $types); + } + + public function prepare(array $metadatas): void + { + $ids = \array_map(fn($m) => $m['id'], $metadatas); + + $this->userRepository->findBy([ 'id' => $ids ]); + } + + public function supportsResult(string $key, array $metadatas): bool + { + return $key === 'user'; + } + + public function getResult(string $key, array $metadata, float $pertinence) + { + return $this->userRepository->find($metadata['id']); + } +} diff --git a/src/Bundle/ChillMainBundle/Search/SearchApi.php b/src/Bundle/ChillMainBundle/Search/SearchApi.php index 677286f1f..d59193114 100644 --- a/src/Bundle/ChillMainBundle/Search/SearchApi.php +++ b/src/Bundle/ChillMainBundle/Search/SearchApi.php @@ -2,6 +2,7 @@ namespace Chill\MainBundle\Search; +use Chill\MainBundle\Search\Entity\SearchUserApiProvider; use Chill\MainBundle\Serializer\Model\Collection; use Chill\MainBundle\Pagination\PaginatorFactory; use Chill\PersonBundle\Search\SearchPersonApiProvider; @@ -25,12 +26,14 @@ class SearchApi EntityManagerInterface $em, SearchPersonApiProvider $searchPerson, ThirdPartyApiSearch $thirdPartyApiSearch, + SearchUserApiProvider $searchUser, PaginatorFactory $paginator ) { $this->em = $em; $this->providers[] = $searchPerson; $this->providers[] = $thirdPartyApiSearch; + $this->providers[] = $searchUser; $this->paginator = $paginator; } @@ -41,6 +44,10 @@ class SearchApi { $queries = $this->findQueries($pattern, $types, $parameters); + if (0 === count($queries)) { + throw new SearchApiNoQueryException($pattern, $types, $parameters); + } + $total = $this->countItems($queries, $types, $parameters); $paginator = $this->paginator->create($total); @@ -49,9 +56,7 @@ class SearchApi $this->prepareProviders($rawResults); $results = $this->buildResults($rawResults); - $collection = new Collection($results, $paginator); - - return $collection; + return new Collection($results, $paginator); } private function findQueries($pattern, array $types, array $parameters): array @@ -77,7 +82,7 @@ class SearchApi $rsmCount->addScalarResult('count', 'count'); $countNq = $this->em->createNativeQuery($countQuery, $rsmCount); $countNq->setParameters($parameters); - + return $countNq->getSingleScalarResult(); } @@ -130,7 +135,7 @@ class SearchApi $nq = $this->em->createNativeQuery($union, $rsm); $nq->setParameters($parameters); - + return $nq->getResult(); } @@ -142,7 +147,7 @@ class SearchApi if ($p->supportsResult($r['key'], $r['metadata'])) { $metadatas[$k][] = $r['metadata']; break; - } + } } } @@ -161,7 +166,7 @@ class SearchApi $p->getResult($r['key'], $r['metadata'], $r['pertinence']) ); break; - } + } } } diff --git a/src/Bundle/ChillMainBundle/Search/SearchApiNoQueryException.php b/src/Bundle/ChillMainBundle/Search/SearchApiNoQueryException.php new file mode 100644 index 000000000..765650074 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Search/SearchApiNoQueryException.php @@ -0,0 +1,23 @@ +pattern = $pattern; + $this->types = $types; + $this->parameters = $parameters; + + parent::__construct($message, $code, $previous); + } +} diff --git a/src/Bundle/ChillMainBundle/chill.api.specs.yaml b/src/Bundle/ChillMainBundle/chill.api.specs.yaml index 775407847..3dd8c8736 100644 --- a/src/Bundle/ChillMainBundle/chill.api.specs.yaml +++ b/src/Bundle/ChillMainBundle/chill.api.specs.yaml @@ -127,8 +127,6 @@ paths: - person - thirdparty description: > - **Warning**: This is currently a stub (not really implemented - The search is performed across multiple entities. The entities must be listed into `type` parameters. @@ -152,6 +150,7 @@ paths: enum: - person - thirdparty + - user responses: 200: description: "OK" diff --git a/src/Bundle/ChillMainBundle/config/services/search.yaml b/src/Bundle/ChillMainBundle/config/services/search.yaml index 672c956c5..38e421eaf 100644 --- a/src/Bundle/ChillMainBundle/config/services/search.yaml +++ b/src/Bundle/ChillMainBundle/config/services/search.yaml @@ -7,3 +7,8 @@ services: Chill\MainBundle\Search\SearchApi: autowire: true autoconfigure: true + + Chill\MainBundle\Search\Entity\: + autowire: true + autoconfigure: true + resource: '../../Search/Entity' From 8f9c8bc1a6946339de3d36f7577035665c7aed79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 27 Jul 2021 18:29:48 +0200 Subject: [PATCH 064/100] update schema to store location on accompanying period --- .../Entity/AccompanyingPeriod.php | 17 ++++++++ .../ChillPersonBundle/Entity/Person.php | 14 +++++++ .../migrations/Version20210727152826.php | 39 +++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 src/Bundle/ChillPersonBundle/migrations/Version20210727152826.php diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php index b2de73651..41835e237 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php @@ -25,6 +25,7 @@ namespace Chill\PersonBundle\Entity; use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface; use Chill\MainBundle\Doctrine\Model\TrackCreationInterface; use Chill\MainBundle\Entity\Scope; +use Chill\MainBundle\Entity\Address; use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork; use Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive; use Chill\PersonBundle\Entity\AccompanyingPeriod\Comment; @@ -291,6 +292,22 @@ class AccompanyingPeriod implements TrackCreationInterface, TrackUpdateInterface */ private Collection $works; + /** + * @ORM\ManyToOne( + * targetEntity=Person::class, + * inversedBy="periodLocatedOn" + * ) + */ + private ?Person $personLocation = null; + + + /** + * @ORM\ManyToOne( + * targetEntity=Address::class + * ) + */ + private ?Address $addressLocation = null; + /** * AccompanyingPeriod constructor. * diff --git a/src/Bundle/ChillPersonBundle/Entity/Person.php b/src/Bundle/ChillPersonBundle/Entity/Person.php index 695970bfa..cf00eb9f1 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person.php @@ -30,6 +30,7 @@ use Chill\MainBundle\Entity\Country; use Chill\MainBundle\Entity\User; use Chill\PersonBundle\Entity\Household\Household; use Chill\PersonBundle\Entity\MaritalStatus; +use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Entity\Household\HouseholdMember; use Chill\MainBundle\Entity\HasCenterInterface; use Chill\MainBundle\Entity\Address; @@ -379,6 +380,19 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI */ private Collection $householdAddresses; + /** + * @ORM\OneToMany( + * targetEntity=AccompanyingPeriod::class, + * mappedBy="personLocation" + * ) + */ + private Collection $periodLocatedOn; + + /** + * Person constructor. + * + * @param \DateTime|null $opening + */ public function __construct() { $this->accompanyingPeriodParticipations = new ArrayCollection(); diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20210727152826.php b/src/Bundle/ChillPersonBundle/migrations/Version20210727152826.php new file mode 100644 index 000000000..f49c819d7 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/migrations/Version20210727152826.php @@ -0,0 +1,39 @@ +addSql('ALTER TABLE chill_person_accompanying_period ADD personLocation_id INT DEFAULT NULL'); + $this->addSql('ALTER TABLE chill_person_accompanying_period ADD addressLocation_id INT DEFAULT NULL'); + $this->addSql('ALTER TABLE chill_person_accompanying_period ADD CONSTRAINT FK_E260A868D5213D34 FOREIGN KEY (personLocation_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_person_accompanying_period ADD CONSTRAINT FK_E260A8689B07D6BF FOREIGN KEY (addressLocation_id) REFERENCES chill_main_address (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('CREATE INDEX IDX_E260A868D5213D34 ON chill_person_accompanying_period (personLocation_id)'); + $this->addSql('CREATE INDEX IDX_E260A8689B07D6BF ON chill_person_accompanying_period (addressLocation_id)'); + } + + public function down(Schema $schema): void + { + $this->addSql('ALTER TABLE chill_person_accompanying_period DROP CONSTRAINT FK_E260A868D5213D34'); + $this->addSql('ALTER TABLE chill_person_accompanying_period DROP CONSTRAINT FK_E260A8689B07D6BF'); + $this->addSql('DROP INDEX IDX_E260A868D5213D34'); + $this->addSql('DROP INDEX IDX_E260A8689B07D6BF'); + $this->addSql('ALTER TABLE chill_person_accompanying_period DROP personLocation_id'); + $this->addSql('ALTER TABLE chill_person_accompanying_period DROP addressLocation_id'); + } +} From f188cc2d27017f4238613f33c5e41503e37070f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 27 Jul 2021 21:25:38 +0200 Subject: [PATCH 065/100] [AccompanyingPeriod] add location to serialization --- .../Entity/AccompanyingPeriod.php | 63 +++++++++++++++++++ .../ChillPersonBundle/chill.api.specs.yaml | 20 ++++++ 2 files changed, 83 insertions(+) diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php index 41835e237..dda129296 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php @@ -948,4 +948,67 @@ class AccompanyingPeriod implements TrackCreationInterface, TrackUpdateInterface return $this; } + + public function getAddressLocation(): ?Address + { + return $this->addressLocation; + } + + /** + * @Groups({"write"}) + */ + public function setAddressLocation(?Address $addressLocation = null): self + { + $this->addressLocation = $addressLocation; + + return $this; + } + + /** + * @Groups({"read"}) + */ + public function getPersonLocation(): ?Person + { + return $this->personLocation; + } + + /** + * @Groups({"write"}) + */ + public function setPersonLocation(?Person $person = null): self + { + $this->personLocation = $person; + + return $this; + } + + /** + * Get the location, taking precedence into account + * + * @Groups({"read"}) + */ + public function getLocation(\DateTimeImmutable $at = null): ?Address + { + if ($this->getPersonLocation() instanceof Person) { + return $this->getPersonLocation()->getCurrentHouseholdAddress($at); + } + + return $this->getAddressLocation(); + } + + /** + * Get where the location is + * + * @Groups({"read"}) + */ + public function getLocationStatus(): string + { + if ($this->getPersonLocation() instanceof Person) { + return 'person'; + } elseif ($this->getAddressLocation() instanceof Address) { + return 'address'; + } else { + return 'none'; + } + } } diff --git a/src/Bundle/ChillPersonBundle/chill.api.specs.yaml b/src/Bundle/ChillPersonBundle/chill.api.specs.yaml index 9fba308c5..71d5c119e 100644 --- a/src/Bundle/ChillPersonBundle/chill.api.specs.yaml +++ b/src/Bundle/ChillPersonBundle/chill.api.specs.yaml @@ -416,6 +416,26 @@ paths: This is my an initial comment. Say hello to the new "parcours"! + Setting person with id 8405 as locator: + value: + type: accompanying_period + id: 0 + personLocation: + type: person + id: 8405 + Removing person location for both person and address: + value: + type: accompanying_period + id: 0 + personLocation: null + addressLocation: null + Adding address with id 7960 as temporarily address: + value: + type: accompanying_period + id: 0 + personLocation: null + addressLocation: + id: 7960 responses: 401: description: "Unauthorized" From 3302d69373fb4f6cec08de6659cb078a4764af91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 28 Jul 2021 13:27:05 +0200 Subject: [PATCH 066/100] [AccompanyingPeriod] add flashbag message when located temporarily --- .../Resources/views/AccompanyingCourse/index.html.twig | 5 +++++ src/Bundle/ChillPersonBundle/translations/messages.fr.yml | 1 + 2 files changed, 6 insertions(+) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig index ea2fcd710..c18abc767 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig @@ -27,6 +27,11 @@
    + {% if accompanyingCourse.locationStatus == 'address' or accompanyingCourse.locationStatus == 'none') %} +
    + {{ 'This course is located at a temporarily address. You should locate this course to an user'|trans }} +
    + {% endif %} {% endif %}

    {{ 'Resume Accompanying Course'|trans }}

    diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 98523a762..e6fe6e56c 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -372,6 +372,7 @@ Show Accompanying Course: Voir le parcours Edit Accompanying Course: Modifier le parcours Create Accompanying Course: Créer un nouveau parcours Drop Accompanying Course: Supprimer le parcours +This course is located at a temporarily address. You should locate this course to an user: Ce parcours est localisé à une adresse temporaire. Il devrait être localisé auprès d'un usager concerné. # Household Household: Ménage From a3a5d5cfd0704f3bf0db606538931f578ed6ccd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 28 Jul 2021 14:46:03 +0200 Subject: [PATCH 067/100] [AccompanyingPeriod] create constraints for location --- .../AccompanyingPeriod/LocationValidity.php | 20 +++++++ .../LocationValidityValidator.php | 52 +++++++++++++++++++ .../ChillPersonBundle/config/services.yaml | 5 ++ .../ChillPersonBundle/config/validation.yaml | 1 + 4 files changed, 78 insertions(+) create mode 100644 src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidity.php create mode 100644 src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidityValidator.php diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidity.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidity.php new file mode 100644 index 000000000..9a64b3cf6 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidity.php @@ -0,0 +1,20 @@ +render = $render; + } + + public function validate($period, Constraint $constraint) + { + if (!$constraint instanceof LocationValidity) { + throw new UnexpectedTypeException($constraint, LocationValidity::class); + } + + if (!$period instanceof AccompanyingPeriod) { + throw new UnexpectedValueException($value, AccompanyingPeriod::class); + } + + if ($period->getLocationStatus() === 'person') { + if (null === $period->getOpenParticipationContainsPerson( + $period->getPersonLocation())) { + $this->context->buildViolation($constraint->messagePersonLocatedMustBeAssociated) + ->setParameter('{{ person_name }}', $this->render->renderString( + $period->getPersonLocation(), [] + )) + ->addViolation() + ; + } + } + + if ($period->getStep() !== AccompanyingPeriod::STEP_DRAFT + && $period->getLocationStatus() === 'none') { + $this->context->buildViolation($constraint->messagePeriodMustRemainsLocated + ->addViolation() + ; + + } + + } +} diff --git a/src/Bundle/ChillPersonBundle/config/services.yaml b/src/Bundle/ChillPersonBundle/config/services.yaml index aedea4396..c2f60a729 100644 --- a/src/Bundle/ChillPersonBundle/config/services.yaml +++ b/src/Bundle/ChillPersonBundle/config/services.yaml @@ -97,3 +97,8 @@ services: resource: '../Templating/Entity' tags: - 'chill.render_entity' + + Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\: + autowire: true + autoconfigure: true + resource: '../Validator/Constraints/AccompanyingPeriod' diff --git a/src/Bundle/ChillPersonBundle/config/validation.yaml b/src/Bundle/ChillPersonBundle/config/validation.yaml index fb0dd7b50..23369a467 100644 --- a/src/Bundle/ChillPersonBundle/config/validation.yaml +++ b/src/Bundle/ChillPersonBundle/config/validation.yaml @@ -81,6 +81,7 @@ Chill\PersonBundle\Entity\AccompanyingPeriod: constraints: - Callback: callback: isDateConsistent + - 'Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\LocationValidity': ~ Chill\PersonBundle\Entity\PersonPhone: properties: From 8d2b1fbe136dfa5dd2557298e8935755d238b039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 28 Jul 2021 16:16:57 +0200 Subject: [PATCH 068/100] add test for accompanying period location validity --- .../LocationValidityValidatorTest.php | 122 ++++++++++++++++++ .../AccompanyingPeriod/LocationValidity.php | 2 +- .../LocationValidityValidator.php | 10 +- 3 files changed, 129 insertions(+), 5 deletions(-) create mode 100644 src/Bundle/ChillPersonBundle/Tests/Validator/AccompanyingPeriod/LocationValidityValidatorTest.php diff --git a/src/Bundle/ChillPersonBundle/Tests/Validator/AccompanyingPeriod/LocationValidityValidatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Validator/AccompanyingPeriod/LocationValidityValidatorTest.php new file mode 100644 index 000000000..b70a8146b --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Tests/Validator/AccompanyingPeriod/LocationValidityValidatorTest.php @@ -0,0 +1,122 @@ +getConstraint(); + + $period = new AccompanyingPeriod(); + $person = new Person(); + $period->addPerson($person); + + $period->setPersonLocation($person); + + $this->validator->validate($period, $constraint); + + $this->assertNoViolation(); + } + + public function testPeriodDoesNotContainsPersonOnRemovedPerson() + { + $constraint = $this->getConstraint(); + + $period = new AccompanyingPeriod(); + $person1 = new Person(); + $period->addPerson($person1); + + $period->setPersonLocation($person1); + + $period->removePerson($person1); + + $this->validator->validate($period, $constraint); + + $this->buildViolation('messagePersonLocatedMustBeAssociated') + ->setParameters([ + '{{ person_name }}' => 'name' + ]) + ->assertRaised() + ; + } + + public function testPeriodDoesNotContainsPersonOnOtherPerson() + { + $constraint = $this->getConstraint(); + + $period = new AccompanyingPeriod(); + $person1 = new Person(); + $person2 = new Person(); + $period->addPerson($person1); + + $period->setPersonLocation($person2); + + $this->validator->validate($period, $constraint); + + $this->buildViolation('messagePersonLocatedMustBeAssociated') + ->setParameters([ + '{{ person_name }}' => 'name' + ]) + ->assertRaised() + ; + } + + public function testPeriodDoesNotContainsPersonOnAnyPerson() + { + $constraint = $this->getConstraint(); + + $period = new AccompanyingPeriod(); + $person1 = new Person(); + $period->setPersonLocation($person1); + + $this->validator->validate($period, $constraint); + + $this->buildViolation('messagePersonLocatedMustBeAssociated') + ->setParameters([ + '{{ person_name }}' => 'name' + ]) + ->assertRaised() + ; + } + + public function testRemoveLocationOnPeriodValidated() + { + $constraint = $this->getConstraint(); + + $period = new AccompanyingPeriod(); + $period->setStep('not draft'); + + $this->validator->validate($period, $constraint); + + $this->buildViolation('messagePeriodMustRemainsLocated') + ->assertRaised() + ; + } + + protected function getConstraint() + { + return new LocationValidity([ + 'messagePersonLocatedMustBeAssociated' => 'messagePersonLocatedMustBeAssociated', + 'messagePeriodMustRemainsLocated' => 'messagePeriodMustRemainsLocated' + ]); + } + + protected function createValidator() + { + $render= $this->createMock(PersonRender::class); + $render->method('renderString') + ->willReturn('name') + ; + + return new LocationValidityValidator($render); + } + +} diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidity.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidity.php index 9a64b3cf6..75c10ca75 100644 --- a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidity.php +++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidity.php @@ -11,7 +11,7 @@ class LocationValidity extends Constraint { public $messagePersonLocatedMustBeAssociated = "The person where the course is located must be associated to the course. Change course's location before removing the person."; - public $messagPeriodMustRemainsLocated = "The period must remains located"; + public $messagePeriodMustRemainsLocated = "The period must remains located"; public function getTargets() { diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidityValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidityValidator.php index 3a0b1a3b3..a92120f2d 100644 --- a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidityValidator.php +++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidityValidator.php @@ -42,10 +42,12 @@ class LocationValidityValidator extends ConstraintValidator if ($period->getStep() !== AccompanyingPeriod::STEP_DRAFT && $period->getLocationStatus() === 'none') { - $this->context->buildViolation($constraint->messagePeriodMustRemainsLocated - ->addViolation() - ; - + $this->context + ->buildViolation( + $constraint->messagePeriodMustRemainsLocated + ) + ->addViolation() + ; } } From c420d2bfd76392aae2f35fa766be8036a70635a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 29 Jul 2021 12:24:22 +0200 Subject: [PATCH 069/100] Add address suggestion for a person --- .../Controller/PersonApiController.php | 38 +++++++++++++++++++ .../Controller/PersonApiControllerTest.php | 27 +++++++++++++ .../ChillPersonBundle/chill.api.specs.yaml | 29 +++++++++++++- 3 files changed, 92 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonApiController.php b/src/Bundle/ChillPersonBundle/Controller/PersonApiController.php index 9db1854fc..62b61a942 100644 --- a/src/Bundle/ChillPersonBundle/Controller/PersonApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/PersonApiController.php @@ -18,12 +18,15 @@ namespace Chill\PersonBundle\Controller; use Chill\PersonBundle\Security\Authorization\PersonVoter; +use Chill\PersonBundle\Entity\Person; use Chill\MainBundle\Security\Authorization\AuthorizationHelper; use Symfony\Component\Security\Core\Role\Role; use Chill\MainBundle\CRUD\Controller\ApiController; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Chill\MainBundle\Entity\Address; +use Symfony\Component\Routing\Annotation\Route; +use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; class PersonApiController extends ApiController { @@ -54,4 +57,39 @@ class PersonApiController extends ApiController return $this->addRemoveSomething('address', $id, $request, $_format, 'address', Address::class, [ 'groups' => [ 'read' ] ]); } + /** + * @Route("/api/1.0/person/address/suggest/by-person/{person_id}.{_format}", + * name="chill_person_address_suggest_by_person", + * requirements={ + * "_format"="json" + * } + * ) + * @ParamConverter("person", options={"id" = "person_id"}) + */ + public function suggestAddress(Person $person, Request $request, string $_format): Response + { + $this->denyAccessUnlessGranted(PersonVoter::SEE, $person); + + $addresses = []; + // collect addresses from location in courses + foreach ($person->getAccompanyingPeriodParticipations() as $participation) { + if (null !== $participation->getAccompanyingPeriod()->getAddressLocation()) { + $a = $participation->getAccompanyingPeriod()->getAddressLocation(); + $addresses[$a->getId()] = $a; + } + if (null !== $participation->getAccompanyingPeriod()->getPersonLocation()) { + $a = $participation->getAccompanyingPeriod()->getAddressLocation(); + $addresses[$a->getId()] = $a; + } + } + + \array_unique($addresses); + // remove the actual address + $actual = $person->getCurrentHouseholdAddress(); + if (null !== $actual) { + $addresses = \array_filter($addresses, fn($a) => $a !== $actual); + } + + return $this->json(\array_values($addresses), Response::HTTP_OK, [], [ 'groups' => [ 'read' ]]); + } } diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonApiControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonApiControllerTest.php index d261f4294..23890cdb9 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonApiControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonApiControllerTest.php @@ -45,6 +45,31 @@ class PersonApiControllerTest extends WebTestCase $this->assertEquals($personId, $data['id']); } + /** + * @dataProvider dataGetPersonFromCenterA + */ + public function testPersonAddressSuggestion($personId): void + { + $client = $this->getClientAuthenticated(); + + $client->request(Request::METHOD_GET, "/api/1.0/person/address/suggest/by-person/{$personId}.json"); + + $this->assertResponseIsSuccessful(); + } + + /** + * @dataProvider dataGetPersonFromCenterB + */ + public function testPersonAddressSuggestionUnauthorized($personId): void + { + $client = $this->getClientAuthenticated(); + + $client->request(Request::METHOD_GET, "/api/1.0/person/address/suggest/by-person/{$personId}.json"); + $response = $client->getResponse(); + + $this->assertEquals(403, $response->getStatusCode()); + } + public function dataGetPersonFromCenterA(): \Iterator { self::bootKernel(); @@ -61,6 +86,8 @@ class PersonApiControllerTest extends WebTestCase yield \array_pop($personIds); yield \array_pop($personIds); + yield \array_pop($personIds); + yield \array_pop($personIds); } public function dataGetPersonFromCenterB(): \Iterator diff --git a/src/Bundle/ChillPersonBundle/chill.api.specs.yaml b/src/Bundle/ChillPersonBundle/chill.api.specs.yaml index 71d5c119e..e89088c86 100644 --- a/src/Bundle/ChillPersonBundle/chill.api.specs.yaml +++ b/src/Bundle/ChillPersonBundle/chill.api.specs.yaml @@ -354,10 +354,35 @@ paths: description: "OK" 422: description: "Unprocessable entity (validation errors)" - 400: - description: "transition cannot be applyed" + /1.0/person/address/suggest/by-person/{id}.json: + get: + tags: + - address + summary: get a list of suggested address for a person + description: > + The address are computed from various source. Currently: + + - the address of course to which the person is participating + + The current person's address is always ignored. + parameters: + - name: id + in: path + required: true + description: The person id + schema: + type: integer + format: integer + minimum: 1 + responses: + 401: + description: "Unauthorized" + 404: + description: "Not found" + 200: + description: "OK" /1.0/person/accompanying-course/{id}.json: get: From 72a1ac02eb4a49a6933192f1f15c931db932fb69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 29 Jul 2021 16:01:17 +0200 Subject: [PATCH 070/100] add address suggestion by household --- .../Controller/HouseholdApiController.php | 43 +++++++++++++++++ .../Controller/PersonApiController.php | 10 ++-- .../Controller/HouseholdApiControllerTest.php | 46 ++++++++++++++++++- .../ChillPersonBundle/chill.api.specs.yaml | 28 +++++++++++ 4 files changed, 122 insertions(+), 5 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Controller/HouseholdApiController.php b/src/Bundle/ChillPersonBundle/Controller/HouseholdApiController.php index 1e15490dc..0bb804689 100644 --- a/src/Bundle/ChillPersonBundle/Controller/HouseholdApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/HouseholdApiController.php @@ -6,10 +6,12 @@ use Chill\MainBundle\CRUD\Controller\ApiController; use Chill\MainBundle\Entity\Address; use Chill\MainBundle\Serializer\Model\Collection; use Chill\PersonBundle\Entity\Person; +use Chill\PersonBundle\Entity\Household\Household; use Chill\PersonBundle\Repository\Household\HouseholdRepository; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; +use Symfony\Component\Routing\Annotation\Route; class HouseholdApiController extends ApiController { @@ -50,4 +52,45 @@ class HouseholdApiController extends ApiController return $this->json($collection, Response::HTTP_OK, [], [ "groups" => ["read"]]); } + + /** + * @Route("/api/1.0/person/address/suggest/by-household/{household_id}.{_format}", + * name="chill_person_address_suggest_by_household", + * requirements={ + * "_format"="json" + * } + * ) + * @ParamConverter("household", options={"id" = "household_id"}) + */ + public function suggestAddressByHousehold(Household $household, string $_format) + { + // TODO add acl + + $addresses = []; + // collect addresses from location in courses + foreach ($household->getCurrentPersons() as $person) { + foreach ($person->getAccompanyingPeriodParticipations() as $participation) { + if (null !== $participation->getAccompanyingPeriod()->getAddressLocation()) { + $a = $participation->getAccompanyingPeriod()->getAddressLocation(); + $addresses[$a->getId()] = $a; + } + if (null !== $personLocation = $participation + ->getAccompanyingPeriod()->getPersonLocation()) { + $a = $personLocation->getCurrentHouseholdAddress(); + if (null !== $a) { + $addresses[$a->getId()] = $a; + } + } + } + } + + // remove the actual address + $actual = $household->getCurrentAddress(); + if (null !== $actual) { + $addresses = \array_filter($addresses, fn($a) => $a !== $actual); + } + + return $this->json(\array_values($addresses), Response::HTTP_OK, [], + [ 'groups' => [ 'read' ] ]); + } } diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonApiController.php b/src/Bundle/ChillPersonBundle/Controller/PersonApiController.php index 62b61a942..b3f4087eb 100644 --- a/src/Bundle/ChillPersonBundle/Controller/PersonApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/PersonApiController.php @@ -77,13 +77,15 @@ class PersonApiController extends ApiController $a = $participation->getAccompanyingPeriod()->getAddressLocation(); $addresses[$a->getId()] = $a; } - if (null !== $participation->getAccompanyingPeriod()->getPersonLocation()) { - $a = $participation->getAccompanyingPeriod()->getAddressLocation(); - $addresses[$a->getId()] = $a; + if (null !== $personLocation = $participation + ->getAccompanyingPeriod()->getPersonLocation()) { + $a = $personLocation->getCurrentHouseholdAddress(); + if (null !== $a) { + $addresses[$a->getId()] = $a; + } } } - \array_unique($addresses); // remove the actual address $actual = $person->getCurrentHouseholdAddress(); if (null !== $actual) { diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php index f6adc5d01..273824782 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php @@ -4,6 +4,7 @@ namespace Chill\PersonBundle\Tests\Controller; use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\MainBundle\Test\PrepareClientTrait; +use Chill\PersonBundle\Entity\Household\Household; use Symfony\Component\HttpFoundation\Request; use Doctrine\ORM\EntityManagerInterface; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -29,6 +30,21 @@ class HouseholdApiControllerTest extends WebTestCase $this->assertResponseIsSuccessful(); } + /** + * @dataProvider generateHouseholdId + */ + public function testSuggestAddressByHousehold(int $householdId) + { + $client = $this->getClientAuthenticated(); + + $client->request( + Request::METHOD_GET, + "/api/1.0/person/address/suggest/by-household/{$householdId}.json" + ); + + $this->assertResponseIsSuccessful(); + } + public function generatePersonId() { self::bootKernel(); @@ -51,5 +67,33 @@ class HouseholdApiControllerTest extends WebTestCase ->first()->getPerson(); yield [ $person->getId() ]; - } + } + + public function generateHouseholdId() + { + self::bootKernel(); + + $qb = self::$container->get(EntityManagerInterface::class) + ->createQueryBuilder(); + + $householdIds = $qb + ->select('DISTINCT household.id') + ->from(Household::class, 'household') + ->join('household.members', 'members') + ->join('members.person', 'person') + ->join('person.center', 'center') + ->where($qb->expr()->eq('center.name', ':center_name')) + ->andWhere($qb->expr()->gt('SIZE(person.accompanyingPeriodParticipations)', 0)) + ->setParameter('center_name', 'Center A') + ->setMaxResults(100) + ->getQuery() + ->getResult() + ; + + \shuffle($householdIds); + + yield [ \array_pop($householdIds)['id'] ]; + yield [ \array_pop($householdIds)['id'] ]; + yield [ \array_pop($householdIds)['id'] ]; + } } diff --git a/src/Bundle/ChillPersonBundle/chill.api.specs.yaml b/src/Bundle/ChillPersonBundle/chill.api.specs.yaml index e89088c86..0684a352c 100644 --- a/src/Bundle/ChillPersonBundle/chill.api.specs.yaml +++ b/src/Bundle/ChillPersonBundle/chill.api.specs.yaml @@ -384,6 +384,34 @@ paths: 200: description: "OK" + /1.0/person/address/suggest/by-household/{id}.json: + get: + tags: + - address + summary: get a list of suggested address for a household + description: > + The address are computed from various source. Currently: + + - the address of course to which the members is participating + + The current household address is always ignored. + parameters: + - name: id + in: path + required: true + description: The household id + schema: + type: integer + format: integer + minimum: 1 + responses: + 401: + description: "Unauthorized" + 404: + description: "Not found" + 200: + description: "OK" + /1.0/person/accompanying-course/{id}.json: get: tags: From 2f699d32b0ca14bcc08d089c341c4aea160d4d93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 30 Jul 2021 13:15:09 +0200 Subject: [PATCH 071/100] create entity and schema --- .../AccompanyingPeriodWork.php | 10 + .../AccompanyingPeriodWorkEvaluation.php | 309 ++++++++++++++++++ ...companyingPeriodWorkEvaluationDocument.php | 122 +++++++ .../migrations/Version20210729163023.php | 45 +++ .../migrations/Version20210730094514.php | 47 +++ 5 files changed, 533 insertions(+) create mode 100644 src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php create mode 100644 src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php create mode 100644 src/Bundle/ChillPersonBundle/migrations/Version20210729163023.php create mode 100644 src/Bundle/ChillPersonBundle/migrations/Version20210730094514.php diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php index e80f37364..c491ee94d 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php @@ -160,12 +160,22 @@ use Symfony\Component\Validator\Constraints as Assert; */ private Collection $persons; + /** + * @var Collection + * @ORM\OneToMany( + * targetEntity=AccompanyingPeriodWorkEvaluation::class, + * mappedBy="accompanyingPeriodWork" + * ) + */ + private Collection $accompanyingPeriodWorkEvaluations; + public function __construct() { $this->goals = new ArrayCollection(); $this->results = new ArrayCollection(); $this->thirdParties = new ArrayCollection(); $this->persons = new ArrayCollection(); + $this->accompanyingPeriodWorkEvaluations = new ArrayCollection(); } public function getId(): ?int diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php new file mode 100644 index 000000000..10d326b9b --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php @@ -0,0 +1,309 @@ +documents = new ArrayCollection(); + } + + /** + * @return int|null + */ + public function getId(): ?int + { + return $this->id; + } + + /** + * @return AccompanyingPeriodWork|null + */ + public function getAccompanyingPeriodWork(): ?AccompanyingPeriodWork + { + return $this->accompanyingPeriodWork; + } + + /** + * @param AccompanyingPeriodWork|null $accompanyingPeriodWork + * @return AccompanyingPeriodWorkEvaluation + */ + public function setAccompanyingPeriodWork(?AccompanyingPeriodWork $accompanyingPeriodWork): AccompanyingPeriodWorkEvaluation + { + $this->accompanyingPeriodWork = $accompanyingPeriodWork; + return $this; + } + + /** + * @return Evaluation|null + */ + public function getEvaluation(): ?Evaluation + { + return $this->evaluation; + } + + /** + * @param Evaluation|null $evaluation + * @return AccompanyingPeriodWorkEvaluation + */ + public function setEvaluation(?Evaluation $evaluation): AccompanyingPeriodWorkEvaluation + { + $this->evaluation = $evaluation; + return $this; + } + + /** + * @return DateTimeImmutable|null + */ + public function getStartDate(): ?DateTimeImmutable + { + return $this->startDate; + } + + /** + * @param DateTimeImmutable|null $startDate + * @return AccompanyingPeriodWorkEvaluation + */ + public function setStartDate(?DateTimeImmutable $startDate): AccompanyingPeriodWorkEvaluation + { + $this->startDate = $startDate; + return $this; + } + + /** + * @return DateTimeImmutable|null + */ + public function getEndDate(): ?DateTimeImmutable + { + return $this->endDate; + } + + /** + * @param DateTimeImmutable|null $endDate + * @return AccompanyingPeriodWorkEvaluation + */ + public function setEndDate(?DateTimeImmutable $endDate): AccompanyingPeriodWorkEvaluation + { + $this->endDate = $endDate; + return $this; + } + + /** + * @return DateTimeImmutable|null + */ + public function getMaxDate(): ?DateTimeImmutable + { + return $this->maxDate; + } + + /** + * @param DateTimeImmutable|null $maxDate + * @return AccompanyingPeriodWorkEvaluation + */ + public function setMaxDate(?DateTimeImmutable $maxDate): AccompanyingPeriodWorkEvaluation + { + $this->maxDate = $maxDate; + return $this; + } + + /** + * @return DateInterval|null + */ + public function getWarningInterval(): ?DateInterval + { + return $this->warningInterval; + } + + /** + * @param DateInterval|null $warningInterval + * @return AccompanyingPeriodWorkEvaluation + */ + public function setWarningInterval(?DateInterval $warningInterval): AccompanyingPeriodWorkEvaluation + { + $this->warningInterval = $warningInterval; + return $this; + } + + /** + * @return string + */ + public function getComment(): string + { + return $this->comment; + } + + /** + * @param string $comment + * @return AccompanyingPeriodWorkEvaluation + */ + public function setComment(string $comment): AccompanyingPeriodWorkEvaluation + { + $this->comment = $comment; + return $this; + } + + /** + * @return User|null + */ + public function getCreatedBy(): ?User + { + return $this->createdBy; + } + + /** + * @param User|null $createdBy + * @return AccompanyingPeriodWorkEvaluation + */ + public function setCreatedBy(?User $createdBy): AccompanyingPeriodWorkEvaluation + { + $this->createdBy = $createdBy; + return $this; + } + + /** + * @return DateTimeImmutable|null + */ + public function getCreatedAt(): ?DateTimeImmutable + { + return $this->createdAt; + } + + /** + * @param DateTimeImmutable|null $createdAt + * @return AccompanyingPeriodWorkEvaluation + */ + public function setCreatedAt(\DateTimeInterface $createdAt): self + { + $this->createdAt = $createdAt; + return $this; + } + + /** + * @return User|null + */ + public function getUpdatedBy(): ?User + { + return $this->updatedBy; + } + + /** + * @param User|null $updatedBy + * @return AccompanyingPeriodWorkEvaluation + */ + public function setUpdatedBy(?User $updatedBy): AccompanyingPeriodWorkEvaluation + { + $this->updatedBy = $updatedBy; + return $this; + } + + /** + * @return DateTimeImmutable|null + */ + public function getUpdatedAt(): ?DateTimeImmutable + { + return $this->updatedAt; + } + + /** + * @param DateTimeImmutable|null $updatedAt + * @return AccompanyingPeriodWorkEvaluation + */ + public function setUpdatedAt(\DateTimeInterface $updatedAt): self + { + $this->updatedAt = $updatedAt; + return $this; + } +} diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php new file mode 100644 index 000000000..620c5bba7 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php @@ -0,0 +1,122 @@ +accompanyingPeriodWorkEvaluation; + } + + /** + * @param AccompanyingPeriodWorkEvaluation|null $accompanyingPeriodWorkEvaluation + * @return AccompanyingPeriodWorkEvaluationDocument + */ + public function setAccompanyingPeriodWorkEvaluation(?AccompanyingPeriodWorkEvaluation $accompanyingPeriodWorkEvaluation): AccompanyingPeriodWorkEvaluationDocument + { + $this->accompanyingPeriodWorkEvaluation = $accompanyingPeriodWorkEvaluation; + return $this; + } + + /** + * @return StoredObject|null + */ + public function getStoredObject(): ?StoredObject + { + return $this->storedObject; + } + + /** + * @param StoredObject|null $storedObject + * @return AccompanyingPeriodWorkEvaluationDocument + */ + public function setStoredObject(?StoredObject $storedObject): AccompanyingPeriodWorkEvaluationDocument + { + $this->storedObject = $storedObject; + return $this; + } + + public function setCreatedBy(User $user): \Chill\MainBundle\Doctrine\Model\TrackCreationInterface + { + $this->createdBy = $user; + return $this; + } + + public function setCreatedAt(\DateTimeInterface $datetime): \Chill\MainBundle\Doctrine\Model\TrackCreationInterface + { + $this->createdAt = $datetime; + return $this; + } + + public function setUpdatedBy(User $user): \Chill\MainBundle\Doctrine\Model\TrackUpdateInterface + { + $this->updatedBy = $user; + return $this; + } + + public function setUpdatedAt(\DateTimeInterface $datetime): \Chill\MainBundle\Doctrine\Model\TrackUpdateInterface + { + $this->updatedAt = $datetime; + return $this; + } + + +} diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20210729163023.php b/src/Bundle/ChillPersonBundle/migrations/Version20210729163023.php new file mode 100644 index 000000000..40fd84266 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/migrations/Version20210729163023.php @@ -0,0 +1,45 @@ +addSql('CREATE SEQUENCE chill_person_accompanying_period_work_evaluation_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE TABLE chill_person_accompanying_period_work_evaluation (id INT NOT NULL, evaluation_id INT DEFAULT NULL, startDate DATE DEFAULT NULL, endDate DATE DEFAULT NULL, maxDate DATE DEFAULT NULL, warningInterval INTERVAL DEFAULT NULL, createdAt DATE DEFAULT NULL, updatedAt DATE DEFAULT NULL, accompanyingPeriodWork_id INT DEFAULT NULL, createdBy_id INT DEFAULT NULL, updatedBy_id INT DEFAULT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE INDEX IDX_741A3A0BC55C1209 ON chill_person_accompanying_period_work_evaluation (accompanyingPeriodWork_id)'); + $this->addSql('CREATE INDEX IDX_741A3A0B456C5646 ON chill_person_accompanying_period_work_evaluation (evaluation_id)'); + $this->addSql('CREATE INDEX IDX_741A3A0B3174800F ON chill_person_accompanying_period_work_evaluation (createdBy_id)'); + $this->addSql('CREATE INDEX IDX_741A3A0B65FF1AEC ON chill_person_accompanying_period_work_evaluation (updatedBy_id)'); + $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work_evaluation.startDate IS \'(DC2Type:date_immutable)\''); + $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work_evaluation.endDate IS \'(DC2Type:date_immutable)\''); + $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work_evaluation.maxDate IS \'(DC2Type:date_immutable)\''); + $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work_evaluation.warningInterval IS \'(DC2Type:dateinterval)\''); + $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work_evaluation.createdAt IS \'(DC2Type:date_immutable)\''); + $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work_evaluation.updatedAt IS \'(DC2Type:date_immutable)\''); + $this->addSql('ALTER TABLE chill_person_accompanying_period_work_evaluation ADD CONSTRAINT FK_741A3A0BC55C1209 FOREIGN KEY (accompanyingPeriodWork_id) REFERENCES chill_person_accompanying_period_work (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_person_accompanying_period_work_evaluation ADD CONSTRAINT FK_741A3A0B456C5646 FOREIGN KEY (evaluation_id) REFERENCES chill_person_social_work_evaluation (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_person_accompanying_period_work_evaluation ADD CONSTRAINT FK_741A3A0B3174800F FOREIGN KEY (createdBy_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_person_accompanying_period_work_evaluation ADD CONSTRAINT FK_741A3A0B65FF1AEC FOREIGN KEY (updatedBy_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + } + + public function down(Schema $schema): void + { + $this->addSql('DROP SEQUENCE chill_person_accompanying_period_work_evaluation_id_seq CASCADE'); + $this->addSql('DROP TABLE chill_person_accompanying_period_work_evaluation'); + } +} diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20210730094514.php b/src/Bundle/ChillPersonBundle/migrations/Version20210730094514.php new file mode 100644 index 000000000..2748be7fd --- /dev/null +++ b/src/Bundle/ChillPersonBundle/migrations/Version20210730094514.php @@ -0,0 +1,47 @@ +addSql('CREATE SEQUENCE chill_person_accompanying_period_work_evaluation_document_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE TABLE chill_person_accompanying_period_work_evaluation_document (id INT NOT NULL, createdAt DATE DEFAULT NULL, updatedAt DATE DEFAULT NULL, accompanyingPeriodWorkEvaluation_id INT DEFAULT NULL, createdBy_id INT DEFAULT NULL, updatedBy_id INT DEFAULT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE INDEX IDX_33EC9229836F75B8 ON chill_person_accompanying_period_work_evaluation_document (accompanyingPeriodWorkEvaluation_id)'); + $this->addSql('CREATE INDEX IDX_33EC92293174800F ON chill_person_accompanying_period_work_evaluation_document (createdBy_id)'); + $this->addSql('CREATE INDEX IDX_33EC922965FF1AEC ON chill_person_accompanying_period_work_evaluation_document (updatedBy_id)'); + $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work_evaluation_document.createdAt IS \'(DC2Type:date_immutable)\''); + $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work_evaluation_document.updatedAt IS \'(DC2Type:date_immutable)\''); + $this->addSql('ALTER TABLE chill_person_accompanying_period_work_evaluation_document ADD CONSTRAINT FK_33EC9229836F75B8 FOREIGN KEY (accompanyingPeriodWorkEvaluation_id) REFERENCES chill_person_accompanying_period_work_evaluation (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_person_accompanying_period_work_evaluation_document ADD CONSTRAINT FK_33EC92293174800F FOREIGN KEY (createdBy_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_person_accompanying_period_work_evaluation_document ADD CONSTRAINT FK_33EC922965FF1AEC FOREIGN KEY (updatedBy_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work.startDate IS \'(DC2Type:date_immutable)\''); + $this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_work.endDate IS \'(DC2Type:date_immutable)\''); + $this->addSql('ALTER TABLE chill_person_accompanying_period_work ADD CONSTRAINT FK_B694FB365FF1AEC FOREIGN KEY (updatedBy_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('CREATE INDEX IDX_B694FB365FF1AEC ON chill_person_accompanying_period_work (updatedBy_id)'); + } + + public function down(Schema $schema): void + { + $this->addSql('COMMENT ON COLUMN chill_calendar.calendar_range.startdate IS \'(DC2Type:datetimetz_immutable)\''); + $this->addSql('COMMENT ON COLUMN chill_calendar.calendar_range.enddate IS \'(DC2Type:datetimetz_immutable)\''); + $this->addSql('DROP TABLE chill_person_accompanying_period_work_evaluation_document'); + $this->addSql('DROP SEQUENCE chill_person_accompanying_period_work_evaluation_document_id_seq'); + $this->addSql('ALTER TABLE chill_person_accompanying_period_work DROP CONSTRAINT FK_B694FB365FF1AEC'); + $this->addSql('DROP INDEX IDX_B694FB365FF1AEC'); + } +} From 8a962a4f1cc6d240c397fdcf6e68253ff04a24d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 30 Jul 2021 14:40:06 +0200 Subject: [PATCH 072/100] refactor loading for social issues using real data --- .../DataFixtures/ORM/LoadPeople.php | 51 ++- .../DataFixtures/ORM/LoadSocialActions.php | 82 ---- .../DataFixtures/ORM/LoadSocialGoals.php | 70 --- .../DataFixtures/ORM/LoadSocialIssues.php | 90 ---- .../DataFixtures/ORM/LoadSocialResults.php | 94 ---- .../ORM/LoadSocialWorkMetadata.php | 44 ++ .../ORM/data/social_work_metadata.csv | 420 ++++++++++++++++++ .../AccompanyingPeriodWorkEvaluation.php | 2 +- 8 files changed, 504 insertions(+), 349 deletions(-) delete mode 100644 src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadSocialActions.php delete mode 100644 src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadSocialGoals.php delete mode 100644 src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadSocialIssues.php delete mode 100644 src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadSocialResults.php create mode 100644 src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadSocialWorkMetadata.php create mode 100644 src/Bundle/ChillPersonBundle/DataFixtures/ORM/data/social_work_metadata.csv diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadPeople.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadPeople.php index 556d832c1..fbb66b6bb 100644 --- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadPeople.php +++ b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadPeople.php @@ -22,14 +22,20 @@ namespace Chill\PersonBundle\DataFixtures\ORM; use Chill\PersonBundle\Entity\AccompanyingPeriod; +use Chill\PersonBundle\Entity\SocialWork\SocialIssue; use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\DataFixtures\OrderedFixtureInterface; use Doctrine\Persistence\ObjectManager; use Chill\PersonBundle\Entity\Person; +use Faker\Factory; +use Faker\Generator; use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Chill\MainBundle\DataFixtures\ORM\LoadPostalCodes; use Chill\MainBundle\Entity\Address; use Chill\MainBundle\Doctrine\Model\Point; +use Symfony\Component\Workflow\Registry; +use Symfony\Component\Workflow\Workflow; +use Chill\PersonBundle\Repository\SocialWork\SocialIssueRepository; /** * Load people into database @@ -39,14 +45,21 @@ use Chill\MainBundle\Doctrine\Model\Point; */ class LoadPeople extends AbstractFixture implements OrderedFixtureInterface, ContainerAwareInterface { - use \Symfony\Component\DependencyInjection\ContainerAwareTrait; - protected $faker; + protected Generator $faker; - public function __construct() + protected Registry $workflowRegistry; + + protected SocialIssueRepository $socialIssueRepository; + + protected array $cacheSocialIssues = array(); + + public function __construct(Registry $workflowRegistry, SocialIssueRepository $socialIssueRepository) { - $this->faker = \Faker\Factory::create('fr_FR'); + $this->faker = Factory::create('fr_FR'); + $this->workflowRegistry = $workflowRegistry; + $this->socialIssueRepository = $socialIssueRepository; } public function prepare() @@ -165,7 +178,7 @@ class LoadPeople extends AbstractFixture implements OrderedFixtureInterface, Con 'Birthdate' => "1960-10-12", 'PlaceOfBirth' => "Ottignies Louvain-La-Neuve", 'Gender' => Person::MALE_GENDER, - 'Email' => "Email d'un ami: roger@tt.com", + 'Email' => "roger@yopmail.com", 'CountryOfBirth' => 'BE', 'Nationality' => 'BE', 'CFData' => array(), @@ -173,6 +186,15 @@ class LoadPeople extends AbstractFixture implements OrderedFixtureInterface, Con ), $specific); } + private function getRandomSocialIssue(): SocialIssue + { + if (0 === count($this->cacheSocialIssues)) { + $this->cacheSocialIssues = $this->socialIssueRepository->findAll(); + } + + return $this->cacheSocialIssues[\array_rand($this->cacheSocialIssues)]; + } + /** * create a new person from array data * @@ -183,14 +205,19 @@ class LoadPeople extends AbstractFixture implements OrderedFixtureInterface, Con private function addAPerson(array $person, ObjectManager $manager) { $p = new Person(); - $p->addAccompanyingPeriod( - new AccompanyingPeriod( - (new \DateTime()) - ->sub( - new \DateInterval('P'.\random_int(0, 180).'D') - ) - ) + $accompanyingPeriod = new AccompanyingPeriod( + (new \DateTime()) + ->sub( + new \DateInterval('P' . \random_int(0, 180) . 'D') + ) ); + $p->addAccompanyingPeriod($accompanyingPeriod); + $accompanyingPeriod->addSocialIssue($this->getRandomSocialIssue()); + + if (\random_int(0, 10) > 3) { + $workflow = $this->workflowRegistry->get($accompanyingPeriod); + $workflow->apply($accompanyingPeriod, 'confirm'); + } foreach ($person as $key => $value) { switch ($key) { diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadSocialActions.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadSocialActions.php deleted file mode 100644 index ec47c6e0b..000000000 --- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadSocialActions.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -namespace Chill\PersonBundle\DataFixtures\ORM; - -use Doctrine\Common\DataFixtures\AbstractFixture; -use Doctrine\Common\DataFixtures\OrderedFixtureInterface; -use Doctrine\Persistence\ObjectManager; - -use Chill\PersonBundle\Entity\SocialWork\SocialAction; - -/** - * Create social actions - * - */ -class LoadSocialActions extends AbstractFixture implements OrderedFixtureInterface -{ - public function getOrder() - { - return 10020; - } - - public static $socialActions = [ - 'social_action_info_conseil' => [ - 'title' => [ - 'fr' => 'Informer, conseiller' - ], - 'issue' => 'social_issue_prev_prot' - ], - 'social_action_instruire' => [ - 'title' => [ - 'fr' => 'Instruire l\'imprime unique pour des impayés' - ], - 'issue' => 'social_issue_prev_prot' - ], - 'social_action_MASP' => [ - 'title' => [ - 'fr' => 'MASP' - ], - 'issue' => 'social_issue_diff_fin' - ], - 'social_action_protection_enfant' => [ - 'title' => [ - 'fr' => 'Protection Enfant confié dans le cadre judiciaire' - ], - 'issue' => 'social_issue_enfant_protection' - ], - ]; - - public function load(ObjectManager $manager) - { - foreach (static::$socialActions as $ref => $new) { - $socialAction = new SocialAction(); - $socialAction->setTitle($new['title']); - $socialAction->setIssue($this->getReference($new['issue'])); - $socialAction->setDefaultNotificationDelay(new \DateInterval('P5D')); - - $manager->persist($socialAction); - $this->addReference($ref, $socialAction); - print("Adding SocialAction '".$new['title']['fr']."'\n"); - } - - $manager->flush(); - } -} diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadSocialGoals.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadSocialGoals.php deleted file mode 100644 index a6c2b0ef0..000000000 --- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadSocialGoals.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -namespace Chill\PersonBundle\DataFixtures\ORM; - -use Doctrine\Common\DataFixtures\AbstractFixture; -use Doctrine\Common\DataFixtures\OrderedFixtureInterface; -use Doctrine\Persistence\ObjectManager; - -use Chill\PersonBundle\Entity\SocialWork\Goal; - - -/** - * Create social goals - * - */ -class LoadSocialGoals extends AbstractFixture implements OrderedFixtureInterface -{ - public function getOrder() - { - return 10030; - } - - public static $socialGoals = [ - 'social_goal_instuire_dossier' => [ - 'title' => [ - 'fr' => 'Instruire le dossier de surendettement' - ], - 'action' => 'social_action_MASP' - ], - 'social_goal_proteger' => [ - 'title' => [ - 'fr' => 'Protéger via une assistance educative placement' - ], - 'action' => 'social_action_protection_enfant' - ], - ]; - - public function load(ObjectManager $manager) - { - foreach (static::$socialGoals as $ref => $new) { - $socialGoal = new Goal(); - $socialGoal->setTitle($new['title']); - $socialGoal->addSocialAction($this->getReference($new['action'])); - - $manager->persist($socialGoal); - $this->addReference($ref, $socialGoal); - print("Adding SocialGoal '".$new['title']['fr']."'\n"); - } - - $manager->flush(); - } -} diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadSocialIssues.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadSocialIssues.php deleted file mode 100644 index eb9c303ed..000000000 --- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadSocialIssues.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -namespace Chill\PersonBundle\DataFixtures\ORM; - -use Doctrine\Common\DataFixtures\AbstractFixture; -use Doctrine\Common\DataFixtures\OrderedFixtureInterface; -use Doctrine\Persistence\ObjectManager; - -use Chill\PersonBundle\Entity\SocialWork\SocialIssue; - -/** - * Create social issues - * - */ -class LoadSocialIssues extends AbstractFixture implements OrderedFixtureInterface -{ - public function getOrder() - { - return 10010; - } - - public static $socialIssues = [ - 'social_issue_diff_fin_or_admin' => [ - 'title' => [ - 'fr' => 'ADULTE - DIFFICULTES FINANCIERES ET/OU ADMINISTRATIVES' - ] - ], - 'social_issue_prev_prot' => [ - 'title' => [ - 'fr' => 'ADULTE PREVENTION/PROTECTION' - ], - 'parent' => 'social_issue_diff_fin_or_admin' - ], - 'social_issue_diff_fin' => [ - 'title' => [ - 'fr' => 'Difficulté financière' - ], - 'parent' => 'social_issue_diff_fin_or_admin' - ], - 'social_issue_enfant_famille' => [ - 'title' => [ - 'fr' => 'Enfant / famille' - ] - ], - 'social_issue_enfant_protection' => [ - 'title' => [ - 'fr' => 'enfant - protection' - ], - 'parent' => 'social_issue_enfant_famille' - ], - ]; - - public function load(ObjectManager $manager) - { - foreach (static::$socialIssues as $ref => $new) { - $socialIssue = new SocialIssue(); - $socialIssue->setTitle($new['title']); - - if ( array_key_exists('parent', $new)) { - $parentRef = $new['parent']; - $parent = $this->getReference($parentRef); - $socialIssue->setParent($parent); - } - - $manager->persist($socialIssue); - $this->addReference($ref, $socialIssue); - print("Adding SocialIssue '".$new['title']['fr']."'\n"); - } - - $manager->flush(); - } -} diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadSocialResults.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadSocialResults.php deleted file mode 100644 index 573313573..000000000 --- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadSocialResults.php +++ /dev/null @@ -1,94 +0,0 @@ - - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -namespace Chill\PersonBundle\DataFixtures\ORM; - -use Doctrine\Common\DataFixtures\AbstractFixture; -use Doctrine\Common\DataFixtures\OrderedFixtureInterface; -use Doctrine\Persistence\ObjectManager; - -use Chill\PersonBundle\Entity\SocialWork\Result; - - -/** - * Create social results - * - */ -class LoadSocialResults extends AbstractFixture implements OrderedFixtureInterface -{ - public function getOrder() - { - return 10040; - } - - public static $socialResults = [ - 'social_result_FSL_acces' => [ - 'title' => [ - 'fr' => 'FSL - accès cautionnement' - ], - 'action' => 'social_action_instruire' - ], - 'social_result_FSL_maintien' => [ - 'title' => [ - 'fr' => 'FSL maintien - impayés de loyer' - ], - 'action' => 'social_action_MASP' - ], - 'social_result_soutien_parental' => [ - 'title' => [ - 'fr' => 'Soutien parental' - ], - // 'action' => 'social_action_protection_enfant', (via le goal) - 'goal' => 'social_goal_proteger' - ], - 'social_result_accompagnement_mineur' => [ - 'title' => [ - 'fr' => 'Accompagnement du mineur' - ], - // 'action' => 'social_action_protection_enfant', (via le goal) - 'goal' => 'social_goal_proteger', - ], - ]; - - public function load(ObjectManager $manager) - { - foreach (static::$socialResults as $ref => $new) { - $socialResult = new Result(); - $socialResult->setTitle($new['title']); - - if ( array_key_exists('action', $new)) { - $action = $this->getReference($new['action']); - $socialResult->addSocialAction($action); - } - - if ( array_key_exists('goal', $new)) { - $goal = $this->getReference($new['goal']); - $socialResult->addGoal($goal); - } - - - $manager->persist($socialResult); - $this->addReference($ref, $socialResult); - print("Adding SocialResult '".$new['title']['fr']."'\n"); - } - - $manager->flush(); - } -} diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadSocialWorkMetadata.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadSocialWorkMetadata.php new file mode 100644 index 000000000..f96fb5fc2 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadSocialWorkMetadata.php @@ -0,0 +1,44 @@ +importer = $importer; + } + + /** + * @inheritDoc + */ + public function load(ObjectManager $manager) + { + try { + $csv = Reader::createFromPath(__DIR__.'/data/social_work_metadata.csv'); + } catch (Throwable $e) { + throw new Exception('Error while loading CSV.',0, $e); + } + + $csv->setDelimiter(";"); + + $this->importer->import($csv); + } + + /** + * @inheritDoc + */ + public function getOrder() + { + return 9500; + } +} diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/data/social_work_metadata.csv b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/data/social_work_metadata.csv new file mode 100644 index 000000000..546194f33 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/data/social_work_metadata.csv @@ -0,0 +1,420 @@ +AD - PREVENTION, ACCES AUX DROITS, BUDGET;ACCES AUX DROITS;Informer, conseiller;;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;ACCES AUX DROITS;Aider à l'inclusion numérique;;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;ACCES AUX DROITS;Demander une aide juridictionnelle;;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;ACCES AUX DROITS;Aider à l'ouverture aux droits;;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;ACCES AUX DROITS;Demander une aide alimentaire;;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Informer, conseiller;;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : Centre Communal d’Action Sociale; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : CAF/MSA - Secours d’urgence; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : CAF/MSA - Aide financière; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : Caisse Primaire d’Assurance Maladie ; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : FSL Maintien - Impayés de loyer; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : FSL Maintien - Énergie / Fluides; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : FSL Maintien - Impayés télécommunication; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : FSL Maintien - Impayés aire d'accueil GDV ; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : FSL Maintien - Lié à la COVID; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : Secours exceptionnels; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Instruire le dossier de surendettement;;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une mesure de protection adulte;;Objectif : Sauvegarde de justice; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une mesure de protection adulte;;Objectif : Mesure d'Accompagnement Judiciaire (MAJ); +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une mesure de protection adulte;;Objectif : Signalement personne vulnérable; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une mesure de protection adulte;;Objectif : Mesure de protection personne majeure (tutelle, curatelle); +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Faire une demande auprès des associations caritatives;;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Instruire des formulaires auprès d'autres organismes (Locapass, Fastt, …);;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Instruire une première demande d'AEB;;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander un renouvellement d'AEB;;Objectif : Dans l'attente d'une mesure de protection ; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander un renouvellement d'AEB;;Objectif : Pour poursuivre les objectifs engagés; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Instruire une première demande de MASP;;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander un renouvellement MASP;;Objectif : Dans l'attente d'une mesure de protection ; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander un renouvellement MASP;;Objectif : Pour poursuivre les objectifs engagés; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Soutenir dans les démarches administratives; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Aider au tri, au classement et à l’archivage des documents administratifs; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Soutenir les ménages dans l’apurement des dettes, accompagner les ménages endettées, surendettées; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Accompagner les ménages dans leur gestion budgétaire; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Aider les ménages à se questionner sur leur mode de consommation; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Assurer une fonction de médiation; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Soutenir les ménages dans les démarches liées au logement; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Aider à l'accès aux droits; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Aider à l'inclusion numérique; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Instruire des formulaires d'autres organismes non référencés…; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Instruire le dossier de surendettement ; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Demander ou renouveler la couverture santé (ACS); +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide alimentaire;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : Centre Communal d’Action Sociale; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : CAF/MSA - Secours d’urgence; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : CAF/MSA - Aide financière; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : Caisse Primaire d’Assurance Maladie ; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Cautionnement; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Dépôt de garantie; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - 1er loyer; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Frais d’agence; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Assurances; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Déménagement; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Aide à l’installation; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Facture résiliation énergie (nv logement); +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Impayés de loyer; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Énergie / Fluides; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Impayés télécommunication; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Impayés aire d'accueil GDV ; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Lié à la COVID; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : Secours exceptionnels; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : Mesure ASLL; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Faire une demande auprès de Association caritative;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une mesure de protection ;Objectif : Sauvegarde de justice; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une mesure de protection ;Objectif : Signalement personne vulnérable; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une mesure de protection ;Objectif : Mesure de protection personne majeure (tutelle, curatelle); +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une mesure de protection ;Objectif : Mesure d'Accompagnement Judiciaire (MAJ); +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une mesure de protection ;Objectif : Mesure Judiciaire d'Aide à la Gestion du Budget Familial (MJAGBF); +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Arrêt à l'initiative du ménage pour déménagement +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Suspension momentanée de l'accompagnement par le ménage ou le professionnel +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Arrêt pour absence d'adhésion +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Arrêt à l'initiative du ménage pour séparation +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Arrêt à l'initiative du professionnel pour absence d'avancée +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Retour à l'autonomie +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Transmission pour mesure judiciaire d'aide à la gestion du budget familial +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Orientation vers une MASP +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Transmission pour une mesure d'accompagnement judiciaire +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Renouvellement de l'AEB dans l'attente d'une mesure de protection +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Renouvellement de l'AEB pour poursuivre les objectifs engagés +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Soutenir dans les démarches administratives; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Aider au tri, au classement et à l’archivage des documents administratifs; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Soutenir les ménages dans l’apurement des dettes, accompagner les ménages endettées, surendettées; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Accompagner les ménages dans leur gestion budgétaire; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Aider les ménages à se questionner sur leur mode de consommation; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Assurer une fonction de médiation; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Soutenir les ménages dans les démarches liées au logement; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Aider à l'accès aux droits; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Aider à l'inclusion numérique; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Instruire des formulaires d'autres organismes non référencés…; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Instruire le dossier de surendettement ; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Demander ou renouveler la couverture santé (ACS); +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide alimentaire;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : Centre Communal d’Action Sociale; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : CAF/MSA - Secours d’urgence; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : CAF/MSA - Aide financière; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : Caisse Primaire d’Assurance Maladie ; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Cautionnement; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Dépôt de garantie; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - 1er loyer; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Frais d’agence; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Assurances; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Déménagement; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Aide à l’installation; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Facture résiliation énergie (nv logement); +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Impayés de loyer; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Énergie / Fluides; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Impayés télécommunication; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Impayés aire d'accueil GDV ; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Lié à la COVID; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : Secours exceptionnels; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : Mesure ASLL; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une mesure de protection adulte;Objectif : Sauvegarde de justice; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une mesure de protection adulte;Objectif : Signalement personne vulnérable; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une mesure de protection adulte;Objectif : Mesure de protection personne majeure (tutelle, curatelle); +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une mesure de protection adulte;Objectif : Mesure d'Accompagnement Judiciaire (MAJ); +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une mesure de protection adulte;Objectif : Mesure Judiciaire d'Aide à la Gestion du Budget Familial (MJAGBF); +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Arrêt à l'initiative du ménage pour déménagement +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Suspension momentanée de l'accompagnement par le ménage ou le professionnel +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Arrêt pour absence d'adhésion +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Arrêt à l'initiative du ménage pour séparation +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Arrêt à l'initiative du professionnel pour absence d'avancée +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Retour à l'autonomie +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Transmission pour mesure judiciaire d'aide à la gestion du budget familial +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Transmission pour une mesure d'accompagnement judiciaire +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Renouvellement de MASP dans l'attente d'une mesure de protection +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Renouvellement de MASP pour poursuivre les objectifs engagés +AD - LOGEMENT;ACCES LOGEMENT (RE);Informer, conseiller;;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - Cautionnement; +AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - Dépôt de garantie; +AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - 1er loyer; +AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - Frais d’agence; +AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - Assurances; +AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - Déménagement; +AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - Aide à l’installation; +AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - Facture résiliation énergie (nv logement); +AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - Mesure ASLL; +AD - LOGEMENT;ACCES LOGEMENT (RE);Demander auprès des Bailleurs sociaux, mairies, partenaires;;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Instruire une demande DALO, DAHO;;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Instruire une demande SIAO;;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Instruire une demande ASLL;;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Instruire une demande au Contingent préfectoral;;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Instruire une demande au 115;;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Intervenir au commandement de payer; +AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Instruire la fiche Assignation; +AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Répondre au commandement de quitter les lieux; +AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Répondre au concours de la force publique; +AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Demander une aide financière FSL pour impayé de loyer; +AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Déposer un dossier de surendettement; +AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Demander auprès des Bailleurs sociaux, mairies, partenaires; +AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Instruire une demande DALO, DAHO; +AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Instruire une demande SIAO; +AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Instruire une demande ASLL; +AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Instruire une demande au Contingent préfectoral; +AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Instruire une demande au 115; +AD - LOGEMENT;HABITAT INDIGNE;Informer, conseiller;;; +AD - LOGEMENT;HABITAT INDIGNE;Demander une aide pour incurie;;Objectif : FSL maintien - aide incurie; +AD - LOGEMENT;HABITAT INDIGNE;Instruire la grille de signalement;;; +AD - LOGEMENT;HABITAT INDIGNE;Faire intervenir d'autres partenaires;;; +AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Informer, conseiller;;; +AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Demander un accompagnement psychologue insertion;;; +AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Exercer l'accompagnement psychologue insertion;;; +AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Renouveller l'accompagnement psychologue insertion;;; +AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Réorienter l'usager vers autres structures pour un accompagnement psychologique;;; +AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Demander l'accompagnement global;;Objectif : Axe 2; +AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Exercer l'accompagnement global;;Objectif : Axe 2; +AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Renouveller l'accompagnement global;;Objectif : Axe 2; +AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Demander l'accompagnement global;;Objectif : Axe 3 (agent d'insertion); +AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Exercer l'accompagnement global;;Objectif : Axe 3 (agent d'insertion); +AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Renouveller l'accompagnement global;;Objectif : Axe 3 (agent d'insertion); +AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Instruire une demande MOVEA;;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Informer, conseiller;;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;"Aider à l'ouverture de droits +";;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renseigner la plateforme INCLUSION@COM pour les chantiers d'insertion;;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Soutenir le parcours professionnel (emploi, formation, …); +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement global Axe 2 (orientation Pôle Emploi); +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Orienter vers une structure de l'insertion (chantier, AI, ETTI, …); +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Demander la médiation emploi; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Création d'entreprise; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement travailleur non salarié; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement ASR CEIDRE; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Déposer un dossier MDPH; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Déposer un dossier retraite; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Soutenir l'accès au logement; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Accompagner le budget; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Soutenir la mobilité (MOVEA, transport solidaire, PST, …); +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Demander le psychologue insertion; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Etre accompagné dans la parentalité; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Initier ou maintenir un parcours santé (cure, hospitalisation, CMP, …); +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Solliciliter un FAII; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Demander un réorientation Pôle Emploi; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Autre; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Soutenir le parcours professionnel (emploi, formation, …); +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement global Axe 2 (orientation Pôle Emploi); +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Orienter vers une structure de l'insertion (chantier, AI, ETTI, …); +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Demander la médiation emploi; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Création d'entreprise; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement travailleur non salarié; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement ASR CEIDRE; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Déposer un dossier MDPH; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Déposer un dossier retraite; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Soutenir l'accès au logement; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Accompagner le budget; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Soutenir la mobilité (MOVEA, transport solidaire, PST, …); +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Demander le psychologue insertion; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Etre accompagné dans la parentalité; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Initier ou maintenir un parcours santé; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Solliciliter un FAII; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Demander un réorientation Pôle Emploi; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Autre; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Soutenir le parcours professionnel (emploi, formation, …); +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement global Axe 2 (orientation Pôle Emploi); +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Orienter vers une structure de l'insertion (chantier, AI, ETTI, …); +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Demander la médiation emploi; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Création d'entreprise; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement travailleur non salarié; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement ASR CEIDRE; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Déposer un dossier MDPH; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Déposer un dossier retraite; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Soutenir l'accès au logement; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Accompagner le budget; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Soutenir la mobilité (MOVEA, transport solidaire, PST, …); +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Demander le psychologue insertion; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Etre accompagné dans la parentalité; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Initié ou maintenir un parcours santé; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Solliciliter un FAII; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Demander un réorientation Pôle Emploi; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Autre; +AD - INSERTION SOCIALE PROFESSIONNELLE;JEUNES 16/25 AIDE FINANCIERE INSERTION;Informer, conseiller;;; +AD - INSERTION SOCIALE PROFESSIONNELLE;JEUNES 16/25 AIDE FINANCIERE INSERTION;Demander une aide FAJ;;Objectif : SU bons alimentaires; +AD - INSERTION SOCIALE PROFESSIONNELLE;JEUNES 16/25 AIDE FINANCIERE INSERTION;Demander une aide FAJ;;Objectif : SU bons hygiène; +AD - INSERTION SOCIALE PROFESSIONNELLE;JEUNES 16/25 AIDE FINANCIERE INSERTION;Demander une aide FAJ;;Objectif : SU bons carburant; +AD - INSERTION SOCIALE PROFESSIONNELLE;JEUNES 16/25 AIDE FINANCIERE INSERTION;Demander une aide FAJ;;Objectif : SU virement; +AD - INSERTION SOCIALE PROFESSIONNELLE;JEUNES 16/25 AIDE FINANCIERE INSERTION;Solliciter le comité FAJ;;Objectif : Aide financière; +AD - INSERTION SOCIALE PROFESSIONNELLE;JEUNES 16/25 AIDE FINANCIERE INSERTION;Solliciter le comité FAJ;;Objectif : Action d’accompagnement; +AD - SANTE;;Informer, conseiller;;; +AD - SANTE;;Orienter vers une structure de soins (CMP, psychologue, cure, …);;; +AD - SANTE;;Instruire un dossier MDPH;;; +AD - SANTE;;Accompagner le dépôt de dossier de pension d'invalidité;;; +AD - SANTE;;Instruire le dossier Complémentaire santé ACS;;; +AD – ACCOMPAGNEMENT SPECIFIQUE;;Informer, conseiller;;; +AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Procéder à une élection de domicile; +AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Demander une aide financière; +AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Demander un interprète; +AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Prendre contact avec le CADA; +AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Aider à la constitution de dossier auprès de la préfecture; +AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Faire le lien avec les associations; +AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Demander une aide médicale d'état; +AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Demander une carte mobilité; +AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Accompagner pour la scolarité des enfants (crèches, collège, péri scolaire, cantine…); +AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Aider à la compréhension du français; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Informer, conseiller;;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Orienter vers une autre structure;;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Instruire une première demande d'Accompagnement Educatif de Prevention;;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Demander le renouvellement de l'Accompagnement Educatif de Prévention;;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Problèmatique : : Conduite à risque / Passage à l'acte isolé de l'enfant/adolescent; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Problèmatique : Comportement de l'enfant/adolescent en difficulté avec les limites, les interdits, les règles sociales; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Problèmatique : Difficultés de l'enfant en milieu scolaire ou extra-scolaire; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Problèmatique : Difficultés liées à la prise d'autonomie; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Problèmatique : Evènement - Traumatisme qui affecte l'équilibre familial; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Problèmatique : Problème de communication intrafamiliale; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Problèmatique : Parents démunis sur le plan éducatif; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Problèmatique : conflits parentaux ayant des résonnances sur l'enfant/l'adolescent; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Objectif : travailler la place de chacun; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Objectif : Conseiller et soutenir le positionnement éducatif; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Objectif : Accompagner la relation parent-enfant; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Objectif : Accompagner les parents en lien avec les lieux de scolarisation et de socialisation de leurs enfants; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Objectif : Accompagner/orienter les parents en lien avec les lieux de soins ; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Objectif : Accompagnement d’un jeune majeur; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Objectif : évaluation / Orientation; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Dispositif : mise en place TISF; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Dispositif : Mise en place AED; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Dispositif : Mise en place CJM; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Dispositif : Mise en place d'un AP; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Dispositif : Transmission judiciaire pour AEMO; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Dispositif : Tramsmission judiciaire pour MJIE; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Dispositif : Transmission judiciaire pour une mesure de protection; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Arrêt à l’initiative de la famille +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Souhait interruption momentanée de l’accompagnement par la famille +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Orientation vers un partenaire extérieur +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Relais avec AS et/ou Puér +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Arrêt à échéance +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Transmission à l’ASE pour une mesure administrative +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Transmission à l’ASE pour une mesure judiciaire +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Renouvellement de l’AEP dans l’attente d’une mesure ASE +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Renouvellement de l’AEP pour poursuivre les objectifs engagés +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Réaliser une permanence éducative;;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Médiatiser les relations familiales; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander le passage en IRCP; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une mise en place TISF; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander le renouvellement TISF; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une mise en place AED; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une mise en place AESF; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une mise en place d'un AP (accueil provisoire); +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une mesure ASMI; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une entrée en centre maternelle; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une entrée en centre parental; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une entrée en Unité Mère Enfant (UME); +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une MJAGBF; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une AED TDC; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander la désignation un TDC; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander un CAP ASE; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une AMAE (allocation mensuelle d'aide éducative); +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une allocation socio-éducatif spécifique; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander un CAFI (aides fi); +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une autre aide (associations…); +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter la CRIP;;Motif : arrêt de l'adhésion des parents à l'accompagnement du soutien à la parentalité; +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter la CRIP;;Motif : violence intra-familiale; +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter la CRIP;;Motif : suite à une ISG; +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter la CRIP;;;Faire une FRIP +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter la CRIP;;;Demander une MJIE +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter la CRIP;;;Demander une mesure de protection +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter la CRIP;;;Demander un OPP +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter la CRIP;;;Demander un placement +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter l'ASE (RJA) pour situation connue;;Motif : arrêt de l'adhésion des parents à l'accompagnement du soutien à la parentalité; +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter l'ASE (RJA) pour situation connue;;Motif : violence intra-familiale; +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter l'ASE (RJA) pour situation connue;;Motif : suite à une ISG; +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter l'ASE (RJA) pour situation connue;;;Demander une MJIE +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter l'ASE (RJA) pour situation connue;;;Demander une mesure de protection +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter l'ASE (RJA) pour situation connue;;;Demander un OPP +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter l'ASE (RJA) pour situation connue;;;Demander un placement +ENFANT / FAMILLE;ENFANT PREVENTION;Répondre à Eléments en votre possession;;; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation IP pour la CRIP;;;Evaluation sans suite +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation IP pour la CRIP;;;Evaluation demande d'accompagnement médico-sociale +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation IP pour la CRIP;;;Evaluation pur demande de MJIE +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation IP pour la CRIP;;;Evaluation pour demande d'AEMO +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation IP pour la CRIP;;;Evaluation pour demande de placement +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation IP pour la CRIP;;;Evaluation pour demande d'OPP +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation IP pour la CRIP;;;Note complémentaire actualisation +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation pour l'ASE;;;Evaluation sans suite +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation pour l'ASE;;;Evaluation demande d'accompagnement médico-sociale +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation pour l'ASE;;;Evaluation pur demande de MJIE +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation pour l'ASE;;;Evaluation pour demande d'AEMO +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation pour l'ASE;;;Evaluation pour demande de placement +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation pour l'ASE;;;Evaluation pour demande d'OPP +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation pour l'ASE;;;Note complémentaire actualisation +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Mettre en place un accompagnement médicosocial suite à une IP;;Demander un AEP; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Mettre en place un accompagnement médicosocial suite à une IP;;Demander une mise en place AED; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Mettre en place un accompagnement médicosocial suite à une IP;;Demander une mise en place TISF; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Mettre en place un accompagnement médicosocial suite à une IP;;Demander la mise en place d'un Accueil Provisoire; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Mettre en place un accompagnement médicosocial suite à une IP;;Demander l'orientation vers d'autres structures (soins, MDA, …); +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Mettre en place un accompagnement médicosocial suite à une IP;;Demander l'entrée en centre maternel ; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Mettre en place un accompagnement médicosocial suite à une IP;;Demander l'entrée unité mère / enfant; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Informer, conseiller;;; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Protéger des violences intra familiales;;Orienter vers SOS femme; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Protéger des violences intra familiales;;Proposer un conseiller ou une thérapie conjugale; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Protéger des violences intra familiales;;Proposer une médiation familiale; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Protéger des violences intra familiales;;Aider au dépôt de plainte; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Protéger des violences intra familiales;;Signaler un adulte vulnérable au procureur ; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Protéger des violences intra familiales;;Demander une mesure de protection majeur; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Protéger des violences intra familiales;;Faire une FRIP pour enfant en danger; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Protéger des violences intra familiales;;Instruire la fiche VIF; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Conseiller ; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Problématique : VIF; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Problématique : Difficultés éducatives; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Problématique : Protection de l’enfance; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Problématique : Violences sexuelles; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Problématique : Information suite à une séparation; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Orienter vers l'AS de secteur; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Orienter vers SOS femme; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Orienter vers un accompagnement CMP/libéral; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Orienter vers un conseiller ou thérapeute conjugal; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Aider au dépôt de plainte; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Signaler un adulte vulnérable au procureur ; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Demander une mesure de protection majeur; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Accompagner le lieu d'accueil;;; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Mettre en place un soutien parental;;Mise en place TISF; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Mettre en place un soutien parental;;Demande aide financière / SU; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Mettre en place un soutien parental;;Demande SU; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Mettre en place un soutien parental;;Participation à des actions collectives; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Mettre en place un soutien parental;;Mise en place d'un loisir familial ; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Mettre en place un soutien parental;;Mise en place d'une aide transport; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Accompagner le mineur;;Demande mise en place d'un accompagnement psychologique; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Accompagner le mineur;;Construire le PPE; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Accompagner le mineur;;Mise en place CJM; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Accompagner le mineur;;Demande MDPH ; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Accompagner le mineur;;Organiser la mise en place d'un loisir; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Elaborer le lien partenarial;;; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Demander une protection majeur vulnérable;;; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Demande de MJIE (mesure judiciaire d'investigation éducative);;; +ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT DANS UN LIEU D'ACCUEIL;Accompagner le lieu d'accueil;;; +ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT DANS UN LIEU D'ACCUEIL;Mettre en place un soutien parental;;Mise en place TISF; +ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT DANS UN LIEU D'ACCUEIL;Mettre en place un soutien parental;;Demande aide financière; +ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT DANS UN LIEU D'ACCUEIL;Mettre en place un soutien parental;;Demande SU; +ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT DANS UN LIEU D'ACCUEIL;Mettre en place un soutien parental;;Demande de protection majeur vulnérable; +ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT DANS UN LIEU D'ACCUEIL;Accompagner le mineur;;; +ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT DANS UN LIEU D'ACCUEIL;Elaborer le lien partenarial;;; +ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT CHEZ LE PARENT;Mettre en place un soutien parental;;; +ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT CHEZ LE PARENT;Accompagner le mineur;;Construire le PPE; +ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT CHEZ LE PARENT;Accompagner le mineur;;Mise en place CJM; +ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT CHEZ LE PARENT;Accompagner le mineur;;Organiser la participation à un camp de vacances; +ENFANT PROTECTION;DELEGATION D'AUTORITE PARENTALE;Accompagner le lieu d'accueil;;; +ENFANT PROTECTION;DELEGATION D'AUTORITE PARENTALE;Accompagner le mineur;;; +ENFANT PROTECTION;DELEGATION D'AUTORITE PARENTALE;Elaborer le lien partenarial;;; +ENFANT PROTECTION;TUTELLE DEPARTEMENTALE;;;; +ENFANT PROTECTION;TUTELLE D'ETAT;Accompagner le lieu d'accueil;;; +ENFANT PROTECTION;TUTELLE D'ETAT;Accompagner le mineur;;; +ENFANT PROTECTION;TUTELLE D'ETAT;Elaborer le lien partenarial;;; +ENFANT PROTECTION;AEMO TDC;Accompagner le lieu d'accueil;;; +ENFANT PROTECTION;AEMO TDC;Mettre en place un soutien parental;;; +ENFANT PROTECTION;AEMO TDC;Accompagner le mineur;;; +ENFANT PROTECTION;AEMO TDC;Elaborer le lien partenarial;;; +ENFANT PROTECTION;AEMO FAMILLE;Mettre en place un soutien parental;;; +ENFANT PROTECTION;AEMO FAMILLE;Accompagner le mineur;;; +ENFANT PROTECTION;AEMO FAMILLE;Elaborer le lien partenarial;;; +AGREMENT;ASSISTANT MATERNEL;Instruire une première demande;;; +AGREMENT;ASSISTANT MATERNEL;Instruire un renouvellement;;; +AGREMENT;ASSISTANT MATERNEL;Instruire une modification;;; +AGREMENT;ASSISTANT MATERNEL;Suivre un(e) ASSMAT;;; +AGREMENT;ASSISTANT MATERNEL;Contrôler un(e) ASSMAT;;; +AGREMENT;ASSISTANT MATERNEL;Accompagner un(e) ASSMAT;;; +AGREMENT;ASSISTANT FAMILIAL;Instruire une première demande;;; +AGREMENT;ASSISTANT FAMILIAL;Instruire un renouvellement;;; +AGREMENT;ASSISTANT FAMILIAL;Instruire une modification;;; +AGREMENT;ASSISTANT FAMILIAL;Suivre un(e) ASSFAM;;; +AGREMENT;ASSISTANT FAMILIAL;Contrôler un(e) ASSFAM;;; +AGREMENT;ASSISTANT FAMILIAL;Accompagner un(e) ASSFAM;;; +AGREMENT;FAMILLE D'ACCUEIL PA/PH;Contribuer à l'évaluation si Famille d'Accueil connue;;Première demande; +AGREMENT;FAMILLE D'ACCUEIL PA/PH;Contribuer à l'évaluation si Famille d'Accueil connue;;Renouvellement; +AGREMENT;FAMILLE D'ACCUEIL PA/PH;Contribuer à l'évaluation si Famille d'Accueil connue;;Modification; +AGREMENT;FAMILLE D'ACCUEIL PA/PH;Contribuer à l'évaluation si Famille d'Accueil connue;;Suivi; diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php index 10d326b9b..ea7fa57b1 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php @@ -29,7 +29,7 @@ class AccompanyingPeriodWorkEvaluation implements TrackUpdateInterface, TrackCre /** * @ORM\ManyToOne( * targetEntity=AccompanyingPeriodWork::class, - * mappedBy="accompanyingPeriodWorkEvaluations" + * inversedBy="accompanyingPeriodWorkEvaluations" * ) */ private ?AccompanyingPeriodWork $accompanyingPeriodWork; From 0e2e7155fb3577c89d46a6ffa2d17b37ef3596fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 30 Jul 2021 23:42:30 +0200 Subject: [PATCH 073/100] Load social work, and fix some repositories --- .../ORM/LoadAccompanyingPeriodWork.php | 140 +++ .../ORM/data/social_work_metadata.csv | 838 +++++++++--------- .../Entity/AccompanyingPeriod.php | 4 +- ...companyingPeriodWorkEvaluationDocument.php | 3 + .../Entity/SocialWork/Evaluation.php | 9 +- .../Entity/SocialWork/SocialAction.php | 17 + .../AccompanyingPeriodRepository.php | 4 +- .../migrations/Version20210730094514.php | 4 +- .../migrations/Version20210730205407.php | 31 + 9 files changed, 623 insertions(+), 427 deletions(-) create mode 100644 src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadAccompanyingPeriodWork.php create mode 100644 src/Bundle/ChillPersonBundle/migrations/Version20210730205407.php diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadAccompanyingPeriodWork.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadAccompanyingPeriodWork.php new file mode 100644 index 000000000..82e232e8d --- /dev/null +++ b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadAccompanyingPeriodWork.php @@ -0,0 +1,140 @@ +periodRepository = $periodRepository; + $this->evaluationRepository = $evaluationRepository; + } + + /** + * @inheritDoc + */ + public function getDependencies() + { + return [ + LoadPeople::class + ]; + } + + private function getRandomAction(SocialIssue $socialIssue): ?SocialAction + { + $actions = $socialIssue->getRecursiveSocialActions()->toArray(); + + if (0 === count($actions)) { + return null; + } + + return $actions[\array_rand($actions)]; + } + + private function getRandomEvaluation(): Evaluation + { + if (0 === count($this->cacheEvaluations)) { + $this->cacheEvaluations = $this->evaluationRepository + ->findAll(); + } + + return $this->cacheEvaluations[\array_rand($this->cacheEvaluations)]; + } + + /** + * @inheritDoc + */ + public function load(ObjectManager $manager) + { + // load all the period which are confirmed + $periods = $this->periodRepository + ->findBy(['step' => AccompanyingPeriod::STEP_CONFIRMED]) + ; + + $i = 0; + while (null !== $period = \array_pop($periods)) { + /** @var AccompanyingPeriod $period */ + $i++; + if (0 === $i % 15) { + $manager->flush(); + } + if (0 === $period->getSocialIssues()->count()) { + continue; + } + $work = new AccompanyingPeriod\AccompanyingPeriodWork(); + $action = $this->getRandomAction($period->getSocialIssues()->first()); + + if (null !== $action) { + $work + ->setAccompanyingPeriod($period) + ->setSocialAction($action) + ->setStartDate(new \DateTimeImmutable('today')) + ->addPerson($period->getPersons()->first()) + ->setCreatedAt(new \DateTimeImmutable()) + ->setCreatedBy($this->getReference('center a_social')) + ->setUpdatedAt(new \DateTimeImmutable()) + ->setUpdatedBy($this->getReference('center a_social')); + $manager->persist($work); + + if ($action->getEvaluations()->count() > 0) { + $ev = $action->getEvaluations()->first(); + $evaluation = new AccompanyingPeriod\AccompanyingPeriodWorkEvaluation(); + $evaluation->setAccompanyingPeriodWork($work) + ->setEvaluation($ev); + $manager->persist($evaluation); + } + } + + // 1 of 10, force an evaluation + if (0 === $i % 10) { + $evaluation = $this->getRandomEvaluation(); + $action = $evaluation->getSocialAction(); + $issue = $action->getIssue(); + + $period->addSocialIssue($issue); + $work + ->setAccompanyingPeriod($period) + ->setSocialAction($action) + ->setStartDate(new \DateTimeImmutable('today')) + ->addPerson($period->getPersons()->first()) + ->setCreatedAt(new \DateTimeImmutable()) + ->setCreatedBy($this->getReference('center a_social')) + ->setUpdatedAt(new \DateTimeImmutable()) + ->setUpdatedBy($this->getReference('center a_social')) + ; + $manager->persist($work); + $ev = new AccompanyingPeriod\AccompanyingPeriodWorkEvaluation(); + $ev->setAccompanyingPeriodWork($work) + ->setEvaluation($evaluation); + $manager->persist($ev); + } + + } + + $manager->flush(); + } +} diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/data/social_work_metadata.csv b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/data/social_work_metadata.csv index 546194f33..6257b904b 100644 --- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/data/social_work_metadata.csv +++ b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/data/social_work_metadata.csv @@ -1,420 +1,420 @@ -AD - PREVENTION, ACCES AUX DROITS, BUDGET;ACCES AUX DROITS;Informer, conseiller;;; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;ACCES AUX DROITS;Aider à l'inclusion numérique;;; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;ACCES AUX DROITS;Demander une aide juridictionnelle;;; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;ACCES AUX DROITS;Aider à l'ouverture aux droits;;; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;ACCES AUX DROITS;Demander une aide alimentaire;;; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Informer, conseiller;;; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : Centre Communal d’Action Sociale; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : CAF/MSA - Secours d’urgence; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : CAF/MSA - Aide financière; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : Caisse Primaire d’Assurance Maladie ; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : FSL Maintien - Impayés de loyer; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : FSL Maintien - Énergie / Fluides; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : FSL Maintien - Impayés télécommunication; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : FSL Maintien - Impayés aire d'accueil GDV ; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : FSL Maintien - Lié à la COVID; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : Secours exceptionnels; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Instruire le dossier de surendettement;;; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une mesure de protection adulte;;Objectif : Sauvegarde de justice; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une mesure de protection adulte;;Objectif : Mesure d'Accompagnement Judiciaire (MAJ); -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une mesure de protection adulte;;Objectif : Signalement personne vulnérable; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une mesure de protection adulte;;Objectif : Mesure de protection personne majeure (tutelle, curatelle); -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Faire une demande auprès des associations caritatives;;; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Instruire des formulaires auprès d'autres organismes (Locapass, Fastt, …);;; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Instruire une première demande d'AEB;;; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander un renouvellement d'AEB;;Objectif : Dans l'attente d'une mesure de protection ; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander un renouvellement d'AEB;;Objectif : Pour poursuivre les objectifs engagés; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Instruire une première demande de MASP;;; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander un renouvellement MASP;;Objectif : Dans l'attente d'une mesure de protection ; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander un renouvellement MASP;;Objectif : Pour poursuivre les objectifs engagés; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Soutenir dans les démarches administratives; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Aider au tri, au classement et à l’archivage des documents administratifs; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Soutenir les ménages dans l’apurement des dettes, accompagner les ménages endettées, surendettées; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Accompagner les ménages dans leur gestion budgétaire; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Aider les ménages à se questionner sur leur mode de consommation; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Assurer une fonction de médiation; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Soutenir les ménages dans les démarches liées au logement; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Aider à l'accès aux droits; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Aider à l'inclusion numérique; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Instruire des formulaires d'autres organismes non référencés…; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Instruire le dossier de surendettement ; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Demander ou renouveler la couverture santé (ACS); -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide alimentaire;; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : Centre Communal d’Action Sociale; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : CAF/MSA - Secours d’urgence; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : CAF/MSA - Aide financière; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : Caisse Primaire d’Assurance Maladie ; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Cautionnement; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Dépôt de garantie; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - 1er loyer; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Frais d’agence; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Assurances; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Déménagement; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Aide à l’installation; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Facture résiliation énergie (nv logement); -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Impayés de loyer; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Énergie / Fluides; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Impayés télécommunication; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Impayés aire d'accueil GDV ; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Lié à la COVID; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : Secours exceptionnels; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : Mesure ASLL; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Faire une demande auprès de Association caritative;; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une mesure de protection ;Objectif : Sauvegarde de justice; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une mesure de protection ;Objectif : Signalement personne vulnérable; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une mesure de protection ;Objectif : Mesure de protection personne majeure (tutelle, curatelle); -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une mesure de protection ;Objectif : Mesure d'Accompagnement Judiciaire (MAJ); -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une mesure de protection ;Objectif : Mesure Judiciaire d'Aide à la Gestion du Budget Familial (MJAGBF); -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Arrêt à l'initiative du ménage pour déménagement -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Suspension momentanée de l'accompagnement par le ménage ou le professionnel -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Arrêt pour absence d'adhésion -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Arrêt à l'initiative du ménage pour séparation -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Arrêt à l'initiative du professionnel pour absence d'avancée -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Retour à l'autonomie -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Transmission pour mesure judiciaire d'aide à la gestion du budget familial -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Orientation vers une MASP -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Transmission pour une mesure d'accompagnement judiciaire -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Renouvellement de l'AEB dans l'attente d'une mesure de protection -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Renouvellement de l'AEB pour poursuivre les objectifs engagés -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Soutenir dans les démarches administratives; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Aider au tri, au classement et à l’archivage des documents administratifs; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Soutenir les ménages dans l’apurement des dettes, accompagner les ménages endettées, surendettées; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Accompagner les ménages dans leur gestion budgétaire; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Aider les ménages à se questionner sur leur mode de consommation; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Assurer une fonction de médiation; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Soutenir les ménages dans les démarches liées au logement; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Aider à l'accès aux droits; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Aider à l'inclusion numérique; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Instruire des formulaires d'autres organismes non référencés…; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Instruire le dossier de surendettement ; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Demander ou renouveler la couverture santé (ACS); -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide alimentaire;; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : Centre Communal d’Action Sociale; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : CAF/MSA - Secours d’urgence; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : CAF/MSA - Aide financière; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : Caisse Primaire d’Assurance Maladie ; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Cautionnement; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Dépôt de garantie; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - 1er loyer; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Frais d’agence; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Assurances; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Déménagement; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Aide à l’installation; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Facture résiliation énergie (nv logement); -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Impayés de loyer; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Énergie / Fluides; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Impayés télécommunication; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Impayés aire d'accueil GDV ; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Lié à la COVID; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : Secours exceptionnels; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : Mesure ASLL; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une mesure de protection adulte;Objectif : Sauvegarde de justice; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une mesure de protection adulte;Objectif : Signalement personne vulnérable; -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une mesure de protection adulte;Objectif : Mesure de protection personne majeure (tutelle, curatelle); -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une mesure de protection adulte;Objectif : Mesure d'Accompagnement Judiciaire (MAJ); -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une mesure de protection adulte;Objectif : Mesure Judiciaire d'Aide à la Gestion du Budget Familial (MJAGBF); -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Arrêt à l'initiative du ménage pour déménagement -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Suspension momentanée de l'accompagnement par le ménage ou le professionnel -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Arrêt pour absence d'adhésion -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Arrêt à l'initiative du ménage pour séparation -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Arrêt à l'initiative du professionnel pour absence d'avancée -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Retour à l'autonomie -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Transmission pour mesure judiciaire d'aide à la gestion du budget familial -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Transmission pour une mesure d'accompagnement judiciaire -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Renouvellement de MASP dans l'attente d'une mesure de protection -AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Renouvellement de MASP pour poursuivre les objectifs engagés -AD - LOGEMENT;ACCES LOGEMENT (RE);Informer, conseiller;;; -AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - Cautionnement; -AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - Dépôt de garantie; -AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - 1er loyer; -AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - Frais d’agence; -AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - Assurances; -AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - Déménagement; -AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - Aide à l’installation; -AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - Facture résiliation énergie (nv logement); -AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - Mesure ASLL; -AD - LOGEMENT;ACCES LOGEMENT (RE);Demander auprès des Bailleurs sociaux, mairies, partenaires;;; -AD - LOGEMENT;ACCES LOGEMENT (RE);Instruire une demande DALO, DAHO;;; -AD - LOGEMENT;ACCES LOGEMENT (RE);Instruire une demande SIAO;;; -AD - LOGEMENT;ACCES LOGEMENT (RE);Instruire une demande ASLL;;; -AD - LOGEMENT;ACCES LOGEMENT (RE);Instruire une demande au Contingent préfectoral;;; -AD - LOGEMENT;ACCES LOGEMENT (RE);Instruire une demande au 115;;; -AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Intervenir au commandement de payer; -AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Instruire la fiche Assignation; -AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Répondre au commandement de quitter les lieux; -AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Répondre au concours de la force publique; -AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Demander une aide financière FSL pour impayé de loyer; -AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Déposer un dossier de surendettement; -AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Demander auprès des Bailleurs sociaux, mairies, partenaires; -AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Instruire une demande DALO, DAHO; -AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Instruire une demande SIAO; -AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Instruire une demande ASLL; -AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Instruire une demande au Contingent préfectoral; -AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Instruire une demande au 115; -AD - LOGEMENT;HABITAT INDIGNE;Informer, conseiller;;; -AD - LOGEMENT;HABITAT INDIGNE;Demander une aide pour incurie;;Objectif : FSL maintien - aide incurie; -AD - LOGEMENT;HABITAT INDIGNE;Instruire la grille de signalement;;; -AD - LOGEMENT;HABITAT INDIGNE;Faire intervenir d'autres partenaires;;; -AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Informer, conseiller;;; -AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Demander un accompagnement psychologue insertion;;; -AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Exercer l'accompagnement psychologue insertion;;; -AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Renouveller l'accompagnement psychologue insertion;;; -AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Réorienter l'usager vers autres structures pour un accompagnement psychologique;;; -AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Demander l'accompagnement global;;Objectif : Axe 2; -AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Exercer l'accompagnement global;;Objectif : Axe 2; -AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Renouveller l'accompagnement global;;Objectif : Axe 2; -AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Demander l'accompagnement global;;Objectif : Axe 3 (agent d'insertion); -AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Exercer l'accompagnement global;;Objectif : Axe 3 (agent d'insertion); -AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Renouveller l'accompagnement global;;Objectif : Axe 3 (agent d'insertion); -AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Instruire une demande MOVEA;;; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Informer, conseiller;;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;ACCES AUX DROITS;Informer, conseiller;;;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;ACCES AUX DROITS;Aider à l'inclusion numérique;;;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;ACCES AUX DROITS;Demander une aide juridictionnelle;;;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;ACCES AUX DROITS;Aider à l'ouverture aux droits;;;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;ACCES AUX DROITS;Demander une aide alimentaire;;;;Demande aide alimentaire +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Informer, conseiller;;;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : Centre Communal d’Action Sociale;;Demande aide impayé CCAS +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : CAF/MSA - Secours d’urgence;;Demande aide impayé CAF +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : CAF/MSA - Aide financière;;Demande aide impayé CAF +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : Caisse Primaire d’Assurance Maladie;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : FSL Maintien - Impayés de loyer;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : FSL Maintien - Énergie / Fluides;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : FSL Maintien - Impayés télécommunication;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : FSL Maintien - Impayés aire d'accueil GDV ;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : FSL Maintien - Lié à la COVID;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une aide pour des impayés;;Objectif : Secours exceptionnels;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Instruire le dossier de surendettement;;;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une mesure de protection adulte;;Objectif : Sauvegarde de justice;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une mesure de protection adulte;;Objectif : Mesure d'Accompagnement Judiciaire (MAJ);; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une mesure de protection adulte;;Objectif : Signalement personne vulnérable;;Formulaire signalement personne vulnérable +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander une mesure de protection adulte;;Objectif : Mesure de protection personne majeure (tutelle, curatelle);; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Faire une demande auprès des associations caritatives;;;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Instruire des formulaires auprès d'autres organismes (Locapass, Fastt, …);;;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Instruire une première demande d'AEB;;;;Demande AEB +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander un renouvellement d'AEB;;Objectif : Dans l'attente d'une mesure de protection ;;Renouvellement AEB +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander un renouvellement d'AEB;;Objectif : Pour poursuivre les objectifs engagés;;Renouvellement AEB +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Instruire une première demande de MASP;;;;Demande MAPS +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander un renouvellement MASP;;Objectif : Dans l'attente d'une mesure de protection ;;Renouvellement MASP +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Demander un renouvellement MASP;;Objectif : Pour poursuivre les objectifs engagés;;Renouvellement MASP +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Soutenir dans les démarches administratives;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Aider au tri, au classement et à l’archivage des documents administratifs;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Soutenir les ménages dans l’apurement des dettes, accompagner les ménages endettées, surendettées;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Accompagner les ménages dans leur gestion budgétaire;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Aider les ménages à se questionner sur leur mode de consommation;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Assurer une fonction de médiation;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Soutenir les ménages dans les démarches liées au logement;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Aider à l'accès aux droits;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Aider à l'inclusion numérique;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Instruire des formulaires d'autres organismes non référencés…;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Instruire le dossier de surendettement ;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Cibler des objectifs avec l'usager;Objectif : Demander ou renouveler la couverture santé (ACS);; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide alimentaire;;;Demande aide alimentaire +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : Centre Communal d’Action Sociale;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : CAF/MSA - Secours d’urgence;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : CAF/MSA - Aide financière;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : Caisse Primaire d’Assurance Maladie ;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Cautionnement;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Dépôt de garantie;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - 1er loyer;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Frais d’agence;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Assurances;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Déménagement;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Aide à l’installation;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Facture résiliation énergie (nv logement);; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Impayés de loyer;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Énergie / Fluides;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Impayés télécommunication;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Impayés aire d'accueil GDV ;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Lié à la COVID;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : Secours exceptionnels;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une aide pour des impayés ou accès logement;Objectif : Mesure ASLL;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Faire une demande auprès de Association caritative;;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une mesure de protection ;Objectif : Sauvegarde de justice;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une mesure de protection ;Objectif : Signalement personne vulnérable;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une mesure de protection ;Objectif : Mesure de protection personne majeure (tutelle, curatelle);; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une mesure de protection ;Objectif : Mesure d'Accompagnement Judiciaire (MAJ);; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Demander une mesure de protection ;Objectif : Mesure Judiciaire d'Aide à la Gestion du Budget Familial (MJAGBF);; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Arrêt à l'initiative du ménage pour déménagement; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Suspension momentanée de l'accompagnement par le ménage ou le professionnel; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Arrêt pour absence d'adhésion; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Arrêt à l'initiative du ménage pour séparation; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Arrêt à l'initiative du professionnel pour absence d'avancée ; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Retour à l'autonomie; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Transmission pour mesure judiciaire d'aide à la gestion du budget familial; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Orientation vers une MASP; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Transmission pour une mesure d'accompagnement judiciaire ; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Renouvellement de l'AEB dans l'attente d'une mesure de protection ; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer un AEB;Conclure l'AEB;;Résultat : Renouvellement de l'AEB pour poursuivre les objectifs engagés; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Soutenir dans les démarches administratives;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Aider au tri, au classement et à l’archivage des documents administratifs;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Soutenir les ménages dans l’apurement des dettes, accompagner les ménages endettées, surendettées;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Accompagner les ménages dans leur gestion budgétaire;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Aider les ménages à se questionner sur leur mode de consommation;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Assurer une fonction de médiation;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Soutenir les ménages dans les démarches liées au logement;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Aider à l'accès aux droits;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Aider à l'inclusion numérique;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Instruire des formulaires d'autres organismes non référencés…;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Instruire le dossier de surendettement ;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Cibler des objectifs avec l'usager;Objectif : Demander ou renouveler la couverture santé (ACS);; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide alimentaire;;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : Centre Communal d’Action Sociale;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : CAF/MSA - Secours d’urgence;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : CAF/MSA - Aide financière;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : Caisse Primaire d’Assurance Maladie ;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Cautionnement;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Dépôt de garantie;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - 1er loyer;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Frais d’agence;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Assurances;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Déménagement;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Aide à l’installation;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Accès - Facture résiliation énergie (nv logement);; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Impayés de loyer;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Énergie / Fluides;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Impayés télécommunication;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Impayés aire d'accueil GDV ;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : FSL Maintien - Lié à la COVID;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : Secours exceptionnels;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une aide pour des impayés ou accès logement;Objectif : Mesure ASLL;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une mesure de protection adulte;Objectif : Sauvegarde de justice;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une mesure de protection adulte;Objectif : Signalement personne vulnérable;; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une mesure de protection adulte;Objectif : Mesure de protection personne majeure (tutelle, curatelle);; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une mesure de protection adulte;Objectif : Mesure d'Accompagnement Judiciaire (MAJ);; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Demander une mesure de protection adulte;Objectif : Mesure Judiciaire d'Aide à la Gestion du Budget Familial (MJAGBF);; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Arrêt à l'initiative du ménage pour déménagement; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Suspension momentanée de l'accompagnement par le ménage ou le professionnel; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Arrêt pour absence d'adhésion; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Arrêt à l'initiative du ménage pour séparation; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Arrêt à l'initiative du professionnel pour absence d'avancée ; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Retour à l'autonomie; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Transmission pour mesure judiciaire d'aide à la gestion du budget familial; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Transmission pour une mesure d'accompagnement judiciaire ; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Renouvellement de MASP dans l'attente d'une mesure de protection ; +AD - PREVENTION, ACCES AUX DROITS, BUDGET;SOUTIEN EQUILIBRE BUDGET;Exercer une MASP;Conclure la MASP;;Résultat : Renouvellement de MASP pour poursuivre les objectifs engagés; +AD - LOGEMENT;ACCES LOGEMENT (RE);Informer, conseiller;;;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - Cautionnement;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - Dépôt de garantie;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - 1er loyer;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - Frais d’agence;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - Assurances;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - Déménagement;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - Aide à l’installation;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - Facture résiliation énergie (nv logement);; +AD - LOGEMENT;ACCES LOGEMENT (RE);Demander une aide pour l'accès;;Objectif : FSL Accès - Mesure ASLL;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Demander auprès des Bailleurs sociaux, mairies, partenaires;;;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Instruire une demande DALO, DAHO;;;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Instruire une demande SIAO;;;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Instruire une demande ASLL;;;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Instruire une demande au Contingent préfectoral;;;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Instruire une demande au 115;;;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Intervenir au commandement de payer;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Instruire la fiche Assignation;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Répondre au commandement de quitter les lieux;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Répondre au concours de la force publique;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Demander une aide financière FSL pour impayé de loyer;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Déposer un dossier de surendettement;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Demander auprès des Bailleurs sociaux, mairies, partenaires;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Instruire une demande DALO, DAHO;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Instruire une demande SIAO;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Instruire une demande ASLL;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Instruire une demande au Contingent préfectoral;; +AD - LOGEMENT;ACCES LOGEMENT (RE);Prévenir de l'expulsion;;Objectif : Instruire une demande au 115;; +AD - LOGEMENT;HABITAT INDIGNE;Informer, conseiller;;;; +AD - LOGEMENT;HABITAT INDIGNE;Demander une aide pour incurie;;Objectif : FSL maintien - aide incurie;; +AD - LOGEMENT;HABITAT INDIGNE;Instruire la grille de signalement;;;; +AD - LOGEMENT;HABITAT INDIGNE;Faire intervenir d'autres partenaires;;;; +AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Informer, conseiller;;;; +AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Demander un accompagnement psychologue insertion;;;; +AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Exercer l'accompagnement psychologue insertion;;;; +AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Renouveller l'accompagnement psychologue insertion;;;; +AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Réorienter l'usager vers autres structures pour un accompagnement psychologique;;;; +AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Demander l'accompagnement global;;Objectif : Axe 2;; +AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Exercer l'accompagnement global;;Objectif : Axe 2;; +AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Renouveller l'accompagnement global;;Objectif : Axe 2;; +AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Demander l'accompagnement global;;Objectif : Axe 3 (agent d'insertion);; +AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Exercer l'accompagnement global;;Objectif : Axe 3 (agent d'insertion);; +AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Renouveller l'accompagnement global;;Objectif : Axe 3 (agent d'insertion);; +AD - INSERTION SOCIALE PROFESSIONNELLE;ACCOMPAGNEMENT INSERTION;Instruire une demande MOVEA;;;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Informer, conseiller;;;; AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;"Aider à l'ouverture de droits -";;; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renseigner la plateforme INCLUSION@COM pour les chantiers d'insertion;;; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Soutenir le parcours professionnel (emploi, formation, …); -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement global Axe 2 (orientation Pôle Emploi); -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Orienter vers une structure de l'insertion (chantier, AI, ETTI, …); -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Demander la médiation emploi; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Création d'entreprise; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement travailleur non salarié; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement ASR CEIDRE; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Déposer un dossier MDPH; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Déposer un dossier retraite; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Soutenir l'accès au logement; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Accompagner le budget; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Soutenir la mobilité (MOVEA, transport solidaire, PST, …); -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Demander le psychologue insertion; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Etre accompagné dans la parentalité; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Initier ou maintenir un parcours santé (cure, hospitalisation, CMP, …); -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Solliciliter un FAII; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Demander un réorientation Pôle Emploi; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Autre; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Soutenir le parcours professionnel (emploi, formation, …); -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement global Axe 2 (orientation Pôle Emploi); -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Orienter vers une structure de l'insertion (chantier, AI, ETTI, …); -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Demander la médiation emploi; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Création d'entreprise; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement travailleur non salarié; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement ASR CEIDRE; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Déposer un dossier MDPH; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Déposer un dossier retraite; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Soutenir l'accès au logement; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Accompagner le budget; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Soutenir la mobilité (MOVEA, transport solidaire, PST, …); -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Demander le psychologue insertion; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Etre accompagné dans la parentalité; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Initier ou maintenir un parcours santé; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Solliciliter un FAII; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Demander un réorientation Pôle Emploi; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Autre; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Soutenir le parcours professionnel (emploi, formation, …); -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement global Axe 2 (orientation Pôle Emploi); -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Orienter vers une structure de l'insertion (chantier, AI, ETTI, …); -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Demander la médiation emploi; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Création d'entreprise; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement travailleur non salarié; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement ASR CEIDRE; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Déposer un dossier MDPH; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Déposer un dossier retraite; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Soutenir l'accès au logement; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Accompagner le budget; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Soutenir la mobilité (MOVEA, transport solidaire, PST, …); -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Demander le psychologue insertion; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Etre accompagné dans la parentalité; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Initié ou maintenir un parcours santé; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Solliciliter un FAII; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Demander un réorientation Pôle Emploi; -AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Autre; -AD - INSERTION SOCIALE PROFESSIONNELLE;JEUNES 16/25 AIDE FINANCIERE INSERTION;Informer, conseiller;;; -AD - INSERTION SOCIALE PROFESSIONNELLE;JEUNES 16/25 AIDE FINANCIERE INSERTION;Demander une aide FAJ;;Objectif : SU bons alimentaires; -AD - INSERTION SOCIALE PROFESSIONNELLE;JEUNES 16/25 AIDE FINANCIERE INSERTION;Demander une aide FAJ;;Objectif : SU bons hygiène; -AD - INSERTION SOCIALE PROFESSIONNELLE;JEUNES 16/25 AIDE FINANCIERE INSERTION;Demander une aide FAJ;;Objectif : SU bons carburant; -AD - INSERTION SOCIALE PROFESSIONNELLE;JEUNES 16/25 AIDE FINANCIERE INSERTION;Demander une aide FAJ;;Objectif : SU virement; -AD - INSERTION SOCIALE PROFESSIONNELLE;JEUNES 16/25 AIDE FINANCIERE INSERTION;Solliciter le comité FAJ;;Objectif : Aide financière; -AD - INSERTION SOCIALE PROFESSIONNELLE;JEUNES 16/25 AIDE FINANCIERE INSERTION;Solliciter le comité FAJ;;Objectif : Action d’accompagnement; -AD - SANTE;;Informer, conseiller;;; -AD - SANTE;;Orienter vers une structure de soins (CMP, psychologue, cure, …);;; -AD - SANTE;;Instruire un dossier MDPH;;; -AD - SANTE;;Accompagner le dépôt de dossier de pension d'invalidité;;; -AD - SANTE;;Instruire le dossier Complémentaire santé ACS;;; -AD – ACCOMPAGNEMENT SPECIFIQUE;;Informer, conseiller;;; -AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Procéder à une élection de domicile; -AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Demander une aide financière; -AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Demander un interprète; -AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Prendre contact avec le CADA; -AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Aider à la constitution de dossier auprès de la préfecture; -AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Faire le lien avec les associations; -AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Demander une aide médicale d'état; -AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Demander une carte mobilité; -AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Accompagner pour la scolarité des enfants (crèches, collège, péri scolaire, cantine…); -AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Aider à la compréhension du français; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Informer, conseiller;;; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Orienter vers une autre structure;;; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Instruire une première demande d'Accompagnement Educatif de Prevention;;; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Demander le renouvellement de l'Accompagnement Educatif de Prévention;;; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Problèmatique : : Conduite à risque / Passage à l'acte isolé de l'enfant/adolescent; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Problèmatique : Comportement de l'enfant/adolescent en difficulté avec les limites, les interdits, les règles sociales; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Problèmatique : Difficultés de l'enfant en milieu scolaire ou extra-scolaire; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Problèmatique : Difficultés liées à la prise d'autonomie; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Problèmatique : Evènement - Traumatisme qui affecte l'équilibre familial; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Problèmatique : Problème de communication intrafamiliale; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Problèmatique : Parents démunis sur le plan éducatif; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Problèmatique : conflits parentaux ayant des résonnances sur l'enfant/l'adolescent; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Objectif : travailler la place de chacun; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Objectif : Conseiller et soutenir le positionnement éducatif; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Objectif : Accompagner la relation parent-enfant; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Objectif : Accompagner les parents en lien avec les lieux de scolarisation et de socialisation de leurs enfants; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Objectif : Accompagner/orienter les parents en lien avec les lieux de soins ; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Objectif : Accompagnement d’un jeune majeur; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Objectif : évaluation / Orientation; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Dispositif : mise en place TISF; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Dispositif : Mise en place AED; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Dispositif : Mise en place CJM; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Dispositif : Mise en place d'un AP; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Dispositif : Transmission judiciaire pour AEMO; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Dispositif : Tramsmission judiciaire pour MJIE; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Dispositif : Transmission judiciaire pour une mesure de protection; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Arrêt à l’initiative de la famille -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Souhait interruption momentanée de l’accompagnement par la famille -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Orientation vers un partenaire extérieur -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Relais avec AS et/ou Puér -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Arrêt à échéance -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Transmission à l’ASE pour une mesure administrative -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Transmission à l’ASE pour une mesure judiciaire -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Renouvellement de l’AEP dans l’attente d’une mesure ASE -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Renouvellement de l’AEP pour poursuivre les objectifs engagés -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Réaliser une permanence éducative;;; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Médiatiser les relations familiales; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander le passage en IRCP; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une mise en place TISF; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander le renouvellement TISF; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une mise en place AED; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une mise en place AESF; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une mise en place d'un AP (accueil provisoire); -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une mesure ASMI; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une entrée en centre maternelle; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une entrée en centre parental; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une entrée en Unité Mère Enfant (UME); -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une MJAGBF; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une AED TDC; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander la désignation un TDC; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander un CAP ASE; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une AMAE (allocation mensuelle d'aide éducative); -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une allocation socio-éducatif spécifique; -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander un CAFI (aides fi); -ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une autre aide (associations…); -ENFANT / FAMILLE;ENFANT PREVENTION;Alerter la CRIP;;Motif : arrêt de l'adhésion des parents à l'accompagnement du soutien à la parentalité; -ENFANT / FAMILLE;ENFANT PREVENTION;Alerter la CRIP;;Motif : violence intra-familiale; -ENFANT / FAMILLE;ENFANT PREVENTION;Alerter la CRIP;;Motif : suite à une ISG; -ENFANT / FAMILLE;ENFANT PREVENTION;Alerter la CRIP;;;Faire une FRIP -ENFANT / FAMILLE;ENFANT PREVENTION;Alerter la CRIP;;;Demander une MJIE -ENFANT / FAMILLE;ENFANT PREVENTION;Alerter la CRIP;;;Demander une mesure de protection -ENFANT / FAMILLE;ENFANT PREVENTION;Alerter la CRIP;;;Demander un OPP -ENFANT / FAMILLE;ENFANT PREVENTION;Alerter la CRIP;;;Demander un placement -ENFANT / FAMILLE;ENFANT PREVENTION;Alerter l'ASE (RJA) pour situation connue;;Motif : arrêt de l'adhésion des parents à l'accompagnement du soutien à la parentalité; -ENFANT / FAMILLE;ENFANT PREVENTION;Alerter l'ASE (RJA) pour situation connue;;Motif : violence intra-familiale; -ENFANT / FAMILLE;ENFANT PREVENTION;Alerter l'ASE (RJA) pour situation connue;;Motif : suite à une ISG; -ENFANT / FAMILLE;ENFANT PREVENTION;Alerter l'ASE (RJA) pour situation connue;;;Demander une MJIE -ENFANT / FAMILLE;ENFANT PREVENTION;Alerter l'ASE (RJA) pour situation connue;;;Demander une mesure de protection -ENFANT / FAMILLE;ENFANT PREVENTION;Alerter l'ASE (RJA) pour situation connue;;;Demander un OPP -ENFANT / FAMILLE;ENFANT PREVENTION;Alerter l'ASE (RJA) pour situation connue;;;Demander un placement -ENFANT / FAMILLE;ENFANT PREVENTION;Répondre à Eléments en votre possession;;; -ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation IP pour la CRIP;;;Evaluation sans suite -ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation IP pour la CRIP;;;Evaluation demande d'accompagnement médico-sociale -ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation IP pour la CRIP;;;Evaluation pur demande de MJIE -ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation IP pour la CRIP;;;Evaluation pour demande d'AEMO -ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation IP pour la CRIP;;;Evaluation pour demande de placement -ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation IP pour la CRIP;;;Evaluation pour demande d'OPP -ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation IP pour la CRIP;;;Note complémentaire actualisation -ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation pour l'ASE;;;Evaluation sans suite -ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation pour l'ASE;;;Evaluation demande d'accompagnement médico-sociale -ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation pour l'ASE;;;Evaluation pur demande de MJIE -ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation pour l'ASE;;;Evaluation pour demande d'AEMO -ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation pour l'ASE;;;Evaluation pour demande de placement -ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation pour l'ASE;;;Evaluation pour demande d'OPP -ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation pour l'ASE;;;Note complémentaire actualisation -ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Mettre en place un accompagnement médicosocial suite à une IP;;Demander un AEP; -ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Mettre en place un accompagnement médicosocial suite à une IP;;Demander une mise en place AED; -ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Mettre en place un accompagnement médicosocial suite à une IP;;Demander une mise en place TISF; -ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Mettre en place un accompagnement médicosocial suite à une IP;;Demander la mise en place d'un Accueil Provisoire; -ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Mettre en place un accompagnement médicosocial suite à une IP;;Demander l'orientation vers d'autres structures (soins, MDA, …); -ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Mettre en place un accompagnement médicosocial suite à une IP;;Demander l'entrée en centre maternel ; -ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Mettre en place un accompagnement médicosocial suite à une IP;;Demander l'entrée unité mère / enfant; -ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Informer, conseiller;;; -ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Protéger des violences intra familiales;;Orienter vers SOS femme; -ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Protéger des violences intra familiales;;Proposer un conseiller ou une thérapie conjugale; -ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Protéger des violences intra familiales;;Proposer une médiation familiale; -ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Protéger des violences intra familiales;;Aider au dépôt de plainte; -ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Protéger des violences intra familiales;;Signaler un adulte vulnérable au procureur ; -ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Protéger des violences intra familiales;;Demander une mesure de protection majeur; -ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Protéger des violences intra familiales;;Faire une FRIP pour enfant en danger; -ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Protéger des violences intra familiales;;Instruire la fiche VIF; -ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Conseiller ; -ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Problématique : VIF; -ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Problématique : Difficultés éducatives; -ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Problématique : Protection de l’enfance; -ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Problématique : Violences sexuelles; -ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Problématique : Information suite à une séparation; -ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Orienter vers l'AS de secteur; -ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Orienter vers SOS femme; -ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Orienter vers un accompagnement CMP/libéral; -ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Orienter vers un conseiller ou thérapeute conjugal; -ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Aider au dépôt de plainte; -ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Signaler un adulte vulnérable au procureur ; -ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Demander une mesure de protection majeur; -ENFANT PROTECTION;ACCUEIL PROVISOIRE;Accompagner le lieu d'accueil;;; -ENFANT PROTECTION;ACCUEIL PROVISOIRE;Mettre en place un soutien parental;;Mise en place TISF; -ENFANT PROTECTION;ACCUEIL PROVISOIRE;Mettre en place un soutien parental;;Demande aide financière / SU; -ENFANT PROTECTION;ACCUEIL PROVISOIRE;Mettre en place un soutien parental;;Demande SU; -ENFANT PROTECTION;ACCUEIL PROVISOIRE;Mettre en place un soutien parental;;Participation à des actions collectives; -ENFANT PROTECTION;ACCUEIL PROVISOIRE;Mettre en place un soutien parental;;Mise en place d'un loisir familial ; -ENFANT PROTECTION;ACCUEIL PROVISOIRE;Mettre en place un soutien parental;;Mise en place d'une aide transport; -ENFANT PROTECTION;ACCUEIL PROVISOIRE;Accompagner le mineur;;Demande mise en place d'un accompagnement psychologique; -ENFANT PROTECTION;ACCUEIL PROVISOIRE;Accompagner le mineur;;Construire le PPE; -ENFANT PROTECTION;ACCUEIL PROVISOIRE;Accompagner le mineur;;Mise en place CJM; -ENFANT PROTECTION;ACCUEIL PROVISOIRE;Accompagner le mineur;;Demande MDPH ; -ENFANT PROTECTION;ACCUEIL PROVISOIRE;Accompagner le mineur;;Organiser la mise en place d'un loisir; -ENFANT PROTECTION;ACCUEIL PROVISOIRE;Elaborer le lien partenarial;;; -ENFANT PROTECTION;ACCUEIL PROVISOIRE;Demander une protection majeur vulnérable;;; -ENFANT PROTECTION;ACCUEIL PROVISOIRE;Demande de MJIE (mesure judiciaire d'investigation éducative);;; -ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT DANS UN LIEU D'ACCUEIL;Accompagner le lieu d'accueil;;; -ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT DANS UN LIEU D'ACCUEIL;Mettre en place un soutien parental;;Mise en place TISF; -ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT DANS UN LIEU D'ACCUEIL;Mettre en place un soutien parental;;Demande aide financière; -ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT DANS UN LIEU D'ACCUEIL;Mettre en place un soutien parental;;Demande SU; -ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT DANS UN LIEU D'ACCUEIL;Mettre en place un soutien parental;;Demande de protection majeur vulnérable; -ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT DANS UN LIEU D'ACCUEIL;Accompagner le mineur;;; -ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT DANS UN LIEU D'ACCUEIL;Elaborer le lien partenarial;;; -ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT CHEZ LE PARENT;Mettre en place un soutien parental;;; -ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT CHEZ LE PARENT;Accompagner le mineur;;Construire le PPE; -ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT CHEZ LE PARENT;Accompagner le mineur;;Mise en place CJM; -ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT CHEZ LE PARENT;Accompagner le mineur;;Organiser la participation à un camp de vacances; -ENFANT PROTECTION;DELEGATION D'AUTORITE PARENTALE;Accompagner le lieu d'accueil;;; -ENFANT PROTECTION;DELEGATION D'AUTORITE PARENTALE;Accompagner le mineur;;; -ENFANT PROTECTION;DELEGATION D'AUTORITE PARENTALE;Elaborer le lien partenarial;;; -ENFANT PROTECTION;TUTELLE DEPARTEMENTALE;;;; -ENFANT PROTECTION;TUTELLE D'ETAT;Accompagner le lieu d'accueil;;; -ENFANT PROTECTION;TUTELLE D'ETAT;Accompagner le mineur;;; -ENFANT PROTECTION;TUTELLE D'ETAT;Elaborer le lien partenarial;;; -ENFANT PROTECTION;AEMO TDC;Accompagner le lieu d'accueil;;; -ENFANT PROTECTION;AEMO TDC;Mettre en place un soutien parental;;; -ENFANT PROTECTION;AEMO TDC;Accompagner le mineur;;; -ENFANT PROTECTION;AEMO TDC;Elaborer le lien partenarial;;; -ENFANT PROTECTION;AEMO FAMILLE;Mettre en place un soutien parental;;; -ENFANT PROTECTION;AEMO FAMILLE;Accompagner le mineur;;; -ENFANT PROTECTION;AEMO FAMILLE;Elaborer le lien partenarial;;; -AGREMENT;ASSISTANT MATERNEL;Instruire une première demande;;; -AGREMENT;ASSISTANT MATERNEL;Instruire un renouvellement;;; -AGREMENT;ASSISTANT MATERNEL;Instruire une modification;;; -AGREMENT;ASSISTANT MATERNEL;Suivre un(e) ASSMAT;;; -AGREMENT;ASSISTANT MATERNEL;Contrôler un(e) ASSMAT;;; -AGREMENT;ASSISTANT MATERNEL;Accompagner un(e) ASSMAT;;; -AGREMENT;ASSISTANT FAMILIAL;Instruire une première demande;;; -AGREMENT;ASSISTANT FAMILIAL;Instruire un renouvellement;;; -AGREMENT;ASSISTANT FAMILIAL;Instruire une modification;;; -AGREMENT;ASSISTANT FAMILIAL;Suivre un(e) ASSFAM;;; -AGREMENT;ASSISTANT FAMILIAL;Contrôler un(e) ASSFAM;;; -AGREMENT;ASSISTANT FAMILIAL;Accompagner un(e) ASSFAM;;; -AGREMENT;FAMILLE D'ACCUEIL PA/PH;Contribuer à l'évaluation si Famille d'Accueil connue;;Première demande; -AGREMENT;FAMILLE D'ACCUEIL PA/PH;Contribuer à l'évaluation si Famille d'Accueil connue;;Renouvellement; -AGREMENT;FAMILLE D'ACCUEIL PA/PH;Contribuer à l'évaluation si Famille d'Accueil connue;;Modification; -AGREMENT;FAMILLE D'ACCUEIL PA/PH;Contribuer à l'évaluation si Famille d'Accueil connue;;Suivi; +";;;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renseigner la plateforme INCLUSION@COM pour les chantiers d'insertion;;;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Soutenir le parcours professionnel (emploi, formation, …);; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement global Axe 2 (orientation Pôle Emploi);; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Orienter vers une structure de l'insertion (chantier, AI, ETTI, …);; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Demander la médiation emploi;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Création d'entreprise;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement travailleur non salarié;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement ASR CEIDRE;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Déposer un dossier MDPH;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Déposer un dossier retraite;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Soutenir l'accès au logement;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Accompagner le budget;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Soutenir la mobilité (MOVEA, transport solidaire, PST, …);; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Demander le psychologue insertion;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Etre accompagné dans la parentalité;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Initier ou maintenir un parcours santé (cure, hospitalisation, CMP, …);; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Solliciliter un FAII;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Demander un réorientation Pôle Emploi;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire le 1er Contrat d'Engagement Réciproque;;Objectif : Autre;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Soutenir le parcours professionnel (emploi, formation, …);; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement global Axe 2 (orientation Pôle Emploi);; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Orienter vers une structure de l'insertion (chantier, AI, ETTI, …);; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Demander la médiation emploi;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Création d'entreprise;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement travailleur non salarié;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement ASR CEIDRE;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Déposer un dossier MDPH;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Déposer un dossier retraite;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Soutenir l'accès au logement;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Accompagner le budget;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Soutenir la mobilité (MOVEA, transport solidaire, PST, …);; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Demander le psychologue insertion;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Etre accompagné dans la parentalité;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Initier ou maintenir un parcours santé;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Solliciliter un FAII;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Demander un réorientation Pôle Emploi;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Renouveler le Contrat d'Engagement Réciproque;;Objectif : Autre;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Soutenir le parcours professionnel (emploi, formation, …);; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement global Axe 2 (orientation Pôle Emploi);; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Orienter vers une structure de l'insertion (chantier, AI, ETTI, …);; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Demander la médiation emploi;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Création d'entreprise;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement travailleur non salarié;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Demander l'accompagnement ASR CEIDRE;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Déposer un dossier MDPH;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Déposer un dossier retraite;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Soutenir l'accès au logement;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Accompagner le budget;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Soutenir la mobilité (MOVEA, transport solidaire, PST, …);; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Demander le psychologue insertion;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Etre accompagné dans la parentalité;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Initié ou maintenir un parcours santé;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Solliciliter un FAII;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Demander un réorientation Pôle Emploi;; +AD - INSERTION SOCIALE PROFESSIONNELLE;RSA;Faire un avenant au Contrat d'Engagement Réciproque;;Objectif : Autre;; +AD - INSERTION SOCIALE PROFESSIONNELLE;JEUNES 16/25 AIDE FINANCIERE INSERTION;Informer, conseiller;;;; +AD - INSERTION SOCIALE PROFESSIONNELLE;JEUNES 16/25 AIDE FINANCIERE INSERTION;Demander une aide FAJ;;Objectif : SU bons alimentaires;; +AD - INSERTION SOCIALE PROFESSIONNELLE;JEUNES 16/25 AIDE FINANCIERE INSERTION;Demander une aide FAJ;;Objectif : SU bons hygiène;; +AD - INSERTION SOCIALE PROFESSIONNELLE;JEUNES 16/25 AIDE FINANCIERE INSERTION;Demander une aide FAJ;;Objectif : SU bons carburant;; +AD - INSERTION SOCIALE PROFESSIONNELLE;JEUNES 16/25 AIDE FINANCIERE INSERTION;Demander une aide FAJ;;Objectif : SU virement;; +AD - INSERTION SOCIALE PROFESSIONNELLE;JEUNES 16/25 AIDE FINANCIERE INSERTION;Solliciter le comité FAJ;;Objectif : Aide financière;; +AD - INSERTION SOCIALE PROFESSIONNELLE;JEUNES 16/25 AIDE FINANCIERE INSERTION;Solliciter le comité FAJ;;Objectif : Action d’accompagnement;; +AD - SANTE;;Informer, conseiller;;;; +AD - SANTE;;Orienter vers une structure de soins (CMP, psychologue, cure, …);;;; +AD - SANTE;;Instruire un dossier MDPH;;;; +AD - SANTE;;Accompagner le dépôt de dossier de pension d'invalidité;;;; +AD - SANTE;;Instruire le dossier Complémentaire santé ACS;;;; +AD – ACCOMPAGNEMENT SPECIFIQUE;;Informer, conseiller;;;; +AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Procéder à une élection de domicile;; +AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Demander une aide financière;; +AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Demander un interprète;; +AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Prendre contact avec le CADA;; +AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Aider à la constitution de dossier auprès de la préfecture;; +AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Faire le lien avec les associations;; +AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Demander une aide médicale d'état;; +AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Demander une carte mobilité;; +AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Accompagner pour la scolarité des enfants (crèches, collège, péri scolaire, cantine…);; +AD – ACCOMPAGNEMENT SPECIFIQUE;;Accompagner des publics spécifiques;;Objectif : Aider à la compréhension du français;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Informer, conseiller;;;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Orienter vers une autre structure;;;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Instruire une première demande d'Accompagnement Educatif de Prevention;;;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Demander le renouvellement de l'Accompagnement Educatif de Prévention;;;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Problèmatique : : Conduite à risque / Passage à l'acte isolé de l'enfant/adolescent;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Problèmatique : Comportement de l'enfant/adolescent en difficulté avec les limites, les interdits, les règles sociales;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Problèmatique : Difficultés de l'enfant en milieu scolaire ou extra-scolaire;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Problèmatique : Difficultés liées à la prise d'autonomie;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Problèmatique : Evènement - Traumatisme qui affecte l'équilibre familial;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Problèmatique : Problème de communication intrafamiliale;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Problèmatique : Parents démunis sur le plan éducatif;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Problèmatique : conflits parentaux ayant des résonnances sur l'enfant/l'adolescent;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Objectif : travailler la place de chacun;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Objectif : Conseiller et soutenir le positionnement éducatif;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Objectif : Accompagner la relation parent-enfant;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Objectif : Accompagner les parents en lien avec les lieux de scolarisation et de socialisation de leurs enfants;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Objectif : Accompagner/orienter les parents en lien avec les lieux de soins ;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Objectif : Accompagnement d’un jeune majeur;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Objectif : évaluation / Orientation;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Dispositif : mise en place TISF;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Dispositif : Mise en place AED;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Dispositif : Mise en place CJM;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Dispositif : Mise en place d'un AP;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Dispositif : Transmission judiciaire pour AEMO;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Dispositif : Tramsmission judiciaire pour MJIE;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Excercer un Accompagnement Educatif de Prévention;;Dispositif : Transmission judiciaire pour une mesure de protection;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Arrêt à l’initiative de la famille; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Souhait interruption momentanée de l’accompagnement par la famille ; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Orientation vers un partenaire extérieur; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Relais avec AS et/ou Puér; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Arrêt à échéance; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Transmission à l’ASE pour une mesure administrative; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Transmission à l’ASE pour une mesure judiciaire; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Renouvellement de l’AEP dans l’attente d’une mesure ASE; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Conclure un Accompagnement Educatif de Prévention;;;Résultat : Renouvellement de l’AEP pour poursuivre les objectifs engagés; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Réaliser une permanence éducative;;;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Médiatiser les relations familiales;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander le passage en IRCP;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une mise en place TISF;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander le renouvellement TISF;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une mise en place AED;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une mise en place AESF;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une mise en place d'un AP (accueil provisoire);; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une mesure ASMI;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une entrée en centre maternelle;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une entrée en centre parental;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une entrée en Unité Mère Enfant (UME);; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une MJAGBF;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une AED TDC;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander la désignation un TDC;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander un CAP ASE;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une AMAE (allocation mensuelle d'aide éducative);; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une allocation socio-éducatif spécifique;; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander un CAFI (aides fi);; +ENFANT / FAMILLE;SOUTIEN A LA PARENTALITE;Solliciter les moyens dans le cadre d'un accompagnement à la parentalité ;;Demander une autre aide (associations…);; +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter la CRIP;;Motif : arrêt de l'adhésion des parents à l'accompagnement du soutien à la parentalité;; +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter la CRIP;;Motif : violence intra-familiale;; +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter la CRIP;;Motif : suite à une ISG;; +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter la CRIP;;;Faire une FRIP; +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter la CRIP;;;Demander une MJIE; +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter la CRIP;;;Demander une mesure de protection; +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter la CRIP;;;Demander un OPP; +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter la CRIP;;;Demander un placement; +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter l'ASE (RJA) pour situation connue;;Motif : arrêt de l'adhésion des parents à l'accompagnement du soutien à la parentalité;; +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter l'ASE (RJA) pour situation connue;;Motif : violence intra-familiale;; +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter l'ASE (RJA) pour situation connue;;Motif : suite à une ISG;; +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter l'ASE (RJA) pour situation connue;;;Demander une MJIE; +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter l'ASE (RJA) pour situation connue;;;Demander une mesure de protection; +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter l'ASE (RJA) pour situation connue;;;Demander un OPP; +ENFANT / FAMILLE;ENFANT PREVENTION;Alerter l'ASE (RJA) pour situation connue;;;Demander un placement; +ENFANT / FAMILLE;ENFANT PREVENTION;Répondre à Eléments en votre possession;;;; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation IP pour la CRIP;;;Evaluation sans suite; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation IP pour la CRIP;;;Evaluation demande d'accompagnement médico-sociale; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation IP pour la CRIP;;;Evaluation pur demande de MJIE; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation IP pour la CRIP;;;Evaluation pour demande d'AEMO; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation IP pour la CRIP;;;Evaluation pour demande de placement; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation IP pour la CRIP;;;Evaluation pour demande d'OPP; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation IP pour la CRIP;;;Note complémentaire actualisation; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation pour l'ASE;;;Evaluation sans suite; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation pour l'ASE;;;Evaluation demande d'accompagnement médico-sociale; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation pour l'ASE;;;Evaluation pur demande de MJIE; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation pour l'ASE;;;Evaluation pour demande d'AEMO; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation pour l'ASE;;;Evaluation pour demande de placement; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation pour l'ASE;;;Evaluation pour demande d'OPP; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Réaliser une Evaluation pour l'ASE;;;Note complémentaire actualisation; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Mettre en place un accompagnement médicosocial suite à une IP;;Demander un AEP;; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Mettre en place un accompagnement médicosocial suite à une IP;;Demander une mise en place AED;; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Mettre en place un accompagnement médicosocial suite à une IP;;Demander une mise en place TISF;; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Mettre en place un accompagnement médicosocial suite à une IP;;Demander la mise en place d'un Accueil Provisoire;; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Mettre en place un accompagnement médicosocial suite à une IP;;Demander l'orientation vers d'autres structures (soins, MDA, …);; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Mettre en place un accompagnement médicosocial suite à une IP;;Demander l'entrée en centre maternel ;; +ENFANT / FAMILLE;INFORMATIONS PREOCCUPANTES;Mettre en place un accompagnement médicosocial suite à une IP;;Demander l'entrée unité mère / enfant;; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Informer, conseiller;;;; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Protéger des violences intra familiales;;Orienter vers SOS femme;; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Protéger des violences intra familiales;;Proposer un conseiller ou une thérapie conjugale;; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Protéger des violences intra familiales;;Proposer une médiation familiale;; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Protéger des violences intra familiales;;Aider au dépôt de plainte;; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Protéger des violences intra familiales;;Signaler un adulte vulnérable au procureur ;; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Protéger des violences intra familiales;;Demander une mesure de protection majeur;; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Protéger des violences intra familiales;;Faire une FRIP pour enfant en danger;; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Protéger des violences intra familiales;;Instruire la fiche VIF;; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Conseiller ;; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Problématique : VIF;; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Problématique : Difficultés éducatives;; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Problématique : Protection de l’enfance;; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Problématique : Violences sexuelles;; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Problématique : Information suite à une séparation;; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Orienter vers l'AS de secteur;; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Orienter vers SOS femme;; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Orienter vers un accompagnement CMP/libéral;; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Orienter vers un conseiller ou thérapeute conjugal;; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Aider au dépôt de plainte;; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Signaler un adulte vulnérable au procureur ;; +ENFANT / FAMILLE;VIOLENCES INTRA-FAMILIALES;Réaliser l'intervention sociale en gendarmerie;;Demander une mesure de protection majeur;; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Accompagner le lieu d'accueil;;;; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Mettre en place un soutien parental;;Mise en place TISF;; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Mettre en place un soutien parental;;Demande aide financière / SU;; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Mettre en place un soutien parental;;Demande SU;; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Mettre en place un soutien parental;;Participation à des actions collectives;; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Mettre en place un soutien parental;;Mise en place d'un loisir familial ;; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Mettre en place un soutien parental;;Mise en place d'une aide transport;; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Accompagner le mineur;;Demande mise en place d'un accompagnement psychologique;; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Accompagner le mineur;;Construire le PPE;; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Accompagner le mineur;;Mise en place CJM;; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Accompagner le mineur;;Demande MDPH ;; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Accompagner le mineur;;Organiser la mise en place d'un loisir;; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Elaborer le lien partenarial;;;; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Demander une protection majeur vulnérable;;;; +ENFANT PROTECTION;ACCUEIL PROVISOIRE;Demande de MJIE (mesure judiciaire d'investigation éducative);;;; +ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT DANS UN LIEU D'ACCUEIL;Accompagner le lieu d'accueil;;;; +ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT DANS UN LIEU D'ACCUEIL;Mettre en place un soutien parental;;Mise en place TISF;; +ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT DANS UN LIEU D'ACCUEIL;Mettre en place un soutien parental;;Demande aide financière;; +ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT DANS UN LIEU D'ACCUEIL;Mettre en place un soutien parental;;Demande SU;; +ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT DANS UN LIEU D'ACCUEIL;Mettre en place un soutien parental;;Demande de protection majeur vulnérable;; +ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT DANS UN LIEU D'ACCUEIL;Accompagner le mineur;;;; +ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT DANS UN LIEU D'ACCUEIL;Elaborer le lien partenarial;;;; +ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT CHEZ LE PARENT;Mettre en place un soutien parental;;;; +ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT CHEZ LE PARENT;Accompagner le mineur;;Construire le PPE;; +ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT CHEZ LE PARENT;Accompagner le mineur;;Mise en place CJM;; +ENFANT PROTECTION;ASSISTANCE EDUCATIVE DE PLACEMENT CHEZ LE PARENT;Accompagner le mineur;;Organiser la participation à un camp de vacances;; +ENFANT PROTECTION;DELEGATION D'AUTORITE PARENTALE;Accompagner le lieu d'accueil;;;; +ENFANT PROTECTION;DELEGATION D'AUTORITE PARENTALE;Accompagner le mineur;;;; +ENFANT PROTECTION;DELEGATION D'AUTORITE PARENTALE;Elaborer le lien partenarial;;;; +ENFANT PROTECTION;TUTELLE DEPARTEMENTALE;;;;; +ENFANT PROTECTION;TUTELLE D'ETAT;Accompagner le lieu d'accueil;;;; +ENFANT PROTECTION;TUTELLE D'ETAT;Accompagner le mineur;;;; +ENFANT PROTECTION;TUTELLE D'ETAT;Elaborer le lien partenarial;;;; +ENFANT PROTECTION;AEMO TDC;Accompagner le lieu d'accueil;;;; +ENFANT PROTECTION;AEMO TDC;Mettre en place un soutien parental;;;; +ENFANT PROTECTION;AEMO TDC;Accompagner le mineur;;;; +ENFANT PROTECTION;AEMO TDC;Elaborer le lien partenarial;;;; +ENFANT PROTECTION;AEMO FAMILLE;Mettre en place un soutien parental;;;; +ENFANT PROTECTION;AEMO FAMILLE;Accompagner le mineur;;;; +ENFANT PROTECTION;AEMO FAMILLE;Elaborer le lien partenarial;;;; +AGREMENT;ASSISTANT MATERNEL;Instruire une première demande;;;; +AGREMENT;ASSISTANT MATERNEL;Instruire un renouvellement;;;; +AGREMENT;ASSISTANT MATERNEL;Instruire une modification;;;; +AGREMENT;ASSISTANT MATERNEL;Suivre un(e) ASSMAT;;;; +AGREMENT;ASSISTANT MATERNEL;Contrôler un(e) ASSMAT;;;; +AGREMENT;ASSISTANT MATERNEL;Accompagner un(e) ASSMAT;;;; +AGREMENT;ASSISTANT FAMILIAL;Instruire une première demande;;;; +AGREMENT;ASSISTANT FAMILIAL;Instruire un renouvellement;;;; +AGREMENT;ASSISTANT FAMILIAL;Instruire une modification;;;; +AGREMENT;ASSISTANT FAMILIAL;Suivre un(e) ASSFAM;;;; +AGREMENT;ASSISTANT FAMILIAL;Contrôler un(e) ASSFAM;;;; +AGREMENT;ASSISTANT FAMILIAL;Accompagner un(e) ASSFAM;;;; +AGREMENT;FAMILLE D'ACCUEIL PA/PH;Contribuer à l'évaluation si Famille d'Accueil connue;;Première demande;; +AGREMENT;FAMILLE D'ACCUEIL PA/PH;Contribuer à l'évaluation si Famille d'Accueil connue;;Renouvellement;; +AGREMENT;FAMILLE D'ACCUEIL PA/PH;Contribuer à l'évaluation si Famille d'Accueil connue;;Modification;; +AGREMENT;FAMILLE D'ACCUEIL PA/PH;Contribuer à l'évaluation si Famille d'Accueil connue;;Suivi;; diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php index dda129296..830a9e48e 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php @@ -841,7 +841,9 @@ class AccompanyingPeriod implements TrackCreationInterface, TrackUpdateInterface public function addSocialIssue(SocialIssue $socialIssue): self { - $this->socialIssues[] = $socialIssue; + if (!$this->socialIssues->contains($socialIssue)) { + $this->socialIssues[] = $socialIssue; + } return $this; } diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php index 620c5bba7..b0ddd7bab 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php @@ -19,6 +19,9 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") + * + * @internal the default name exceeds 64 characters, we must set manually: + * @ORM\SequenceGenerator(sequenceName="chill_person_social_work_eval_doc_id_seq", allocationSize=1, initialValue=1000) */ private ?int $id; /** diff --git a/src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php b/src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php index e08a6de77..adc7f54fb 100644 --- a/src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php +++ b/src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php @@ -23,17 +23,20 @@ class Evaluation private $title = []; /** - * @ORM\Column(type="dateinterval", nullable=true) + * @ORM\Column(type="dateinterval", nullable=true, options={"default": null}) */ private $delay; /** - * @ORM\Column(type="dateinterval") + * @ORM\Column(type="dateinterval", nullable=true, options={"default": null}) */ private $notificationDelay; /** - * @ORM\ManyToOne(targetEntity=SocialAction::class) + * @ORM\ManyToOne( + * targetEntity=SocialAction::class, + * inversedBy="evaluations" + * ) */ private $socialAction; diff --git a/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialAction.php b/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialAction.php index 506a736d8..bb05c900e 100644 --- a/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialAction.php +++ b/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialAction.php @@ -68,6 +68,15 @@ class SocialAction */ private $results; + /** + * @var Collection + * @ORM\OneToMany( + * targetEntity=Evaluation::class, + * mappedBy="socialAction" + * ) + */ + private Collection $evaluations; + public function __construct() { $this->children = new ArrayCollection(); @@ -257,4 +266,12 @@ class SocialAction return $this; } + + /** + * @return Collection + */ + public function getEvaluations(): Collection + { + return $this->evaluations; + } } diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php index b0578c994..f9d1b060f 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php @@ -25,6 +25,7 @@ namespace Chill\PersonBundle\Repository; use Chill\PersonBundle\Entity\AccompanyingPeriod; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; +use Doctrine\ORM\QueryBuilder; use Doctrine\Persistence\ObjectRepository; final class AccompanyingPeriodRepository implements ObjectRepository @@ -48,7 +49,7 @@ final class AccompanyingPeriodRepository implements ObjectRepository return $this->repository->findAll(); } - public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): ?AccompanyingPeriod + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } @@ -62,5 +63,4 @@ final class AccompanyingPeriodRepository implements ObjectRepository { return AccompanyingPeriod::class; } - } diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20210730094514.php b/src/Bundle/ChillPersonBundle/migrations/Version20210730094514.php index 2748be7fd..a96d0fd58 100644 --- a/src/Bundle/ChillPersonBundle/migrations/Version20210730094514.php +++ b/src/Bundle/ChillPersonBundle/migrations/Version20210730094514.php @@ -19,7 +19,7 @@ final class Version20210730094514 extends AbstractMigration public function up(Schema $schema): void { - $this->addSql('CREATE SEQUENCE chill_person_accompanying_period_work_evaluation_document_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE chill_person_accompanying_period_work_eval_doc_id_seq INCREMENT BY 1 MINVALUE 1 START 1000'); $this->addSql('CREATE TABLE chill_person_accompanying_period_work_evaluation_document (id INT NOT NULL, createdAt DATE DEFAULT NULL, updatedAt DATE DEFAULT NULL, accompanyingPeriodWorkEvaluation_id INT DEFAULT NULL, createdBy_id INT DEFAULT NULL, updatedBy_id INT DEFAULT NULL, PRIMARY KEY(id))'); $this->addSql('CREATE INDEX IDX_33EC9229836F75B8 ON chill_person_accompanying_period_work_evaluation_document (accompanyingPeriodWorkEvaluation_id)'); $this->addSql('CREATE INDEX IDX_33EC92293174800F ON chill_person_accompanying_period_work_evaluation_document (createdBy_id)'); @@ -40,7 +40,7 @@ final class Version20210730094514 extends AbstractMigration $this->addSql('COMMENT ON COLUMN chill_calendar.calendar_range.startdate IS \'(DC2Type:datetimetz_immutable)\''); $this->addSql('COMMENT ON COLUMN chill_calendar.calendar_range.enddate IS \'(DC2Type:datetimetz_immutable)\''); $this->addSql('DROP TABLE chill_person_accompanying_period_work_evaluation_document'); - $this->addSql('DROP SEQUENCE chill_person_accompanying_period_work_evaluation_document_id_seq'); + $this->addSql('DROP SEQUENCE chill_person_accompanying_period_work_eval_doc_id_seq'); $this->addSql('ALTER TABLE chill_person_accompanying_period_work DROP CONSTRAINT FK_B694FB365FF1AEC'); $this->addSql('DROP INDEX IDX_B694FB365FF1AEC'); } diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20210730205407.php b/src/Bundle/ChillPersonBundle/migrations/Version20210730205407.php new file mode 100644 index 000000000..0904856c4 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/migrations/Version20210730205407.php @@ -0,0 +1,31 @@ +addSql('ALTER TABLE chill_person_social_work_evaluation ALTER delay DROP NOT NULL'); + $this->addSql('ALTER TABLE chill_person_social_work_evaluation ALTER notificationdelay DROP NOT NULL'); + } + + public function down(Schema $schema): void + { + $this->addSql('ALTER TABLE chill_person_social_work_evaluation ALTER delay SET NOT NULL'); + $this->addSql('ALTER TABLE chill_person_social_work_evaluation ALTER notificationDelay SET NOT NULL'); + } +} From 9f7c0dcd0940025a1e590dddb80db1a29a4c6038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Sat, 31 Jul 2021 23:16:00 +0200 Subject: [PATCH 074/100] adding addresses to accompanying period --- .../DataFixtures/ORM/LoadPeople.php | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadPeople.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadPeople.php index fbb66b6bb..474cd1216 100644 --- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadPeople.php +++ b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadPeople.php @@ -21,14 +21,18 @@ namespace Chill\PersonBundle\DataFixtures\ORM; +use Chill\MainBundle\Entity\PostalCode; use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Entity\SocialWork\SocialIssue; +use Chill\ThirdPartyBundle\Entity\ThirdParty; use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\DataFixtures\OrderedFixtureInterface; use Doctrine\Persistence\ObjectManager; use Chill\PersonBundle\Entity\Person; use Faker\Factory; use Faker\Generator; +use Nelmio\Alice\Loader\NativeLoader; +use Nelmio\Alice\ObjectSet; use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Chill\MainBundle\DataFixtures\ORM\LoadPostalCodes; use Chill\MainBundle\Entity\Address; @@ -215,6 +219,8 @@ class LoadPeople extends AbstractFixture implements OrderedFixtureInterface, Con $accompanyingPeriod->addSocialIssue($this->getRandomSocialIssue()); if (\random_int(0, 10) > 3) { + $accompanyingPeriod->setAddressLocation($this->createAddress()); + $manager->persist($accompanyingPeriod->getAddressLocation()); $workflow = $this->workflowRegistry->get($accompanyingPeriod); $workflow->apply($accompanyingPeriod, 'confirm'); } @@ -262,6 +268,29 @@ class LoadPeople extends AbstractFixture implements OrderedFixtureInterface, Con echo "add person'".$p->__toString()."'\n"; } + private function createAddress(): Address + { + $loader = new NativeLoader(); + $objectSet = $loader->loadData([ + Address::class => [ + 'address' => [ + 'street' => '', + 'streetNumber' => '', + 'validFrom' => '', + 'postCode' => $this->getPostalCode() + ], + ], + ]); + + return $objectSet->getObjects()['address']; + } + + private function getPostalCode(): PostalCode + { + $ref = LoadPostalCodes::$refs[\array_rand(LoadPostalCodes::$refs)]; + + return $this->getReference($ref); + } /** * Create a random point From 6544566c3408584763ec0ff8e1a158ec59bf0f85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Sun, 1 Aug 2021 22:59:13 +0200 Subject: [PATCH 075/100] fix test PersonSearch by adding html node filtering --- .../Tests/Search/PersonSearchTest.php | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Tests/Search/PersonSearchTest.php b/src/Bundle/ChillPersonBundle/Tests/Search/PersonSearchTest.php index 50037e5de..73a20ece7 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Search/PersonSearchTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Search/PersonSearchTest.php @@ -38,7 +38,7 @@ class PersonSearchTest extends WebTestCase 'q' => '@person Depardieu' )); - $this->assertRegExp('/Depardieu/', $crawler->text()); + $this->assertRegExp('/Depardieu/', $crawler->filter('.list-with-period')->text()); } public function testExpectedNamed() @@ -49,82 +49,82 @@ class PersonSearchTest extends WebTestCase 'q' => '@person Depardieu', 'name' => 'person_regular' )); - $this->assertRegExp('/Depardieu/', $crawler->text()); + $this->assertRegExp('/Depardieu/', $crawler->filter('.list-with-period')->text()); } public function testSearchByLastName() { $crawler = $this->generateCrawlerForSearch('@person lastname:Depardieu'); - $this->assertRegExp('/Depardieu/', $crawler->text()); + $this->assertRegExp('/Depardieu/', $crawler->filter('.list-with-period')->text()); } public function testSearchByFirstNameLower() { $crawler = $this->generateCrawlerForSearch('@person firstname:Gérard'); - $this->assertRegExp('/Depardieu/', $crawler->text()); + $this->assertRegExp('/Depardieu/', $crawler->filter('.list-with-period')->text()); } public function testSearchByFirstNamePartim() { $crawler = $this->generateCrawlerForSearch('@person firstname:Ger'); - $this->assertRegExp('/Depardieu/', $crawler->text()); + $this->assertRegExp('/Depardieu/', $crawler->filter('.list-with-period')->text()); } public function testLastNameAccentued() { $crawlerSpecial = $this->generateCrawlerForSearch('@person lastname:manço'); - $this->assertRegExp('/Manço/', $crawlerSpecial->text()); + $this->assertRegExp('/Manço/', $crawlerSpecial->filter('.list-with-period')->text()); $crawlerNoSpecial = $this->generateCrawlerForSearch('@person lastname:manco'); - $this->assertRegExp('/Manço/', $crawlerNoSpecial->text()); + $this->assertRegExp('/Manço/', $crawlerNoSpecial->filter('.list-with-period')->text()); } public function testSearchByFirstName() { $crawler = $this->generateCrawlerForSearch('@person firstname:Jean'); - $this->assertRegExp('/Depardieu/', $crawler->text()); + $this->assertRegExp('/Depardieu/', $crawler->filter('.list-with-period')->text()); } public function testSearchByFirstNameLower2() { $crawler = $this->generateCrawlerForSearch('@person firstname:jean'); - $this->assertRegExp('/Depardieu/', $crawler->text()); + $this->assertRegExp('/Depardieu/', $crawler->filter('.list-with-period')->text()); } public function testSearchByFirstNamePartim2() { $crawler = $this->generateCrawlerForSearch('@person firstname:ean'); - $this->assertRegExp('/Depardieu/', $crawler->text()); + $this->assertRegExp('/Depardieu/', $crawler->filter('.list-with-period')->text()); } public function testSearchByFirstNameAccented() { $crawlerSpecial = $this->generateCrawlerForSearch('@person firstname:Gérard'); - $this->assertRegExp('/Gérard/', $crawlerSpecial->text()); + $this->assertRegExp('/Gérard/', $crawlerSpecial->filter('.list-with-period')->text()); $crawlerNoSpecial = $this->generateCrawlerForSearch('@person firstname:Gerard'); - $this->assertRegExp('/Gérard/', $crawlerNoSpecial->text()); + $this->assertRegExp('/Gérard/', $crawlerNoSpecial->filter('.list-with-period')->text()); } public function testSearchCombineLastnameAndNationality() { $crawler = $this->generateCrawlerForSearch('@person lastname:Depardieu nationality:RU'); - $this->assertRegExp('/Gérard/', $crawler->text()); + $this->assertRegExp('/Gérard/', $crawler->filter('.list-with-period')->text()); //if this is a AND clause, Jean Depardieu should not appears - $this->assertNotRegExp('/Jean/', $crawler->text(), + $this->assertNotRegExp('/Jean/', $crawler->filter('.list-with-period')->text(), "assert clause firstname and nationality are AND"); } @@ -132,9 +132,9 @@ class PersonSearchTest extends WebTestCase { $crawler = $this->generateCrawlerForSearch('@person lastname:Depardieu firstname:Jean'); - $this->assertRegExp('/Depardieu/', $crawler->text()); + $this->assertRegExp('/Depardieu/', $crawler->filter('.list-with-period')->text()); //if this is a AND clause, Jean Depardieu should not appears - $this->assertNotRegExp('/Gérard/', $crawler->text(), + $this->assertNotRegExp('/Gérard/', $crawler->filter('.list-with-period')->text(), "assert clause firstname and nationality are AND"); } @@ -142,54 +142,54 @@ class PersonSearchTest extends WebTestCase { $crawler = $this->generateCrawlerForSearch('@person birthdate:1948-12-27'); - $this->assertRegExp('/Gérard/', $crawler->text()); - $this->assertRegExp('/Bart/', $crawler->text()); + $this->assertRegExp('/Gérard/', $crawler->filter('.list-with-period')->text()); + $this->assertRegExp('/Bart/', $crawler->filter('.list-with-period')->text()); } public function testSearchCombineBirthdateAndLastName() { $crawler = $this->generateCrawlerForSearch('@person birthdate:1948-12-27 lastname:(Van Snick)'); - $this->assertRegExp('/Bart/', $crawler->text()); - $this->assertNotRegExp('/Depardieu/', $crawler->text()); + $this->assertRegExp('/Bart/', $crawler->filter('.list-with-period')->text()); + $this->assertNotRegExp('/Depardieu/', $crawler->filter('.list-with-period')->text()); } public function testSearchCombineGenderAndLastName() { $crawler = $this->generateCrawlerForSearch('@person gender:woman lastname:(Depardieu)'); - $this->assertRegExp('/Charline/', $crawler->text()); - $this->assertNotRegExp('/Gérard/', $crawler->text()); + $this->assertRegExp('/Charline/', $crawler->filter('.list-with-period')->text()); + $this->assertNotRegExp('/Gérard/', $crawler->filter('.list-with-period')->text()); } public function testSearchMultipleTrigramUseAndClauseInDefault() { $crawler = $this->generateCrawlerForSearch('@person cha dep'); - $this->assertRegExp('/Charline/', $crawler->text()); - $this->assertNotRegExp('/Gérard/', $crawler->text()); - $this->assertNotRegExp('/Jean/', $crawler->text()); + $this->assertRegExp('/Charline/', $crawler->filter('.list-with-period')->text()); + $this->assertNotRegExp('/Gérard/', $crawler->filter('.list-with-period')->text()); + $this->assertNotRegExp('/Jean/', $crawler->filter('.list-with-period')->text()); } public function testDefaultAccented() { $crawlerSpecial = $this->generateCrawlerForSearch('@person manço'); - $this->assertRegExp('/Manço/', $crawlerSpecial->text()); + $this->assertRegExp('/Manço/', $crawlerSpecial->filter('.list-with-period')->text()); $crawlerNoSpecial = $this->generateCrawlerForSearch('@person manco'); - $this->assertRegExp('/Manço/', $crawlerNoSpecial->text()); + $this->assertRegExp('/Manço/', $crawlerNoSpecial->filter('.list-with-period')->text()); $crawlerSpecial = $this->generateCrawlerForSearch('@person Étienne'); - $this->assertRegExp('/Étienne/', $crawlerSpecial->text()); + $this->assertRegExp('/Étienne/', $crawlerSpecial->filter('.list-with-period')->text()); $crawlerNoSpecial = $this->generateCrawlerForSearch('@person etienne'); - $this->assertRegExp('/Étienne/', $crawlerNoSpecial->text()); + $this->assertRegExp('/Étienne/', $crawlerNoSpecial->filter('.list-with-period')->text()); } /** From 5635d19252bea02c707cf2ae089918950177bf7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 2 Aug 2021 00:13:08 +0200 Subject: [PATCH 076/100] [accompanyingPeriodWork] add evaluation to normalizer --- .../AccompanyingPeriodWork.php | 38 ++++- .../AccompanyingPeriodWorkEvaluation.php | 83 +++++++++-- ...companyingPeriodWorkEvaluationDocument.php | 49 +++++++ .../Entity/SocialWork/Evaluation.php | 8 ++ .../AccompanyingPeriodWorkDenormalizer.php | 132 ++++++++++++++++++ 5 files changed, 297 insertions(+), 13 deletions(-) create mode 100644 src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkDenormalizer.php diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php index c491ee94d..f97f8a243 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php @@ -164,8 +164,12 @@ use Symfony\Component\Validator\Constraints as Assert; * @var Collection * @ORM\OneToMany( * targetEntity=AccompanyingPeriodWorkEvaluation::class, - * mappedBy="accompanyingPeriodWork" + * mappedBy="accompanyingPeriodWork", + * cascade={"persist"}, + * orphanRemoval=true * ) + * @Serializer\Groups({"read"}) + * @internal /!\ the serialization for read / write evaluations is handled in `AccompanyingPeriodWorkDenormalizer` */ private Collection $accompanyingPeriodWorkEvaluations; @@ -398,6 +402,11 @@ use Symfony\Component\Validator\Constraints as Assert; return $this->thirdParties; } + public function getThirdPartys(): Collection + { + return $this->getThirdParties(); + } + public function addThirdParty(ThirdParty $thirdParty): self { if (!$this->thirdParties->contains($thirdParty)) { @@ -434,4 +443,31 @@ use Symfony\Component\Validator\Constraints as Assert; return $this; } + + /** + * @return Collection + */ + public function getAccompanyingPeriodWorkEvaluations() + { + return $this->accompanyingPeriodWorkEvaluations; + } + + public function addAccompanyingPeriodWorkEvaluation(AccompanyingPeriodWorkEvaluation $evaluation): self + { + if (!$this->accompanyingPeriodWorkEvaluations->contains($evaluation)) { + $this->accompanyingPeriodWorkEvaluations[] = $evaluation; + $evaluation->setAccompanyingPeriodWork($this); + } + + return $this; + } + + public function removeAccompanyingPeriodWorkEvaluation(AccompanyingPeriodWorkEvaluation $evaluation): self + { + $this->accompanyingPeriodWorkEvaluations + ->removeElement($evaluation); + $evaluation->setAccompanyingPeriodWork(null); + + return $this; + } } diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php index ea7fa57b1..cce032621 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php @@ -12,10 +12,14 @@ use DateTimeImmutable; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; +use Symfony\Component\Serializer\Annotation as Serializer; /** * @ORM\Entity * @ORM\Table("chill_person_accompanying_period_work_evaluation") + * @Serializer\DiscriminatorMap(typeProperty="type", mapping={ + * "accompanying_period_work_evaluation"=AccompanyingPeriodWorkEvaluation::class, + * }) */ class AccompanyingPeriodWorkEvaluation implements TrackUpdateInterface, TrackCreationInterface { @@ -23,8 +27,9 @@ class AccompanyingPeriodWorkEvaluation implements TrackUpdateInterface, TrackCre * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") + * @Serializer\Groups({"read"}) */ - private ?int $id; + private ?int $id = null; /** * @ORM\ManyToOne( @@ -32,60 +37,82 @@ class AccompanyingPeriodWorkEvaluation implements TrackUpdateInterface, TrackCre * inversedBy="accompanyingPeriodWorkEvaluations" * ) */ - private ?AccompanyingPeriodWork $accompanyingPeriodWork; + private ?AccompanyingPeriodWork $accompanyingPeriodWork = null; /** * @ORM\ManyToOne( * targetEntity=Evaluation::class * ) + * @Serializer\Groups({"read"}) + * @Serializer\Groups({"accompanying_period_work_evaluation:create"}) */ - private ?Evaluation $evaluation; + private ?Evaluation $evaluation = null; /** * @ORM\Column(type="date_immutable", nullable=true, options={"default": null}) + * @Serializer\Groups({"read"}) + * @Serializer\Groups({"write"}) + * @Serializer\Groups({"accompanying_period_work_evaluation:create"}) */ - private ?DateTimeImmutable $startDate; + private ?DateTimeImmutable $startDate = null; /** * @ORM\Column(type="date_immutable", nullable=true, options={"default": null}) + * @Serializer\Groups({"read"}) + * @Serializer\Groups({"write"}) + * @Serializer\Groups({"accompanying_period_work_evaluation:create"}) */ - private ?DateTimeImmutable $endDate; + private ?DateTimeImmutable $endDate = null; /** * @ORM\Column(type="date_immutable", nullable=true, options={"default": null}) + * @Serializer\Groups({"read"}) + * @Serializer\Groups({"accompanying_period_work_evaluation:create"}) */ - private ?DateTimeImmutable $maxDate; + private ?DateTimeImmutable $maxDate = null; /** * @ORM\Column(type="dateinterval", nullable=true, options={"default": null}) + * @Serializer\Groups({"read"}) + * @Serializer\Groups({"accompanying_period_work_evaluation:create"}) */ - private ?DateInterval $warningInterval; + private ?DateInterval $warningInterval = null; + /** + * @var string + * @Serializer\Groups({"read"}) + * @Serializer\Groups({"write"}) + * @Serializer\Groups({"accompanying_period_work_evaluation:create"}) + */ private string $comment = ''; /** * @ORM\ManyToOne( * targetEntity=User::class * ) - */ - private ?User $createdBy; + * @Serializer\Groups({"read"}) + */ + private ?User $createdBy = null; /** * @ORM\Column(type="date_immutable", nullable=true, options={"default": null}) + * @Serializer\Groups({"read"}) */ - private ?DateTimeImmutable $createdAt; + private ?DateTimeImmutable $createdAt = null; /** * @ORM\ManyToOne( * targetEntity=User::class * ) + * @Serializer\Groups({"read"}) */ - private ?User $updatedBy; + private ?User $updatedBy = null; /** * @ORM\Column(type="date_immutable", nullable=true, options={"default": null}) + * @Serializer\Groups({"read"}) */ - private ?DateTimeImmutable $updatedAt; + private ?DateTimeImmutable $updatedAt = null; /** * @var Collection @@ -93,6 +120,7 @@ class AccompanyingPeriodWorkEvaluation implements TrackUpdateInterface, TrackCre * targetEntity=AccompanyingPeriodWorkEvaluationDocument::class, * mappedBy="accompanyingPeriodWorkEvaluation" * ) + * @Serializer\Groups({"read"}) */ private Collection $documents; @@ -123,6 +151,14 @@ class AccompanyingPeriodWorkEvaluation implements TrackUpdateInterface, TrackCre */ public function setAccompanyingPeriodWork(?AccompanyingPeriodWork $accompanyingPeriodWork): AccompanyingPeriodWorkEvaluation { + if ( + $accompanyingPeriodWork instanceof AccompanyingPeriodWork + && $this->accompanyingPeriodWork instanceof AccompanyingPeriodWork + && $this->accompanyingPeriodWork->getId() !== $accompanyingPeriodWork->getId()) { + throw new \RuntimeException("Changing the ". + "accompanyingPeriodWork is not allowed"); + } + $this->accompanyingPeriodWork = $accompanyingPeriodWork; return $this; } @@ -141,7 +177,20 @@ class AccompanyingPeriodWorkEvaluation implements TrackUpdateInterface, TrackCre */ public function setEvaluation(?Evaluation $evaluation): AccompanyingPeriodWorkEvaluation { + if ( + ($evaluation instanceof Evaluation + && $this->evaluation instanceof Evaluation + && $evaluation->getId() !== $this->evaluation->getId()) + || + ($this->evaluation instanceof Evaluation + && null === $evaluation) + ) { + throw new \LogicException("once set, an ${self::class} cannot + change or remove the linked Evaluation::class"); + } + $this->evaluation = $evaluation; + return $this; } @@ -306,4 +355,14 @@ class AccompanyingPeriodWorkEvaluation implements TrackUpdateInterface, TrackCre $this->updatedAt = $updatedAt; return $this; } + + /** + * @return Collection + */ + public function getDocuments() + { + return $this->documents; + } + + } diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php index b0ddd7bab..4d652f338 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php @@ -7,10 +7,14 @@ use Chill\MainBundle\Doctrine\Model\TrackCreationInterface; use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface; use Chill\MainBundle\Entity\User; use Doctrine\ORM\Mapping as ORM; +use Symfony\Component\Serializer\Annotation as Serializer; /** * @ORM\Entity * @ORM\Table("chill_person_accompanying_period_work_evaluation_document") + * @Serializer\DiscriminatorMap(typeProperty="type", mapping={ + * "accompanying_period_work_evaluation_document"=AccompanyingPeriodWorkEvaluationDocument::class + * }) */ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doctrine\Model\TrackCreationInterface, \Chill\MainBundle\Doctrine\Model\TrackUpdateInterface { @@ -22,8 +26,10 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct * * @internal the default name exceeds 64 characters, we must set manually: * @ORM\SequenceGenerator(sequenceName="chill_person_social_work_eval_doc_id_seq", allocationSize=1, initialValue=1000) + * @Serializer\Groups({"read"}) */ private ?int $id; + /** * @var AccompanyingPeriodWorkEvaluation|null * @ORM\ManyToOne( @@ -37,11 +43,13 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct * @ORM\ManyToOne( * targetEntity=User::class * ) + * @Serializer\Groups({"read"}) */ private ?User $createdBy; /** * @ORM\Column(type="date_immutable", nullable=true, options={"default": null}) + * @Serializer\Groups({"read"}) */ private ?\DateTimeImmutable $createdAt; @@ -49,11 +57,13 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct * @ORM\ManyToOne( * targetEntity=User::class * ) + * @Serializer\Groups({"read"}) */ private ?User $updatedBy; /** * @ORM\Column(type="date_immutable", nullable=true, options={"default": null}) + * @Serializer\Groups({"read"}) */ private ?DateTimeImmutable $updatedAt; @@ -121,5 +131,44 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct return $this; } + /** + * @return int|null + */ + public function getId(): ?int + { + return $this->id; + } + + /** + * @return User|null + */ + public function getCreatedBy(): ?User + { + return $this->createdBy; + } + + /** + * @return \DateTimeImmutable|null + */ + public function getCreatedAt(): ?\DateTimeInterface + { + return $this->createdAt; + } + + /** + * @return User|null + */ + public function getUpdatedBy(): ?User + { + return $this->updatedBy; + } + + /** + * @return DateTimeImmutable|null + */ + public function getUpdatedAt(): ?DateTimeInterface + { + return $this->updatedAt; + } } diff --git a/src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php b/src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php index adc7f54fb..f01b2a4c1 100644 --- a/src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php +++ b/src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php @@ -3,10 +3,14 @@ namespace Chill\PersonBundle\Entity\SocialWork; use Doctrine\ORM\Mapping as ORM; +use Symfony\Component\Serializer\Annotation as Serializer; /** * @ORM\Entity * @ORM\Table(name="chill_person_social_work_evaluation") + * @Serializer\DiscriminatorMap(typeProperty="type", mapping={ + * "social_work_evaluation"=Evaluation::class + * }) */ class Evaluation { @@ -14,21 +18,25 @@ class Evaluation * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") + * @Serializer\Groups({"read"}) */ private $id; /** * @ORM\Column(type="json") + * @Serializer\Groups({"read"}) */ private $title = []; /** * @ORM\Column(type="dateinterval", nullable=true, options={"default": null}) + * @Serializer\Groups({"read"}) */ private $delay; /** * @ORM\Column(type="dateinterval", nullable=true, options={"default": null}) + * @Serializer\Groups({"read"}) */ private $notificationDelay; diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkDenormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkDenormalizer.php new file mode 100644 index 000000000..4a8d51aa1 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkDenormalizer.php @@ -0,0 +1,132 @@ +workRepository = $workRepository; + $this->em = $em; + } + + /** + * @inheritDoc + */ + public function denormalize($data, string $type, string $format = null, array $context = []) + { + $work = $this->denormalizer->denormalize($data, $type, $format, \array_merge($context, + ['skip' => self::class])); + + if (\in_array('accompanying_period_work:edit', $context['groups'] ?? [])) { + $this->handleEvaluationCollection($data, $work, $format, $context); + } + + return $work; + } + + private function handleEvaluationCollection(array $data, AccompanyingPeriodWork $work, string $format, array $context) + { + $dataById = []; + $dataWithoutId = []; + foreach ($data['accompanyingPeriodWorkEvaluations'] as $e) { + if (\array_key_exists('id', $e)) { + $dataById[$e['id']] = $e; + } else { + $dataWithoutId[] = $e; + } + } + + // partition the separate kept evaluations and removed one + list($kept, $removed) = $work->getAccompanyingPeriodWorkEvaluations() + ->partition( + fn(int $key, AccompanyingPeriodWorkEvaluation $a) => \array_key_exists($a->getId(), $dataById) + ); + + // remove the evaluations from work + foreach ($removed as $r) { + $work->removeAccompanyingPeriodWorkEvaluation($r); + } + // handle the evaluation kept + foreach ($kept as $k) { + $this->denormalizer->denormalize( + $dataById[$k->getId()], + AccompanyingPeriodWorkEvaluation::class, + $format, + \array_merge( + $context, + [ + 'groups' => [ 'write' ], + AbstractNormalizer::OBJECT_TO_POPULATE => $k + ] + ) + ); + } + // create new evaluation + foreach ($dataWithoutId as $newData) { + $evaluation = $this->denormalizer->denormalize( + $newData, + AccompanyingPeriodWorkEvaluation::class, + $format, + \array_merge($context, ['groups' => [ 'accompanying_period_work_evaluation:create']] + ) + ); + $work->addAccompanyingPeriodWorkEvaluation($evaluation); + } + } + + /** + * @inheritDoc + */ + public function supportsDenormalization($data, string $type, string $format = null, array $context = []): bool + { + return $type === AccompanyingPeriodWork::class + && ($context['skip'] ?? null) !== self::class + && \is_array($data) + && \array_key_exists("type", $data) + && $data["type"] === 'accompanying_period_work'; + } + + +} From 320f16a121ddf74ea93680513b15d953c41a7892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 2 Aug 2021 22:43:09 +0200 Subject: [PATCH 077/100] [accompanyingPeriodWorkEvaluation] store comment in db --- .../AccompanyingPeriodWorkEvaluation.php | 1 + ...companyingPeriodWorkEvaluationDocument.php | 1 + .../migrations/Version20210802202838.php | 29 +++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 src/Bundle/ChillPersonBundle/migrations/Version20210802202838.php diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php index cce032621..cd4bb3ac4 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php @@ -80,6 +80,7 @@ class AccompanyingPeriodWorkEvaluation implements TrackUpdateInterface, TrackCre /** * @var string + * @ORM\Column(type="text", nullable=false, options={"default": ""}) * @Serializer\Groups({"read"}) * @Serializer\Groups({"write"}) * @Serializer\Groups({"accompanying_period_work_evaluation:create"}) diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php index 4d652f338..2c7ca1099 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php @@ -67,6 +67,7 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct */ private ?DateTimeImmutable $updatedAt; + // TODO: indiquer le document généré par le module "document" private ?StoredObject $storedObject; // TODO: ajouter gabarit diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20210802202838.php b/src/Bundle/ChillPersonBundle/migrations/Version20210802202838.php new file mode 100644 index 000000000..8ef9f59d2 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/migrations/Version20210802202838.php @@ -0,0 +1,29 @@ +addSql('ALTER TABLE chill_person_accompanying_period_work_evaluation ADD comment TEXT DEFAULT \'\' NOT NULL'); + } + + public function down(Schema $schema): void + { + $this->addSql('ALTER TABLE chill_person_accompanying_period_work_evaluation DROP comment'); + } +} From 44e85361e6eca63e3bfa990a2dda8f4d17058203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 2 Aug 2021 23:24:31 +0200 Subject: [PATCH 078/100] add endpoint for listing evaluation --- .../SocialWorkEvaluationApiController.php | 46 +++++++++++++++++++ .../ChillPersonBundle/chill.api.specs.yaml | 37 +++++++++++---- 2 files changed, 74 insertions(+), 9 deletions(-) create mode 100644 src/Bundle/ChillPersonBundle/Controller/SocialWorkEvaluationApiController.php diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWorkEvaluationApiController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWorkEvaluationApiController.php new file mode 100644 index 000000000..24b919978 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Controller/SocialWorkEvaluationApiController.php @@ -0,0 +1,46 @@ +paginatorFactory = $paginatorFactory; + } + + /** + * @Route("/api/1.0/person/social-work/evaluation/by-social-action/{action_id}.json", + * name="chill_person_evaluation_index_by_social_action", + * requirements={ + * "_format": "json" + * } + * ) + * @ParamConverter("action", options={"id": "action_id"}) + * @param SocialAction $action + * @return Response + */ + public function listEvaluationBySocialAction(SocialAction $action): Response + { + $pagination = $this->paginatorFactory->create($action->getEvaluations()->count()); + + $evaluations = $action->getEvaluations()->slice($pagination->getCurrentPageFirstItemNumber(), + $pagination->getItemsPerPage()); + $collection = new Collection($evaluations, $pagination); + + return $this->json($collection, Response::HTTP_OK, [], [ 'groups' => [ 'read' ]]); + } +} diff --git a/src/Bundle/ChillPersonBundle/chill.api.specs.yaml b/src/Bundle/ChillPersonBundle/chill.api.specs.yaml index 0684a352c..a9fc9f1cd 100644 --- a/src/Bundle/ChillPersonBundle/chill.api.specs.yaml +++ b/src/Bundle/ChillPersonBundle/chill.api.specs.yaml @@ -217,7 +217,7 @@ components: type: integer type: type: string - enum: + enum: - 'accompanying_period_work' note: type: string @@ -296,7 +296,7 @@ paths: $ref: "#/components/schemas/Person" 403: description: "Unauthorized" - + /1.0/person/person.json: post: tags: @@ -1035,7 +1035,7 @@ paths: get: tags: - person - summary: Return a list of all origins + summary: Return a list of all origins responses: 200: description: "ok" @@ -1043,7 +1043,7 @@ paths: /1.0/person/accompanying-period/origin/{id}.json: get: tags: - - person + - person summary: Return an origin by id parameters: - name: id @@ -1257,7 +1257,7 @@ paths: /1.0/person/social/social-action.json: get: tags: - - accompanying-course-work + - social-work-social-action summary: get a list of social action responses: 401: @@ -1268,7 +1268,7 @@ paths: /1.0/person/social/social-action/{id}.json: get: tags: - - accompanying-course-work + - social-work-social-action parameters: - name: id in: path @@ -1291,7 +1291,7 @@ paths: /1.0/person/social/social-action/by-social-issue/{id}.json: get: tags: - - accompanying-course-work + - social-work-social-action parameters: - name: id in: path @@ -1311,6 +1311,25 @@ paths: 400: description: "Bad Request" + /1.0/person/social-work/evaluation/by-social-action/{social_action_id}.json: + get: + tags: + - social-work-evaluation + summary: return a list of evaluation which are available for a given social action + parameters: + - name: social_action_id + in: path + required: true + description: The social action's id + schema: + type: integer + format: integer + minimum: 1 + responses: + 200: + description: ok + 404: + description: not found /1.0/person/social-work/social-issue.json: @@ -1321,7 +1340,7 @@ paths: responses: 200: description: "ok" - + /1.0/person/social-work/social-issue/{id}.json: get: tags: @@ -1347,7 +1366,7 @@ paths: description: "not found" 401: description: "Unauthorized" - + /1.0/person/social-work/result.json: get: tags: From 3156706c2b6b8c8768fd9594e0aae3db25d9c2a9 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 9 Aug 2021 16:22:28 +0200 Subject: [PATCH 079/100] vue accompanyingcourse_work: prepare evaluations, + translations chains + styles border --- .../vuejs/AccompanyingCourseWorkEdit/App.vue | 187 ++++++++++++------ .../components/AddEvaluation.vue | 14 ++ .../components/AddResult.vue | 4 +- .../vuejs/AccompanyingCourseWorkEdit/store.js | 6 +- .../AccompanyingCourseWork/edit.html.twig | 4 +- 5 files changed, 149 insertions(+), 66 deletions(-) create mode 100644 src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/AddEvaluation.vue diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue index 47feed87e..4ab929c02 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue @@ -1,29 +1,34 @@ + + 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 252b1d810..3c68dfd38 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/AddResult.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/AddResult.vue @@ -86,7 +86,7 @@ const i18n = { export default { name: "AddResult", - props: [ 'destination', 'goal' ], + props: [ 'destination', 'goal', 'availableResults' ], i18n, data() { return { @@ -136,7 +136,7 @@ export default { }, methods: { toggleSelect() { - this.isExpanded = !this.isExpanded; + this.isExpanded = !this.isExpanded; }, addResult(r) { console.log('addResult', r); diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js index 603a2b218..8b7af4dc4 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js @@ -20,6 +20,7 @@ const store = createStore({ resultsForAction: [], goalsForAction: [], resultsForGoal: [], + evaluationsForAction: [], personsPicked: window.accompanyingCourseWork.persons, personsReachables: window.accompanyingCourseWork.accompanyingPeriod.participations.filter(p => p.endDate == null) .map(p => p.person), @@ -45,6 +46,9 @@ const store = createStore({ return found === undefined ? [] : found.results; }, + hasEvaluationsForAction(state) { + return state.evaluationsForAction.length > 0; + }, hasHandlingThirdParty(state) { return state.handlingThirdParty !== null; }, @@ -259,7 +263,7 @@ const store = createStore({ errors = [] ; - console.log('action subitting', payload, url); + console.log('action submitting', payload, url); commit('setIsPosting', true); window.fetch(url, { diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/edit.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/edit.html.twig index bb670d9d6..506d51d5e 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/edit.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/edit.html.twig @@ -6,9 +6,9 @@ {% block content %}
    -

    {{ block('title') }}

    +

    {{ block('title') }}

    -
    +
    {% endblock %} From d67483fd9a1e26d26b1fa10a4dd5285a8a551a0c Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 9 Aug 2021 17:03:21 +0200 Subject: [PATCH 080/100] add options on button for AddPersons component: size, type and display * size: add bootstrap class : btn-sm, btn-lg.. * type: override chill button class : btn-update, btn-chill-beige * display: override default : true --- .../vuejs/AccompanyingCourseWorkEdit/App.vue | 22 ++++++++----- .../public/vuejs/_components/AddPersons.vue | 33 +++++++++++-------- 2 files changed, 33 insertions(+), 22 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue index 4ab929c02..4f1cb6afd 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue @@ -140,9 +140,7 @@
    • - +
    @@ -163,7 +161,7 @@
      - +
@@ -302,11 +300,12 @@ } div.objective-title { + font-weight: bold; + /* margin-top: 1rem; font-size: 1.5rem; - font-weight: bold; text-align: center; - + */ i.fa { padding: 0.25rem; @@ -399,7 +398,8 @@ const i18n = { no_handling_thirdparty: "Aucun tiers traitant", precise_handling_thirdparty: "Indiquer un tiers traitant", choose_a_thirdparty: "Choisir un tiers", - remove_handling_thirdparty: "Supprimer le tiers traitant", + remove_thirdparty: "Enlever le tiers", + remove_handling_thirdparty: "Enlever le tiers traitant", thirdparty_intervener: "Tiers intervenants", no_thirdparty_intervener: "Aucun tiers intervenant", add_thirdparties: "Ajouter des tiers", @@ -430,7 +430,10 @@ export default { options: { type: [ 'thirdparty' ], priority: null, - uniq: true + uniq: true, + button: { + display: false + } }, }, thirdPartyPicker: { @@ -439,6 +442,9 @@ export default { type: [ 'thirdparty' ], priority: null, uniq: false, + button: { + display: false + } }, } }; diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue index 9cd31e277..42ffb888e 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue @@ -1,9 +1,8 @@