Skip to content

Commit

Permalink
[217496] Beneficiary Groups (#4366)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkujawa authored Dec 10, 2024
1 parent a82aa7b commit 2a9e429
Show file tree
Hide file tree
Showing 339 changed files with 10,625 additions and 1,020 deletions.
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

0 comments on commit 2a9e429

Please sign in to comment.