Skip to content

Commit

Permalink
feat(Cantines): Renommage du label "Ministère de tutelle" (#4719)
Browse files Browse the repository at this point in the history
  • Loading branch information
Charline-L authored Dec 10, 2024
1 parent 4290c6d commit 9ac31f2
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 16 deletions.
2 changes: 1 addition & 1 deletion api/templates/teledeclaration_campaign_2024/canteen.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ <h3>Informations de mon établissement</h3>
{% endif %}
{% if canteen.line_ministry %}
<li>
<span>Ministère de tutelle</span> : {{ canteen.line_ministry }}
<span>Administration générale de tutelle (ministère ou ATE)</span> : {{ canteen.line_ministry }}
</li>
{% endif %}
{% if canteen.management_type %}
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/components/DiagnosticSummary/CanteenSummary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@
<p class="my-0 fr-text-sm grey--text text--darken-1">Secteur d'activité</p>
<p class="my-0">{{ sectors || "—" }}</p>
<div v-if="lineMinistryRequired">
<p class="my-0 mt-2 fr-text-sm grey--text text--darken-1">Ministère de tutelle</p>
<p class="my-0 mt-2 fr-text-sm grey--text text--darken-1">
Administration générale de tutelle
</p>
<p class="my-0">{{ lineMinistry || "—" }}</p>
</div>
<p class="mb-0 mt-2 fr-text-sm grey--text text--darken-1">Type d'établissement</p>
Expand Down
9 changes: 8 additions & 1 deletion frontend/src/components/DsfrNativeSelect.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<template>
<div>
<label :for="inputId" :class="labelClasses">{{ label }}</label>
<label :for="inputId" :class="labelClasses">
{{ label }}
<span v-if="hint" class="fr-hint-text">{{ hint }}</span>
</label>
<select
ref="select"
:id="inputId"
Expand Down Expand Up @@ -57,6 +60,10 @@ export default {
},
noDataText: String,
rules: Array,
hint: {
type: String,
default: null,
},
},
data() {
return { inputId: null, errorMessage: null }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,10 @@ export default {
{ value: this.sectors, label: "Secteurs d'activité" },
])
if (this.showMinistryField)
items.push({ value: ministryDetail ? ministryDetail.text : "", label: "Ministère de tutelle" })
items.push({
value: ministryDetail ? ministryDetail.text : "",
label: "Administration générale de tutelle (ministère ou ATE)",
})
return items
},
approItems() {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/CanteenEditor/CanteenForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,12 @@
</v-col>
<v-col v-if="showMinistryField" cols="12" md="10">
<DsfrNativeSelect
label="Ministère de tutelle"
label="Administration générale de tutelle (ministère ou ATE)"
hint="Hors fonction publique territoriale et hospitalière"
labelClasses="body-2 mb-2"
:items="ministries"
v-model="canteen.lineMinistry"
:rules="[validators.required]"
placeholder="Sélectionnez le Ministère de tutelle"
/>
</v-col>
</v-row>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
</v-col>
</v-row>
<v-row>
<v-col cols="12" md="5">
<v-col cols="11">
<label class="body-2" for="sectors">Secteurs d'activité</label>
<DsfrSelect
id="sectors"
Expand All @@ -90,16 +90,14 @@
:rules="[validators.required]"
/>
</v-col>
<v-col v-if="showMinistryField" cols="12" md="6">
<label class="body-2" for="line-ministry">Ministère de tutelle</label>
<DsfrSelect
id="line-ministry"
<v-col v-if="showMinistryField" cols="11">
<DsfrNativeSelect
label="Administration générale de tutelle (ministère ou ATE)"
labelClasses="body-2"
hint="Hors fonction publique territoriale et hospitalière"
:items="ministries"
v-model="satellite.lineMinistry"
:rules="[validators.required]"
placeholder="Sélectionnez le Ministère de tutelle"
hide-details="auto"
clearable
/>
</v-col>
</v-row>
Expand Down Expand Up @@ -150,12 +148,13 @@ import validators from "@/validators"
import { sectorsSelectList } from "@/utils"
import DsfrTextField from "@/components/DsfrTextField"
import DsfrSelect from "@/components/DsfrSelect"
import DsfrNativeSelect from "@/components/DsfrNativeSelect"
import SiretCheck from "../SiretCheck"
import CityField from "../CityField"
export default {
name: "AddSatellite",
components: { DsfrTextField, DsfrSelect, SiretCheck, CityField },
components: { DsfrTextField, DsfrSelect, DsfrNativeSelect, SiretCheck, CityField },
props: {
canteen: Object,
},
Expand Down

0 comments on commit 9ac31f2

Please sign in to comment.