Skip to content

Commit

Permalink
fix(frontend): fix design of cerfa buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
pYassine committed Dec 19, 2024
1 parent 3998ca4 commit 1375145
Show file tree
Hide file tree
Showing 8 changed files with 328 additions and 274 deletions.
21 changes: 12 additions & 9 deletions packages/backend/src/auth/guards/usager-access.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/auth/guards/usager-note-access.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ export class ManageUsagersPageComponent
)
.subscribe(({ filters, usagers, usagersRadiesTotalCount }) => {
if (filters && usagers) {
this.setFilters();
this.countRadiesLoaded(usagers);
this.usagersCountByStatus = calculateUsagersCountByStatus(
usagers,
Expand Down
Loading

0 comments on commit 1375145

Please sign in to comment.