Skip to content
Snippets Groups Projects
Commit 19c76bff authored by Rémi PAILHAREY's avatar Rémi PAILHAREY :fork_knife_plate:
Browse files

Merge branch 'dev' into 'master'

Dev

See merge request !145
parents b30275df 244c123c
Branches
No related tags found
1 merge request!145Dev
Pipeline #97431 passed
......@@ -3,15 +3,14 @@ import { DateTime } from 'luxon'
import { dateFormatter } from '../utils/dateFormatter'
export interface IGrdfConsent
extends Omit<GrdfConsentEntity, 'CreatedAt' | 'endDate' | 'startDate'> {
startDate: DateTime
extends Omit<GrdfConsentEntity, 'CreatedAt' | 'endDate'> {
createdAt: DateTime
endDate: DateTime
}
export interface GrdfConsentEntity {
ID: number
CreatedAt: string
startDate: string
endDate: string
firstname: string
lastname: string
......@@ -63,7 +62,7 @@ export const grdfColumnDef: ColDef[] = [
filter: true,
},
{
field: 'startDate',
field: 'createdAt',
valueFormatter: dateFormatter,
headerName: 'Début du consentement',
initialWidth: 150,
......
......@@ -4,7 +4,7 @@ import { dateFormatter } from '../utils/dateFormatter'
export interface ISgeConsent
extends Omit<SgeConsentEntity, 'CreatedAt' | 'endDate' | 'inseeCode'> {
startDate: DateTime
createdAt: DateTime
endDate: DateTime
}
......@@ -82,7 +82,7 @@ export const sgeColumnDefs: ColDef[] = [
initialWidth: 100,
},
{
field: 'startDate',
field: 'createdAt',
valueFormatter: dateFormatter,
headerName: 'Début du consentement',
initialWidth: 150,
......
......@@ -44,7 +44,7 @@ export class GrdfConsentService {
* @param consentEntity
*/
public parseConsent = (consentEntity: GrdfConsentEntity): IGrdfConsent => {
const startDate = DateTime.fromISO(consentEntity.startDate, {
const createdAt = DateTime.fromISO(consentEntity.CreatedAt, {
zone: 'utc',
}).setLocale('fr-FR')
const endDate = DateTime.fromISO(consentEntity.endDate, {
......@@ -53,8 +53,8 @@ export class GrdfConsentService {
return {
ID: consentEntity.ID,
startDate: startDate,
endDate: endDate,
createdAt,
endDate,
firstname: consentEntity.firstname,
lastname: consentEntity.lastname,
pce: consentEntity.pce,
......
......@@ -44,7 +44,7 @@ export class SgeConsentService {
* @param consentEntity
*/
public parseConsent = (consentEntity: SgeConsentEntity): ISgeConsent => {
const startDate = DateTime.fromISO(consentEntity.CreatedAt, {
const createdAt = DateTime.fromISO(consentEntity.CreatedAt, {
zone: 'utc',
}).setLocale('fr-FR')
const endDate = DateTime.fromISO(consentEntity.endDate, {
......@@ -53,8 +53,8 @@ export class SgeConsentService {
return {
ID: consentEntity.ID,
startDate: startDate,
endDate: endDate,
createdAt,
endDate,
firstname: consentEntity.firstname,
lastname: consentEntity.lastname,
pointID: consentEntity.pointID,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment