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

[217496] Beneficiary Groups #4366

Merged
merged 113 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
1b6712d
Add Beneficiary Group model.
pkujawa Oct 22, 2024
9f50779
Add tests
pkujawa Oct 23, 2024
f69fe91
Merge branch 'develop' into 218655-beneficiary-group
pkujawa Oct 23, 2024
80f844a
Add tests
pkujawa Oct 23, 2024
3b569ea
Add more tests
pkujawa Oct 23, 2024
5a18887
Merge branch 'develop' into 218655-beneficiary-group
pkujawa Oct 23, 2024
5d099b6
Add default beneficiary group
pkujawa Oct 23, 2024
88ce06b
More tests
pkujawa Oct 24, 2024
2072ba0
Update RealProgramFactory
pkujawa Oct 24, 2024
489005b
Update tests and fixture
pkujawa Oct 24, 2024
23d460f
Update fixtures
pkujawa Oct 24, 2024
30b72e1
add beneficiary group
Oct 24, 2024
f165ff6
Update test
pkujawa Oct 24, 2024
ffae9ba
Update test
pkujawa Oct 24, 2024
168e8b8
Remove cache from tests
pkujawa Oct 24, 2024
9cfe6e2
Merge branch 'develop' into 218655-beneficiary-group
pkujawa Oct 24, 2024
2f5fb9c
add beneficiary group labels to rdi and population modules (part)
Nov 19, 2024
8d6275a
adjust more places
Nov 19, 2024
3e189f8
more beneficiary group changes
Nov 20, 2024
12159e2
next part
Nov 20, 2024
cfa82b5
even more. hopefully all
Nov 21, 2024
79a797c
Merge remote-tracking branch 'origin' into 218655-beneficiary-group
Nov 21, 2024
31ae5a5
resolve conflicts
Nov 21, 2024
1a95392
Merge branch 'develop' into 218655-beneficiary-group
mmaciekk Nov 21, 2024
f643333
update migrations after migrations refactor
pkujawa Nov 26, 2024
863c499
Merge branch 'develop' into 218655-beneficiary-group
pkujawa Nov 26, 2024
1d6bbcb
add beneficiaryfields to program form
Nov 27, 2024
615fafb
Fix e2e tests part 1
szymon-kellton Nov 28, 2024
ced6e5b
Merge remote-tracking branch 'origin/218655-beneficiary-group' into 2…
szymon-kellton Nov 28, 2024
4693279
fix edit validation
Nov 28, 2024
bdfd56a
add beneficiary yup rule
Nov 28, 2024
3e3dc01
Merge remote-tracking branch 'origin' into 218655-beneficiary-group
Nov 28, 2024
94a3525
update schnappy
Nov 28, 2024
003d207
Fix e2e tests part 2
szymon-kellton Nov 29, 2024
45ec0ba
Merge remote-tracking branch 'origin/218655-beneficiary-group' into 2…
szymon-kellton Nov 29, 2024
ce5d3fe
Merge branch 'develop' into 218655-beneficiary-group
mmaciekk Nov 29, 2024
a035f01
num of hh
Nov 29, 2024
6eb10e2
Fix for beneficiary-groups api link for All programmes new programme …
szymon-kellton Nov 29, 2024
1c218d2
Merge remote-tracking branch 'origin/218655-beneficiary-group' into 2…
szymon-kellton Nov 29, 2024
d6ad714
fix review bugs
Nov 29, 2024
981488f
fixes
Nov 29, 2024
e938293
Fix e2e tests part 3
szymon-kellton Dec 2, 2024
6aed832
fix benefisiary nav labels
Dec 2, 2024
69f400e
Fix e2e tests part 4
szymon-kellton Dec 3, 2024
1efdaa1
Merge remote-tracking branch 'origin/218655-beneficiary-group' into 2…
szymon-kellton Dec 3, 2024
e130b56
Fix e2e tests part 6
szymon-kellton Dec 3, 2024
9620cee
Fix e2e tests part 7
szymon-kellton Dec 3, 2024
b0ad2a3
fix managerial console
Dec 3, 2024
2ad674f
Merge remote-tracking branch 'origin' into 218655-beneficiary-group
Dec 3, 2024
fe599ab
fix unused imports
Dec 3, 2024
5ebaf42
Fix e2e tests part 9
szymon-kellton Dec 3, 2024
c0bb195
Fix e2e tests part 9
szymon-kellton Dec 3, 2024
03edfde
fix gf issue type and communication look up labels
Dec 3, 2024
4e4b41e
filter benef. based on dct, fix grievance labels (create)
Dec 3, 2024
45ac0e5
fix gpf key error
Dec 3, 2024
e5cf6f3
fix schema
Dec 4, 2024
ecf3bd6
update snapshot
Dec 4, 2024
816aac1
Fix e2e tests part 10
szymon-kellton Dec 4, 2024
983ead4
Fix e2e tests part 11
szymon-kellton Dec 4, 2024
ea7fdec
fix labels
Dec 4, 2024
405408d
Fix e2e tests part 12
szymon-kellton Dec 4, 2024
ef46a4a
Merge remote-tracking branch 'origin/218655-beneficiary-group' into 2…
szymon-kellton Dec 4, 2024
a944ebf
head
Dec 4, 2024
4691c22
Fix e2e tests part 12.5
szymon-kellton Dec 4, 2024
54ab5ae
Merge remote-tracking branch 'origin/218655-beneficiary-group' into 2…
szymon-kellton Dec 4, 2024
a17e290
fix recipients
Dec 4, 2024
ae31fe8
Fix e2e tests part 13
szymon-kellton Dec 4, 2024
f9d9e8d
Merge remote-tracking branch 'origin/218655-beneficiary-group' into 2…
szymon-kellton Dec 4, 2024
fbe5e0d
fix gf labels
Dec 4, 2024
c1fdf85
Fix e2e tests part 13.5
szymon-kellton Dec 4, 2024
ce3417e
Merge remote-tracking branch 'origin/218655-beneficiary-group' into 2…
szymon-kellton Dec 4, 2024
25c0653
make beneficiary group req
Dec 5, 2024
d0a88d3
Fix e2e tests part 14
szymon-kellton Dec 5, 2024
a342c85
Merge remote-tracking branch 'origin/218655-beneficiary-group' into 2…
szymon-kellton Dec 5, 2024
a32de63
Fix e2e tests part 14.5
szymon-kellton Dec 5, 2024
dacaf29
Merge remote-tracking branch 'origin' into 218655-beneficiary-group
Dec 5, 2024
33e8ceb
FIX LINT
Dec 5, 2024
024c383
Fix e2e tests part 15
szymon-kellton Dec 5, 2024
3e26d5c
Fix e2e tests part 15.5
szymon-kellton Dec 5, 2024
6e5efed
Fix e2e tests part 16
szymon-kellton Dec 5, 2024
54e5b29
validation between dct and beneficiary group, add tests
pkujawa Dec 6, 2024
a4a90d0
fix factory to follow new validation
pkujawa Dec 6, 2024
6d01c6f
change condition
pkujawa Dec 6, 2024
18dc0d8
fix more tests
pkujawa Dec 6, 2024
00709c4
Fix e2e tests part 16.5
szymon-kellton Dec 6, 2024
8f26b7b
Fix e2e tests part 17
szymon-kellton Dec 6, 2024
4f5ac2c
fix more unit tests
pkujawa Dec 6, 2024
b12e9b3
Fix e2e tests part 17.5
szymon-kellton Dec 6, 2024
1e5b4f9
Merge remote-tracking branch 'origin/218655-beneficiary-group' into 2…
szymon-kellton Dec 6, 2024
bb94dc6
fix review bugs
Dec 6, 2024
704f20b
fix
Dec 6, 2024
bf89783
useeffect remove
Dec 6, 2024
5878ac4
Fix e2e tests part 18
szymon-kellton Dec 6, 2024
30ba0d1
Merge remote-tracking branch 'origin/218655-beneficiary-group' into 2…
szymon-kellton Dec 6, 2024
4364f4a
clean
pkujawa Dec 6, 2024
5cbde82
Fix e2e tests part 18.5
szymon-kellton Dec 6, 2024
57ebc83
Fix e2e tests part 18.6
szymon-kellton Dec 6, 2024
a9668a0
update unit test
pkujawa Dec 6, 2024
081c066
Fix e2e tests part 19
szymon-kellton Dec 9, 2024
ea8b804
Merge remote-tracking branch 'origin/218655-beneficiary-group' into 2…
szymon-kellton Dec 9, 2024
dc0a793
Fix e2e tests part 20
szymon-kellton Dec 9, 2024
504188a
Fix e2e tests part 21
szymon-kellton Dec 9, 2024
9ecb611
Fix e2e tests part 22
szymon-kellton Dec 9, 2024
0f46d01
Fix e2e tests part 22.5
szymon-kellton Dec 9, 2024
0e17a0c
fix 2 bugs with one stone
Dec 9, 2024
3b0ae09
fix typo
Dec 9, 2024
43c5fe0
Merge branch 'develop' into 218655-beneficiary-group
pavlo-mk Dec 10, 2024
5067b12
update snappy
Dec 10, 2024
d4565dc
tests upd :fire:
pavlo-mk Dec 10, 2024
a2137b5
Merge remote-tracking branch 'origin/218655-beneficiary-group' into 2…
pavlo-mk Dec 10, 2024
6d8da75
run test with assertRaises :star:
pavlo-mk Dec 10, 2024
4163ed0
update test_program_utils :star2:
pavlo-mk Dec 10, 2024
f069438
fix test_program_utils, update factory
pkujawa Dec 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
28 changes: 22 additions & 6 deletions src/frontend/data/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,19 @@ input BankTransferObjectType {
accountHolderName: String!
}

type BeneficiaryGroupNode implements Node {
id: ID!
createdAt: DateTime!
updatedAt: DateTime!
name: String!
groupLabel: String!
groupLabelPlural: String!
memberLabel: String!
memberLabelPlural: String!
masterDetail: Boolean!
programs(offset: Int, before: String, after: String, first: Int, last: Int, name: String): ProgramNodeConnection!
}

scalar BigInt

type BulkGrievanceAddNoteMutation {
Expand Down Expand Up @@ -699,6 +712,7 @@ input CreateProgramInput {
administrativeAreasOfImplementation: String
businessAreaSlug: String
dataCollectingTypeCode: String
beneficiaryGroup: String
partners: [ProgramPartnerThroughInput]
partnerAccess: String
programmeCode: String
Expand Down Expand Up @@ -2513,8 +2527,8 @@ type PaymentNode implements Node {
fspAuthCode: String
isCashAssist: Boolean!
followUps(offset: Int, before: String, after: String, first: Int, last: Int): PaymentNodeConnection!
paymentVerification: PaymentVerificationNode
householdSnapshot: PaymentHouseholdSnapshotNode
paymentVerification: PaymentVerificationNode
ticketComplaintDetails: TicketComplaintDetailsNode
ticketSensitiveDetails: TicketSensitiveDetailsNode
adminUrl: String
Expand Down Expand Up @@ -2607,13 +2621,13 @@ type PaymentPlanNode implements Node {
excludeHouseholdError: String!
name: String
isCashAssist: Boolean!
approvalProcess(offset: Int, before: String, after: String, first: Int, last: Int): ApprovalProcessNodeConnection!
followUps(offset: Int, before: String, after: String, first: Int, last: Int): PaymentPlanNodeConnection!
deliveryMechanisms: [DeliveryMechanismPerPaymentPlanNode]
paymentItems(offset: Int, before: String, after: String, first: Int, last: Int): PaymentNodeConnection!
documents(offset: Int, before: String, after: String, first: Int, last: Int): PaymentPlanSupportingDocumentNodeConnection!
paymentVerificationPlans(offset: Int, before: String, after: String, first: Int, last: Int): PaymentVerificationPlanNodeConnection!
paymentVerificationSummary: PaymentVerificationSummaryNode
approvalProcess(offset: Int, before: String, after: String, first: Int, last: Int): ApprovalProcessNodeConnection!
documents(offset: Int, before: String, after: String, first: Int, last: Int): PaymentPlanSupportingDocumentNodeConnection!
adminUrl: String
currencyName: String
hasPaymentListExportFile: Boolean
Expand Down Expand Up @@ -2988,6 +3002,7 @@ type ProgramNode implements Node {
partners: [PartnerNode]
biometricDeduplicationEnabled: Boolean!
deduplicationSetId: UUID
beneficiaryGroup: BeneficiaryGroupNode
pduFields: [PeriodicFieldNode]
households(offset: Int, before: String, after: String, first: Int, last: Int): HouseholdNodeConnection!
householdSet(offset: Int, before: String, after: String, first: Int, last: Int): HouseholdNodeConnection!
Expand Down Expand Up @@ -3157,7 +3172,7 @@ type Query {
dataCollectionTypeChoices: [DataCollectingTypeChoiceObject]
pduSubtypeChoices: [PDUSubtypeChoiceObject]
program(id: ID!): ProgramNode
allPrograms(offset: Int, before: String, after: String, first: Int, last: Int, businessArea: String!, search: String, status: [String], sector: [String], numberOfHouseholds: String, budget: String, startDate: Date, endDate: Date, name: String, numberOfHouseholdsWithTpInProgram: String, dataCollectingType: String, compatibleDct: Boolean, orderBy: String): ProgramNodeConnection
allPrograms(offset: Int, before: String, after: String, first: Int, last: Int, businessArea: String!, search: String, status: [String], sector: [String], numberOfHouseholds: String, budget: String, startDate: Date, endDate: Date, name: String, beneficiaryGroupMatch: Boolean, numberOfHouseholdsWithTpInProgram: String, dataCollectingType: String, compatibleDct: Boolean, orderBy: String): ProgramNodeConnection
chartProgrammesBySector(businessAreaSlug: String!, year: Int!, program: String, administrativeArea: String): ChartDetailedDatasetsNode
chartTotalTransferredByMonth(businessAreaSlug: String!, year: Int!, program: String, administrativeArea: String): ChartDetailedDatasetsNode
programStatusChoices: [ChoiceObject]
Expand All @@ -3167,7 +3182,7 @@ type Query {
programScopeChoices: [ChoiceObject]
cashPlanStatusChoices: [ChoiceObject]
dataCollectingTypeChoices: [ChoiceObject]
allActivePrograms(offset: Int, before: String, after: String, first: Int, last: Int, businessArea: String!, search: String, status: [String], sector: [String], numberOfHouseholds: String, budget: String, startDate: Date, endDate: Date, name: String, numberOfHouseholdsWithTpInProgram: String, dataCollectingType: String, compatibleDct: Boolean, orderBy: String): ProgramNodeConnection
allActivePrograms(offset: Int, before: String, after: String, first: Int, last: Int, businessArea: String!, search: String, status: [String], sector: [String], numberOfHouseholds: String, budget: String, startDate: Date, endDate: Date, name: String, beneficiaryGroupMatch: Boolean, numberOfHouseholdsWithTpInProgram: String, dataCollectingType: String, compatibleDct: Boolean, orderBy: String): ProgramNodeConnection
programCycle(id: ID!): ProgramCycleNode
canRunDeduplication: Boolean
isDeduplicationDisabled: Boolean
Expand Down Expand Up @@ -4550,6 +4565,7 @@ input UpdateProgramInput {
populationGoal: Int
administrativeAreasOfImplementation: String
dataCollectingTypeCode: String
beneficiaryGroup: String
programmeCode: String
pduFields: [PDUFieldInput]
}
Expand Down Expand Up @@ -4681,13 +4697,13 @@ type UserNode implements Node {
doapHash: String!
userRoles: [UserRoleNode!]!
documentSet(offset: Int, before: String, after: String, first: Int, last: Int): DocumentNodeConnection!
approvalSet: [ApprovalNode!]!
registrationDataImports(offset: Int, before: String, after: String, first: Int, last: Int): RegistrationDataImportNodeConnection!
createdPaymentPlans(offset: Int, before: String, after: String, first: Int, last: Int): PaymentPlanNodeConnection!
createdFinancialServiceProviderXlsxTemplates(offset: Int, before: String, after: String, first: Int, last: Int): FinancialServiceProviderXlsxTemplateNodeConnection!
createdFinancialServiceProviders(offset: Int, before: String, after: String, first: Int, last: Int): FinancialServiceProviderNodeConnection!
createdDeliveryMechanisms(offset: Int, before: String, after: String, first: Int, last: Int): DeliveryMechanismPerPaymentPlanNodeConnection!
sentDeliveryMechanisms(offset: Int, before: String, after: String, first: Int, last: Int): DeliveryMechanismPerPaymentPlanNodeConnection!
approvalSet: [ApprovalNode!]!
createdTickets(offset: Int, before: String, after: String, first: Int, last: Int): GrievanceTicketNodeConnection!
assignedTickets(offset: Int, before: String, after: String, first: Int, last: Int): GrievanceTicketNodeConnection!
ticketNotes(offset: Int, before: String, after: String, first: Int, last: Int): TicketNoteNodeConnection!
Expand Down
25 changes: 25 additions & 0 deletions src/frontend/generated/core/ApiError.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ApiRequestOptions } from './ApiRequestOptions';
import type { ApiResult } from './ApiResult';

export class ApiError extends Error {
public readonly url: string;
public readonly status: number;
public readonly statusText: string;
public readonly body: any;
public readonly request: ApiRequestOptions;

constructor(request: ApiRequestOptions, response: ApiResult, message: string) {
super(message);

this.name = 'ApiError';
this.url = response.url;
this.status = response.status;
this.statusText = response.statusText;
this.body = response.body;
this.request = request;
}
}
17 changes: 17 additions & 0 deletions src/frontend/generated/core/ApiRequestOptions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ApiRequestOptions = {
readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
readonly url: string;
readonly path?: Record<string, any>;
readonly cookies?: Record<string, any>;
readonly headers?: Record<string, any>;
readonly query?: Record<string, any>;
readonly formData?: Record<string, any>;
readonly body?: any;
readonly mediaType?: string;
readonly responseHeader?: string;
readonly errors?: Record<number, string>;
};
11 changes: 11 additions & 0 deletions src/frontend/generated/core/ApiResult.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ApiResult = {
readonly url: string;
readonly ok: boolean;
readonly status: number;
readonly statusText: string;
readonly body: any;
};
131 changes: 131 additions & 0 deletions src/frontend/generated/core/CancelablePromise.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export class CancelError extends Error {

constructor(message: string) {
super(message);
this.name = 'CancelError';
}

public get isCancelled(): boolean {
return true;
}
}

export interface OnCancel {
readonly isResolved: boolean;
readonly isRejected: boolean;
readonly isCancelled: boolean;

(cancelHandler: () => void): void;
}

export class CancelablePromise<T> implements Promise<T> {
#isResolved: boolean;
#isRejected: boolean;
#isCancelled: boolean;
readonly #cancelHandlers: (() => void)[];
readonly #promise: Promise<T>;
#resolve?: (value: T | PromiseLike<T>) => void;
#reject?: (reason?: any) => void;

constructor(
executor: (
resolve: (value: T | PromiseLike<T>) => void,
reject: (reason?: any) => void,
onCancel: OnCancel
) => void
) {
this.#isResolved = false;
this.#isRejected = false;
this.#isCancelled = false;
this.#cancelHandlers = [];
this.#promise = new Promise<T>((resolve, reject) => {
this.#resolve = resolve;
this.#reject = reject;

const onResolve = (value: T | PromiseLike<T>): void => {
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
return;
}
this.#isResolved = true;
if (this.#resolve) this.#resolve(value);
};

const onReject = (reason?: any): void => {
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
return;
}
this.#isRejected = true;
if (this.#reject) this.#reject(reason);
};

const onCancel = (cancelHandler: () => void): void => {
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
return;
}
this.#cancelHandlers.push(cancelHandler);
};

Object.defineProperty(onCancel, 'isResolved', {
get: (): boolean => this.#isResolved,
});

Object.defineProperty(onCancel, 'isRejected', {
get: (): boolean => this.#isRejected,
});

Object.defineProperty(onCancel, 'isCancelled', {
get: (): boolean => this.#isCancelled,
});

return executor(onResolve, onReject, onCancel as OnCancel);
});
}

get [Symbol.toStringTag]() {
return "Cancellable Promise";
}

public then<TResult1 = T, TResult2 = never>(
onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null
): Promise<TResult1 | TResult2> {
return this.#promise.then(onFulfilled, onRejected);
}

public catch<TResult = never>(
onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null
): Promise<T | TResult> {
return this.#promise.catch(onRejected);
}

public finally(onFinally?: (() => void) | null): Promise<T> {
return this.#promise.finally(onFinally);
}

public cancel(): void {
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
return;
}
this.#isCancelled = true;
if (this.#cancelHandlers.length) {
try {
for (const cancelHandler of this.#cancelHandlers) {
cancelHandler();
}
} catch (error) {
console.warn('Cancellation threw an error', error);
return;
}
}
this.#cancelHandlers.length = 0;
if (this.#reject) this.#reject(new CancelError('Request aborted'));
}

public get isCancelled(): boolean {
return this.#isCancelled;
}
}
32 changes: 32 additions & 0 deletions src/frontend/generated/core/OpenAPI.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ApiRequestOptions } from './ApiRequestOptions';

type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
type Headers = Record<string, string>;

export type OpenAPIConfig = {
BASE: string;
VERSION: string;
WITH_CREDENTIALS: boolean;
CREDENTIALS: 'include' | 'omit' | 'same-origin';
TOKEN?: string | Resolver<string> | undefined;
USERNAME?: string | Resolver<string> | undefined;
PASSWORD?: string | Resolver<string> | undefined;
HEADERS?: Headers | Resolver<Headers> | undefined;
ENCODE_PATH?: ((path: string) => string) | undefined;
};

export const OpenAPI: OpenAPIConfig = {
BASE: '',
VERSION: '1.0.0',
WITH_CREDENTIALS: false,
CREDENTIALS: 'include',
TOKEN: undefined,
USERNAME: undefined,
PASSWORD: undefined,
HEADERS: undefined,
ENCODE_PATH: undefined,
};
Loading
Loading