From f5e54e3c1169eeb61382942027b27c4253341491 Mon Sep 17 00:00:00 2001 From: Christophe BENARD Date: Mon, 16 Dec 2024 16:05:09 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20Supprimer=20le=20contr=C3=B4le=20de=20d?= =?UTF-8?q?ate=20future=20pour=20la=20date=20d'=C3=A9vacuation=20refers=20?= =?UTF-8?q?to=20https://trello.com/c/YaYgH0as/2278?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shantytown/close/shantytown.close.validator.ts | 7 ------- .../inputs/FormFermetureDeSiteInputClosedAt.vue | 1 - 2 files changed, 8 deletions(-) diff --git a/packages/api/server/controllers/shantytown/close/shantytown.close.validator.ts b/packages/api/server/controllers/shantytown/close/shantytown.close.validator.ts index 1cf583977e..f78962a9d7 100644 --- a/packages/api/server/controllers/shantytown/close/shantytown.close.validator.ts +++ b/packages/api/server/controllers/shantytown/close/shantytown.close.validator.ts @@ -40,13 +40,6 @@ export default [ return value; }) .custom((value, { req }) => { - const today = new Date(); - today.setHours(0, 0, 0, 0); - - if (value > today) { - throw new Error('La date de la fermeture du site ne peut pas ĂȘtre future'); - } - if (req.body.shantytown && req.body.shantytown.declaredAt) { const declaredDate = new Date(req.body.shantytown.declaredAt * 1000); declaredDate.setHours(0, 0, 0, 0); diff --git a/packages/frontend/webapp/src/components/FormFermetureDeSite/inputs/FormFermetureDeSiteInputClosedAt.vue b/packages/frontend/webapp/src/components/FormFermetureDeSite/inputs/FormFermetureDeSiteInputClosedAt.vue index 7ef4046240..edad55b3f0 100644 --- a/packages/frontend/webapp/src/components/FormFermetureDeSite/inputs/FormFermetureDeSiteInputClosedAt.vue +++ b/packages/frontend/webapp/src/components/FormFermetureDeSite/inputs/FormFermetureDeSiteInputClosedAt.vue @@ -4,7 +4,6 @@ width="w-64" name="closed_at" :label="labels.closed_at" - :maxDate="new Date()" :clearable="false" v-bind="$attrs" v-model="values.closed_at"