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 18, 2024
1 parent 511885d commit 84cda96
Showing 1 changed file with 41 additions and 34 deletions.
75 changes: 41 additions & 34 deletions src/pages/exploitations/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,45 +15,52 @@ 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 v-if="getDateDemarrage(operator)">
<b>Date d'engagement</b> : {{ jjmmyyyy(getDateDemarrage(operator)) }}
<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 v-if="getDateDemarrage(operator)">
<b>Date d'engagement</b> : {{ jjmmyyyy(getDateDemarrage(operator)) }}
</li>
</ul>
</div>
<div class="fr-card__start" v-if="!isLoading">
<NotificationState v-if="operator.certificats.length > 0" :text="true" :operator="operator" />
</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 class="fr-card__start" v-if="!isLoading">
<NotificationState v-if="operator.certificats.length > 0" :text="true" :operator="operator" />
</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 84cda96

Please sign in to comment.