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

wip candidature

parent bad9c961
Loading
Loading
Loading
Loading
+4 −3
Changes for front/Mission/ListeOffreEmploi.vue: 4 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -18,8 +18,7 @@
                     :canVoirCandidature="this.canVoirCandidature"
                     :canValiderCandidature="this.canValiderCandidature"
                     :extended="extended"
                     :utilisateur="this.utilisateur"
                     :intervenant="this.intervenant"></offreEmploi>
                     :utilisateur="this.utilisateur"></offreEmploi>
    </div>

</template>
@@ -36,7 +35,6 @@ export default {

        id: {type: Number, required: false},
        utilisateur: {required: false},
        intervenant: {required: false},
        canModifier: {type: Boolean, required: false},
        canPostuler: {type: Boolean, required: false},
        canValider: {type: Boolean, required: false},
@@ -46,8 +44,11 @@ export default {


    },

    data()
    {


        return {
            offres: [],
            ajoutUrl: unicaenVue.url('offre-emploi/saisir'),
+34 −16
Changes for front/Mission/OffreEmploi.vue: 34 added lines, 16 removed lines.
Original line number Diff line number Diff line
@@ -31,27 +31,46 @@
            </div>
            <div class="card-footer">
                <div class="d-grid gap-2 d-md-flex justify-content-md-end">
                    <a v-if="offre.validation && offre.canValide"
                    <a v-if="offre.validation && this.canValider"
                       :href="devaliderUrl"
                       class="btn btn-danger"
                       @click.prevent="devalider">Devalider</a>
                    <a v-if="!offre.validation && offre.canValide"
                       title="Devalider"
                       @click.prevent="devalider">
                        <u-icon name="thumbs-down"/>
                        Devalider
                    </a>
                    <a v-if="!offre.validation && this.canValider"
                       :href="validerUrl"
                       class="btn btn-success"
                       @click.prevent="valider">Valider</a>
                    <a v-if="offre.canModifier"
                       title="Valider"
                       @click.prevent="valider">
                        <u-icon name="thumbs-up"/>
                        Valider
                    </a>
                    <a :href="consulterUrl"
                       title="Consulter "
                       class="btn btn-primary"
                    >
                        <u-icon name="eye"/>
                        Voir
                    </a>
                    <a v-if="this.canModifier"
                       :href="saisirUrl"
                       class="btn btn-primary"
                       @click.prevent="saisir">Modifier</a>
                    <a v-if="offre.canSupprime"
                       @click.prevent="saisir"
                       title="Modifier">
                        <u-icon name="pen-to-square"/>
                        Modifier
                    </a>
                    <a v-if="this.canSupprimer"
                       :href="supprimerUrl"
                       class="btn btn-danger"
                       title="Supprimer"
                       data-title="Suppression de l'offre"
                       data-content="Êtes-vous sur de vouloir supprimer l'offre ?"
                       @click.prevent="supprimer">Supprimer</a>
                    <a :href="consulterUrl"
                       class="btn btn-primary"
                    >Plus d'information</a>
                       @click.prevent="supprimer">
                        <u-icon name="trash"/>
                    </a>

                </div>
            </div>
@@ -161,7 +180,6 @@ export default {
    props: {
        offre: {required: true},
        utilisateur: {required: false},
        intervenant: {required: false},
        extended: {type: Boolean, required: false},
        canModifier: {type: Boolean, required: false},
        canPostuler: {type: Boolean, required: false},
@@ -173,6 +191,8 @@ export default {
    data()
    {

        console.log(this)

        return {
            saisirUrl: unicaenVue.url('offre-emploi/saisir/:offre', {offre: this.offre.id}),
            supprimerUrl: unicaenVue.url("offre-emploi/supprimer/:offre", {offre: this.offre.id}),
@@ -183,15 +203,13 @@ export default {
    },
    computed: {
        isDisabled: function () {
            if (!this.offre.canPostuler || this.offre.candidats.indexOf(this.intervenant.id) == -1) {

            if (!this.canPostuler) {
                return 'btn btn-primary disabled';
            }
            return 'btn btn-primary';
        },
        isCandidat: function () {
            if (this.offre.candidats.indexOf(this.intervenant.id) !== -1) {
                return true;
            }
            return false;
        },
        shortDesc: function () {
+7 −0
Changes for module/Application/src/Entity/Db/Structure.php: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -51,6 +51,13 @@ class Structure implements HistoriqueAwareInterface, ResourceInterface, ImportAw



    public function axiosDefinition(): array
    {
        return ['libelleLong', 'libelleCourt', 'code', 'id'];
    }



    public function getId(): int
    {
        return $this->id;
+7 −0
Changes for module/Intervenant/src/Entity/Db/Statut.php: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -202,6 +202,13 @@ class Statut implements ParametreEntityInterface, RoleInterface, ResourceInterfa



    public function axiosDefinition(): array
    {
        return ['libelle', 'code'];
    }



    public function getRoleId(): string
    {
        return 'statut/' . $this->getCode();
+11 −0
Changes for module/Mission/src/Assertion/OffreEmploiAssertion.php: 11 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -32,6 +32,8 @@ class OffreEmploiAssertion extends AbstractAssertion
        switch (true) {
            case $entity instanceof OffreEmploi:
                switch ($privilege) {
                    case Privileges::MISSION_OFFRE_EMPLOI_VISUALISATION:
                        return $this->assertOffreEmploiVisualisation($role, $entity);
                    case Privileges::MISSION_OFFRE_EMPLOI_MODIFIER:
                        return $this->assertOffreEmploiEdition($role, $entity);
                    case Privileges::MISSION_OFFRE_EMPLOI_VALIDER:
@@ -51,6 +53,15 @@ class OffreEmploiAssertion extends AbstractAssertion



    protected function assertOffreEmploiVisualisation(Role $role, OffreEmploi $offre)
    {
        if ($offre->isValide()) {
            return true;
        }
    }



    protected function assertOffreEmploiEdition(Role $role, OffreEmploi $offre)
    {

Loading