Skip to content

Commit

Permalink
fix: affiche les demandes de l'auditeur dès qu'elles sont disponibles.
Browse files Browse the repository at this point in the history
Harmonise les marges des callouts.
  • Loading branch information
thom4parisot committed Mar 28, 2024
1 parent 9f95096 commit 228970d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 15 deletions.
5 changes: 2 additions & 3 deletions src/components/ActionDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ import { onClickOutside } from "@vueuse/core"
const show = ref(false)
const actionsMenuRef = ref(null)
onClickOutside(actionsMenuRef, () => {
show.value = false
})
onClickOutside(actionsMenuRef, () => show.value = false)
</script>

<template>
<button type="button" @click.stop.prevent="show = !show" class="fr-btn fr-btn--tertiary-no-outline fr-icon-more-fill show-actions">
Autres actions
</button>

<div class="menu-container">
<div v-if="show" class="fr-menu" ref="actionsMenuRef">
<ul class="fr-menu__list fr-btns-group fr-btns-group--icon-left">
Expand Down
6 changes: 2 additions & 4 deletions src/components/Features/MassActionsSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,7 @@ function handleSubmit ({ ids, patch }) {
</script>

<style scoped>
.fr-translate.fr-nav {
text-align: right;
}
.fr-nav__item {
display: inline-flex;
position: relative;
}
.fr-translate__menu {
Expand All @@ -72,6 +68,7 @@ function handleSubmit ({ ids, patch }) {
text-align: left;
}
.fr-translate .fr-translate__btn {
align-self: flex-end;
border: 1px solid #fff;
background-color: #fff;
margin-bottom: 0;
Expand All @@ -83,6 +80,7 @@ function handleSubmit ({ ids, patch }) {
}
.fr-menu__list .fr-btn {
text-align: initial;
width: 100%;
}
</style>
2 changes: 1 addition & 1 deletion src/components/Features/Table.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="fr-table fr-table--bordered fr-table--no-caption fr-my-6v">
<ul class="fr-tags-group fr-tags-group--tags fr-mb-2w" v-if="permissions.canViewAnnotations">
<ul class="fr-tags-group fr-tags-group--tags fr-my-6v" v-if="permissions.canViewAnnotations">
<li :key="id" v-for="{ active, id, count, label, required } in tags">
<button class="fr-tag" :class="{'fr-tag--dismiss': active, [`tag--${id}`]: true, 'fr-icon-warning-fill fr-tag--icon-left': required }" :aria-label="`${active ? 'Ne plus filtrer' : 'Filtrer'} sur le critère ${label}`" @click="handleFilterClick(id)">
{{ label }} ({{ count }})
Expand Down
2 changes: 1 addition & 1 deletion src/components/Features/ValidationErrors.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="fr-alert fr-alert--warning fr-mb-3w" v-if="featuresSet.hasRequiredSets">
<div class="fr-alert fr-alert--warning fr-mt-6v" v-if="featuresSet.hasRequiredSets">
<p v-for="([ruleId, result]) in featuresSet.required" :key="ruleId">
{{ result.errorMessage }} pour {{ inflex(result.count, 'parcelle', 'parcelles') }}.

Expand Down
9 changes: 4 additions & 5 deletions src/components/Operator/Summary.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<header class="fr-mb-3w">
<header class="fr-mb-6v">
<span :data-numerobio="operator.numeroBio">{{ operator.nom }}</span>
<h1 class="fr-h4 fr-my-2v">
{{ record.version_name }}
Expand Down Expand Up @@ -58,12 +58,12 @@
<div
v-if="permissions.isAgri && record.certification_state !== CERTIFICATION_STATE.OPERATOR_DRAFT"
class="fr-alert fr-alert--info fr-alert--sm fr-mt-3w"
class="fr-alert fr-alert--info fr-alert--sm fr-my-6v"
>
<p class="fr-text--sm">Votre parcellaire est en cours de certification, vous ne pouvez pas modifier les données.</p>
</div>
<div class="demandes fr-callout fr-callout--blue-ecume" v-if="displayCallout">
<div class="demandes fr-callout fr-callout--blue-ecume fr-mt-6v fr-mb-0" v-if="record.audit_demandes">
<h3 class="fr-callout__title">Demandes formulées lors de l'audit</h3>
<div v-html="record.audit_demandes" />
Expand Down Expand Up @@ -96,7 +96,7 @@ import OperatorHistoryModal from '@/components/Operator/HistoryModal.vue'
import FeaturesExportModal from '@/components/Features/ExportModal.vue'
import DeleteParcellaireModal from '@/components/Operator/DeleteParcelaireModal.vue'
import { CERTIFICATION_STATE, isCertificationImmutable } from '@/referentiels/ab.js'
import { CERTIFICATION_STATE } from '@/referentiels/ab.js'
import { useFeaturesStore, useOperatorStore, usePermissions, useRecordStore } from '@/stores/index.js'
import { onClickOutside } from "@vueuse/core"
import EditVersionModal from "@/components/versions/EditVersionModal.vue"
Expand All @@ -118,7 +118,6 @@ const permissions = usePermissions()
const { record } = recordStore
const { operator } = operatorStore
const { collection, hasFeatures } = storeToRefs(featuresStore)
const displayCallout = computed(() => record.audit_demandes && isCertificationImmutable(record.certification_state))
const canDisplayHistory = computed(() => Array.isArray(record.audit_history) && record.audit_history.length)
const versionMenu = ref(false)
Expand Down
2 changes: 1 addition & 1 deletion src/pages/exploitations/[numeroBio]/[recordId]/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ meta:
<div class="fr-col-6">
<OperatorSummary />

<div v-if="record.record_id !== operatorStore.records?.[0]?.record_id" class="fr-alert fr-alert--warning fr-alert--sm fr-my-2w">
<div v-if="record.record_id !== operatorStore.records?.[0]?.record_id" class="fr-alert fr-alert--warning fr-alert--sm fr-my-6v">
<p>
Cette version du parcellaire n'est pas la plus récente.
</p>
Expand Down

0 comments on commit 228970d

Please sign in to comment.