Skip to content

Commit

Permalink
fix(backend): fix unit test for export
Browse files Browse the repository at this point in the history
  • Loading branch information
pYassine committed Oct 15, 2024
1 parent 60c4cdf commit d404519
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"`,
])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> => {
Expand Down Expand Up @@ -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 d404519

Please sign in to comment.