diff --git a/packages/backend/src/auth/guards/usager-access.guard.ts b/packages/backend/src/auth/guards/usager-access.guard.ts index af1bef178a..4a12278630 100644 --- a/packages/backend/src/auth/guards/usager-access.guard.ts +++ b/packages/backend/src/auth/guards/usager-access.guard.ts @@ -46,15 +46,18 @@ export class UsagerAccessGuard implements CanActivate { r.usager = usager; return r; } catch (e) { - appLogger.error(`[UsagerAccessGuard] usager not found`, { - sentry: true, - context: { - usagerRef, - structureId, - user: r.user._id, - role: r.user.role, - }, - }); + appLogger.error( + `[UsagerAccessGuard] usager not found ${usagerRef} ${structureId} ${r?.user?._id}`, + { + sentry: true, + context: { + usagerRef, + structureId, + user: r.user._id, + role: r.user.role, + }, + } + ); throw new HttpException("USAGER_NOT_FOUND", HttpStatus.BAD_REQUEST); } } diff --git a/packages/backend/src/auth/guards/usager-doc-access.guard.ts b/packages/backend/src/auth/guards/usager-doc-access.guard.ts index 6a06815394..61c8221540 100644 --- a/packages/backend/src/auth/guards/usager-doc-access.guard.ts +++ b/packages/backend/src/auth/guards/usager-doc-access.guard.ts @@ -47,7 +47,7 @@ export class UsagerDocAccessGuard implements CanActivate { request.usagerDoc = usagerDoc; return request; } catch (e) { - appLogger.error("[UsagerDocAccessGuard] usager not found", { + appLogger.error("[UsagerDocAccessGuard] usager doc not found", { sentry: true, context: { docUuid: request.params.docUuid, diff --git a/packages/backend/src/auth/guards/usager-note-access.guard.ts b/packages/backend/src/auth/guards/usager-note-access.guard.ts index 22988186cb..766a523ba7 100644 --- a/packages/backend/src/auth/guards/usager-note-access.guard.ts +++ b/packages/backend/src/auth/guards/usager-note-access.guard.ts @@ -21,7 +21,7 @@ export class UsagerNoteAccessGuard implements CanActivate { typeof r.user.structureId === "undefined" ) { appLogger.error( - `[UsagerNotesAccessGuard] invalid usagerRef or structureId`, + "[UsagerNotesAccessGuard] invalid usagerRef or structureId", { sentry: true, context: { @@ -50,7 +50,7 @@ export class UsagerNoteAccessGuard implements CanActivate { r.usagerNote = usagerNote; return r; } catch (e) { - appLogger.error(`[UsagerNoteAccessGuard] usager not found`, { + appLogger.error("[UsagerNoteAccessGuard] usager doc not found", { sentry: true, context: { usagerRef, diff --git a/packages/backend/src/modules/open-data-places/services/import-data/load-domifa.ts b/packages/backend/src/modules/open-data-places/services/import-data/load-domifa.ts index b5797b3798..99580bdd3a 100644 --- a/packages/backend/src/modules/open-data-places/services/import-data/load-domifa.ts +++ b/packages/backend/src/modules/open-data-places/services/import-data/load-domifa.ts @@ -29,7 +29,6 @@ export const loadDomifaData = async () => { }); for await (const place of places) { - console.table(place); let domifaPlace = await openDataPlaceRepository.findOneBy({ source: "domifa", uniqueId: place.id.toString(), diff --git a/packages/backend/src/modules/open-data-places/services/update-open-data-places/update-open-data-places.service.ts b/packages/backend/src/modules/open-data-places/services/update-open-data-places/update-open-data-places.service.ts index 7357fd0cb7..846456bddd 100644 --- a/packages/backend/src/modules/open-data-places/services/update-open-data-places/update-open-data-places.service.ts +++ b/packages/backend/src/modules/open-data-places/services/update-open-data-places/update-open-data-places.service.ts @@ -1,4 +1,4 @@ -import { Injectable, OnModuleInit } from "@nestjs/common"; +import { Injectable } from "@nestjs/common"; import { Cron } from "@nestjs/schedule"; import { domifaConfig } from "../../../../config"; import { isCronEnabled } from "../../../../config/services/isCronEnabled.service"; @@ -7,13 +7,7 @@ import { loadMssData } from "../import-data/load-mss"; import { loadSoliguideData } from "../import-data/load-soliguide"; @Injectable() -export class UpdateOpenDataPlacesService implements OnModuleInit { - async onModuleInit() { - if (domifaConfig().envId === "prod" && isCronEnabled()) { - await this.loadOpenDataPlaces(); - } - } - +export class UpdateOpenDataPlacesService { @Cron("0 6 * * *", { timeZone: "Europe/Paris", disabled: domifaConfig().envId !== "prod" && !isCronEnabled(), diff --git a/packages/frontend/src/app/modules/manage-usagers/components/manage-usagers-page/manage-usagers-page.component.ts b/packages/frontend/src/app/modules/manage-usagers/components/manage-usagers-page/manage-usagers-page.component.ts index af4ccbcdad..38b171130c 100644 --- a/packages/frontend/src/app/modules/manage-usagers/components/manage-usagers-page/manage-usagers-page.component.ts +++ b/packages/frontend/src/app/modules/manage-usagers/components/manage-usagers-page/manage-usagers-page.component.ts @@ -287,6 +287,7 @@ export class ManageUsagersPageComponent ) .subscribe(({ filters, usagers, usagersRadiesTotalCount }) => { if (filters && usagers) { + this.setFilters(); this.countRadiesLoaded(usagers); this.usagersCountByStatus = calculateUsagersCountByStatus( usagers, diff --git a/packages/frontend/src/app/modules/usager-dossier/components/step-decision/step-decision.component.html b/packages/frontend/src/app/modules/usager-dossier/components/step-decision/step-decision.component.html index fd85aabba7..63f5c0352b 100644 --- a/packages/frontend/src/app/modules/usager-dossier/components/step-decision/step-decision.component.html +++ b/packages/frontend/src/app/modules/usager-dossier/components/step-decision/step-decision.component.html @@ -26,238 +26,6 @@