Skip to content

Commit

Permalink
feat(orga): moving campaign participation result repository
Browse files Browse the repository at this point in the history
  • Loading branch information
alicegoarnisson committed Dec 16, 2024
1 parent f6a3d22 commit 3871eb6
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 17 deletions.
2 changes: 0 additions & 2 deletions api/lib/domain/events/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import * as eventBusBuilder from '../../infrastructure/events/EventBusBuilder.js
import { EventDispatcher } from '../../infrastructure/events/EventDispatcher.js';
import { EventDispatcherLogger } from '../../infrastructure/events/EventDispatcherLogger.js';
import * as badgeAcquisitionRepository from '../../infrastructure/repositories/badge-acquisition-repository.js';
import * as campaignParticipationResultRepository from '../../infrastructure/repositories/campaign-participation-result-repository.js';
import * as campaignRepository from '../../infrastructure/repositories/campaign-repository.js';
import * as complementaryCertificationCourseResultRepository from '../../infrastructure/repositories/complementary-certification-course-result-repository.js';
import * as complementaryCertificationScoringCriteriaRepository from '../../infrastructure/repositories/complementary-certification-scoring-criteria-repository.js';
Expand All @@ -53,7 +52,6 @@ const dependencies = {
authenticationMethodRepository,
badgeAcquisitionRepository,
campaignRepository,
campaignParticipationResultRepository,
certificationAssessmentHistoryRepository,
certificationAssessmentRepository,
certificationCenterRepository,
Expand Down
2 changes: 0 additions & 2 deletions api/lib/domain/usecases/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ import * as passwordGenerator from '../../domain/services/password-generator.js'
import * as verifyCertificateCodeService from '../../domain/services/verify-certificate-code-service.js';
import * as badgeAcquisitionRepository from '../../infrastructure/repositories/badge-acquisition-repository.js';
import * as badgeForCalculationRepository from '../../infrastructure/repositories/badge-for-calculation-repository.js';
import { campaignParticipationResultRepository } from '../../infrastructure/repositories/campaign-participation-result-repository.js';
import * as campaignRepository from '../../infrastructure/repositories/campaign-repository.js';
import * as certifiableProfileForLearningContentRepository from '../../infrastructure/repositories/certifiable-profile-for-learning-content-repository.js';
import * as complementaryCertificationCourseResultRepository from '../../infrastructure/repositories/complementary-certification-course-result-repository.js';
Expand Down Expand Up @@ -212,7 +211,6 @@ const dependencies = {
campaignManagementRepository,
participationCompletedJobRepository,
campaignParticipationRepository,
campaignParticipationResultRepository,
campaignProfileRepository,
campaignRepository,
centerRepository,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import dayjs from 'dayjs';

import { disconnect, knex } from '../../db/knex-database-connection.js';
import * as badgeAcquisitionRepository from '../../lib/infrastructure/repositories/badge-acquisition-repository.js';
import { campaignParticipationResultRepository } from '../../lib/infrastructure/repositories/campaign-participation-result-repository.js';
import * as campaignRepository from '../../lib/infrastructure/repositories/campaign-repository.js';
import * as targetProfileRepository from '../../lib/infrastructure/repositories/target-profile-repository.js';
import * as badgeRepository from '../../src/evaluation/infrastructure/repositories/badge-repository.js';
import * as userRepository from '../../src/identity-access-management/infrastructure/repositories/user.repository.js';
import { PoleEmploiSending } from '../../src/prescription/campaign-participation/domain/models/PoleEmploiSending.js';
import { PoleEmploiPayload } from '../../src/prescription/campaign-participation/infrastructure/externals/pole-emploi/PoleEmploiPayload.js';
import * as campaignParticipationRepository from '../../src/prescription/campaign-participation/infrastructure/repositories/campaign-participation-repository.js';
import { campaignParticipationResultRepository } from '../../src/prescription/campaign-participation/infrastructure/repositories/campaign-participation-result-repository.js';
import * as poleEmploiSendingRepository from '../../src/prescription/campaign-participation/infrastructure/repositories/pole-emploi-sending-repository.js';
import { CampaignParticipationStatuses } from '../../src/prescription/shared/domain/constants.js';
import { Assessment } from '../../src/shared/domain/models/Assessment.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { fileURLToPath } from 'node:url';

import * as badgeAcquisitionRepository from '../../../../../lib/infrastructure/repositories/badge-acquisition-repository.js';
import * as badgeForCalculationRepository from '../../../../../lib/infrastructure/repositories/badge-for-calculation-repository.js';
import { campaignParticipationResultRepository } from '../../../../../lib/infrastructure/repositories/campaign-participation-result-repository.js';
import * as campaignRepository from '../../../../../lib/infrastructure/repositories/campaign-repository.js';
import * as knowledgeElementRepository from '../../../../../lib/infrastructure/repositories/knowledge-element-repository.js';
import * as learningContentRepository from '../../../../../lib/infrastructure/repositories/learning-content-repository.js';
Expand Down Expand Up @@ -32,6 +31,7 @@ import * as campaignAssessmentParticipationRepository from '../../infrastructure
import * as campaignAssessmentParticipationResultRepository from '../../infrastructure/repositories/campaign-assessment-participation-result-repository.js';
import * as campaignParticipationOverviewRepository from '../../infrastructure/repositories/campaign-participation-overview-repository.js';
import * as campaignParticipationRepository from '../../infrastructure/repositories/campaign-participation-repository.js';
import { campaignParticipationResultRepository } from '../../infrastructure/repositories/campaign-participation-result-repository.js';
import * as campaignProfileRepository from '../../infrastructure/repositories/campaign-profile-repository.js';
import { repositories as campaignRepositories } from '../../infrastructure/repositories/index.js'; // needed to includes organizationFeatureAPI from another BC
import { participationResultCalculationJobRepository } from '../../infrastructure/repositories/jobs/participation-result-calculation-job-repository.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { CampaignParticipationResult } from '../../../src/shared/domain/models/CampaignParticipationResult.js';
import * as areaRepository from '../../../src/shared/infrastructure/repositories/area-repository.js';
import * as assessmentRepository from '../../../src/shared/infrastructure/repositories/assessment-repository.js';
import * as competenceRepository from '../../../src/shared/infrastructure/repositories/competence-repository.js';
import * as campaignParticipationRepository from './../../../src/prescription/campaign-participation/infrastructure/repositories/campaign-participation-repository.js';
import * as campaignRepository from './campaign-repository.js';
import * as knowledgeElementRepository from './knowledge-element-repository.js';
import * as campaignRepository from '../../../../../lib/infrastructure/repositories/campaign-repository.js';
import * as knowledgeElementRepository from '../../../../../lib/infrastructure/repositories/knowledge-element-repository.js';
import { CampaignParticipationResult } from '../../../../shared/domain/models/CampaignParticipationResult.js';
import * as areaRepository from '../../../../shared/infrastructure/repositories/area-repository.js';
import * as assessmentRepository from '../../../../shared/infrastructure/repositories/assessment-repository.js';
import * as competenceRepository from '../../../../shared/infrastructure/repositories/competence-repository.js';
import * as campaignParticipationRepository from './campaign-participation-repository.js';

const campaignParticipationResultRepository = {
async getByParticipationId(campaignParticipationId) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { campaignParticipationResultRepository } from '../../../../lib/infrastructure/repositories/campaign-participation-result-repository.js';
import { CampaignParticipationStatuses } from '../../../../src/prescription/shared/domain/constants.js';
import { KnowledgeElement } from '../../../../src/shared/domain/models/KnowledgeElement.js';
import { databaseBuilder, expect } from '../../../test-helper.js';
import { campaignParticipationResultRepository } from '../../../../../../src/prescription/campaign-participation/infrastructure/repositories/campaign-participation-result-repository.js';
import { CampaignParticipationStatuses } from '../../../../../../src/prescription/shared/domain/constants.js';
import { KnowledgeElement } from '../../../../../../src/shared/domain/models/KnowledgeElement.js';
import { databaseBuilder, expect } from '../../../../../test-helper.js';

const { STARTED } = CampaignParticipationStatuses;

Expand Down

0 comments on commit 3871eb6

Please sign in to comment.