Skip to content

Commit

Permalink
Warning AEP données ✨
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentlaine committed Aug 12, 2024
1 parent d822c64 commit e3f93b1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions client/components/donnees/AreaChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,12 @@ const chartLineOptions: ChartOptions = {
},
};
const showWarningAep = computed(() => {
const releaseDate = new Date('2024-04-28');
const dd = new Date(dateDebut.value);
return typeEau.value === 'AEP' && dd.getTime() < releaseDate.getTime();
});
async function downloadGraph() {
const el = document.getElementById('area-chart-line') as HTMLCanvasElement;
const content = el.toDataURL('image/png');
Expand Down Expand Up @@ -257,6 +263,14 @@ watch(() => refDataStore.departements, () => {
</DsfrButton>
</div>
</div>
<div v-if="showWarningAep">
<DsfrAlert
description="Nous ne somme pas en mesure de fournir les restrictions appliquées sur l'eau potable avant le 28/04/2024. Pour connaître les niveaux de restrictions en vigueur; veuillez vous référer aux niveaux de restrictions ESO/ESU."
type="warning"
class="fr-my-2w"
:closeable="false"
/>
</div>
<template v-if="!loading">
<Line v-if="chartLineData"
id="area-chart-line"
Expand Down

0 comments on commit e3f93b1

Please sign in to comment.