Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(backend): fix unit test for export
Browse files Browse the repository at this point in the history
pYassine committed Oct 14, 2024
1 parent 4603c62 commit 0971ca0
Showing 3 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -65,7 +65,6 @@ export class AdminStructuresController {
const structures =
await this.adminStructuresService.getAdminStructuresListData();
const users = await this.adminStructuresService.getUsersForAdmin();
console.log(users);
const workbook = await statsDeploiementExporter.generateExcelDocument({
structures,
users,
Original file line number Diff line number Diff line change
@@ -34,12 +34,12 @@ export class AdminStructuresService {
`user_structure."structureId" = structure.id`
)
.select([
"id",
"email",
"nom",
"user_structure.id AS id",
"user_structure.email AS email",
"user_structure.nom AS nom",
"prenom",
"role",
"verified",
"user_structure.verified as verified",
`"structureId"`,
`structure.nom AS "structureName"`,
])
Original file line number Diff line number Diff line change
@@ -5,6 +5,10 @@ import {
} from "@domifa/common";
import { v4 as uuidv4 } from "uuid";

const getValue = (value: any): any => {
return typeof value === "undefined" || value === null ? null : value;
};

export const getDecisionForStats = (
decision: UsagerDecision
): Partial<UsagerDecision> => {
@@ -57,7 +61,3 @@ export const getAyantsDroitForStats = (
dateNaissance: x.dateNaissance,
}));
};

const getValue = (value: any): any => {
return typeof value === "undefined" || value === null ? null : value;
};

0 comments on commit 0971ca0

Please sign in to comment.