Commit 13a0d6c1 authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

FIX : La date de fin d'un rôle sur les affectations Person>Project est correctement enregistrée

parent 6c13937f
Loading
Loading
Loading
Loading
+6 −4
Changes for module/Oscar/src/Oscar/Service/PersonService.php: 6 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -2229,15 +2229,17 @@ class PersonService implements UseOscarConfigurationService, UseEntityManager, U
        $dateStart = null,
        $dateEnd = null
    ) {
        if ($newRole == $personProject->getRoleObj()) {
            return;
        }
//        if ($newRole == $personProject->getRoleObj()) {
//            return;
//        }

        $person = $personProject->getPerson();
        $project = $personProject->getProject();

        $updateNotification = $personProject->getRoleObj()->isPrincipal() != $newRole->isPrincipal();
        $personProject->setRoleObj($newRole);
        $personProject->setRoleObj($newRole)
            ->setDateStart($dateStart)
            ->setDateEnd($dateEnd);
        $project->touch();

        $this->getEntityManager()->flush();
+2 −2
Changes for module/Oscar/view/oscar/project-grant/show.phtml: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -206,7 +206,7 @@
                        <i class="icon-group"></i>
                        Membres
                    </h2>
                    <section id="organizations" class="has-btn"></section>
                    <section id="membres" class="has-btn"></section>

                </section>
                <script>
@@ -215,7 +215,7 @@
                        Vue.http.options.emulateJSON = true;
                        Vue.http.options.emulateHTTP = true;
                        new Vue({
                            el: "#organizations",
                            el: "#membres",
                            render(h) {
                                return h(EntityWithRole.default, {
                                    props: {