Skip to content

Commit

Permalink
Corrige des imports
Browse files Browse the repository at this point in the history
  • Loading branch information
amandinejacquelin committed Feb 20, 2025
1 parent 905c3d6 commit bd0e772
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 24 deletions.
21 changes: 13 additions & 8 deletions backend/src/collectivites/tags/tag.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@ import { DatabaseService } from '@/backend/utils';
import { AnyColumn, eq } from 'drizzle-orm';
import { PgTable } from 'drizzle-orm/pg-core';
import { Transaction } from '@/backend/utils/database/transaction.utils';
import { Tag, TagEnum, TagInsert, TagType } from './tag.table-base';
import { financeurTagTable } from './financeur-tag.table';
import { personneTagTable } from './personne-tag.table';
import { partenaireTagTable } from './partenaire-tag.table';
import { serviceTagTable } from './service-tag.table';
import { structureTagTable } from './structure-tag.table';
import { categorieTagTable } from './categorie-tag.table';
import { libreTagTable } from './libre-tag.table';
import { financeurTagTable } from '@/backend/collectivites/tags/financeur-tag.table';
import { personneTagTable } from '@/backend/collectivites/tags/personne-tag.table';
import { partenaireTagTable } from '@/backend/collectivites/tags/partenaire-tag.table';
import { serviceTagTable } from '@/backend/collectivites/tags/service-tag.table';
import { structureTagTable } from '@/backend/collectivites/tags/structure-tag.table';
import { categorieTagTable } from '@/backend/collectivites/tags/categorie-tag.table';
import { libreTagTable } from '@/backend/collectivites/tags/libre-tag.table';
import {
Tag,
TagEnum,
TagInsert,
TagType,
} from '@/backend/collectivites/tags/tag.table-base';

const tagTypeTable: Record<TagType, PgTable & { collectiviteId: AnyColumn }> = {
[TagEnum.Financeur]: financeurTagTable,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PermissionService } from '@/backend/auth/authorizations/permission.service';
import { Test } from '@nestjs/testing';
import CollectivitesService from '../../collectivites/services/collectivites.service';
import { DatabaseService } from '../../utils/database/database.service';
import { DatabaseService } from '@/backend/utils/database/database.service';
import {
GetFilteredIndicateurRequestQueryOptionType,
GetFilteredIndicateursRequestOptionType,
Expand Down Expand Up @@ -673,15 +673,15 @@ describe('IndicateurFiltreService', () => {
});
it('Test le filtre indicateurIds', async () => {
const filtres: GetFilteredIndicateursRequestOptionType = {
indicateurIds: [1, 2]
}
indicateurIds: [1, 2],
};
const toCheck = indicateurFiltreService.applyFilters(
datas,
filtres,
true
);
expect(toCheck.length).toEqual(2);
})
});
});
describe('applySorts', () => {
const ind1 = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { PermissionService } from '@/backend/auth/authorizations/permission.serv
import { ResourceType } from '@/backend/auth/authorizations/resource-type.enum';
import { ficheActionAxeTable } from '@/backend/plans/fiches/shared/models/fiche-action-axe.table';
import { serviceTagTable } from '@/domain/collectivites';
import { axeTable, ficheActionIndicateurTable } from '@/domain/plans/fiches';
import { Injectable } from '@nestjs/common';
import { getTableName, sql } from 'drizzle-orm';
import { intersection, isNil } from 'es-toolkit';
Expand All @@ -12,7 +11,7 @@ import CollectivitesService from '../../collectivites/services/collectivites.ser
import { groupementCollectiviteTable } from '../../collectivites/shared/models/groupement-collectivite.table';
import { categorieTagTable } from '../../collectivites/tags/categorie-tag.table';
import { ficheActionTable } from '../../plans/fiches/shared/models/fiche-action.table';
import { DatabaseService } from '../../utils/database/database.service';
import { DatabaseService } from '@/backend/utils/database/database.service';
import { indicateurActionTable } from '../shared/models/indicateur-action.table';
import { indicateurCategorieTagTable } from '../shared/models/indicateur-categorie-tag.table';
import { indicateurCollectiviteTable } from '../shared/models/indicateur-collectivite.table';
Expand All @@ -27,6 +26,8 @@ import {
GetFilteredIndicateursRequestOptionType,
} from './get-filtered-indicateurs.request';
import { GetFilteredIndicateurResponseType } from './get-filtered-indicateurs.response';
import { axeTable } from '@/backend/plans/fiches/shared/models/axe.table';
import { ficheActionIndicateurTable } from '@/backend/plans/fiches/shared/models/fiche-action-indicateur.table';

export type RequestResultIndicateursRaw = {
id: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { DatabaseService } from '@/backend/utils';
import { INestApplication } from '@nestjs/common';
import { eq } from 'drizzle-orm';
import { default as request } from 'supertest';
import { collectiviteTable } from '../../collectivites';
import { UpsertIndicateursValeursRequest } from '../shared/models/upsert-indicateurs-valeurs.request';
import { collectiviteTable } from '@/domain/collectivites';

const collectiviteId = 3;

Expand Down
18 changes: 9 additions & 9 deletions backend/src/plans/fiches/shared/edit-fiche.request.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { indicateurDefinitionSchema } from '@/domain/indicateurs';
import z from 'zod';
import { libreTagSchema } from '../../../collectivites/tags/libre-tag.table';
import { serviceTagSchema } from '../../../collectivites/tags/service-tag.table';
import { partenaireTagSchema } from '../../../collectivites/tags/partenaire-tag.table';
import { structureTagSchema } from '../../../collectivites/tags/structure-tag.table';
import { financeurTagSchema } from '../../../collectivites/tags/financeur-tag.table';
import { actionRelationSchema } from '../../../referentiels/models/action-relation.table';
import { effetAttenduSchema } from '../../../shared/effet-attendu/effet-attendu.table';
import { sousThematiqueSchema } from '../../../shared/thematiques/sous-thematique.table';
import { thematiqueSchema } from '../../../shared/thematiques/thematique.table';
import { libreTagSchema } from '@/backend/collectivites/tags/libre-tag.table';
import { serviceTagSchema } from '@/backend/collectivites/tags/service-tag.table';
import { partenaireTagSchema } from '@/backend/collectivites/tags/partenaire-tag.table';
import { structureTagSchema } from '@/backend/collectivites/tags/structure-tag.table';
import { financeurTagSchema } from '@/backend/collectivites/tags/financeur-tag.table';
import { actionRelationSchema } from '@/backend/referentiels/models/action-relation.table';
import { effetAttenduSchema } from '@/backend/shared/effet-attendu/effet-attendu.table';
import { sousThematiqueSchema } from '@/backend/shared/thematiques/sous-thematique.table';
import { thematiqueSchema } from '@/backend/shared/thematiques/thematique.table';
import { axeSchema } from './models/axe.table';
import {
ciblesEnumSchema,
Expand Down

0 comments on commit bd0e772

Please sign in to comment.