From febfe2c96f5598d5d1d0acc75ead855787be0f64 Mon Sep 17 00:00:00 2001 From: mmohad Date: Thu, 28 May 2026 11:11:45 +0200 Subject: [PATCH 1/5] =?UTF-8?q?fix(filter):=20optimisation=20de=20la=20r?= =?UTF-8?q?=C3=A9cup=C3=A9rations=20des=20filtres?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/gpf-api-dl/gpf-api-dl.component.ts | 26 +++++-------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/libs/feature/record/src/lib/gpf-api-dl/gpf-api-dl.component.ts b/libs/feature/record/src/lib/gpf-api-dl/gpf-api-dl.component.ts index 14e3e1d6ea..0a516e9f70 100644 --- a/libs/feature/record/src/lib/gpf-api-dl/gpf-api-dl.component.ts +++ b/libs/feature/record/src/lib/gpf-api-dl/gpf-api-dl.component.ts @@ -22,6 +22,7 @@ import { Choice, DropdownSelectorComponent } from '@geonetwork-ui/ui/inputs' import { CommonModule } from '@angular/common' import { TranslateDirective, TranslatePipe } from '@ngx-translate/core' import { GpfApiDlListItemComponent } from '../gpf-api-dl-list-item/gpf-api-dl-list-item.component' +import { de } from 'date-fns/locale' export interface Label { label: string @@ -90,8 +91,6 @@ export class GpfApiDlComponent implements OnInit, AfterViewInit { editionDateFrom$ = new BehaviorSubject(null) editionDateTo$ = new BehaviorSubject(null) - url = - 'https://data.geopf.fr/telechargement/capabilities?outputFormat=application/json' choices: any bucketPromisesZone: Choice[] bucketPromisesFormat: Choice[] @@ -286,23 +285,11 @@ export class GpfApiDlComponent implements OnInit, AfterViewInit { } async getCapabilities() { - let page = 0 - let choicesTest = undefined - let pageCount = 1 - - while (choicesTest === undefined && pageCount > page) { - const response = await this.http - .get(this.url.concat(`&limit=200&page=${page}`)) - .toPromise() - - choicesTest = response.entry.filter( - (element: any) => element['id'] === this.apiBaseUrl - )[0] - page += 1 - pageCount = response.pagecount + 1 - } + const response = await this.http.get(this.apiBaseUrl).toPromise() + + console.log('helloresponse', response) - return choicesTest + return response } async getFields() { @@ -324,7 +311,7 @@ export class GpfApiDlComponent implements OnInit, AfterViewInit { tempFormat.unshift({ value: 'null', label: 'FORMAT' }) this.bucketPromisesFormat = tempFormat - const tempCrs = this.choices.category.map((bucket: TermBucket) => ({ + const tempCrs = this.choices.categories.map((bucket: TermBucket) => ({ value: bucket.term, label: bucket.label, })) @@ -336,6 +323,7 @@ export class GpfApiDlComponent implements OnInit, AfterViewInit { this.choices.editionDateStart, this.choices.editionDateEnd, ] + console.log('this.defaultEditionDate', this.defaultEditionDate) this.editionDateFrom$.next(this.defaultEditionDate[0]) this.editionDateTo$.next(this.defaultEditionDate[1]) From b14446844c8944431c55c04ad7fa5cf1dcbf4679 Mon Sep 17 00:00:00 2001 From: mmohad Date: Wed, 17 Jun 2026 14:56:59 +0200 Subject: [PATCH 2/5] fix(header):#136 correction du menu service et autre --- apps/datahub/src/app/app.component.html | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/apps/datahub/src/app/app.component.html b/apps/datahub/src/app/app.component.html index e0ffd62a5f..29e21826a2 100644 --- a/apps/datahub/src/app/app.component.html +++ b/apps/datahub/src/app/app.component.html @@ -9,7 +9,7 @@ [operatorImagePath]=" 'https://data.geopf.fr/annexes/ressources/header/cartes-gouv-logo.svg' " - [serviceTagline]="'Le service public des cartes et données du territoire'" + [serviceTagline]="'Notre territoire commun'" [menu]="[]" > @@ -39,6 +39,14 @@ [customClass]="'fr-nav__link'" [iconPosition]="'left'" > + Découvrir cartes.gouv.fr Date: Wed, 17 Jun 2026 17:23:17 +0200 Subject: [PATCH 3/5] feat(header): #136 et #135 --- apps/datahub/src/app/app.component.css | 8 ++++++++ apps/datahub/src/app/app.component.html | 4 ++-- .../src/app/home/home-header/home-header.component.html | 8 ++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/apps/datahub/src/app/app.component.css b/apps/datahub/src/app/app.component.css index e69de29bb2..c854ddde5f 100644 --- a/apps/datahub/src/app/app.component.css +++ b/apps/datahub/src/app/app.component.css @@ -0,0 +1,8 @@ +.bouton-cartes-gouv { + background-color: var(--background-action-high-blue-france) !important; + color: var(--text-inverted-blue-france) !important; +} + +.bouton-cartes-gouv:hover { + background-color: var(--background-action-high-blue-france-hover) !important; +} diff --git a/apps/datahub/src/app/app.component.html b/apps/datahub/src/app/app.component.html index 29e21826a2..9a97efba80 100644 --- a/apps/datahub/src/app/app.component.html +++ b/apps/datahub/src/app/app.component.html @@ -95,8 +95,8 @@
  • Découvrir cartes.gouv.fr diff --git a/apps/datahub/src/app/home/home-header/home-header.component.html b/apps/datahub/src/app/home/home-header/home-header.component.html index 878301b0de..d1ebacad87 100644 --- a/apps/datahub/src/app/home/home-header/home-header.component.html +++ b/apps/datahub/src/app/home/home-header/home-header.component.html @@ -23,6 +23,14 @@ [style.opacity]="expandRatio" [innerHTML]="'datahub.header.title.html' | translate" > + + Consulter la documentation partenaire + +
    @if (selectedApiLink?.accessServiceProtocol) { -

    - {{ - selectedApiLink?.accessServiceProtocol === 'GPFDL' - ? 'record.metadata.api.form.title.gpf' - : 'record.metadata.api.form.title' - }} +

    + + {{ + selectedApiLink?.accessServiceProtocol === 'GPFDL' + ? 'record.metadata.api.form.title.gpf' + : 'record.metadata.api.form.title' + }} + + + + {{ selectedApiLink?.name }} +

    }