Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Affiche un message sur l'opérateur n'a aucune exploitation #466

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading