diff --git a/packages/reva-api/modules/candidacy/candidacy.graphql b/packages/reva-api/modules/candidacy/candidacy.graphql index 9fff56a3b..5e638d240 100644 --- a/packages/reva-api/modules/candidacy/candidacy.graphql +++ b/packages/reva-api/modules/candidacy/candidacy.graphql @@ -72,7 +72,7 @@ type Candidacy { status: CandidacyStatusStep! typeAccompagnement: TypeAccompagnement! lastActivityDate: Timestamp - isObsolete: Boolean! + isCaduque: Boolean! } enum TypeAccompagnement { ACCOMPAGNE diff --git a/packages/reva-api/modules/candidacy/candidacy.resolvers.ts b/packages/reva-api/modules/candidacy/candidacy.resolvers.ts index 4d9cd1f85..1e8bed2c7 100644 --- a/packages/reva-api/modules/candidacy/candidacy.resolvers.ts +++ b/packages/reva-api/modules/candidacy/candidacy.resolvers.ts @@ -32,6 +32,7 @@ import { getCandidacyCountByStatus } from "./features/getCandidacyCountByStatus" import { getCandidacyDropOutByCandidacyId } from "./features/getCandidacyDropOutByCandidacyId"; import { getCandidacyFinancingMethodById } from "./features/getCandidacyFinancingMethodById"; import { getCandidacyGoals } from "./features/getCandidacyGoals"; +import { getCandidacyIsCaduque } from "./features/getCandidacyIsCaduque"; import { getCandidacyOnCandidacyFinancingMethodsByCandidacyId } from "./features/getCandidacyOnCandidacyFinancingMethodsByCandidacyId"; import { getCandidacyStatusesByCandidacyId } from "./features/getCandidacyStatusesByCandidacyId"; import { getDropOutReasonById } from "./features/getDropOutReasonById"; @@ -57,7 +58,6 @@ import { sendCandidacyDropOutEmailToCertificateur, } from "./mails"; import { resolversSecurityMap } from "./security/security"; -import { getCandidacyIsObsolete } from "./features/getCandidacyIsObsolete"; const unsafeResolvers = { Candidacy: { @@ -84,8 +84,8 @@ const unsafeResolvers = { getCandidacyDropOutByCandidacyId({ candidacyId }), candidacyOnCandidacyFinancingMethods: ({ id: candidacyId }: Candidacy) => getCandidacyOnCandidacyFinancingMethodsByCandidacyId({ candidacyId }), - isObsolete: ({ id: candidacyId }: Candidacy) => - getCandidacyIsObsolete({ candidacyId }), + isCaduque: ({ id: candidacyId }: Candidacy) => + getCandidacyIsCaduque({ candidacyId }), }, CandidacyOnCandidacyFinancingMethod: { candidacyFinancingMethod: ({ diff --git a/packages/reva-api/modules/candidacy/features/getCandidacyIsObsolete.ts b/packages/reva-api/modules/candidacy/features/getCandidacyIsCaduque.ts similarity index 90% rename from packages/reva-api/modules/candidacy/features/getCandidacyIsObsolete.ts rename to packages/reva-api/modules/candidacy/features/getCandidacyIsCaduque.ts index 66b4bf906..ae2e94ed1 100644 --- a/packages/reva-api/modules/candidacy/features/getCandidacyIsObsolete.ts +++ b/packages/reva-api/modules/candidacy/features/getCandidacyIsCaduque.ts @@ -1,7 +1,7 @@ import { addMonths, isBefore } from "date-fns"; import { getCandidacyById } from "./getCandidacyById"; -export const getCandidacyIsObsolete = async ({ +export const getCandidacyIsCaduque = async ({ candidacyId, }: { candidacyId: string;