From 89b81e9219b4702ac28cd4bc52999594bfc7b296 Mon Sep 17 00:00:00 2001 From: Bastien DUMONT <bdumont@grandlyon.com> Date: Wed, 5 Oct 2022 07:34:21 +0000 Subject: [PATCH] feat: add consents city --- src/components/Consents/Consents.tsx | 4 ++++ src/models/consent.model.ts | 1 + src/services/consent.service.ts | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/Consents/Consents.tsx b/src/components/Consents/Consents.tsx index e0d25813..bd77effb 100644 --- a/src/components/Consents/Consents.tsx +++ b/src/components/Consents/Consents.tsx @@ -92,6 +92,10 @@ const Consents: React.FC = () => { initialWidth: 100, filter: true, }, + { + field: 'city', + headerName: 'Ville', + }, { field: 'startDate', headerName: 'Début du consentement', diff --git a/src/models/consent.model.ts b/src/models/consent.model.ts index 720aed7f..d7df0f47 100644 --- a/src/models/consent.model.ts +++ b/src/models/consent.model.ts @@ -14,6 +14,7 @@ export interface ConsentEntity { address: string postalCode: string inseeCode: string + city: string } export interface IConsentPagination diff --git a/src/services/consent.service.ts b/src/services/consent.service.ts index fdfd233a..8e8c4c8d 100644 --- a/src/services/consent.service.ts +++ b/src/services/consent.service.ts @@ -84,7 +84,7 @@ export class ConsentService { .setLocale('fr-FR') .toLocaleString() - const consent: IConsent = { + return { ID: consentEntity.ID, startDate: startDate, endDate: endDate, @@ -93,8 +93,8 @@ export class ConsentService { pointID: consentEntity.pointID, address: consentEntity.address, postalCode: consentEntity.postalCode, + city: consentEntity.city, } - return consent } /** -- GitLab