Skip to content

Commit d404519

Browse files
committed
fix(backend): fix unit test for export
1 parent 60c4cdf commit d404519

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

packages/backend/src/modules/portail-admin/controllers/admin-structures/admin-structures.controller.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ export class AdminStructuresController {
6565
const structures =
6666
await this.adminStructuresService.getAdminStructuresListData();
6767
const users = await this.adminStructuresService.getUsersForAdmin();
68-
console.log(users);
6968
const workbook = await statsDeploiementExporter.generateExcelDocument({
7069
structures,
7170
users,

packages/backend/src/modules/portail-admin/services/admin-structures.service.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ export class AdminStructuresService {
3434
`user_structure."structureId" = structure.id`
3535
)
3636
.select([
37-
"id",
38-
"email",
39-
"nom",
37+
"user_structure.id AS id",
38+
"user_structure.email AS email",
39+
"user_structure.nom AS nom",
4040
"prenom",
4141
"role",
42-
"verified",
42+
"user_structure.verified as verified",
4343
`"structureId"`,
4444
`structure.nom AS "structureName"`,
4545
])

packages/backend/src/usagers/services/dataCleanerForStats.service.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ import {
55
} from "@domifa/common";
66
import { v4 as uuidv4 } from "uuid";
77

8+
const getValue = (value: any): any => {
9+
return typeof value === "undefined" || value === null ? null : value;
10+
};
11+
812
export const getDecisionForStats = (
913
decision: UsagerDecision
1014
): Partial<UsagerDecision> => {
@@ -57,7 +61,3 @@ export const getAyantsDroitForStats = (
5761
dateNaissance: x.dateNaissance,
5862
}));
5963
};
60-
61-
const getValue = (value: any): any => {
62-
return typeof value === "undefined" || value === null ? null : value;
63-
};

0 commit comments

Comments
 (0)