Commit d905e74d authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Finalsation etape candidature fiche intervenant

parent 1b530283
Loading
Loading
Loading
Loading
+43 −6
Original line number Diff line number Diff line
@@ -15,28 +15,54 @@
                <td v-if="!canValiderCandidature" colspan="3" style="text-align:center;">Aucune candidature</td>
            </tr>
            <tr v-for="candidature in candidatures" :key="candidature.id">
                <td style="text-align:center;">{{ candidature.offre.titre }}</td>
                <td style="text-align:center;"><a :href="'/offre-emploi/detail/' + candidature.offre.id">{{ candidature.offre.titre }}</a></td>
                <td style="text-align:center;">{{ candidature.offre.structure.libelleLong }}</td>
                <td style="text-align:center;">Computed à faire</td>
                <td style="text-align:center;">Action à définir</td>
                <td style="text-align:center;">
                    <span v-if="candidature.validation" class="badge rounded-pill bg-success">Accepter par {{
                            candidature.validation.histoCreateur.displayName
                        }}</span>
                    <span v-if="!candidature.validation && candidature.motif !== null" class="badge rounded-pill bg-danger">{{ candidature.motif }}</span>
                    <span v-if="!candidature.validation && candidature.motif === null" class="badge rounded-pill bg-warning">En attente d'acceptation</span>
                </td>
                <td v-if="this.canValiderCandidature" style="text-align:center;">
                    <a :href="'/offre-emploi/accepter-candidature/' + candidature.id" v-if="!candidature.validation"
                       title="Accepter la candidature"
                       class="btn btn-success"
                       data-title="Accepter la candidature"
                       data-content="Etes vous sûre de vouloir accepter cette candidature ?"
                       @click.prevent="validerCandidature">Accepter </a>&nbsp;
                    <a :href="'/offre-emploi/refuser-candidature/' + candidature.id"
                       title="Refuser la candidature"
                       class="btn btn-danger"
                       data-title="Refuser la candidature"
                       data-content="Etes vous sûre de vouloir refuser cette candidature ?"
                       @click.prevent="refuserCandidature">Refuser </a>
                </td>
            </tr>

            </tbody>

        </table>
        <a href="/offre-emploi"
           class="btn btn-primary"
           title="Voir les offres d'emploi"
        >
            <u-icon name="eye"/>
            Voir toutes les offres d'emploi
        </a>&nbsp;
    </div>

</template>

<script>

import offreEmploi from "@/Mission/OffreEmploi.vue";

export default {
    name: "ListeCandidatures.vue",
    components: {offreEmploi},
    props: {
        intervenant: {required: true},
        canValiderCandidature: {type: Boolean, required: false},

    },
    data()
    {
@@ -49,7 +75,6 @@ export default {
    mounted()
    {
        this.reload();
        console.log(this.candidatures);

    },
    methods: {
@@ -62,6 +87,18 @@ export default {

            });

        },
        validerCandidature(event)
        {
            popConfirm(event.target, (response) => {
                this.reload();
            });
        },
        refuserCandidature(event)
        {
            popConfirm(event.target, (response) => {
                this.reload();
            });
        }
    }

+0 −1
Original line number Diff line number Diff line
@@ -110,7 +110,6 @@ export default {

                });
            }
            console.log(this.offres);


        }
+8 −1
Original line number Diff line number Diff line
@@ -118,7 +118,8 @@
                        :value="candidature.validation.histoCreation"/> par {{
                            candidature.validation.histoCreateur.displayName
                        }}</span>
                        <span v-if="!candidature.validation" class="badge rounded-pill bg-warning">En attente d'acceptation</span>
                        <span v-if="!candidature.validation && candidature.motif !== null" class="badge rounded-pill bg-danger">{{ candidature.motif }}</span>
                        <span v-if="!candidature.validation && candidature.motif === null" class="badge rounded-pill bg-warning">En attente d'acceptation</span>
                    </th>
                    <td v-if="this.canValiderCandidature">
                        <a :href="'/offre-emploi/accepter-candidature/' + candidature.id" v-if="!candidature.validation"
@@ -273,6 +274,12 @@ export default {
            });
        },
        validerCandidature(event)
        {
            popConfirm(event.currentTarget, (response) => {
                this.$emit('refresh', response.data);
            });
        },
        refuserCandidature(event)
        {
            popConfirm(event.currentTarget, (response) => {
                this.$emit('refresh', response.data);
+1 −0
Original line number Diff line number Diff line
@@ -130,6 +130,7 @@ class ValidationService extends AbstractEntityService
        $validation->setStructure($candidature->getIntervenant()->getStructure());
        $this->save($validation);
        $candidature->setValidation($validation);
        $candidature->setMotif(null);

        return $validation;
    }
+8 −1
Original line number Diff line number Diff line
<?= $this->intervenant($intervenant)->renderTitle('Candidature'); ?>
<?php

use Application\Provider\Privilege\Privileges;

$this->intervenant($intervenant)->renderTitle('Candidature');
$canValiderCandidature = $this->isAllowed(Privileges::getResourceId(Privileges::MISSION_CANDIDATURE_VALIDER));

?>

<?= $this->vue('mission/liste-candidatures', [

    'intervenant'           => $intervenant->getId(),
    'canValiderCandidature' => $canValiderCandidature,
]); ?>
Loading