Skip to content

Commit

Permalink
feature: Affiche un message sur l'opérateur n'a aucune exploitation v…
Browse files Browse the repository at this point in the history
…isible
  • Loading branch information
GregoireDucharme committed Dec 16, 2024
1 parent 9ffd747 commit d9b0baf
Showing 1 changed file with 42 additions and 34 deletions.
76 changes: 42 additions & 34 deletions src/pages/exploitations/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,47 +15,55 @@ meta:
<Spinner>Chargement des données…</Spinner>
</div>

<section class="fr-grid-row fr-grid-row--gutters" v-if="!isLoading && hasOperators">
<article class="fr-col-12 fr-col-md-4" v-for="operator in operators" :key="operator.numeroBio">
<div class="fr-card fr-card--horizontal">
<div class="fr-card__body">
<div class="fr-card__content">
<h4 class="fr-card__title">{{ operator.nom }}</h4>
<div class="fr-card__desc">
<ul class="list-unstyled">
<li v-if="operator.commune">
<strong>Siège</strong> : {{ operator.commune }} ({{ operator.departement }})
</li>
<li v-if="operator.denominationCourante && operator.denominationCourante !== operator.nom">
<b>Dénomination courante</b> : {{ operator.denominationCourante }}
</li>
<li v-if="operator.siret"><b>SIRET</b> : {{ operator.siret }}</li>
<li v-if="operator.numeroPacage"><b>PACAGE</b> : {{ operator.numeroPacage }}</li>
<li><b>Numéro Bio</b> : {{ operator.numeroBio }}</li>
<li><b>Date de début de conversion</b> : {{ operator.dateEngagement }}</li>
</ul>
<section class="fr-grid-row fr-grid-row--gutters" v-if="!isLoading">
<template v-if="hasOperators">
<article class="fr-col-12 fr-col-md-4" v-for="operator in operators" :key="operator.numeroBio">
<div class="fr-card fr-card--horizontal">
<div class="fr-card__body">
<div class="fr-card__content">
<h4 class="fr-card__title">{{ operator.nom }}</h4>
<div class="fr-card__desc">
<ul class="list-unstyled">
<li v-if="operator.commune">
<strong>Siège</strong> : {{ operator.commune }} ({{ operator.departement }})
</li>
<li v-if="operator.denominationCourante && operator.denominationCourante !== operator.nom">
<b>Dénomination courante</b> : {{ operator.denominationCourante }}
</li>
<li v-if="operator.siret"><b>SIRET</b> : {{ operator.siret }}</li>
<li v-if="operator.numeroPacage"><b>PACAGE</b> : {{ operator.numeroPacage }}</li>
<li><b>Numéro Bio</b> : {{ operator.numeroBio }}</li>
<li><b>Date de début de conversion</b> : {{ operator.dateEngagement }}</li>
</ul>
</div>
<div class="fr-card__start">
<ul class="fr-tags-group">
<li>
<p class="fr-badge fr-badge--success fr-icon-medal-fill">vérifié</p>
</li>
</ul>
</div>
</div>
<div class="fr-card__start">
<ul class="fr-tags-group">

<div class="fr-card__footer">
<ul class="fr-btns-group fr-btns-group--inline-lg">
<li>
<p class="fr-badge fr-badge--success fr-icon-medal-fill">vérifié</p>
<router-link class="fr-btn" :to="`/exploitations/${operator.numeroBio}`">
Voir cette exploitation
</router-link>
</li>
</ul>
</div>
</div>

<div class="fr-card__footer">
<ul class="fr-btns-group fr-btns-group--inline-lg">
<li>
<router-link class="fr-btn" :to="`/exploitations/${operator.numeroBio}`">
Voir cette exploitation
</router-link>
</li>
</ul>
</div>
</div>
</div>
</article>
</article>
</template>
<div class="fr-col-12" v-else>
<p>
Votre compte n'est rattaché à aucune exploitation. Nous vous invitons à vérifier vos accès sur
<a href="https://notification.agencebio.org/" target="_blank">le portail de notification</a>
</p>
</div>
</section>

<Pagination
Expand Down

0 comments on commit d9b0baf

Please sign in to comment.