Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(DTFS2-7498): fetch amendments eligibility criteria from db #4155

Merged
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
acac5e4
feat(DTFS2-7498): add eligibility criteria to initial draft amendment
BethThomas141 Jan 17, 2025
27a7e25
feat(DTFS2-7498): add null answer field when creating draft amendment
BethThomas141 Jan 17, 2025
7b3f731
feat(DTFS2-7498): add tests
BethThomas141 Jan 17, 2025
b1ef1d3
feat(DTFS2-7498): add dtfs-central tests
BethThomas141 Jan 20, 2025
895768a
feat(DTFS2-7498): fix test and type names
BethThomas141 Jan 20, 2025
bec8c35
feat(DTFS2-7498): update field to be non-optional
BethThomas141 Jan 20, 2025
8bd62fc
Merge branch 'refs/heads/main' into feat/DTFS2-7498/fetch-eligibility…
BethThomas141 Jan 20, 2025
442d12b
feat(DTFS2-7498): add test to ec not found error
BethThomas141 Jan 20, 2025
21729b1
feat(DTFS2-7498): remove unnecessary check from controller
BethThomas141 Jan 20, 2025
277a863
feat(DTFS2-7498): update objects in tests
BethThomas141 Jan 20, 2025
da899ad
feat(DTFS2-7621): add eligibility criteria to mock data loader
BethThomas141 Jan 21, 2025
fb08f0d
feat(DTFS2-7621): fix test namings
BethThomas141 Jan 21, 2025
13ba88f
feat(DTFS2-7498): renamings and docstrings
BethThomas141 Jan 22, 2025
9cda993
feat(DTFS2-7498): remove audit record and product from eligibility cr…
BethThomas141 Jan 22, 2025
2b387cc
feat(DTFS2-7498): more review mark ups
BethThomas141 Jan 22, 2025
072ab9e
Merge branch 'refs/heads/main' into feat/DTFS2-7498/fetch-eligibility…
BethThomas141 Jan 22, 2025
e04f956
feat(DTFS2-7498): more review mark ups
BethThomas141 Jan 22, 2025
ae7564f
feat(DTFS2-7621): revert accidental test change
BethThomas141 Jan 22, 2025
45fee29
feat(DTFS2-7621): change types to interface
BethThomas141 Jan 22, 2025
d78a3cd
feat(DTFS2-7621): fix api tests
BethThomas141 Jan 22, 2025
d745a4c
feat(DTFS2-7621): tiny renaming
BethThomas141 Jan 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'refs/heads/main' into feat/DTFS2-7498/fetch-eligibility…
…-critieria-to-display

# Conflicts:
#	dtfs-central-api/src/services/portal/facility-amendment.upsertPortalFacilityAmendmentDraft.service.test.ts
#	gef-ui/test-helpers/mock-amendment.ts
#	libs/common/src/test-helpers/mock-data-backend/portal-facility-amendment.ts
#	libs/common/src/types/mongo-db-models/tfm-facilities.ts
BethThomas141 committed Jan 20, 2025
commit 8bd62fc40968d6a62424aa5ed0d6386f48d54254
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable import/first */
import { AMENDMENT_STATUS, AMENDMENT_TYPES, AmendmentsEligibilityCriteria, InvalidAuditDetailsError } from '@ukef/dtfs2-common';
import { PORTAL_AMENDMENT_STATUS, AMENDMENT_TYPES, InvalidAuditDetailsError, AmendmentsEligibilityCriteria } from '@ukef/dtfs2-common';

const mockFindOneUser = jest.fn();
const mockFindOneFacility = jest.fn();
2 changes: 1 addition & 1 deletion gef-ui/test-helpers/mock-amendment.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AMENDMENT_STATUS, AMENDMENT_TYPES, AmendmentsEligibilityCriterionWithAnswer, PortalFacilityAmendmentWithUkefId } from '@ukef/dtfs2-common';
import { PORTAL_AMENDMENT_STATUS, AMENDMENT_TYPES, AmendmentsEligibilityCriterionWithAnswer, PortalFacilityAmendmentWithUkefId } from '@ukef/dtfs2-common';
import { getUnixTime } from 'date-fns';

export class PortalFacilityAmendmentWithUkefIdMockBuilder {
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ export const aPortalFacilityAmendment = (): PortalFacilityAmendment => ({
dealId: new ObjectId(),
createdAt: getUnixTime(new Date()),
updatedAt: getUnixTime(new Date()),
status: AMENDMENT_STATUS.IN_PROGRESS,
status: PORTAL_AMENDMENT_STATUS.DRAFT,
eligibilityCriteria: {
criteria: [{ id: 1, text: 'item 1', answer: null }],
version: 1,
1 change: 1 addition & 0 deletions libs/common/src/types/mongo-db-models/tfm-facilities.ts
Original file line number Diff line number Diff line change
@@ -130,6 +130,7 @@ export type AmendmentsEligibilityCriterionWithAnswer = AmendmentsEligibilityCrit
*/
export interface PortalFacilityAmendment extends BaseAmendment {
type: typeof AMENDMENT_TYPES.PORTAL;
status: PortalAmendmentStatus;
eligibilityCriteria: {
version: number;
criteria: AmendmentsEligibilityCriterionWithAnswer[];
You are viewing a condensed version of this merge commit. You can view the full changes here.