diff --git a/src/frontend/data/schema.graphql b/src/frontend/data/schema.graphql index 329fbe1c37..fb18fce418 100644 --- a/src/frontend/data/schema.graphql +++ b/src/frontend/data/schema.graphql @@ -392,33 +392,6 @@ type BusinessAreaNodeEdge { cursor: String! } -type CashPlanAndPaymentPlanEdges { - cursor: String - node: CashPlanAndPaymentPlanNode -} - -type CashPlanAndPaymentPlanNode { - adminUrl: String - objType: String - id: String - unicefId: String - verificationStatus: String - status: String - currency: String - totalDeliveredQuantity: Float - startDate: String - endDate: String - programName: String - updatedAt: String - verificationPlans: [PaymentVerificationPlanNode] - totalNumberOfHouseholds: Int - totalEntitledQuantity: Float - totalUndeliveredQuantity: Float - assistanceMeasurement: String - dispersionDate: String - serviceProviderFullName: String -} - input CategoryExtrasInput { sensitiveGrievanceTicketExtras: SensitiveGrievanceTicketExtras grievanceComplaintTicketExtras: GrievanceComplaintTicketExtras @@ -1453,7 +1426,7 @@ type GrievanceTicketNode implements Node { adminUrl: String household: HouseholdNode individual: IndividualNode - paymentRecord: PaymentRecordAndPaymentNode + paymentRecord: PaymentNode admin: String existingTickets: [GrievanceTicketNode] relatedTickets: [GrievanceTicketNode] @@ -1605,12 +1578,10 @@ type HouseholdNode implements Node { positiveFeedbackTicketDetails(offset: Int, before: String, after: String, first: Int, last: Int): TicketPositiveFeedbackDetailsNodeConnection! negativeFeedbackTicketDetails(offset: Int, before: String, after: String, first: Int, last: Int): TicketNegativeFeedbackDetailsNodeConnection! referralTicketDetails(offset: Int, before: String, after: String, first: Int, last: Int): TicketReferralDetailsNodeConnection! - selections: [HouseholdSelectionNode!]! messages(offset: Int, before: String, after: String, first: Int, last: Int): CommunicationMessageNodeConnection! feedbacks(offset: Int, before: String, after: String, first: Int, last: Int): FeedbackNodeConnection! surveys(offset: Int, before: String, after: String, first: Int, last: Int): SurveyNodeConnection! adminUrl: String - selection: HouseholdSelectionNode sanctionListPossibleMatch: Boolean sanctionListConfirmedMatch: Boolean hasDuplicates: Boolean @@ -1652,16 +1623,6 @@ enum HouseholdRegistrationMethod { HH_REGISTRATION } -type HouseholdSelectionNode { - id: UUID! - createdAt: DateTime! - updatedAt: DateTime! - household: HouseholdNode! - vulnerabilityScore: Float - isOriginal: Boolean! - isMigrationHandled: Boolean! -} - input HouseholdUpdateDataObjectType { adminAreaTitle: String status: String @@ -2376,25 +2337,6 @@ type PageInfo { endCursor: String } -type PageInfoNode { - startCursor: String - endCursor: String - hasNextPage: Boolean - hasPreviousPage: Boolean -} - -type PaginatedCashPlanAndPaymentPlanNode { - pageInfo: PageInfoNode - edges: [CashPlanAndPaymentPlanEdges] - totalCount: Int -} - -type PaginatedPaymentRecordsAndPaymentsNode { - pageInfo: PageInfoNode - edges: [PaymentRecordsAndPaymentsEdges] - totalCount: Int -} - type PartnerNode { id: ID! allowedBusinessAreas(offset: Int, before: String, after: String, first: Int, last: Int, id: UUID): UserBusinessAreaNodeConnection! @@ -2590,7 +2532,7 @@ type PaymentPlanNode implements Node { backgroundActionStatus: PaymentPlanBackgroundActionStatus buildStatus: PaymentPlanBuildStatus builtAt: DateTime - targetingCriteria: TargetingCriteriaNode + targetingCriteria: TargetingCriteriaNode! currency: String dispersionStartDate: Date dispersionEndDate: Date @@ -2684,8 +2626,6 @@ enum PaymentPlanStatus { IN_REVIEW ACCEPTED FINISHED - MIGRATION_BLOCKED - MIGRATION_FAILED } type PaymentPlanSupportingDocumentNode implements Node { @@ -2707,26 +2647,6 @@ type PaymentPlanSupportingDocumentNodeEdge { cursor: String! } -type PaymentRecordAndPaymentNode { - objType: String - id: String - unicefId: String - status: String - fullName: String - parent: CashPlanAndPaymentPlanNode - entitlementQuantity: Float - deliveredQuantity: Float - deliveredQuantityUsd: Float - currency: String - deliveryDate: String - verification: PaymentVerificationNode -} - -type PaymentRecordsAndPaymentsEdges { - cursor: String - node: PaymentRecordAndPaymentNode -} - enum PaymentStatus { DISTRIBUTION_SUCCESSFUL NOT_DISTRIBUTED @@ -3111,8 +3031,7 @@ type Query { grievanceTicketUrgencyChoices: [ChoiceObjectInt] allSteficonRules(offset: Int, before: String, after: String, first: Int, last: Int, enabled: Boolean, deprecated: Boolean, type: String!): SteficonRuleNodeConnection payment(id: ID!): PaymentNode - allPayments(offset: Int, before: String, after: String, first: Int, last: Int, businessArea: String!, paymentPlanId: String!, programId: String, orderBy: String): PaymentNodeConnection - allPaymentRecordsAndPayments(businessArea: String!, program: String, household: ID, orderBy: String, first: Int, last: Int, before: String, after: String): PaginatedPaymentRecordsAndPaymentsNode + allPayments(offset: Int, before: String, after: String, first: Int, last: Int, businessArea: String!, paymentPlanId: String, programId: String, householdId: String, orderBy: String): PaymentNodeConnection financialServiceProviderXlsxTemplate(id: ID!): FinancialServiceProviderXlsxTemplateNode allFinancialServiceProviderXlsxTemplates(offset: Int, before: String, after: String, first: Int, last: Int, financialServiceProviders: [ID], name: String, createdBy: ID, orderBy: String): FinancialServiceProviderXlsxTemplateNodeConnection financialServiceProvider(id: ID!): FinancialServiceProviderNode @@ -3140,13 +3059,12 @@ type Query { sampleSize(input: GetCashplanVerificationSampleSizeInput): GetCashplanVerificationSampleSizeObject allPaymentVerificationLogEntries(offset: Int, before: String, after: String, first: Int, last: Int, objectId: UUID, user: ID, businessArea: String!, search: String, module: String, userId: String, programId: String): PaymentVerificationLogEntryNodeConnection paymentPlan(id: ID!): PaymentPlanNode - allPaymentPlans(offset: Int, before: String, after: String, first: Int, last: Int, businessArea: String!, search: String, status: [String], statusNot: String, totalEntitledQuantityFrom: Float, totalEntitledQuantityTo: Float, dispersionStartDate: Date, dispersionEndDate: Date, isFollowUp: Boolean, isPaymentPlan: Boolean, isTargetPopulation: Boolean, sourcePaymentPlanId: String, program: String, programCycle: String, name: String, totalHouseholdsCountMin: Int, totalHouseholdsCountMax: Int, totalHouseholdsCountWithValidPhoneNoMax: Int, totalHouseholdsCountWithValidPhoneNoMin: Int, createdAtRange: String, orderBy: String): PaymentPlanNodeConnection + allPaymentPlans(offset: Int, before: String, after: String, first: Int, last: Int, businessArea: String!, search: String, status: [String], statusNot: String, verificationStatus: [String], totalEntitledQuantityFrom: Float, totalEntitledQuantityTo: Float, dispersionStartDate: Date, dispersionEndDate: Date, startDate: Date, endDate: Date, isFollowUp: Boolean, isPaymentPlan: Boolean, isTargetPopulation: Boolean, sourcePaymentPlanId: String, program: String, programCycle: String, name: String, totalHouseholdsCountMin: Int, totalHouseholdsCountMax: Int, totalHouseholdsCountWithValidPhoneNoMax: Int, totalHouseholdsCountWithValidPhoneNoMin: Int, createdAtRange: String, serviceProvider: String, deliveryTypes: [String], orderBy: String): PaymentPlanNodeConnection paymentPlanStatusChoices: [ChoiceObject] currencyChoices: [ChoiceObject] allDeliveryMechanisms: [ChoiceObject] paymentPlanBackgroundActionStatusChoices: [ChoiceObject] availableFspsForDeliveryMechanisms(input: AvailableFspsForDeliveryMechanismsInput): [FspChoices] - allCashPlansAndPaymentPlans(businessArea: String!, program: String, search: String, serviceProvider: String, deliveryType: [String], verificationStatus: [String], startDateGte: String, endDateLte: String, orderBy: String, first: Int, last: Int, before: String, after: String, isPaymentVerificationPage: Boolean): PaginatedCashPlanAndPaymentPlanNode businessArea(businessAreaSlug: String!): BusinessAreaNode allBusinessAreas(offset: Int, before: String, after: String, first: Int, last: Int, id: UUID, slug: String): BusinessAreaNodeConnection allFieldsAttributes(flexField: Boolean, businessAreaSlug: String, programId: String): [FieldAttributeNode] @@ -3176,7 +3094,7 @@ type Query { canRunDeduplication: Boolean isDeduplicationDisabled: Boolean household(id: ID!): HouseholdNode - allHouseholds(offset: Int, before: String, after: String, first: Int, last: Int, businessArea: String, address: String, address_Startswith: String, headOfHousehold_FullName: String, headOfHousehold_FullName_Startswith: String, size_Range: [Int], size_Lte: Int, size_Gte: Int, adminArea: ID, admin1: ID, admin2: ID, targetPopulations: [ID], residenceStatus: String, withdrawn: Boolean, program: ID, firstRegistrationDate: DateTime, rdiId: String, size: String, search: String, documentType: String, documentNumber: String, headOfHousehold_PhoneNoValid: Boolean, lastRegistrationDate: String, countryOrigin: String, isActiveProgram: Boolean, rdiMergeStatus: String, orderBy: String): HouseholdNodeConnection + allHouseholds(offset: Int, before: String, after: String, first: Int, last: Int, businessArea: String, address: String, address_Startswith: String, headOfHousehold_FullName: String, headOfHousehold_FullName_Startswith: String, size_Range: [Int], size_Lte: Int, size_Gte: Int, adminArea: ID, admin1: ID, admin2: ID, residenceStatus: String, withdrawn: Boolean, program: ID, firstRegistrationDate: DateTime, rdiId: String, size: String, search: String, documentType: String, documentNumber: String, headOfHousehold_PhoneNoValid: Boolean, lastRegistrationDate: String, countryOrigin: String, isActiveProgram: Boolean, rdiMergeStatus: String, orderBy: String): HouseholdNodeConnection individual(id: ID!): IndividualNode allIndividuals(offset: Int, before: String, after: String, first: Int, last: Int, household_Id: UUID, businessArea: String, fullName: String, fullName_Startswith: String, fullName_Endswith: String, sex: [String], household_AdminArea: ID, withdrawn: Boolean, program: ID, age: String, programs: [ID], search: String, documentType: String, documentNumber: String, lastRegistrationDate: String, admin1: [ID], admin2: [ID], status: [String], excludedId: String, flags: [String], isActiveProgram: Boolean, rdiId: String, duplicatesOnly: Boolean, rdiMergeStatus: String, orderBy: String): IndividualNodeConnection allMergedHouseholds(offset: Int, before: String, after: String, first: Int, last: Int, businessArea: String, rdiId: String, orderBy: String): HouseholdNodeConnection @@ -3881,10 +3799,10 @@ type TargetingCriteriaNode { updatedAt: DateTime! flagExcludeIfActiveAdjudicationTicket: Boolean! flagExcludeIfOnSanctionList: Boolean! - householdIds: String - individualIds: String paymentPlan: PaymentPlanNode rules: [TargetingCriteriaRuleNode] + householdIds: String + individualIds: String } input TargetingCriteriaObjectType { @@ -4033,7 +3951,7 @@ type TicketComplaintDetailsNode implements Node { household: HouseholdNode individual: IndividualNode payment: PaymentNode - paymentRecord: PaymentRecordAndPaymentNode + paymentRecord: PaymentNode } type TicketComplaintDetailsNodeConnection { @@ -4304,7 +4222,7 @@ type TicketSensitiveDetailsNode implements Node { household: HouseholdNode individual: IndividualNode payment: PaymentNode - paymentRecord: PaymentRecordAndPaymentNode + paymentRecord: PaymentNode } type TicketSensitiveDetailsNodeConnection { diff --git a/src/frontend/fixtures/grievances/fakeGrievanceTicketPaymentVerification.ts b/src/frontend/fixtures/grievances/fakeGrievanceTicketPaymentVerification.ts index f6f864aebf..e792d3e00a 100644 --- a/src/frontend/fixtures/grievances/fakeGrievanceTicketPaymentVerification.ts +++ b/src/frontend/fixtures/grievances/fakeGrievanceTicketPaymentVerification.ts @@ -1,43 +1,43 @@ import { GrievanceTicketNode } from '../../src/__generated__/graphql'; export const fakeGrievanceTicketPaymentVerification = { - id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTo2Zjc5M2RhZi1jZDRlLTRiYTMtYjg0OS0wYTljODg0ZWNhNTY=', - unicefId: 'GRV-0000002', + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTowNmQ4MGI3Yi00Zjc5LTQ3YWUtOTA5Ni00YTYyM2IwOGI2ZTk=', + unicefId: 'GRV-0001741', status: 1, category: 4, consent: true, partner: null, - targetId: 'HH-23-0000.0003', + targetId: 'HH-0', businessArea: { postponeDeduplication: false, __typename: 'UserBusinessAreaNode', }, createdBy: { - id: 'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2', - firstName: 'Root', - lastName: 'Rootkowski', - email: 'root@root.com', + id: 'VXNlck5vZGU6NTQ2YmMzZTYtZWE3OS00MjRjLTg2MDEtYTQzNzI4ZDVlYzZi', + firstName: '', + lastName: '', + email: 'marek.biczysko@kellton.com', __typename: 'UserNode', }, - createdAt: '2024-12-11T21:09:18.393442+00:00', - updatedAt: '2024-12-11T21:09:18.393452+00:00', - description: 'feijifjief', + createdAt: '2024-12-11T10:43:51.217634+00:00', + updatedAt: '2025-02-09T11:20:00.299803+00:00', + description: '111111', language: '', admin: null, admin2: null, area: '', assignedTo: null, adminUrl: - '/api/unicorn/grievance/grievanceticket/6f793daf-cd4e-4ba3-b849-0a9c884eca56/change/', + '/api/unicorn/grievance/grievanceticket/06d80b7b-4f79-47ae-9096-4a623b08b6e9/change/', individual: null, household: { - id: 'SG91c2Vob2xkTm9kZTphYTAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDE=', + id: 'SG91c2Vob2xkTm9kZTphYjE3NDRjMy1jZjA0LTQzMjgtODgxYi1jNDVlNzYzYmMwZjU=', status: 'ACTIVE', adminUrl: - '/api/unicorn/household/household/aa000000-0000-0000-0000-000000000001/change/', - createdAt: '2024-12-09T20:40:33.645624+00:00', - rdiMergeStatus: 'PENDING', - residenceStatus: '', + '/api/unicorn/household/household/ab1744c3-cf04-4328-881b-c45e763bc0f5/change/', + createdAt: '2024-02-27T13:59:37.896164+00:00', + rdiMergeStatus: 'MERGED', + residenceStatus: 'REFUGEE', maleChildrenCount: null, femaleChildrenCount: null, childrenDisabledCount: null, @@ -45,57 +45,310 @@ export const fakeGrievanceTicketPaymentVerification = { totalCashReceived: null, totalCashReceivedUsd: null, currency: '', - firstRegistrationDate: '2023-12-10T20:40:33.544366+00:00', - lastRegistrationDate: '2024-12-09T20:40:33.544366+00:00', + firstRegistrationDate: '2024-02-12T21:31:59+00:00', + lastRegistrationDate: '2024-01-28T05:03:22+00:00', sanctionListPossibleMatch: false, sanctionListConfirmedMatch: false, hasDuplicates: false, - unicefId: 'HH-23-0000.0003', - flexFields: {}, + unicefId: 'HH-0', + flexFields: { + treatment_facility_h_f: ['other_public', 'government_health_center'], + other_treatment_facility_h_f: 'narodowy fundusz zdrowia', + }, unhcrId: '', geopoint: null, - village: '', - adminAreaTitle: '', + village: 'Armstrongberg', + adminAreaTitle: 'Charkh - AF0505', admin1: null, admin2: null, admin3: null, admin4: null, headOfHousehold: { - id: 'SW5kaXZpZHVhbE5vZGU6Y2MwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAx', - fullName: 'Jan Kowalski', - givenName: '', - familyName: '', + id: 'SW5kaXZpZHVhbE5vZGU6MjE2ZjczMGEtNTA3OC00ZjQxLWFjZDYtYjZiMTNmOTRjMDFk', + fullName: 'Jasmine Heather Long', + givenName: 'Jasmine', + familyName: 'Long', __typename: 'IndividualNode', }, - address: 'Ohio', + address: '585 Summers Knolls\nWest Mindy, TN 78990', individuals: { - totalCount: 1, + totalCount: 6, __typename: 'IndividualNodeConnection', edges: [ { node: { - id: 'SW5kaXZpZHVhbE5vZGU6Y2MwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAx', - age: 29, - lastRegistrationDate: '2024-12-09', - rdiMergeStatus: 'PENDING', + id: 'SW5kaXZpZHVhbE5vZGU6ZWZkOTVhYmMtNDNiYS00M2ZhLWE2YzAtMzZkZDc1ZmQ0YWY5', + age: 20, + lastRegistrationDate: '2024-02-03', + rdiMergeStatus: 'MERGED', adminUrl: - '/api/unicorn/household/individual/cc000000-0000-0000-0000-000000000001/change/', - createdAt: '2024-12-09T20:40:33.638304+00:00', - updatedAt: '2024-12-09T20:40:33.648548+00:00', - fullName: 'Jan Kowalski', + '/api/unicorn/household/individual/efd95abc-43ba-43fa-a6c0-36dd75fd4af9/change/', + createdAt: '2024-02-27T13:59:37.593747+00:00', + updatedAt: '2024-02-27T13:59:37.593751+00:00', + fullName: 'Jamie Stacey Hendricks', sex: 'MALE', - unicefId: 'IND-23-0000.0008', - birthDate: '1994-12-17', - maritalStatus: 'A_', - phoneNo: '', - phoneNoValid: false, - email: '', + unicefId: 'IND-1', + birthDate: '2004-12-07', + maritalStatus: 'MARRIED', + phoneNo: '+48609456001', + phoneNoValid: true, + email: 'scottsmith@example.net', sanctionListPossibleMatch: false, sanctionListConfirmedMatch: false, deduplicationGoldenRecordStatus: 'UNIQUE', - sanctionListLastCheck: null, + sanctionListLastCheck: '2025-01-26T00:00:21.840144+00:00', + role: 'NO_ROLE', + relationship: 'DAUGHTERINLAW_SONINLAW', + status: 'ACTIVE', + documents: { + edges: [], + __typename: 'DocumentNodeConnection', + }, + identities: { + edges: [], + __typename: 'IndividualIdentityNodeConnection', + }, + household: { + id: 'SG91c2Vob2xkTm9kZTphYjE3NDRjMy1jZjA0LTQzMjgtODgxYi1jNDVlNzYzYmMwZjU=', + unicefId: 'HH-0', + status: 'ACTIVE', + importId: 'HH-0', + admin1: null, + admin2: null, + admin3: null, + admin4: null, + programs: { + edges: [], + __typename: 'ProgramNodeConnection', + }, + totalCashReceivedUsd: null, + lastRegistrationDate: '2024-01-28T05:03:22+00:00', + start: '2024-02-16T17:11:19+00:00', + firstRegistrationDate: '2024-02-12T21:31:59+00:00', + countryOrigin: 'Comoros', + village: 'Armstrongberg', + __typename: 'HouseholdNode', + }, + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6YjM4MmE2YTctYWIxYi00OWUxLWJiYjgtYzYwN2RhZTkwYzcx', + age: 18, + lastRegistrationDate: '2024-01-24', + rdiMergeStatus: 'MERGED', + adminUrl: + '/api/unicorn/household/individual/b382a6a7-ab1b-49e1-bbb8-c607dae90c71/change/', + createdAt: '2024-02-27T13:59:37.593865+00:00', + updatedAt: '2024-02-27T13:59:37.593869+00:00', + fullName: 'Adam David Floyd', + sex: 'FEMALE', + unicefId: 'IND-2', + birthDate: '2006-06-17', + maritalStatus: 'DIVORCED', + phoneNo: '+48609456002', + phoneNoValid: true, + email: 'opineda@example.org', + sanctionListPossibleMatch: false, + sanctionListConfirmedMatch: false, + deduplicationGoldenRecordStatus: 'UNIQUE', + sanctionListLastCheck: '2025-01-26T00:00:21.840144+00:00', + role: 'NO_ROLE', + relationship: 'WIFE_HUSBAND', + status: 'ACTIVE', + documents: { + edges: [], + __typename: 'DocumentNodeConnection', + }, + identities: { + edges: [], + __typename: 'IndividualIdentityNodeConnection', + }, + household: { + id: 'SG91c2Vob2xkTm9kZTphYjE3NDRjMy1jZjA0LTQzMjgtODgxYi1jNDVlNzYzYmMwZjU=', + unicefId: 'HH-0', + status: 'ACTIVE', + importId: 'HH-0', + admin1: null, + admin2: null, + admin3: null, + admin4: null, + programs: { + edges: [], + __typename: 'ProgramNodeConnection', + }, + totalCashReceivedUsd: null, + lastRegistrationDate: '2024-01-28T05:03:22+00:00', + start: '2024-02-16T17:11:19+00:00', + firstRegistrationDate: '2024-02-12T21:31:59+00:00', + countryOrigin: 'Comoros', + village: 'Armstrongberg', + __typename: 'HouseholdNode', + }, + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6YTBiYzRlMTktOTgxYy00MTFiLWJkYjQtOGFhODIxMDMzNTE5', + age: 23, + lastRegistrationDate: '2024-01-10', + rdiMergeStatus: 'MERGED', + adminUrl: + '/api/unicorn/household/individual/a0bc4e19-981c-411b-bdb4-8aa821033519/change/', + createdAt: '2024-02-27T13:59:37.593980+00:00', + updatedAt: '2024-02-27T13:59:37.593984+00:00', + fullName: 'Amanda Faith Freeman', + sex: 'FEMALE', + unicefId: 'IND-3', + birthDate: '2001-08-30', + maritalStatus: 'WIDOWED', + phoneNo: '+48609456003', + phoneNoValid: true, + email: 'mark63@example.net', + sanctionListPossibleMatch: false, + sanctionListConfirmedMatch: false, + deduplicationGoldenRecordStatus: 'UNIQUE', + sanctionListLastCheck: '2025-01-26T00:00:21.840144+00:00', + role: 'NO_ROLE', + relationship: 'BROTHER_SISTER', + status: 'ACTIVE', + documents: { + edges: [], + __typename: 'DocumentNodeConnection', + }, + identities: { + edges: [], + __typename: 'IndividualIdentityNodeConnection', + }, + household: { + id: 'SG91c2Vob2xkTm9kZTphYjE3NDRjMy1jZjA0LTQzMjgtODgxYi1jNDVlNzYzYmMwZjU=', + unicefId: 'HH-0', + status: 'ACTIVE', + importId: 'HH-0', + admin1: null, + admin2: null, + admin3: null, + admin4: null, + programs: { + edges: [], + __typename: 'ProgramNodeConnection', + }, + totalCashReceivedUsd: null, + lastRegistrationDate: '2024-01-28T05:03:22+00:00', + start: '2024-02-16T17:11:19+00:00', + firstRegistrationDate: '2024-02-12T21:31:59+00:00', + countryOrigin: 'Comoros', + village: 'Armstrongberg', + __typename: 'HouseholdNode', + }, + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6ODk5YzYxMTgtYzk0YS00MGNlLTlmOTAtNWMxMWM0NzkzMjE4', + age: 42, + lastRegistrationDate: '2024-01-14', + rdiMergeStatus: 'MERGED', + adminUrl: + '/api/unicorn/household/individual/899c6118-c94a-40ce-9f90-5c11c4793218/change/', + createdAt: '2024-02-27T13:59:37.594114+00:00', + updatedAt: '2024-02-27T13:59:37.594119+00:00', + fullName: 'Brandy Shane Stone', + sex: 'MALE', + unicefId: 'IND-4', + birthDate: '1982-08-08', + maritalStatus: 'WIDOWED', + phoneNo: '+48609456004', + phoneNoValid: true, + email: 'steven31@example.com', + sanctionListPossibleMatch: false, + sanctionListConfirmedMatch: false, + deduplicationGoldenRecordStatus: 'UNIQUE', + sanctionListLastCheck: '2025-01-26T00:00:21.840144+00:00', role: 'PRIMARY', - relationship: null, + relationship: 'NON_BENEFICIARY', + status: 'ACTIVE', + documents: { + edges: [], + __typename: 'DocumentNodeConnection', + }, + identities: { + edges: [], + __typename: 'IndividualIdentityNodeConnection', + }, + household: null, + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6YzI3Y2I0NWItNWJjYy00MzBkLWJkZjAtYWQ1NDMzNGIyYmJk', + age: 81, + lastRegistrationDate: '2024-02-09', + rdiMergeStatus: 'MERGED', + adminUrl: + '/api/unicorn/household/individual/c27cb45b-5bcc-430d-bdf0-ad54334b2bbd/change/', + createdAt: '2024-02-27T13:59:37.594228+00:00', + updatedAt: '2024-02-27T13:59:37.594232+00:00', + fullName: 'Jose Tracy Davis', + sex: 'MALE', + unicefId: 'IND-5', + birthDate: '1943-02-21', + maritalStatus: 'MARRIED', + phoneNo: '+48609456005', + phoneNoValid: true, + email: 'tiffany78@example.org', + sanctionListPossibleMatch: false, + sanctionListConfirmedMatch: false, + deduplicationGoldenRecordStatus: 'UNIQUE', + sanctionListLastCheck: '2025-01-26T00:00:21.840144+00:00', + role: 'ALTERNATE', + relationship: 'NON_BENEFICIARY', + status: 'ACTIVE', + documents: { + edges: [], + __typename: 'DocumentNodeConnection', + }, + identities: { + edges: [], + __typename: 'IndividualIdentityNodeConnection', + }, + household: null, + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6MjE2ZjczMGEtNTA3OC00ZjQxLWFjZDYtYjZiMTNmOTRjMDFk', + age: 33, + lastRegistrationDate: '2024-01-02', + rdiMergeStatus: 'MERGED', + adminUrl: + '/api/unicorn/household/individual/216f730a-5078-4f41-acd6-b6b13f94c01d/change/', + createdAt: '2024-02-27T13:59:37.593606+00:00', + updatedAt: '2024-04-24T09:47:51.050345+00:00', + fullName: 'Jasmine Heather Long', + sex: 'MALE', + unicefId: 'IND-0', + birthDate: '1991-04-01', + maritalStatus: 'A_', + phoneNo: '+48609456000', + phoneNoValid: true, + email: 'ariel71@example.net', + sanctionListPossibleMatch: false, + sanctionListConfirmedMatch: false, + deduplicationGoldenRecordStatus: 'UNIQUE', + sanctionListLastCheck: '2025-01-26T00:00:21.840144+00:00', + role: 'NO_ROLE', + relationship: 'HEAD', status: 'ACTIVE', documents: { edges: [], @@ -106,10 +359,10 @@ export const fakeGrievanceTicketPaymentVerification = { __typename: 'IndividualIdentityNodeConnection', }, household: { - id: 'SG91c2Vob2xkTm9kZTphYTAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDE=', - unicefId: 'HH-23-0000.0003', + id: 'SG91c2Vob2xkTm9kZTphYjE3NDRjMy1jZjA0LTQzMjgtODgxYi1jNDVlNzYzYmMwZjU=', + unicefId: 'HH-0', status: 'ACTIVE', - importId: 'HH-23-0000.0003', + importId: 'HH-0', admin1: null, admin2: null, admin3: null, @@ -119,11 +372,11 @@ export const fakeGrievanceTicketPaymentVerification = { __typename: 'ProgramNodeConnection', }, totalCashReceivedUsd: null, - lastRegistrationDate: '2024-12-09T20:40:33.544366+00:00', - start: null, - firstRegistrationDate: '2023-12-10T20:40:33.544366+00:00', - countryOrigin: '', - village: '', + lastRegistrationDate: '2024-01-28T05:03:22+00:00', + start: '2024-02-16T17:11:19+00:00', + firstRegistrationDate: '2024-02-12T21:31:59+00:00', + countryOrigin: 'Comoros', + village: 'Armstrongberg', __typename: 'HouseholdNode', }, __typename: 'IndividualNode', @@ -137,21 +390,21 @@ export const fakeGrievanceTicketPaymentVerification = { __typename: 'ProgramNodeConnection', }, __typename: 'HouseholdNode', - activeIndividualsCount: 1, - countryOrigin: '', - country: '', + activeIndividualsCount: 4, + countryOrigin: 'Comoros', + country: 'Finland', zipCode: null, - femaleAgeGroup05Count: null, - femaleAgeGroup611Count: null, - femaleAgeGroup1217Count: null, - femaleAgeGroup1859Count: null, - femaleAgeGroup60Count: null, - pregnantCount: null, - maleAgeGroup05Count: null, - maleAgeGroup611Count: null, - maleAgeGroup1217Count: null, - maleAgeGroup1859Count: null, - maleAgeGroup60Count: null, + femaleAgeGroup05Count: 3, + femaleAgeGroup611Count: 1, + femaleAgeGroup1217Count: 3, + femaleAgeGroup1859Count: 1, + femaleAgeGroup60Count: 1, + pregnantCount: 2, + maleAgeGroup05Count: 0, + maleAgeGroup611Count: 1, + maleAgeGroup1217Count: 3, + maleAgeGroup1859Count: 2, + maleAgeGroup60Count: 1, femaleAgeGroup05DisabledCount: null, femaleAgeGroup611DisabledCount: null, femaleAgeGroup1217DisabledCount: null, @@ -164,25 +417,25 @@ export const fakeGrievanceTicketPaymentVerification = { maleAgeGroup60DisabledCount: null, fchildHoh: null, childHoh: null, - start: null, - deviceid: '', - orgNameEnumerator: '', + start: '2024-02-16T17:11:19+00:00', + deviceid: '35c8a12e66ffa35f708dd2721611e4d6', + orgNameEnumerator: 'Partner Organization', returnee: null, - nameEnumerator: '', + nameEnumerator: 'Daniel Brooks', lastSyncAt: null, - consentSharing: [], - orgEnumerator: 'A_', - updatedAt: '2024-12-09T20:40:33.645629+00:00', - consent: null, + consentSharing: ['UNICEF', 'HUMANITARIAN_PARTNER'], + orgEnumerator: 'PARTNER', + updatedAt: '2024-02-27T13:59:37.896168+00:00', + consent: true, registrationDataImport: { - name: 'Test Import', - dataSource: 'API', - importDate: '2024-12-09T20:40:33.635509+00:00', + name: 'Successful product. - 1708527046692986908', + dataSource: 'XLS', + importDate: '2024-02-21T14:50:46.693309+00:00', importedBy: { - firstName: 'Andrea', - lastName: 'Brock', - email: 'andrea.brock_1733776833579200297@unicef.com', - username: 'AndreaBrock_1733776833579203297528', + firstName: 'Paulina', + lastName: 'Kujawa', + email: 'paulina.kujawa@kellton.com', + username: 'paulina.kujawa@kellton.com', __typename: 'UserNode', }, __typename: 'RegistrationDataImportNode', @@ -193,6 +446,21 @@ export const fakeGrievanceTicketPaymentVerification = { currency: 'USD', __typename: 'DeliveredQuantityNode', }, + { + totalDeliveredQuantity: '0', + currency: 'AFN', + __typename: 'DeliveredQuantityNode', + }, + { + totalDeliveredQuantity: '0', + currency: 'AWG', + __typename: 'DeliveredQuantityNode', + }, + { + totalDeliveredQuantity: '0', + currency: 'DZD', + __typename: 'DeliveredQuantityNode', + }, ], programRegistrationId: null, }, @@ -201,19 +469,387 @@ export const fakeGrievanceTicketPaymentVerification = { unicefId: 'RCPT-0060-24-0.000.078', deliveredQuantity: null, entitlementQuantity: null, - objType: 'Payment', parent: { id: 'UGF5bWVudFBsYW5Ob2RlOjAwMDAwMDAwLWZlZWQtYmVlZi0wMDAwLTAwMDAwYmFkZjAwZA==', unicefId: 'PP-0060-24-00000023', - objType: 'PaymentPlan', - __typename: 'CashPlanAndPaymentPlanNode', + __typename: 'PaymentPlanNode', }, verification: null, - __typename: 'PaymentRecordAndPaymentNode', + __typename: 'PaymentNode', }, - relatedTickets: [], + relatedTickets: [ + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTo3MGU1NDRlYy0zMmM0LTRiMTEtYjJkMi0xMzcyNTdmY2UwYjk=', + unicefId: 'GRV-0000062', + status: 2, + household: { + id: 'SG91c2Vob2xkTm9kZTphYjE3NDRjMy1jZjA0LTQzMjgtODgxYi1jNDVlNzYzYmMwZjU=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTowZDYzNzgwMi03M2I1LTRmMTMtYjA4OC1jNjgxN2FmNjA1NDI=', + unicefId: 'GRV-0000090', + status: 2, + household: { + id: 'SG91c2Vob2xkTm9kZTplYmM5NzkzMi0yOTQwLTQzMmEtYjg4NS1iYWE0ZjdhYWU3ODg=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTowYzJkYWQ0Ni03ZjI4LTQ2OTgtOWFkYS03ZmRjOGJmMjgzYTA=', + unicefId: 'GRV-0001487', + status: 6, + household: { + id: 'SG91c2Vob2xkTm9kZTplYmM5NzkzMi0yOTQwLTQzMmEtYjg4NS1iYWE0ZjdhYWU3ODg=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTpjN2RiMTBmZS04NGVhLTQ3NzQtOTQyYy02YjZlY2ZmMTRlNmQ=', + unicefId: 'GRV-0000745', + status: 5, + household: { + id: 'SG91c2Vob2xkTm9kZTo2MTAzNGZhOS1lNGUwLTQ3OTUtYjY4NC1lNzZjMjBhNzc1NzE=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTo4ODI3ZmEwMi04NDFlLTQ2YzktOWY3OS0yNWRlMTcwYmQ2MDU=', + unicefId: 'GRV-0000744', + status: 3, + household: { + id: 'SG91c2Vob2xkTm9kZTphYjE3NDRjMy1jZjA0LTQzMjgtODgxYi1jNDVlNzYzYmMwZjU=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTo2ZGE5MjE1Yy0xM2EyLTQyNWItYTMzYi1lZGFiYzFlMDY4Nzc=', + unicefId: 'GRV-0001738', + status: 1, + household: { + id: 'SG91c2Vob2xkTm9kZTpmN2U3MDQ3MC00OWJiLTRiNzYtOWU2OC01ZTAyYjA5YmUyNjM=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZToxMjdlYzdmZS0wZjkxLTRjMmUtOWQ1Ny05MTI2Yzg2ZGVhMDE=', + unicefId: 'GRV-0000057', + status: 1, + household: { + id: 'SG91c2Vob2xkTm9kZTplYmM5NzkzMi0yOTQwLTQzMmEtYjg4NS1iYWE0ZjdhYWU3ODg=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTo1YjA3Y2EzNC1lMzViLTQ5NDQtYjMyOS1hYzNmMGY2MDUxZDY=', + unicefId: 'GRV-0000743', + status: 5, + household: { + id: 'SG91c2Vob2xkTm9kZTphYjE3NDRjMy1jZjA0LTQzMjgtODgxYi1jNDVlNzYzYmMwZjU=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTo2NThmYWVkMy04ZmQ4LTQzMWItYjc4MS0wMmUwMDMyN2QzMzA=', + unicefId: 'GRV-0000088', + status: 6, + household: { + id: 'SG91c2Vob2xkTm9kZTphYjE3NDRjMy1jZjA0LTQzMjgtODgxYi1jNDVlNzYzYmMwZjU=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTo2MmU0MDBjNC1kMTc5LTQxYTktOTNmNC1hODdmZmMzMzcxNDI=', + unicefId: 'GRV-0000089', + status: 6, + household: { + id: 'SG91c2Vob2xkTm9kZTplYmM5NzkzMi0yOTQwLTQzMmEtYjg4NS1iYWE0ZjdhYWU3ODg=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZToxZTgyNjBhNi0wMDY3LTRhYWItYmIyOC05NzNjZWEzNTc0NWU=', + unicefId: 'GRV-0000061', + status: 1, + household: { + id: 'SG91c2Vob2xkTm9kZTphYjE3NDRjMy1jZjA0LTQzMjgtODgxYi1jNDVlNzYzYmMwZjU=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTo0NjY4MDcwMy02MzZjLTRjYjgtOTg2Yy01N2QxMTA5OWNiYmU=', + unicefId: 'GRV-0001739', + status: 1, + household: { + id: 'SG91c2Vob2xkTm9kZTo2MTAzNGZhOS1lNGUwLTQ3OTUtYjY4NC1lNzZjMjBhNzc1NzE=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTplYzQyODZkNC1lYTAwLTQ2MzEtYWU2My02ZDY2MGI2Yjg0NjM=', + unicefId: 'GRV-0001719', + status: 5, + household: { + id: 'SG91c2Vob2xkTm9kZTpiNDRiNDJhOC0xZGVjLTRhODgtYjBlOS01YzY2NmYyY2IyYjc=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTplZjdiMTI1Yi1jZWE5LTRlNTAtYmIzMi01NTYzODA3Y2UzNzU=', + unicefId: 'GRV-0001735', + status: 1, + household: { + id: 'SG91c2Vob2xkTm9kZTphYjE3NDRjMy1jZjA0LTQzMjgtODgxYi1jNDVlNzYzYmMwZjU=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTozYzM0M2ViYS01ODlkLTRiNmUtYjMxNS0yY2RhMmM4OGJjMDk=', + unicefId: 'GRV-0000060', + status: 6, + household: { + id: 'SG91c2Vob2xkTm9kZTplYmM5NzkzMi0yOTQwLTQzMmEtYjg4NS1iYWE0ZjdhYWU3ODg=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTo4N2M2YzJiNi05ZjNkLTQ5NTgtOGQyOS1jZjUwMmIyZTNlNmY=', + unicefId: 'GRV-0000056', + status: 2, + household: { + id: 'SG91c2Vob2xkTm9kZTplYmM5NzkzMi0yOTQwLTQzMmEtYjg4NS1iYWE0ZjdhYWU3ODg=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + ], linkedTickets: [], - existingTickets: [], + existingTickets: [ + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZToxMjdlYzdmZS0wZjkxLTRjMmUtOWQ1Ny05MTI2Yzg2ZGVhMDE=', + category: 6, + unicefId: 'GRV-0000057', + status: 1, + household: { + id: 'SG91c2Vob2xkTm9kZTplYmM5NzkzMi0yOTQwLTQzMmEtYjg4NS1iYWE0ZjdhYWU3ODg=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZToxZTgyNjBhNi0wMDY3LTRhYWItYmIyOC05NzNjZWEzNTc0NWU=', + category: 6, + unicefId: 'GRV-0000061', + status: 1, + household: { + id: 'SG91c2Vob2xkTm9kZTphYjE3NDRjMy1jZjA0LTQzMjgtODgxYi1jNDVlNzYzYmMwZjU=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTplZjdiMTI1Yi1jZWE5LTRlNTAtYmIzMi01NTYzODA3Y2UzNzU=', + category: 2, + unicefId: 'GRV-0001735', + status: 1, + household: { + id: 'SG91c2Vob2xkTm9kZTphYjE3NDRjMy1jZjA0LTQzMjgtODgxYi1jNDVlNzYzYmMwZjU=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTo2ZGE5MjE1Yy0xM2EyLTQyNWItYTMzYi1lZGFiYzFlMDY4Nzc=', + category: 2, + unicefId: 'GRV-0001738', + status: 1, + household: { + id: 'SG91c2Vob2xkTm9kZTpmN2U3MDQ3MC00OWJiLTRiNzYtOWU2OC01ZTAyYjA5YmUyNjM=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTo0NjY4MDcwMy02MzZjLTRjYjgtOTg2Yy01N2QxMTA5OWNiYmU=', + category: 2, + unicefId: 'GRV-0001739', + status: 1, + household: { + id: 'SG91c2Vob2xkTm9kZTo2MTAzNGZhOS1lNGUwLTQ3OTUtYjY4NC1lNzZjMjBhNzc1NzE=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTo4N2M2YzJiNi05ZjNkLTQ5NTgtOGQyOS1jZjUwMmIyZTNlNmY=', + category: 6, + unicefId: 'GRV-0000056', + status: 2, + household: { + id: 'SG91c2Vob2xkTm9kZTplYmM5NzkzMi0yOTQwLTQzMmEtYjg4NS1iYWE0ZjdhYWU3ODg=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTo3MGU1NDRlYy0zMmM0LTRiMTEtYjJkMi0xMzcyNTdmY2UwYjk=', + category: 4, + unicefId: 'GRV-0000062', + status: 2, + household: { + id: 'SG91c2Vob2xkTm9kZTphYjE3NDRjMy1jZjA0LTQzMjgtODgxYi1jNDVlNzYzYmMwZjU=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTowZDYzNzgwMi03M2I1LTRmMTMtYjA4OC1jNjgxN2FmNjA1NDI=', + category: 2, + unicefId: 'GRV-0000090', + status: 2, + household: { + id: 'SG91c2Vob2xkTm9kZTplYmM5NzkzMi0yOTQwLTQzMmEtYjg4NS1iYWE0ZjdhYWU3ODg=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTo4ODI3ZmEwMi04NDFlLTQ2YzktOWY3OS0yNWRlMTcwYmQ2MDU=', + category: 2, + unicefId: 'GRV-0000744', + status: 3, + household: { + id: 'SG91c2Vob2xkTm9kZTphYjE3NDRjMy1jZjA0LTQzMjgtODgxYi1jNDVlNzYzYmMwZjU=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTo1YjA3Y2EzNC1lMzViLTQ5NDQtYjMyOS1hYzNmMGY2MDUxZDY=', + category: 2, + unicefId: 'GRV-0000743', + status: 5, + household: { + id: 'SG91c2Vob2xkTm9kZTphYjE3NDRjMy1jZjA0LTQzMjgtODgxYi1jNDVlNzYzYmMwZjU=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTpjN2RiMTBmZS04NGVhLTQ3NzQtOTQyYy02YjZlY2ZmMTRlNmQ=', + category: 2, + unicefId: 'GRV-0000745', + status: 5, + household: { + id: 'SG91c2Vob2xkTm9kZTo2MTAzNGZhOS1lNGUwLTQ3OTUtYjY4NC1lNzZjMjBhNzc1NzE=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTplYzQyODZkNC1lYTAwLTQ2MzEtYWU2My02ZDY2MGI2Yjg0NjM=', + category: 2, + unicefId: 'GRV-0001719', + status: 5, + household: { + id: 'SG91c2Vob2xkTm9kZTpiNDRiNDJhOC0xZGVjLTRhODgtYjBlOS01YzY2NmYyY2IyYjc=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTozYzM0M2ViYS01ODlkLTRiNmUtYjMxNS0yY2RhMmM4OGJjMDk=', + category: 6, + unicefId: 'GRV-0000060', + status: 6, + household: { + id: 'SG91c2Vob2xkTm9kZTplYmM5NzkzMi0yOTQwLTQzMmEtYjg4NS1iYWE0ZjdhYWU3ODg=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTo2NThmYWVkMy04ZmQ4LTQzMWItYjc4MS0wMmUwMDMyN2QzMzA=', + category: 2, + unicefId: 'GRV-0000088', + status: 6, + household: { + id: 'SG91c2Vob2xkTm9kZTphYjE3NDRjMy1jZjA0LTQzMjgtODgxYi1jNDVlNzYzYmMwZjU=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTo2MmU0MDBjNC1kMTc5LTQxYTktOTNmNC1hODdmZmMzMzcxNDI=', + category: 2, + unicefId: 'GRV-0000089', + status: 6, + household: { + id: 'SG91c2Vob2xkTm9kZTplYmM5NzkzMi0yOTQwLTQzMmEtYjg4NS1iYWE0ZjdhYWU3ODg=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + { + id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTowYzJkYWQ0Ni03ZjI4LTQ2OTgtOWFkYS03ZmRjOGJmMjgzYTA=', + category: 2, + unicefId: 'GRV-0001487', + status: 6, + household: { + id: 'SG91c2Vob2xkTm9kZTplYmM5NzkzMi0yOTQwLTQzMmEtYjg4NS1iYWE0ZjdhYWU3ODg=', + unicefId: 'HH-0', + __typename: 'HouseholdNode', + }, + __typename: 'GrievanceTicketNode', + }, + ], addIndividualTicketDetails: null, individualDataUpdateTicketDetails: null, householdDataUpdateTicketDetails: null, @@ -231,8 +867,8 @@ export const fakeGrievanceTicketPaymentVerification = { urgency: 0, programs: [ { - name: 'Test Program', - id: 'UHJvZ3JhbU5vZGU6MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtZmFjZWIwMGMwMDAw', + name: 'Copy of Programme: (Test Program)', + id: 'UHJvZ3JhbU5vZGU6YzM5ZTg4ZDYtYjZmZS00MGQ0LWJjNzktMjQ1MjA1YTFhYWMx', __typename: 'ProgramNode', }, ], diff --git a/src/frontend/fixtures/paymentmodule/fakeApolloPaymentPlan.ts b/src/frontend/fixtures/paymentmodule/fakeApolloPaymentPlan.ts index 2ff2c93d3f..fc26e23fd3 100644 --- a/src/frontend/fixtures/paymentmodule/fakeApolloPaymentPlan.ts +++ b/src/frontend/fixtures/paymentmodule/fakeApolloPaymentPlan.ts @@ -1,70 +1,75 @@ import { - FinancialServiceProviderCommunicationChannel, PaymentPlanBackgroundActionStatus, PaymentPlanQuery, - PaymentPlanStatus, - PaymentStatus, - PaymentVerificationPlanSampling, - PaymentVerificationPlanStatus, - PaymentVerificationPlanVerificationChannel, - ProgramStatus, } from '../../src/__generated__/graphql'; export const fakeApolloPaymentPlan: PaymentPlanQuery['paymentPlan'] = { - id: 'UGF5bWVudFBsYW5Ob2RlOmE5YzJjMmM4LWJmYWUtNDBhMy05YmYwLWIxYWE1ZmRlMDE0YQ==', - version: 1000, - unicefId: 'PP-0060-22-00000001', - status: PaymentPlanStatus.Locked, - programCycle: { - id: 'UHJvZ3JhbUN5Y2xlOjljNDMzZWQzLTcwZjUtNDRhOC1iZmQ5LTA1Mjg3YTAwNzQxNQ==', - }, - isFollowUp: false, - sourcePaymentPlan: null, - excludedHouseholds: null, - exclusionReason: '', - excludeHouseholdError: null, - followUps: null, + id: 'UGF5bWVudFBsYW5Ob2RlOjU4MmE3ZTYzLTRkZGEtNDQ3Zi1hYWFhLTQzYWJmMzI0ZTViMw==', + name: 'Reconciled Payment Plan Follow Up', + version: 1737726866493915, + unicefId: 'PP-0060-25-00000007', + status: 'ACCEPTED', + buildStatus: 'OK', + canCreateFollowUp: false, backgroundActionStatus: null, canCreatePaymentVerificationPlan: false, - canCreateFollowUp: false, availablePaymentRecordsCount: 0, bankReconciliationSuccess: 0, bankReconciliationError: 0, + exchangeRate: 1, + fspCommunicationChannel: 'XLSX', + canExportXlsx: true, + canDownloadXlsx: false, + canSendXlsxPassword: false, + programCycle: { + id: 'UHJvZ3JhbUN5Y2xlTm9kZTphMjRhNDY2Zi1hMDllLTQwMDItOTdmZC00N2FmZTNiOTA3OTM=', + title: 'Network poor.', + __typename: 'ProgramCycleNode', + }, + excludedIds: '', createdBy: { - id: 'VXNlck5vZGU6ZjRlMTYwZDEtOTgyNy00NmEwLTg4MzAtZmU1MjljZDVhNDBj', - firstName: 'Matthew', - lastName: 'Sosa', - email: 'matthew.sosa_1661510712238266406@unicef.com', + id: 'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2', + firstName: 'Root', + lastName: 'Rootkowski', + email: 'root@root.com', __typename: 'UserNode', }, program: { - id: 'UHJvZ3JhbU5vZGU6NWJhMjEzY2UtNmNlOS00NTc4LThhNDgtYjFmMDgyM2Q2MDAy', - name: 'Already attention fear well hit instead person.', - status: ProgramStatus.Active, + id: 'UHJvZ3JhbU5vZGU6MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtZmFjZWIwMGMwMDAw', + name: 'Test Program', + caId: null, + caHashId: null, + status: 'ACTIVE', + isSocialWorkerProgram: false, __typename: 'ProgramNode', }, - currency: 'PLN', - currencyName: 'Polish złoty', - startDate: '2020-10-27', - endDate: '2021-09-08', - dispersionStartDate: '2028-05-19', - dispersionEndDate: '2029-08-07', + vulnerabilityScoreMin: null, + vulnerabilityScoreMax: null, + adminUrl: + '/api/unicorn/payment/paymentplan/582a7e63-4dda-447f-aaaa-43abf324e5b3/change/', + currency: 'USD', + currencyName: 'United States dollar', + startDate: null, + endDate: null, + dispersionStartDate: '2025-01-24', + dispersionEndDate: '2025-01-29', femaleChildrenCount: 0, - femaleAdultsCount: 1, + femaleAdultsCount: 2, maleChildrenCount: 0, maleAdultsCount: 2, - totalHouseholdsCount: 1, - totalIndividualsCount: 3, - totalEntitledQuantity: 2691.69, - totalDeliveredQuantity: 1769, - totalUndeliveredQuantity: 922.69, + totalHouseholdsCount: 2, + totalIndividualsCount: 10, + totalEntitledQuantity: 424, + totalDeliveredQuantity: 0, + totalUndeliveredQuantity: 424, + totalWithdrawnHouseholdsCount: 0, approvalProcess: { totalCount: 1, edgeCount: 1, edges: [ { node: { - id: 'QXBwcm92YWxQcm9jZXNzTm9kZTo2OTBkYTdmNy03M2QxLTQ4MWEtODc3Mi1hODVhMWIzZDFlYzI=', + id: 'QXBwcm92YWxQcm9jZXNzTm9kZTpkMTM4MTZhMi0zOGRiLTRlZDItYTA4My0xYzY1NmVmYzBiOGU=', sentForApprovalBy: { id: 'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2', firstName: 'Root', @@ -72,7 +77,7 @@ export const fakeApolloPaymentPlan: PaymentPlanQuery['paymentPlan'] = { email: 'root@root.com', __typename: 'UserNode', }, - sentForApprovalDate: '2022-08-30T07:15:31.428788+00:00', + sentForApprovalDate: '2025-01-24T14:09:52.670350+00:00', sentForAuthorizationBy: { id: 'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2', firstName: 'Root', @@ -80,16 +85,22 @@ export const fakeApolloPaymentPlan: PaymentPlanQuery['paymentPlan'] = { email: 'root@root.com', __typename: 'UserNode', }, - sentForAuthorizationDate: '2022-08-30T07:15:41.790444+00:00', - sentForFinanceReleaseBy: null, - sentForFinanceReleaseDate: null, + sentForAuthorizationDate: '2025-01-24T14:09:57.924344+00:00', + sentForFinanceReleaseBy: { + id: 'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2', + firstName: 'Root', + lastName: 'Rootkowski', + email: 'root@root.com', + __typename: 'UserNode', + }, + sentForFinanceReleaseDate: '2025-01-24T14:10:08.713416+00:00', approvalNumberRequired: 1, authorizationNumberRequired: 1, financeReleaseNumberRequired: 1, actions: { approval: [ { - createdAt: '2022-08-30T07:15:41.787449+00:00', + createdAt: '2025-01-24T14:09:57.921746+00:00', comment: '', info: 'Approved by Root Rootkowski', createdBy: { @@ -102,8 +113,36 @@ export const fakeApolloPaymentPlan: PaymentPlanQuery['paymentPlan'] = { __typename: 'ApprovalNode', }, ], - authorization: [], - financeRelease: [], + authorization: [ + { + createdAt: '2025-01-24T14:10:08.712539+00:00', + comment: '', + info: 'Authorized by Root Rootkowski', + createdBy: { + id: 'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2', + firstName: 'Root', + lastName: 'Rootkowski', + email: 'root@root.com', + __typename: 'UserNode', + }, + __typename: 'ApprovalNode', + }, + ], + financeRelease: [ + { + createdAt: '2025-01-24T14:10:13.163921+00:00', + comment: '', + info: 'Released by Root Rootkowski', + createdBy: { + id: 'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2', + firstName: 'Root', + lastName: 'Rootkowski', + email: 'root@root.com', + __typename: 'UserNode', + }, + __typename: 'ApprovalNode', + }, + ], reject: [], __typename: 'FilteredActionsListNode', }, @@ -115,21 +154,59 @@ export const fakeApolloPaymentPlan: PaymentPlanQuery['paymentPlan'] = { ], __typename: 'ApprovalProcessNodeConnection', }, - steficonRule: null, + steficonRule: { + id: 'UnVsZUNvbW1pdE5vZGU6Ng==', + rule: { + id: 'U3RlZmljb25SdWxlTm9kZTo1', + name: 'Test Formula for Payment Plan 033', + __typename: 'SteficonRuleNode', + }, + __typename: 'RuleCommitNode', + }, + steficonRuleTargeting: null, hasPaymentListExportFile: false, hasFspDeliveryMechanismXlsxTemplate: true, + canCreateXlsxWithFspAuthCode: false, importedFileDate: null, importedFileName: '', - totalEntitledQuantityUsd: 376, + totalEntitledQuantityUsd: 424, paymentsConflictsCount: 0, + deliveryMechanisms: [ + { + id: 'RGVsaXZlcnlNZWNoYW5pc21QZXJQYXltZW50UGxhbk5vZGU6Y2JjN2IyZDMtZmQ5ZC00YWE1LWFjZWMtNWU4MmEzNjU0MDdm', + name: 'Cash', + code: 'cash', + order: 1, + sentToPaymentGateway: false, + chosenConfiguration: '', + fsp: { + id: 'RmluYW5jaWFsU2VydmljZVByb3ZpZGVyTm9kZTowMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC1mMDAwMDAwMDAwMDE=', + name: 'Test FSP 1', + communicationChannel: 'XLSX', + isPaymentGateway: false, + __typename: 'FinancialServiceProviderNode', + }, + __typename: 'DeliveryMechanismPerPaymentPlanNode', + }, + ], canSendToPaymentGateway: false, - canSplit: false, + canSplit: true, splitChoices: [ + { + name: 'By Admin Area 1', + value: 'BY_ADMIN_AREA1', + __typename: 'ChoiceObject', + }, { name: 'By Admin Area 2', value: 'BY_ADMIN_AREA2', __typename: 'ChoiceObject', }, + { + name: 'By Admin Area 3', + value: 'BY_ADMIN_AREA3', + __typename: 'ChoiceObject', + }, { name: 'By Collector', value: 'BY_COLLECTOR', @@ -141,127 +218,27 @@ export const fakeApolloPaymentPlan: PaymentPlanQuery['paymentPlan'] = { __typename: 'ChoiceObject', }, ], - deliveryMechanisms: [ - { - id: 'RGVsaXZlcnlNZWNoYW5pc21Ob2RlOjkyNGM5NTBhLTE5YzQtNGJiNC04ZDExLTI3Yzg5OTczNzlhYQ==', - name: 'Cash', - fsp: { - id: 'RmluYW5jaWFsU2VydmljZVByb3ZpZGVyTm9kZToyMzA5MzQ2YS01NTA3LTRjY2UtOTkxMS05MDYwNjBkYWNkMDM=', - name: 'Miranda Ltd', - communicationChannel: FinancialServiceProviderCommunicationChannel.Api, - __typename: 'FinancialServiceProviderNode', - }, - sentToPaymentGateway: false, - __typename: 'DeliveryMechanismPerPaymentPlanNode', - }, - { - id: 'RGVsaXZlcnlNZWNoYW5pc21Ob2RlOjFjMjQwMmFhLWY5N2QtNDNhNC1iYThkLTcwM2Q0YjUxYTQ5OQ==', - name: 'In Kind', - fsp: { - id: 'RmluYW5jaWFsU2VydmljZVByb3ZpZGVyTm9kZTplNjlkZTM1Yi1kMzRjLTQyNzYtOTJhMi1lNTYyOWQwNmEzMzY=', - name: 'Frazier-Watson', - communicationChannel: FinancialServiceProviderCommunicationChannel.Xlsx, - __typename: 'FinancialServiceProviderNode', - }, - sentToPaymentGateway: false, - __typename: 'DeliveryMechanismPerPaymentPlanNode', - }, - { - id: 'RGVsaXZlcnlNZWNoYW5pc21Ob2RlOjAwYjlhNTA5LTE4MDEtNGQ1MS04ODk1LTJkYzMyOGNjNjI3MA==', - name: 'Transfer', - fsp: { - id: 'RmluYW5jaWFsU2VydmljZVByb3ZpZGVyTm9kZTpkODU3MmFjNy04MjMyLTQwYjItOWFjNS0zMDBiZWQ2YjcwNDU=', - name: 'Bray Group', - communicationChannel: FinancialServiceProviderCommunicationChannel.Xlsx, - __typename: 'FinancialServiceProviderNode', - }, - sentToPaymentGateway: false, - __typename: 'DeliveryMechanismPerPaymentPlanNode', - }, - ], volumeByDeliveryMechanism: [ { deliveryMechanism: { - id: 'RGVsaXZlcnlNZWNoYW5pc21Ob2RlOjkyNGM5NTBhLTE5YzQtNGJiNC04ZDExLTI3Yzg5OTczNzlhYQ==', + id: 'RGVsaXZlcnlNZWNoYW5pc21QZXJQYXltZW50UGxhbk5vZGU6Y2JjN2IyZDMtZmQ5ZC00YWE1LWFjZWMtNWU4MmEzNjU0MDdm', name: 'Cash', order: 1, fsp: { - id: 'RmluYW5jaWFsU2VydmljZVByb3ZpZGVyTm9kZToyMzA5MzQ2YS01NTA3LTRjY2UtOTkxMS05MDYwNjBkYWNkMDM=', - name: 'Miranda Ltd', + id: 'RmluYW5jaWFsU2VydmljZVByb3ZpZGVyTm9kZTowMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC1mMDAwMDAwMDAwMDE=', + name: 'Test FSP 1', __typename: 'FinancialServiceProviderNode', }, __typename: 'DeliveryMechanismPerPaymentPlanNode', }, - volume: 0, - volumeUsd: 0, - __typename: 'VolumeByDeliveryMechanismNode', - }, - { - deliveryMechanism: { - id: 'RGVsaXZlcnlNZWNoYW5pc21Ob2RlOjFjMjQwMmFhLWY5N2QtNDNhNC1iYThkLTcwM2Q0YjUxYTQ5OQ==', - name: 'In Kind', - order: 2, - fsp: { - id: 'RmluYW5jaWFsU2VydmljZVByb3ZpZGVyTm9kZTplNjlkZTM1Yi1kMzRjLTQyNzYtOTJhMi1lNTYyOWQwNmEzMzY=', - name: 'Frazier-Watson', - __typename: 'FinancialServiceProviderNode', - }, - __typename: 'DeliveryMechanismPerPaymentPlanNode', - }, - volume: 0, - volumeUsd: 0, - __typename: 'VolumeByDeliveryMechanismNode', - }, - { - deliveryMechanism: { - id: 'RGVsaXZlcnlNZWNoYW5pc21Ob2RlOjAwYjlhNTA5LTE4MDEtNGQ1MS04ODk1LTJkYzMyOGNjNjI3MA==', - name: 'Transfer', - order: 3, - fsp: { - id: 'RmluYW5jaWFsU2VydmljZVByb3ZpZGVyTm9kZTpkODU3MmFjNy04MjMyLTQwYjItOWFjNS0zMDBiZWQ2YjcwNDU=', - name: 'Bray Group', - __typename: 'FinancialServiceProviderNode', - }, - __typename: 'DeliveryMechanismPerPaymentPlanNode', - }, - volume: 0, - volumeUsd: 0, + volume: 424, + volumeUsd: 424, __typename: 'VolumeByDeliveryMechanismNode', }, ], verificationPlans: { - totalCount: 1, - edges: [ - { - node: { - id: 'UGF5bWVudFZlcmlmaWNhdGlvblBsYW5Ob2RlOjk1NTFlZDA4LWY1YzYtNDdmNC05ZmMwLTU1MWU2ZmEzN2UyNA==', - unicefId: 'PVP-1', - status: PaymentVerificationPlanStatus.Active, - sampleSize: 44, - receivedCount: 47, - notReceivedCount: 0, - respondedCount: 71, - verificationChannel: - PaymentVerificationPlanVerificationChannel.Rapidpro, - sampling: PaymentVerificationPlanSampling.FullList, - receivedWithProblemsCount: 2, - rapidProFlowId: '', - confidenceInterval: null, - marginOfError: null, - activationDate: null, - completionDate: null, - ageFilter: null, - excludedAdminAreasFilter: null, - sexFilter: null, - xlsxFileExporting: false, - hasXlsxFile: false, - xlsxFileWasDownloaded: false, - xlsxFileImported: false, - __typename: 'PaymentVerificationPlanNode', - }, - __typename: 'PaymentVerificationPlanNodeEdge', - }, - ], + totalCount: 0, + edges: [], __typename: 'PaymentVerificationPlanNodeConnection', }, paymentVerificationSummary: null, @@ -271,17 +248,17 @@ export const fakeApolloPaymentPlan: PaymentPlanQuery['paymentPlan'] = { edges: [ { node: { - id: 'UGF5bWVudE5vZGU6MTAwMDAwMDAtZmVlZC1iZWVmLTAwMDAtMDAwMDBiYWRmMDBk', + id: 'UGF5bWVudE5vZGU6Njk1ZjNjMGItNzMyYy00MzI0LWI5YjUtOTJiYjE0OTIxMzNj', + status: 'PENDING', __typename: 'PaymentNode', - status: PaymentStatus.Pending, }, __typename: 'PaymentNodeEdge', }, { node: { - id: 'UGF5bWVudE5vZGU6MjAwMDAwMDAtZmVlZC1iZWVmLTAwMDAtMDAwMDBiYWRmMDBk', + id: 'UGF5bWVudE5vZGU6OTYzNDkwYTItNDE0OC00YjA4LWI4YTctZTM0NzVmYWU5OGI1', + status: 'PENDING', __typename: 'PaymentNode', - status: PaymentStatus.Pending, }, __typename: 'PaymentNodeEdge', }, @@ -289,18 +266,43 @@ export const fakeApolloPaymentPlan: PaymentPlanQuery['paymentPlan'] = { __typename: 'PaymentNodeConnection', }, reconciliationSummary: { - deliveredFully: 100, - deliveredPartially: 15, - notDelivered: 5, - unsuccessful: 5, - pending: 0, - numberOfPayments: 120, - reconciled: 120, + deliveredFully: 0, + deliveredPartially: 0, + notDelivered: 0, + unsuccessful: 0, + pending: 2, + numberOfPayments: 2, + reconciled: 0, __typename: 'ReconciliationSummaryNode', }, + excludedHouseholds: [], + excludedIndividuals: [], + exclusionReason: '', + excludeHouseholdError: '', + isFollowUp: true, + followUps: { + totalCount: 0, + edges: [], + __typename: 'PaymentPlanNodeConnection', + }, + sourcePaymentPlan: { + id: 'UGF5bWVudFBsYW5Ob2RlOjgyZTUzYzE3LTM4MmMtNGI2My05ZTk5LTg0ZTMxMGZhNGRmYQ==', + unicefId: 'PP-0060-22-11223344', + __typename: 'PaymentPlanNode', + }, + unsuccessfulPaymentsCount: 0, + supportingDocuments: [], + targetingCriteria: { + __typename: 'TargetingCriteriaNode', + id: 'ef403820-8654-4791-b8e4-2f0ae95a7b2c', + flagExcludeIfActiveAdjudicationTicket: false, + flagExcludeIfOnSanctionList: false, + householdIds: '', + individualIds: '', + rules: [], + }, __typename: 'PaymentPlanNode', - excludedIds: '', -}; +} as PaymentPlanQuery['paymentPlan']; export const fakeApolloPaymentPlanWithWrongBackgroundActionStatus: PaymentPlanQuery['paymentPlan'] = { diff --git a/src/frontend/fixtures/payments/fakeApolloAllCashPlansAndPaymentPlans.ts b/src/frontend/fixtures/payments/fakeApolloAllCashPlansAndPaymentPlans.ts deleted file mode 100644 index 38a51d7472..0000000000 --- a/src/frontend/fixtures/payments/fakeApolloAllCashPlansAndPaymentPlans.ts +++ /dev/null @@ -1,160 +0,0 @@ -import { AllCashPlansAndPaymentPlansDocument } from '../../src/__generated__/graphql'; - -export const fakeApolloAllCashPlansAndPaymentPlans = [ - { - request: { - query: AllCashPlansAndPaymentPlansDocument, - variables: { - businessArea: 'afghanistan', - search: '', - verificationStatus: [], - serviceProvider: '', - deliveryType: [], - startDateGte: null, - endDateLte: null, - program: - 'UHJvZ3JhbU5vZGU6YzRkNTY1N2QtMWEyOS00NmUxLTgxOTAtZGY3Zjg1YTBkMmVm', - isPaymentVerificationPage: true, - first: 5, - orderBy: null, - }, - }, - result: { - data: { - allCashPlansAndPaymentPlans: { - pageInfo: { - startCursor: 'YXJyYXljb25uZWN0aW9uOjA=', - endCursor: 'YXJyYXljb25uZWN0aW9uOjM=', - hasNextPage: false, - hasPreviousPage: false, - __typename: 'PageInfoNode', - }, - totalCount: 4, - edges: [ - { - cursor: 'YXJyYXljb25uZWN0aW9uOjA=', - node: { - objType: 'PaymentPlan', - id: - 'UGF5bWVudFBsYW5Ob2RlOmJmOTBkOWQzLTkyY2QtNGMyMC1iODc3LTU1OTFiNzUwZjlkZQ==', - unicefId: 'PP-0060-22-11223344', - verificationStatus: 'ACTIVE', - status: 'FINISHED', - currency: 'USD', - totalDeliveredQuantity: 999, - startDate: '2023-09-29 10:52:33.143335+00:00', - endDate: '2023-10-29 10:52:33.143335+00:00', - programName: 'Test Program', - updatedAt: '2023-09-29 10:52:33.158798+00:00', - verificationPlans: [ - { - id: - 'UGF5bWVudFZlcmlmaWNhdGlvblBsYW5Ob2RlOjI0NmEzNTFjLTBkZTYtNDI1Ny05M2M1LWFlZjJhMzljYjE5OA==', - createdAt: '2023-09-29T10:52:33.276033+00:00', - unicefId: 'PVP-2', - __typename: 'PaymentVerificationPlanNode', - }, - ], - totalNumberOfHouseholds: 5, - assistanceMeasurement: '', - totalEntitledQuantity: 2999, - totalUndeliveredQuantity: null, - dispersionDate: '', - serviceProviderFullName: '', - __typename: 'CashPlanAndPaymentPlanNode', - }, - __typename: 'CashPlanAndPaymentPlanEdges', - }, - { - cursor: 'YXJyYXljb25uZWN0aW9uOjE=', - node: { - objType: 'CashPlan', - id: - 'Q2FzaFBsYW5Ob2RlOmI3M2QxMjE3LWQ3ZjItNGFkZS1iNWEzLTA0NzUzNDY4ZDcwOQ==', - unicefId: '123-21-CSH-00003', - verificationStatus: 'PENDING', - status: 'Transaction Completed', - currency: 'CDF', - totalDeliveredQuantity: 86550314.67, - startDate: '2022-02-23 08:01:00+00:00', - endDate: '2024-11-16 08:01:00+00:00', - programName: 'Test Program', - updatedAt: '2023-09-29 10:52:30.121322+00:00', - verificationPlans: [], - totalNumberOfHouseholds: 5, - assistanceMeasurement: '', - totalEntitledQuantity: 40441284.78, - totalUndeliveredQuantity: 32814804.9, - dispersionDate: '', - serviceProviderFullName: '', - __typename: 'CashPlanAndPaymentPlanNode', - }, - __typename: 'CashPlanAndPaymentPlanEdges', - }, - { - cursor: 'YXJyYXljb25uZWN0aW9uOjI=', - node: { - objType: 'CashPlan', - id: - 'Q2FzaFBsYW5Ob2RlOmY1MTQyYzZiLWZjNzAtNGEzMC1hNjRlLTAyNzhkZTI5ZDMwMA==', - unicefId: '123-21-CSH-00002', - verificationStatus: 'ACTIVE', - status: 'Distribution Completed with Errors', - currency: 'GNF', - totalDeliveredQuantity: 26405396.65, - startDate: '2022-06-10 21:07:46+00:00', - endDate: '2023-08-13 21:07:46+00:00', - programName: 'Test Program', - updatedAt: '2023-09-29 10:52:30.108624+00:00', - verificationPlans: [ - { - id: - 'UGF5bWVudFZlcmlmaWNhdGlvblBsYW5Ob2RlOjI4NzgyNDc1LWZiZjMtNDc1MC1hYTcwLTZkNTcyYTVjODQxNA==', - createdAt: '2023-09-29T10:52:30.492926+00:00', - unicefId: 'PVP-1', - __typename: 'PaymentVerificationPlanNode', - }, - ], - totalNumberOfHouseholds: 10, - assistanceMeasurement: '', - totalEntitledQuantity: 67625167.2, - totalUndeliveredQuantity: 78890756.47, - dispersionDate: '', - serviceProviderFullName: '', - __typename: 'CashPlanAndPaymentPlanNode', - }, - __typename: 'CashPlanAndPaymentPlanEdges', - }, - { - cursor: 'YXJyYXljb25uZWN0aW9uOjM=', - node: { - objType: 'CashPlan', - id: - 'Q2FzaFBsYW5Ob2RlOmY2MzkxZDVhLTgyZmMtNGMyYi04ZTM0LWRmZDQ2NmRkZDhhMg==', - unicefId: '123-21-CSH-00001', - verificationStatus: 'PENDING', - status: 'Transaction Completed', - currency: 'HNL', - totalDeliveredQuantity: 36220070.3, - startDate: '2022-10-19 12:16:33+00:00', - endDate: '2025-01-16 12:16:33+00:00', - programName: 'Test Program', - updatedAt: '2023-09-29 10:52:30.094745+00:00', - verificationPlans: [], - totalNumberOfHouseholds: 5, - assistanceMeasurement: '', - totalEntitledQuantity: 28697810.73, - totalUndeliveredQuantity: 65487964.68, - dispersionDate: '', - serviceProviderFullName: '', - __typename: 'CashPlanAndPaymentPlanNode', - }, - __typename: 'CashPlanAndPaymentPlanEdges', - }, - ], - __typename: 'PaginatedCashPlanAndPaymentPlanNode', - }, - }, - }, - }, -]; diff --git a/src/frontend/fixtures/payments/fakeApolloAllCashPlansAndPaymentPlansForProgram.ts b/src/frontend/fixtures/payments/fakeApolloAllCashPlansAndPaymentPlansForProgram.ts deleted file mode 100644 index 468f1c3e43..0000000000 --- a/src/frontend/fixtures/payments/fakeApolloAllCashPlansAndPaymentPlansForProgram.ts +++ /dev/null @@ -1,199 +0,0 @@ -import { AllCashPlansAndPaymentPlansDocument } from '../../src/__generated__/graphql'; - -export const fakeApolloAllCashPlansAndPaymentPlans = [ - { - request: { - query: AllCashPlansAndPaymentPlansDocument, - variables: { - program: - 'UHJvZ3JhbU5vZGU6YzRkNTY1N2QtMWEyOS00NmUxLTgxOTAtZGY3Zjg1YTBkMmVm', - businessArea: 'afghanistan', - first: 5, - orderBy: null, - isPaymentVerificationPage: false, - }, - }, - result: { - data: { - allCashPlansAndPaymentPlans: { - pageInfo: { - startCursor: 'YXJyYXljb25uZWN0aW9uOjA=', - endCursor: 'YXJyYXljb25uZWN0aW9uOjQ=', - hasNextPage: true, - hasPreviousPage: false, - __typename: 'PageInfoNode', - }, - totalCount: 7, - edges: [ - { - cursor: 'YXJyYXljb25uZWN0aW9uOjA=', - node: { - objType: 'PaymentPlan', - id: - 'UGF5bWVudFBsYW5Ob2RlOmQ4NDdkZDFlLTkwYmYtNDQzZC1iNWI1LWNiZTcwMDQ5YzYyMA==', - unicefId: 'PP-0060-23-00000017', - verificationStatus: 'PENDING', - currency: 'USD', - totalDeliveredQuantity: 1000, - startDate: '2023-07-01 00:00:00+00:00', - endDate: '2023-07-31 00:00:00+00:00', - programName: 'test_program', - updatedAt: '2023-06-07 10:40:04.741354+00:00', - verificationPlans: [ - { - id: - 'UGF5bWVudFZlcmlmaWNhdGlvblBsYW5Ob2RlOjJjMWE5NjQyLWEyYTItNDhiOS1hYTM0LWNjMTA1ODA4ZmI1MQ==', - createdAt: '2023-06-13T21:02:41.201531+00:00', - unicefId: 'PVP-13', - __typename: 'PaymentVerificationPlanNode', - }, - ], - totalNumberOfHouseholds: null, - assistanceMeasurement: '', - totalEntitledQuantity: 2200, - totalUndeliveredQuantity: 1200, - dispersionDate: '', - serviceProviderFullName: '', - __typename: 'CashPlanAndPaymentPlanNode', - }, - __typename: 'CashPlanAndPaymentPlanEdges', - }, - { - cursor: 'YXJyYXljb25uZWN0aW9uOjE=', - node: { - objType: 'PaymentPlan', - id: - 'UGF5bWVudFBsYW5Ob2RlOjQ4YmU4NzVmLWUxYzMtNDM3OS1iMzc1LTgwMzlkYWU4ODQ5MQ==', - unicefId: 'PP-0060-23-00000015', - verificationStatus: 'PENDING', - currency: 'ALL', - totalDeliveredQuantity: 2800, - startDate: '1500-02-04 00:00:00+00:00', - endDate: '1500-02-05 00:00:00+00:00', - programName: 'Jekub test for spec', - updatedAt: '2023-05-28 22:40:30.724728+00:00', - verificationPlans: [], - totalNumberOfHouseholds: null, - assistanceMeasurement: '', - totalEntitledQuantity: 2800, - totalUndeliveredQuantity: 0, - dispersionDate: '', - serviceProviderFullName: '', - __typename: 'CashPlanAndPaymentPlanNode', - }, - __typename: 'CashPlanAndPaymentPlanEdges', - }, - { - cursor: 'YXJyYXljb25uZWN0aW9uOjI=', - node: { - objType: 'PaymentPlan', - id: - 'UGF5bWVudFBsYW5Ob2RlOjBkNDVlNjQzLTY1YWMtNDIzOS04ZmI5LWIyNzRhNjlmMmE2ZA==', - unicefId: 'PP-0060-23-00000005', - verificationStatus: 'ACTIVE', - currency: 'AUD', - totalDeliveredQuantity: 150, - startDate: '2023-04-20 00:00:00+00:00', - endDate: '2024-04-20 00:00:00+00:00', - programName: 'Test Program', - updatedAt: '2023-04-21 10:43:49.390111+00:00', - verificationPlans: [ - { - id: - 'UGF5bWVudFZlcmlmaWNhdGlvblBsYW5Ob2RlOmU4NDU3N2IyLWY5YzgtNDgyMS1iY2YzLTY0MWM3Njk4NjM3ZQ==', - createdAt: '2023-04-21T10:37:26.578218+00:00', - unicefId: 'PVP-11', - __typename: 'PaymentVerificationPlanNode', - }, - { - id: - 'UGF5bWVudFZlcmlmaWNhdGlvblBsYW5Ob2RlOmM3N2NiYWZjLWNlYjktNDg2MC1iMTNhLWQzN2EwZGNhZjQzMw==', - createdAt: '2023-04-21T10:39:30.886897+00:00', - unicefId: 'PVP-12', - __typename: 'PaymentVerificationPlanNode', - }, - ], - totalNumberOfHouseholds: null, - assistanceMeasurement: '', - totalEntitledQuantity: 200, - totalUndeliveredQuantity: 50, - dispersionDate: '', - serviceProviderFullName: '', - __typename: 'CashPlanAndPaymentPlanNode', - }, - __typename: 'CashPlanAndPaymentPlanEdges', - }, - { - cursor: 'YXJyYXljb25uZWN0aW9uOjM=', - node: { - objType: 'PaymentPlan', - id: - 'UGF5bWVudFBsYW5Ob2RlOjc3MDQ1YmUwLTUzOTUtNDdlNy1hZWZiLTYwZjNjNDgxNzE5Zg==', - unicefId: 'PP-0060-23-00000001', - verificationStatus: 'ACTIVE', - currency: 'PLN', - totalDeliveredQuantity: 600, - startDate: '2023-03-01 00:00:00+00:00', - endDate: '2023-03-15 00:00:00+00:00', - programName: 'jkekljeil', - updatedAt: '2023-04-05 11:04:12.583452+00:00', - verificationPlans: [ - { - id: - 'UGF5bWVudFZlcmlmaWNhdGlvblBsYW5Ob2RlOjNjMDdiNDk2LTBiMzktNGFiYi1hMWMwLWMyMzVmMGQyNzYwZQ==', - createdAt: '2023-04-20T08:26:59.514454+00:00', - unicefId: 'PVP-10', - __typename: 'PaymentVerificationPlanNode', - }, - ], - totalNumberOfHouseholds: null, - assistanceMeasurement: '', - totalEntitledQuantity: 700, - totalUndeliveredQuantity: 100, - dispersionDate: '', - serviceProviderFullName: '', - __typename: 'CashPlanAndPaymentPlanNode', - }, - __typename: 'CashPlanAndPaymentPlanEdges', - }, - { - cursor: 'YXJyYXljb25uZWN0aW9uOjQ=', - node: { - objType: 'CashPlan', - id: - 'Q2FzaFBsYW5Ob2RlOjk1NGY3OWE3LTdiZDYtNDU5ZS05ZGE4LTQzNjg3ZDY0NjYyNg==', - unicefId: '123-21-CSH-00003', - verificationStatus: 'PENDING', - currency: 'BHD', - totalDeliveredQuantity: 14923041.29, - startDate: '2021-07-07 15:22:22+00:00', - endDate: '2023-05-09 15:22:22+00:00', - programName: - 'Total western including stay spring western issue.', - updatedAt: '2023-01-13 15:47:16.805453+00:00', - verificationPlans: [ - { - id: - 'UGF5bWVudFZlcmlmaWNhdGlvblBsYW5Ob2RlOjNiMDM1MWQxLTdmYTktNDRhOS1iNjA5LTBiZGYyMjE4YmQzYg==', - createdAt: '2023-03-22T16:18:00.161858+00:00', - unicefId: 'PVP-8', - __typename: 'PaymentVerificationPlanNode', - }, - ], - totalNumberOfHouseholds: 5, - assistanceMeasurement: '', - totalEntitledQuantity: 2463289.03, - totalUndeliveredQuantity: 16301871.34, - dispersionDate: '', - serviceProviderFullName: '', - __typename: 'CashPlanAndPaymentPlanNode', - }, - __typename: 'CashPlanAndPaymentPlanEdges', - }, - ], - __typename: 'PaginatedCashPlanAndPaymentPlanNode', - }, - }, - }, - }, -]; diff --git a/src/frontend/fixtures/payments/fakeApolloAllPaymentRecordsHousehold.ts b/src/frontend/fixtures/payments/fakeApolloAllPaymentRecordsHousehold.ts deleted file mode 100644 index cb12e54865..0000000000 --- a/src/frontend/fixtures/payments/fakeApolloAllPaymentRecordsHousehold.ts +++ /dev/null @@ -1,106 +0,0 @@ -import { AllPaymentRecordsAndPaymentsDocument } from '../../src/__generated__/graphql'; - -export const fakeApolloAllPaymentRecordsHousehold = [ - { - request: { - query: AllPaymentRecordsAndPaymentsDocument, - variables: { - household: - 'SG91c2Vob2xkTm9kZTphYTAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDE=', - businessArea: 'afghanistan', - first: 5, - orderBy: null, - }, - }, - result: { - data: { - pageInfo: { - hasNextPage: false, - hasPreviousPage: false, - startCursor: 'YXJyYXljb25uZWN0aW9uOjA=', - endCursor: 'YXJyYXljb25uZWN0aW9uOjI=', - __typename: 'PageInfoNode', - }, - edges: [ - { - cursor: 'YXJyYXljb25uZWN0aW9uOjA=', - node: { - objType: 'PaymentRecord', - id: - 'UGF5bWVudFJlY29yZE5vZGU6Y2JkMjU1MjctNTIwNS00Mjk5LWFiYmYtYTZjYTgzNzEyYjk1', - fullName: 'Ashley Reid', - status: 'TRANSACTION_SUCCESSFUL', - caId: '123-21-PR-00008', - currency: 'AZN', - entitlementQuantity: 303.41, - deliveredQuantity: 92, - deliveredQuantityUsd: 264, - deliveryDate: '2023-03-01 22:21:20+00:00', - parent: { - id: - 'Q2FzaFBsYW5Ob2RlOjMwMTY0M2ZjLTQwMGItNGY5MS1iZDg1LTFiNTAyZTMxZmMzMg==', - programName: 'Test Program', - __typename: 'CashPlanAndPaymentPlanNode', - }, - verification: null, - __typename: 'PaymentRecordAndPaymentNode', - }, - __typename: 'PaymentRecordsAndPaymentsEdges', - }, - { - cursor: 'YXJyYXljb25uZWN0aW9uOjE=', - node: { - objType: 'PaymentRecord', - id: - 'UGF5bWVudFJlY29yZE5vZGU6YThhNzdkZTEtNWYxZi00MzBjLWJlOGMtODVhNzkzNjJiMzZm', - fullName: 'Arthur Fletcher', - status: 'PARTIALLY_DISTRIBUTED', - caId: '123-21-PR-00004', - currency: 'COP', - entitlementQuantity: 6091.99, - deliveredQuantity: 3177, - deliveredQuantityUsd: 5491, - deliveryDate: '2021-07-31 06:52:41+00:00', - parent: { - id: - 'Q2FzaFBsYW5Ob2RlOmQzMDI1MDRhLWQzZjMtNGE2MC05Nzg5LTBhNGVjMGI0N2M4Mw==', - programName: 'Test Program', - __typename: 'CashPlanAndPaymentPlanNode', - }, - verification: null, - __typename: 'PaymentRecordAndPaymentNode', - }, - __typename: 'PaymentRecordsAndPaymentsEdges', - }, - { - cursor: 'YXJyYXljb25uZWN0aW9uOjI=', - node: { - objType: 'Payment', - id: - 'UGF5bWVudE5vZGU6MTAwMDAwMDAtZmVlZC1iZWVmLTAwMDAtMDAwMDBiYWRmMDBk', - fullName: 'Jan Kowalski', - status: 'PENDING', - caId: 'RCPT-0060-24-0.000.001', - currency: 'USD', - entitlementQuantity: null, - deliveredQuantity: null, - deliveredQuantityUsd: null, - deliveryDate: null, - parent: { - id: - 'UGF5bWVudFBsYW5Ob2RlOjAwMDAwMDAwLWZlZWQtYmVlZi0wMDAwLTAwMDAwYmFkZjAwZA==', - programName: 'Test Program', - __typename: 'CashPlanAndPaymentPlanNode', - }, - verification: null, - __typename: 'PaymentRecordAndPaymentNode', - }, - __typename: 'PaymentRecordsAndPaymentsEdges', - }, - ], - totalCount: 3, - __typename: 'PaginatedPaymentRecordsAndPaymentsNode', - }, - }, - }, -]; diff --git a/src/frontend/fixtures/payments/fakeApolloAllPaymentsHousehold.ts b/src/frontend/fixtures/payments/fakeApolloAllPaymentsHousehold.ts new file mode 100644 index 0000000000..48f6c0f4e2 --- /dev/null +++ b/src/frontend/fixtures/payments/fakeApolloAllPaymentsHousehold.ts @@ -0,0 +1,620 @@ +import { AllPaymentsForTableDocument } from '@generated/graphql'; + +export const fakeApolloAllPaymentsHousehold = [ + { + request: { + query: AllPaymentsForTableDocument, + variables: { + businessArea: 'afghanistan', + first: 10, + orderBy: '-created_at', + paymentPlanId: + 'UGF5bWVudFBsYW5Ob2RlOjgyZTUzYzE3LTM4MmMtNGI2My05ZTk5LTg0ZTMxMGZhNGRmYQ==', + }, + }, + result: { + data: { + allPayments: { + pageInfo: { + hasNextPage: false, + hasPreviousPage: false, + startCursor: 'YXJyYXljb25uZWN0aW9uOjA=', + endCursor: 'YXJyYXljb25uZWN0aW9uOjQ=', + __typename: 'PageInfo', + }, + totalCount: 5, + edges: [ + { + cursor: 'YXJyYXljb25uZWN0aW9uOjA=', + node: { + id: 'UGF5bWVudE5vZGU6MDk5MjQ3YTYtM2FjYS00ZjRhLWFiZjMtMGEwNmVkNjAyZTIx', + unicefId: 'RCPT-0060-25-0.000.014', + status: 'PENDING', + vulnerabilityScore: null, + parent: { + program: { + id: 'UHJvZ3JhbU5vZGU6MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtZmFjZWIwMGMwMDAw', + name: 'Test Program', + __typename: 'ProgramNode', + }, + __typename: 'PaymentPlanNode', + }, + household: { + id: 'SG91c2Vob2xkTm9kZTo0MWJiNjNhNy0xNTM1LTQxY2ItOWRlZS04MGFjYWUxMjVjYTk=', + unicefId: 'HH-0', + size: 5, + admin2: null, + headOfHousehold: { + id: 'SW5kaXZpZHVhbE5vZGU6ODdhZGM2ODQtZGQ5MS00MzNiLTk2MTMtZTAxMGU2MGNmZDQz', + unicefId: 'IND-0', + fullName: 'Pamela Tara Miller', + __typename: 'IndividualNode', + }, + individuals: { + edges: [ + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6ODdhZGM2ODQtZGQ5MS00MzNiLTk2MTMtZTAxMGU2MGNmZDQz', + unicefId: 'IND-0', + fullName: 'Pamela Tara Miller', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6NWRiZmZmNDItYjcwNy00YzE5LThlM2ItZmNhYjE5ZmYyNDhl', + unicefId: 'IND-1', + fullName: 'John Mia Waters', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6MjNiY2QyMjYtM2ZmYS00NjE1LTkwYjQtMGY1ZWI1MjFkYTUz', + unicefId: 'IND-2', + fullName: 'Raymond Lisa Brown', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6MmEwN2MzNDEtYjdlYS00MTEyLWFmNWItNGM3MTQ2Y2VkZDZi', + unicefId: 'IND-3', + fullName: 'James Derrick Davis', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6NTE0NDMxNzgtNjI1MS00NzA4LWIxMDktNTdkYTE4MTNkZDk5', + unicefId: 'IND-4', + fullName: 'Matthew Andrew Clarke', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6NDY0YmZmNjAtMDRkMS00MTk3LTllZTEtZWI0MjUzYmZhMGVh', + unicefId: 'IND-5', + fullName: 'Gwendolyn Shannon Shields', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6YzBiNzNjNWYtNTI3Yy00NDcyLThkNTgtNTA4MjViZGM0MmI0', + unicefId: 'IND-6', + fullName: 'Terry Elizabeth Bradshaw', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + ], + __typename: 'IndividualNodeConnection', + }, + __typename: 'HouseholdNode', + }, + entitlementQuantity: 1686, + entitlementQuantityUsd: 1686, + currency: 'USD', + deliveredQuantity: 423, + deliveredQuantityUsd: 423, + paymentPlanHardConflicted: false, + paymentPlanSoftConflicted: false, + paymentPlanHardConflictedData: [], + paymentPlanSoftConflictedData: [], + collector: { + id: 'SW5kaXZpZHVhbE5vZGU6NDY0YmZmNjAtMDRkMS00MTk3LTllZTEtZWI0MjUzYmZhMGVh', + unicefId: 'IND-5', + fullName: 'Gwendolyn Shannon Shields', + __typename: 'IndividualNode', + }, + financialServiceProvider: { + id: 'RmluYW5jaWFsU2VydmljZVByb3ZpZGVyTm9kZTowMDRiMGZkOC0wNzVmLTQyNDEtODJiMi1hMTZmZGZiOWE0NmM=', + name: 'Rowe-Horne', + __typename: 'FinancialServiceProviderNode', + }, + fspAuthCode: '', + __typename: 'PaymentNode', + }, + __typename: 'PaymentNodeEdge', + }, + { + cursor: 'YXJyYXljb25uZWN0aW9uOjE=', + node: { + id: 'UGF5bWVudE5vZGU6ZjE0MjU1YTMtNDllYi00ZjAxLTgyNGYtMDFiZGI1NDRiZDM1', + unicefId: 'RCPT-0060-25-0.000.015', + status: 'PENDING', + vulnerabilityScore: null, + parent: { + program: { + id: 'UHJvZ3JhbU5vZGU6MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtZmFjZWIwMGMwMDAw', + name: 'Test Program', + __typename: 'ProgramNode', + }, + __typename: 'PaymentPlanNode', + }, + household: { + id: 'SG91c2Vob2xkTm9kZTowMWY2MDA3Yy1lYzMzLTQ4MTMtODRkZS04ZGQ3YzM4M2VjNzM=', + unicefId: 'HH-1', + size: 4, + admin2: null, + headOfHousehold: { + id: 'SW5kaXZpZHVhbE5vZGU6ZDJhNGQ2MTEtY2RjYS00M2Q1LWJhMmYtYjc3Y2E2YzY2N2Y3', + unicefId: 'IND-7', + fullName: 'Eugene Kelly Weiss', + __typename: 'IndividualNode', + }, + individuals: { + edges: [ + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6ZDJhNGQ2MTEtY2RjYS00M2Q1LWJhMmYtYjc3Y2E2YzY2N2Y3', + unicefId: 'IND-7', + fullName: 'Eugene Kelly Weiss', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6MDdhN2I1MjctNzFmNi00MDZjLTg1OTktNmE2NmM5OTI2NmQz', + unicefId: 'IND-8', + fullName: 'Kayla Brandon Rodriguez', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6NjVmZjBhZTMtNjFmMC00MmIwLWFiZjUtMjFkZGQ5MmY1MmJi', + unicefId: 'IND-9', + fullName: 'Tina Patrick Shannon', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6OTAzZDlhZTQtM2VlOS00MmY4LTk3MzktNjkwMjhlNTQ1MWE1', + unicefId: 'IND-10', + fullName: 'Elizabeth Tracy Vasquez', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6NzhjMDM0NTctZGUyMy00YmZjLWJjNDgtM2RmZTYyOTk5ODk1', + unicefId: 'IND-11', + fullName: 'Keith Alicia Perkins', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6ZDk2MjI4NmEtNWE0Yi00NjA5LWIyMGUtMjM2ZTMzMDgzYmUy', + unicefId: 'IND-12', + fullName: 'Brandon John Smith', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + ], + __typename: 'IndividualNodeConnection', + }, + __typename: 'HouseholdNode', + }, + entitlementQuantity: 3180, + entitlementQuantityUsd: 3180, + currency: 'USD', + deliveredQuantity: 6549, + deliveredQuantityUsd: 6549, + paymentPlanHardConflicted: false, + paymentPlanSoftConflicted: false, + paymentPlanHardConflictedData: [], + paymentPlanSoftConflictedData: [], + collector: { + id: 'SW5kaXZpZHVhbE5vZGU6NzhjMDM0NTctZGUyMy00YmZjLWJjNDgtM2RmZTYyOTk5ODk1', + unicefId: 'IND-11', + fullName: 'Keith Alicia Perkins', + __typename: 'IndividualNode', + }, + financialServiceProvider: { + id: 'RmluYW5jaWFsU2VydmljZVByb3ZpZGVyTm9kZTowMjA4NGFkNy1mYjFmLTRlN2UtYWFmMi05YzBiYzRjZDA0NmI=', + name: 'Tate LLC', + __typename: 'FinancialServiceProviderNode', + }, + fspAuthCode: '', + __typename: 'PaymentNode', + }, + __typename: 'PaymentNodeEdge', + }, + { + cursor: 'YXJyYXljb25uZWN0aW9uOjI=', + node: { + id: 'UGF5bWVudE5vZGU6NDIzNDhlNTgtY2YwNi00OTQwLTlhMDctMjNlZjMxNzY4ZGE3', + unicefId: 'RCPT-0060-25-0.000.016', + status: 'NOT_DISTRIBUTED', + vulnerabilityScore: null, + parent: { + program: { + id: 'UHJvZ3JhbU5vZGU6MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtZmFjZWIwMGMwMDAw', + name: 'Test Program', + __typename: 'ProgramNode', + }, + __typename: 'PaymentPlanNode', + }, + household: { + id: 'SG91c2Vob2xkTm9kZTo5NDAzNmRiOS1iMDE0LTQ5ZWItYjNiYi1mMDRkMGVkMDVmM2U=', + unicefId: 'HH-2', + size: 5, + admin2: null, + headOfHousehold: { + id: 'SW5kaXZpZHVhbE5vZGU6MjgxMmY0NTYtOGFjYS00NTJkLTliZTQtNWFlNjFjYzMwNjNk', + unicefId: 'IND-13', + fullName: 'Rachael Hannah Lewis', + __typename: 'IndividualNode', + }, + individuals: { + edges: [ + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6MjgxMmY0NTYtOGFjYS00NTJkLTliZTQtNWFlNjFjYzMwNjNk', + unicefId: 'IND-13', + fullName: 'Rachael Hannah Lewis', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6ZTg2Mjc0NDctMTgwMC00MmVkLWI3NzktOTE3YWE1OTUxZWEz', + unicefId: 'IND-14', + fullName: 'Laurie Todd Johnson', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6ZGE1YWFmZGUtODk4ZC00NDUyLWI0NWMtMmUzOWQzMDQ0NjMy', + unicefId: 'IND-15', + fullName: 'Thomas Deborah Smith', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6ZDk4OWE4OWMtYmJkNS00ZTcwLWIwNjktZDViMWQ4NThjMTM1', + unicefId: 'IND-16', + fullName: 'Joseph Benjamin Benjamin', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6ZDNmNmZlMGEtZjgzZi00YzUwLWI3YTUtMTRmYjk1NDgyODZh', + unicefId: 'IND-17', + fullName: 'Brandon Brandon Cohen', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6MzJiMzczY2MtMTM0ZC00ZTdjLWI3NmItZjFmYjkyNDA5ZjZh', + unicefId: 'IND-18', + fullName: 'Austin Alexander Reynolds', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6ZDJjNTM2MTUtMDYyNi00NjlhLWExZTQtMzVjZGQyZmM1MThi', + unicefId: 'IND-19', + fullName: 'Kimberly Kevin Henry', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + ], + __typename: 'IndividualNodeConnection', + }, + __typename: 'HouseholdNode', + }, + entitlementQuantity: 3473, + entitlementQuantityUsd: 3473, + currency: 'USD', + deliveredQuantity: 0, + deliveredQuantityUsd: 0, + paymentPlanHardConflicted: false, + paymentPlanSoftConflicted: false, + paymentPlanHardConflictedData: [], + paymentPlanSoftConflictedData: [], + collector: { + id: 'SW5kaXZpZHVhbE5vZGU6MzJiMzczY2MtMTM0ZC00ZTdjLWI3NmItZjFmYjkyNDA5ZjZh', + unicefId: 'IND-18', + fullName: 'Austin Alexander Reynolds', + __typename: 'IndividualNode', + }, + financialServiceProvider: { + id: 'RmluYW5jaWFsU2VydmljZVByb3ZpZGVyTm9kZTo2MDc0ZDM2My0xMWZmLTQzZTctODUwYS03MWEwNGViNjc0ODk=', + name: 'Jones Inc', + __typename: 'FinancialServiceProviderNode', + }, + fspAuthCode: '', + __typename: 'PaymentNode', + }, + __typename: 'PaymentNodeEdge', + }, + { + cursor: 'YXJyYXljb25uZWN0aW9uOjM=', + node: { + id: 'UGF5bWVudE5vZGU6ZTU5ZjU2YzUtNzEwMC00MzU3LWI2OWEtZDE2MDA1ZGFjYTEz', + unicefId: 'RCPT-0060-25-0.000.017', + status: 'TRANSACTION_ERRONEOUS', + vulnerabilityScore: null, + parent: { + program: { + id: 'UHJvZ3JhbU5vZGU6MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtZmFjZWIwMGMwMDAw', + name: 'Test Program', + __typename: 'ProgramNode', + }, + __typename: 'PaymentPlanNode', + }, + household: { + id: 'SG91c2Vob2xkTm9kZTo3OTg3ZWM4ZS05OWE3LTRiZTktODkwZi02ODg5M2RkM2I4NzU=', + unicefId: 'HH-3', + size: 5, + admin2: null, + headOfHousehold: { + id: 'SW5kaXZpZHVhbE5vZGU6NTMxOGNmMGQtMDRiZS00YmE3LThlMDItYzQ3OGE2NjRlYjc1', + unicefId: 'IND-20', + fullName: 'Leslie Jill Elliott', + __typename: 'IndividualNode', + }, + individuals: { + edges: [ + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6NTMxOGNmMGQtMDRiZS00YmE3LThlMDItYzQ3OGE2NjRlYjc1', + unicefId: 'IND-20', + fullName: 'Leslie Jill Elliott', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6MDMwOWI2YzktN2JhMS00NzliLWE1ZGMtOThjY2YzYzEyYjdj', + unicefId: 'IND-21', + fullName: 'Jeffrey Joseph Jones', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6ZDhhZDI0MjAtMDE1My00NTQ2LWEwZWItZDdmZmEzMjE3Yzlk', + unicefId: 'IND-22', + fullName: 'Cindy Michael Pace', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6ZGU2ZjhlNDAtZmNhZS00ZjRjLTk4ZGUtODIwZDI2ZTEzNTVi', + unicefId: 'IND-23', + fullName: 'Kelly Tamara Gutierrez', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6Nzg0ZGUxNTctZTUyMC00ZDRmLTg3NGQtYTFkNmQ5YWM4Njc0', + unicefId: 'IND-24', + fullName: 'Stephanie Katherine Bradshaw', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6MWQxN2FhNjQtZDY1Yy00Y2ViLWI0ZDEtMTg0MTI2MTVmNmE1', + unicefId: 'IND-25', + fullName: 'Elizabeth Daniel Riley', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6YjAxNTUwMDMtYTAwYS00MWZjLWJlZDgtYjA0OWFmNTlmMDU2', + unicefId: 'IND-26', + fullName: 'Crystal Heather Jones', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + ], + __typename: 'IndividualNodeConnection', + }, + __typename: 'HouseholdNode', + }, + entitlementQuantity: 6431, + entitlementQuantityUsd: 6431, + currency: 'USD', + deliveredQuantity: null, + deliveredQuantityUsd: null, + paymentPlanHardConflicted: false, + paymentPlanSoftConflicted: false, + paymentPlanHardConflictedData: [], + paymentPlanSoftConflictedData: [], + collector: { + id: 'SW5kaXZpZHVhbE5vZGU6MWQxN2FhNjQtZDY1Yy00Y2ViLWI0ZDEtMTg0MTI2MTVmNmE1', + unicefId: 'IND-25', + fullName: 'Elizabeth Daniel Riley', + __typename: 'IndividualNode', + }, + financialServiceProvider: { + id: 'RmluYW5jaWFsU2VydmljZVByb3ZpZGVyTm9kZTo3YWRlMTU1Ni1jMjk0LTQ5MGMtYTRhZC1mMjcxMTNkYWYxODA=', + name: 'Norman Inc', + __typename: 'FinancialServiceProviderNode', + }, + fspAuthCode: '', + __typename: 'PaymentNode', + }, + __typename: 'PaymentNodeEdge', + }, + { + cursor: 'YXJyYXljb25uZWN0aW9uOjQ=', + node: { + id: 'UGF5bWVudE5vZGU6Y2I3MzJjN2UtZjAxYy00ZDM1LWJkOGMtNjFjMTg5YmMwODhh', + unicefId: 'RCPT-0060-25-0.000.018', + status: 'PENDING', + vulnerabilityScore: null, + parent: { + program: { + id: 'UHJvZ3JhbU5vZGU6MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtZmFjZWIwMGMwMDAw', + name: 'Test Program', + __typename: 'ProgramNode', + }, + __typename: 'PaymentPlanNode', + }, + household: { + id: 'SG91c2Vob2xkTm9kZTplMTQ4YTVmZC00NWZiLTRjNmEtODk1MS0zMGI2NTZmYjNiYTY=', + unicefId: 'HH-4', + size: 4, + admin2: null, + headOfHousehold: { + id: 'SW5kaXZpZHVhbE5vZGU6ODljMjc3ZmItYjhkZi00MzAxLTg5NGQtMmRhNmJiMzBhNmQy', + unicefId: 'IND-27', + fullName: 'Bradley Janice Gonzalez', + __typename: 'IndividualNode', + }, + individuals: { + edges: [ + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6ODljMjc3ZmItYjhkZi00MzAxLTg5NGQtMmRhNmJiMzBhNmQy', + unicefId: 'IND-27', + fullName: 'Bradley Janice Gonzalez', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6ZWZmNjlhNmItZTQ3MC00YjlmLWI4ZDgtZGJlMjE2OTgxYjI1', + unicefId: 'IND-28', + fullName: 'Adrienne Melissa Golden', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6ZDI1MzY0NTktYmQ4ZC00OTg2LTkxYzUtZmM3MDA5ZDEyNTZi', + unicefId: 'IND-29', + fullName: 'Calvin Tiffany Rivera', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6MzQyYTgyM2MtNTdkYS00OWQwLTkzMGUtMWFjNjA4NzM0NGRk', + unicefId: 'IND-30', + fullName: 'Shelby Diane Vazquez', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6ZGZhZmQyOTYtOTIyMS00MjBhLWI0MmItODc4YmI5YzhiZjQx', + unicefId: 'IND-31', + fullName: 'Jeremiah Stacy Greene', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + { + node: { + id: 'SW5kaXZpZHVhbE5vZGU6NGU3MjZhNDgtNzNiZi00NTllLWJkMGUtOGE3MzViOWUzYWI0', + unicefId: 'IND-32', + fullName: 'Kim Scott Oconnor', + __typename: 'IndividualNode', + }, + __typename: 'IndividualNodeEdge', + }, + ], + __typename: 'IndividualNodeConnection', + }, + __typename: 'HouseholdNode', + }, + entitlementQuantity: 800, + entitlementQuantityUsd: 800, + currency: 'USD', + deliveredQuantity: 1754, + deliveredQuantityUsd: 1754, + paymentPlanHardConflicted: false, + paymentPlanSoftConflicted: false, + paymentPlanHardConflictedData: [], + paymentPlanSoftConflictedData: [], + collector: { + id: 'SW5kaXZpZHVhbE5vZGU6ZGZhZmQyOTYtOTIyMS00MjBhLWI0MmItODc4YmI5YzhiZjQx', + unicefId: 'IND-31', + fullName: 'Jeremiah Stacy Greene', + __typename: 'IndividualNode', + }, + financialServiceProvider: { + id: 'RmluYW5jaWFsU2VydmljZVByb3ZpZGVyTm9kZTplZWIwMmVjZi00ZDYwLTRkZDktOThhNS05YTk1ZTJlYmYxZjY=', + name: 'Taylor and Sons', + __typename: 'FinancialServiceProviderNode', + }, + fspAuthCode: '', + __typename: 'PaymentNode', + }, + __typename: 'PaymentNodeEdge', + }, + ], + __typename: 'PaymentNodeConnection', + }, + }, + }, + }, +]; diff --git a/src/frontend/src/__generated__/graphql.tsx b/src/frontend/src/__generated__/graphql.tsx index 34bfd9016a..9f425b1487 100644 --- a/src/frontend/src/__generated__/graphql.tsx +++ b/src/frontend/src/__generated__/graphql.tsx @@ -681,35 +681,6 @@ export type BusinessAreaNodeEdge = { node?: Maybe; }; -export type CashPlanAndPaymentPlanEdges = { - __typename?: 'CashPlanAndPaymentPlanEdges'; - cursor?: Maybe; - node?: Maybe; -}; - -export type CashPlanAndPaymentPlanNode = { - __typename?: 'CashPlanAndPaymentPlanNode'; - adminUrl?: Maybe; - assistanceMeasurement?: Maybe; - currency?: Maybe; - dispersionDate?: Maybe; - endDate?: Maybe; - id?: Maybe; - objType?: Maybe; - programName?: Maybe; - serviceProviderFullName?: Maybe; - startDate?: Maybe; - status?: Maybe; - totalDeliveredQuantity?: Maybe; - totalEntitledQuantity?: Maybe; - totalNumberOfHouseholds?: Maybe; - totalUndeliveredQuantity?: Maybe; - unicefId?: Maybe; - updatedAt?: Maybe; - verificationPlans?: Maybe>>; - verificationStatus?: Maybe; -}; - export type CategoryExtrasInput = { grievanceComplaintTicketExtras?: InputMaybe; negativeFeedbackTicketExtras?: InputMaybe; @@ -1997,7 +1968,7 @@ export type GrievanceTicketNode = Node & { needsAdjudicationTicketDetails?: Maybe; negativeFeedbackTicketDetails?: Maybe; partner?: Maybe; - paymentRecord?: Maybe; + paymentRecord?: Maybe; paymentVerificationTicketDetails?: Maybe; positiveFeedbackTicketDetails?: Maybe; priority?: Maybe; @@ -2197,8 +2168,6 @@ export type HouseholdNode = Node & { returnee?: Maybe; sanctionListConfirmedMatch?: Maybe; sanctionListPossibleMatch?: Maybe; - selection?: Maybe; - selections: Array; sensitiveTicketDetails: TicketSensitiveDetailsNodeConnection; size?: Maybe; start?: Maybe; @@ -2418,17 +2387,6 @@ export enum HouseholdRegistrationMethod { HhRegistration = 'HH_REGISTRATION' } -export type HouseholdSelectionNode = { - __typename?: 'HouseholdSelectionNode'; - createdAt: Scalars['DateTime']['output']; - household: HouseholdNode; - id: Scalars['UUID']['output']; - isMigrationHandled: Scalars['Boolean']['output']; - isOriginal: Scalars['Boolean']['output']; - updatedAt: Scalars['DateTime']['output']; - vulnerabilityScore?: Maybe; -}; - export type HouseholdUpdateDataObjectType = { address?: InputMaybe; adminAreaTitle?: InputMaybe; @@ -3826,28 +3784,6 @@ export type PageInfo = { startCursor?: Maybe; }; -export type PageInfoNode = { - __typename?: 'PageInfoNode'; - endCursor?: Maybe; - hasNextPage?: Maybe; - hasPreviousPage?: Maybe; - startCursor?: Maybe; -}; - -export type PaginatedCashPlanAndPaymentPlanNode = { - __typename?: 'PaginatedCashPlanAndPaymentPlanNode'; - edges?: Maybe>>; - pageInfo?: Maybe; - totalCount?: Maybe; -}; - -export type PaginatedPaymentRecordsAndPaymentsNode = { - __typename?: 'PaginatedPaymentRecordsAndPaymentsNode'; - edges?: Maybe>>; - pageInfo?: Maybe; - totalCount?: Maybe; -}; - export type PartnerNode = { __typename?: 'PartnerNode'; allowedBusinessAreas: UserBusinessAreaNodeConnection; @@ -4244,7 +4180,7 @@ export type PaymentPlanNode = Node & { steficonTargetingAppliedDate?: Maybe; supportingDocuments?: Maybe>>; surveys: SurveyNodeConnection; - targetingCriteria?: Maybe; + targetingCriteria: TargetingCriteriaNode; totalDeliveredQuantity?: Maybe; totalDeliveredQuantityUsd?: Maybe; totalEntitledQuantity?: Maybe; @@ -4363,8 +4299,6 @@ export enum PaymentPlanStatus { InReview = 'IN_REVIEW', Locked = 'LOCKED', LockedFsp = 'LOCKED_FSP', - MigrationBlocked = 'MIGRATION_BLOCKED', - MigrationFailed = 'MIGRATION_FAILED', Open = 'OPEN', Preparing = 'PREPARING', Processing = 'PROCESSING', @@ -4398,28 +4332,6 @@ export type PaymentPlanSupportingDocumentNodeEdge = { node?: Maybe; }; -export type PaymentRecordAndPaymentNode = { - __typename?: 'PaymentRecordAndPaymentNode'; - currency?: Maybe; - deliveredQuantity?: Maybe; - deliveredQuantityUsd?: Maybe; - deliveryDate?: Maybe; - entitlementQuantity?: Maybe; - fullName?: Maybe; - id?: Maybe; - objType?: Maybe; - parent?: Maybe; - status?: Maybe; - unicefId?: Maybe; - verification?: Maybe; -}; - -export type PaymentRecordsAndPaymentsEdges = { - __typename?: 'PaymentRecordsAndPaymentsEdges'; - cursor?: Maybe; - node?: Maybe; -}; - export enum PaymentStatus { DistributionSuccessful = 'DISTRIBUTION_SUCCESSFUL', ForceFailed = 'FORCE_FAILED', @@ -4958,7 +4870,6 @@ export type Query = { allAdminAreas?: Maybe; allAreasTree?: Maybe>>; allBusinessAreas?: Maybe; - allCashPlansAndPaymentPlans?: Maybe; allCollectorFieldsAttributes?: Maybe>>; allDeliveryMechanisms?: Maybe>>; allEditHouseholdFieldsAttributes?: Maybe>>; @@ -4979,7 +4890,6 @@ export type Query = { allMergedHouseholds?: Maybe; allMergedIndividuals?: Maybe; allPaymentPlans?: Maybe; - allPaymentRecordsAndPayments?: Maybe; allPaymentVerificationLogEntries?: Maybe; allPaymentVerificationPlan?: Maybe; allPaymentVerifications?: Maybe; @@ -5213,24 +5123,6 @@ export type QueryAllBusinessAreasArgs = { }; -export type QueryAllCashPlansAndPaymentPlansArgs = { - after?: InputMaybe; - before?: InputMaybe; - businessArea: Scalars['String']['input']; - deliveryType?: InputMaybe>>; - endDateLte?: InputMaybe; - first?: InputMaybe; - isPaymentVerificationPage?: InputMaybe; - last?: InputMaybe; - orderBy?: InputMaybe; - program?: InputMaybe; - search?: InputMaybe; - serviceProvider?: InputMaybe; - startDateGte?: InputMaybe; - verificationStatus?: InputMaybe>>; -}; - - export type QueryAllCollectorFieldsAttributesArgs = { flexField?: InputMaybe; }; @@ -5363,7 +5255,6 @@ export type QueryAllHouseholdsArgs = { size_Gte?: InputMaybe; size_Lte?: InputMaybe; size_Range?: InputMaybe>>; - targetPopulations?: InputMaybe>>; withdrawn?: InputMaybe; }; @@ -5468,8 +5359,10 @@ export type QueryAllPaymentPlansArgs = { before?: InputMaybe; businessArea: Scalars['String']['input']; createdAtRange?: InputMaybe; + deliveryTypes?: InputMaybe>>; dispersionEndDate?: InputMaybe; dispersionStartDate?: InputMaybe; + endDate?: InputMaybe; first?: InputMaybe; isFollowUp?: InputMaybe; isPaymentPlan?: InputMaybe; @@ -5481,7 +5374,9 @@ export type QueryAllPaymentPlansArgs = { program?: InputMaybe; programCycle?: InputMaybe; search?: InputMaybe; + serviceProvider?: InputMaybe; sourcePaymentPlanId?: InputMaybe; + startDate?: InputMaybe; status?: InputMaybe>>; statusNot?: InputMaybe; totalEntitledQuantityFrom?: InputMaybe; @@ -5490,18 +5385,7 @@ export type QueryAllPaymentPlansArgs = { totalHouseholdsCountMin?: InputMaybe; totalHouseholdsCountWithValidPhoneNoMax?: InputMaybe; totalHouseholdsCountWithValidPhoneNoMin?: InputMaybe; -}; - - -export type QueryAllPaymentRecordsAndPaymentsArgs = { - after?: InputMaybe; - before?: InputMaybe; - businessArea: Scalars['String']['input']; - first?: InputMaybe; - household?: InputMaybe; - last?: InputMaybe; - orderBy?: InputMaybe; - program?: InputMaybe; + verificationStatus?: InputMaybe>>; }; @@ -5552,10 +5436,11 @@ export type QueryAllPaymentsArgs = { before?: InputMaybe; businessArea: Scalars['String']['input']; first?: InputMaybe; + householdId?: InputMaybe; last?: InputMaybe; offset?: InputMaybe; orderBy?: InputMaybe; - paymentPlanId: Scalars['String']['input']; + paymentPlanId?: InputMaybe; programId?: InputMaybe; }; @@ -7085,7 +6970,7 @@ export type TicketComplaintDetailsNode = Node & { id: Scalars['ID']['output']; individual?: Maybe; payment?: Maybe; - paymentRecord?: Maybe; + paymentRecord?: Maybe; updatedAt: Scalars['DateTime']['output']; }; @@ -7408,7 +7293,7 @@ export type TicketSensitiveDetailsNode = Node & { id: Scalars['ID']['output']; individual?: Maybe; payment?: Maybe; - paymentRecord?: Maybe; + paymentRecord?: Maybe; updatedAt: Scalars['DateTime']['output']; }; @@ -8079,7 +7964,7 @@ export type _TableTotalCashTransferredDataNode = { totalHouseholds?: Maybe; }; -export type GrievanceTicketDetailedFragment = { __typename?: 'GrievanceTicketNode', id: string, unicefId?: string | null, status: number, category: number, consent: boolean, targetId?: string | null, createdAt: any, updatedAt: any, description: string, language: string, admin?: string | null, area: string, adminUrl?: string | null, issueType?: number | null, priority?: number | null, urgency?: number | null, comments?: string | null, partner?: { __typename?: 'PartnerType', id: string, name: string } | null, businessArea: { __typename?: 'UserBusinessAreaNode', postponeDeduplication: boolean }, createdBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, pCode?: string | null } | null, assignedTo?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null, individual?: { __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, individual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string }, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null, household?: { __typename?: 'HouseholdNode', activeIndividualsCount?: number | null, countryOrigin?: string | null, country?: string | null, zipCode?: string | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, start?: any | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, address: string, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, id: string, status?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, residenceStatus?: string | null, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, totalCashReceivedUsd?: any | null, currency?: string | null, firstRegistrationDate: any, lastRegistrationDate: any, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unicefId?: string | null, unhcrId: string, geopoint?: any | null, village: string, adminAreaTitle?: string | null, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null, paymentRecord?: { __typename?: 'PaymentRecordAndPaymentNode', id?: string | null, unicefId?: string | null, deliveredQuantity?: number | null, entitlementQuantity?: number | null, objType?: string | null, parent?: { __typename?: 'CashPlanAndPaymentPlanNode', id?: string | null, unicefId?: string | null, objType?: string | null } | null, verification?: { __typename?: 'PaymentVerificationNode', id: string } | null } | null, relatedTickets?: Array<{ __typename?: 'GrievanceTicketNode', id: string, unicefId?: string | null, status: number, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null> | null, linkedTickets?: Array<{ __typename?: 'GrievanceTicketNode', id: string, unicefId?: string | null, category: number, status: number, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null> | null, existingTickets?: Array<{ __typename?: 'GrievanceTicketNode', id: string, category: number, unicefId?: string | null, status: number, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null> | null, addIndividualTicketDetails?: { __typename?: 'TicketAddIndividualDetailsNode', id: string, individualData?: any | null, approveStatus: boolean, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null, individualDataUpdateTicketDetails?: { __typename?: 'TicketIndividualDataUpdateDetailsNode', id: string, individualData?: any | null, roleReassignData: any, individual?: { __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null } | null, householdDataUpdateTicketDetails?: { __typename?: 'TicketHouseholdDataUpdateDetailsNode', id: string, householdData?: any | null, household?: { __typename?: 'HouseholdNode', activeIndividualsCount?: number | null, countryOrigin?: string | null, country?: string | null, zipCode?: string | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, start?: any | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, address: string, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, id: string, status?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, residenceStatus?: string | null, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, totalCashReceivedUsd?: any | null, currency?: string | null, firstRegistrationDate: any, lastRegistrationDate: any, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unicefId?: string | null, unhcrId: string, geopoint?: any | null, village: string, adminAreaTitle?: string | null, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null } | null, deleteIndividualTicketDetails?: { __typename?: 'TicketDeleteIndividualDetailsNode', id: string, roleReassignData: any, approveStatus: boolean } | null, deleteHouseholdTicketDetails?: { __typename?: 'TicketDeleteHouseholdDetailsNode', id: string, approveStatus: boolean, reasonHousehold?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null, systemFlaggingTicketDetails?: { __typename?: 'TicketSystemFlaggingDetailsNode', id: string, approveStatus: boolean, roleReassignData: any, goldenRecordsIndividual: { __typename?: 'IndividualNode', id: string, duplicate: boolean, fullName: string, birthDate: any, lastRegistrationDate: any, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, documentNumber: string, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null }, sanctionListIndividual: { __typename?: 'SanctionListIndividualNode', id: string, fullName: string, referenceNumber: string, datesOfBirth: { __typename?: 'SanctionListIndividualDateOfBirthNodeConnection', edges: Array<{ __typename?: 'SanctionListIndividualDateOfBirthNodeEdge', node?: { __typename?: 'SanctionListIndividualDateOfBirthNode', id: string, date: any } | null } | null> }, documents: { __typename?: 'SanctionListIndividualDocumentNodeConnection', edges: Array<{ __typename?: 'SanctionListIndividualDocumentNodeEdge', node?: { __typename?: 'SanctionListIndividualDocumentNode', id: string, documentNumber: string, typeOfDocument: string } | null } | null> } } } | null, paymentVerificationTicketDetails?: { __typename?: 'TicketPaymentVerificationDetailsNode', id: string, newStatus?: TicketPaymentVerificationDetailsNewStatus | null, oldReceivedAmount?: number | null, newReceivedAmount?: number | null, approveStatus: boolean, paymentVerificationStatus: TicketPaymentVerificationDetailsPaymentVerificationStatus, hasMultiplePaymentVerifications?: boolean | null, paymentVerification?: { __typename?: 'PaymentVerificationNode', id: string, receivedAmount?: number | null } | null, paymentVerifications: { __typename?: 'PaymentVerificationNodeConnection', edges: Array<{ __typename?: 'PaymentVerificationNodeEdge', node?: { __typename?: 'PaymentVerificationNode', id: string } | null } | null> } } | null, needsAdjudicationTicketDetails?: { __typename?: 'TicketNeedsAdjudicationDetailsNode', id: string, hasDuplicatedDocument?: boolean | null, isMultipleDuplicatesVersion: boolean, roleReassignData: any, extraData?: { __typename?: 'TicketNeedsAdjudicationDetailsExtraDataNode', goldenRecords?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null, possibleDuplicate?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null, dedupEngineSimilarityPair?: { __typename?: 'DeduplicationEngineSimilarityPairNode', similarityScore?: string | null, individual1?: { __typename?: 'DeduplicationEngineSimilarityPairIndividualNode', unicefId?: string | null, fullName?: string | null, photo?: string | null } | null, individual2?: { __typename?: 'DeduplicationEngineSimilarityPairIndividualNode', unicefId?: string | null, fullName?: string | null, photo?: string | null } | null } | null } | null, goldenRecordsIndividual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string, birthDate: any, lastRegistrationDate: any, sex: IndividualSex, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, village: string, admin2?: { __typename?: 'AreaNode', id: string, name: string } | null } | null, deduplicationGoldenRecordResults?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null }, possibleDuplicate?: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, lastRegistrationDate: any, fullName: string, birthDate: any, sex: IndividualSex, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', unicefId?: string | null, id: string, village: string, admin2?: { __typename?: 'AreaNode', id: string, name: string } | null } | null, deduplicationGoldenRecordResults?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null } | null, possibleDuplicates?: Array<{ __typename?: 'IndividualNode', id: string, unicefId?: string | null, lastRegistrationDate: any, fullName: string, birthDate: any, sex: IndividualSex, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', unicefId?: string | null, id: string, village: string, admin2?: { __typename?: 'AreaNode', id: string, name: string } | null } | null, deduplicationGoldenRecordResults?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null } | null> | null, selectedIndividual?: { __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, activeIndividualsCount?: number | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, currency?: string | null, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unhcrId: string, adminAreaTitle?: string | null, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, individual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string }, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null, selectedDuplicates?: Array<{ __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, activeIndividualsCount?: number | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, currency?: string | null, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unhcrId: string, adminAreaTitle?: string | null, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, individual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string }, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null> | null, selectedDistinct?: Array<{ __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, activeIndividualsCount?: number | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, currency?: string | null, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unhcrId: string, adminAreaTitle?: string | null, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, individual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string }, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null> | null } | null, ticketNotes: { __typename?: 'TicketNoteNodeConnection', edges: Array<{ __typename?: 'TicketNoteNodeEdge', node?: { __typename?: 'TicketNoteNode', id: string, createdAt: any, updatedAt: any, description: string, createdBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null } | null } | null> }, programs?: Array<{ __typename?: 'ProgramNode', name: string, id: string } | null> | null, documentation?: Array<{ __typename?: 'GrievanceDocumentNode', id: string, createdAt: any, updatedAt: any, name?: string | null, fileSize?: number | null, contentType: string, filePath?: string | null, fileName?: string | null, createdBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null } | null> | null }; +export type GrievanceTicketDetailedFragment = { __typename?: 'GrievanceTicketNode', id: string, unicefId?: string | null, status: number, category: number, consent: boolean, targetId?: string | null, createdAt: any, updatedAt: any, description: string, language: string, admin?: string | null, area: string, adminUrl?: string | null, issueType?: number | null, priority?: number | null, urgency?: number | null, comments?: string | null, partner?: { __typename?: 'PartnerType', id: string, name: string } | null, businessArea: { __typename?: 'UserBusinessAreaNode', postponeDeduplication: boolean }, createdBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, pCode?: string | null } | null, assignedTo?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null, individual?: { __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, individual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string }, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null, household?: { __typename?: 'HouseholdNode', activeIndividualsCount?: number | null, countryOrigin?: string | null, country?: string | null, zipCode?: string | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, start?: any | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, address: string, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, id: string, status?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, residenceStatus?: string | null, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, totalCashReceivedUsd?: any | null, currency?: string | null, firstRegistrationDate: any, lastRegistrationDate: any, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unicefId?: string | null, unhcrId: string, geopoint?: any | null, village: string, adminAreaTitle?: string | null, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null, paymentRecord?: { __typename?: 'PaymentNode', id: string, unicefId?: string | null, deliveredQuantity?: number | null, entitlementQuantity?: number | null, parent: { __typename?: 'PaymentPlanNode', id: string, unicefId?: string | null }, verification?: { __typename?: 'PaymentVerificationNode', id: string } | null } | null, relatedTickets?: Array<{ __typename?: 'GrievanceTicketNode', id: string, unicefId?: string | null, status: number, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null> | null, linkedTickets?: Array<{ __typename?: 'GrievanceTicketNode', id: string, unicefId?: string | null, category: number, status: number, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null> | null, existingTickets?: Array<{ __typename?: 'GrievanceTicketNode', id: string, category: number, unicefId?: string | null, status: number, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null> | null, addIndividualTicketDetails?: { __typename?: 'TicketAddIndividualDetailsNode', id: string, individualData?: any | null, approveStatus: boolean, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null, individualDataUpdateTicketDetails?: { __typename?: 'TicketIndividualDataUpdateDetailsNode', id: string, individualData?: any | null, roleReassignData: any, individual?: { __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null } | null, householdDataUpdateTicketDetails?: { __typename?: 'TicketHouseholdDataUpdateDetailsNode', id: string, householdData?: any | null, household?: { __typename?: 'HouseholdNode', activeIndividualsCount?: number | null, countryOrigin?: string | null, country?: string | null, zipCode?: string | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, start?: any | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, address: string, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, id: string, status?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, residenceStatus?: string | null, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, totalCashReceivedUsd?: any | null, currency?: string | null, firstRegistrationDate: any, lastRegistrationDate: any, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unicefId?: string | null, unhcrId: string, geopoint?: any | null, village: string, adminAreaTitle?: string | null, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null } | null, deleteIndividualTicketDetails?: { __typename?: 'TicketDeleteIndividualDetailsNode', id: string, roleReassignData: any, approveStatus: boolean } | null, deleteHouseholdTicketDetails?: { __typename?: 'TicketDeleteHouseholdDetailsNode', id: string, approveStatus: boolean, reasonHousehold?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null, systemFlaggingTicketDetails?: { __typename?: 'TicketSystemFlaggingDetailsNode', id: string, approveStatus: boolean, roleReassignData: any, goldenRecordsIndividual: { __typename?: 'IndividualNode', id: string, duplicate: boolean, fullName: string, birthDate: any, lastRegistrationDate: any, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, documentNumber: string, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null }, sanctionListIndividual: { __typename?: 'SanctionListIndividualNode', id: string, fullName: string, referenceNumber: string, datesOfBirth: { __typename?: 'SanctionListIndividualDateOfBirthNodeConnection', edges: Array<{ __typename?: 'SanctionListIndividualDateOfBirthNodeEdge', node?: { __typename?: 'SanctionListIndividualDateOfBirthNode', id: string, date: any } | null } | null> }, documents: { __typename?: 'SanctionListIndividualDocumentNodeConnection', edges: Array<{ __typename?: 'SanctionListIndividualDocumentNodeEdge', node?: { __typename?: 'SanctionListIndividualDocumentNode', id: string, documentNumber: string, typeOfDocument: string } | null } | null> } } } | null, paymentVerificationTicketDetails?: { __typename?: 'TicketPaymentVerificationDetailsNode', id: string, newStatus?: TicketPaymentVerificationDetailsNewStatus | null, oldReceivedAmount?: number | null, newReceivedAmount?: number | null, approveStatus: boolean, paymentVerificationStatus: TicketPaymentVerificationDetailsPaymentVerificationStatus, hasMultiplePaymentVerifications?: boolean | null, paymentVerification?: { __typename?: 'PaymentVerificationNode', id: string, receivedAmount?: number | null } | null, paymentVerifications: { __typename?: 'PaymentVerificationNodeConnection', edges: Array<{ __typename?: 'PaymentVerificationNodeEdge', node?: { __typename?: 'PaymentVerificationNode', id: string } | null } | null> } } | null, needsAdjudicationTicketDetails?: { __typename?: 'TicketNeedsAdjudicationDetailsNode', id: string, hasDuplicatedDocument?: boolean | null, isMultipleDuplicatesVersion: boolean, roleReassignData: any, extraData?: { __typename?: 'TicketNeedsAdjudicationDetailsExtraDataNode', goldenRecords?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null, possibleDuplicate?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null, dedupEngineSimilarityPair?: { __typename?: 'DeduplicationEngineSimilarityPairNode', similarityScore?: string | null, individual1?: { __typename?: 'DeduplicationEngineSimilarityPairIndividualNode', unicefId?: string | null, fullName?: string | null, photo?: string | null } | null, individual2?: { __typename?: 'DeduplicationEngineSimilarityPairIndividualNode', unicefId?: string | null, fullName?: string | null, photo?: string | null } | null } | null } | null, goldenRecordsIndividual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string, birthDate: any, lastRegistrationDate: any, sex: IndividualSex, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, village: string, admin2?: { __typename?: 'AreaNode', id: string, name: string } | null } | null, deduplicationGoldenRecordResults?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null }, possibleDuplicate?: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, lastRegistrationDate: any, fullName: string, birthDate: any, sex: IndividualSex, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', unicefId?: string | null, id: string, village: string, admin2?: { __typename?: 'AreaNode', id: string, name: string } | null } | null, deduplicationGoldenRecordResults?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null } | null, possibleDuplicates?: Array<{ __typename?: 'IndividualNode', id: string, unicefId?: string | null, lastRegistrationDate: any, fullName: string, birthDate: any, sex: IndividualSex, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', unicefId?: string | null, id: string, village: string, admin2?: { __typename?: 'AreaNode', id: string, name: string } | null } | null, deduplicationGoldenRecordResults?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null } | null> | null, selectedIndividual?: { __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, activeIndividualsCount?: number | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, currency?: string | null, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unhcrId: string, adminAreaTitle?: string | null, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, individual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string }, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null, selectedDuplicates?: Array<{ __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, activeIndividualsCount?: number | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, currency?: string | null, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unhcrId: string, adminAreaTitle?: string | null, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, individual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string }, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null> | null, selectedDistinct?: Array<{ __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, activeIndividualsCount?: number | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, currency?: string | null, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unhcrId: string, adminAreaTitle?: string | null, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, individual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string }, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null> | null } | null, ticketNotes: { __typename?: 'TicketNoteNodeConnection', edges: Array<{ __typename?: 'TicketNoteNodeEdge', node?: { __typename?: 'TicketNoteNode', id: string, createdAt: any, updatedAt: any, description: string, createdBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null } | null } | null> }, programs?: Array<{ __typename?: 'ProgramNode', name: string, id: string } | null> | null, documentation?: Array<{ __typename?: 'GrievanceDocumentNode', id: string, createdAt: any, updatedAt: any, name?: string | null, fileSize?: number | null, contentType: string, filePath?: string | null, fileName?: string | null, createdBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null } | null> | null }; export type HouseholdMinimalFragment = { __typename?: 'HouseholdNode', id: string, status?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, residenceStatus?: string | null, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, totalCashReceivedUsd?: any | null, currency?: string | null, firstRegistrationDate: any, lastRegistrationDate: any, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unicefId?: string | null, flexFields?: any | null, unhcrId: string, geopoint?: any | null, village: string, adminAreaTitle?: string | null, address: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } }; @@ -8286,7 +8171,7 @@ export type GrievanceTicketStatusChangeMutationVariables = Exact<{ }>; -export type GrievanceTicketStatusChangeMutation = { __typename?: 'Mutations', grievanceStatusChange?: { __typename?: 'GrievanceStatusChangeMutation', grievanceTicket?: { __typename?: 'GrievanceTicketNode', id: string, unicefId?: string | null, status: number, category: number, consent: boolean, targetId?: string | null, createdAt: any, updatedAt: any, description: string, language: string, admin?: string | null, area: string, adminUrl?: string | null, issueType?: number | null, priority?: number | null, urgency?: number | null, comments?: string | null, partner?: { __typename?: 'PartnerType', id: string, name: string } | null, businessArea: { __typename?: 'UserBusinessAreaNode', postponeDeduplication: boolean }, createdBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, pCode?: string | null } | null, assignedTo?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null, individual?: { __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, individual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string }, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null, household?: { __typename?: 'HouseholdNode', activeIndividualsCount?: number | null, countryOrigin?: string | null, country?: string | null, zipCode?: string | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, start?: any | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, address: string, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, id: string, status?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, residenceStatus?: string | null, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, totalCashReceivedUsd?: any | null, currency?: string | null, firstRegistrationDate: any, lastRegistrationDate: any, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unicefId?: string | null, unhcrId: string, geopoint?: any | null, village: string, adminAreaTitle?: string | null, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null, paymentRecord?: { __typename?: 'PaymentRecordAndPaymentNode', id?: string | null, unicefId?: string | null, deliveredQuantity?: number | null, entitlementQuantity?: number | null, objType?: string | null, parent?: { __typename?: 'CashPlanAndPaymentPlanNode', id?: string | null, unicefId?: string | null, objType?: string | null } | null, verification?: { __typename?: 'PaymentVerificationNode', id: string } | null } | null, relatedTickets?: Array<{ __typename?: 'GrievanceTicketNode', id: string, unicefId?: string | null, status: number, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null> | null, linkedTickets?: Array<{ __typename?: 'GrievanceTicketNode', id: string, unicefId?: string | null, category: number, status: number, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null> | null, existingTickets?: Array<{ __typename?: 'GrievanceTicketNode', id: string, category: number, unicefId?: string | null, status: number, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null> | null, addIndividualTicketDetails?: { __typename?: 'TicketAddIndividualDetailsNode', id: string, individualData?: any | null, approveStatus: boolean, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null, individualDataUpdateTicketDetails?: { __typename?: 'TicketIndividualDataUpdateDetailsNode', id: string, individualData?: any | null, roleReassignData: any, individual?: { __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null } | null, householdDataUpdateTicketDetails?: { __typename?: 'TicketHouseholdDataUpdateDetailsNode', id: string, householdData?: any | null, household?: { __typename?: 'HouseholdNode', activeIndividualsCount?: number | null, countryOrigin?: string | null, country?: string | null, zipCode?: string | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, start?: any | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, address: string, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, id: string, status?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, residenceStatus?: string | null, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, totalCashReceivedUsd?: any | null, currency?: string | null, firstRegistrationDate: any, lastRegistrationDate: any, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unicefId?: string | null, unhcrId: string, geopoint?: any | null, village: string, adminAreaTitle?: string | null, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null } | null, deleteIndividualTicketDetails?: { __typename?: 'TicketDeleteIndividualDetailsNode', id: string, roleReassignData: any, approveStatus: boolean } | null, deleteHouseholdTicketDetails?: { __typename?: 'TicketDeleteHouseholdDetailsNode', id: string, approveStatus: boolean, reasonHousehold?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null, systemFlaggingTicketDetails?: { __typename?: 'TicketSystemFlaggingDetailsNode', id: string, approveStatus: boolean, roleReassignData: any, goldenRecordsIndividual: { __typename?: 'IndividualNode', id: string, duplicate: boolean, fullName: string, birthDate: any, lastRegistrationDate: any, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, documentNumber: string, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null }, sanctionListIndividual: { __typename?: 'SanctionListIndividualNode', id: string, fullName: string, referenceNumber: string, datesOfBirth: { __typename?: 'SanctionListIndividualDateOfBirthNodeConnection', edges: Array<{ __typename?: 'SanctionListIndividualDateOfBirthNodeEdge', node?: { __typename?: 'SanctionListIndividualDateOfBirthNode', id: string, date: any } | null } | null> }, documents: { __typename?: 'SanctionListIndividualDocumentNodeConnection', edges: Array<{ __typename?: 'SanctionListIndividualDocumentNodeEdge', node?: { __typename?: 'SanctionListIndividualDocumentNode', id: string, documentNumber: string, typeOfDocument: string } | null } | null> } } } | null, paymentVerificationTicketDetails?: { __typename?: 'TicketPaymentVerificationDetailsNode', id: string, newStatus?: TicketPaymentVerificationDetailsNewStatus | null, oldReceivedAmount?: number | null, newReceivedAmount?: number | null, approveStatus: boolean, paymentVerificationStatus: TicketPaymentVerificationDetailsPaymentVerificationStatus, hasMultiplePaymentVerifications?: boolean | null, paymentVerification?: { __typename?: 'PaymentVerificationNode', id: string, receivedAmount?: number | null } | null, paymentVerifications: { __typename?: 'PaymentVerificationNodeConnection', edges: Array<{ __typename?: 'PaymentVerificationNodeEdge', node?: { __typename?: 'PaymentVerificationNode', id: string } | null } | null> } } | null, needsAdjudicationTicketDetails?: { __typename?: 'TicketNeedsAdjudicationDetailsNode', id: string, hasDuplicatedDocument?: boolean | null, isMultipleDuplicatesVersion: boolean, roleReassignData: any, extraData?: { __typename?: 'TicketNeedsAdjudicationDetailsExtraDataNode', goldenRecords?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null, possibleDuplicate?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null, dedupEngineSimilarityPair?: { __typename?: 'DeduplicationEngineSimilarityPairNode', similarityScore?: string | null, individual1?: { __typename?: 'DeduplicationEngineSimilarityPairIndividualNode', unicefId?: string | null, fullName?: string | null, photo?: string | null } | null, individual2?: { __typename?: 'DeduplicationEngineSimilarityPairIndividualNode', unicefId?: string | null, fullName?: string | null, photo?: string | null } | null } | null } | null, goldenRecordsIndividual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string, birthDate: any, lastRegistrationDate: any, sex: IndividualSex, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, village: string, admin2?: { __typename?: 'AreaNode', id: string, name: string } | null } | null, deduplicationGoldenRecordResults?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null }, possibleDuplicate?: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, lastRegistrationDate: any, fullName: string, birthDate: any, sex: IndividualSex, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', unicefId?: string | null, id: string, village: string, admin2?: { __typename?: 'AreaNode', id: string, name: string } | null } | null, deduplicationGoldenRecordResults?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null } | null, possibleDuplicates?: Array<{ __typename?: 'IndividualNode', id: string, unicefId?: string | null, lastRegistrationDate: any, fullName: string, birthDate: any, sex: IndividualSex, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', unicefId?: string | null, id: string, village: string, admin2?: { __typename?: 'AreaNode', id: string, name: string } | null } | null, deduplicationGoldenRecordResults?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null } | null> | null, selectedIndividual?: { __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, activeIndividualsCount?: number | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, currency?: string | null, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unhcrId: string, adminAreaTitle?: string | null, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, individual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string }, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null, selectedDuplicates?: Array<{ __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, activeIndividualsCount?: number | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, currency?: string | null, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unhcrId: string, adminAreaTitle?: string | null, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, individual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string }, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null> | null, selectedDistinct?: Array<{ __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, activeIndividualsCount?: number | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, currency?: string | null, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unhcrId: string, adminAreaTitle?: string | null, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, individual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string }, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null> | null } | null, ticketNotes: { __typename?: 'TicketNoteNodeConnection', edges: Array<{ __typename?: 'TicketNoteNodeEdge', node?: { __typename?: 'TicketNoteNode', id: string, createdAt: any, updatedAt: any, description: string, createdBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null } | null } | null> }, programs?: Array<{ __typename?: 'ProgramNode', name: string, id: string } | null> | null, documentation?: Array<{ __typename?: 'GrievanceDocumentNode', id: string, createdAt: any, updatedAt: any, name?: string | null, fileSize?: number | null, contentType: string, filePath?: string | null, fileName?: string | null, createdBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null } | null> | null } | null } | null }; +export type GrievanceTicketStatusChangeMutation = { __typename?: 'Mutations', grievanceStatusChange?: { __typename?: 'GrievanceStatusChangeMutation', grievanceTicket?: { __typename?: 'GrievanceTicketNode', id: string, unicefId?: string | null, status: number, category: number, consent: boolean, targetId?: string | null, createdAt: any, updatedAt: any, description: string, language: string, admin?: string | null, area: string, adminUrl?: string | null, issueType?: number | null, priority?: number | null, urgency?: number | null, comments?: string | null, partner?: { __typename?: 'PartnerType', id: string, name: string } | null, businessArea: { __typename?: 'UserBusinessAreaNode', postponeDeduplication: boolean }, createdBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, pCode?: string | null } | null, assignedTo?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null, individual?: { __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, individual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string }, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null, household?: { __typename?: 'HouseholdNode', activeIndividualsCount?: number | null, countryOrigin?: string | null, country?: string | null, zipCode?: string | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, start?: any | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, address: string, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, id: string, status?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, residenceStatus?: string | null, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, totalCashReceivedUsd?: any | null, currency?: string | null, firstRegistrationDate: any, lastRegistrationDate: any, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unicefId?: string | null, unhcrId: string, geopoint?: any | null, village: string, adminAreaTitle?: string | null, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null, paymentRecord?: { __typename?: 'PaymentNode', id: string, unicefId?: string | null, deliveredQuantity?: number | null, entitlementQuantity?: number | null, parent: { __typename?: 'PaymentPlanNode', id: string, unicefId?: string | null }, verification?: { __typename?: 'PaymentVerificationNode', id: string } | null } | null, relatedTickets?: Array<{ __typename?: 'GrievanceTicketNode', id: string, unicefId?: string | null, status: number, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null> | null, linkedTickets?: Array<{ __typename?: 'GrievanceTicketNode', id: string, unicefId?: string | null, category: number, status: number, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null> | null, existingTickets?: Array<{ __typename?: 'GrievanceTicketNode', id: string, category: number, unicefId?: string | null, status: number, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null> | null, addIndividualTicketDetails?: { __typename?: 'TicketAddIndividualDetailsNode', id: string, individualData?: any | null, approveStatus: boolean, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null, individualDataUpdateTicketDetails?: { __typename?: 'TicketIndividualDataUpdateDetailsNode', id: string, individualData?: any | null, roleReassignData: any, individual?: { __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null } | null, householdDataUpdateTicketDetails?: { __typename?: 'TicketHouseholdDataUpdateDetailsNode', id: string, householdData?: any | null, household?: { __typename?: 'HouseholdNode', activeIndividualsCount?: number | null, countryOrigin?: string | null, country?: string | null, zipCode?: string | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, start?: any | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, address: string, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, id: string, status?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, residenceStatus?: string | null, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, totalCashReceivedUsd?: any | null, currency?: string | null, firstRegistrationDate: any, lastRegistrationDate: any, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unicefId?: string | null, unhcrId: string, geopoint?: any | null, village: string, adminAreaTitle?: string | null, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null } | null, deleteIndividualTicketDetails?: { __typename?: 'TicketDeleteIndividualDetailsNode', id: string, roleReassignData: any, approveStatus: boolean } | null, deleteHouseholdTicketDetails?: { __typename?: 'TicketDeleteHouseholdDetailsNode', id: string, approveStatus: boolean, reasonHousehold?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null, systemFlaggingTicketDetails?: { __typename?: 'TicketSystemFlaggingDetailsNode', id: string, approveStatus: boolean, roleReassignData: any, goldenRecordsIndividual: { __typename?: 'IndividualNode', id: string, duplicate: boolean, fullName: string, birthDate: any, lastRegistrationDate: any, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, documentNumber: string, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null }, sanctionListIndividual: { __typename?: 'SanctionListIndividualNode', id: string, fullName: string, referenceNumber: string, datesOfBirth: { __typename?: 'SanctionListIndividualDateOfBirthNodeConnection', edges: Array<{ __typename?: 'SanctionListIndividualDateOfBirthNodeEdge', node?: { __typename?: 'SanctionListIndividualDateOfBirthNode', id: string, date: any } | null } | null> }, documents: { __typename?: 'SanctionListIndividualDocumentNodeConnection', edges: Array<{ __typename?: 'SanctionListIndividualDocumentNodeEdge', node?: { __typename?: 'SanctionListIndividualDocumentNode', id: string, documentNumber: string, typeOfDocument: string } | null } | null> } } } | null, paymentVerificationTicketDetails?: { __typename?: 'TicketPaymentVerificationDetailsNode', id: string, newStatus?: TicketPaymentVerificationDetailsNewStatus | null, oldReceivedAmount?: number | null, newReceivedAmount?: number | null, approveStatus: boolean, paymentVerificationStatus: TicketPaymentVerificationDetailsPaymentVerificationStatus, hasMultiplePaymentVerifications?: boolean | null, paymentVerification?: { __typename?: 'PaymentVerificationNode', id: string, receivedAmount?: number | null } | null, paymentVerifications: { __typename?: 'PaymentVerificationNodeConnection', edges: Array<{ __typename?: 'PaymentVerificationNodeEdge', node?: { __typename?: 'PaymentVerificationNode', id: string } | null } | null> } } | null, needsAdjudicationTicketDetails?: { __typename?: 'TicketNeedsAdjudicationDetailsNode', id: string, hasDuplicatedDocument?: boolean | null, isMultipleDuplicatesVersion: boolean, roleReassignData: any, extraData?: { __typename?: 'TicketNeedsAdjudicationDetailsExtraDataNode', goldenRecords?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null, possibleDuplicate?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null, dedupEngineSimilarityPair?: { __typename?: 'DeduplicationEngineSimilarityPairNode', similarityScore?: string | null, individual1?: { __typename?: 'DeduplicationEngineSimilarityPairIndividualNode', unicefId?: string | null, fullName?: string | null, photo?: string | null } | null, individual2?: { __typename?: 'DeduplicationEngineSimilarityPairIndividualNode', unicefId?: string | null, fullName?: string | null, photo?: string | null } | null } | null } | null, goldenRecordsIndividual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string, birthDate: any, lastRegistrationDate: any, sex: IndividualSex, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, village: string, admin2?: { __typename?: 'AreaNode', id: string, name: string } | null } | null, deduplicationGoldenRecordResults?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null }, possibleDuplicate?: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, lastRegistrationDate: any, fullName: string, birthDate: any, sex: IndividualSex, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', unicefId?: string | null, id: string, village: string, admin2?: { __typename?: 'AreaNode', id: string, name: string } | null } | null, deduplicationGoldenRecordResults?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null } | null, possibleDuplicates?: Array<{ __typename?: 'IndividualNode', id: string, unicefId?: string | null, lastRegistrationDate: any, fullName: string, birthDate: any, sex: IndividualSex, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', unicefId?: string | null, id: string, village: string, admin2?: { __typename?: 'AreaNode', id: string, name: string } | null } | null, deduplicationGoldenRecordResults?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null } | null> | null, selectedIndividual?: { __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, activeIndividualsCount?: number | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, currency?: string | null, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unhcrId: string, adminAreaTitle?: string | null, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, individual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string }, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null, selectedDuplicates?: Array<{ __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, activeIndividualsCount?: number | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, currency?: string | null, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unhcrId: string, adminAreaTitle?: string | null, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, individual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string }, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null> | null, selectedDistinct?: Array<{ __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, activeIndividualsCount?: number | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, currency?: string | null, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unhcrId: string, adminAreaTitle?: string | null, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, individual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string }, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null> | null } | null, ticketNotes: { __typename?: 'TicketNoteNodeConnection', edges: Array<{ __typename?: 'TicketNoteNodeEdge', node?: { __typename?: 'TicketNoteNode', id: string, createdAt: any, updatedAt: any, description: string, createdBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null } | null } | null> }, programs?: Array<{ __typename?: 'ProgramNode', name: string, id: string } | null> | null, documentation?: Array<{ __typename?: 'GrievanceDocumentNode', id: string, createdAt: any, updatedAt: any, name?: string | null, fileSize?: number | null, contentType: string, filePath?: string | null, fileName?: string | null, createdBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null } | null> | null } | null } | null }; export type ReassignRoleGrievanceMutationVariables = Exact<{ grievanceTicketId: Scalars['ID']['input']; @@ -9036,7 +8921,7 @@ export type GrievanceTicketQueryVariables = Exact<{ }>; -export type GrievanceTicketQuery = { __typename?: 'Query', grievanceTicket?: { __typename?: 'GrievanceTicketNode', id: string, unicefId?: string | null, status: number, category: number, consent: boolean, targetId?: string | null, createdAt: any, updatedAt: any, description: string, language: string, admin?: string | null, area: string, adminUrl?: string | null, issueType?: number | null, priority?: number | null, urgency?: number | null, comments?: string | null, partner?: { __typename?: 'PartnerType', id: string, name: string } | null, businessArea: { __typename?: 'UserBusinessAreaNode', postponeDeduplication: boolean }, createdBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, pCode?: string | null } | null, assignedTo?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null, individual?: { __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, individual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string }, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null, household?: { __typename?: 'HouseholdNode', activeIndividualsCount?: number | null, countryOrigin?: string | null, country?: string | null, zipCode?: string | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, start?: any | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, address: string, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, id: string, status?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, residenceStatus?: string | null, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, totalCashReceivedUsd?: any | null, currency?: string | null, firstRegistrationDate: any, lastRegistrationDate: any, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unicefId?: string | null, unhcrId: string, geopoint?: any | null, village: string, adminAreaTitle?: string | null, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null, paymentRecord?: { __typename?: 'PaymentRecordAndPaymentNode', id?: string | null, unicefId?: string | null, deliveredQuantity?: number | null, entitlementQuantity?: number | null, objType?: string | null, parent?: { __typename?: 'CashPlanAndPaymentPlanNode', id?: string | null, unicefId?: string | null, objType?: string | null } | null, verification?: { __typename?: 'PaymentVerificationNode', id: string } | null } | null, relatedTickets?: Array<{ __typename?: 'GrievanceTicketNode', id: string, unicefId?: string | null, status: number, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null> | null, linkedTickets?: Array<{ __typename?: 'GrievanceTicketNode', id: string, unicefId?: string | null, category: number, status: number, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null> | null, existingTickets?: Array<{ __typename?: 'GrievanceTicketNode', id: string, category: number, unicefId?: string | null, status: number, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null> | null, addIndividualTicketDetails?: { __typename?: 'TicketAddIndividualDetailsNode', id: string, individualData?: any | null, approveStatus: boolean, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null, individualDataUpdateTicketDetails?: { __typename?: 'TicketIndividualDataUpdateDetailsNode', id: string, individualData?: any | null, roleReassignData: any, individual?: { __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null } | null, householdDataUpdateTicketDetails?: { __typename?: 'TicketHouseholdDataUpdateDetailsNode', id: string, householdData?: any | null, household?: { __typename?: 'HouseholdNode', activeIndividualsCount?: number | null, countryOrigin?: string | null, country?: string | null, zipCode?: string | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, start?: any | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, address: string, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, id: string, status?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, residenceStatus?: string | null, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, totalCashReceivedUsd?: any | null, currency?: string | null, firstRegistrationDate: any, lastRegistrationDate: any, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unicefId?: string | null, unhcrId: string, geopoint?: any | null, village: string, adminAreaTitle?: string | null, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null } | null, deleteIndividualTicketDetails?: { __typename?: 'TicketDeleteIndividualDetailsNode', id: string, roleReassignData: any, approveStatus: boolean } | null, deleteHouseholdTicketDetails?: { __typename?: 'TicketDeleteHouseholdDetailsNode', id: string, approveStatus: boolean, reasonHousehold?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null, systemFlaggingTicketDetails?: { __typename?: 'TicketSystemFlaggingDetailsNode', id: string, approveStatus: boolean, roleReassignData: any, goldenRecordsIndividual: { __typename?: 'IndividualNode', id: string, duplicate: boolean, fullName: string, birthDate: any, lastRegistrationDate: any, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, documentNumber: string, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null }, sanctionListIndividual: { __typename?: 'SanctionListIndividualNode', id: string, fullName: string, referenceNumber: string, datesOfBirth: { __typename?: 'SanctionListIndividualDateOfBirthNodeConnection', edges: Array<{ __typename?: 'SanctionListIndividualDateOfBirthNodeEdge', node?: { __typename?: 'SanctionListIndividualDateOfBirthNode', id: string, date: any } | null } | null> }, documents: { __typename?: 'SanctionListIndividualDocumentNodeConnection', edges: Array<{ __typename?: 'SanctionListIndividualDocumentNodeEdge', node?: { __typename?: 'SanctionListIndividualDocumentNode', id: string, documentNumber: string, typeOfDocument: string } | null } | null> } } } | null, paymentVerificationTicketDetails?: { __typename?: 'TicketPaymentVerificationDetailsNode', id: string, newStatus?: TicketPaymentVerificationDetailsNewStatus | null, oldReceivedAmount?: number | null, newReceivedAmount?: number | null, approveStatus: boolean, paymentVerificationStatus: TicketPaymentVerificationDetailsPaymentVerificationStatus, hasMultiplePaymentVerifications?: boolean | null, paymentVerification?: { __typename?: 'PaymentVerificationNode', id: string, receivedAmount?: number | null } | null, paymentVerifications: { __typename?: 'PaymentVerificationNodeConnection', edges: Array<{ __typename?: 'PaymentVerificationNodeEdge', node?: { __typename?: 'PaymentVerificationNode', id: string } | null } | null> } } | null, needsAdjudicationTicketDetails?: { __typename?: 'TicketNeedsAdjudicationDetailsNode', id: string, hasDuplicatedDocument?: boolean | null, isMultipleDuplicatesVersion: boolean, roleReassignData: any, extraData?: { __typename?: 'TicketNeedsAdjudicationDetailsExtraDataNode', goldenRecords?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null, possibleDuplicate?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null, dedupEngineSimilarityPair?: { __typename?: 'DeduplicationEngineSimilarityPairNode', similarityScore?: string | null, individual1?: { __typename?: 'DeduplicationEngineSimilarityPairIndividualNode', unicefId?: string | null, fullName?: string | null, photo?: string | null } | null, individual2?: { __typename?: 'DeduplicationEngineSimilarityPairIndividualNode', unicefId?: string | null, fullName?: string | null, photo?: string | null } | null } | null } | null, goldenRecordsIndividual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string, birthDate: any, lastRegistrationDate: any, sex: IndividualSex, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, village: string, admin2?: { __typename?: 'AreaNode', id: string, name: string } | null } | null, deduplicationGoldenRecordResults?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null }, possibleDuplicate?: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, lastRegistrationDate: any, fullName: string, birthDate: any, sex: IndividualSex, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', unicefId?: string | null, id: string, village: string, admin2?: { __typename?: 'AreaNode', id: string, name: string } | null } | null, deduplicationGoldenRecordResults?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null } | null, possibleDuplicates?: Array<{ __typename?: 'IndividualNode', id: string, unicefId?: string | null, lastRegistrationDate: any, fullName: string, birthDate: any, sex: IndividualSex, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', unicefId?: string | null, id: string, village: string, admin2?: { __typename?: 'AreaNode', id: string, name: string } | null } | null, deduplicationGoldenRecordResults?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null } | null> | null, selectedIndividual?: { __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, activeIndividualsCount?: number | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, currency?: string | null, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unhcrId: string, adminAreaTitle?: string | null, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, individual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string }, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null, selectedDuplicates?: Array<{ __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, activeIndividualsCount?: number | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, currency?: string | null, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unhcrId: string, adminAreaTitle?: string | null, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, individual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string }, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null> | null, selectedDistinct?: Array<{ __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, activeIndividualsCount?: number | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, currency?: string | null, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unhcrId: string, adminAreaTitle?: string | null, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, individual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string }, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null> | null } | null, ticketNotes: { __typename?: 'TicketNoteNodeConnection', edges: Array<{ __typename?: 'TicketNoteNodeEdge', node?: { __typename?: 'TicketNoteNode', id: string, createdAt: any, updatedAt: any, description: string, createdBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null } | null } | null> }, programs?: Array<{ __typename?: 'ProgramNode', name: string, id: string } | null> | null, documentation?: Array<{ __typename?: 'GrievanceDocumentNode', id: string, createdAt: any, updatedAt: any, name?: string | null, fileSize?: number | null, contentType: string, filePath?: string | null, fileName?: string | null, createdBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null } | null> | null } | null }; +export type GrievanceTicketQuery = { __typename?: 'Query', grievanceTicket?: { __typename?: 'GrievanceTicketNode', id: string, unicefId?: string | null, status: number, category: number, consent: boolean, targetId?: string | null, createdAt: any, updatedAt: any, description: string, language: string, admin?: string | null, area: string, adminUrl?: string | null, issueType?: number | null, priority?: number | null, urgency?: number | null, comments?: string | null, partner?: { __typename?: 'PartnerType', id: string, name: string } | null, businessArea: { __typename?: 'UserBusinessAreaNode', postponeDeduplication: boolean }, createdBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, pCode?: string | null } | null, assignedTo?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null, individual?: { __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, individual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string }, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null, household?: { __typename?: 'HouseholdNode', activeIndividualsCount?: number | null, countryOrigin?: string | null, country?: string | null, zipCode?: string | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, start?: any | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, address: string, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, id: string, status?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, residenceStatus?: string | null, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, totalCashReceivedUsd?: any | null, currency?: string | null, firstRegistrationDate: any, lastRegistrationDate: any, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unicefId?: string | null, unhcrId: string, geopoint?: any | null, village: string, adminAreaTitle?: string | null, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null, paymentRecord?: { __typename?: 'PaymentNode', id: string, unicefId?: string | null, deliveredQuantity?: number | null, entitlementQuantity?: number | null, parent: { __typename?: 'PaymentPlanNode', id: string, unicefId?: string | null }, verification?: { __typename?: 'PaymentVerificationNode', id: string } | null } | null, relatedTickets?: Array<{ __typename?: 'GrievanceTicketNode', id: string, unicefId?: string | null, status: number, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null> | null, linkedTickets?: Array<{ __typename?: 'GrievanceTicketNode', id: string, unicefId?: string | null, category: number, status: number, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null> | null, existingTickets?: Array<{ __typename?: 'GrievanceTicketNode', id: string, category: number, unicefId?: string | null, status: number, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null> | null, addIndividualTicketDetails?: { __typename?: 'TicketAddIndividualDetailsNode', id: string, individualData?: any | null, approveStatus: boolean, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null, individualDataUpdateTicketDetails?: { __typename?: 'TicketIndividualDataUpdateDetailsNode', id: string, individualData?: any | null, roleReassignData: any, individual?: { __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null } | null, householdDataUpdateTicketDetails?: { __typename?: 'TicketHouseholdDataUpdateDetailsNode', id: string, householdData?: any | null, household?: { __typename?: 'HouseholdNode', activeIndividualsCount?: number | null, countryOrigin?: string | null, country?: string | null, zipCode?: string | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, start?: any | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, address: string, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, id: string, status?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, residenceStatus?: string | null, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, totalCashReceivedUsd?: any | null, currency?: string | null, firstRegistrationDate: any, lastRegistrationDate: any, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unicefId?: string | null, unhcrId: string, geopoint?: any | null, village: string, adminAreaTitle?: string | null, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null } | null, deleteIndividualTicketDetails?: { __typename?: 'TicketDeleteIndividualDetailsNode', id: string, roleReassignData: any, approveStatus: boolean } | null, deleteHouseholdTicketDetails?: { __typename?: 'TicketDeleteHouseholdDetailsNode', id: string, approveStatus: boolean, reasonHousehold?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null } | null, systemFlaggingTicketDetails?: { __typename?: 'TicketSystemFlaggingDetailsNode', id: string, approveStatus: boolean, roleReassignData: any, goldenRecordsIndividual: { __typename?: 'IndividualNode', id: string, duplicate: boolean, fullName: string, birthDate: any, lastRegistrationDate: any, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, documentNumber: string, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null }, sanctionListIndividual: { __typename?: 'SanctionListIndividualNode', id: string, fullName: string, referenceNumber: string, datesOfBirth: { __typename?: 'SanctionListIndividualDateOfBirthNodeConnection', edges: Array<{ __typename?: 'SanctionListIndividualDateOfBirthNodeEdge', node?: { __typename?: 'SanctionListIndividualDateOfBirthNode', id: string, date: any } | null } | null> }, documents: { __typename?: 'SanctionListIndividualDocumentNodeConnection', edges: Array<{ __typename?: 'SanctionListIndividualDocumentNodeEdge', node?: { __typename?: 'SanctionListIndividualDocumentNode', id: string, documentNumber: string, typeOfDocument: string } | null } | null> } } } | null, paymentVerificationTicketDetails?: { __typename?: 'TicketPaymentVerificationDetailsNode', id: string, newStatus?: TicketPaymentVerificationDetailsNewStatus | null, oldReceivedAmount?: number | null, newReceivedAmount?: number | null, approveStatus: boolean, paymentVerificationStatus: TicketPaymentVerificationDetailsPaymentVerificationStatus, hasMultiplePaymentVerifications?: boolean | null, paymentVerification?: { __typename?: 'PaymentVerificationNode', id: string, receivedAmount?: number | null } | null, paymentVerifications: { __typename?: 'PaymentVerificationNodeConnection', edges: Array<{ __typename?: 'PaymentVerificationNodeEdge', node?: { __typename?: 'PaymentVerificationNode', id: string } | null } | null> } } | null, needsAdjudicationTicketDetails?: { __typename?: 'TicketNeedsAdjudicationDetailsNode', id: string, hasDuplicatedDocument?: boolean | null, isMultipleDuplicatesVersion: boolean, roleReassignData: any, extraData?: { __typename?: 'TicketNeedsAdjudicationDetailsExtraDataNode', goldenRecords?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null, possibleDuplicate?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null, dedupEngineSimilarityPair?: { __typename?: 'DeduplicationEngineSimilarityPairNode', similarityScore?: string | null, individual1?: { __typename?: 'DeduplicationEngineSimilarityPairIndividualNode', unicefId?: string | null, fullName?: string | null, photo?: string | null } | null, individual2?: { __typename?: 'DeduplicationEngineSimilarityPairIndividualNode', unicefId?: string | null, fullName?: string | null, photo?: string | null } | null } | null } | null, goldenRecordsIndividual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string, birthDate: any, lastRegistrationDate: any, sex: IndividualSex, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, village: string, admin2?: { __typename?: 'AreaNode', id: string, name: string } | null } | null, deduplicationGoldenRecordResults?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null }, possibleDuplicate?: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, lastRegistrationDate: any, fullName: string, birthDate: any, sex: IndividualSex, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', unicefId?: string | null, id: string, village: string, admin2?: { __typename?: 'AreaNode', id: string, name: string } | null } | null, deduplicationGoldenRecordResults?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null } | null, possibleDuplicates?: Array<{ __typename?: 'IndividualNode', id: string, unicefId?: string | null, lastRegistrationDate: any, fullName: string, birthDate: any, sex: IndividualSex, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', unicefId?: string | null, id: string, village: string, admin2?: { __typename?: 'AreaNode', id: string, name: string } | null } | null, deduplicationGoldenRecordResults?: Array<{ __typename?: 'DeduplicationResultNode', hitId?: string | null, proximityToScore?: number | null, score?: number | null } | null> | null } | null> | null, selectedIndividual?: { __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, activeIndividualsCount?: number | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, currency?: string | null, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unhcrId: string, adminAreaTitle?: string | null, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, individual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string }, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null, selectedDuplicates?: Array<{ __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, activeIndividualsCount?: number | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, currency?: string | null, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unhcrId: string, adminAreaTitle?: string | null, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, individual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string }, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null> | null, selectedDistinct?: Array<{ __typename?: 'IndividualNode', givenName: string, familyName: string, estimatedBirthDate?: boolean | null, pregnant?: boolean | null, lastSyncAt?: any | null, deduplicationBatchStatus: IndividualDeduplicationBatchStatus, disability: IndividualDisability, commsDisability: string, firstRegistrationDate: any, whoAnswersAltPhone: string, memoryDisability: string, middleName: string, whoAnswersPhone: string, phoneNoAlternative: string, phoneNoAlternativeValid?: boolean | null, email?: string | null, hearingDisability: string, observedDisability?: Array | null, individualId: string, seeingDisability: string, physicalDisability: string, selfcareDisability: string, photo?: string | null, workStatus: string, enrolledInNutritionProgramme?: boolean | null, administrationOfRutf?: boolean | null, flexFields?: any | null, preferredLanguage?: string | null, paymentDeliveryPhoneNo?: string | null, walletName: string, walletAddress: string, blockchainName: string, importId?: string | null, id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, household?: { __typename?: 'HouseholdNode', status?: string | null, id: string, residenceStatus?: string | null, address: string, village: string, zipCode?: string | null, geopoint?: any | null, country?: string | null, countryOrigin?: string | null, unicefId?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, activeIndividualsCount?: number | null, femaleAgeGroup05Count?: number | null, femaleAgeGroup611Count?: number | null, femaleAgeGroup1217Count?: number | null, femaleAgeGroup1859Count?: number | null, femaleAgeGroup60Count?: number | null, pregnantCount?: number | null, maleAgeGroup05Count?: number | null, maleAgeGroup611Count?: number | null, maleAgeGroup1217Count?: number | null, maleAgeGroup1859Count?: number | null, maleAgeGroup60Count?: number | null, femaleAgeGroup05DisabledCount?: number | null, femaleAgeGroup611DisabledCount?: number | null, femaleAgeGroup1217DisabledCount?: number | null, femaleAgeGroup1859DisabledCount?: number | null, femaleAgeGroup60DisabledCount?: number | null, maleAgeGroup05DisabledCount?: number | null, maleAgeGroup611DisabledCount?: number | null, maleAgeGroup1217DisabledCount?: number | null, maleAgeGroup1859DisabledCount?: number | null, maleAgeGroup60DisabledCount?: number | null, fchildHoh?: boolean | null, childHoh?: boolean | null, deviceid: string, orgNameEnumerator: string, returnee?: boolean | null, nameEnumerator: string, lastSyncAt?: any | null, consentSharing?: Array | null, orgEnumerator: HouseholdOrgEnumerator, updatedAt: any, consent?: boolean | null, flexFields?: any | null, programRegistrationId?: string | null, adminUrl?: string | null, createdAt: any, rdiMergeStatus: HouseholdRdiMergeStatus, maleChildrenCount?: number | null, femaleChildrenCount?: number | null, childrenDisabledCount?: number | null, size?: number | null, totalCashReceived?: any | null, currency?: string | null, sanctionListPossibleMatch?: boolean | null, sanctionListConfirmedMatch?: boolean | null, hasDuplicates?: boolean | null, unhcrId: string, adminAreaTitle?: string | null, registrationDataImport?: { __typename?: 'RegistrationDataImportNode', name: string, dataSource: RegistrationDataImportDataSource, importDate: any, importedBy?: { __typename?: 'UserNode', firstName: string, lastName: string, email: string, username: string } | null } | null, deliveredQuantities?: Array<{ __typename?: 'DeliveredQuantityNode', totalDeliveredQuantity?: any | null, currency?: string | null } | null> | null, adminArea?: { __typename?: 'AreaNode', id: string, name: string, level: number } | null, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> }, individuals?: { __typename?: 'IndividualNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, age?: number | null, lastRegistrationDate: any, rdiMergeStatus: IndividualRdiMergeStatus, adminUrl?: string | null, createdAt: any, updatedAt: any, fullName: string, sex: IndividualSex, unicefId?: string | null, birthDate: any, maritalStatus: IndividualMaritalStatus, phoneNo: string, phoneNoValid?: boolean | null, email?: string | null, sanctionListPossibleMatch: boolean, sanctionListConfirmedMatch: boolean, deduplicationGoldenRecordStatus: IndividualDeduplicationGoldenRecordStatus, sanctionListLastCheck?: any | null, role?: string | null, relationship?: IndividualRelationship | null, status?: string | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, countryIso3?: string | null, documentNumber: string, photo?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null, household?: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, status?: string | null, importId?: string | null, totalCashReceivedUsd?: any | null, lastRegistrationDate: any, start?: any | null, firstRegistrationDate: any, countryOrigin?: string | null, village: string, admin1?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin2?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin3?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, admin4?: { __typename?: 'AreaNode', id: string, name: string, level: number, pCode?: string | null } | null, programs: { __typename?: 'ProgramNodeConnection', edges: Array<{ __typename?: 'ProgramNodeEdge', node?: { __typename?: 'ProgramNode', id: string, name: string } | null } | null> } } | null } | null } | null> } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, fullName: string, givenName: string, familyName: string } | null } | null, householdsAndRoles: Array<{ __typename?: 'IndividualRoleInHouseholdNode', id: any, role?: IndividualRoleInHouseholdRole | null, individual: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string }, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null } }>, paymentChannels?: Array<{ __typename?: 'BankAccountInfoNode', id: string, bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null> | null, deliveryMechanismsData?: Array<{ __typename?: 'DeliveryMechanismDataNode', name?: string | null, isValid?: boolean | null, individualTabData?: any | null } | null> | null, documents?: { __typename?: 'DocumentNodeConnection', edges: Array<{ __typename?: 'DocumentNodeEdge', node?: { __typename?: 'DocumentNode', id: string, country?: string | null, photo?: string | null, documentNumber: string, countryIso3?: string | null, type: { __typename?: 'ImportedDocumentTypeNode', label: string, key: string } } | null } | null> } | null, headingHousehold?: { __typename?: 'HouseholdNode', id: string, headOfHousehold?: { __typename?: 'IndividualNode', id: string, givenName: string, familyName: string, fullName: string } | null } | null, bankAccountInfo?: { __typename?: 'BankAccountInfoNode', bankName: string, bankAccountNumber: string, accountHolderName: string, bankBranchName: string } | null, registrationDataImport: { __typename?: 'RegistrationDataImportNode', id: string, name: string }, identities?: { __typename?: 'IndividualIdentityNodeConnection', edges: Array<{ __typename?: 'IndividualIdentityNodeEdge', node?: { __typename?: 'IndividualIdentityNode', id: string, partner?: string | null, country?: string | null, number: string } | null } | null> } | null } | null> | null } | null, ticketNotes: { __typename?: 'TicketNoteNodeConnection', edges: Array<{ __typename?: 'TicketNoteNodeEdge', node?: { __typename?: 'TicketNoteNode', id: string, createdAt: any, updatedAt: any, description: string, createdBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null } | null } | null> }, programs?: Array<{ __typename?: 'ProgramNode', name: string, id: string } | null> | null, documentation?: Array<{ __typename?: 'GrievanceDocumentNode', id: string, createdAt: any, updatedAt: any, name?: string | null, fileSize?: number | null, contentType: string, filePath?: string | null, fileName?: string | null, createdBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null } | null> | null } | null }; export type GrievanceTicketFlexFieldsQueryVariables = Exact<{ id: Scalars['ID']['input']; @@ -9104,6 +8989,11 @@ export type AllPaymentPlansForTableQueryVariables = Exact<{ statusNot?: InputMaybe; isPaymentPlan?: InputMaybe; isTargetPopulation?: InputMaybe; + verificationStatus?: InputMaybe> | InputMaybe>; + serviceProvider?: InputMaybe; + deliveryTypes?: InputMaybe> | InputMaybe>; + startDate?: InputMaybe; + endDate?: InputMaybe; }>; @@ -9128,41 +9018,7 @@ export type PaymentPlanQueryVariables = Exact<{ }>; -export type PaymentPlanQuery = { __typename?: 'Query', paymentPlan?: { __typename?: 'PaymentPlanNode', id: string, name?: string | null, version: any, unicefId?: string | null, status: PaymentPlanStatus, buildStatus?: PaymentPlanBuildStatus | null, canCreateFollowUp?: boolean | null, backgroundActionStatus?: PaymentPlanBackgroundActionStatus | null, canCreatePaymentVerificationPlan?: boolean | null, availablePaymentRecordsCount?: number | null, bankReconciliationSuccess?: number | null, bankReconciliationError?: number | null, exchangeRate?: number | null, fspCommunicationChannel?: string | null, canExportXlsx?: boolean | null, canDownloadXlsx?: boolean | null, canSendXlsxPassword?: boolean | null, excludedIds: string, vulnerabilityScoreMin?: number | null, vulnerabilityScoreMax?: number | null, adminUrl?: string | null, currency?: string | null, currencyName?: string | null, startDate?: any | null, endDate?: any | null, dispersionStartDate?: any | null, dispersionEndDate?: any | null, femaleChildrenCount: number, femaleAdultsCount: number, maleChildrenCount: number, maleAdultsCount: number, totalHouseholdsCount: number, totalIndividualsCount: number, totalEntitledQuantity?: number | null, totalDeliveredQuantity?: number | null, totalUndeliveredQuantity?: number | null, totalWithdrawnHouseholdsCount?: number | null, hasPaymentListExportFile?: boolean | null, hasFspDeliveryMechanismXlsxTemplate?: boolean | null, canCreateXlsxWithFspAuthCode?: boolean | null, importedFileDate?: any | null, importedFileName?: string | null, totalEntitledQuantityUsd?: number | null, paymentsConflictsCount?: number | null, canSendToPaymentGateway?: boolean | null, canSplit?: boolean | null, exclusionReason: string, excludeHouseholdError: string, isFollowUp: boolean, unsuccessfulPaymentsCount?: number | null, programCycle: { __typename?: 'ProgramCycleNode', id: string, title?: string | null }, createdBy: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string }, program?: { __typename?: 'ProgramNode', id: string, name: string, status: ProgramStatus, isSocialWorkerProgram?: boolean | null } | null, approvalProcess: { __typename?: 'ApprovalProcessNodeConnection', totalCount?: number | null, edgeCount?: number | null, edges: Array<{ __typename?: 'ApprovalProcessNodeEdge', node?: { __typename?: 'ApprovalProcessNode', id: string, sentForApprovalDate?: any | null, sentForAuthorizationDate?: any | null, sentForFinanceReleaseDate?: any | null, approvalNumberRequired: number, authorizationNumberRequired: number, financeReleaseNumberRequired: number, rejectedOn?: string | null, sentForApprovalBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null, sentForAuthorizationBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null, sentForFinanceReleaseBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null, actions?: { __typename?: 'FilteredActionsListNode', approval?: Array<{ __typename?: 'ApprovalNode', createdAt: any, comment?: string | null, info?: string | null, createdBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null } | null> | null, authorization?: Array<{ __typename?: 'ApprovalNode', createdAt: any, comment?: string | null, info?: string | null, createdBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null } | null> | null, financeRelease?: Array<{ __typename?: 'ApprovalNode', createdAt: any, comment?: string | null, info?: string | null, createdBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null } | null> | null, reject?: Array<{ __typename?: 'ApprovalNode', createdAt: any, comment?: string | null, info?: string | null, createdBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null } | null> | null } | null } | null } | null> }, steficonRule?: { __typename?: 'RuleCommitNode', id: string, rule?: { __typename?: 'SteficonRuleNode', id: string, name: string } | null } | null, steficonRuleTargeting?: { __typename?: 'RuleCommitNode', id: string, rule?: { __typename?: 'SteficonRuleNode', id: string, name: string } | null } | null, deliveryMechanisms?: Array<{ __typename?: 'DeliveryMechanismPerPaymentPlanNode', id: string, name?: string | null, code?: string | null, order?: number | null, sentToPaymentGateway: boolean, chosenConfiguration?: string | null, fsp?: { __typename?: 'FinancialServiceProviderNode', id: string, name: string, communicationChannel: FinancialServiceProviderCommunicationChannel, isPaymentGateway?: boolean | null } | null } | null> | null, splitChoices?: Array<{ __typename?: 'ChoiceObject', name?: string | null, value?: string | null } | null> | null, volumeByDeliveryMechanism?: Array<{ __typename?: 'VolumeByDeliveryMechanismNode', volume?: number | null, volumeUsd?: number | null, deliveryMechanism?: { __typename?: 'DeliveryMechanismPerPaymentPlanNode', id: string, name?: string | null, order?: number | null, fsp?: { __typename?: 'FinancialServiceProviderNode', id: string, name: string } | null } | null } | null> | null, verificationPlans?: { __typename?: 'PaymentVerificationPlanNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'PaymentVerificationPlanNodeEdge', node?: { __typename?: 'PaymentVerificationPlanNode', id: string, unicefId?: string | null, adminUrl?: string | null, status: PaymentVerificationPlanStatus, sampleSize?: number | null, receivedCount?: number | null, notReceivedCount?: number | null, respondedCount?: number | null, verificationChannel: PaymentVerificationPlanVerificationChannel, sampling: PaymentVerificationPlanSampling, receivedWithProblemsCount?: number | null, rapidProFlowId: string, confidenceInterval?: number | null, marginOfError?: number | null, activationDate?: any | null, completionDate?: any | null, excludedAdminAreasFilter?: Array | null, sexFilter?: string | null, xlsxFileExporting: boolean, hasXlsxFile?: boolean | null, xlsxFileWasDownloaded?: boolean | null, xlsxFileImported: boolean, ageFilter?: { __typename?: 'AgeFilterObject', min?: number | null, max?: number | null } | null } | null } | null> } | null, paymentVerificationSummary?: { __typename?: 'PaymentVerificationSummaryNode', id: string, createdAt: any, updatedAt: any, status: PaymentVerificationSummaryStatus, activationDate?: any | null, completionDate?: any | null } | null, paymentItems: { __typename?: 'PaymentNodeConnection', totalCount?: number | null, edgeCount?: number | null, edges: Array<{ __typename?: 'PaymentNodeEdge', node?: { __typename?: 'PaymentNode', id: string, status: PaymentStatus } | null } | null> }, reconciliationSummary?: { __typename?: 'ReconciliationSummaryNode', deliveredFully?: number | null, deliveredPartially?: number | null, notDelivered?: number | null, unsuccessful?: number | null, pending?: number | null, numberOfPayments?: number | null, reconciled?: number | null } | null, excludedHouseholds?: Array<{ __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null> | null, excludedIndividuals?: Array<{ __typename?: 'IndividualNode', id: string, unicefId?: string | null } | null> | null, followUps: { __typename?: 'PaymentPlanNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'PaymentPlanNodeEdge', node?: { __typename?: 'PaymentPlanNode', id: string, unicefId?: string | null, createdAt: any, paymentItems: { __typename?: 'PaymentNodeConnection', totalCount?: number | null } } | null } | null> }, sourcePaymentPlan?: { __typename?: 'PaymentPlanNode', id: string, unicefId?: string | null } | null, supportingDocuments?: Array<{ __typename?: 'PaymentPlanSupportingDocumentNode', id: string, title: string, file: string } | null> | null, targetingCriteria?: { __typename: 'TargetingCriteriaNode', id: any, flagExcludeIfActiveAdjudicationTicket: boolean, flagExcludeIfOnSanctionList: boolean, householdIds?: string | null, individualIds?: string | null, rules?: Array<{ __typename: 'TargetingCriteriaRuleNode', id: any, householdIds: string, individualIds: string, individualsFiltersBlocks?: Array<{ __typename: 'TargetingIndividualRuleFilterBlockNode', individualBlockFilters?: Array<{ __typename: 'TargetingIndividualBlockRuleFilterNode', id: any, fieldName: string, flexFieldClassification: TargetingIndividualBlockRuleFilterFlexFieldClassification, roundNumber?: number | null, arguments?: Array | null, comparisonMethod: TargetingIndividualBlockRuleFilterComparisonMethod, fieldAttribute?: { __typename: 'FieldAttributeNode', id?: string | null, name?: string | null, labelEn?: string | null, type?: string | null, choices?: Array<{ __typename?: 'CoreFieldChoiceObject', value?: string | null, labelEn?: string | null } | null> | null, pduData?: { __typename?: 'PeriodicFieldDataNode', id: string, subtype: PeriodicFieldDataSubtype, numberOfRounds: number, roundsNames: Array } | null } | null } | null> | null } | null> | null, collectorsFiltersBlocks: Array<{ __typename: 'TargetingCollectorRuleFilterBlockNode', id: any, createdAt: any, updatedAt: any, collectorBlockFilters?: Array<{ __typename: 'TargetingCollectorBlockRuleFilterNode', id: any, createdAt: any, updatedAt: any, fieldName: string, comparisonMethod?: string | null, flexFieldClassification: TargetingCollectorBlockRuleFilterFlexFieldClassification, arguments?: Array | null, labelEn?: string | null } | null> | null }>, householdsFiltersBlocks?: Array<{ __typename: 'TargetingCriteriaRuleFilterNode', id: any, fieldName: string, flexFieldClassification: TargetingCriteriaRuleFilterFlexFieldClassification, roundNumber?: number | null, arguments?: Array | null, comparisonMethod: TargetingCriteriaRuleFilterComparisonMethod, fieldAttribute?: { __typename: 'FieldAttributeNode', id?: string | null, name?: string | null, labelEn?: string | null, type?: string | null, choices?: Array<{ __typename?: 'CoreFieldChoiceObject', value?: string | null, labelEn?: string | null } | null> | null, pduData?: { __typename?: 'PeriodicFieldDataNode', id: string, subtype: PeriodicFieldDataSubtype, numberOfRounds: number, roundsNames: Array } | null } | null } | null> | null } | null> | null } | null } | null }; - -export type AllCashPlansAndPaymentPlansQueryVariables = Exact<{ - businessArea: Scalars['String']['input']; - program?: InputMaybe; - search?: InputMaybe; - serviceProvider?: InputMaybe; - deliveryType?: InputMaybe> | InputMaybe>; - verificationStatus?: InputMaybe> | InputMaybe>; - startDateGte?: InputMaybe; - endDateLte?: InputMaybe; - orderBy?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; - before?: InputMaybe; - after?: InputMaybe; - isPaymentVerificationPage?: InputMaybe; -}>; - - -export type AllCashPlansAndPaymentPlansQuery = { __typename?: 'Query', allCashPlansAndPaymentPlans?: { __typename?: 'PaginatedCashPlanAndPaymentPlanNode', totalCount?: number | null, pageInfo?: { __typename?: 'PageInfoNode', startCursor?: string | null, endCursor?: string | null, hasNextPage?: boolean | null, hasPreviousPage?: boolean | null } | null, edges?: Array<{ __typename?: 'CashPlanAndPaymentPlanEdges', cursor?: string | null, node?: { __typename?: 'CashPlanAndPaymentPlanNode', objType?: string | null, id?: string | null, unicefId?: string | null, verificationStatus?: string | null, status?: string | null, currency?: string | null, totalDeliveredQuantity?: number | null, startDate?: string | null, endDate?: string | null, programName?: string | null, updatedAt?: string | null, totalNumberOfHouseholds?: number | null, assistanceMeasurement?: string | null, totalEntitledQuantity?: number | null, totalUndeliveredQuantity?: number | null, dispersionDate?: string | null, serviceProviderFullName?: string | null, verificationPlans?: Array<{ __typename?: 'PaymentVerificationPlanNode', id: string, createdAt: any, unicefId?: string | null } | null> | null } | null } | null> | null } | null }; - -export type AllPaymentRecordsAndPaymentsQueryVariables = Exact<{ - household?: InputMaybe; - after?: InputMaybe; - before?: InputMaybe; - orderBy?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; - businessArea: Scalars['String']['input']; - program?: InputMaybe; -}>; - - -export type AllPaymentRecordsAndPaymentsQuery = { __typename?: 'Query', allPaymentRecordsAndPayments?: { __typename?: 'PaginatedPaymentRecordsAndPaymentsNode', totalCount?: number | null, pageInfo?: { __typename?: 'PageInfoNode', hasNextPage?: boolean | null, hasPreviousPage?: boolean | null, startCursor?: string | null, endCursor?: string | null } | null, edges?: Array<{ __typename?: 'PaymentRecordsAndPaymentsEdges', cursor?: string | null, node?: { __typename?: 'PaymentRecordAndPaymentNode', objType?: string | null, id?: string | null, fullName?: string | null, status?: string | null, unicefId?: string | null, currency?: string | null, entitlementQuantity?: number | null, deliveredQuantity?: number | null, deliveredQuantityUsd?: number | null, deliveryDate?: string | null, parent?: { __typename?: 'CashPlanAndPaymentPlanNode', id?: string | null, programName?: string | null } | null, verification?: { __typename?: 'PaymentVerificationNode', id: string, receivedAmount?: number | null } | null } | null } | null> | null } | null }; +export type PaymentPlanQuery = { __typename?: 'Query', paymentPlan?: { __typename?: 'PaymentPlanNode', id: string, name?: string | null, version: any, unicefId?: string | null, status: PaymentPlanStatus, buildStatus?: PaymentPlanBuildStatus | null, canCreateFollowUp?: boolean | null, backgroundActionStatus?: PaymentPlanBackgroundActionStatus | null, canCreatePaymentVerificationPlan?: boolean | null, availablePaymentRecordsCount?: number | null, bankReconciliationSuccess?: number | null, bankReconciliationError?: number | null, exchangeRate?: number | null, fspCommunicationChannel?: string | null, canExportXlsx?: boolean | null, canDownloadXlsx?: boolean | null, canSendXlsxPassword?: boolean | null, excludedIds: string, vulnerabilityScoreMin?: number | null, vulnerabilityScoreMax?: number | null, adminUrl?: string | null, currency?: string | null, currencyName?: string | null, startDate?: any | null, endDate?: any | null, dispersionStartDate?: any | null, dispersionEndDate?: any | null, femaleChildrenCount: number, femaleAdultsCount: number, maleChildrenCount: number, maleAdultsCount: number, totalHouseholdsCount: number, totalIndividualsCount: number, totalEntitledQuantity?: number | null, totalDeliveredQuantity?: number | null, totalUndeliveredQuantity?: number | null, totalWithdrawnHouseholdsCount?: number | null, hasPaymentListExportFile?: boolean | null, hasFspDeliveryMechanismXlsxTemplate?: boolean | null, canCreateXlsxWithFspAuthCode?: boolean | null, importedFileDate?: any | null, importedFileName?: string | null, totalEntitledQuantityUsd?: number | null, paymentsConflictsCount?: number | null, canSendToPaymentGateway?: boolean | null, canSplit?: boolean | null, exclusionReason: string, excludeHouseholdError: string, isFollowUp: boolean, unsuccessfulPaymentsCount?: number | null, programCycle: { __typename?: 'ProgramCycleNode', id: string, title?: string | null }, createdBy: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string }, program?: { __typename?: 'ProgramNode', id: string, name: string, status: ProgramStatus, isSocialWorkerProgram?: boolean | null } | null, approvalProcess: { __typename?: 'ApprovalProcessNodeConnection', totalCount?: number | null, edgeCount?: number | null, edges: Array<{ __typename?: 'ApprovalProcessNodeEdge', node?: { __typename?: 'ApprovalProcessNode', id: string, sentForApprovalDate?: any | null, sentForAuthorizationDate?: any | null, sentForFinanceReleaseDate?: any | null, approvalNumberRequired: number, authorizationNumberRequired: number, financeReleaseNumberRequired: number, rejectedOn?: string | null, sentForApprovalBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null, sentForAuthorizationBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null, sentForFinanceReleaseBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null, actions?: { __typename?: 'FilteredActionsListNode', approval?: Array<{ __typename?: 'ApprovalNode', createdAt: any, comment?: string | null, info?: string | null, createdBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null } | null> | null, authorization?: Array<{ __typename?: 'ApprovalNode', createdAt: any, comment?: string | null, info?: string | null, createdBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null } | null> | null, financeRelease?: Array<{ __typename?: 'ApprovalNode', createdAt: any, comment?: string | null, info?: string | null, createdBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null } | null> | null, reject?: Array<{ __typename?: 'ApprovalNode', createdAt: any, comment?: string | null, info?: string | null, createdBy?: { __typename?: 'UserNode', id: string, firstName: string, lastName: string, email: string } | null } | null> | null } | null } | null } | null> }, steficonRule?: { __typename?: 'RuleCommitNode', id: string, rule?: { __typename?: 'SteficonRuleNode', id: string, name: string } | null } | null, steficonRuleTargeting?: { __typename?: 'RuleCommitNode', id: string, rule?: { __typename?: 'SteficonRuleNode', id: string, name: string } | null } | null, deliveryMechanisms?: Array<{ __typename?: 'DeliveryMechanismPerPaymentPlanNode', id: string, name?: string | null, code?: string | null, order?: number | null, sentToPaymentGateway: boolean, chosenConfiguration?: string | null, fsp?: { __typename?: 'FinancialServiceProviderNode', id: string, name: string, communicationChannel: FinancialServiceProviderCommunicationChannel, isPaymentGateway?: boolean | null } | null } | null> | null, splitChoices?: Array<{ __typename?: 'ChoiceObject', name?: string | null, value?: string | null } | null> | null, volumeByDeliveryMechanism?: Array<{ __typename?: 'VolumeByDeliveryMechanismNode', volume?: number | null, volumeUsd?: number | null, deliveryMechanism?: { __typename?: 'DeliveryMechanismPerPaymentPlanNode', id: string, name?: string | null, order?: number | null, fsp?: { __typename?: 'FinancialServiceProviderNode', id: string, name: string } | null } | null } | null> | null, verificationPlans?: { __typename?: 'PaymentVerificationPlanNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'PaymentVerificationPlanNodeEdge', node?: { __typename?: 'PaymentVerificationPlanNode', id: string, unicefId?: string | null, adminUrl?: string | null, status: PaymentVerificationPlanStatus, sampleSize?: number | null, receivedCount?: number | null, notReceivedCount?: number | null, respondedCount?: number | null, verificationChannel: PaymentVerificationPlanVerificationChannel, sampling: PaymentVerificationPlanSampling, receivedWithProblemsCount?: number | null, rapidProFlowId: string, confidenceInterval?: number | null, marginOfError?: number | null, activationDate?: any | null, completionDate?: any | null, excludedAdminAreasFilter?: Array | null, sexFilter?: string | null, xlsxFileExporting: boolean, hasXlsxFile?: boolean | null, xlsxFileWasDownloaded?: boolean | null, xlsxFileImported: boolean, ageFilter?: { __typename?: 'AgeFilterObject', min?: number | null, max?: number | null } | null } | null } | null> } | null, paymentVerificationSummary?: { __typename?: 'PaymentVerificationSummaryNode', id: string, createdAt: any, updatedAt: any, status: PaymentVerificationSummaryStatus, activationDate?: any | null, completionDate?: any | null } | null, paymentItems: { __typename?: 'PaymentNodeConnection', totalCount?: number | null, edgeCount?: number | null, edges: Array<{ __typename?: 'PaymentNodeEdge', node?: { __typename?: 'PaymentNode', id: string, status: PaymentStatus } | null } | null> }, reconciliationSummary?: { __typename?: 'ReconciliationSummaryNode', deliveredFully?: number | null, deliveredPartially?: number | null, notDelivered?: number | null, unsuccessful?: number | null, pending?: number | null, numberOfPayments?: number | null, reconciled?: number | null } | null, excludedHouseholds?: Array<{ __typename?: 'HouseholdNode', id: string, unicefId?: string | null } | null> | null, excludedIndividuals?: Array<{ __typename?: 'IndividualNode', id: string, unicefId?: string | null } | null> | null, followUps: { __typename?: 'PaymentPlanNodeConnection', totalCount?: number | null, edges: Array<{ __typename?: 'PaymentPlanNodeEdge', node?: { __typename?: 'PaymentPlanNode', id: string, unicefId?: string | null, createdAt: any, paymentItems: { __typename?: 'PaymentNodeConnection', totalCount?: number | null } } | null } | null> }, sourcePaymentPlan?: { __typename?: 'PaymentPlanNode', id: string, unicefId?: string | null } | null, supportingDocuments?: Array<{ __typename?: 'PaymentPlanSupportingDocumentNode', id: string, title: string, file: string } | null> | null, targetingCriteria: { __typename: 'TargetingCriteriaNode', id: any, flagExcludeIfActiveAdjudicationTicket: boolean, flagExcludeIfOnSanctionList: boolean, householdIds?: string | null, individualIds?: string | null, rules?: Array<{ __typename: 'TargetingCriteriaRuleNode', id: any, householdIds: string, individualIds: string, individualsFiltersBlocks?: Array<{ __typename: 'TargetingIndividualRuleFilterBlockNode', individualBlockFilters?: Array<{ __typename: 'TargetingIndividualBlockRuleFilterNode', id: any, fieldName: string, flexFieldClassification: TargetingIndividualBlockRuleFilterFlexFieldClassification, roundNumber?: number | null, arguments?: Array | null, comparisonMethod: TargetingIndividualBlockRuleFilterComparisonMethod, fieldAttribute?: { __typename: 'FieldAttributeNode', id?: string | null, name?: string | null, labelEn?: string | null, type?: string | null, choices?: Array<{ __typename?: 'CoreFieldChoiceObject', value?: string | null, labelEn?: string | null } | null> | null, pduData?: { __typename?: 'PeriodicFieldDataNode', id: string, subtype: PeriodicFieldDataSubtype, numberOfRounds: number, roundsNames: Array } | null } | null } | null> | null } | null> | null, collectorsFiltersBlocks: Array<{ __typename: 'TargetingCollectorRuleFilterBlockNode', id: any, createdAt: any, updatedAt: any, collectorBlockFilters?: Array<{ __typename: 'TargetingCollectorBlockRuleFilterNode', id: any, createdAt: any, updatedAt: any, fieldName: string, comparisonMethod?: string | null, flexFieldClassification: TargetingCollectorBlockRuleFilterFlexFieldClassification, arguments?: Array | null, labelEn?: string | null } | null> | null }>, householdsFiltersBlocks?: Array<{ __typename: 'TargetingCriteriaRuleFilterNode', id: any, fieldName: string, flexFieldClassification: TargetingCriteriaRuleFilterFlexFieldClassification, roundNumber?: number | null, arguments?: Array | null, comparisonMethod: TargetingCriteriaRuleFilterComparisonMethod, fieldAttribute?: { __typename: 'FieldAttributeNode', id?: string | null, name?: string | null, labelEn?: string | null, type?: string | null, choices?: Array<{ __typename?: 'CoreFieldChoiceObject', value?: string | null, labelEn?: string | null } | null> | null, pduData?: { __typename?: 'PeriodicFieldDataNode', id: string, subtype: PeriodicFieldDataSubtype, numberOfRounds: number, roundsNames: Array } | null } | null } | null> | null } | null> | null } } | null }; export type AllPaymentsForTableQueryVariables = Exact<{ after?: InputMaybe; @@ -9171,11 +9027,12 @@ export type AllPaymentsForTableQueryVariables = Exact<{ last?: InputMaybe; orderBy?: InputMaybe; businessArea: Scalars['String']['input']; - paymentPlanId: Scalars['String']['input']; + paymentPlanId?: InputMaybe; + householdId?: InputMaybe; }>; -export type AllPaymentsForTableQuery = { __typename?: 'Query', allPayments?: { __typename?: 'PaymentNodeConnection', totalCount?: number | null, pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean, hasPreviousPage: boolean, startCursor?: string | null, endCursor?: string | null }, edges: Array<{ __typename?: 'PaymentNodeEdge', cursor: string, node?: { __typename?: 'PaymentNode', id: string, unicefId?: string | null, status: PaymentStatus, vulnerabilityScore?: number | null, entitlementQuantity?: number | null, entitlementQuantityUsd?: number | null, currency?: string | null, deliveredQuantity?: number | null, deliveredQuantityUsd?: number | null, paymentPlanHardConflicted?: boolean | null, paymentPlanSoftConflicted?: boolean | null, fspAuthCode?: string | null, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, size?: number | null, admin2?: { __typename?: 'AreaNode', id: string, name: string } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string } | null, individuals?: { __typename?: 'IndividualNodeConnection', edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string } | null } | null> } | null }, paymentPlanHardConflictedData?: Array<{ __typename?: 'PaymentConflictDataNode', paymentPlanUnicefId?: string | null, paymentPlanId?: string | null, paymentPlanStartDate?: string | null, paymentPlanEndDate?: string | null, paymentPlanStatus?: string | null, paymentId?: string | null, paymentUnicefId?: string | null } | null> | null, paymentPlanSoftConflictedData?: Array<{ __typename?: 'PaymentConflictDataNode', paymentPlanUnicefId?: string | null, paymentPlanId?: string | null, paymentPlanStartDate?: string | null, paymentPlanEndDate?: string | null, paymentPlanStatus?: string | null, paymentId?: string | null, paymentUnicefId?: string | null } | null> | null, collector: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string }, financialServiceProvider?: { __typename?: 'FinancialServiceProviderNode', id: string, name: string } | null } | null } | null> } | null }; +export type AllPaymentsForTableQuery = { __typename?: 'Query', allPayments?: { __typename?: 'PaymentNodeConnection', totalCount?: number | null, pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean, hasPreviousPage: boolean, startCursor?: string | null, endCursor?: string | null }, edges: Array<{ __typename?: 'PaymentNodeEdge', cursor: string, node?: { __typename?: 'PaymentNode', id: string, unicefId?: string | null, status: PaymentStatus, vulnerabilityScore?: number | null, entitlementQuantity?: number | null, entitlementQuantityUsd?: number | null, currency?: string | null, deliveredQuantity?: number | null, deliveredQuantityUsd?: number | null, paymentPlanHardConflicted?: boolean | null, paymentPlanSoftConflicted?: boolean | null, fspAuthCode?: string | null, parent: { __typename?: 'PaymentPlanNode', program?: { __typename?: 'ProgramNode', id: string, name: string } | null }, household: { __typename?: 'HouseholdNode', id: string, unicefId?: string | null, size?: number | null, admin2?: { __typename?: 'AreaNode', id: string, name: string } | null, headOfHousehold?: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string } | null, individuals?: { __typename?: 'IndividualNodeConnection', edges: Array<{ __typename?: 'IndividualNodeEdge', node?: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string } | null } | null> } | null }, paymentPlanHardConflictedData?: Array<{ __typename?: 'PaymentConflictDataNode', paymentPlanUnicefId?: string | null, paymentPlanId?: string | null, paymentPlanStartDate?: string | null, paymentPlanEndDate?: string | null, paymentPlanStatus?: string | null, paymentId?: string | null, paymentUnicefId?: string | null } | null> | null, paymentPlanSoftConflictedData?: Array<{ __typename?: 'PaymentConflictDataNode', paymentPlanUnicefId?: string | null, paymentPlanId?: string | null, paymentPlanStartDate?: string | null, paymentPlanEndDate?: string | null, paymentPlanStatus?: string | null, paymentId?: string | null, paymentUnicefId?: string | null } | null> | null, collector: { __typename?: 'IndividualNode', id: string, unicefId?: string | null, fullName: string }, financialServiceProvider?: { __typename?: 'FinancialServiceProviderNode', id: string, name: string } | null } | null } | null> } | null }; export type IndividualPhotosQueryVariables = Exact<{ id: Scalars['ID']['input']; @@ -9771,7 +9628,7 @@ export type TargetPopulationQueryVariables = Exact<{ }>; -export type TargetPopulationQuery = { __typename?: 'Query', paymentPlan?: { __typename?: 'PaymentPlanNode', id: string, version: any, name?: string | null, status: PaymentPlanStatus, buildStatus?: PaymentPlanBuildStatus | null, adminUrl?: string | null, totalHouseholdsCount: number, totalIndividualsCount: number, femaleChildrenCount: number, femaleAdultsCount: number, maleChildrenCount: number, maleAdultsCount: number, excludedIds: string, exclusionReason: string, vulnerabilityScoreMin?: number | null, vulnerabilityScoreMax?: number | null, steficonRuleTargeting?: { __typename: 'RuleCommitNode', id: string, rule?: { __typename: 'SteficonRuleNode', id: string, name: string } | null } | null, program?: { __typename: 'ProgramNode', id: string, name: string, status: ProgramStatus, startDate: any, endDate?: any | null, isSocialWorkerProgram?: boolean | null } | null, programCycle: { __typename: 'ProgramCycleNode', id: string, title?: string | null }, createdBy: { __typename: 'UserNode', id: string, email: string, firstName: string, lastName: string }, targetingCriteria?: { __typename: 'TargetingCriteriaNode', id: any, flagExcludeIfActiveAdjudicationTicket: boolean, flagExcludeIfOnSanctionList: boolean, householdIds?: string | null, individualIds?: string | null, rules?: Array<{ __typename: 'TargetingCriteriaRuleNode', id: any, householdIds: string, individualIds: string, individualsFiltersBlocks?: Array<{ __typename: 'TargetingIndividualRuleFilterBlockNode', individualBlockFilters?: Array<{ __typename: 'TargetingIndividualBlockRuleFilterNode', id: any, fieldName: string, flexFieldClassification: TargetingIndividualBlockRuleFilterFlexFieldClassification, roundNumber?: number | null, arguments?: Array | null, comparisonMethod: TargetingIndividualBlockRuleFilterComparisonMethod, fieldAttribute?: { __typename: 'FieldAttributeNode', id?: string | null, name?: string | null, labelEn?: string | null, type?: string | null, choices?: Array<{ __typename?: 'CoreFieldChoiceObject', value?: string | null, labelEn?: string | null } | null> | null, pduData?: { __typename?: 'PeriodicFieldDataNode', id: string, subtype: PeriodicFieldDataSubtype, numberOfRounds: number, roundsNames: Array } | null } | null } | null> | null } | null> | null, collectorsFiltersBlocks: Array<{ __typename: 'TargetingCollectorRuleFilterBlockNode', id: any, createdAt: any, updatedAt: any, collectorBlockFilters?: Array<{ __typename: 'TargetingCollectorBlockRuleFilterNode', id: any, createdAt: any, updatedAt: any, fieldName: string, comparisonMethod?: string | null, flexFieldClassification: TargetingCollectorBlockRuleFilterFlexFieldClassification, arguments?: Array | null, labelEn?: string | null } | null> | null }>, householdsFiltersBlocks?: Array<{ __typename: 'TargetingCriteriaRuleFilterNode', id: any, fieldName: string, flexFieldClassification: TargetingCriteriaRuleFilterFlexFieldClassification, roundNumber?: number | null, arguments?: Array | null, comparisonMethod: TargetingCriteriaRuleFilterComparisonMethod, fieldAttribute?: { __typename: 'FieldAttributeNode', id?: string | null, name?: string | null, labelEn?: string | null, type?: string | null, choices?: Array<{ __typename?: 'CoreFieldChoiceObject', value?: string | null, labelEn?: string | null } | null> | null, pduData?: { __typename?: 'PeriodicFieldDataNode', id: string, subtype: PeriodicFieldDataSubtype, numberOfRounds: number, roundsNames: Array } | null } | null } | null> | null } | null> | null } | null } | null }; +export type TargetPopulationQuery = { __typename?: 'Query', paymentPlan?: { __typename?: 'PaymentPlanNode', id: string, version: any, name?: string | null, status: PaymentPlanStatus, buildStatus?: PaymentPlanBuildStatus | null, adminUrl?: string | null, totalHouseholdsCount: number, totalIndividualsCount: number, femaleChildrenCount: number, femaleAdultsCount: number, maleChildrenCount: number, maleAdultsCount: number, excludedIds: string, exclusionReason: string, vulnerabilityScoreMin?: number | null, vulnerabilityScoreMax?: number | null, steficonRuleTargeting?: { __typename: 'RuleCommitNode', id: string, rule?: { __typename: 'SteficonRuleNode', id: string, name: string } | null } | null, program?: { __typename: 'ProgramNode', id: string, name: string, status: ProgramStatus, startDate: any, endDate?: any | null, isSocialWorkerProgram?: boolean | null } | null, programCycle: { __typename: 'ProgramCycleNode', id: string, title?: string | null }, createdBy: { __typename: 'UserNode', id: string, email: string, firstName: string, lastName: string }, targetingCriteria: { __typename: 'TargetingCriteriaNode', id: any, flagExcludeIfActiveAdjudicationTicket: boolean, flagExcludeIfOnSanctionList: boolean, householdIds?: string | null, individualIds?: string | null, rules?: Array<{ __typename: 'TargetingCriteriaRuleNode', id: any, householdIds: string, individualIds: string, individualsFiltersBlocks?: Array<{ __typename: 'TargetingIndividualRuleFilterBlockNode', individualBlockFilters?: Array<{ __typename: 'TargetingIndividualBlockRuleFilterNode', id: any, fieldName: string, flexFieldClassification: TargetingIndividualBlockRuleFilterFlexFieldClassification, roundNumber?: number | null, arguments?: Array | null, comparisonMethod: TargetingIndividualBlockRuleFilterComparisonMethod, fieldAttribute?: { __typename: 'FieldAttributeNode', id?: string | null, name?: string | null, labelEn?: string | null, type?: string | null, choices?: Array<{ __typename?: 'CoreFieldChoiceObject', value?: string | null, labelEn?: string | null } | null> | null, pduData?: { __typename?: 'PeriodicFieldDataNode', id: string, subtype: PeriodicFieldDataSubtype, numberOfRounds: number, roundsNames: Array } | null } | null } | null> | null } | null> | null, collectorsFiltersBlocks: Array<{ __typename: 'TargetingCollectorRuleFilterBlockNode', id: any, createdAt: any, updatedAt: any, collectorBlockFilters?: Array<{ __typename: 'TargetingCollectorBlockRuleFilterNode', id: any, createdAt: any, updatedAt: any, fieldName: string, comparisonMethod?: string | null, flexFieldClassification: TargetingCollectorBlockRuleFilterFlexFieldClassification, arguments?: Array | null, labelEn?: string | null } | null> | null }>, householdsFiltersBlocks?: Array<{ __typename: 'TargetingCriteriaRuleFilterNode', id: any, fieldName: string, flexFieldClassification: TargetingCriteriaRuleFilterFlexFieldClassification, roundNumber?: number | null, arguments?: Array | null, comparisonMethod: TargetingCriteriaRuleFilterComparisonMethod, fieldAttribute?: { __typename: 'FieldAttributeNode', id?: string | null, name?: string | null, labelEn?: string | null, type?: string | null, choices?: Array<{ __typename?: 'CoreFieldChoiceObject', value?: string | null, labelEn?: string | null } | null> | null, pduData?: { __typename?: 'PeriodicFieldDataNode', id: string, subtype: PeriodicFieldDataSubtype, numberOfRounds: number, roundsNames: Array } | null } | null } | null> | null } | null> | null } } | null }; export const IndividualMinimalFragmentDoc = gql` fragment individualMinimal on IndividualNode { @@ -10202,11 +10059,9 @@ export const GrievanceTicketDetailedFragmentDoc = gql` unicefId deliveredQuantity entitlementQuantity - objType parent { id unicefId - objType } verification { id @@ -16697,7 +16552,7 @@ export type AllFinancialServiceProviderXlsxTemplatesLazyQueryHookResult = Return export type AllFinancialServiceProviderXlsxTemplatesSuspenseQueryHookResult = ReturnType; export type AllFinancialServiceProviderXlsxTemplatesQueryResult = Apollo.QueryResult; export const AllPaymentPlansForTableDocument = gql` - query AllPaymentPlansForTable($after: String, $before: String, $first: Int, $last: Int, $orderBy: String, $businessArea: String!, $search: String, $status: [String], $totalEntitledQuantityFrom: Float, $totalEntitledQuantityTo: Float, $dispersionStartDate: Date, $dispersionEndDate: Date, $isFollowUp: Boolean, $program: String, $programCycle: String, $totalHouseholdsCountWithValidPhoneNoMin: Int, $totalHouseholdsCountWithValidPhoneNoMax: Int, $createdAtRange: String, $statusNot: String, $isPaymentPlan: Boolean, $isTargetPopulation: Boolean) { + query AllPaymentPlansForTable($after: String, $before: String, $first: Int, $last: Int, $orderBy: String, $businessArea: String!, $search: String, $status: [String], $totalEntitledQuantityFrom: Float, $totalEntitledQuantityTo: Float, $dispersionStartDate: Date, $dispersionEndDate: Date, $isFollowUp: Boolean, $program: String, $programCycle: String, $totalHouseholdsCountWithValidPhoneNoMin: Int, $totalHouseholdsCountWithValidPhoneNoMax: Int, $createdAtRange: String, $statusNot: String, $isPaymentPlan: Boolean, $isTargetPopulation: Boolean, $verificationStatus: [String], $serviceProvider: String, $deliveryTypes: [String], $startDate: Date, $endDate: Date) { allPaymentPlans( after: $after before: $before @@ -16720,6 +16575,11 @@ export const AllPaymentPlansForTableDocument = gql` statusNot: $statusNot isPaymentPlan: $isPaymentPlan isTargetPopulation: $isTargetPopulation + verificationStatus: $verificationStatus + serviceProvider: $serviceProvider + deliveryTypes: $deliveryTypes + startDate: $startDate + endDate: $endDate ) { pageInfo { hasNextPage @@ -16811,6 +16671,11 @@ export const AllPaymentPlansForTableDocument = gql` * statusNot: // value for 'statusNot' * isPaymentPlan: // value for 'isPaymentPlan' * isTargetPopulation: // value for 'isTargetPopulation' + * verificationStatus: // value for 'verificationStatus' + * serviceProvider: // value for 'serviceProvider' + * deliveryTypes: // value for 'deliveryTypes' + * startDate: // value for 'startDate' + * endDate: // value for 'endDate' * }, * }); */ @@ -17413,194 +17278,8 @@ export type PaymentPlanQueryHookResult = ReturnType; export type PaymentPlanLazyQueryHookResult = ReturnType; export type PaymentPlanSuspenseQueryHookResult = ReturnType; export type PaymentPlanQueryResult = Apollo.QueryResult; -export const AllCashPlansAndPaymentPlansDocument = gql` - query allCashPlansAndPaymentPlans($businessArea: String!, $program: String, $search: String, $serviceProvider: String, $deliveryType: [String], $verificationStatus: [String], $startDateGte: String, $endDateLte: String, $orderBy: String, $first: Int, $last: Int, $before: String, $after: String, $isPaymentVerificationPage: Boolean) { - allCashPlansAndPaymentPlans( - businessArea: $businessArea - program: $program - search: $search - serviceProvider: $serviceProvider - deliveryType: $deliveryType - verificationStatus: $verificationStatus - startDateGte: $startDateGte - endDateLte: $endDateLte - orderBy: $orderBy - first: $first - last: $last - before: $before - after: $after - isPaymentVerificationPage: $isPaymentVerificationPage - ) { - pageInfo { - startCursor - endCursor - hasNextPage - hasPreviousPage - } - totalCount - edges { - cursor - node { - objType - id - unicefId - verificationStatus - status - currency - totalDeliveredQuantity - startDate - endDate - programName - updatedAt - verificationPlans { - id - createdAt - unicefId - } - totalNumberOfHouseholds - assistanceMeasurement - totalEntitledQuantity - totalUndeliveredQuantity - dispersionDate - serviceProviderFullName - } - } - } -} - `; - -/** - * __useAllCashPlansAndPaymentPlansQuery__ - * - * To run a query within a React component, call `useAllCashPlansAndPaymentPlansQuery` and pass it any options that fit your needs. - * When your component renders, `useAllCashPlansAndPaymentPlansQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useAllCashPlansAndPaymentPlansQuery({ - * variables: { - * businessArea: // value for 'businessArea' - * program: // value for 'program' - * search: // value for 'search' - * serviceProvider: // value for 'serviceProvider' - * deliveryType: // value for 'deliveryType' - * verificationStatus: // value for 'verificationStatus' - * startDateGte: // value for 'startDateGte' - * endDateLte: // value for 'endDateLte' - * orderBy: // value for 'orderBy' - * first: // value for 'first' - * last: // value for 'last' - * before: // value for 'before' - * after: // value for 'after' - * isPaymentVerificationPage: // value for 'isPaymentVerificationPage' - * }, - * }); - */ -export function useAllCashPlansAndPaymentPlansQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: AllCashPlansAndPaymentPlansQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(AllCashPlansAndPaymentPlansDocument, options); - } -export function useAllCashPlansAndPaymentPlansLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(AllCashPlansAndPaymentPlansDocument, options); - } -export function useAllCashPlansAndPaymentPlansSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { - const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} - return Apollo.useSuspenseQuery(AllCashPlansAndPaymentPlansDocument, options); - } -export type AllCashPlansAndPaymentPlansQueryHookResult = ReturnType; -export type AllCashPlansAndPaymentPlansLazyQueryHookResult = ReturnType; -export type AllCashPlansAndPaymentPlansSuspenseQueryHookResult = ReturnType; -export type AllCashPlansAndPaymentPlansQueryResult = Apollo.QueryResult; -export const AllPaymentRecordsAndPaymentsDocument = gql` - query AllPaymentRecordsAndPayments($household: ID, $after: String, $before: String, $orderBy: String, $first: Int, $last: Int, $businessArea: String!, $program: String) { - allPaymentRecordsAndPayments( - household: $household - after: $after - before: $before - first: $first - last: $last - orderBy: $orderBy - businessArea: $businessArea - program: $program - ) { - pageInfo { - hasNextPage - hasPreviousPage - startCursor - endCursor - } - edges { - cursor - node { - objType - id - fullName - status - unicefId - currency - entitlementQuantity - deliveredQuantity - deliveredQuantityUsd - deliveryDate - parent { - id - programName - } - verification { - id - receivedAmount - } - } - } - totalCount - } -} - `; - -/** - * __useAllPaymentRecordsAndPaymentsQuery__ - * - * To run a query within a React component, call `useAllPaymentRecordsAndPaymentsQuery` and pass it any options that fit your needs. - * When your component renders, `useAllPaymentRecordsAndPaymentsQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useAllPaymentRecordsAndPaymentsQuery({ - * variables: { - * household: // value for 'household' - * after: // value for 'after' - * before: // value for 'before' - * orderBy: // value for 'orderBy' - * first: // value for 'first' - * last: // value for 'last' - * businessArea: // value for 'businessArea' - * program: // value for 'program' - * }, - * }); - */ -export function useAllPaymentRecordsAndPaymentsQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: AllPaymentRecordsAndPaymentsQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(AllPaymentRecordsAndPaymentsDocument, options); - } -export function useAllPaymentRecordsAndPaymentsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(AllPaymentRecordsAndPaymentsDocument, options); - } -export function useAllPaymentRecordsAndPaymentsSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { - const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} - return Apollo.useSuspenseQuery(AllPaymentRecordsAndPaymentsDocument, options); - } -export type AllPaymentRecordsAndPaymentsQueryHookResult = ReturnType; -export type AllPaymentRecordsAndPaymentsLazyQueryHookResult = ReturnType; -export type AllPaymentRecordsAndPaymentsSuspenseQueryHookResult = ReturnType; -export type AllPaymentRecordsAndPaymentsQueryResult = Apollo.QueryResult; export const AllPaymentsForTableDocument = gql` - query AllPaymentsForTable($after: String, $before: String, $first: Int, $last: Int, $orderBy: String, $businessArea: String!, $paymentPlanId: String!) { + query AllPaymentsForTable($after: String, $before: String, $first: Int, $last: Int, $orderBy: String, $businessArea: String!, $paymentPlanId: String, $householdId: String) { allPayments( after: $after before: $before @@ -17609,6 +17288,7 @@ export const AllPaymentsForTableDocument = gql` orderBy: $orderBy businessArea: $businessArea paymentPlanId: $paymentPlanId + householdId: $householdId ) { pageInfo { hasNextPage @@ -17624,6 +17304,12 @@ export const AllPaymentsForTableDocument = gql` unicefId status vulnerabilityScore + parent { + program { + id + name + } + } household { id unicefId @@ -17707,6 +17393,7 @@ export const AllPaymentsForTableDocument = gql` * orderBy: // value for 'orderBy' * businessArea: // value for 'businessArea' * paymentPlanId: // value for 'paymentPlanId' + * householdId: // value for 'householdId' * }, * }); */ @@ -21681,8 +21368,6 @@ export type ResolversTypes = { BusinessAreaNode: ResolverTypeWrapper; BusinessAreaNodeConnection: ResolverTypeWrapper; BusinessAreaNodeEdge: ResolverTypeWrapper; - CashPlanAndPaymentPlanEdges: ResolverTypeWrapper; - CashPlanAndPaymentPlanNode: ResolverTypeWrapper; CategoryExtrasInput: CategoryExtrasInput; ChartDatasetNode: ResolverTypeWrapper; ChartDetailedDatasetsNode: ResolverTypeWrapper; @@ -21831,7 +21516,6 @@ export type ResolversTypes = { HouseholdOrgEnumerator: HouseholdOrgEnumerator; HouseholdRdiMergeStatus: HouseholdRdiMergeStatus; HouseholdRegistrationMethod: HouseholdRegistrationMethod; - HouseholdSelectionNode: ResolverTypeWrapper; HouseholdUpdateDataObjectType: HouseholdUpdateDataObjectType; ID: ResolverTypeWrapper; ImportDataDataType: ImportDataDataType; @@ -21896,9 +21580,6 @@ export type ResolversTypes = { PDUFieldInput: PduFieldInput; PDUSubtypeChoiceObject: ResolverTypeWrapper; PageInfo: ResolverTypeWrapper; - PageInfoNode: ResolverTypeWrapper; - PaginatedCashPlanAndPaymentPlanNode: ResolverTypeWrapper; - PaginatedPaymentRecordsAndPaymentsNode: ResolverTypeWrapper; PartnerNode: ResolverTypeWrapper; PartnerRoleNode: ResolverTypeWrapper; PartnerType: ResolverTypeWrapper; @@ -21917,8 +21598,6 @@ export type ResolversTypes = { PaymentPlanSupportingDocumentNode: ResolverTypeWrapper; PaymentPlanSupportingDocumentNodeConnection: ResolverTypeWrapper; PaymentPlanSupportingDocumentNodeEdge: ResolverTypeWrapper; - PaymentRecordAndPaymentNode: ResolverTypeWrapper; - PaymentRecordsAndPaymentsEdges: ResolverTypeWrapper; PaymentStatus: PaymentStatus; PaymentVerificationLogEntryNode: ResolverTypeWrapper; PaymentVerificationLogEntryNodeConnection: ResolverTypeWrapper; @@ -22178,8 +21857,6 @@ export type ResolversParentTypes = { BusinessAreaNode: BusinessAreaNode; BusinessAreaNodeConnection: BusinessAreaNodeConnection; BusinessAreaNodeEdge: BusinessAreaNodeEdge; - CashPlanAndPaymentPlanEdges: CashPlanAndPaymentPlanEdges; - CashPlanAndPaymentPlanNode: CashPlanAndPaymentPlanNode; CategoryExtrasInput: CategoryExtrasInput; ChartDatasetNode: ChartDatasetNode; ChartDetailedDatasetsNode: ChartDetailedDatasetsNode; @@ -22316,7 +21993,6 @@ export type ResolversParentTypes = { HouseholdNode: HouseholdNode; HouseholdNodeConnection: HouseholdNodeConnection; HouseholdNodeEdge: HouseholdNodeEdge; - HouseholdSelectionNode: HouseholdSelectionNode; HouseholdUpdateDataObjectType: HouseholdUpdateDataObjectType; ID: Scalars['ID']['output']; ImportDataNode: ImportDataNode; @@ -22365,9 +22041,6 @@ export type ResolversParentTypes = { PDUFieldInput: PduFieldInput; PDUSubtypeChoiceObject: PduSubtypeChoiceObject; PageInfo: PageInfo; - PageInfoNode: PageInfoNode; - PaginatedCashPlanAndPaymentPlanNode: PaginatedCashPlanAndPaymentPlanNode; - PaginatedPaymentRecordsAndPaymentsNode: PaginatedPaymentRecordsAndPaymentsNode; PartnerNode: PartnerNode; PartnerRoleNode: PartnerRoleNode; PartnerType: PartnerType; @@ -22383,8 +22056,6 @@ export type ResolversParentTypes = { PaymentPlanSupportingDocumentNode: PaymentPlanSupportingDocumentNode; PaymentPlanSupportingDocumentNodeConnection: PaymentPlanSupportingDocumentNodeConnection; PaymentPlanSupportingDocumentNodeEdge: PaymentPlanSupportingDocumentNodeEdge; - PaymentRecordAndPaymentNode: PaymentRecordAndPaymentNode; - PaymentRecordsAndPaymentsEdges: PaymentRecordsAndPaymentsEdges; PaymentVerificationLogEntryNode: PaymentVerificationLogEntryNode; PaymentVerificationLogEntryNodeConnection: PaymentVerificationLogEntryNodeConnection; PaymentVerificationLogEntryNodeEdge: PaymentVerificationLogEntryNodeEdge; @@ -22865,35 +22536,6 @@ export type BusinessAreaNodeEdgeResolvers; }; -export type CashPlanAndPaymentPlanEdgesResolvers = { - cursor?: Resolver, ParentType, ContextType>; - node?: Resolver, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type CashPlanAndPaymentPlanNodeResolvers = { - adminUrl?: Resolver, ParentType, ContextType>; - assistanceMeasurement?: Resolver, ParentType, ContextType>; - currency?: Resolver, ParentType, ContextType>; - dispersionDate?: Resolver, ParentType, ContextType>; - endDate?: Resolver, ParentType, ContextType>; - id?: Resolver, ParentType, ContextType>; - objType?: Resolver, ParentType, ContextType>; - programName?: Resolver, ParentType, ContextType>; - serviceProviderFullName?: Resolver, ParentType, ContextType>; - startDate?: Resolver, ParentType, ContextType>; - status?: Resolver, ParentType, ContextType>; - totalDeliveredQuantity?: Resolver, ParentType, ContextType>; - totalEntitledQuantity?: Resolver, ParentType, ContextType>; - totalNumberOfHouseholds?: Resolver, ParentType, ContextType>; - totalUndeliveredQuantity?: Resolver, ParentType, ContextType>; - unicefId?: Resolver, ParentType, ContextType>; - updatedAt?: Resolver, ParentType, ContextType>; - verificationPlans?: Resolver>>, ParentType, ContextType>; - verificationStatus?: Resolver, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; -}; - export type ChartDatasetNodeResolvers = { datasets?: Resolver>>, ParentType, ContextType>; labels?: Resolver>>, ParentType, ContextType>; @@ -23717,7 +23359,7 @@ export type GrievanceTicketNodeResolvers, ParentType, ContextType>; negativeFeedbackTicketDetails?: Resolver, ParentType, ContextType>; partner?: Resolver, ParentType, ContextType>; - paymentRecord?: Resolver, ParentType, ContextType>; + paymentRecord?: Resolver, ParentType, ContextType>; paymentVerificationTicketDetails?: Resolver, ParentType, ContextType>; positiveFeedbackTicketDetails?: Resolver, ParentType, ContextType>; priority?: Resolver, ParentType, ContextType>; @@ -23871,8 +23513,6 @@ export type HouseholdNodeResolvers, ParentType, ContextType>; sanctionListConfirmedMatch?: Resolver, ParentType, ContextType>; sanctionListPossibleMatch?: Resolver, ParentType, ContextType>; - selection?: Resolver, ParentType, ContextType>; - selections?: Resolver, ParentType, ContextType>; sensitiveTicketDetails?: Resolver>; size?: Resolver, ParentType, ContextType>; start?: Resolver, ParentType, ContextType>; @@ -23906,17 +23546,6 @@ export type HouseholdNodeEdgeResolvers; }; -export type HouseholdSelectionNodeResolvers = { - createdAt?: Resolver; - household?: Resolver; - id?: Resolver; - isMigrationHandled?: Resolver; - isOriginal?: Resolver; - updatedAt?: Resolver; - vulnerabilityScore?: Resolver, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; -}; - export type ImportDataNodeResolvers = { businessAreaSlug?: Resolver; createdAt?: Resolver; @@ -24390,28 +24019,6 @@ export type PageInfoResolvers; }; -export type PageInfoNodeResolvers = { - endCursor?: Resolver, ParentType, ContextType>; - hasNextPage?: Resolver, ParentType, ContextType>; - hasPreviousPage?: Resolver, ParentType, ContextType>; - startCursor?: Resolver, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type PaginatedCashPlanAndPaymentPlanNodeResolvers = { - edges?: Resolver>>, ParentType, ContextType>; - pageInfo?: Resolver, ParentType, ContextType>; - totalCount?: Resolver, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type PaginatedPaymentRecordsAndPaymentsNodeResolvers = { - edges?: Resolver>>, ParentType, ContextType>; - pageInfo?: Resolver, ParentType, ContextType>; - totalCount?: Resolver, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; -}; - export type PartnerNodeResolvers = { allowedBusinessAreas?: Resolver>; areaAccess?: Resolver, ParentType, ContextType>; @@ -24636,7 +24243,7 @@ export type PaymentPlanNodeResolvers, ParentType, ContextType>; supportingDocuments?: Resolver>>, ParentType, ContextType>; surveys?: Resolver>; - targetingCriteria?: Resolver, ParentType, ContextType>; + targetingCriteria?: Resolver; totalDeliveredQuantity?: Resolver, ParentType, ContextType>; totalDeliveredQuantityUsd?: Resolver, ParentType, ContextType>; totalEntitledQuantity?: Resolver, ParentType, ContextType>; @@ -24696,28 +24303,6 @@ export type PaymentPlanSupportingDocumentNodeEdgeResolvers; }; -export type PaymentRecordAndPaymentNodeResolvers = { - currency?: Resolver, ParentType, ContextType>; - deliveredQuantity?: Resolver, ParentType, ContextType>; - deliveredQuantityUsd?: Resolver, ParentType, ContextType>; - deliveryDate?: Resolver, ParentType, ContextType>; - entitlementQuantity?: Resolver, ParentType, ContextType>; - fullName?: Resolver, ParentType, ContextType>; - id?: Resolver, ParentType, ContextType>; - objType?: Resolver, ParentType, ContextType>; - parent?: Resolver, ParentType, ContextType>; - status?: Resolver, ParentType, ContextType>; - unicefId?: Resolver, ParentType, ContextType>; - verification?: Resolver, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type PaymentRecordsAndPaymentsEdgesResolvers = { - cursor?: Resolver, ParentType, ContextType>; - node?: Resolver, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; -}; - export type PaymentVerificationLogEntryNodeResolvers = { action?: Resolver; businessArea?: Resolver, ParentType, ContextType>; @@ -24970,7 +24555,6 @@ export type QueryResolvers, ParentType, ContextType, Partial>; allAreasTree?: Resolver>>, ParentType, ContextType, RequireFields>; allBusinessAreas?: Resolver, ParentType, ContextType, Partial>; - allCashPlansAndPaymentPlans?: Resolver, ParentType, ContextType, RequireFields>; allCollectorFieldsAttributes?: Resolver>>, ParentType, ContextType, Partial>; allDeliveryMechanisms?: Resolver>>, ParentType, ContextType>; allEditHouseholdFieldsAttributes?: Resolver>>, ParentType, ContextType>; @@ -24991,11 +24575,10 @@ export type QueryResolvers, ParentType, ContextType, Partial>; allMergedIndividuals?: Resolver, ParentType, ContextType, Partial>; allPaymentPlans?: Resolver, ParentType, ContextType, RequireFields>; - allPaymentRecordsAndPayments?: Resolver, ParentType, ContextType, RequireFields>; allPaymentVerificationLogEntries?: Resolver, ParentType, ContextType, RequireFields>; allPaymentVerificationPlan?: Resolver, ParentType, ContextType, Partial>; allPaymentVerifications?: Resolver, ParentType, ContextType, RequireFields>; - allPayments?: Resolver, ParentType, ContextType, RequireFields>; + allPayments?: Resolver, ParentType, ContextType, RequireFields>; allPduFields?: Resolver>>, ParentType, ContextType, RequireFields>; allPrograms?: Resolver, ParentType, ContextType, RequireFields>; allRapidProFlows?: Resolver>>, ParentType, ContextType, RequireFields>; @@ -25788,7 +25371,7 @@ export type TicketComplaintDetailsNodeResolvers; individual?: Resolver, ParentType, ContextType>; payment?: Resolver, ParentType, ContextType>; - paymentRecord?: Resolver, ParentType, ContextType>; + paymentRecord?: Resolver, ParentType, ContextType>; updatedAt?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; @@ -26074,7 +25657,7 @@ export type TicketSensitiveDetailsNodeResolvers; individual?: Resolver, ParentType, ContextType>; payment?: Resolver, ParentType, ContextType>; - paymentRecord?: Resolver, ParentType, ContextType>; + paymentRecord?: Resolver, ParentType, ContextType>; updatedAt?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; @@ -26383,8 +25966,6 @@ export type Resolvers = { BusinessAreaNode?: BusinessAreaNodeResolvers; BusinessAreaNodeConnection?: BusinessAreaNodeConnectionResolvers; BusinessAreaNodeEdge?: BusinessAreaNodeEdgeResolvers; - CashPlanAndPaymentPlanEdges?: CashPlanAndPaymentPlanEdgesResolvers; - CashPlanAndPaymentPlanNode?: CashPlanAndPaymentPlanNodeResolvers; ChartDatasetNode?: ChartDatasetNodeResolvers; ChartDetailedDatasetsNode?: ChartDetailedDatasetsNodeResolvers; ChartGrievanceTicketsNode?: ChartGrievanceTicketsNodeResolvers; @@ -26490,7 +26071,6 @@ export type Resolvers = { HouseholdNode?: HouseholdNodeResolvers; HouseholdNodeConnection?: HouseholdNodeConnectionResolvers; HouseholdNodeEdge?: HouseholdNodeEdgeResolvers; - HouseholdSelectionNode?: HouseholdSelectionNodeResolvers; ImportDataNode?: ImportDataNodeResolvers; ImportXLSXPaymentPlanPaymentListMutation?: ImportXlsxPaymentPlanPaymentListMutationResolvers; ImportXLSXPaymentPlanPaymentListPerFSPMutation?: ImportXlsxPaymentPlanPaymentListPerFspMutationResolvers; @@ -26527,9 +26107,6 @@ export type Resolvers = { OpenPaymentPlanMutation?: OpenPaymentPlanMutationResolvers; PDUSubtypeChoiceObject?: PduSubtypeChoiceObjectResolvers; PageInfo?: PageInfoResolvers; - PageInfoNode?: PageInfoNodeResolvers; - PaginatedCashPlanAndPaymentPlanNode?: PaginatedCashPlanAndPaymentPlanNodeResolvers; - PaginatedPaymentRecordsAndPaymentsNode?: PaginatedPaymentRecordsAndPaymentsNodeResolvers; PartnerNode?: PartnerNodeResolvers; PartnerRoleNode?: PartnerRoleNodeResolvers; PartnerType?: PartnerTypeResolvers; @@ -26545,8 +26122,6 @@ export type Resolvers = { PaymentPlanSupportingDocumentNode?: PaymentPlanSupportingDocumentNodeResolvers; PaymentPlanSupportingDocumentNodeConnection?: PaymentPlanSupportingDocumentNodeConnectionResolvers; PaymentPlanSupportingDocumentNodeEdge?: PaymentPlanSupportingDocumentNodeEdgeResolvers; - PaymentRecordAndPaymentNode?: PaymentRecordAndPaymentNodeResolvers; - PaymentRecordsAndPaymentsEdges?: PaymentRecordsAndPaymentsEdgesResolvers; PaymentVerificationLogEntryNode?: PaymentVerificationLogEntryNodeResolvers; PaymentVerificationLogEntryNodeConnection?: PaymentVerificationLogEntryNodeConnectionResolvers; PaymentVerificationLogEntryNodeEdge?: PaymentVerificationLogEntryNodeEdgeResolvers; diff --git a/src/frontend/src/apollo/fragments/GrievanceTicketFragment.ts b/src/frontend/src/apollo/fragments/GrievanceTicketFragment.ts index ac4c465e47..7fa812a32c 100644 --- a/src/frontend/src/apollo/fragments/GrievanceTicketFragment.ts +++ b/src/frontend/src/apollo/fragments/GrievanceTicketFragment.ts @@ -63,11 +63,9 @@ export const grievanceTicketDetailed = gql` unicefId deliveredQuantity entitlementQuantity - objType parent { id unicefId - objType } verification { id diff --git a/src/frontend/src/apollo/queries/paymentmodule/AllPaymentPlansForTable.ts b/src/frontend/src/apollo/queries/paymentmodule/AllPaymentPlansForTable.ts index 74d878055d..66c8d90582 100644 --- a/src/frontend/src/apollo/queries/paymentmodule/AllPaymentPlansForTable.ts +++ b/src/frontend/src/apollo/queries/paymentmodule/AllPaymentPlansForTable.ts @@ -23,6 +23,11 @@ export const AllPaymentPlansForTable = gql` $statusNot: String $isPaymentPlan: Boolean $isTargetPopulation: Boolean + $verificationStatus: [String] + $serviceProvider: String + $deliveryTypes: [String] + $startDate: Date + $endDate: Date ) { allPaymentPlans( after: $after @@ -46,6 +51,11 @@ export const AllPaymentPlansForTable = gql` statusNot: $statusNot isPaymentPlan: $isPaymentPlan isTargetPopulation: $isTargetPopulation + verificationStatus: $verificationStatus + serviceProvider: $serviceProvider + deliveryTypes: $deliveryTypes + startDate: $startDate + endDate: $endDate ) { pageInfo { hasNextPage diff --git a/src/frontend/src/apollo/queries/payments/AllCashPlansAndPaymentPlans.ts b/src/frontend/src/apollo/queries/payments/AllCashPlansAndPaymentPlans.ts deleted file mode 100644 index 2822b7355a..0000000000 --- a/src/frontend/src/apollo/queries/payments/AllCashPlansAndPaymentPlans.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { gql } from '@apollo/client'; - -export const AllCashPlansAndPaymentPlans = gql` - query allCashPlansAndPaymentPlans( - $businessArea: String! - $program: String - $search: String - $serviceProvider: String - $deliveryType: [String] - $verificationStatus: [String] - $startDateGte: String - $endDateLte: String - $orderBy: String - $first: Int - $last: Int - $before: String - $after: String - $isPaymentVerificationPage: Boolean - ) { - allCashPlansAndPaymentPlans( - businessArea: $businessArea - program: $program - search: $search - serviceProvider: $serviceProvider - deliveryType: $deliveryType - verificationStatus: $verificationStatus - startDateGte: $startDateGte - endDateLte: $endDateLte - orderBy: $orderBy - first: $first - last: $last - before: $before - after: $after - isPaymentVerificationPage: $isPaymentVerificationPage - ) { - pageInfo { - startCursor - endCursor - hasNextPage - hasPreviousPage - } - totalCount - edges { - cursor - node { - objType - id - unicefId - verificationStatus - status - currency - totalDeliveredQuantity - startDate - endDate - programName - updatedAt - verificationPlans { - id - createdAt - unicefId - } - totalNumberOfHouseholds - assistanceMeasurement - totalEntitledQuantity - totalUndeliveredQuantity - dispersionDate - serviceProviderFullName - } - } - } - } -`; diff --git a/src/frontend/src/apollo/queries/payments/AllPaymentRecordsAndPayments.ts b/src/frontend/src/apollo/queries/payments/AllPaymentRecordsAndPayments.ts index b59d87c8f8..e69de29bb2 100644 --- a/src/frontend/src/apollo/queries/payments/AllPaymentRecordsAndPayments.ts +++ b/src/frontend/src/apollo/queries/payments/AllPaymentRecordsAndPayments.ts @@ -1,56 +0,0 @@ -import { gql } from '@apollo/client'; - -export const AllPaymentRecordsAndPayments = gql` - query AllPaymentRecordsAndPayments( - $household: ID - $after: String - $before: String - $orderBy: String - $first: Int - $last: Int - $businessArea: String! - $program: String - ) { - allPaymentRecordsAndPayments( - household: $household - after: $after - before: $before - first: $first - last: $last - orderBy: $orderBy - businessArea: $businessArea - program: $program - ) { - pageInfo { - hasNextPage - hasPreviousPage - startCursor - endCursor - } - edges { - cursor - node { - objType - id - fullName - status - unicefId - currency - entitlementQuantity - deliveredQuantity - deliveredQuantityUsd - deliveryDate - parent { - id - programName - } - verification { - id - receivedAmount - } - } - } - totalCount - } - } -`; diff --git a/src/frontend/src/apollo/queries/payments/AllPaymentsForTable.ts b/src/frontend/src/apollo/queries/payments/AllPaymentsForTable.ts index 35e354d319..6f6d026680 100644 --- a/src/frontend/src/apollo/queries/payments/AllPaymentsForTable.ts +++ b/src/frontend/src/apollo/queries/payments/AllPaymentsForTable.ts @@ -8,7 +8,8 @@ export const AllPaymentsForTable = gql` $last: Int $orderBy: String $businessArea: String! - $paymentPlanId: String! + $paymentPlanId: String + $householdId: String ) { allPayments( after: $after @@ -18,6 +19,7 @@ export const AllPaymentsForTable = gql` orderBy: $orderBy businessArea: $businessArea paymentPlanId: $paymentPlanId + householdId: $householdId ) { pageInfo { hasNextPage @@ -33,6 +35,12 @@ export const AllPaymentsForTable = gql` unicefId status vulnerabilityScore + parent { + program { + id + name + } + } household { id unicefId diff --git a/src/frontend/src/components/grievances/GrievancesDetails/GrievancesDetails.tsx b/src/frontend/src/components/grievances/GrievancesDetails/GrievancesDetails.tsx index efca522002..46c2a66155 100644 --- a/src/frontend/src/components/grievances/GrievancesDetails/GrievancesDetails.tsx +++ b/src/frontend/src/components/grievances/GrievancesDetails/GrievancesDetails.tsx @@ -100,46 +100,15 @@ export function GrievancesDetails({ ); - const renderUrl = ( - obj, - objType: string, - href: string, - displayedId: string, - ): ReactElement => { - if (isAllPrograms) { - return <>{displayedId}; - } - - if (obj?.objType === objType) { - return {displayedId}; - } - - return <>-; - }; - - const getUrl = (objType: string, id: string): string => { - switch (objType) { - case 'PaymentRecord': - return `/${baseUrl}/payment-records/${id}`; - case 'Payment': - return `/${baseUrl}/payment-module/payments/${id}`; - case 'PaymentPlan': - return `/${baseUrl}/payment-module/payment-plans/${id}`; - case 'CashPlan': - return `/${baseUrl}/cashplans/${id}`; - default: - return ''; - } - }; - const renderPaymentUrl = (): ReactElement => { const paymentRecord = ticket?.paymentRecord; if (paymentRecord) { - return renderUrl( - paymentRecord, - paymentRecord.objType, - getUrl(paymentRecord.objType, paymentRecord.id), - paymentRecord.unicefId, + return ( + + {paymentRecord.unicefId} + ); } return <>-; @@ -148,11 +117,12 @@ export function GrievancesDetails({ const renderPaymentPlanUrl = (): ReactElement => { const parent = ticket?.paymentRecord?.parent; if (parent) { - return renderUrl( - parent, - parent.objType, - getUrl(parent.objType, parent.id), - parent.unicefId, + return ( + + {parent.unicefId} + ); } return <>-; @@ -161,10 +131,8 @@ export function GrievancesDetails({ const renderPaymentPlanVerificationUrl = (): ReactElement => { const parent = ticket?.paymentRecord?.parent; if (parent) { - const url = `/${baseUrl}/payment-verification/${ - parent.objType === 'CashPlan' ? 'cash-plan' : 'payment-plan' - }/${parent.id}`; - return renderUrl(parent, parent.objType, url, parent.unicefId); + const url = `/${baseUrl}/payment-verification/payment-plan/${parent.id}`; + return {parent.unicefId}; } return <>-; }; diff --git a/src/frontend/src/components/grievances/GrievancesSidebar/GrievancesSidebar.tsx b/src/frontend/src/components/grievances/GrievancesSidebar/GrievancesSidebar.tsx index fa60d6b2d2..41d8db0360 100644 --- a/src/frontend/src/components/grievances/GrievancesSidebar/GrievancesSidebar.tsx +++ b/src/frontend/src/components/grievances/GrievancesSidebar/GrievancesSidebar.tsx @@ -107,7 +107,7 @@ export function GrievancesSidebar({ ticket.paymentVerificationTicketDetails?.paymentVerifications?.edges.map( (edge) => ({ id: edge.node.id, - caId: ticket.paymentRecord.unicefId, + paymentId: ticket.paymentRecord.unicefId, }), ) || [] } diff --git a/src/frontend/src/components/grievances/LookUps/LookUpPaymentRecordTable/LookUpPaymentRecordTable.tsx b/src/frontend/src/components/grievances/LookUps/LookUpPaymentRecordTable/LookUpPaymentRecordTable.tsx index b0fc12d96b..b16bc94674 100644 --- a/src/frontend/src/components/grievances/LookUps/LookUpPaymentRecordTable/LookUpPaymentRecordTable.tsx +++ b/src/frontend/src/components/grievances/LookUps/LookUpPaymentRecordTable/LookUpPaymentRecordTable.tsx @@ -1,9 +1,9 @@ import { MouseEvent, ReactElement, useState } from 'react'; import { useLocation } from 'react-router-dom'; import { - AllPaymentRecordsAndPaymentsQueryVariables, - PaymentRecordAndPaymentNode, - useAllPaymentRecordsAndPaymentsQuery, + AllPaymentsForTableQueryVariables, + PaymentNode, + useAllPaymentsForTableQuery, } from '@generated/graphql'; import { UniversalTable } from '@containers/tables/UniversalTable'; import { useBaseUrl } from '@hooks/useBaseUrl'; @@ -24,7 +24,7 @@ export function LookUpPaymentRecordTable({ const location = useLocation(); const isEditTicket = location.pathname.indexOf('edit-ticket') !== -1; const initialVariables = { - household: initialValues?.selectedHousehold?.id, + householdId: initialValues?.selectedHousehold?.id, businessArea, program: programId === 'all' ? null : programId, }; @@ -62,13 +62,10 @@ export function LookUpPaymentRecordTable({ if (isEditTicket) { return ( - + headCells={headCells} - query={useAllPaymentRecordsAndPaymentsQuery} - queriedObjectName="allPaymentRecordsAndPayments" + query={useAllPaymentsForTableQuery} + queriedObjectName="allPayments" initialVariables={initialVariables} renderRow={(row) => ( + headCells={headCells} - query={useAllPaymentRecordsAndPaymentsQuery} - queriedObjectName="allPaymentRecordsAndPayments" + query={useAllPaymentsForTableQuery} + queriedObjectName="allPayments" initialVariables={initialVariables} onSelectAllClick={handleSelectAllCheckboxesClick} numSelected={numSelected} diff --git a/src/frontend/src/components/grievances/LookUps/LookUpPaymentRecordTable/LookUpPaymentRecordTableHeadCells.tsx b/src/frontend/src/components/grievances/LookUps/LookUpPaymentRecordTable/LookUpPaymentRecordTableHeadCells.tsx index d0d305e5b1..963203c9e5 100644 --- a/src/frontend/src/components/grievances/LookUps/LookUpPaymentRecordTable/LookUpPaymentRecordTableHeadCells.tsx +++ b/src/frontend/src/components/grievances/LookUps/LookUpPaymentRecordTable/LookUpPaymentRecordTableHeadCells.tsx @@ -1,7 +1,7 @@ import { HeadCell } from '@core/Table/EnhancedTableHead'; -import { PaymentRecordAndPaymentNode } from '@generated/graphql'; +import { PaymentNode } from '@generated/graphql'; -export const headCells: HeadCell[] = [ +export const headCells: HeadCell[] = [ { disablePadding: false, label: 'Payment ID', diff --git a/src/frontend/src/components/grievances/LookUps/LookUpPaymentRecordTable/LookUpPaymentRecordTableRow.tsx b/src/frontend/src/components/grievances/LookUps/LookUpPaymentRecordTable/LookUpPaymentRecordTableRow.tsx index c5f1726c19..de9bc634e3 100644 --- a/src/frontend/src/components/grievances/LookUps/LookUpPaymentRecordTable/LookUpPaymentRecordTableRow.tsx +++ b/src/frontend/src/components/grievances/LookUps/LookUpPaymentRecordTable/LookUpPaymentRecordTableRow.tsx @@ -1,6 +1,6 @@ import { Checkbox } from '@mui/material'; import TableCell from '@mui/material/TableCell'; -import { PaymentRecordAndPaymentNode } from '@generated/graphql'; +import { PaymentNode } from '@generated/graphql'; import { useBaseUrl } from '@hooks/useBaseUrl'; import { formatCurrencyWithSymbol, paymentStatusToColor } from '@utils/utils'; import { BlackLink } from '@core/BlackLink'; @@ -9,12 +9,12 @@ import { ClickableTableRow } from '@core/Table/ClickableTableRow'; import { MouseEvent, ReactElement } from 'react'; interface LookUpPaymentRecordTableRowProps { - paymentRecord: PaymentRecordAndPaymentNode; + paymentRecord: PaymentNode; openInNewTab: boolean; - selected: Array; + selected: Array; checkboxClickHandler: ( event: MouseEvent | MouseEvent, - selectedPaymentRecord: PaymentRecordAndPaymentNode, + selectedPaymentRecord: PaymentNode, ) => void; } @@ -28,12 +28,10 @@ export function LookUpPaymentRecordTableRow({ selected.some((selectedItem) => selectedItem.id === item.id); const paymentRecordIsSelected = isItemSelected(paymentRecord); const received = paymentRecord?.verification?.receivedAmount; - const renderUrl = (objType): string => { - if (objType === 'Payment') { - return `/${baseUrl}/payment-module/payments/${paymentRecord.id}`; - } - return `/${baseUrl}/payment-records/${paymentRecord.id}`; + const renderUrl = (): string => { + return `/${baseUrl}/payment-module/payments/${paymentRecord.id}`; }; + const url = renderUrl(); return ( {!isAllPrograms ? ( - - {paymentRecord.unicefId} - + {paymentRecord.unicefId} ) : ( {paymentRecord.unicefId} )} @@ -69,7 +65,7 @@ export function LookUpPaymentRecordTableRow({ '-' )} - {paymentRecord.parent.programName} + {paymentRecord.parent.program.name} {formatCurrencyWithSymbol( paymentRecord.deliveredQuantity, diff --git a/src/frontend/src/components/grievances/PaymentIds.tsx b/src/frontend/src/components/grievances/PaymentIds.tsx index 8a8768b595..b53ecf4d9c 100644 --- a/src/frontend/src/components/grievances/PaymentIds.tsx +++ b/src/frontend/src/components/grievances/PaymentIds.tsx @@ -1,9 +1,6 @@ import { Box, Typography } from '@mui/material'; import { useTranslation } from 'react-i18next'; -import { - PaymentRecordAndPaymentNode, - PaymentVerificationNode, -} from '@generated/graphql'; +import { PaymentNode, PaymentVerificationNode } from '@generated/graphql'; import { useBaseUrl } from '@hooks/useBaseUrl'; import { ContentLink } from '@core/ContentLink'; import { Title } from '@core/Title'; @@ -12,7 +9,7 @@ import { ReactElement } from 'react'; type VerificationId = { id: PaymentVerificationNode['id']; - caId: PaymentRecordAndPaymentNode['unicefId']; + paymentId: PaymentNode['id']; }; interface PaymentIdsProps { @@ -29,7 +26,7 @@ export function PaymentIds({ verifications }: PaymentIdsProps): ReactElement { - {verification.caId} + {verification.paymentId} ), diff --git a/src/frontend/src/components/grievances/utils/editGrievanceUtils.ts b/src/frontend/src/components/grievances/utils/editGrievanceUtils.ts index 794d6244e3..eb56bc2c3a 100644 --- a/src/frontend/src/components/grievances/utils/editGrievanceUtils.ts +++ b/src/frontend/src/components/grievances/utils/editGrievanceUtils.ts @@ -1,8 +1,5 @@ import camelCase from 'lodash/camelCase'; -import { - GrievanceTicketQuery, - PaymentRecordAndPaymentNode, -} from '@generated/graphql'; +import { GrievanceTicketQuery, PaymentNode } from '@generated/graphql'; import { GRIEVANCE_CATEGORIES, GRIEVANCE_ISSUE_TYPES } from '@utils/constants'; import { camelizeArrayObjects, @@ -27,8 +24,8 @@ interface EditValuesTypes { selectedHousehold?; selectedIndividual?; selectedPaymentRecords: Pick< - PaymentRecordAndPaymentNode, - 'id' | 'unicefId' | 'deliveredQuantity' | 'entitlementQuantity' | 'objType' + PaymentNode, + 'id' | 'deliveredQuantity' | 'entitlementQuantity' >[]; paymentRecord?: string; selectedLinkedTickets: string[]; diff --git a/src/frontend/src/components/paymentmodule/EditPaymentPlan/EditPaymentPlanHeader/__snapshots__/EditPaymentPlanHeader.test.tsx.snap b/src/frontend/src/components/paymentmodule/EditPaymentPlan/EditPaymentPlanHeader/__snapshots__/EditPaymentPlanHeader.test.tsx.snap index c1bfb90da4..fb77e991ee 100644 --- a/src/frontend/src/components/paymentmodule/EditPaymentPlan/EditPaymentPlanHeader/__snapshots__/EditPaymentPlanHeader.test.tsx.snap +++ b/src/frontend/src/components/paymentmodule/EditPaymentPlan/EditPaymentPlanHeader/__snapshots__/EditPaymentPlanHeader.test.tsx.snap @@ -40,7 +40,7 @@ exports[`components/paymentmodule/EditPaymentPlanHeader should render 1`] = ` Payment Module @@ -59,10 +59,10 @@ exports[`components/paymentmodule/EditPaymentPlanHeader should render 1`] = `
- Payment Plan + Follow-up Payment Plan ID - PP-0060-22-00000001 + PP-0060-25-00000007
@@ -70,10 +70,10 @@ exports[`components/paymentmodule/EditPaymentPlanHeader should render 1`] = ` class="sc-dntaoT gQSLBb" >
- LOCKED + ACCEPTED
@@ -97,7 +97,7 @@ exports[`components/paymentmodule/EditPaymentPlanHeader should render 1`] = ` > Cancel diff --git a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessRow.test.tsx b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessRow.test.tsx index 6a14b3ecdc..68d4822fc1 100644 --- a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessRow.test.tsx +++ b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessRow.test.tsx @@ -7,7 +7,9 @@ describe('components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/Acceptan const { container } = render( , ); expect(container).toMatchSnapshot(); diff --git a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessRow.tsx b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessRow.tsx index 961c0dfc9d..f9fba0bad4 100644 --- a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessRow.tsx +++ b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessRow.tsx @@ -54,7 +54,7 @@ export function AcceptanceProcessRow({ - {actions.approval.length > 0 && ( + {actions?.approval?.length > 0 && ( , diff --git a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessStepper/AcceptanceProcessStepper.tsx b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessStepper/AcceptanceProcessStepper.tsx index 94e8aeca40..6abcf595a3 100644 --- a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessStepper/AcceptanceProcessStepper.tsx +++ b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessStepper/AcceptanceProcessStepper.tsx @@ -23,10 +23,10 @@ export function AcceptanceProcessStepper({ const steps = [ { name: `${t('Approval')} (${ - actions.approval.length + actions?.approval?.length }/${approvalNumberRequired})`, hasError: rejectedOn === 'IN_APPROVAL', - isCompleted: actions.approval.length === approvalNumberRequired, + isCompleted: actions?.approval?.length === approvalNumberRequired, }, { name: `${t('Authorization')} (${ @@ -48,7 +48,7 @@ export function AcceptanceProcessStepper({ if (actions.authorization.length === authorizationNumberRequired) { return 2; } - if (actions.approval.length === approvalNumberRequired) { + if (actions.approval?.length === approvalNumberRequired) { return 1; } return 0; diff --git a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessStepper/__snapshots__/AcceptanceProcessStepper.test.tsx.snap b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessStepper/__snapshots__/AcceptanceProcessStepper.test.tsx.snap index 3810b41072..a21b8586e9 100644 --- a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessStepper/__snapshots__/AcceptanceProcessStepper.test.tsx.snap +++ b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessStepper/__snapshots__/AcceptanceProcessStepper.test.tsx.snap @@ -38,99 +38,79 @@ exports[`components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/Acceptanc
- Authorization (0/1) + Authorization (1/1)
- Finance Release (0/1) + Finance Release (1/1) @@ -177,99 +157,79 @@ exports[`components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/Acceptanc
- Authorization (0/1) + Authorization (1/1)
- Finance Release (0/1) + Finance Release (1/1) @@ -316,99 +276,79 @@ exports[`components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/Acceptanc
- Authorization (0/1) + Authorization (1/1)
- Finance Release (0/1) + Finance Release (1/1) @@ -455,99 +395,79 @@ exports[`components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/Acceptanc
- Authorization (0/1) + Authorization (1/1)
- Finance Release (0/1) + Finance Release (1/1) diff --git a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/GreyInfoCard.test.tsx b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/GreyInfoCard.test.tsx index 80f5fb53ed..0c99715ca5 100644 --- a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/GreyInfoCard.test.tsx +++ b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/GreyInfoCard.test.tsx @@ -9,7 +9,8 @@ describe('components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/GreyInfo topMessage="Test top message" topDate="2022-01-01" approvals={ - fakeApolloPaymentPlan.approvalProcess.edges[0].node.actions.approval + fakeApolloPaymentPlan.approvalProcess?.edges[0]?.node?.actions + ?.approval } />, ); diff --git a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/GreyInfoCard.tsx b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/GreyInfoCard.tsx index 32cd8567de..f5def878a9 100644 --- a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/GreyInfoCard.tsx +++ b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/GreyInfoCard.tsx @@ -35,7 +35,7 @@ export function GreyInfoCard({ topDate, approvals, }: GreyInfoCardProps): ReactElement { - const mappedApprovals = approvals.map((action) => { + const mappedApprovals = approvals?.map((action) => { const { info, createdAt, comment, createdBy } = action; return ( info && ( diff --git a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/__snapshots__/AcceptanceProcessRow.test.tsx.snap b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/__snapshots__/AcceptanceProcessRow.test.tsx.snap index 96ca7a7dec..54688860d2 100644 --- a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/__snapshots__/AcceptanceProcessRow.test.tsx.snap +++ b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/__snapshots__/AcceptanceProcessRow.test.tsx.snap @@ -41,99 +41,79 @@ exports[`components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/Acceptanc
- Authorization (0/1) + Authorization (1/1)
- Finance Release (0/1) + Finance Release (1/1) @@ -157,9 +137,9 @@ exports[`components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/Acceptanc Sent for approval by Root Rootkowski on
@@ -178,9 +158,9 @@ exports[`components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/Acceptanc > on @@ -197,10 +177,110 @@ exports[`components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/Acceptanc
+ > +
+
+
+ Sent for authorization by Root Rootkowski + on + +
+
+
+
+ Authorized by Root Rootkowski +
+
+ on + +
+
+
+
+
+
+
+
+
+ > +
+
+
+ Sent for review by Root Rootkowski + on + +
+
+
+
+ Released by Root Rootkowski +
+
+ on + +
+
+
+
+
+
+
+
+
diff --git a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/__snapshots__/GreyInfoCard.test.tsx.snap b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/__snapshots__/GreyInfoCard.test.tsx.snap index fe59479685..4e5749d0aa 100644 --- a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/__snapshots__/GreyInfoCard.test.tsx.snap +++ b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/__snapshots__/GreyInfoCard.test.tsx.snap @@ -35,9 +35,9 @@ exports[`components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/GreyInfoC > on diff --git a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/Entitlement/__snapshots__/Entitlement.test.tsx.snap b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/Entitlement/__snapshots__/Entitlement.test.tsx.snap index 4ccc030090..ff87b96150 100644 --- a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/Entitlement/__snapshots__/Entitlement.test.tsx.snap +++ b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/Entitlement/__snapshots__/Entitlement.test.tsx.snap @@ -38,40 +38,37 @@ exports[`components/paymentmodule/PaymentPlanDetails/Entitlement should render 1 class="MuiBox-root css-1itv5e3" >
Export Xlsx -

- 2691.69 PLN (376 USD) + 424 USD (424 USD)

diff --git a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/FspSection/FspSection.tsx b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/FspSection/FspSection.tsx index c602be5d4d..855acd9e2f 100644 --- a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/FspSection/FspSection.tsx +++ b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/FspSection/FspSection.tsx @@ -23,7 +23,7 @@ export const FspSection = ({ const { isActiveProgram } = useProgramContext(); const { deliveryMechanisms, isFollowUp } = paymentPlan; - const showFspDisplay = deliveryMechanisms.length; + const showFspDisplay = deliveryMechanisms?.length; const shouldDisableSetUpFsp = (): boolean => { if (paymentPlan.isFollowUp) { return false; diff --git a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/FspSection/VolumeByDeliveryMechanismSection/VolumeByDeliveryMechanismSection.tsx b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/FspSection/VolumeByDeliveryMechanismSection/VolumeByDeliveryMechanismSection.tsx index 70016ad6e6..7c2b4fa8e7 100644 --- a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/FspSection/VolumeByDeliveryMechanismSection/VolumeByDeliveryMechanismSection.tsx +++ b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/FspSection/VolumeByDeliveryMechanismSection/VolumeByDeliveryMechanismSection.tsx @@ -57,7 +57,7 @@ export const VolumeByDeliveryMechanismSection: FC< const { t } = useTranslation(); const { volumeByDeliveryMechanism } = paymentPlan; - const mappedDeliveryMechanism = volumeByDeliveryMechanism.map( + const mappedDeliveryMechanism = volumeByDeliveryMechanism?.map( (vdm, index) => ( - Cash (Miranda Ltd) + Cash (Test FSP 1)
- 0 PLN (0 USD) - -
- - - -
-
-
- - In Kind (Frazier-Watson) - -
- - 0 PLN (0 USD) - -
-
-
-
-
- -
-
- - In Kind - -
- - Frazier-Watson - -
-
-
-
-
- - Transfer - -
- - Bray Group + Test FSP 1
@@ -135,70 +81,16 @@ exports[`components/paymentmodule/PaymentPlanDetails/FspSection should render Ed class="sc-fAUdSK goVbUg" color="textSecondary" > - Cash (Miranda Ltd) - -
- - 0 PLN (0 USD) - -
-
- - -
-
-
- - In Kind (Frazier-Watson) - -
- - 0 PLN (0 USD) - -
-
-
-
- diff --git a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/ImportXlsxPaymentPlanPaymentListPerFsp/__snapshots__/ImportXlsxPaymentPlanPaymentListPerFsp.test.tsx.snap b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/ImportXlsxPaymentPlanPaymentListPerFsp/__snapshots__/ImportXlsxPaymentPlanPaymentListPerFsp.test.tsx.snap index e84441b1b4..2698a54dde 100644 --- a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/ImportXlsxPaymentPlanPaymentListPerFsp/__snapshots__/ImportXlsxPaymentPlanPaymentListPerFsp.test.tsx.snap +++ b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/ImportXlsxPaymentPlanPaymentListPerFsp/__snapshots__/ImportXlsxPaymentPlanPaymentListPerFsp.test.tsx.snap @@ -2,4 +2,37 @@ exports[`components/paymentmodule/PaymentPlanDetails/ImportXlsxPaymentPlanPaymentListPerFsp should not render 1`] = `
`; -exports[`components/paymentmodule/PaymentPlanDetails/ImportXlsxPaymentPlanPaymentListPerFsp should render 1`] = `
`; +exports[`components/paymentmodule/PaymentPlanDetails/ImportXlsxPaymentPlanPaymentListPerFsp should render 1`] = ` +
+
+ +
+
+`; diff --git a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/PaymentPlanDetails/__snapshots__/PaymentPlanDetails.test.tsx.snap b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/PaymentPlanDetails/__snapshots__/PaymentPlanDetails.test.tsx.snap index ffa4295bd1..046179b444 100644 --- a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/PaymentPlanDetails/__snapshots__/PaymentPlanDetails.test.tsx.snap +++ b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/PaymentPlanDetails/__snapshots__/PaymentPlanDetails.test.tsx.snap @@ -43,7 +43,7 @@ exports[`components/paymentmodule/PaymentPlanDetails/PaymentPlanDetails should r class="sc-dntaoT dIDHTF" color="textSecondary" > - Matthew Sosa + Root Rootkowski
@@ -67,9 +67,9 @@ exports[`components/paymentmodule/PaymentPlanDetails/PaymentPlanDetails should r >
- Already attention fear well hit instead person. + Test Program @@ -94,8 +94,10 @@ exports[`components/paymentmodule/PaymentPlanDetails/PaymentPlanDetails should r > + href="/afghanistan/programs/UHJvZ3JhbU5vZGU6NmI1OTE1OTktYmNhNy00NDVhLWJmZjItYWU5MTUyMjMxZGFm/target-population/UGF5bWVudFBsYW5Ob2RlOjU4MmE3ZTYzLTRkZGEtNDQ3Zi1hYWFhLTQzYWJmMzI0ZTViMw==" + > + Reconciled Payment Plan Follow Up + @@ -117,7 +119,7 @@ exports[`components/paymentmodule/PaymentPlanDetails/PaymentPlanDetails should r class="sc-dntaoT dIDHTF" color="textSecondary" > - PLN + USD @@ -139,11 +141,7 @@ exports[`components/paymentmodule/PaymentPlanDetails/PaymentPlanDetails should r class="sc-dntaoT dIDHTF" color="textSecondary" > - + - @@ -165,11 +163,7 @@ exports[`components/paymentmodule/PaymentPlanDetails/PaymentPlanDetails should r class="sc-dntaoT dIDHTF" color="textSecondary" > - + - @@ -192,9 +186,9 @@ exports[`components/paymentmodule/PaymentPlanDetails/PaymentPlanDetails should r color="textSecondary" > @@ -218,9 +212,9 @@ exports[`components/paymentmodule/PaymentPlanDetails/PaymentPlanDetails should r color="textSecondary" > @@ -242,7 +236,12 @@ exports[`components/paymentmodule/PaymentPlanDetails/PaymentPlanDetails should r
- - + + 1 +
diff --git a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/PaymentPlanDetailsHeader/ApprovePaymentPlan.tsx b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/PaymentPlanDetailsHeader/ApprovePaymentPlan.tsx index ce904f7437..68a73bdad1 100644 --- a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/PaymentPlanDetailsHeader/ApprovePaymentPlan.tsx +++ b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/PaymentPlanDetailsHeader/ApprovePaymentPlan.tsx @@ -55,7 +55,7 @@ export function ApprovePaymentPlan({ paymentPlan.approvalProcess?.edges[0]?.node.approvalNumberRequired; const approvalsCount = - paymentPlan.approvalProcess?.edges[0]?.node.actions.approval.length; + paymentPlan.approvalProcess?.edges[0]?.node.actions?.approval?.length; return approvalNumberRequired - 1 === approvalsCount; }; diff --git a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/PaymentPlanDetailsHeader/LockFspPaymentPlan.tsx b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/PaymentPlanDetailsHeader/LockFspPaymentPlan.tsx index 95a14efe6b..c32fd92c7e 100644 --- a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/PaymentPlanDetailsHeader/LockFspPaymentPlan.tsx +++ b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/PaymentPlanDetailsHeader/LockFspPaymentPlan.tsx @@ -40,7 +40,7 @@ export function LockFspPaymentPlan({ ); const canLockFsp = - paymentPlan.deliveryMechanisms.length > 0 && + paymentPlan?.deliveryMechanisms?.length > 0 && hasPermissions(PERMISSIONS.PM_LOCK_AND_UNLOCK_FSP, permissions); return ( diff --git a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/PaymentPlanDetailsResults/__snapshots__/PaymentPlanDetailsResults.test.tsx.snap b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/PaymentPlanDetailsResults/__snapshots__/PaymentPlanDetailsResults.test.tsx.snap index 0fe8e97498..8b036312f4 100644 --- a/src/frontend/src/components/paymentmodule/PaymentPlanDetails/PaymentPlanDetailsResults/__snapshots__/PaymentPlanDetailsResults.test.tsx.snap +++ b/src/frontend/src/components/paymentmodule/PaymentPlanDetails/PaymentPlanDetailsResults/__snapshots__/PaymentPlanDetailsResults.test.tsx.snap @@ -74,7 +74,7 @@ exports[`components/paymentmodule/PaymentPlanDetails/PaymentPlanDetailsHeader/Pa class="sc-gtLWhw dynQwi" color="textSecondary" > - 1 + 2 @@ -188,7 +188,7 @@ exports[`components/paymentmodule/PaymentPlanDetails/PaymentPlanDetailsHeader/Pa
- 1 + 2
@@ -218,7 +218,7 @@ exports[`components/paymentmodule/PaymentPlanDetails/PaymentPlanDetailsHeader/Pa
- 3 + 10
diff --git a/src/frontend/src/components/paymentmodulepeople/EditPaymentPlan/EditPaymentPlanHeader/__snapshots__/EditPaymentPlanHeader.test.tsx.snap b/src/frontend/src/components/paymentmodulepeople/EditPaymentPlan/EditPaymentPlanHeader/__snapshots__/EditPaymentPlanHeader.test.tsx.snap index c1bfb90da4..fb77e991ee 100644 --- a/src/frontend/src/components/paymentmodulepeople/EditPaymentPlan/EditPaymentPlanHeader/__snapshots__/EditPaymentPlanHeader.test.tsx.snap +++ b/src/frontend/src/components/paymentmodulepeople/EditPaymentPlan/EditPaymentPlanHeader/__snapshots__/EditPaymentPlanHeader.test.tsx.snap @@ -40,7 +40,7 @@ exports[`components/paymentmodule/EditPaymentPlanHeader should render 1`] = ` Payment Module @@ -59,10 +59,10 @@ exports[`components/paymentmodule/EditPaymentPlanHeader should render 1`] = `
- Payment Plan + Follow-up Payment Plan ID - PP-0060-22-00000001 + PP-0060-25-00000007
@@ -70,10 +70,10 @@ exports[`components/paymentmodule/EditPaymentPlanHeader should render 1`] = ` class="sc-dntaoT gQSLBb" >
- LOCKED + ACCEPTED
@@ -97,7 +97,7 @@ exports[`components/paymentmodule/EditPaymentPlanHeader should render 1`] = ` > Cancel diff --git a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessRow.test.tsx b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessRow.test.tsx index 6a14b3ecdc..68d4822fc1 100644 --- a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessRow.test.tsx +++ b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessRow.test.tsx @@ -7,7 +7,9 @@ describe('components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/Acceptan const { container } = render( , ); expect(container).toMatchSnapshot(); diff --git a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessRow.tsx b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessRow.tsx index 961c0dfc9d..f9fba0bad4 100644 --- a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessRow.tsx +++ b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessRow.tsx @@ -54,7 +54,7 @@ export function AcceptanceProcessRow({ - {actions.approval.length > 0 && ( + {actions?.approval?.length > 0 && ( { const { container } = render( , ); await act(() => wait(0)); // wait for response @@ -19,7 +21,7 @@ describe('components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/Acceptan const { container } = render( , @@ -31,7 +33,7 @@ describe('components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/Acceptan const { container } = render( , @@ -43,7 +45,7 @@ describe('components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/Acceptan const { container } = render( , diff --git a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessStepper/AcceptanceProcessStepper.tsx b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessStepper/AcceptanceProcessStepper.tsx index 94e8aeca40..adc645f844 100644 --- a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessStepper/AcceptanceProcessStepper.tsx +++ b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessStepper/AcceptanceProcessStepper.tsx @@ -23,10 +23,10 @@ export function AcceptanceProcessStepper({ const steps = [ { name: `${t('Approval')} (${ - actions.approval.length + actions?.approval?.length }/${approvalNumberRequired})`, hasError: rejectedOn === 'IN_APPROVAL', - isCompleted: actions.approval.length === approvalNumberRequired, + isCompleted: actions?.approval?.length === approvalNumberRequired, }, { name: `${t('Authorization')} (${ @@ -48,7 +48,7 @@ export function AcceptanceProcessStepper({ if (actions.authorization.length === authorizationNumberRequired) { return 2; } - if (actions.approval.length === approvalNumberRequired) { + if (actions?.approval?.length === approvalNumberRequired) { return 1; } return 0; diff --git a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessStepper/__snapshots__/AcceptanceProcessStepper.test.tsx.snap b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessStepper/__snapshots__/AcceptanceProcessStepper.test.tsx.snap index 3810b41072..a21b8586e9 100644 --- a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessStepper/__snapshots__/AcceptanceProcessStepper.test.tsx.snap +++ b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/AcceptanceProcessStepper/__snapshots__/AcceptanceProcessStepper.test.tsx.snap @@ -38,99 +38,79 @@ exports[`components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/Acceptanc
- Authorization (0/1) + Authorization (1/1)
- Finance Release (0/1) + Finance Release (1/1) @@ -177,99 +157,79 @@ exports[`components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/Acceptanc
- Authorization (0/1) + Authorization (1/1)
- Finance Release (0/1) + Finance Release (1/1) @@ -316,99 +276,79 @@ exports[`components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/Acceptanc
- Authorization (0/1) + Authorization (1/1)
- Finance Release (0/1) + Finance Release (1/1) @@ -455,99 +395,79 @@ exports[`components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/Acceptanc
- Authorization (0/1) + Authorization (1/1)
- Finance Release (0/1) + Finance Release (1/1) diff --git a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/GreyInfoCard.test.tsx b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/GreyInfoCard.test.tsx index 80f5fb53ed..3bf6461125 100644 --- a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/GreyInfoCard.test.tsx +++ b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/GreyInfoCard.test.tsx @@ -9,7 +9,8 @@ describe('components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/GreyInfo topMessage="Test top message" topDate="2022-01-01" approvals={ - fakeApolloPaymentPlan.approvalProcess.edges[0].node.actions.approval + fakeApolloPaymentPlan?.approvalProcess?.edges[0]?.node?.actions + ?.approval } />, ); diff --git a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/GreyInfoCard.tsx b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/GreyInfoCard.tsx index 32cd8567de..f5def878a9 100644 --- a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/GreyInfoCard.tsx +++ b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/GreyInfoCard.tsx @@ -35,7 +35,7 @@ export function GreyInfoCard({ topDate, approvals, }: GreyInfoCardProps): ReactElement { - const mappedApprovals = approvals.map((action) => { + const mappedApprovals = approvals?.map((action) => { const { info, createdAt, comment, createdBy } = action; return ( info && ( diff --git a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/__snapshots__/AcceptanceProcessRow.test.tsx.snap b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/__snapshots__/AcceptanceProcessRow.test.tsx.snap index 96ca7a7dec..54688860d2 100644 --- a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/__snapshots__/AcceptanceProcessRow.test.tsx.snap +++ b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/__snapshots__/AcceptanceProcessRow.test.tsx.snap @@ -41,99 +41,79 @@ exports[`components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/Acceptanc
- Authorization (0/1) + Authorization (1/1)
- Finance Release (0/1) + Finance Release (1/1) @@ -157,9 +137,9 @@ exports[`components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/Acceptanc Sent for approval by Root Rootkowski on
@@ -178,9 +158,9 @@ exports[`components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/Acceptanc > on @@ -197,10 +177,110 @@ exports[`components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/Acceptanc
+ > +
+
+
+ Sent for authorization by Root Rootkowski + on + +
+
+
+
+ Authorized by Root Rootkowski +
+
+ on + +
+
+
+
+
+
+
+
+
+ > +
+
+
+ Sent for review by Root Rootkowski + on + +
+
+
+
+ Released by Root Rootkowski +
+
+ on + +
+
+
+
+
+
+
+
+
diff --git a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/__snapshots__/GreyInfoCard.test.tsx.snap b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/__snapshots__/GreyInfoCard.test.tsx.snap index fe59479685..4e5749d0aa 100644 --- a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/__snapshots__/GreyInfoCard.test.tsx.snap +++ b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/AcceptanceProcess/__snapshots__/GreyInfoCard.test.tsx.snap @@ -35,9 +35,9 @@ exports[`components/paymentmodule/PaymentPlanDetails/AcceptanceProcess/GreyInfoC > on diff --git a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/Entitlement/__snapshots__/Entitlement.test.tsx.snap b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/Entitlement/__snapshots__/Entitlement.test.tsx.snap index 4ccc030090..ff87b96150 100644 --- a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/Entitlement/__snapshots__/Entitlement.test.tsx.snap +++ b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/Entitlement/__snapshots__/Entitlement.test.tsx.snap @@ -38,40 +38,37 @@ exports[`components/paymentmodule/PaymentPlanDetails/Entitlement should render 1 class="MuiBox-root css-1itv5e3" >
Export Xlsx -

- 2691.69 PLN (376 USD) + 424 USD (424 USD)

diff --git a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/FspSection/FspSection.tsx b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/FspSection/FspSection.tsx index 8523576d37..a1a8545a4d 100644 --- a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/FspSection/FspSection.tsx +++ b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/FspSection/FspSection.tsx @@ -23,7 +23,7 @@ export function FspSection({ const { isActiveProgram } = useProgramContext(); const { deliveryMechanisms, isFollowUp } = paymentPlan; - const showFspDisplay = deliveryMechanisms.length; + const showFspDisplay = deliveryMechanisms?.length; const shouldDisableSetUpFsp = (): boolean => { if (paymentPlan.isFollowUp) { return false; diff --git a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/FspSection/VolumeByDeliveryMechanismSection/VolumeByDeliveryMechanismSection.tsx b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/FspSection/VolumeByDeliveryMechanismSection/VolumeByDeliveryMechanismSection.tsx index 70016ad6e6..7c2b4fa8e7 100644 --- a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/FspSection/VolumeByDeliveryMechanismSection/VolumeByDeliveryMechanismSection.tsx +++ b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/FspSection/VolumeByDeliveryMechanismSection/VolumeByDeliveryMechanismSection.tsx @@ -57,7 +57,7 @@ export const VolumeByDeliveryMechanismSection: FC< const { t } = useTranslation(); const { volumeByDeliveryMechanism } = paymentPlan; - const mappedDeliveryMechanism = volumeByDeliveryMechanism.map( + const mappedDeliveryMechanism = volumeByDeliveryMechanism?.map( (vdm, index) => ( - Cash (Miranda Ltd) + Cash (Test FSP 1)
- 0 PLN (0 USD) - -
- - - -
-
-
- - In Kind (Frazier-Watson) - -
- - 0 PLN (0 USD) - -
-
-
-
-
- -
-
- - In Kind - -
- - Frazier-Watson - -
-
-
-
-
- - Transfer - -
- - Bray Group + Test FSP 1
@@ -135,70 +81,16 @@ exports[`components/paymentmodule/PaymentPlanDetails/FspSection should render Ed class="sc-fAUdSK goVbUg" color="textSecondary" > - Cash (Miranda Ltd) - -
- - 0 PLN (0 USD) - -
-
- - -
-
-
- - In Kind (Frazier-Watson) - -
- - 0 PLN (0 USD) - -
-
-
-
- diff --git a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/PaymentPlanDetails/__snapshots__/PaymentPlanDetails.test.tsx.snap b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/PaymentPlanDetails/__snapshots__/PaymentPlanDetails.test.tsx.snap index ffa4295bd1..046179b444 100644 --- a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/PaymentPlanDetails/__snapshots__/PaymentPlanDetails.test.tsx.snap +++ b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/PaymentPlanDetails/__snapshots__/PaymentPlanDetails.test.tsx.snap @@ -43,7 +43,7 @@ exports[`components/paymentmodule/PaymentPlanDetails/PaymentPlanDetails should r class="sc-dntaoT dIDHTF" color="textSecondary" > - Matthew Sosa + Root Rootkowski @@ -67,9 +67,9 @@ exports[`components/paymentmodule/PaymentPlanDetails/PaymentPlanDetails should r > - Already attention fear well hit instead person. + Test Program @@ -94,8 +94,10 @@ exports[`components/paymentmodule/PaymentPlanDetails/PaymentPlanDetails should r > + href="/afghanistan/programs/UHJvZ3JhbU5vZGU6NmI1OTE1OTktYmNhNy00NDVhLWJmZjItYWU5MTUyMjMxZGFm/target-population/UGF5bWVudFBsYW5Ob2RlOjU4MmE3ZTYzLTRkZGEtNDQ3Zi1hYWFhLTQzYWJmMzI0ZTViMw==" + > + Reconciled Payment Plan Follow Up + @@ -117,7 +119,7 @@ exports[`components/paymentmodule/PaymentPlanDetails/PaymentPlanDetails should r class="sc-dntaoT dIDHTF" color="textSecondary" > - PLN + USD @@ -139,11 +141,7 @@ exports[`components/paymentmodule/PaymentPlanDetails/PaymentPlanDetails should r class="sc-dntaoT dIDHTF" color="textSecondary" > - + - @@ -165,11 +163,7 @@ exports[`components/paymentmodule/PaymentPlanDetails/PaymentPlanDetails should r class="sc-dntaoT dIDHTF" color="textSecondary" > - + - @@ -192,9 +186,9 @@ exports[`components/paymentmodule/PaymentPlanDetails/PaymentPlanDetails should r color="textSecondary" > @@ -218,9 +212,9 @@ exports[`components/paymentmodule/PaymentPlanDetails/PaymentPlanDetails should r color="textSecondary" > @@ -242,7 +236,12 @@ exports[`components/paymentmodule/PaymentPlanDetails/PaymentPlanDetails should r
- - + + 1 +
diff --git a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/PaymentPlanDetailsHeader/ApprovePaymentPlan.tsx b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/PaymentPlanDetailsHeader/ApprovePaymentPlan.tsx index ce904f7437..68a73bdad1 100644 --- a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/PaymentPlanDetailsHeader/ApprovePaymentPlan.tsx +++ b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/PaymentPlanDetailsHeader/ApprovePaymentPlan.tsx @@ -55,7 +55,7 @@ export function ApprovePaymentPlan({ paymentPlan.approvalProcess?.edges[0]?.node.approvalNumberRequired; const approvalsCount = - paymentPlan.approvalProcess?.edges[0]?.node.actions.approval.length; + paymentPlan.approvalProcess?.edges[0]?.node.actions?.approval?.length; return approvalNumberRequired - 1 === approvalsCount; }; diff --git a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/PaymentPlanDetailsHeader/HeaderButtons/__snapshots__/OpenPaymentPlanHeaderButtons.test.tsx.snap b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/PaymentPlanDetailsHeader/HeaderButtons/__snapshots__/OpenPaymentPlanHeaderButtons.test.tsx.snap index 05f79cf679..f3d2d12ff7 100644 --- a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/PaymentPlanDetailsHeader/HeaderButtons/__snapshots__/OpenPaymentPlanHeaderButtons.test.tsx.snap +++ b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/PaymentPlanDetailsHeader/HeaderButtons/__snapshots__/OpenPaymentPlanHeaderButtons.test.tsx.snap @@ -35,7 +35,7 @@ exports[`components/paymentmodule/PaymentPlanDetails/PaymentPlanDetailsHeader/He > 0 && + paymentPlan?.deliveryMechanisms?.length > 0 && hasPermissions(PERMISSIONS.PM_LOCK_AND_UNLOCK_FSP, permissions); return ( diff --git a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/PeoplePaymentPlanDetailsResults/__snapshots__/PeoplePaymentPlanDetailsResults.test.tsx.snap b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/PeoplePaymentPlanDetailsResults/__snapshots__/PeoplePaymentPlanDetailsResults.test.tsx.snap index 18dc7364f6..78238233b3 100644 --- a/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/PeoplePaymentPlanDetailsResults/__snapshots__/PeoplePaymentPlanDetailsResults.test.tsx.snap +++ b/src/frontend/src/components/paymentmodulepeople/PaymentPlanDetails/PeoplePaymentPlanDetailsResults/__snapshots__/PeoplePaymentPlanDetailsResults.test.tsx.snap @@ -74,7 +74,7 @@ exports[`components/paymentmodule/PaymentPlanDetails/PeoplePaymentPlanDetailsHea class="sc-gtLWhw dynQwi" color="textSecondary" > - 1 + 2 @@ -188,7 +188,7 @@ exports[`components/paymentmodule/PaymentPlanDetails/PeoplePaymentPlanDetailsHea
- 3 + 10
diff --git a/src/frontend/src/containers/pages/headers/TargetPopulationPageHeader.tsx b/src/frontend/src/containers/pages/headers/TargetPopulationPageHeader.tsx index d173af600b..06fe54f17e 100644 --- a/src/frontend/src/containers/pages/headers/TargetPopulationPageHeader.tsx +++ b/src/frontend/src/containers/pages/headers/TargetPopulationPageHeader.tsx @@ -16,7 +16,6 @@ import { LockedTargetPopulationHeaderButtons } from './LockedTargetPopulationHea import { OpenTargetPopulationHeaderButtons } from './OpenTargetPopulationHeaderButtons'; import { AdminButton } from '@core/AdminButton'; import { ReactElement } from 'react'; -import { Alert } from '@mui/material'; const HeaderWrapper = styled.div` display: flex; @@ -104,18 +103,6 @@ export function TargetPopulationPageHeader({ ); break; } - if ( - paymentPlan.status === PaymentPlanStatus.MigrationBlocked || - paymentPlan.status === PaymentPlanStatus.MigrationFailed - ) { - buttons = ( -
- - This targeting is currently undergoing a migration process. Please wait and avoid making any changes to it until this message disappears. - -
- ); - } return ( { PERMISSIONS.PROGRAMME_VIEW_LIST_AND_DETAILS, permissions, ) && ( - { PERMISSIONS.PROGRAMME_VIEW_LIST_AND_DETAILS, permissions, ) && ( - handleFilterChange('deliveryType', e.target.value)} + onChange={(e) => + handleFilterChange('deliveryTypes', e.target.value) + } label="Delivery Mechanism" data-cy="filter-Modality" multiple - value={filter.deliveryType} + value={filter.deliveryTypes} fullWidth icon={} > diff --git a/src/frontend/src/containers/tables/payments/PaymentVerificationTable/PaymentVerificationHeadCells.tsx b/src/frontend/src/containers/tables/payments/PaymentVerificationTable/PaymentVerificationHeadCells.tsx index 9ca9453111..8261673970 100644 --- a/src/frontend/src/containers/tables/payments/PaymentVerificationTable/PaymentVerificationHeadCells.tsx +++ b/src/frontend/src/containers/tables/payments/PaymentVerificationTable/PaymentVerificationHeadCells.tsx @@ -1,7 +1,7 @@ import { HeadCell } from '@components/core/Table/EnhancedTableHead'; -import { CashPlanAndPaymentPlanNode } from '@generated/graphql'; +import { PaymentPlanNode } from '@generated/graphql'; -export const headCells: HeadCell[] = [ +export const headCells: HeadCell[] = [ { disablePadding: false, label: 'Payment Plan ID', diff --git a/src/frontend/src/containers/tables/payments/PaymentVerificationTable/PaymentVerificationTable.test.tsx b/src/frontend/src/containers/tables/payments/PaymentVerificationTable/PaymentVerificationTable.test.tsx index ced084046b..c96cca2df4 100644 --- a/src/frontend/src/containers/tables/payments/PaymentVerificationTable/PaymentVerificationTable.test.tsx +++ b/src/frontend/src/containers/tables/payments/PaymentVerificationTable/PaymentVerificationTable.test.tsx @@ -2,16 +2,16 @@ import { MockedProvider } from '@apollo/react-testing'; import { act } from 'react'; import wait from 'waait'; -import { fakeApolloAllCashPlansAndPaymentPlans } from '../../../../../fixtures/payments/fakeApolloAllCashPlansAndPaymentPlans'; -import { ApolloLoadingLink, render } from '../../../../testUtils/testUtils'; +import { render } from '../../../../testUtils/testUtils'; import { PaymentVerificationTable } from '.'; +import { fakeApolloAllPaymentPlansForTable } from '../../../../../fixtures/payments/fakeApolloAllPaymentPlansForTable'; describe('containers/tables/payments/PaymentVerificationTable', () => { it('should render with data', async () => { const { container } = render( { const { container } = render( + title={t('List of Payment Plans')} headCells={headCells} - query={useAllCashPlansAndPaymentPlansQuery} - queriedObjectName="allCashPlansAndPaymentPlans" + query={useAllPaymentPlansForTableQuery} + queriedObjectName="allPaymentPlans" initialVariables={initialVariables} - renderRow={(cashPlanAndPaymentPlanNode) => ( + renderRow={(paymentPlan) => ( )} diff --git a/src/frontend/src/containers/tables/payments/PaymentVerificationTable/PaymentVerificationTableRow.tsx b/src/frontend/src/containers/tables/payments/PaymentVerificationTable/PaymentVerificationTableRow.tsx index 8abdfeda5e..a0020ad6a5 100644 --- a/src/frontend/src/containers/tables/payments/PaymentVerificationTable/PaymentVerificationTableRow.tsx +++ b/src/frontend/src/containers/tables/payments/PaymentVerificationTable/PaymentVerificationTableRow.tsx @@ -1,13 +1,13 @@ import TableCell from '@mui/material/TableCell'; import { useNavigate } from 'react-router-dom'; import { - CashPlanAndPaymentPlanNode, + PaymentPlanNode, useCashPlanVerificationStatusChoicesQuery, } from '@generated/graphql'; import { ClickableTableRow } from '@components/core/Table/ClickableTableRow'; import { formatCurrencyWithSymbol, - paymentVerificationStatusToColor, + paymentPlanStatusToColor, } from '@utils/utils'; import { StatusBox } from '@components/core/StatusBox'; import { UniversalMoment } from '@components/core/UniversalMoment'; @@ -16,7 +16,7 @@ import { useBaseUrl } from '@hooks/useBaseUrl'; import { ReactElement } from 'react'; interface PaymentVerificationTableRowProps { - plan: CashPlanAndPaymentPlanNode; + plan: PaymentPlanNode; canViewDetails: boolean; } @@ -26,9 +26,7 @@ export function PaymentVerificationTableRow({ }: PaymentVerificationTableRowProps): ReactElement { const navigate = useNavigate(); const { baseUrl } = useBaseUrl(); - const planVerificationPath = `/${baseUrl}/payment-verification/${ - plan.objType === 'CashPlan' ? 'cash-plan' : 'payment-plan' - }/${plan.id}`; + const planVerificationPath = `/${baseUrl}/payment-verification/payment-plan/${plan.id}`; const handleClick = (): void => { navigate(planVerificationPath); }; @@ -54,8 +52,8 @@ export function PaymentVerificationTableRow({
diff --git a/src/frontend/src/containers/tables/payments/PaymentVerificationTable/__snapshots__/PaymentVerificationTable.test.tsx.snap b/src/frontend/src/containers/tables/payments/PaymentVerificationTable/__snapshots__/PaymentVerificationTable.test.tsx.snap index c8e08a8b59..ac6b6b0ca3 100644 --- a/src/frontend/src/containers/tables/payments/PaymentVerificationTable/__snapshots__/PaymentVerificationTable.test.tsx.snap +++ b/src/frontend/src/containers/tables/payments/PaymentVerificationTable/__snapshots__/PaymentVerificationTable.test.tsx.snap @@ -346,339 +346,8 @@ exports[`containers/tables/payments/PaymentVerificationTable should render loadi exports[`containers/tables/payments/PaymentVerificationTable should render with data 1`] = `
-
-
-
-
-
-
- List of Payment Plans -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Payment Plan ID - - - - - Verification Status - - - - - Cash Amount - - - - - Timeframe - - - - - Last Modified Date - - -
- -
- -
- -
- -
-
-
-
-
-
-

- Rows per page: -

-
- - - -
-

- 1–4 of 4 -

-
- - -
-
-
-
+
+ Unexpected error
`; diff --git a/src/frontend/src/containers/tables/payments/PaymentRecordAndPaymentHouseholdTable/PaymentRecordAndPaymentHouseholdTable.test.tsx b/src/frontend/src/containers/tables/payments/PaymentsHouseholdTable/PaymentsHouseholdTable.test.tsx similarity index 70% rename from src/frontend/src/containers/tables/payments/PaymentRecordAndPaymentHouseholdTable/PaymentRecordAndPaymentHouseholdTable.test.tsx rename to src/frontend/src/containers/tables/payments/PaymentsHouseholdTable/PaymentsHouseholdTable.test.tsx index a461be166c..f21392d760 100644 --- a/src/frontend/src/containers/tables/payments/PaymentRecordAndPaymentHouseholdTable/PaymentRecordAndPaymentHouseholdTable.test.tsx +++ b/src/frontend/src/containers/tables/payments/PaymentsHouseholdTable/PaymentsHouseholdTable.test.tsx @@ -2,19 +2,19 @@ import { MockedProvider } from '@apollo/react-testing'; import { act } from 'react'; import wait from 'waait'; -import { fakeApolloAllPaymentRecordsHousehold } from '../../../../../fixtures/payments/fakeApolloAllPaymentRecordsHousehold'; +import { fakeApolloAllPaymentsHousehold } from '../../../../../fixtures/payments/fakeApolloAllPaymentsHousehold'; import { fakeHousehold } from '../../../../../fixtures/population/fakeHousehold'; import { render } from '../../../../testUtils/testUtils'; -import { PaymentRecordHouseholdTable } from '.'; +import { PaymentsHouseholdTable } from '.'; -describe('containers/tables/payments/PaymentRecordHouseholdTable', () => { +describe('containers/tables/payments/PaymentsHouseholdTable', () => { it('should render with data', async () => { const { container } = render( - { const { container } = render( - - title={t('Payment Records')} + + title={t('Payments')} headCells={adjustedHeadCells} - query={useAllPaymentRecordsAndPaymentsQuery} - queriedObjectName="allPaymentRecordsAndPayments" + query={useAllPaymentsForTableQuery} + queriedObjectName="allPayments" initialVariables={initialVariables} renderRow={(row) => ( - diff --git a/src/frontend/src/containers/tables/payments/PaymentRecordAndPaymentHouseholdTable/PaymentRecordAndPaymentHouseholdTableHeadCells.tsx b/src/frontend/src/containers/tables/payments/PaymentsHouseholdTable/PaymentsHouseholdTableHeadCells.tsx similarity index 82% rename from src/frontend/src/containers/tables/payments/PaymentRecordAndPaymentHouseholdTable/PaymentRecordAndPaymentHouseholdTableHeadCells.tsx rename to src/frontend/src/containers/tables/payments/PaymentsHouseholdTable/PaymentsHouseholdTableHeadCells.tsx index 9c0414d315..9011e894d0 100644 --- a/src/frontend/src/containers/tables/payments/PaymentRecordAndPaymentHouseholdTable/PaymentRecordAndPaymentHouseholdTableHeadCells.tsx +++ b/src/frontend/src/containers/tables/payments/PaymentsHouseholdTable/PaymentsHouseholdTableHeadCells.tsx @@ -1,11 +1,11 @@ import { HeadCell } from '@components/core/Table/EnhancedTableHead'; -import { PaymentRecordAndPaymentNode } from '@generated/graphql'; +import { PaymentNode } from '@generated/graphql'; -export const headCells: HeadCell[] = [ +export const headCells: HeadCell[] = [ { disablePadding: false, label: 'Payment ID', - id: 'caId', + id: 'unicefId', numeric: false, }, { diff --git a/src/frontend/src/containers/tables/payments/PaymentRecordAndPaymentPeopleTable/PaymentRecordAndPaymentPeopleTableRow.tsx b/src/frontend/src/containers/tables/payments/PaymentsHouseholdTable/PaymentsHouseholdTableRow.tsx similarity index 56% rename from src/frontend/src/containers/tables/payments/PaymentRecordAndPaymentPeopleTable/PaymentRecordAndPaymentPeopleTableRow.tsx rename to src/frontend/src/containers/tables/payments/PaymentsHouseholdTable/PaymentsHouseholdTableRow.tsx index 0b1f4ca76f..7ef32bafcf 100644 --- a/src/frontend/src/containers/tables/payments/PaymentRecordAndPaymentPeopleTable/PaymentRecordAndPaymentPeopleTableRow.tsx +++ b/src/frontend/src/containers/tables/payments/PaymentsHouseholdTable/PaymentsHouseholdTableRow.tsx @@ -1,6 +1,6 @@ import TableCell from '@mui/material/TableCell'; import { useNavigate } from 'react-router-dom'; -import { PaymentRecordAndPaymentNode } from '@generated/graphql'; +import { PaymentNode } from '@generated/graphql'; import { ClickableTableRow } from '@components/core/Table/ClickableTableRow'; import { StatusBox } from '@components/core/StatusBox'; import { @@ -13,30 +13,26 @@ import { BlackLink } from '@components/core/BlackLink'; import { useBaseUrl } from '@hooks/useBaseUrl'; import { ReactElement } from 'react'; -interface PaymentRecordAndPaymentPeopleTableRowrops { - paymentRecordOrPayment: PaymentRecordAndPaymentNode; +interface PaymentsHouseholdTableRowProps { + payment: PaymentNode; openInNewTab: boolean; canViewDetails: boolean; } -export function PaymentRecordAndPaymentPeopleTableRow({ - paymentRecordOrPayment, +export function PaymentsHouseholdTableRow({ + payment, openInNewTab, canViewDetails, -}: PaymentRecordAndPaymentPeopleTableRowrops): ReactElement { +}: PaymentsHouseholdTableRowProps): ReactElement { const { baseUrl } = useBaseUrl(); const navigate = useNavigate(); - const paymentRecordDetailsPath = `/${baseUrl}/payment-records/${paymentRecordOrPayment.id}`; - const paymentDetailsPath = `/${baseUrl}/payment-module/payments/${paymentRecordOrPayment.id}`; - const detailsPath = - paymentRecordOrPayment.objType === 'PaymentRecord' - ? paymentRecordDetailsPath - : paymentDetailsPath; + const paymentDetailsPath = `/${baseUrl}/payment-module/payments/${payment.id}`; + const handleClick = (): void => { if (openInNewTab) { - window.open(detailsPath); + window.open(paymentDetailsPath); } else { - navigate(detailsPath); + navigate(paymentDetailsPath); } }; return ( @@ -44,36 +40,34 @@ export function PaymentRecordAndPaymentPeopleTableRow({ hover onClick={canViewDetails ? handleClick : undefined} role="checkbox" - key={paymentRecordOrPayment.id} + key={payment.id} > {canViewDetails ? ( - {paymentRecordOrPayment.unicefId} + {payment.unicefId} ) : ( - paymentRecordOrPayment.unicefId + payment.unicefId )} + {payment.fullName} {formatCurrencyWithSymbol( - paymentRecordOrPayment.entitlementQuantity, - paymentRecordOrPayment.currency, + payment.entitlementQuantity, + payment.currency, )} - {formatCurrencyWithSymbol( - paymentRecordOrPayment.deliveredQuantity, - paymentRecordOrPayment.currency, - )} + {formatCurrencyWithSymbol(payment.deliveredQuantity, payment.currency)} - {paymentRecordOrPayment.deliveryDate} + {payment.deliveryDate} ); diff --git a/src/frontend/src/containers/tables/payments/PaymentRecordAndPaymentHouseholdTable/__snapshots__/PaymentRecordAndPaymentHouseholdTable.test.tsx.snap b/src/frontend/src/containers/tables/payments/PaymentsHouseholdTable/__snapshots__/PaymentsHouseholdTable.test.tsx.snap similarity index 98% rename from src/frontend/src/containers/tables/payments/PaymentRecordAndPaymentHouseholdTable/__snapshots__/PaymentRecordAndPaymentHouseholdTable.test.tsx.snap rename to src/frontend/src/containers/tables/payments/PaymentsHouseholdTable/__snapshots__/PaymentsHouseholdTable.test.tsx.snap index 8f39db777a..344fe0a9ed 100644 --- a/src/frontend/src/containers/tables/payments/PaymentRecordAndPaymentHouseholdTable/__snapshots__/PaymentRecordAndPaymentHouseholdTable.test.tsx.snap +++ b/src/frontend/src/containers/tables/payments/PaymentsHouseholdTable/__snapshots__/PaymentsHouseholdTable.test.tsx.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`containers/tables/payments/PaymentRecordHouseholdTable should render loading 1`] = ` +exports[`containers/tables/payments/PaymentsHouseholdTable should render loading 1`] = `
- Payment Records + Payments
`; -exports[`containers/tables/payments/PaymentRecordHouseholdTable should render with data 1`] = ` +exports[`containers/tables/payments/PaymentsHouseholdTable should render with data 1`] = `
Unexpected error diff --git a/src/frontend/src/containers/tables/payments/PaymentsHouseholdTable/index.ts b/src/frontend/src/containers/tables/payments/PaymentsHouseholdTable/index.ts new file mode 100644 index 0000000000..f5a14ccb47 --- /dev/null +++ b/src/frontend/src/containers/tables/payments/PaymentsHouseholdTable/index.ts @@ -0,0 +1 @@ +export { PaymentsHouseholdTable } from './PaymentsHouseholdTable'; diff --git a/src/frontend/src/containers/tables/payments/PaymentRecordAndPaymentPeopleTable/PaymentRecordAndPaymentPeopleTable.test.tsx b/src/frontend/src/containers/tables/payments/PaymentsPeopleTable/PaymentsPeopleTable.test.tsx similarity index 69% rename from src/frontend/src/containers/tables/payments/PaymentRecordAndPaymentPeopleTable/PaymentRecordAndPaymentPeopleTable.test.tsx rename to src/frontend/src/containers/tables/payments/PaymentsPeopleTable/PaymentsPeopleTable.test.tsx index 8c6f8076ee..e653b133be 100644 --- a/src/frontend/src/containers/tables/payments/PaymentRecordAndPaymentPeopleTable/PaymentRecordAndPaymentPeopleTable.test.tsx +++ b/src/frontend/src/containers/tables/payments/PaymentsPeopleTable/PaymentsPeopleTable.test.tsx @@ -1,19 +1,19 @@ import { MockedProvider } from '@apollo/react-testing'; import { act } from 'react'; import wait from 'waait'; -import { fakeApolloAllPaymentRecordsHousehold } from '../../../../../fixtures/payments/fakeApolloAllPaymentRecordsHousehold'; import { fakeHousehold } from '../../../../../fixtures/population/fakeHousehold'; import { render } from '../../../../testUtils/testUtils'; -import { PaymentRecordAndPaymentPeopleTable } from '.'; +import { PaymentsPeopleTable } from '.'; +import { fakeApolloAllPaymentsHousehold } from '../../../../../fixtures/payments/fakeApolloAllPaymentsHousehold'; -describe('containers/tables/payments/PaymentRecordAndPaymentPeopleTable', () => { +describe('containers/tables/payments/PaymentsPeopleTable', () => { it('should render with data', async () => { const { container } = render( - const { container } = render( - + title={t('Payment Records')} headCells={headCells} - query={useAllPaymentRecordsAndPaymentsQuery} - queriedObjectName="allPaymentRecordsAndPayments" + query={useAllPaymentsForTableQuery} + queriedObjectName="allPayments" initialVariables={initialVariables} renderRow={(row) => ( - diff --git a/src/frontend/src/containers/tables/payments/PaymentRecordAndPaymentPeopleTable/PaymentRecordAndPaymentPeopleTableHeadCells.tsx b/src/frontend/src/containers/tables/payments/PaymentsPeopleTable/PaymentsPeopleTableHeadCells.tsx similarity index 82% rename from src/frontend/src/containers/tables/payments/PaymentRecordAndPaymentPeopleTable/PaymentRecordAndPaymentPeopleTableHeadCells.tsx rename to src/frontend/src/containers/tables/payments/PaymentsPeopleTable/PaymentsPeopleTableHeadCells.tsx index 50a49dceaf..f069752ea1 100644 --- a/src/frontend/src/containers/tables/payments/PaymentRecordAndPaymentPeopleTable/PaymentRecordAndPaymentPeopleTableHeadCells.tsx +++ b/src/frontend/src/containers/tables/payments/PaymentsPeopleTable/PaymentsPeopleTableHeadCells.tsx @@ -1,7 +1,7 @@ import { HeadCell } from '@components/core/Table/EnhancedTableHead'; -import { PaymentRecordAndPaymentNode } from '@generated/graphql'; +import { PaymentNode } from '@generated/graphql'; -export const headCells: HeadCell[] = [ +export const headCells: HeadCell[] = [ { disablePadding: false, label: 'Payment ID', diff --git a/src/frontend/src/containers/tables/payments/PaymentRecordAndPaymentHouseholdTable/PaymentRecordAndPaymentHouseholdTableRow.tsx b/src/frontend/src/containers/tables/payments/PaymentsPeopleTable/PaymentsPeopleTableRow.tsx similarity index 54% rename from src/frontend/src/containers/tables/payments/PaymentRecordAndPaymentHouseholdTable/PaymentRecordAndPaymentHouseholdTableRow.tsx rename to src/frontend/src/containers/tables/payments/PaymentsPeopleTable/PaymentsPeopleTableRow.tsx index 2f4acf356b..5d9aeba5c9 100644 --- a/src/frontend/src/containers/tables/payments/PaymentRecordAndPaymentHouseholdTable/PaymentRecordAndPaymentHouseholdTableRow.tsx +++ b/src/frontend/src/containers/tables/payments/PaymentsPeopleTable/PaymentsPeopleTableRow.tsx @@ -1,6 +1,6 @@ import TableCell from '@mui/material/TableCell'; import { useNavigate } from 'react-router-dom'; -import { PaymentRecordAndPaymentNode } from '@generated/graphql'; +import { PaymentNode } from '@generated/graphql'; import { ClickableTableRow } from '@components/core/Table/ClickableTableRow'; import { StatusBox } from '@components/core/StatusBox'; import { @@ -13,30 +13,26 @@ import { BlackLink } from '@components/core/BlackLink'; import { useBaseUrl } from '@hooks/useBaseUrl'; import { ReactElement } from 'react'; -interface PaymentRecordAndPaymentTableRowProps { - paymentRecordOrPayment: PaymentRecordAndPaymentNode; +interface PaymentsPeopleTableRowProps { + payment: PaymentNode; openInNewTab: boolean; canViewDetails: boolean; } -export function PaymentRecordAndPaymentHouseholdTableRow({ - paymentRecordOrPayment, +export function PaymentsPeopleTableRow({ + payment, openInNewTab, canViewDetails, -}: PaymentRecordAndPaymentTableRowProps): ReactElement { +}: PaymentsPeopleTableRowProps): ReactElement { const { baseUrl } = useBaseUrl(); const navigate = useNavigate(); - const paymentRecordDetailsPath = `/${baseUrl}/payment-records/${paymentRecordOrPayment.id}`; - const paymentDetailsPath = `/${baseUrl}/payment-module/payments/${paymentRecordOrPayment.id}`; - const detailsPath = - paymentRecordOrPayment.objType === 'PaymentRecord' - ? paymentRecordDetailsPath - : paymentDetailsPath; + const paymentDetailsPath = `/${baseUrl}/payment-module/payments/${payment.id}`; + const handleClick = (): void => { if (openInNewTab) { - window.open(detailsPath); + window.open(paymentDetailsPath); } else { - navigate(detailsPath); + navigate(paymentDetailsPath); } }; return ( @@ -44,37 +40,33 @@ export function PaymentRecordAndPaymentHouseholdTableRow({ hover onClick={canViewDetails ? handleClick : undefined} role="checkbox" - key={paymentRecordOrPayment.id} + key={payment.id} > {canViewDetails ? ( - {paymentRecordOrPayment.unicefId} + {payment.unicefId} ) : ( - paymentRecordOrPayment.unicefId + payment.unicefId )} - {paymentRecordOrPayment.fullName} {formatCurrencyWithSymbol( - paymentRecordOrPayment.entitlementQuantity, - paymentRecordOrPayment.currency, + payment.entitlementQuantity, + payment.currency, )} - {formatCurrencyWithSymbol( - paymentRecordOrPayment.deliveredQuantity, - paymentRecordOrPayment.currency, - )} + {formatCurrencyWithSymbol(payment.deliveredQuantity, payment.currency)} - {paymentRecordOrPayment.deliveryDate} + {payment.deliveryDate} ); diff --git a/src/frontend/src/containers/tables/payments/PaymentRecordAndPaymentPeopleTable/__snapshots__/PaymentRecordAndPaymentPeopleTable.test.tsx.snap b/src/frontend/src/containers/tables/payments/PaymentsPeopleTable/__snapshots__/PaymentsPeopleTable.test.tsx.snap similarity index 98% rename from src/frontend/src/containers/tables/payments/PaymentRecordAndPaymentPeopleTable/__snapshots__/PaymentRecordAndPaymentPeopleTable.test.tsx.snap rename to src/frontend/src/containers/tables/payments/PaymentsPeopleTable/__snapshots__/PaymentsPeopleTable.test.tsx.snap index 0d2962e7e4..a1b8817b04 100644 --- a/src/frontend/src/containers/tables/payments/PaymentRecordAndPaymentPeopleTable/__snapshots__/PaymentRecordAndPaymentPeopleTable.test.tsx.snap +++ b/src/frontend/src/containers/tables/payments/PaymentsPeopleTable/__snapshots__/PaymentsPeopleTable.test.tsx.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`containers/tables/payments/PaymentRecordAndPaymentPeopleTable should render loading 1`] = ` +exports[`containers/tables/payments/PaymentsPeopleTable should render loading 1`] = `
`; -exports[`containers/tables/payments/PaymentRecordAndPaymentPeopleTable should render with data 1`] = ` +exports[`containers/tables/payments/PaymentsPeopleTable should render with data 1`] = `
Unexpected error diff --git a/src/frontend/src/containers/tables/payments/PaymentsPeopleTable/index.ts b/src/frontend/src/containers/tables/payments/PaymentsPeopleTable/index.ts new file mode 100644 index 0000000000..00ce52e49e --- /dev/null +++ b/src/frontend/src/containers/tables/payments/PaymentsPeopleTable/index.ts @@ -0,0 +1 @@ +export { PaymentsPeopleTable } from './PaymentsPeopleTable'; diff --git a/src/hct_mis_api/apps/accountability/fixtures.py b/src/hct_mis_api/apps/accountability/fixtures.py index 2d596e514a..81307e556c 100644 --- a/src/hct_mis_api/apps/accountability/fixtures.py +++ b/src/hct_mis_api/apps/accountability/fixtures.py @@ -62,7 +62,6 @@ class Meta: title = factory.Faker("sentence", nb_words=2, variable_nb_words=True, ext_word_list=None) category = factory.fuzzy.FuzzyChoice(Survey.CATEGORY_CHOICES, getter=lambda c: c[0]) created_by = factory.SubFactory(UserFactory) - target_population = None payment_plan = None program = None business_area = factory.LazyAttribute(lambda o: BusinessArea.objects.first()) diff --git a/src/hct_mis_api/apps/accountability/fixtures/data.json b/src/hct_mis_api/apps/accountability/fixtures/data.json index 4ee8b76470..6a516063bb 100644 --- a/src/hct_mis_api/apps/accountability/fixtures/data.json +++ b/src/hct_mis_api/apps/accountability/fixtures/data.json @@ -1 +1 @@ -[{"model": "accountability.message", "pk": "0d047484-5380-4bf2-a95b-c865f5e3bc89", "fields": {"created_at": "2022-09-15T14:59:16.221Z", "updated_at": "2022-09-15T14:59:16.221Z", "unicef_id": "MSG-22-0001", "title": "Hello World!", "body": "World is beautiful, don't mess with it!", "created_by": "4196c2c5-c2dd-48d2-887f-3a9d39e78916", "number_of_recipients": 2, "business_area": "c259b1a0-ae3a-494e-b343-f7c8eb060c68", "target_population": null, "registration_data_import": null, "sampling_type": "RANDOM", "full_list_arguments": null, "random_sampling_arguments": {"age": {"max": 2, "min": 1}, "sex": "any", "margin_of_error": 20.0, "confidence_interval": 0.9, "excluded_admin_areas": []}, "sample_size": 0, "households": ["20077498-80f0-462a-82e6-866cef92d06a", "3db2729e-7259-4b13-83b2-3090d847e5cc"]}}, {"model": "accountability.message", "pk": "1175f330-36cc-4394-8202-e8667e29e780", "fields": {"created_at": "2022-09-16T08:33:09.955Z", "updated_at": "2022-09-16T08:33:09.955Z", "unicef_id": "MSG-22-0004", "title": "You got credit of USD 200", "body": "Greetings {recipient_full_name}, we have sent you USD 200 in your registered account on {rp_timestamp}", "created_by": "4196c2c5-c2dd-48d2-887f-3a9d39e78916", "number_of_recipients": 2, "business_area": "c259b1a0-ae3a-494e-b343-f7c8eb060c68", "target_population": null, "registration_data_import": null, "sampling_type": "RANDOM", "full_list_arguments": null, "random_sampling_arguments": {"age": {"max": 2, "min": 1}, "sex": "any", "margin_of_error": 80.0, "confidence_interval": 0.8, "excluded_admin_areas": []}, "sample_size": 0, "households": ["20077498-80f0-462a-82e6-866cef92d06a", "3db2729e-7259-4b13-83b2-3090d847e5cc"]}}, {"model": "accountability.message", "pk": "41b9e514-b56c-4659-abaa-a9ef075e98e1", "fields": {"created_at": "2022-09-15T14:59:51.410Z", "updated_at": "2022-09-15T14:59:51.410Z", "unicef_id": "MSG-22-0002", "title": "Hello There!", "body": "Hey, there. Welcome to the party!", "created_by": "4196c2c5-c2dd-48d2-887f-3a9d39e78916", "number_of_recipients": 2, "business_area": "c259b1a0-ae3a-494e-b343-f7c8eb060c68", "target_population": null, "registration_data_import": null, "sampling_type": "RANDOM", "full_list_arguments": null, "random_sampling_arguments": {"age": {"max": 2, "min": 1}, "sex": "any", "margin_of_error": 20.0, "confidence_interval": 0.9, "excluded_admin_areas": []}, "sample_size": 0, "households": ["20077498-80f0-462a-82e6-866cef92d06a", "3db2729e-7259-4b13-83b2-3090d847e5cc"]}}, {"model": "accountability.message", "pk": "758bb284-2cf0-4fcc-acf2-6947ed8ddce6", "fields": {"created_at": "2022-09-15T15:01:35.261Z", "updated_at": "2022-09-15T15:01:35.261Z", "unicef_id": "MSG-22-0003", "title": "We hold your back!", "body": "Hey XYZ, don't be worry. We UNICEF are here to to help to grow!", "created_by": "4196c2c5-c2dd-48d2-887f-3a9d39e78916", "number_of_recipients": 2, "business_area": "c259b1a0-ae3a-494e-b343-f7c8eb060c68", "target_population": null, "registration_data_import": null, "sampling_type": "FULL_LIST", "full_list_arguments": {"excluded_admin_areas": []}, "random_sampling_arguments": null, "sample_size": 2, "households": ["20077498-80f0-462a-82e6-866cef92d06a", "3db2729e-7259-4b13-83b2-3090d847e5cc"]}}] \ No newline at end of file +[{"model": "accountability.message", "pk": "0d047484-5380-4bf2-a95b-c865f5e3bc89", "fields": {"created_at": "2022-09-15T14:59:16.221Z", "updated_at": "2022-09-15T14:59:16.221Z", "unicef_id": "MSG-22-0001", "title": "Hello World!", "body": "World is beautiful, don't mess with it!", "created_by": "4196c2c5-c2dd-48d2-887f-3a9d39e78916", "number_of_recipients": 2, "business_area": "c259b1a0-ae3a-494e-b343-f7c8eb060c68", "registration_data_import": null, "sampling_type": "RANDOM", "full_list_arguments": null, "random_sampling_arguments": {"age": {"max": 2, "min": 1}, "sex": "any", "margin_of_error": 20.0, "confidence_interval": 0.9, "excluded_admin_areas": []}, "sample_size": 0, "households": ["20077498-80f0-462a-82e6-866cef92d06a", "3db2729e-7259-4b13-83b2-3090d847e5cc"]}}, {"model": "accountability.message", "pk": "1175f330-36cc-4394-8202-e8667e29e780", "fields": {"created_at": "2022-09-16T08:33:09.955Z", "updated_at": "2022-09-16T08:33:09.955Z", "unicef_id": "MSG-22-0004", "title": "You got credit of USD 200", "body": "Greetings {recipient_full_name}, we have sent you USD 200 in your registered account on {rp_timestamp}", "created_by": "4196c2c5-c2dd-48d2-887f-3a9d39e78916", "number_of_recipients": 2, "business_area": "c259b1a0-ae3a-494e-b343-f7c8eb060c68", "registration_data_import": null, "sampling_type": "RANDOM", "full_list_arguments": null, "random_sampling_arguments": {"age": {"max": 2, "min": 1}, "sex": "any", "margin_of_error": 80.0, "confidence_interval": 0.8, "excluded_admin_areas": []}, "sample_size": 0, "households": ["20077498-80f0-462a-82e6-866cef92d06a", "3db2729e-7259-4b13-83b2-3090d847e5cc"]}}, {"model": "accountability.message", "pk": "41b9e514-b56c-4659-abaa-a9ef075e98e1", "fields": {"created_at": "2022-09-15T14:59:51.410Z", "updated_at": "2022-09-15T14:59:51.410Z", "unicef_id": "MSG-22-0002", "title": "Hello There!", "body": "Hey, there. Welcome to the party!", "created_by": "4196c2c5-c2dd-48d2-887f-3a9d39e78916", "number_of_recipients": 2, "business_area": "c259b1a0-ae3a-494e-b343-f7c8eb060c68", "registration_data_import": null, "sampling_type": "RANDOM", "full_list_arguments": null, "random_sampling_arguments": {"age": {"max": 2, "min": 1}, "sex": "any", "margin_of_error": 20.0, "confidence_interval": 0.9, "excluded_admin_areas": []}, "sample_size": 0, "households": ["20077498-80f0-462a-82e6-866cef92d06a", "3db2729e-7259-4b13-83b2-3090d847e5cc"]}}, {"model": "accountability.message", "pk": "758bb284-2cf0-4fcc-acf2-6947ed8ddce6", "fields": {"created_at": "2022-09-15T15:01:35.261Z", "updated_at": "2022-09-15T15:01:35.261Z", "unicef_id": "MSG-22-0003", "title": "We hold your back!", "body": "Hey XYZ, don't be worry. We UNICEF are here to to help to grow!", "created_by": "4196c2c5-c2dd-48d2-887f-3a9d39e78916", "number_of_recipients": 2, "business_area": "c259b1a0-ae3a-494e-b343-f7c8eb060c68", "registration_data_import": null, "sampling_type": "FULL_LIST", "full_list_arguments": {"excluded_admin_areas": []}, "random_sampling_arguments": null, "sample_size": 2, "households": ["20077498-80f0-462a-82e6-866cef92d06a", "3db2729e-7259-4b13-83b2-3090d847e5cc"]}}] \ No newline at end of file diff --git a/src/hct_mis_api/apps/accountability/migrations/0006_migration.py b/src/hct_mis_api/apps/accountability/migrations/0006_migration.py new file mode 100644 index 0000000000..c6a5a3ac79 --- /dev/null +++ b/src/hct_mis_api/apps/accountability/migrations/0006_migration.py @@ -0,0 +1,21 @@ +# Generated by Django 3.2.25 on 2025-01-20 14:56 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('accountability', '0005_migration'), + ] + + operations = [ + migrations.RemoveField( + model_name='message', + name='target_population', + ), + migrations.RemoveField( + model_name='survey', + name='target_population', + ), + ] diff --git a/src/hct_mis_api/apps/accountability/models.py b/src/hct_mis_api/apps/accountability/models.py index 4237e2021b..605ca74e6b 100644 --- a/src/hct_mis_api/apps/accountability/models.py +++ b/src/hct_mis_api/apps/accountability/models.py @@ -53,10 +53,6 @@ class SamplingChoices(models.TextChoices): business_area = models.ForeignKey("core.BusinessArea", on_delete=models.CASCADE) # Recipients Lookup criteria households = models.ManyToManyField("household.Household", related_name="messages", blank=True) - # TODO: deprecated will remove after data migrations - target_population = models.ForeignKey( - "targeting.TargetPopulation", related_name="messages", blank=True, null=True, on_delete=models.SET_NULL - ) payment_plan = models.ForeignKey( "payment.PaymentPlan", related_name="messages", blank=True, null=True, on_delete=models.SET_NULL ) @@ -252,10 +248,6 @@ class Survey(UnicefIdentifiedModel, AdminUrlMixin, TimeStampedUUIDModel): verbose_name=_("Created by"), ) recipients = models.ManyToManyField("household.Household", related_name="surveys", blank=True) - # TODO: deprecated will remove after data migrations - target_population = models.ForeignKey( - "targeting.TargetPopulation", related_name="surveys", blank=True, null=True, on_delete=models.SET_NULL - ) payment_plan = models.ForeignKey( "payment.PaymentPlan", related_name="surveys", blank=True, null=True, on_delete=models.SET_NULL ) diff --git a/src/hct_mis_api/apps/core/management/commands/createadminpermissiongroups.py b/src/hct_mis_api/apps/core/management/commands/createadminpermissiongroups.py index ce4d60f4bf..225fa32d76 100644 --- a/src/hct_mis_api/apps/core/management/commands/createadminpermissiongroups.py +++ b/src/hct_mis_api/apps/core/management/commands/createadminpermissiongroups.py @@ -83,7 +83,7 @@ def handle(self, *args: Any, **options: Any) -> Any: "sanction_list": ["sanctionlistindividualdocument", "sanctionlistindividual"], "explorer": ["query"], "steficon": ["rulecommit"], # 'rule' view only - "targeting": ["householdselection", "targetpopulation"], + # "targeting": ["householdselection", "targetpopulation"], # "advanced_filters": ["advancedfilter"], # change only # "constance": ["config"], # change only } diff --git a/src/hct_mis_api/apps/core/management/commands/init-e2e-scenario.py b/src/hct_mis_api/apps/core/management/commands/init-e2e-scenario.py index 7e90e13ece..5f6c328097 100644 --- a/src/hct_mis_api/apps/core/management/commands/init-e2e-scenario.py +++ b/src/hct_mis_api/apps/core/management/commands/init-e2e-scenario.py @@ -19,6 +19,7 @@ IndividualCollection, IndividualRoleInHousehold, ) +from hct_mis_api.apps.payment.models import PaymentPlan from hct_mis_api.apps.program.fixtures import ProgramFactory from hct_mis_api.apps.program.models import Program from hct_mis_api.apps.registration_data.fixtures import RegistrationDataImportFactory @@ -29,9 +30,7 @@ TargetingCriteria, TargetingCriteriaRule, TargetingCriteriaRuleFilter, - TargetPopulation, ) -from hct_mis_api.apps.targeting.services.targeting_stats_refresher import full_rebuild from hct_mis_api.apps.utils.models import MergeStatusModel faker = Faker() @@ -142,17 +141,14 @@ def init_payment_plan(seed: str) -> None: arguments=[addresses[2]], ) - target_population = TargetPopulation.objects.create( + PaymentPlan.objects.create( name=f"PaymentPlanTargetPopulation-{seed}", targeting_criteria=targeting_criteria, - status=TargetPopulation.STATUS_OPEN, + status=PaymentPlan.Status.TP_OPEN, business_area=afghanistan, - program=program, + program_cycle=program.cycles.first(), created_by=root, ) - full_rebuild(target_population) - target_population.status = TargetPopulation.STATUS_READY_FOR_PAYMENT_MODULE - target_population.save() rule = RuleFactory(name=f"Rule-{seed}", type=Rule.TYPE_PAYMENT_PLAN) RuleCommitFactory(definition="result.value=Decimal('500')", rule=rule) diff --git a/src/hct_mis_api/apps/grievance/schema.py b/src/hct_mis_api/apps/grievance/schema.py index 6856073b12..69b9cb33da 100644 --- a/src/hct_mis_api/apps/grievance/schema.py +++ b/src/hct_mis_api/apps/grievance/schema.py @@ -72,7 +72,7 @@ filter_grievance_tickets_based_on_partner_areas_2, ) from hct_mis_api.apps.household.schema import HouseholdNode, IndividualNode -from hct_mis_api.apps.payment.schema import PaymentRecordAndPaymentNode +from hct_mis_api.apps.payment.schema import PaymentNode from hct_mis_api.apps.program.models import Program from hct_mis_api.apps.program.schema import ProgramNode from hct_mis_api.apps.registration_data.nodes import ( @@ -106,7 +106,7 @@ class GrievanceTicketNode(BaseNodePermissionMixin, AdminUrlNodeMixin, DjangoObje ) household = graphene.Field(HouseholdNode) individual = graphene.Field(IndividualNode) - payment_record = graphene.Field(PaymentRecordAndPaymentNode) + payment_record = graphene.Field(PaymentNode) admin = graphene.String() admin2 = graphene.Field(AreaNode) linked_tickets = graphene.List(lambda: GrievanceTicketNode) @@ -238,7 +238,7 @@ class Meta: class TicketComplaintDetailsNode(DjangoObjectType): - payment_record = graphene.Field(PaymentRecordAndPaymentNode) + payment_record = graphene.Field(PaymentNode) class Meta: model = TicketComplaintDetails @@ -251,7 +251,7 @@ def resolve_payment_record(self, info: Any) -> Optional[Any]: class TicketSensitiveDetailsNode(DjangoObjectType): - payment_record = graphene.Field(PaymentRecordAndPaymentNode) + payment_record = graphene.Field(PaymentNode) class Meta: model = TicketSensitiveDetails diff --git a/src/hct_mis_api/apps/household/admin/household.py b/src/hct_mis_api/apps/household/admin/household.py index 1e52e4acb7..5e10942587 100644 --- a/src/hct_mis_api/apps/household/admin/household.py +++ b/src/hct_mis_api/apps/household/admin/household.py @@ -26,10 +26,7 @@ from hct_mis_api.apps.core.models import BusinessArea from hct_mis_api.apps.core.utils import JSONBSet, decode_id_string_required from hct_mis_api.apps.grievance.models import GrievanceTicket -from hct_mis_api.apps.household.admin.mixins import ( - CustomTargetPopulationMixin, - HouseholdWithDrawnMixin, -) +from hct_mis_api.apps.household.admin.mixins import HouseholdWithDrawnMixin from hct_mis_api.apps.household.celery_tasks import ( enroll_households_to_program_task, mass_withdraw_households_from_list_task, @@ -203,7 +200,6 @@ class HouseholdAdmin( SmartFieldsetMixin, CursorPaginatorAdmin, HouseholdWithDrawnMixin, - CustomTargetPopulationMixin, HOPEModelAdminBase, IsOriginalAdminMixin, HouseholdWithdrawFromListMixin, diff --git a/src/hct_mis_api/apps/household/admin/mixins.py b/src/hct_mis_api/apps/household/admin/mixins.py index c935020300..1020c62f26 100644 --- a/src/hct_mis_api/apps/household/admin/mixins.py +++ b/src/hct_mis_api/apps/household/admin/mixins.py @@ -6,23 +6,19 @@ from django.db.models import QuerySet from django.db.transaction import atomic from django.forms import Form -from django.http import HttpRequest, HttpResponse, HttpResponseRedirect +from django.http import HttpRequest, HttpResponseRedirect from django.template.response import TemplateResponse -from django.urls import reverse from django.utils import timezone from admin_extra_buttons.decorators import button from hct_mis_api.apps.household.forms import ( - AddToTargetPopulationForm, - CreateTargetPopulationForm, MassRestoreForm, MassWithdrawForm, WithdrawForm, ) from hct_mis_api.apps.household.models import Household from hct_mis_api.apps.household.services.household_withdraw import HouseholdWithdraw -from hct_mis_api.apps.targeting.services.targeting_stats_refresher import refresh_stats class HouseholdWithDrawnMixin: @@ -188,96 +184,3 @@ def withdraw(self, request: HttpRequest, pk: UUID) -> Union[HttpResponseRedirect context["tickets"] = tickets return TemplateResponse(request, "admin/household/household/withdrawn.html", context) - - -class CustomTargetPopulationMixin: - def add_to_target_population(self, request: HttpRequest, qs: QuerySet) -> Optional[HttpResponse]: - from hct_mis_api.apps.core.models import BusinessArea - from hct_mis_api.apps.targeting.models import TargetPopulation - - context = self.get_common_context(request, title="Extend TargetPopulation") - tp: TargetPopulation - ba: BusinessArea - if "apply" in request.POST: - form = AddToTargetPopulationForm(request.POST, read_only=True) - if form.is_valid(): - tp = form.cleaned_data["target_population"] - ba = tp.business_area - population = qs.filter(business_area=ba) - context["target_population"] = tp - context["population"] = population - context["queryset"] = qs - if population.count() != qs.count(): - context["mixed_household"] = True - elif "confirm" in request.POST: - form = AddToTargetPopulationForm(request.POST) - if form.is_valid(): - tp = form.cleaned_data["target_population"] - ba = tp.business_area - population = qs.filter(business_area=ba) - with atomic(): - tp.households.add(*population) - refresh_stats(tp) - tp.save() - url = reverse("admin:targeting_targetpopulation_change", args=[tp.pk]) - return HttpResponseRedirect(url) - else: - form = AddToTargetPopulationForm( - initial={ - "_selected_action": request.POST.getlist(ACTION_CHECKBOX_NAME), - "action": "add_to_target_population", - } - ) - context["form"] = form - return TemplateResponse(request, "admin/household/household/add_target_population.html", context) - - add_to_target_population.allowed_permissions = ["create_target_population"] - - def create_target_population(self, request: HttpRequest, qs: QuerySet) -> Optional[HttpResponse]: - context = self.get_common_context(request, title="Create TargetPopulation") - if "apply" in request.POST: - form = CreateTargetPopulationForm(request.POST, read_only=True) - if form.is_valid(): - program = form.cleaned_data["program"] - ba = program.business_area - population = qs.filter(business_area=ba) - context["program"] = program - context["population"] = population - context["queryset"] = qs - if population.count() != qs.count(): - context["mixed_household"] = True - elif "confirm" in request.POST: - form = CreateTargetPopulationForm(request.POST) - if form.is_valid(): - from hct_mis_api.apps.targeting.models import TargetPopulation - - program = form.cleaned_data["program"] - ba = program.business_area - population = qs.filter(business_area=ba) - with atomic(): - tp = TargetPopulation.objects.create( - targeting_criteria=None, - created_by=request.user, - name=form.cleaned_data["name"], - business_area=ba, - program=program, - ) - tp.households.set(population) - refresh_stats(tp) - tp.save() - url = reverse("admin:targeting_targetpopulation_change", args=[tp.pk]) - return HttpResponseRedirect(url) - else: - form = CreateTargetPopulationForm( - initial={ - "_selected_action": request.POST.getlist(ACTION_CHECKBOX_NAME), - "action": "create_target_population", - } - ) - context["form"] = form - return TemplateResponse(request, "admin/household/household/create_target_population.html", context) - - create_target_population.allowed_permissions = ["create_target_population"] - - def has_create_target_population_permission(self, request: HttpRequest) -> bool: - return request.user.has_perm("targeting.add_target_population") diff --git a/src/hct_mis_api/apps/household/filters.py b/src/hct_mis_api/apps/household/filters.py index a9a6d00455..c65fda3424 100644 --- a/src/hct_mis_api/apps/household/filters.py +++ b/src/hct_mis_api/apps/household/filters.py @@ -106,7 +106,6 @@ class Meta: "admin_area": ["exact"], "admin1": ["exact"], "admin2": ["exact"], - "target_populations": ["exact"], "residence_status": ["exact"], "withdrawn": ["exact"], "program": ["exact"], diff --git a/src/hct_mis_api/apps/household/forms.py b/src/hct_mis_api/apps/household/forms.py index d7265a9103..86ce3ecbef 100644 --- a/src/hct_mis_api/apps/household/forms.py +++ b/src/hct_mis_api/apps/household/forms.py @@ -18,7 +18,7 @@ from hct_mis_api.apps.program.models import Program, ProgramCycle from hct_mis_api.apps.registration_data.models import RegistrationDataImport from hct_mis_api.apps.steficon.admin import AutocompleteWidget -from hct_mis_api.apps.targeting.models import TargetingCriteria, TargetPopulation +from hct_mis_api.apps.targeting.models import TargetingCriteria def get_households_from_text(program: Program, text: Any, target_field: Any, separator: Any) -> Union[QuerySet, List]: @@ -145,40 +145,6 @@ class MassRestoreForm(RestoreForm): _selected_action = forms.CharField(widget=forms.MultipleHiddenInput) -class AddToTargetPopulationForm(forms.Form): - _selected_action = forms.CharField(widget=forms.MultipleHiddenInput) - action = forms.CharField(widget=forms.HiddenInput) - target_population = forms.ModelChoiceField( - queryset=TargetPopulation.objects.filter(status=TargetPopulation.STATUS_OPEN) - ) - - def __init__(self, *args: Any, **kwargs: Any) -> None: - read_only = kwargs.pop("read_only", False) - super().__init__(*args, **kwargs) - if read_only: - self.fields["target_population"].widget = HiddenInput() - - -class CreateTargetPopulationForm(forms.Form): - _selected_action = forms.CharField(widget=forms.MultipleHiddenInput) - action = forms.CharField(widget=forms.HiddenInput) - name = forms.CharField() - program = forms.ModelChoiceField(queryset=Program.objects.filter(status=Program.ACTIVE)) - - def __init__(self, *args: Any, **kwargs: Any) -> None: - read_only = kwargs.pop("read_only", False) - super().__init__(*args, **kwargs) - if "initial" in kwargs: - first = Household.objects.get(pk=kwargs["initial"]["_selected_action"][0]) - self.fields["program"].queryset = Program.objects.filter( - status=Program.ACTIVE, business_area=first.business_area - ) - - if read_only: - self.fields["program"].widget = HiddenInput() - self.fields["name"].widget = HiddenInput() - - class CreateTargetPopulationTextForm(forms.Form): action = forms.CharField(widget=forms.HiddenInput) name = forms.CharField() diff --git a/src/hct_mis_api/apps/household/models.py b/src/hct_mis_api/apps/household/models.py index 90985d1d3d..e96cd6e58b 100644 --- a/src/hct_mis_api/apps/household/models.py +++ b/src/hct_mis_api/apps/household/models.py @@ -563,19 +563,6 @@ class Meta: ) ] - def save(self, *args: Any, **kwargs: Any) -> None: - from hct_mis_api.apps.targeting.models import ( - HouseholdSelection, - TargetPopulation, - ) - - if self.withdrawn: - HouseholdSelection.objects.filter( - household=self, target_population__status=TargetPopulation.STATUS_LOCKED - ).delete() - cache.delete_pattern(f"count_{self.business_area.slug}_HouseholdNodeConnection_*") - super().save(*args, **kwargs) - def delete(self, *args: Any, **kwargs: Any) -> Tuple[int, Dict[str, int]]: household_deleted.send(self.__class__, instance=self) return super().delete(*args, **kwargs) diff --git a/src/hct_mis_api/apps/household/schema.py b/src/hct_mis_api/apps/household/schema.py index 18416d3f0d..580d84c2fc 100644 --- a/src/hct_mis_api/apps/household/schema.py +++ b/src/hct_mis_api/apps/household/schema.py @@ -91,7 +91,6 @@ DeduplicationEngineSimilarityPairIndividualNode, DeduplicationResultNode, ) -from hct_mis_api.apps.targeting.models import HouseholdSelection from hct_mis_api.apps.utils.graphql import does_path_exist_in_query from hct_mis_api.apps.utils.schema import ( ChartDatasetNode, @@ -185,11 +184,6 @@ def resolve_individuals_count(root, info: Any, **kwargs: Any) -> int: return root.iterable.aggregate(sum=Sum("size")).get("sum") -class HouseholdSelectionNode(DjangoObjectType): - class Meta: - model = HouseholdSelection - - class DeliveredQuantityNode(graphene.ObjectType): total_delivered_quantity = graphene.Decimal() currency = graphene.String() @@ -432,7 +426,6 @@ class HouseholdNode(BaseNodePermissionMixin, AdminUrlNodeMixin, DjangoObjectType country = graphene.String(description="Country name") currency = graphene.String() flex_fields = FlexFieldsScalar() - selection = graphene.Field(HouseholdSelectionNode) sanction_list_possible_match = graphene.Boolean() sanction_list_confirmed_match = graphene.Boolean() has_duplicates = graphene.Boolean(description="Mark household if any of individuals has Duplicate status") @@ -485,10 +478,6 @@ def resolve_country(parent: Household, info: Any) -> str: def resolve_country_origin(parent: Household, info: Any) -> str: return getattr(parent.country_origin, "name", "") - @staticmethod - def resolve_selection(parent: Household, info: Any) -> HouseholdSelection: - return parent.selections.first() - @staticmethod def resolve_individuals(parent: Household, info: Any, *arg: Any, **kwargs: Any) -> QuerySet: individuals_ids = list(parent.individuals(manager="all_merge_status_objects").values_list("id", flat=True)) diff --git a/src/hct_mis_api/apps/household/serializers.py b/src/hct_mis_api/apps/household/serializers.py index f8c4cf15ff..8cb77ac5dd 100644 --- a/src/hct_mis_api/apps/household/serializers.py +++ b/src/hct_mis_api/apps/household/serializers.py @@ -2,8 +2,7 @@ from typing import TYPE_CHECKING, Dict, Optional, Tuple from hct_mis_api.apps.household.models import Household -from hct_mis_api.apps.payment.models import Payment -from hct_mis_api.apps.targeting.models import HouseholdSelection, TargetPopulation +from hct_mis_api.apps.payment.models import Payment, PaymentPlan from hct_mis_api.apps.utils.models import MergeStatusModel if TYPE_CHECKING: @@ -18,11 +17,10 @@ def get_household_status(household: Household) -> Tuple[str, datetime]: if payments.exists(): return "paid", payments.first().delivery_date - selections = HouseholdSelection.objects.filter(household=household) - if selections.exists(): + if selections := Payment.objects.filter( + household=household, parent__status__in=PaymentPlan.PRE_PAYMENT_PLAN_STATUSES + ).exists(): selection = selections.order_by("updated_at").first() - if selection.target_population.status == TargetPopulation.STATUS_PROCESSING: - return "sent to cash assist", selection.updated_at return "targeted", selection.updated_at return "merged to population", household.created_at diff --git a/src/hct_mis_api/apps/payment/api/filters.py b/src/hct_mis_api/apps/payment/api/filters.py index f45da9a99d..4b7ebdacfe 100644 --- a/src/hct_mis_api/apps/payment/api/filters.py +++ b/src/hct_mis_api/apps/payment/api/filters.py @@ -12,6 +12,7 @@ class PaymentPlanFilter(FilterSet): choices=PaymentPlan.Status.choices, ) program = django_filters.CharFilter(method="filter_by_program") + name = django_filters.CharFilter(field_name="name", lookup_expr="startswith") class Meta: model = PaymentPlan @@ -23,4 +24,4 @@ class Meta: } def filter_by_program(self, qs: QuerySet, name: str, value: str) -> QuerySet: - return qs.filter(program_id=decode_id_string_required(value)) + return qs.filter(program_cycle__program_id=decode_id_string_required(value)) diff --git a/src/hct_mis_api/apps/payment/api/serializers.py b/src/hct_mis_api/apps/payment/api/serializers.py index b846a50a2e..99294c2fd4 100644 --- a/src/hct_mis_api/apps/payment/api/serializers.py +++ b/src/hct_mis_api/apps/payment/api/serializers.py @@ -35,7 +35,7 @@ class Meta: "unicef_id", "name", "status", - "target_population", + "targeting_criteria", "total_households_count", "currency", "total_entitled_quantity", diff --git a/src/hct_mis_api/apps/payment/filters.py b/src/hct_mis_api/apps/payment/filters.py index 2b66a8dd9b..2e27b44040 100644 --- a/src/hct_mis_api/apps/payment/filters.py +++ b/src/hct_mis_api/apps/payment/filters.py @@ -181,10 +181,15 @@ class PaymentPlanFilter(FilterSet): method="filter_by_status", choices=PaymentPlan.Status.choices + [("ASSIGNED", "Assigned")] ) status_not = ChoiceFilter(method="filter_status_not", choices=PaymentPlan.Status.choices) + verification_status = MultipleChoiceFilter( + method="filter_verification_status", choices=PaymentVerificationSummary.STATUS_CHOICES + ) total_entitled_quantity_from = NumberFilter(field_name="total_entitled_quantity", lookup_expr="gte") total_entitled_quantity_to = NumberFilter(field_name="total_entitled_quantity", lookup_expr="lte") dispersion_start_date = DateFilter(field_name="dispersion_start_date", lookup_expr="gte") dispersion_end_date = DateFilter(field_name="dispersion_end_date", lookup_expr="lte") + start_date = DateFilter(field_name="start_date", lookup_expr="gte") + end_date = DateFilter(field_name="end_date", lookup_expr="lte") is_follow_up = BooleanFilter(field_name="is_follow_up") is_payment_plan = BooleanFilter(method="filter_is_payment_plan") is_target_population = BooleanFilter(method="filter_is_target_population") @@ -207,6 +212,8 @@ class PaymentPlanFilter(FilterSet): method="filter_total_households_count_with_valid_phone_no_min" ) created_at_range = DateTimeRangeFilter(field_name="created_at") + service_provider = CharFilter(method="filter_service_provider") + delivery_types = MultipleChoiceFilter(method="filter_delivery_types", choices=DeliveryMechanism.get_choices()) class Meta: fields = tuple() @@ -315,11 +322,27 @@ def filter_total_households_count_with_valid_phone_no_min( def filter_status_not(queryset: "QuerySet", model_field: str, value: Any) -> "QuerySet": return queryset.exclude(status=value) + @staticmethod + def filter_verification_status(queryset: "QuerySet", model_field: str, verification_status: Any) -> "QuerySet": + return queryset.filter(payment_verification_summary__status__in=verification_status) + + @staticmethod + def filter_service_provider(queryset: "QuerySet", model_field: str, service_provider_name: str) -> "QuerySet": + return queryset.filter(delivery_mechanisms__financial_service_provider__name=service_provider_name) + + @staticmethod + def filter_delivery_types( + queryset: "QuerySet", model_field: str, delivery_types: Any + ) -> "QuerySet": # pragma: no cover + # the test added but looks like it does not count test_all_payment_plans_filter_by_delivery_types + return queryset.filter(delivery_mechanisms__delivery_mechanism__code__in=delivery_types) + class PaymentFilter(FilterSet): business_area = CharFilter(field_name="parent__business_area__slug", required=True) - payment_plan_id = CharFilter(required=True, method="payment_plan_id_filter") + payment_plan_id = CharFilter(method="payment_plan_id_filter") program_id = CharFilter(method="filter_by_program_id") + household_id = CharFilter(method="filter_by_household_id") def payment_plan_id_filter(self, qs: QuerySet, name: str, value: str) -> QuerySet: payment_plan_id = decode_id_string(value) @@ -349,7 +372,7 @@ class Meta: "entitlement_quantity_usd", "delivered_quantity", "financial_service_provider__name", - "parent__program__name", + "parent__program_cycle__program__name", "delivery_date", "mark", ) @@ -376,99 +399,5 @@ def filter_queryset(self, queryset: QuerySet) -> QuerySet: def filter_by_program_id(self, qs: "QuerySet", name: str, value: str) -> "QuerySet[Payment]": return qs.filter(parent__program_cycle__program_id=decode_id_string_required(value)) - -def payment_plan_filter(queryset: QuerySet[PaymentPlan], **kwargs: Any) -> QuerySet[PaymentPlan]: - business_area = kwargs.get("business_area") - program = kwargs.get("program") - service_provider = kwargs.get("service_provider") - delivery_types = kwargs.get("delivery_type") - verification_status = kwargs.get("verification_status") - start_date_gte, end_date_lte = kwargs.get("start_date_gte"), kwargs.get("end_date_lte") - search = kwargs.get("search") - - if business_area: - queryset = queryset.filter(business_area__slug=business_area) - - if program: - queryset = queryset.filter(program_cycle__program=decode_id_string(program)) - - if start_date_gte: - queryset = queryset.filter(start_date__gte=start_date_gte) - if end_date_lte: - queryset = queryset.filter(end_date__lte=end_date_lte) - - if verification_status: - queryset = queryset.filter(payment_verification_summary__status__in=verification_status) - - if service_provider: - queryset = queryset.filter(fsp_names__icontains=service_provider) - - if delivery_types: - q = Q() - for delivery_type in delivery_types: - q |= Q(delivery_types__icontains=delivery_type) - queryset = queryset.filter(q) - - if search: - q = Q() - values = search.split(" ") - for value in values: - q |= Q(unicef_id__istartswith=value) - queryset = queryset.filter(q) - - return queryset - - -def payment_plan_ordering(queryset: QuerySet[PaymentPlan], order_by: str) -> QuerySet[PaymentPlan]: - reverse = "-" if order_by.startswith("-") else "" - order_by = order_by[1:] if reverse else order_by - - if order_by == "verification_status": - qs = queryset.order_by(reverse + "custom_order") - elif order_by == "unicef_id": - qs = queryset.order_by(reverse + "unicef_id") - elif order_by == "dispersion_date": - # TODO this field is empty at the moment - qs = queryset - elif order_by == "timeframe": - qs = queryset.order_by(reverse + "start_date", reverse + "end_date") - else: - qs = queryset.order_by(reverse + order_by) - - return qs - - -def payment_filter(queryset: QuerySet[Payment], **kwargs: Any) -> QuerySet[Payment]: - business_area = kwargs.get("business_area") - household = kwargs.get("household") - program = kwargs.get("program") - - if business_area: - queryset = queryset.filter(business_area__slug=business_area) - - if household: - queryset = queryset.filter(household__id=decode_id_string(household)) - - if program: - queryset = queryset.filter(parent__program_cycle__program=decode_id_string(program)) - - return queryset - - -def payment_ordering(queryset: QuerySet[Payment], order_by: str) -> QuerySet[Payment]: - reverse = "-" if order_by.startswith("-") else "" - order_by = order_by[1:] if reverse else order_by - - if order_by in ("head_of_household", "entitlement_quantity", "delivered_quantity", "delivery_date"): - order_by_dict = {f"{order_by}__isnull": True} - qs_null = queryset.filter(**order_by_dict) - qs_non_null = queryset.exclude(**order_by_dict) - - if reverse: - qs = qs_non_null.order_by(f"-{order_by}").union(qs_null) - else: - qs = qs_null.union(qs_non_null.order_by(order_by)) - else: - qs = queryset.order_by(reverse + order_by) - - return qs + def filter_by_household_id(self, qs: "QuerySet", name: str, value: str) -> "QuerySet[Payment]": + return qs.filter(household_id=decode_id_string_required(value)) diff --git a/src/hct_mis_api/apps/payment/migrations/0015_migration.py b/src/hct_mis_api/apps/payment/migrations/0015_migration.py new file mode 100644 index 0000000000..c135e56202 --- /dev/null +++ b/src/hct_mis_api/apps/payment/migrations/0015_migration.py @@ -0,0 +1,40 @@ +# Generated by Django 3.2.25 on 2025-02-13 12:10 + +from django.db import migrations, models +import django.db.models.deletion +import django_fsm + + +def assign_targeting_criteria_for_all_payment_plans(apps, schema_editor): + PaymentPlan = apps.get_model("payment", "PaymentPlan") + TargetingCriteria = apps.get_model("targeting", "TargetingCriteria") + payment_plan_qs = PaymentPlan.objects.filter(targeting_criteria__isnull=True) + for payment_plan in payment_plan_qs: + payment_plan.targeting_criteria = TargetingCriteria.objects.create() # pragma no cover + payment_plan.save() # pragma no cover + + +class Migration(migrations.Migration): + + dependencies = [ + ('targeting', '0003_migration'), + ('payment', '0014_migration'), + ] + + operations = [ + migrations.RunPython(assign_targeting_criteria_for_all_payment_plans, reverse_code=migrations.RunPython.noop), + migrations.RemoveField( + model_name='paymentplan', + name='target_population', + ), + migrations.AlterField( + model_name='paymentplan', + name='status', + field=django_fsm.FSMField(choices=[('TP_OPEN', 'Open'), ('TP_LOCKED', 'Locked'), ('PROCESSING', 'Processing'), ('STEFICON_WAIT', 'Steficon Wait'), ('STEFICON_RUN', 'Steficon Run'), ('STEFICON_COMPLETED', 'Steficon Completed'), ('STEFICON_ERROR', 'Steficon Error'), ('DRAFT', 'Draft'), ('PREPARING', 'Preparing'), ('OPEN', 'Open'), ('LOCKED', 'Locked'), ('LOCKED_FSP', 'Locked FSP'), ('IN_APPROVAL', 'In Approval'), ('IN_AUTHORIZATION', 'In Authorization'), ('IN_REVIEW', 'In Review'), ('ACCEPTED', 'Accepted'), ('FINISHED', 'Finished')], db_index=True, default='TP_OPEN', max_length=50), + ), + migrations.AlterField( + model_name='paymentplan', + name='targeting_criteria', + field=models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, related_name='payment_plan', to='targeting.targetingcriteria'), + ), + ] diff --git a/src/hct_mis_api/apps/payment/models/payment.py b/src/hct_mis_api/apps/payment/models/payment.py index c770f7f5d3..b0c63e2b79 100644 --- a/src/hct_mis_api/apps/payment/models/payment.py +++ b/src/hct_mis_api/apps/payment/models/payment.py @@ -219,10 +219,6 @@ class Status(models.TextChoices): ACCEPTED = "ACCEPTED", "Accepted" FINISHED = "FINISHED", "Finished" - # remove after migration TP>PP - MIGRATION_BLOCKED = "MIGRATION_BLOCKED", "Migration Blocked" - MIGRATION_FAILED = "MIGRATION_FAILED", "Migration Failed" - PRE_PAYMENT_PLAN_STATUSES = ( Status.TP_OPEN, Status.TP_LOCKED, @@ -371,20 +367,9 @@ class Action(models.TextChoices): choices=BuildStatus.choices, default=None, protected=False, db_index=True, null=True, blank=True ) built_at = models.DateTimeField(null=True, blank=True) - # TODO: remove this field after migrations - target_population = models.ForeignKey( - "targeting.TargetPopulation", - on_delete=models.SET_NULL, - related_name="payment_plans", - null=True, - blank=True, - ) - # TODO: remove null=True after data migrations targeting_criteria = models.OneToOneField( "targeting.TargetingCriteria", - blank=True, - null=True, - on_delete=models.SET_NULL, + on_delete=models.PROTECT, related_name="payment_plan", ) currency = models.CharField(max_length=4, choices=CURRENCY_CHOICES, blank=True, null=True) @@ -759,7 +744,14 @@ def has_empty_criteria(self) -> bool: @property def has_empty_ids_criteria(self) -> bool: - return not bool(self.targeting_criteria.household_ids) and not bool(self.targeting_criteria.individual_ids) + has_hh_ids, has_ind_ids = False, False + for rule in self.targeting_criteria.rules.all(): + if rule.household_ids: + has_hh_ids = True + if rule.individual_ids: + has_ind_ids = True + + return not has_hh_ids and not has_ind_ids @property def excluded_beneficiaries_ids(self) -> List[str]: @@ -1008,8 +1000,6 @@ def build_status_pending(self) -> None: PaymentPlan.Status.TP_STEFICON_WAIT, PaymentPlan.Status.TP_STEFICON_COMPLETED, PaymentPlan.Status.TP_STEFICON_ERROR, - # TODO: remove after migrations TP>PP - PaymentPlan.Status.MIGRATION_BLOCKED, ] ], ) @@ -1028,8 +1018,6 @@ def build_status_building(self) -> None: PaymentPlan.Status.TP_STEFICON_WAIT, PaymentPlan.Status.TP_STEFICON_COMPLETED, PaymentPlan.Status.TP_STEFICON_ERROR, - # TODO: remove after migrations TP>PP - PaymentPlan.Status.MIGRATION_BLOCKED, ] ], ) @@ -1048,8 +1036,6 @@ def build_status_failed(self) -> None: PaymentPlan.Status.TP_STEFICON_COMPLETED, PaymentPlan.Status.TP_STEFICON_ERROR, PaymentPlan.Status.TP_STEFICON_WAIT, - # TODO: remove after migrations TP>PP - PaymentPlan.Status.MIGRATION_BLOCKED, ] ], ) diff --git a/src/hct_mis_api/apps/payment/schema.py b/src/hct_mis_api/apps/payment/schema.py index 4b093f78c3..dd17f0d4a3 100644 --- a/src/hct_mis_api/apps/payment/schema.py +++ b/src/hct_mis_api/apps/payment/schema.py @@ -2,14 +2,12 @@ from decimal import Decimal from typing import Any, Dict, List, Optional, Union -from django.db import models from django.db.models import ( Case, CharField, Count, Exists, F, - IntegerField, OuterRef, Q, QuerySet, @@ -25,7 +23,6 @@ from graphene import relay from graphene_django import DjangoObjectType from graphql_relay import to_global_id -from graphql_relay.connection.arrayconnection import connection_from_list_slice from hct_mis_api.apps.account.permissions import ( AdminUrlNodeMixin, @@ -68,16 +65,11 @@ PaymentVerificationFilter, PaymentVerificationLogEntryFilter, PaymentVerificationPlanFilter, - payment_filter, - payment_ordering, - payment_plan_filter, - payment_plan_ordering, ) from hct_mis_api.apps.payment.inputs import ( AvailableFspsForDeliveryMechanismsInput, GetCashplanVerificationSampleSizeInput, ) -from hct_mis_api.apps.payment.managers import ArraySubquery from hct_mis_api.apps.payment.models import ( Approval, ApprovalProcess, @@ -107,7 +99,6 @@ get_payment_plan_object, ) from hct_mis_api.apps.program.schema import ProgramNode -from hct_mis_api.apps.targeting.models import TargetPopulation from hct_mis_api.apps.utils.schema import ( ChartDatasetNode, ChartDetailedDatasetsNode, @@ -360,9 +351,6 @@ def resolve_payment_plan_hard_conflicted(self, info: Any) -> Union[Any, graphene def resolve_payment_plan_soft_conflicted(self, info: Any) -> Union[Any, graphene.Boolean]: return self.parent.status == PaymentPlan.Status.OPEN and self.payment_plan_soft_conflicted - def resolve_target_population(self, info: Any) -> TargetPopulation: - return self.parent.target_population - def resolve_full_name(self, info: Any) -> str: # TODO: add to test this one return self.head_of_household.full_name if self.head_of_household else "" @@ -845,130 +833,6 @@ class Meta: connection_class = ExtendedConnection -class CashPlanAndPaymentPlanNode(BaseNodePermissionMixin, AdminUrlNodeMixin, graphene.ObjectType): - """ - for CashPlan and PaymentPlan models - """ - - permission_classes = ( - hopePermissionClass(Permissions.PAYMENT_VERIFICATION_VIEW_DETAILS), - hopePermissionClass(Permissions.PROGRAMME_VIEW_LIST_AND_DETAILS), - ) - - obj_type = graphene.String() - id = graphene.String() - unicef_id = graphene.String() - verification_status = graphene.String() - status = graphene.String() - currency = graphene.String() - total_delivered_quantity = graphene.Float() - start_date = graphene.String() - end_date = graphene.String() - program_name = graphene.String() - updated_at = graphene.String() - verification_plans = graphene.List(PaymentVerificationPlanNode) - total_number_of_households = graphene.Int() - total_entitled_quantity = graphene.Float() - total_undelivered_quantity = graphene.Float() - - # TODO: Fields with dummy data - assistance_measurement = graphene.String() - dispersion_date = graphene.String() - service_provider_full_name = graphene.String() - - def resolve_id(self, info: Any, **kwargs: Any) -> str: - return to_global_id(self.__class__.__name__ + "Node", self.id) - - def resolve_obj_type(self, info: Any, **kwargs: Any) -> str: - return self.__class__.__name__ - - def resolve_total_number_of_households(self, info: Any, **kwargs: Any) -> int: - return self.payment_items.count() - - def resolve_verification_status(self, info: Any, **kwargs: Any) -> Optional[graphene.String]: - return self.payment_verification_summary.status if hasattr(self, "payment_verification_summary") else None - - def resolve_status(self, info: Any, **kwargs: Any) -> Optional[graphene.String]: - return self.status - - def resolve_program_name(self, info: Any, **kwargs: Any) -> graphene.String: - return self.program.name - - def resolve_verification_plans(self, info: Any, **kwargs: Any) -> graphene.List: - return self.payment_verification_plans.all() - - # TODO: do we need this empty fields ?? - def resolve_assistance_measurement(self, info: Any, **kwargs: Any) -> str: - return "" - - def resolve_dispersion_date(self, info: Any, **kwargs: Any) -> str: - return "" - - def resolve_service_provider_full_name(self, info: Any, **kwargs: Any) -> str: - return "" - - -class PaymentRecordAndPaymentNode(BaseNodePermissionMixin, graphene.ObjectType): - permission_classes = ( - hopePermissionClass(Permissions.PAYMENT_VERIFICATION_VIEW_DETAILS), - hopePermissionClass(Permissions.PROGRAMME_VIEW_LIST_AND_DETAILS), - ) - - obj_type = graphene.String() - id = graphene.String() - unicef_id = graphene.String() - status = graphene.String() - full_name = graphene.String(source="full_name") - parent = graphene.Field(CashPlanAndPaymentPlanNode, source="parent") - entitlement_quantity = graphene.Float(source="entitlement_quantity") - delivered_quantity = graphene.Float(source="delivered_quantity") - delivered_quantity_usd = graphene.Float(source="delivered_quantity_usd") - currency = graphene.String(source="currency") - delivery_date = graphene.String(source="delivery_date") - verification = graphene.Field(PaymentVerificationNode) - - def resolve_obj_type(self, info: Any, **kwargs: Any) -> str: - return self.__class__.__name__ - - def resolve_id(self, info: Any, **kwargs: Any) -> str: - return to_global_id(self.__class__.__name__ + "Node", self.id) - - def resolve_status(self, info: Any, **kwargs: Any) -> str: - return self.status.replace(" ", "_").upper() - - def resolve_verification(self, info: Any, **kwargs: Any) -> Any: - return self.payment_verifications.first() - - -class PageInfoNode(graphene.ObjectType): - start_cursor = graphene.String() - end_cursor = graphene.String() - has_next_page = graphene.Boolean() - has_previous_page = graphene.Boolean() - - -class CashPlanAndPaymentPlanEdges(graphene.ObjectType): - cursor = graphene.String() - node = graphene.Field(CashPlanAndPaymentPlanNode) - - -class PaginatedCashPlanAndPaymentPlanNode(graphene.ObjectType): - page_info = graphene.Field(PageInfoNode) - edges = graphene.List(CashPlanAndPaymentPlanEdges) - total_count = graphene.Int() - - -class PaymentRecordsAndPaymentsEdges(graphene.ObjectType): - cursor = graphene.String() - node = graphene.Field(PaymentRecordAndPaymentNode) - - -class PaginatedPaymentRecordsAndPaymentsNode(graphene.ObjectType): - page_info = graphene.Field(PageInfoNode) - edges = graphene.List(PaymentRecordsAndPaymentsEdges) - total_count = graphene.Int() - - class GenericPaymentPlanNode(graphene.ObjectType): permission_classes = ( hopePermissionClass(Permissions.PAYMENT_VERIFICATION_VIEW_DETAILS), @@ -1020,12 +884,6 @@ def resolve_total_undelivered_quantity(self, info: Any, **kwargs: Any) -> graphe def resolve_can_create_payment_verification_plan(self, info: Any, **kwargs: Any) -> graphene.Boolean: return self.can_create_payment_verification_plan - def resolve_status_date(self, info: Any, **kwargs: Any) -> graphene.DateTime: - return self.status_date - - def resolve_status(self, info: Any, **kwargs: Any) -> graphene.String: - return self.status - class Query(graphene.ObjectType): payment = relay.Node.Field(PaymentNode) @@ -1034,17 +892,6 @@ class Query(graphene.ObjectType): filterset_class=PaymentFilter, permission_classes=(hopePermissionClass(Permissions.PM_VIEW_LIST),), ) - all_payment_records_and_payments = graphene.Field( - PaginatedPaymentRecordsAndPaymentsNode, - business_area=graphene.String(required=True), - program=graphene.String(), - household=graphene.ID(), - order_by=graphene.String(), - first=graphene.Int(), - last=graphene.Int(), - before=graphene.String(), - after=graphene.String(), - ) financial_service_provider_xlsx_template = relay.Node.Field(FinancialServiceProviderXlsxTemplateNode) all_financial_service_provider_xlsx_templates = DjangoPermissionFilterConnectionField( @@ -1165,23 +1012,6 @@ class Query(graphene.ObjectType): FspChoices, input=AvailableFspsForDeliveryMechanismsInput(), ) - all_cash_plans_and_payment_plans = graphene.Field( - PaginatedCashPlanAndPaymentPlanNode, - business_area=graphene.String(required=True), - program=graphene.String(), - search=graphene.String(), - service_provider=graphene.String(), - delivery_type=graphene.List(graphene.String), - verification_status=graphene.List(graphene.String), - start_date_gte=graphene.String(), - end_date_lte=graphene.String(), - order_by=graphene.String(), - first=graphene.Int(), - last=graphene.Int(), - before=graphene.String(), - after=graphene.String(), - is_payment_verification_page=graphene.Boolean(), - ) def resolve_available_fsps_for_delivery_mechanisms(self, info: Any, input: Dict, **kwargs: Any) -> List: business_area_slug = info.context.headers.get("Business-Area") @@ -1515,95 +1345,3 @@ def resolve_payment_plan_status_choices(self, info: Any, **kwargs: Any) -> List[ def resolve_payment_plan_background_action_status_choices(self, info: Any, **kwargs: Any) -> List[Dict[str, Any]]: return to_choice_object(PaymentPlan.BackgroundActionStatus.choices) - - def resolve_all_cash_plans_and_payment_plans(self, info: Any, **kwargs: Any) -> Dict[str, Any]: - fsp_qs = FinancialServiceProvider.objects.filter( - delivery_mechanisms_per_payment_plan__payment_plan=OuterRef("pk") - ).distinct() - delivery_mechanisms_per_pp_qs = DeliveryMechanismPerPaymentPlan.objects.filter( - payment_plan=OuterRef("pk") - ).distinct("delivery_mechanism") - payment_verification_summary_qs = PaymentVerificationSummary.objects.filter(payment_plan_id=OuterRef("id")) - - if "is_payment_verification_page" in kwargs and kwargs.get("is_payment_verification_page"): - payment_plan_qs = PaymentPlan.objects.filter(status=PaymentPlan.Status.FINISHED) - else: - payment_plan_qs = PaymentPlan.objects.all() - - payment_plan_qs = payment_plan_qs.annotate( - fsp_names=ArraySubquery(fsp_qs.values_list("name", flat=True)), - delivery_types=ArraySubquery( - delivery_mechanisms_per_pp_qs.values_list("delivery_mechanism__name", flat=True) - ), - currency_order=F("currency"), - ) - qs = payment_plan_qs.annotate( - custom_order=Case( - When( - Exists(payment_verification_summary_qs.filter(status=PaymentVerificationPlan.STATUS_ACTIVE)), - then=Value(1), - ), - When( - Exists(payment_verification_summary_qs.filter(status=PaymentVerificationPlan.STATUS_PENDING)), - then=Value(2), - ), - When( - Exists(payment_verification_summary_qs.filter(status=PaymentVerificationPlan.STATUS_FINISHED)), - then=Value(3), - ), - output_field=IntegerField(), - default=Value(0), - ), - total_number_of_households=Count("payment_items"), - total_entitled_quantity_order=Coalesce("total_entitled_quantity", 0, output_field=models.DecimalField()), - total_delivered_quantity_order=Coalesce("total_delivered_quantity", 0, output_field=models.DecimalField()), - total_undelivered_quantity_order=Coalesce( - "total_undelivered_quantity", 0, output_field=models.DecimalField() - ), - ).order_by("-updated_at", "custom_order") - - # filtering - qs = payment_plan_filter(qs, **kwargs) - - # ordering - if order_by_value := kwargs.get("order_by"): - qs = payment_plan_ordering(qs, order_by_value) - - qs_list = list(qs) - count = len(qs) - - # add qraphql pagination - resp = connection_from_list_slice( - qs_list, - args=kwargs, - connection_type=PaginatedCashPlanAndPaymentPlanNode, - edge_type=CashPlanAndPaymentPlanEdges, - pageinfo_type=PageInfoNode, - list_length=count, - ) - resp.total_count = count - - return resp - - def resolve_all_payment_records_and_payments(self, info: Any, **kwargs: Any) -> Dict[str, Any]: - """used in Household Page > Payment Records""" - qs = Payment.objects.eligible().exclude(parent__is_removed=True).order_by("-updated_at") - - qs = payment_filter(qs, **kwargs) - - if order_by_value := kwargs.get("order_by"): - qs = payment_ordering(qs, order_by_value) - - qs_list = list(qs) - count = len(qs) - - resp = connection_from_list_slice( - qs_list, - args=kwargs, - connection_type=PaginatedPaymentRecordsAndPaymentsNode, - edge_type=PaymentRecordsAndPaymentsEdges, - pageinfo_type=PageInfoNode, - list_length=count, - ) - resp.total_count = count - return resp diff --git a/src/hct_mis_api/apps/payment/services/payment_plan_services.py b/src/hct_mis_api/apps/payment/services/payment_plan_services.py index 49f90dfe4b..6b9bd02917 100644 --- a/src/hct_mis_api/apps/payment/services/payment_plan_services.py +++ b/src/hct_mis_api/apps/payment/services/payment_plan_services.py @@ -478,6 +478,7 @@ def update(self, input_data: Dict) -> PaymentPlan: should_update_money_stats = False should_rebuild_list = False vulnerability_filter = False + old_targeting_criteria = None name = input_data.get("name") vulnerability_score_min = input_data.get("vulnerability_score_min") @@ -541,7 +542,7 @@ def update(self, input_data: Dict) -> PaymentPlan: targeting_criteria = from_input_to_targeting_criteria(targeting_criteria_input, program) if self.payment_plan.status == PaymentPlan.Status.TP_OPEN: if self.payment_plan.targeting_criteria: - self.payment_plan.targeting_criteria.delete() + old_targeting_criteria = self.payment_plan.targeting_criteria self.payment_plan.targeting_criteria = targeting_criteria if excluded_ids is not None: should_rebuild_list = True @@ -565,6 +566,9 @@ def update(self, input_data: Dict) -> PaymentPlan: Payment.objects.filter(parent=self.payment_plan).update(currency=self.payment_plan.currency) self.payment_plan.save() + # remove old targeting_criteria + if old_targeting_criteria: + old_targeting_criteria.delete() # prevent race between commit transaction and using in task transaction.on_commit( diff --git a/src/hct_mis_api/apps/payment/signals.py b/src/hct_mis_api/apps/payment/signals.py index d18e4598a0..97f25dee48 100644 --- a/src/hct_mis_api/apps/payment/signals.py +++ b/src/hct_mis_api/apps/payment/signals.py @@ -1,7 +1,7 @@ from typing import Any from django.core.cache import cache -from django.db.models.signals import post_save +from django.db.models.signals import post_save, pre_delete from django.dispatch import receiver from hct_mis_api.api.caches import get_or_create_cache_key @@ -22,3 +22,18 @@ def increment_payment_plan_version_cache(sender: Any, instance: PaymentPlan, cre version_key = f"{business_area_slug}:{business_area_version}:management_payment_plans_list" get_or_create_cache_key(version_key, 0) cache.incr(version_key) + + +@receiver(post_save, sender=PaymentPlan) +@receiver(pre_delete, sender=PaymentPlan) +def increment_target_population_version_cache(sender: Any, instance: PaymentPlan, **kwargs: dict) -> None: + if instance.status in PaymentPlan.PRE_PAYMENT_PLAN_STATUSES: + business_area_slug = instance.business_area.slug + business_area_version = get_or_create_cache_key(f"{business_area_slug}:version", 1) + + program_id = instance.program_cycle.program.id + + version_key = f"{business_area_slug}:{business_area_version}:{program_id}:target_population_list" + get_or_create_cache_key(version_key, 0) + + cache.incr(version_key) diff --git a/src/hct_mis_api/apps/periodic_data_update/service/flexible_attribute_service.py b/src/hct_mis_api/apps/periodic_data_update/service/flexible_attribute_service.py index 97107493c1..d7497b9ff7 100644 --- a/src/hct_mis_api/apps/periodic_data_update/service/flexible_attribute_service.py +++ b/src/hct_mis_api/apps/periodic_data_update/service/flexible_attribute_service.py @@ -4,6 +4,7 @@ from hct_mis_api.apps.core.models import FlexibleAttribute, PeriodicFieldData from hct_mis_api.apps.core.utils import decode_id_string +from hct_mis_api.apps.payment.models import PaymentPlan from hct_mis_api.apps.periodic_data_update.signals import ( increment_periodic_field_version_cache, ) @@ -75,7 +76,10 @@ def update_pdu_flex_attributes(self) -> None: self.delete_pdu_flex_attributes(flexible_attribute_ids_to_preserve=flexible_attribute_ids_to_preserve) def update_pdu_flex_attributes_in_program_update(self) -> None: - if self.program.registration_imports.exists() or self.program.targetpopulation_set.exists(): + if ( + self.program.registration_imports.exists() + or PaymentPlan.objects.filter(program_cycle__program=self.program).exists() + ): self.increase_pdu_rounds_for_program_with_rdi() else: self.update_pdu_flex_attributes() diff --git a/src/hct_mis_api/apps/periodic_data_update/service/periodic_data_update_export_template_service.py b/src/hct_mis_api/apps/periodic_data_update/service/periodic_data_update_export_template_service.py index 20809d503f..9d838e595e 100644 --- a/src/hct_mis_api/apps/periodic_data_update/service/periodic_data_update_export_template_service.py +++ b/src/hct_mis_api/apps/periodic_data_update/service/periodic_data_update_export_template_service.py @@ -164,7 +164,7 @@ def _get_individuals_queryset(self) -> QuerySet[Individual]: queryset = queryset.filter(registration_data_import_id=registration_data_import_id_filter_decoded) if self.target_population_id_filter: target_population_id_filter_decoded = decode_id_string_required(self.target_population_id_filter) - queryset = queryset.filter(household__target_populations=target_population_id_filter_decoded) + queryset = queryset.filter(household__payment__parent_id=target_population_id_filter_decoded) if self.gender_filter: queryset = queryset.filter(sex=self.gender_filter) if self.age_filter: diff --git a/src/hct_mis_api/apps/program/api/views.py b/src/hct_mis_api/apps/program/api/views.py index 0219321d39..cd766ef37d 100644 --- a/src/hct_mis_api/apps/program/api/views.py +++ b/src/hct_mis_api/apps/program/api/views.py @@ -99,11 +99,8 @@ def perform_destroy(self, program_cycle: ProgramCycle) -> None: if program_cycle.program.cycles.count() == 1: raise ValidationError("Don’t allow to delete last Cycle.") - if program_cycle.target_populations.exists(): - raise ValidationError("Don’t allow to delete Cycle with assigned Target Population") - if program_cycle.payment_plans.exists(): - raise ValidationError("Don’t allow to delete Cycle with assigned Payment Plan") + raise ValidationError("Don’t allow to delete Cycle with assigned Target Population") program_cycle.delete() diff --git a/src/hct_mis_api/apps/program/filters.py b/src/hct_mis_api/apps/program/filters.py index 9900c2f3b2..c729ba1964 100644 --- a/src/hct_mis_api/apps/program/filters.py +++ b/src/hct_mis_api/apps/program/filters.py @@ -19,8 +19,8 @@ CustomOrderingFilter, get_program_id_from_headers, ) +from hct_mis_api.apps.payment.models import PaymentPlan from hct_mis_api.apps.program.models import Program, ProgramCycle -from hct_mis_api.apps.targeting.models import TargetPopulation class ProgramFilter(FilterSet): @@ -71,8 +71,8 @@ def filter_number_of_households(self, queryset: QuerySet, name: str, value: Dict def filter_number_of_households_with_tp_in_program(self, queryset: QuerySet, name: str, value: Dict) -> QuerySet: queryset = queryset.annotate( total_hh_count=Count( - "targetpopulation__households", - filter=~Q(targetpopulation__status=TargetPopulation.STATUS_OPEN), + "household_count", + filter=~Q(cycles__payment_plans__status=PaymentPlan.Status.TP_OPEN), distinct=True, ), ) diff --git a/src/hct_mis_api/apps/program/models.py b/src/hct_mis_api/apps/program/models.py index c472662a98..b39debebbd 100644 --- a/src/hct_mis_api/apps/program/models.py +++ b/src/hct_mis_api/apps/program/models.py @@ -381,12 +381,7 @@ def __str__(self) -> str: @property def can_remove_cycle(self) -> bool: - return ( - not self.target_populations.exists() - and not self.payment_plans.exists() - and self.program.cycles.count() > 1 - and self.status == ProgramCycle.DRAFT - ) + return not self.payment_plans.exists() and self.program.cycles.count() > 1 and self.status == ProgramCycle.DRAFT @property def total_entitled_quantity_usd(self) -> Decimal: diff --git a/src/hct_mis_api/apps/program/schema.py b/src/hct_mis_api/apps/program/schema.py index 9c95f3cc3a..93c295fdd9 100644 --- a/src/hct_mis_api/apps/program/schema.py +++ b/src/hct_mis_api/apps/program/schema.py @@ -44,7 +44,7 @@ get_program_id_from_headers, to_choice_object, ) -from hct_mis_api.apps.payment.models import DeliveryMechanism +from hct_mis_api.apps.payment.models import DeliveryMechanism, PaymentPlan from hct_mis_api.apps.payment.utils import get_payment_items_for_dashboard from hct_mis_api.apps.program.filters import ProgramCycleFilter, ProgramFilter from hct_mis_api.apps.program.models import BeneficiaryGroup, Program, ProgramCycle @@ -149,7 +149,7 @@ def resolve_pdu_fields(program: Program, info: Any, **kwargs: Any) -> QuerySet: @staticmethod def resolve_target_populations_count(program: Program, info: Any, **kwargs: Any) -> int: - return program.targetpopulation_set.count() + return PaymentPlan.objects.filter(program_cycle__program=program).count() @staticmethod def resolve_can_finish(program: Program, info: Any, **kwargs: Any) -> bool: diff --git a/src/hct_mis_api/apps/registration_data/admin.py b/src/hct_mis_api/apps/registration_data/admin.py index c693f7918b..82d236e39c 100644 --- a/src/hct_mis_api/apps/registration_data/admin.py +++ b/src/hct_mis_api/apps/registration_data/admin.py @@ -34,7 +34,6 @@ from hct_mis_api.apps.registration_datahub.celery_tasks import ( merge_registration_data_import_task, ) -from hct_mis_api.apps.targeting.models import HouseholdSelection from hct_mis_api.apps.utils.admin import HOPEModelAdminBase from hct_mis_api.apps.utils.elasticsearch_utils import ( remove_elasticsearch_documents_by_matching_ids, @@ -251,8 +250,8 @@ def delete_merged_rdi(self, request: HttpRequest, pk: UUID) -> Optional[HttpResp else: number_of_households = rdi.households.count() number_of_individuals = rdi.individuals.count() - number_of__household_selections = HouseholdSelection.objects.filter( - household__registration_data_import=rdi, + number_of_household_selections = Payment.objects.filter( + parent__household__registration_data_import=rdi, ).count() return confirm_action( self, @@ -263,7 +262,7 @@ def delete_merged_rdi(self, request: HttpRequest, pk: UUID) -> Optional[HttpResp

Deleting the RDI will also result in the removal of related households, individuals, and their associated grievance tickets.

Consequently, these households will no longer be part of any Target Population, if they were included previously.


-

This action will result in removing: {number_of_households} Households, {number_of_individuals} Individuals and {number_of__household_selections} HouseholdSelections

+

This action will result in removing: {number_of_households} Households, {number_of_individuals} Individuals and {number_of_household_selections} Payments

""" ), "Successfully executed", diff --git a/src/hct_mis_api/apps/reporting/services/generate_report_service.py b/src/hct_mis_api/apps/reporting/services/generate_report_service.py index 8741e869be..1b531fa446 100644 --- a/src/hct_mis_api/apps/reporting/services/generate_report_service.py +++ b/src/hct_mis_api/apps/reporting/services/generate_report_service.py @@ -253,10 +253,8 @@ def format_payment_row(cls, payment: Payment) -> tuple: payment.delivered_quantity_usd or payment.delivered_quantity, cls._format_date(payment.delivery_date), payment.delivery_type, - payment.parent.unicef_id, payment.entitlement_quantity, - payment.parent.target_population.id, - payment.parent.target_population.name, + payment.parent.name, cash_or_voucher, payment.household.id, ) diff --git a/src/hct_mis_api/apps/steficon/admin.py b/src/hct_mis_api/apps/steficon/admin.py index 0e7a14cac4..18a9dee86c 100644 --- a/src/hct_mis_api/apps/steficon/admin.py +++ b/src/hct_mis_api/apps/steficon/admin.py @@ -35,6 +35,7 @@ from hct_mis_api.apps.account.models import User from hct_mis_api.apps.administration.widgets import JsonWidget +from hct_mis_api.apps.payment.models import PaymentPlan from hct_mis_api.apps.steficon.forms import ( RuleCommitAdminForm, RuleDownloadCSVFileProcessForm, @@ -186,9 +187,7 @@ def test(self, request: HttpRequest, pk: UUID) -> TemplateResponse: else: context["form"] = RuleTestForm(initial={"raw_data": '{"a": 1, "b":2}', "opt": "optFile"}) if "form" in context: - from hct_mis_api.apps.targeting.models import TargetPopulation - - context["form"].fields["target_population"].widget = AutocompleteWidget(TargetPopulation, self.admin_site) + context["form"].fields["target_population"].widget = AutocompleteWidget(PaymentPlan, self.admin_site) context["form"].fields["content_type"].widget = AutocompleteWidget(ContentType, self.admin_site) return TemplateResponse(request, "admin/steficon/rule/test.html", context) diff --git a/src/hct_mis_api/apps/steficon/forms.py b/src/hct_mis_api/apps/steficon/forms.py index 55031aeaf2..4f8b0c958b 100644 --- a/src/hct_mis_api/apps/steficon/forms.py +++ b/src/hct_mis_api/apps/steficon/forms.py @@ -10,6 +10,7 @@ from django.forms import HiddenInput, Media, Textarea from django.utils.translation import gettext_lazy as _ +from hct_mis_api.apps.payment.models import PaymentPlan from hct_mis_api.apps.steficon.config import config from hct_mis_api.apps.steficon.interpreters import Interpreter, mapping from hct_mis_api.apps.steficon.models import Rule, RuleCommit @@ -114,9 +115,7 @@ def __init__( limit_choices_to: Union[Union[Q, Dict[str, Any]], "_ChoicesCallable", None] = None, **kwargs: Any, ) -> None: - from hct_mis_api.apps.targeting.models import TargetPopulation - - queryset = TargetPopulation.objects.all() + queryset = PaymentPlan.objects.all() super().__init__( queryset, empty_label=empty_label, diff --git a/src/hct_mis_api/apps/targeting/admin.py b/src/hct_mis_api/apps/targeting/admin.py deleted file mode 100644 index 057b7f6f5e..0000000000 --- a/src/hct_mis_api/apps/targeting/admin.py +++ /dev/null @@ -1,137 +0,0 @@ -from typing import Optional -from uuid import UUID - -from django.contrib import admin -from django.db.models.query import QuerySet -from django.http import HttpRequest, HttpResponse, HttpResponseRedirect -from django.template.response import TemplateResponse -from django.urls import reverse - -from admin_extra_buttons.api import button, confirm_action -from adminfilters.autocomplete import AutoCompleteFilter -from adminfilters.depot.widget import DepotManager -from adminfilters.filters import ChoicesFieldComboFilter, MaxMinFilter, ValueFilter -from adminfilters.querystring import QueryStringFilter -from smart_admin.mixins import LinkedObjectsMixin - -from hct_mis_api.apps.core.utils import AutoCompleteFilterTemp -from hct_mis_api.apps.targeting.celery_tasks import target_population_apply_steficon -from hct_mis_api.apps.targeting.forms import TargetPopulationForm -from hct_mis_api.apps.targeting.models import HouseholdSelection, TargetPopulation -from hct_mis_api.apps.targeting.steficon import SteficonExecutorMixin -from hct_mis_api.apps.utils.admin import ( - HOPEModelAdminBase, - IsOriginalAdminMixin, - SoftDeletableAdminMixin, -) - - -@admin.register(TargetPopulation) -class TargetPopulationAdmin( - SoftDeletableAdminMixin, - SteficonExecutorMixin, - LinkedObjectsMixin, - HOPEModelAdminBase, -): - form = TargetPopulationForm - list_display = ( - "name", - "status", - "sent_to_datahub", - "business_area", - "program", - ) - date_hierarchy = "created_at" - search_fields = ("name",) - list_filter = ( - DepotManager, - QueryStringFilter, - ("status", ChoicesFieldComboFilter), - ("business_area", AutoCompleteFilter), - ("steficon_rule__rule", AutoCompleteFilter), - ("program", AutoCompleteFilter), - "sent_to_datahub", - ) - raw_id_fields = ( - "created_by", - "changed_by", - "finalized_by", - "business_area", - "program", - "targeting_criteria", - ) - filter_horizontal = ["households"] - - @button() - def selection(self, request: "HttpRequest", pk: "UUID") -> "HttpResponse": - obj = self.get_object(request, str(pk)) - url = reverse("admin:targeting_householdselection_changelist") - return HttpResponseRedirect(f"{url}?target_population={obj.id}") - - @button(permission="targeting.view_targetpopulation") - def inspect(self, request: "HttpRequest", pk: "UUID") -> TemplateResponse: - context = self.get_common_context(request, pk, aeu_groups=[None], action="Inspect") - - return TemplateResponse(request, "admin/targeting/targetpopulation/inspect.html", context) - - @button(permission="payment.view_payment") - def payments(self, request: "HttpRequest", pk: "UUID") -> TemplateResponse: - context = self.get_common_context(request, pk, aeu_groups=[None], action="payments") - - return TemplateResponse(request, "admin/targeting/targetpopulation/payments.html", context) - - @button(enabled=lambda b: b.context["original"].steficon_rule, permission="steficon.rerun_rule") - def rerun_steficon(self, request: "HttpRequest", pk: "UUID") -> TemplateResponse: - def _rerun(request: "HttpRequest") -> TemplateResponse: - context = self.get_common_context(request, pk) - target_population_apply_steficon.delay(pk) - return TemplateResponse(request, "admin/targeting/targetpopulation/rule_change.html", context) - - obj: Optional[TargetPopulation] = self.get_object(request, str(pk)) - if not obj: - raise Exception("Target population not found") - return confirm_action( - self, - request, - _rerun, - "Do you want to rerun the steficon rule '%s' ?" % obj.steficon_rule, - "Updating target population in the background with correct scores.", - title="ddddd", - ) - - -@admin.register(HouseholdSelection) -class HouseholdSelectionAdmin(HOPEModelAdminBase, IsOriginalAdminMixin): - list_display = ( - "household", - "target_population", - "vulnerability_score", - ) - raw_id_fields = ( - "household", - "target_population", - ) - list_filter = ( - DepotManager, - QueryStringFilter, - ("household__unicef_id", ValueFilter), - ("target_population", AutoCompleteFilterTemp), - ("target_population__id", ValueFilter), - ("vulnerability_score", MaxMinFilter), - ) - actions = ["reset_sync_date", "reset_vulnerability_score"] - - def get_queryset(self, request: HttpRequest) -> QuerySet: - qs = self.model.original_and_repr_objects.get_queryset() - ordering = self.get_ordering(request) - if ordering: - qs = qs.order_by(*ordering) - return qs - - def reset_sync_date(self, request: "HttpRequest", queryset: "QuerySet") -> None: - from hct_mis_api.apps.household.models import Household - - Household.objects.filter(selections__in=queryset).update(last_sync_at=None) - - def reset_vulnerability_score(self, request: "HttpRequest", queryset: "QuerySet") -> None: - queryset.update(vulnerability_score=None) diff --git a/src/hct_mis_api/apps/targeting/api/filters.py b/src/hct_mis_api/apps/targeting/api/filters.py deleted file mode 100644 index f349c8785a..0000000000 --- a/src/hct_mis_api/apps/targeting/api/filters.py +++ /dev/null @@ -1,15 +0,0 @@ -from django_filters import rest_framework as filters - -from hct_mis_api.apps.core.api.filters import UpdatedAtFilter -from hct_mis_api.apps.targeting.models import TargetPopulation - - -class TargetPopulationFilter(UpdatedAtFilter): - name = filters.CharFilter( - field_name="name", - lookup_expr="startswith", - ) - - class Meta: - model = TargetPopulation - fields = ("status", "name") diff --git a/src/hct_mis_api/apps/targeting/api/serializers.py b/src/hct_mis_api/apps/targeting/api/serializers.py index 924af4c2ac..584f79dfea 100644 --- a/src/hct_mis_api/apps/targeting/api/serializers.py +++ b/src/hct_mis_api/apps/targeting/api/serializers.py @@ -1,15 +1,15 @@ from rest_framework import serializers from hct_mis_api.api.utils import EncodedIdSerializerMixin -from hct_mis_api.apps.targeting.models import TargetPopulation +from hct_mis_api.apps.payment.models import PaymentPlan class TargetPopulationListSerializer(EncodedIdSerializerMixin): - status = serializers.CharField(source="get_status_display") + status = serializers.SerializerMethodField(method_name="get_status") created_by = serializers.CharField(source="created_by.get_full_name", default="") class Meta: - model = TargetPopulation + model = PaymentPlan fields = ( "id", "name", @@ -17,3 +17,10 @@ class Meta: "created_by", "created_at", ) + + @staticmethod + def get_status(obj: PaymentPlan) -> str: + if obj.status in PaymentPlan.PRE_PAYMENT_PLAN_STATUSES: + return obj.get_status_display() + else: + return "Assigned" diff --git a/src/hct_mis_api/apps/targeting/api/views.py b/src/hct_mis_api/apps/targeting/api/views.py index ee812a7f3d..f648c4b36d 100644 --- a/src/hct_mis_api/apps/targeting/api/views.py +++ b/src/hct_mis_api/apps/targeting/api/views.py @@ -15,10 +15,10 @@ from hct_mis_api.api.caches import etag_decorator from hct_mis_api.apps.account.api.permissions import TargetingViewListPermission from hct_mis_api.apps.core.api.mixins import BusinessAreaProgramMixin +from hct_mis_api.apps.payment.api.filters import PaymentPlanFilter +from hct_mis_api.apps.payment.models import PaymentPlan from hct_mis_api.apps.targeting.api.caches import TPKeyConstructor -from hct_mis_api.apps.targeting.api.filters import TargetPopulationFilter from hct_mis_api.apps.targeting.api.serializers import TargetPopulationListSerializer -from hct_mis_api.apps.targeting.models import TargetPopulation logger = logging.getLogger(__name__) @@ -31,12 +31,12 @@ class TargetPopulationViewSet( serializer_class = TargetPopulationListSerializer permission_classes = [TargetingViewListPermission] filter_backends = (OrderingFilter, DjangoFilterBackend) - filterset_class = TargetPopulationFilter + filterset_class = PaymentPlanFilter def get_queryset(self) -> QuerySet: business_area = self.get_business_area() program = self.get_program() - return TargetPopulation.objects.filter(business_area=business_area, program=program) + return PaymentPlan.objects.filter(business_area=business_area, program_cycle__program=program) @etag_decorator(TPKeyConstructor) @cache_response(timeout=config.REST_API_TTL, key_func=TPKeyConstructor()) diff --git a/src/hct_mis_api/apps/targeting/apps.py b/src/hct_mis_api/apps/targeting/apps.py index 895713c904..2dc4df117f 100644 --- a/src/hct_mis_api/apps/targeting/apps.py +++ b/src/hct_mis_api/apps/targeting/apps.py @@ -3,6 +3,3 @@ class TargetingConfig(AppConfig): name = "hct_mis_api.apps.targeting" - - def ready(self) -> None: - import hct_mis_api.apps.targeting.signals # noqa: F401 diff --git a/src/hct_mis_api/apps/targeting/celery_tasks.py b/src/hct_mis_api/apps/targeting/celery_tasks.py index 17ca39bbb1..9b81543d5c 100644 --- a/src/hct_mis_api/apps/targeting/celery_tasks.py +++ b/src/hct_mis_api/apps/targeting/celery_tasks.py @@ -1,128 +1,22 @@ import logging -from typing import Any, Dict -from uuid import UUID +from typing import Dict -from django.core.cache import cache -from django.db import transaction from django.db.transaction import atomic from django.utils import timezone from celery.exceptions import TaskError -from concurrency.api import disable_concurrency from hct_mis_api.apps.core.celery import app from hct_mis_api.apps.household.forms import CreateTargetPopulationTextForm from hct_mis_api.apps.payment.models import PaymentPlan from hct_mis_api.apps.payment.services.payment_plan_services import PaymentPlanService from hct_mis_api.apps.program.models import Program -from hct_mis_api.apps.targeting.models import HouseholdSelection, TargetPopulation -from hct_mis_api.apps.targeting.services.targeting_stats_refresher import ( - full_rebuild, - refresh_stats, -) from hct_mis_api.apps.utils.logs import log_start_and_end from hct_mis_api.apps.utils.sentry import sentry_tags, set_sentry_business_area_tag logger = logging.getLogger(__name__) -@app.task(bind=True, queue="priority", default_retry_delay=60, max_retries=3) -@log_start_and_end -@sentry_tags -def target_population_apply_steficon(self: Any, target_population_id: UUID) -> None: - from hct_mis_api.apps.steficon.models import RuleCommit - - try: - target_population = TargetPopulation.objects.get(pk=target_population_id) - set_sentry_business_area_tag(target_population.business_area.name) - - rule: RuleCommit = target_population.steficon_rule - if not rule: - raise Exception("TargetPopulation does not have a Steficon rule") - except Exception as e: - logger.exception(e) - raise self.retry(exc=e) - try: - target_population.status = TargetPopulation.STATUS_STEFICON_RUN - target_population.steficon_applied_date = timezone.now() - target_population.save() - updates = [] - with atomic(): - entry: HouseholdSelection - for entry in target_population.selections.all(): - result = rule.execute( - { - "household": entry.household, - "target_population": target_population, - } - ) - entry.vulnerability_score = result.value - updates.append(entry) - HouseholdSelection.objects.bulk_update(updates, ["vulnerability_score"]) - target_population.status = TargetPopulation.STATUS_STEFICON_COMPLETED - target_population.steficon_applied_date = timezone.now() - with disable_concurrency(target_population): - target_population.save() - except Exception as e: - logger.exception(e) - target_population.steficon_applied_date = timezone.now() - target_population.status = TargetPopulation.STATUS_STEFICON_ERROR - target_population.save() - raise self.retry(exc=e) - - -@app.task(bind=True, queue="priority", default_retry_delay=60, max_retries=3) -@log_start_and_end -@sentry_tags -def target_population_rebuild_stats(self: Any, target_population_id: UUID) -> None: - with cache.lock( - f"target_population_rebuild_stats_{target_population_id}", - blocking_timeout=60 * 10, - timeout=60 * 60 * 2, - ): - target_population = TargetPopulation.objects.get(pk=target_population_id) - set_sentry_business_area_tag(target_population.business_area.name) - target_population.build_status = TargetPopulation.BUILD_STATUS_BUILDING - target_population.save() - try: - with transaction.atomic(): - target_population = refresh_stats(target_population) - target_population.save() - except Exception as e: - logger.exception(e) - target_population.refresh_from_db() - target_population.build_status = TargetPopulation.BUILD_STATUS_FAILED - target_population.save() - raise self.retry(exc=e) - - -@app.task(bind=True, queue="priority", default_retry_delay=60, max_retries=3) -@log_start_and_end -@sentry_tags -def target_population_full_rebuild(self: Any, target_population_id: UUID) -> None: - with cache.lock( - f"target_population_full_rebuild_{target_population_id}", - blocking_timeout=60 * 10, - timeout=60 * 60 * 2, - ): - target_population = TargetPopulation.objects.get(pk=target_population_id) - set_sentry_business_area_tag(target_population.business_area.name) - target_population.build_status = TargetPopulation.BUILD_STATUS_BUILDING - target_population.save() - try: - with transaction.atomic(): - if not target_population.is_open(): - raise Exception("Target population is not in open status") - target_population = full_rebuild(target_population) - target_population.save() - except Exception as e: - logger.exception(e) - target_population.refresh_from_db() - target_population.build_status = TargetPopulation.BUILD_STATUS_FAILED - target_population.save() - raise self.retry(exc=e) - - @app.task() @log_start_and_end @sentry_tags diff --git a/src/hct_mis_api/apps/targeting/filters.py b/src/hct_mis_api/apps/targeting/filters.py deleted file mode 100644 index c748d56c2a..0000000000 --- a/src/hct_mis_api/apps/targeting/filters.py +++ /dev/null @@ -1,167 +0,0 @@ -from typing import TYPE_CHECKING, Any - -from django.contrib.postgres.fields import IntegerRangeField -from django.db.models import Count, DateTimeField, Q -from django.db.models.functions import Lower - -from django_filters import ( - BooleanFilter, - CharFilter, - DateTimeFilter, - FilterSet, - ModelMultipleChoiceFilter, - NumericRangeFilter, -) - -import hct_mis_api.apps.targeting.models as target_models -from hct_mis_api.apps.core.filters import ( - DateTimeRangeFilter, - GlobalProgramFilterMixin, - IntegerFilter, -) -from hct_mis_api.apps.core.utils import CustomOrderingFilter, decode_id_string_required -from hct_mis_api.apps.program.models import Program - -if TYPE_CHECKING: - from django.db.models.query import QuerySet - - -class HouseholdFilter(FilterSet): - order_by = CustomOrderingFilter( - fields=( - "id", - Lower("head_of_household__full_name"), - "size", - Lower("admin_area__name"), - "updated_at", - "unicef_id", - ) - ) - business_area = CharFilter(field_name="business_area__slug") - - -class TargetPopulationFilter(GlobalProgramFilterMixin, FilterSet): - """Query target population records. - - Loads associated entries for Households and TargetRules. - """ - - name = CharFilter(field_name="name", lookup_expr="startswith") - created_by_name = CharFilter(field_name="created_by", method="filter_created_by_name") - total_households_count_min = IntegerFilter( - field_name="total_households_count", - lookup_expr="gte", - ) - total_households_count_max = IntegerFilter( - field_name="total_households_count", - lookup_expr="lte", - ) - total_individuals_count_min = IntegerFilter( - field_name="total_individuals_count", - lookup_expr="gte", - ) - total_individuals_count_max = IntegerFilter( - field_name="total_individuals_count", - lookup_expr="lte", - ) - business_area = CharFilter(field_name="business_area__slug") - program = ModelMultipleChoiceFilter(field_name="program", to_field_name="id", queryset=Program.objects.all()) - created_at_range = DateTimeRangeFilter(field_name="created_at") - - payment_plan_applicable = BooleanFilter(method="filter_payment_plan_applicable") - status_not = CharFilter(field_name="status", exclude=True) - - total_households_count_with_valid_phone_no_max = IntegerFilter( - method="filter_total_households_count_with_valid_phone_no_max" - ) - total_households_count_with_valid_phone_no_min = IntegerFilter( - method="filter_total_households_count_with_valid_phone_no_min" - ) - program_cycle = CharFilter(method="filter_by_program_cycle") - - @staticmethod - def filter_created_by_name(queryset: "QuerySet", model_field: str, value: Any) -> "QuerySet": - """Gets full name of the associated user from query.""" - fname_query_key = f"{model_field}__given_name__icontains" - lname_query_key = f"{model_field}__family_name__icontains" - for name in value.strip().split(): - queryset = queryset.filter(Q(**{fname_query_key: name}) | Q(**{lname_query_key: name})) - return queryset - - @staticmethod - def filter_number_of_households_min(queryset: "QuerySet", model_field: str, value: Any) -> "QuerySet": - queryset = queryset.exclude(status=target_models.TargetPopulation.STATUS_OPEN).filter( - number_of_households__gte=value - ) - return queryset - - @staticmethod - def filter_number_of_households_max(queryset: "QuerySet", model_field: str, value: Any) -> "QuerySet": - queryset = queryset.exclude(status=target_models.TargetPopulation.STATUS_OPEN).filter( - number_of_households__lte=value - ) - return queryset - - @staticmethod - def filter_total_households_count_with_valid_phone_no_max( - queryset: "QuerySet", model_field: str, value: Any - ) -> "QuerySet": - queryset = queryset.annotate( - household_count_with_phone_number=Count( - "households", - filter=Q(households__head_of_household__phone_no_valid=True) - | Q(households__head_of_household__phone_no_alternative_valid=True), - ) - ).filter(household_count_with_phone_number__lte=value) - return queryset - - @staticmethod - def filter_total_households_count_with_valid_phone_no_min( - queryset: "QuerySet", model_field: str, value: Any - ) -> "QuerySet": - queryset = queryset.annotate( - household_count_with_phone_number=Count( - "households", - filter=Q(households__head_of_household__phone_no_valid=True) - | Q(households__head_of_household__phone_no_alternative_valid=True), - ) - ).filter(household_count_with_phone_number__gte=value) - return queryset - - @staticmethod - def filter_payment_plan_applicable(queryset: "QuerySet", model_field: str, value: Any) -> "QuerySet": - if value is True: - return queryset.filter(status=target_models.TargetPopulation.STATUS_READY_FOR_PAYMENT_MODULE) - return queryset - - @staticmethod - def filter_by_program_cycle(queryset: "QuerySet", name: str, value: str) -> "QuerySet": - return queryset.filter(program_cycle_id=decode_id_string_required(value)) - - class Meta: - model = target_models.TargetPopulation - fields = { - "program": ["exact"], - "created_at": ["exact", "lte", "gte"], - "updated_at": ["exact", "lte", "gte"], - "status": ["exact"], - "households": ["exact"], - } - - filter_overrides = { - IntegerRangeField: {"filter_class": NumericRangeFilter}, - DateTimeField: {"filter_class": DateTimeFilter}, - } - - order_by = CustomOrderingFilter( - fields=( - Lower("name"), - "created_at", - ("created_by__first_name", "created_by"), - "updated_at", - "status", - "total_family_size", - "total_households_count", - "program__id", - ) - ) diff --git a/src/hct_mis_api/apps/targeting/fixtures.py b/src/hct_mis_api/apps/targeting/fixtures.py index 316dc6abb5..7d9789dff0 100644 --- a/src/hct_mis_api/apps/targeting/fixtures.py +++ b/src/hct_mis_api/apps/targeting/fixtures.py @@ -1,29 +1,17 @@ -import datetime as dt import random import typing -from typing import Any, Iterable, List, Optional, Union +from typing import Any, List, Optional, Union import factory from factory.django import DjangoModelFactory -from pytz import utc -from hct_mis_api.apps.account.fixtures import UserFactory from hct_mis_api.apps.core.field_attributes.core_fields_attributes import FieldFactory from hct_mis_api.apps.core.field_attributes.fields_types import Scope -from hct_mis_api.apps.core.models import BusinessArea -from hct_mis_api.apps.household.fixtures import HouseholdFactory from hct_mis_api.apps.household.models import RESIDENCE_STATUS_CHOICE -from hct_mis_api.apps.program.fixtures import ( - ProgramCycleFactory, - get_program_with_dct_type_and_name, -) -from hct_mis_api.apps.program.models import Program from hct_mis_api.apps.targeting.models import ( - HouseholdSelection, TargetingCriteria, TargetingCriteriaRule, TargetingCriteriaRuleFilter, - TargetPopulation, ) @@ -77,44 +65,3 @@ class Meta: class TargetingCriteriaFactory(DjangoModelFactory): class Meta: model = TargetingCriteria - - -class TargetPopulationFactory(DjangoModelFactory): - class Meta: - model = TargetPopulation - django_get_or_create = ("name", "business_area", "program") - - name = factory.Faker( - "sentence", - nb_words=6, - variable_nb_words=True, - ext_word_list=None, - ) - created_by = factory.SubFactory(UserFactory) - created_at = factory.Faker("date_time_this_decade", before_now=False, after_now=True, tzinfo=utc) - updated_at = factory.LazyAttribute(lambda t: t.created_at + dt.timedelta(days=random.randint(60, 1000))) - status = TargetPopulation.STATUS_OPEN - program = factory.LazyAttribute( - lambda t: Program.objects.filter(status=Program.ACTIVE).first() or get_program_with_dct_type_and_name() - ) - business_area = factory.LazyAttribute(lambda t: BusinessArea.objects.first()) - program_cycle = factory.LazyAttribute(lambda t: t.program.cycles.first() or ProgramCycleFactory(program=t.program)) - - @factory.post_generation - def households(self, create: bool, extracted: Iterable, **kwargs: Any) -> None: - if not create: - households = HouseholdFactory.create_batch(5) - self.households.add(*households) - - if extracted: - for household in extracted: - self.households.add(household) - - -class HouseholdSelectionFactory(DjangoModelFactory): - class Meta: - model = HouseholdSelection - - household = factory.SubFactory(HouseholdFactory) - target_population = factory.SubFactory(TargetPopulationFactory) - vulnerability_score = factory.fuzzy.FuzzyInteger(0, 100) diff --git a/src/hct_mis_api/apps/targeting/forms.py b/src/hct_mis_api/apps/targeting/forms.py index b91ded79a6..719cbc0025 100644 --- a/src/hct_mis_api/apps/targeting/forms.py +++ b/src/hct_mis_api/apps/targeting/forms.py @@ -1,12 +1,12 @@ from django import forms +from hct_mis_api.apps.payment.models import PaymentPlan from hct_mis_api.apps.program.models import Program -from hct_mis_api.apps.targeting.models import TargetPopulation class TargetPopulationForm(forms.ModelForm): class Meta: - model = TargetPopulation + model = PaymentPlan exclude = ["id"] def clean_program(self) -> Program: diff --git a/src/hct_mis_api/apps/targeting/graphql_types.py b/src/hct_mis_api/apps/targeting/graphql_types.py index 530b3d1a6f..9e722ce255 100644 --- a/src/hct_mis_api/apps/targeting/graphql_types.py +++ b/src/hct_mis_api/apps/targeting/graphql_types.py @@ -13,7 +13,6 @@ from hct_mis_api.apps.payment.models import DeliveryMechanism, PaymentPlan from hct_mis_api.apps.program.models import Program from hct_mis_api.apps.targeting.choices import FlexFieldClassification -from hct_mis_api.apps.targeting.filters import TargetPopulationFilter from hct_mis_api.apps.utils.schema import Arg if TYPE_CHECKING: @@ -149,7 +148,7 @@ class TargetingCriteriaRuleNode(DjangoObjectType): def resolve_individuals_filters_blocks(self, info: Any) -> "QuerySet[TargetingIndividualRuleFilterBlock]": return self.individuals_filters_blocks.all() - def resolve_households_filters_blocks(self, info: Any) -> "QuerySet[TargetPopulationFilter]": + def resolve_households_filters_blocks(self, info: Any) -> "QuerySet": return self.filters.all() class Meta: @@ -167,20 +166,15 @@ class TargetingCriteriaNode(DjangoObjectType): def resolve_rules(parent, info: Any) -> "QuerySet": return parent.rules.all() - # TODO: can remove this one after refactoring/removing db fields def resolve_individual_ids(parent, info: Any) -> str: - ind_ids_str = parent.individual_ids - ind_ids: set = ( - set(ind_id.strip() for ind_id in ind_ids_str.split(",") if ind_id.strip()) if ind_ids_str else set() - ) + ind_ids: set = set() for rule in parent.rules.all(): if rule.individual_ids: ind_ids.update(ind_id.strip() for ind_id in rule.individual_ids.split(",") if ind_id.strip()) return ", ".join(sorted(ind_ids)) def resolve_household_ids(parent, info: Any) -> str: - hh_ids_str = parent.household_ids - hh_ids: set = set(hh_id.strip() for hh_id in hh_ids_str.split(",") if hh_id.strip()) if hh_ids_str else set() + hh_ids: set = set() for rule in parent.rules.all(): if rule.household_ids: hh_ids.update(hh_id.strip() for hh_id in rule.household_ids.split(",") if hh_id.strip()) diff --git a/src/hct_mis_api/apps/targeting/migrations/0004_migration.py b/src/hct_mis_api/apps/targeting/migrations/0004_migration.py new file mode 100644 index 0000000000..0b61b941ac --- /dev/null +++ b/src/hct_mis_api/apps/targeting/migrations/0004_migration.py @@ -0,0 +1,68 @@ +# Generated by Django 3.2.25 on 2025-02-13 12:10 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('payment', '0015_migration'), + ('targeting', '0003_migration'), + ] + + operations = [ + migrations.RemoveField( + model_name='targetpopulation', + name='business_area', + ), + migrations.RemoveField( + model_name='targetpopulation', + name='changed_by', + ), + migrations.RemoveField( + model_name='targetpopulation', + name='created_by', + ), + migrations.RemoveField( + model_name='targetpopulation', + name='finalized_by', + ), + migrations.RemoveField( + model_name='targetpopulation', + name='households', + ), + migrations.RemoveField( + model_name='targetpopulation', + name='program', + ), + migrations.RemoveField( + model_name='targetpopulation', + name='program_cycle', + ), + migrations.RemoveField( + model_name='targetpopulation', + name='steficon_rule', + ), + migrations.RemoveField( + model_name='targetpopulation', + name='storage_file', + ), + migrations.RemoveField( + model_name='targetpopulation', + name='targeting_criteria', + ), + migrations.RemoveField( + model_name='targetingcriteria', + name='household_ids', + ), + migrations.RemoveField( + model_name='targetingcriteria', + name='individual_ids', + ), + migrations.DeleteModel( + name='HouseholdSelection', + ), + migrations.DeleteModel( + name='TargetPopulation', + ), + ] diff --git a/src/hct_mis_api/apps/targeting/models.py b/src/hct_mis_api/apps/targeting/models.py index 257679c4d2..b0fb979424 100644 --- a/src/hct_mis_api/apps/targeting/models.py +++ b/src/hct_mis_api/apps/targeting/models.py @@ -1,35 +1,20 @@ import logging -from typing import TYPE_CHECKING, Any, List, Union - -from django.conf import settings -from django.contrib.postgres.fields import CICharField -from django.core.validators import ( - MaxLengthValidator, - MinLengthValidator, - ProhibitNullCharactersValidator, -) +from typing import TYPE_CHECKING, Any, List + from django.db import models from django.db.models import JSONField, Q -from django.db.models.constraints import UniqueConstraint -from django.utils.text import Truncator from django.utils.translation import gettext_lazy as _ from model_utils import Choices -from model_utils.models import SoftDeletableModel -from hct_mis_api.apps.activity_log.utils import create_mapping_dict from hct_mis_api.apps.core.field_attributes.core_fields_attributes import FieldFactory from hct_mis_api.apps.core.field_attributes.fields_types import Scope -from hct_mis_api.apps.core.models import StorageFile -from hct_mis_api.apps.core.utils import map_unicef_ids_to_households_unicef_ids from hct_mis_api.apps.household.models import ( ROLE_PRIMARY, - Household, Individual, IndividualRoleInHousehold, ) from hct_mis_api.apps.payment.models import PaymentPlan -from hct_mis_api.apps.steficon.models import Rule, RuleCommit from hct_mis_api.apps.targeting.choices import FlexFieldClassification from hct_mis_api.apps.targeting.services.targeting_service import ( TargetingCollectorRuleFilterBlockBase, @@ -38,16 +23,7 @@ TargetingCriteriaRuleQueryingBase, TargetingIndividualRuleFilterBlockBase, ) -from hct_mis_api.apps.utils.models import ( - AdminUrlMixin, - ConcurrencyModel, - RepresentationManager, - TimeStampedUUIDModel, -) -from hct_mis_api.apps.utils.validators import ( - DoubleSpaceValidator, - StartEndSpaceValidator, -) +from hct_mis_api.apps.utils.models import TimeStampedUUIDModel if TYPE_CHECKING: from django.db.models.query import QuerySet @@ -55,311 +31,6 @@ logger = logging.getLogger(__name__) -class TargetPopulation(SoftDeletableModel, TimeStampedUUIDModel, ConcurrencyModel, AdminUrlMixin): - """Model for target populations. - - Has N:N association with households. - """ - - ACTIVITY_LOG_MAPPING = create_mapping_dict( - [ - "name", - "created_by", - "change_date", - "changed_by", - "finalized_at", - "finalized_by", - "status", - "child_male_count", - "child_female_count", - "adult_male_count", - "adult_female_count", - "total_households_count", - "total_individuals_count", - "program", - "targeting_criteria_string", - "sent_to_datahub", - "steficon_rule", - "exclusion_reason", - "excluded_ids", - ], - { - "steficon_rule": "additional_formula", - "steficon_applied_date": "additional_formula_applied_date", - "vulnerability_score_min": "score_min", - "vulnerability_score_max": "score_max", - }, - ) - - STATUS_OPEN = "OPEN" - STATUS_LOCKED = "LOCKED" - STATUS_PROCESSING = "PROCESSING" - STATUS_STEFICON_WAIT = "STEFICON_WAIT" - STATUS_STEFICON_RUN = "STEFICON_RUN" - STATUS_STEFICON_COMPLETED = "STEFICON_COMPLETED" - STATUS_STEFICON_ERROR = "STEFICON_ERROR" - STATUS_SENDING_TO_CASH_ASSIST = "SENDING_TO_CASH_ASSIST" - STATUS_READY_FOR_CASH_ASSIST = "READY_FOR_CASH_ASSIST" - STATUS_READY_FOR_PAYMENT_MODULE = "READY_FOR_PAYMENT_MODULE" - STATUS_ASSIGNED = "ASSIGNED" - - STATUS_CHOICES = ( - (STATUS_OPEN, _("Open")), - (STATUS_LOCKED, _("Locked")), - (STATUS_STEFICON_WAIT, _("Waiting for Rule Engine")), - (STATUS_STEFICON_RUN, _("Rule Engine Running")), - (STATUS_STEFICON_COMPLETED, _("Rule Engine Completed")), - (STATUS_STEFICON_ERROR, _("Rule Engine Errored")), - (STATUS_PROCESSING, _("Processing")), - (STATUS_SENDING_TO_CASH_ASSIST, _("Sending to Cash Assist")), - (STATUS_READY_FOR_CASH_ASSIST, _("Ready for cash assist")), - (STATUS_READY_FOR_PAYMENT_MODULE, _("Ready for payment module")), - (STATUS_ASSIGNED, _("Assigned")), - ) - - BUILD_STATUS_PENDING = "PENDING" - BUILD_STATUS_BUILDING = "BUILDING" - BUILD_STATUS_FAILED = "FAILED" - BUILD_STATUS_OK = "OK" - - BUILD_STATUS_CHOICES = ( - (BUILD_STATUS_PENDING, _("Pending")), - (BUILD_STATUS_BUILDING, _("Building")), - (BUILD_STATUS_FAILED, _("Failed")), - (BUILD_STATUS_OK, _("Ok")), - ) - - name = CICharField( - db_index=True, - max_length=255, - validators=[ - MinLengthValidator(3), - MaxLengthValidator(255), - DoubleSpaceValidator, - StartEndSpaceValidator, - ProhibitNullCharactersValidator(), - ], - ) - created_by = models.ForeignKey( - settings.AUTH_USER_MODEL, - on_delete=models.SET_NULL, - related_name="target_populations", - null=True, - ) - change_date = models.DateTimeField(null=True, blank=True) - changed_by = models.ForeignKey( - settings.AUTH_USER_MODEL, - on_delete=models.SET_NULL, - related_name="changed_target_populations", - null=True, - blank=True, - ) - finalized_at = models.DateTimeField(null=True, blank=True) - finalized_by = models.ForeignKey( - settings.AUTH_USER_MODEL, - on_delete=models.SET_NULL, - related_name="finalized_target_populations", - null=True, - blank=True, - ) - business_area = models.ForeignKey("core.BusinessArea", null=True, on_delete=models.CASCADE) - status = models.CharField(max_length=256, choices=STATUS_CHOICES, default=STATUS_OPEN, db_index=True) - build_status = models.CharField( - max_length=256, choices=BUILD_STATUS_CHOICES, default=BUILD_STATUS_PENDING, db_index=True - ) - built_at = models.DateTimeField(null=True, blank=True) - households = models.ManyToManyField( - "household.Household", - related_name="target_populations", - through="HouseholdSelection", - ) - program = models.ForeignKey( - "program.Program", - help_text="""Set only when the target population moves from draft to - candidate list frozen state (approved)""", - on_delete=models.PROTECT, - ) - program_cycle = models.ForeignKey( - "program.ProgramCycle", on_delete=models.CASCADE, related_name="target_populations" - ) - targeting_criteria = models.OneToOneField( - "TargetingCriteria", - blank=True, - null=True, - on_delete=models.SET_NULL, - related_name="target_population", - ) - sent_to_datahub = models.BooleanField( - default=False, - help_text=""" - Flag set when TP is processed by celery task - """, - db_index=True, - ) - steficon_rule = models.ForeignKey( - RuleCommit, - null=True, - on_delete=models.PROTECT, - related_name="target_populations", - blank=True, - ) - steficon_applied_date = models.DateTimeField(blank=True, null=True) - vulnerability_score_min = models.DecimalField( - null=True, - decimal_places=3, - max_digits=6, - help_text="Written by a tool such as Corticon.", - blank=True, - ) - vulnerability_score_max = models.DecimalField( - null=True, - decimal_places=3, - max_digits=6, - help_text="Written by a tool such as Corticon.", - blank=True, - ) - - excluded_ids = models.TextField(blank=True) - exclusion_reason = models.TextField(blank=True) - - total_households_count = models.PositiveIntegerField( - blank=True, - null=True, - ) - total_individuals_count = models.PositiveIntegerField( - blank=True, - null=True, - ) - child_male_count = models.PositiveIntegerField( - blank=True, - null=True, - ) - child_female_count = models.PositiveIntegerField( - blank=True, - null=True, - ) - adult_male_count = models.PositiveIntegerField( - blank=True, - null=True, - ) - adult_female_count = models.PositiveIntegerField( - blank=True, - null=True, - ) - - storage_file = models.OneToOneField(StorageFile, blank=True, null=True, on_delete=models.SET_NULL) - - @property - def excluded_household_ids(self) -> List: - return map_unicef_ids_to_households_unicef_ids(self.excluded_ids) - - @property - def household_list(self) -> "QuerySet": - if self.status == TargetPopulation.STATUS_OPEN: - return self.households.all() - params = { - "target_population": self, - } - if self.vulnerability_score_max is not None: - params["vulnerability_score__lte"] = self.vulnerability_score_max - if self.vulnerability_score_min is not None: - params["vulnerability_score__gte"] = self.vulnerability_score_min - return Household.objects.filter(selections__in=HouseholdSelection.objects.filter(**params)) - - def get_criteria_string(self) -> str: - try: - return self.targeting_criteria.get_criteria_string() - except Exception: - return "" - - @property - def targeting_criteria_string(self) -> str: - return Truncator(self.get_criteria_string()).chars(390, "...") - - @property - def has_empty_criteria(self) -> bool: - return self.targeting_criteria is None or self.targeting_criteria.rules.count() == 0 - - @property - def has_empty_ids_criteria(self) -> bool: - # TODO: update - return not bool(self.targeting_criteria.household_ids) and not bool(self.targeting_criteria.individual_ids) - - @property - def allowed_steficon_rule(self) -> Union[Rule, None]: - if not self.program: - return None - tp = ( - TargetPopulation.objects.filter( - program=self.program, - steficon_rule__isnull=False, - ) - .filter(status__in=(TargetPopulation.STATUS_PROCESSING, TargetPopulation.STATUS_READY_FOR_CASH_ASSIST)) - .order_by("-created_at") - .distinct() - .first() - ) - if tp is None: - return None - return tp.steficon_rule.rule - - def set_to_ready_for_cash_assist(self) -> None: - self.status = self.STATUS_READY_FOR_CASH_ASSIST - self.sent_to_datahub = True - - def is_finalized(self) -> bool: - return self.status in (self.STATUS_PROCESSING, self.STATUS_READY_FOR_CASH_ASSIST) - - def is_locked(self) -> bool: - return self.status in ( - self.STATUS_LOCKED, - self.STATUS_STEFICON_COMPLETED, - self.STATUS_STEFICON_ERROR, - self.STATUS_STEFICON_RUN, - ) - - def is_open(self) -> bool: - return self.status in (self.STATUS_OPEN,) - - def __str__(self) -> str: - return self.name - - class Meta: - constraints = [ - UniqueConstraint( - fields=["name", "business_area", "program", "is_removed"], - condition=Q(is_removed=False), - name="target_population_unique_if_not_removed", - ) - ] - verbose_name = "Target Population" - - -class HouseholdSelection(TimeStampedUUIDModel): - """ - M2M table between Households and TargetPopulations - """ - - household = models.ForeignKey( - "household.Household", - on_delete=models.CASCADE, - related_name="selections", - ) - target_population = models.ForeignKey("TargetPopulation", on_delete=models.CASCADE, related_name="selections") - vulnerability_score = models.DecimalField( - blank=True, null=True, decimal_places=3, max_digits=6, help_text="Written by Steficon", db_index=True - ) - is_original = models.BooleanField(db_index=True, default=False) - is_migration_handled = models.BooleanField(default=False) - - objects = RepresentationManager() - original_and_repr_objects = models.Manager() - - class Meta: - unique_together = ("household", "target_population") - verbose_name = "Household Selection" - - class TargetingCriteria(TimeStampedUUIDModel, TargetingCriteriaQueryingBase): """ Class with filtering criteria flags and a set of ORed Rules. Rules are either applied for a candidate list @@ -377,10 +48,6 @@ class TargetingCriteria(TimeStampedUUIDModel, TargetingCriteriaQueryingBase): default=False, help_text=_("Exclude households with individuals (members or collectors) on sanction list."), ) - # TODO: deprecated already moved to 'TargetingCriteriaRule' - household_ids = models.TextField(blank=True) - # TODO: deprecated already moved to 'TargetingCriteriaRule' - individual_ids = models.TextField(blank=True) def get_rules(self) -> "QuerySet": return self.rules.all() @@ -394,18 +61,6 @@ def get_query(self) -> Q: query = super().get_query() if self.payment_plan.status != PaymentPlan.Status.TP_OPEN: query &= Q(size__gt=0) - - q_hh_ids = Q(unicef_id__in=self.household_ids.split(", ")) - q_ind_ids = Q(individuals__unicef_id__in=self.individual_ids.split(", ")) - - if self.household_ids and self.individual_ids: - query &= Q(q_hh_ids | q_ind_ids) - return query - - if self.household_ids: - query &= q_hh_ids - if self.individual_ids: - query &= q_ind_ids return query diff --git a/src/hct_mis_api/apps/targeting/services/targeting_stats_refresher.py b/src/hct_mis_api/apps/targeting/services/targeting_stats_refresher.py deleted file mode 100644 index c41e0220f0..0000000000 --- a/src/hct_mis_api/apps/targeting/services/targeting_stats_refresher.py +++ /dev/null @@ -1,50 +0,0 @@ -from datetime import datetime - -from django.db.models import Count, Q -from django.utils import timezone - -from dateutil.relativedelta import relativedelta - -from hct_mis_api.apps.household.models import FEMALE, MALE, Household, Individual -from hct_mis_api.apps.targeting.models import TargetPopulation - - -def refresh_stats(target_population: TargetPopulation) -> TargetPopulation: - households_ids = target_population.household_list.values_list("id", flat=True) - - delta18 = relativedelta(years=+18) - date18ago = datetime.now() - delta18 - - targeted_individuals = Individual.objects.filter(household__id__in=households_ids).aggregate( - child_male_count=Count("id", distinct=True, filter=Q(birth_date__gt=date18ago, sex=MALE)), - child_female_count=Count("id", distinct=True, filter=Q(birth_date__gt=date18ago, sex=FEMALE)), - adult_male_count=Count("id", distinct=True, filter=Q(birth_date__lte=date18ago, sex=MALE)), - adult_female_count=Count("id", distinct=True, filter=Q(birth_date__lte=date18ago, sex=FEMALE)), - total_individuals_count=Count("id", distinct=True), - ) - - target_population.child_male_count = targeted_individuals["child_male_count"] - target_population.child_female_count = targeted_individuals["child_female_count"] - target_population.adult_male_count = targeted_individuals["adult_male_count"] - target_population.adult_female_count = targeted_individuals["adult_female_count"] - target_population.total_individuals_count = targeted_individuals["total_individuals_count"] - target_population.total_households_count = households_ids.count() - - target_population.build_status = TargetPopulation.BUILD_STATUS_OK - target_population.built_at = timezone.now() - return target_population - - -def full_rebuild(target_population: TargetPopulation, batch_size: int = 10000) -> TargetPopulation: - households = Household.objects.filter( - business_area=target_population.business_area, program=target_population.program - ) - households = households.filter(target_population.targeting_criteria.get_query()) - households = households.only("id") - target_population.households.clear() - - index = 0 - while households_ids := households[index * batch_size : (index + 1) * batch_size]: - target_population.households.add(*households_ids) - index += 1 - return refresh_stats(target_population) diff --git a/src/hct_mis_api/apps/targeting/services/xlsx_export_targeting_service.py b/src/hct_mis_api/apps/targeting/services/xlsx_export_targeting_service.py index 63dfa8af1b..f5234a6340 100644 --- a/src/hct_mis_api/apps/targeting/services/xlsx_export_targeting_service.py +++ b/src/hct_mis_api/apps/targeting/services/xlsx_export_targeting_service.py @@ -1,5 +1,5 @@ from functools import cached_property -from typing import Dict, List, Union +from typing import Any, Dict from django.db.models import Q, QuerySet @@ -10,10 +10,11 @@ from hct_mis_api.apps.core.utils import nested_getattr from hct_mis_api.apps.household.models import Document, Individual -from hct_mis_api.apps.targeting.models import TargetPopulation +from hct_mis_api.apps.payment.models import PaymentPlan class XlsxExportTargetingService: + # TODO: should we refactor this service to import PaymentPlan? INDIVIDUALS_SHEET = "Individuals" META_SHEET = "Meta" VERSION_CELL_NAME_COORDINATES = "A1" @@ -21,8 +22,8 @@ class XlsxExportTargetingService: VERSION_CELL_NAME = "FILE_TEMPLATE_VERSION" VERSION = "1.0" - def __init__(self, target_population: TargetPopulation) -> None: - self.target_population = target_population + def __init__(self, payment_plan: PaymentPlan) -> None: + self.payment_plan = payment_plan self.documents_columns_dict = {} self.current_header_column_index = 0 self.COLUMNS_MAPPING_DICT = { @@ -33,10 +34,17 @@ def __init__(self, target_population: TargetPopulation) -> None: } @cached_property - def households(self) -> Union[int, List[int]]: - if self.target_population.status == TargetPopulation.STATUS_OPEN: - return self.target_population.open_household_list - return self.target_population.vulnerability_score_filtered_households + def households(self) -> Any: + if self.payment_plan.status == PaymentPlan.Status.TP_OPEN: + return self.payment_plan.household_list + + filters = {} + if self.payment_plan.vulnerability_score_max is not None: + filters["vulnerability_score__lte"] = self.payment_plan.vulnerability_score_max + if self.payment_plan.vulnerability_score_min is not None: + filters["vulnerability_score__gte"] = self.payment_plan.vulnerability_score_min + hh_ids = list(self.payment_plan.payment_items.filter(**filters).values_list("household_id", flat=True)) + return self.payment_plan.household_list.filter(id__in=hh_ids) @cached_property def individuals(self) -> QuerySet[Individual]: diff --git a/src/hct_mis_api/apps/targeting/signals.py b/src/hct_mis_api/apps/targeting/signals.py deleted file mode 100644 index 380a164a1d..0000000000 --- a/src/hct_mis_api/apps/targeting/signals.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Any - -from django.core.cache import cache -from django.db.models.signals import post_save, pre_delete -from django.dispatch import receiver - -from hct_mis_api.api.caches import get_or_create_cache_key -from hct_mis_api.apps.targeting.models import TargetPopulation - - -@receiver(post_save, sender=TargetPopulation) -@receiver(pre_delete, sender=TargetPopulation) -def increment_target_population_version_cache(sender: Any, instance: TargetPopulation, **kwargs: dict) -> None: - business_area_slug = instance.business_area.slug - business_area_version = get_or_create_cache_key(f"{business_area_slug}:version", 1) - - program_id = instance.program.id - - version_key = f"{business_area_slug}:{business_area_version}:{program_id}:target_population_list" - get_or_create_cache_key(version_key, 0) - - cache.incr(version_key) diff --git a/src/hct_mis_api/apps/targeting/steficon.py b/src/hct_mis_api/apps/targeting/steficon.py index 5fe83dc643..d2fb17cb98 100644 --- a/src/hct_mis_api/apps/targeting/steficon.py +++ b/src/hct_mis_api/apps/targeting/steficon.py @@ -9,9 +9,11 @@ from admin_extra_buttons.decorators import button +from hct_mis_api.apps.payment.celery_tasks import ( + payment_plan_apply_steficon_hh_selection, +) +from hct_mis_api.apps.payment.models import Payment, PaymentPlan from hct_mis_api.apps.steficon.debug import get_error_info -from hct_mis_api.apps.targeting.celery_tasks import target_population_apply_steficon -from hct_mis_api.apps.targeting.models import HouseholdSelection, TargetPopulation if TYPE_CHECKING: from uuid import UUID @@ -22,7 +24,7 @@ logger = logging.getLogger(__name__) -try: +try: # pragma: no cover from hct_mis_api.apps.steficon.models import RuleCommit class RuleReRunForm(forms.Form): @@ -39,9 +41,7 @@ class RuleTestForm(forms.Form): number_of_records = forms.IntegerField(help_text="Only test # records") class SteficonExecutorMixin: - @button( - visible=lambda o, r: o.status == TargetPopulation.STATUS_STEFICON_ERROR, permission="steficon.rerun_rule" - ) + @button(visible=lambda o, r: o.status == PaymentPlan.Status.TP_STEFICON_ERROR, permission="steficon.rerun_rule") def re_run_steficon(self, request: "HttpRequest", pk: "UUID") -> TemplateResponse: context = self.get_common_context(request, pk) tp = context["original"] @@ -51,9 +51,9 @@ def re_run_steficon(self, request: "HttpRequest", pk: "UUID") -> TemplateRespons tp.steficon_rule = form.cleaned_data["rule"] tp.save() if form.cleaned_data["background"]: - target_population_apply_steficon.delay(pk) + payment_plan_apply_steficon_hh_selection.delay(pk) else: - target_population_apply_steficon(pk) + payment_plan_apply_steficon_hh_selection(pk) else: context["form"] = RuleReRunForm() return TemplateResponse(request, "admin/targeting/targetpopulation/steficon_rerun.html", context) @@ -80,11 +80,11 @@ def test_steficon(self, request: "HttpRequest", pk: "UUID") -> TemplateResponse: entries = self.object.selections.all()[:records] if entries: for entry in entries: - result = rule.execute({"household": entry.household, "target_population": self.object}) + result = rule.execute({"household": entry.household, "payment_plan": self.object}) entry.vulnerability_score = result.value elements.append(entry) with atomic(): - HouseholdSelection.objects.bulk_update(elements, ["vulnerability_score"]) + Payment.objects.bulk_update(elements, ["vulnerability_score"]) transaction.set_rollback(True) self.message_user(request, "{} scores calculated".format(len(elements))) else: @@ -96,7 +96,7 @@ def test_steficon(self, request: "HttpRequest", pk: "UUID") -> TemplateResponse: context["form"] = form return TemplateResponse(request, "admin/targeting/targetpopulation/steficon_test.html", context) -except ImportError: +except ImportError: # pragma: no cover class SteficonExecutorMixin: # type: ignore # intentional pass diff --git a/src/hct_mis_api/apps/targeting/validators.py b/src/hct_mis_api/apps/targeting/validators.py index 64013552d0..ca3f2568c5 100644 --- a/src/hct_mis_api/apps/targeting/validators.py +++ b/src/hct_mis_api/apps/targeting/validators.py @@ -7,69 +7,15 @@ from hct_mis_api.apps.core.field_attributes.fields_types import Scope from hct_mis_api.apps.core.models import DataCollectingType, FlexibleAttribute from hct_mis_api.apps.core.utils import get_attr_value -from hct_mis_api.apps.core.validators import BaseValidator from hct_mis_api.apps.household.models import Household, Individual from hct_mis_api.apps.payment.models import DeliveryMechanism from hct_mis_api.apps.program.models import Program from hct_mis_api.apps.targeting.choices import FlexFieldClassification -from hct_mis_api.apps.targeting.models import ( - TargetingCriteriaRuleFilter, - TargetPopulation, -) +from hct_mis_api.apps.targeting.models import TargetingCriteriaRuleFilter logger = logging.getLogger(__name__) -class TargetValidator(BaseValidator): - """Validator for Target Population.""" - - @staticmethod - def validate_is_finalized(target_status: str) -> None: - if target_status == "FINALIZED": - logger.error("Target Population has been finalized. Cannot change.") - raise ValidationError("Target Population has been finalized. Cannot change.") - - -class RebuildTargetPopulationValidator: - @staticmethod - def validate(target_population: TargetPopulation) -> None: - if target_population.status != TargetPopulation.STATUS_OPEN: - message = f"Only Target Population with status {TargetPopulation.STATUS_OPEN} can be rebuild" - logger.error(message) - raise ValidationError(message) - - -class LockTargetPopulationValidator: - @staticmethod - def validate(target_population: TargetPopulation) -> None: - if target_population.status != TargetPopulation.STATUS_OPEN: - message = f"Only Target Population with status {TargetPopulation.STATUS_OPEN} can be approved" - logger.error(message) - raise ValidationError(message) - - -class UnlockTargetPopulationValidator: - @staticmethod - def validate(target_population: TargetPopulation) -> None: - if not target_population.is_locked(): - message = "Only locked Target Population with status can be unlocked" - logger.error(message) - raise ValidationError(message) - - -class FinalizeTargetPopulationValidator: - @staticmethod - def validate(target_population: TargetPopulation) -> None: - if not target_population.is_locked(): - message = "Only locked Target Population with status can be finalized" - logger.error(message) - raise ValidationError(message) - if target_population.program.status != Program.ACTIVE: - message = f"Only Target Population assigned to program with status {Program.ACTIVE} can be send" - logger.error(message) - raise ValidationError(message) - - class TargetingCriteriaRuleFilterInputValidator: @staticmethod def validate(rule_filter: Any, program: Program) -> None: diff --git a/src/hct_mis_api/apps/targeting/views.py b/src/hct_mis_api/apps/targeting/views.py index 8b531967c9..13b89ae706 100644 --- a/src/hct_mis_api/apps/targeting/views.py +++ b/src/hct_mis_api/apps/targeting/views.py @@ -6,7 +6,7 @@ from django.http import HttpRequest, HttpResponse from django.shortcuts import get_object_or_404 -from hct_mis_api.apps.targeting.models import TargetPopulation +from hct_mis_api.apps.payment.models import PaymentPlan from hct_mis_api.apps.targeting.services.xlsx_export_targeting_service import ( XlsxExportTargetingService, ) @@ -20,12 +20,12 @@ @staff_member_required def download_xlsx_households(request: HttpRequest, target_population_id: "UUID") -> HttpResponse: - target_population = get_object_or_404(TargetPopulation, id=target_population_id) + payment_plan = get_object_or_404(PaymentPlan, id=target_population_id) # pragma no cover mimetype = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" - filename = f"{target_population.name}.xlsx" + filename = f"{payment_plan.name}.xlsx" # pragma no cover response = HttpResponse(content_type=mimetype) response["Content-Disposition"] = f"attachment; filename={filename}" - service = XlsxExportTargetingService(target_population) + service = XlsxExportTargetingService(payment_plan) # pragma no cover wb = service.generate_workbook() with NamedTemporaryFile() as tmp: wb.save(tmp.name) diff --git a/src/hct_mis_api/apps/utils/models.py b/src/hct_mis_api/apps/utils/models.py index 21bb5e21b2..9241076f04 100644 --- a/src/hct_mis_api/apps/utils/models.py +++ b/src/hct_mis_api/apps/utils/models.py @@ -405,7 +405,6 @@ def bulk_create_with_signature(self, objs: Iterable[T], *args: Any, **kwargs: An bulk_create_payment_snapshot_data([x.id for x in created_objects]) for obj in created_objects: obj.update_signature_hash() - # print(obj.signature_hash) super().bulk_update(created_objects, ["signature_hash"]) return created_objects diff --git a/src/hct_mis_api/one_time_scripts/migrate_tp_into_pp.py b/src/hct_mis_api/one_time_scripts/migrate_tp_into_pp.py index 37c06efad4..e69de29bb2 100644 --- a/src/hct_mis_api/one_time_scripts/migrate_tp_into_pp.py +++ b/src/hct_mis_api/one_time_scripts/migrate_tp_into_pp.py @@ -1,553 +0,0 @@ -from collections import defaultdict -from typing import Any, Dict, List, Optional, Tuple - -from django.core.exceptions import ValidationError -from django.db import transaction -from django.db.models import OuterRef -from django.shortcuts import get_object_or_404 -from django.utils import timezone - -from psycopg2 import IntegrityError - -from hct_mis_api.apps.accountability.models import Message, Survey -from hct_mis_api.apps.core.models import BusinessArea -from hct_mis_api.apps.household.models import ( - ROLE_PRIMARY, - Household, - IndividualRoleInHousehold, -) -from hct_mis_api.apps.payment.models import Payment, PaymentPlan -from hct_mis_api.apps.payment.services.payment_household_snapshot_service import ( - create_payment_plan_snapshot_data, -) -from hct_mis_api.apps.payment.services.payment_plan_services import PaymentPlanService -from hct_mis_api.apps.program.models import Program -from hct_mis_api.apps.targeting.fixtures import TargetingCriteriaFactory -from hct_mis_api.apps.targeting.models import ( - TargetingCriteria, - TargetingCriteriaRule, - TargetPopulation, -) - -BA_ORDER_LIST = [ - "Philippines", - "Sri Lanka", - "Vietnam", - "Bangladesh", - "Afghanistan", - "Somalia", - "Syria", - "Palestine, State of", - "Kenya", - "Armenia", - "Ukraine", - "Belarus", - "Slovakia", - "Czech Republic", - "Botswana", - "Democratic Republic of Congo", - "Central African Republic", - "Republic of Cameroon", - "Nigeria", - "Mali", - "Niger", - "Sudan", - "Antigua and Barbuda", - "Haiti", - "Colombia", - "Trinidad & Tobago", -] - -BA_ORDER_LIST_HALF = [ - "Ukraine", - "Belarus", - "Slovakia", - "Czech Republic", - "Botswana", - "Democratic Republic of Congo", - "Central African Republic", - "Republic of Cameroon", - "Nigeria", - "Mali", - "Niger", - "Sudan", - "Antigua and Barbuda", - "Haiti", - "Colombia", - "Trinidad & Tobago", -] - -PROGRAM_STATUS_ORDER_LIST = [Program.ACTIVE, Program.DRAFT, Program.FINISHED] - -# tp.field: payment_plan.field -# if value has internal_data__ will story into json -TP_MIGRATION_MAPPING = { - "name": "name", - "created_by": "created_by", - "created_at": "created_at", - "change_date": "status_date", - "business_area": "business_area", - "status": "status", - "build_status": "build_status", - "built_at": "built_at", - "program_cycle": "program_cycle", - "targeting_criteria": "targeting_criteria", - "steficon_rule": "steficon_rule_targeting", - "steficon_applied_date": "steficon_targeting_applied_date", - "vulnerability_score_min": "vulnerability_score_min", - "vulnerability_score_max": "vulnerability_score_max", - "excluded_ids": "excluded_ids", - "exclusion_reason": "exclusion_reason", - "total_households_count": "total_households_count", - "total_individuals_count": "total_individuals_count", - "child_male_count": "male_children_count", - "child_female_count": "female_children_count", - "adult_male_count": "male_adults_count", - "adult_female_count": "female_adults_count", - "storage_file": "storage_file", -} -INTERNAL_DATA_FIELDS = { - "sent_to_datahub": "internal_data__sent_to_datahub", - # we need to store ID in case to migrate maybe data in future like Message or Survey - "id": "internal_data__target_population_id", -} - -ALL_TP_MIGRATION_MAPPING = TP_MIGRATION_MAPPING | INTERNAL_DATA_FIELDS - -tp_status_to_pp_mapping = { - TargetPopulation.STATUS_OPEN: PaymentPlan.Status.TP_OPEN, - TargetPopulation.STATUS_LOCKED: PaymentPlan.Status.TP_LOCKED, - TargetPopulation.STATUS_PROCESSING: PaymentPlan.Status.TP_PROCESSING, - TargetPopulation.STATUS_STEFICON_WAIT: PaymentPlan.Status.TP_STEFICON_WAIT, - TargetPopulation.STATUS_STEFICON_RUN: PaymentPlan.Status.TP_STEFICON_RUN, - TargetPopulation.STATUS_STEFICON_COMPLETED: PaymentPlan.Status.TP_STEFICON_COMPLETED, - TargetPopulation.STATUS_STEFICON_ERROR: PaymentPlan.Status.TP_STEFICON_ERROR, - TargetPopulation.STATUS_SENDING_TO_CASH_ASSIST: PaymentPlan.Status.DRAFT, - TargetPopulation.STATUS_READY_FOR_CASH_ASSIST: PaymentPlan.Status.DRAFT, - TargetPopulation.STATUS_READY_FOR_PAYMENT_MODULE: PaymentPlan.Status.DRAFT, - # TargetPopulation.STATUS_ASSIGNED: None, # TP has created Payment Plan -} - - -def map_tp_to_pp(tp: TargetPopulation) -> Dict[str, Any]: - """helper function to map TargetPopulation to PaymentPlan fields""" - payment_plan_data = defaultdict(dict) - internal_data = defaultdict(dict) - - for tp_field, pp_field in ALL_TP_MIGRATION_MAPPING.items(): - tp_value = getattr(tp, tp_field, None) - if tp_value: - pp_field_list = pp_field.split("__") - if len(pp_field_list) == 1: - # map TP and PP status - if pp_field_list[0] == "status": - if tp_value == TargetPopulation.STATUS_ASSIGNED: - # for assigned TP just skip updating PP.status - continue - else: - tp_value = tp_status_to_pp_mapping.get(tp_value) - - payment_plan_data[pp_field] = tp_value - # internal_data json - elif len(pp_field_list) == 2 and pp_field_list[0] == "internal_data": - internal_data[pp_field_list[1]] = str(tp_value) # type: ignore - payment_plan_data["internal_data"] = internal_data - return payment_plan_data - - -def tc_migrate_hh_ind_ids(tc: TargetingCriteria) -> Tuple[Optional[TargetingCriteriaRule], bool]: - """migrate data 'household_ids' & 'individual_ids' from TargetingCriteria into TargetingCriteriaRule""" - # return TargetingCriteriaRule or None and bool new tcr to create - # None, False OR first_rule, False - rules = tc.get_rules() - if rules.count() == 0: - # create new one if HH or Ind ids and return new TargetingCriteriaRule, True - if tc.individual_ids or tc.household_ids: - # print("not found TargetingCriteriaRule for TargetingCriteria. Going to create a new one.") - new_tcr = TargetingCriteriaRule( - targeting_criteria=tc, household_ids=tc.household_ids, individual_ids=tc.individual_ids - ) - return new_tcr, True - return None, False - - if first_rule := rules.first(): - if tc.household_ids and tc.household_ids != first_rule.household_ids: - first_rule.household_ids = tc.household_ids - if tc.individual_ids and tc.individual_ids != first_rule.individual_ids: - first_rule.individual_ids = tc.individual_ids - return first_rule, False - return None, False - - -def migrate_tp(tp: "TargetPopulation") -> None: - new_payment_plans = [] - update_payment_plans = [] - full_rebuild_payment_plans = [] # full rebuild for PP in PREPARING status - update_tc_rules = [] # migrate TargetingCriteriaRule 'household_ids' & 'individual_ids' - create_tc_rules = [] - print(" ******** Processing TP ", str(tp.id)) - # migrate ind_ids and hh_ids - if tp.targeting_criteria: - tcr, create = tc_migrate_hh_ind_ids(tp.targeting_criteria) - if tcr and not create: - update_tc_rules.append(tcr) - if tcr and create: - create_tc_rules.append(tcr) - - # update existing PaymentPlan - pp_count = 0 - # skip already migrated PaymentPlans by filtering targeting_criteria__isnull - existing_payment_plans = list(tp.payment_plans.filter(targeting_criteria__isnull=True)) - if existing_payment_plans: - for payment_plan in existing_payment_plans: - pp_count += 1 - payment_plan_data = map_tp_to_pp(tp) - - for field, value in payment_plan_data.items(): - setattr(payment_plan, field, value) - # create copy targeting_criteria for other PP from the same TP - # like for follow up PPs and from Cash Assist maybe as well - if pp_count > 1: - if tp.targeting_criteria: - copy_new_target_criteria = PaymentPlanService.copy_target_criteria(tp.targeting_criteria) - else: - # create just empty TargetingCriteria if no any - copy_new_target_criteria = TargetingCriteriaFactory() - payment_plan.targeting_criteria = copy_new_target_criteria - # full rebuild for PREPARING Payment Plan - if payment_plan.status == PaymentPlan.Status.PREPARING: - full_rebuild_payment_plans.append(str(payment_plan.pk)) - update_payment_plans.append(payment_plan) - else: - # skip create payments if build_status is failed - # or set empty if no targeting_criteria - if tp.build_status == TargetPopulation.BUILD_STATUS_FAILED: - build_status = PaymentPlan.BuildStatus.BUILD_STATUS_FAILED - elif tp.targeting_criteria: - build_status = PaymentPlan.BuildStatus.BUILD_STATUS_PENDING - else: - build_status = None - # create new PaymentPlan in no PP with tp.targeting_criteria - payment_plan_data = map_tp_to_pp(tp) - payment_plan_data["start_date"] = tp.program_cycle.start_date - payment_plan_data["end_date"] = tp.program_cycle.end_date - payment_plan_data["status"] = PaymentPlan.Status.MIGRATION_BLOCKED - payment_plan_data["status_date"] = timezone.now() - payment_plan_data["build_status"] = build_status - payment_plan_data["built_at"] = timezone.now() - if payment_plan_data.get("targeting_criteria") is None: - # create new empty targeting_criteria - payment_plan_data["targeting_criteria"] = TargetingCriteriaFactory() - # check if PaymentPlan exists for this targeting_criteria - if not PaymentPlan.objects.filter(targeting_criteria=payment_plan_data["targeting_criteria"]).exists(): - # create new PaymentPlan if no any PaymentPlan with the targeting_criteria - new_payment_plans.append(PaymentPlan(**payment_plan_data)) - - if update_tc_rules: - print("* processing update_tc_rules") - TargetingCriteriaRule.objects.bulk_update(update_tc_rules, ["household_ids", "individual_ids"], 500) - - if create_tc_rules: - print("** processing create_tc_rules") - TargetingCriteriaRule.objects.bulk_create(create_tc_rules, 500) - - if update_payment_plans: - print("*** processing update_payment_plans", len(update_payment_plans)) - PaymentPlan.objects.bulk_update( - update_payment_plans, list(TP_MIGRATION_MAPPING.values()) + ["internal_data"], 500 - ) - - if new_payment_plans: - print("**** processing new_payment_plans") - PaymentPlan.objects.bulk_create(new_payment_plans, 500) - - # rebuild Preparing Payment Plans - if full_rebuild_payment_plans: - print(f" ****** Found {len(full_rebuild_payment_plans)} Payment Plan(s) in PREPARING status") - for payment_plan in PaymentPlan.objects.filter(pk__in=full_rebuild_payment_plans): - PaymentPlanService(payment_plan=payment_plan).full_rebuild() - payment_plan.status = PaymentPlan.Status.OPEN - payment_plan.save() - - -def get_statistics(after_migration_status: bool = False) -> None: - tp_qs_count = TargetPopulation.objects.count() - pp_qs_count = PaymentPlan.objects.count() - print("*=" * 50) - print(f"TargetPopulation.objects: {tp_qs_count}") - print(f"PaymentPlan.objects: {pp_qs_count}") - print( - f"TPs with Statuses Not assigned to PP: {TargetPopulation.objects.exclude(status=TargetPopulation.STATUS_ASSIGNED).count()}" - ) - print("*=" * 50) - if tp_without_ba := TargetPopulation.objects.filter(business_area__isnull=True).count(): - print(f"##### Found {tp_without_ba} without BA") - - if after_migration_status: - # all TP's targeting_criteria should have copy with in PaymentPlan - not_migrated_tps = TargetPopulation.objects.exclude( - targeting_criteria_id__in=PaymentPlan.objects.filter(targeting_criteria__isnull=False).values_list( - "targeting_criteria_id", flat=True - ) - ).exclude(status=TargetPopulation.STATUS_ASSIGNED) - not_migrated_tps_list = [] - if not_migrated_tps.exists(): - for tp in not_migrated_tps: - pp_qs = PaymentPlan.objects.filter( - business_area=tp.business_area, - internal_data__has_key="target_population_id", - internal_data__target_population_id=str(tp.id), - ) - if not pp_qs.exists(): - not_migrated_tps_list.append(tp) - if not_migrated_tps_list: - print(f"Found {not_migrated_tps.count()} TargetPopulation objects didn't migrated into PaymentPlan.") - for tp in not_migrated_tps_list: - print( - f"### TargetPopulation ID: {tp.id}, TP status: {tp.status}, " - f"targeting_criteria: {tp.targeting_criteria_id}, BA: {tp.business_area.name}, Program: {tp.program}" - ) - else: - print("All TargetPopulation's targeting_criteria had assigned to PaymentPlans.") - - pp_without_targeting_criteria = ( - PaymentPlan.objects.filter(targeting_criteria__isnull=True) - .exclude(target_population__isnull=True) - .order_by("business_area") - ) - if pp_without_targeting_criteria: - print("#### Found PaymentPlan without targeting_criteria ", pp_without_targeting_criteria.count()) - for pp in pp_without_targeting_criteria: - print( - pp.unicef_id, - "Status:", - pp.status, - f"(build status: {pp.build_status})", - "BA:", - pp.business_area.name, - "Program:", - pp.program_cycle.program.name, - "TP:", - pp.target_population, - ) - - print( - "TP(s) with MIGRATION_BLOCKED: ", - PaymentPlan.objects.filter(status=PaymentPlan.Status.MIGRATION_BLOCKED).count(), - ) - print( - "TP(s) with MIGRATION_FAILED: ", - PaymentPlan.objects.filter(status=PaymentPlan.Status.MIGRATION_FAILED).count(), - ) - - -def get_payment_plan_id_from_tp_id(business_area_id: str, target_population_id: str) -> Optional[str]: - if payment_plan := PaymentPlan.all_objects.filter( - business_area_id=business_area_id, - internal_data__has_key="target_population_id", - internal_data__target_population_id=str(target_population_id), - ).first(): - return str(payment_plan.pk) - # print(f"****** Not found PaymentPlan for old target_population_id: {target_population_id}, BA: {business_area_id}") - # just return None if no data - return None - - -def migrate_message_and_survey(list_ids: List[str], model: Any, business_area_id: str) -> List: - objects_to_update = [] - - for obj_id in list_ids: - obj = model.objects.get(pk=obj_id) - if obj.target_population_id and obj.target_population.payment_plans.first(): - obj.payment_plan_id = str(obj.target_population.payment_plans.first().id) - objects_to_update.append(obj) - if obj.target_population_id and not obj.target_population.payment_plans.first(): - # find new migrated PP by payment_plan.internal_data["target_population_id"] - payment_plan_id: Optional[str] = get_payment_plan_id_from_tp_id( - business_area_id, str(obj.target_population_id) - ) - if payment_plan_id: - obj.payment_plan_id = payment_plan_id - objects_to_update.append(obj) - - return objects_to_update - - -def create_payments_from_hh_selections(payment_plan: PaymentPlan) -> None: - payments_to_create = [] - if payment_plan.status == PaymentPlan.Status.MIGRATION_BLOCKED: - tp_id = payment_plan.internal_data.get("target_population_id") - if not tp_id: - raise ValidationError("TP id not found for Payment Plan", payment_plan.unicef_id) - target_population = get_object_or_404(TargetPopulation, pk=tp_id) - households_ids = target_population.selections.all().values_list("household", flat=True) - households = Household.objects.filter(id__in=households_ids) - else: - # for other statuses just rebuild TP list - households = payment_plan.household_list - - households = ( - households.annotate( - collector=IndividualRoleInHousehold.objects.filter(household=OuterRef("pk"), role=ROLE_PRIMARY).values( - "individual" - )[:1] - ) - .all() - .values("pk", "collector", "unicef_id", "head_of_household") - ) - for household in households: - collector_id = household.get("collector") - if not collector_id: - msg = f"Couldn't find a primary collector in {household['unicef_id']}" - raise ValidationError(msg) - - payments_to_create.append( - Payment( - parent=payment_plan, - program_id=payment_plan.program_cycle.program_id, - business_area_id=payment_plan.business_area_id, - status=Payment.STATUS_PENDING, - status_date=timezone.now(), - household_id=household["pk"], - head_of_household_id=household["head_of_household"], - collector_id=collector_id, - ) - ) - try: - Payment.objects.bulk_create(payments_to_create) - except IntegrityError as e: - raise ValidationError("Duplicated Households in provided Targeting List") from e - payment_plan.refresh_from_db() - create_payment_plan_snapshot_data(payment_plan) - PaymentPlanService.generate_signature(payment_plan) - - -def create_payments_for_pending_payment_plans(ba_list: List = BA_ORDER_LIST) -> None: - from django.db import transaction - from django.utils import timezone - - from hct_mis_api.apps.core.models import BusinessArea - from hct_mis_api.apps.payment.models import PaymentPlan - - """ - Step 2 create Payments for MIGRATION_BLOCKED PaymentPlans (TPs) - """ - start_time = timezone.now() - for ba in BusinessArea.objects.all().values_list("name", flat=True): - if ba not in ba_list: - ba_list.append(ba) - - print("BA order: ", ba_list) - - print("*** Create Payments for MIGRATION_BLOCKED PaymentPlans ***\n", "*" * 60) - # first migrate for all Active Programs and newest created - for program_status in PROGRAM_STATUS_ORDER_LIST: - for business_area_name in ba_list: - business_area = BusinessArea.objects.filter(name=business_area_name).values("id", "name").first() - if not business_area: - # added just because in unit test we have just one BA - continue - for program in Program.objects.filter(business_area_id=business_area["id"], status=program_status): - build_payment_plans_ids_list = list( - PaymentPlan.objects.filter( - program_cycle__program=program, - status=PaymentPlan.Status.MIGRATION_BLOCKED, - business_area_id=business_area["id"], - targeting_criteria__isnull=False, - ) - .values_list("id", flat=True) - .order_by("-created_at") # process newest created first - ) - if build_payment_plans_ids_list: - print(f"\n *** Processing {business_area['name']}.") - print("Create payments for New Created Payment Plans: ", len(build_payment_plans_ids_list)) - for payment_plan_id in build_payment_plans_ids_list: - payment_plan = PaymentPlan.objects.get(pk=payment_plan_id) - print(f".... processing with PP: {payment_plan.unicef_id} - {payment_plan.name}") - try: - with transaction.atomic(): - payment_plan.build_status = PaymentPlan.BuildStatus.BUILD_STATUS_BUILDING - payment_plan.save(update_fields=("build_status", "built_at")) - create_payments_from_hh_selections(payment_plan) - payment_plan.update_population_count_fields() - payment_plan.build_status = PaymentPlan.BuildStatus.BUILD_STATUS_OK - payment_plan.status = PaymentPlan.Status.TP_OPEN - payment_plan.save(update_fields=("build_status", "built_at", "status")) - except Exception as e: - payment_plan.build_status = PaymentPlan.BuildStatus.BUILD_STATUS_FAILED - payment_plan.status = PaymentPlan.Status.MIGRATION_FAILED - payment_plan.save(update_fields=("build_status", "built_at", "status")) - print("Create payments Error", str(e)) - print(f"Finished with PP: {payment_plan.unicef_id}") - print(f"Completed in {timezone.now() - start_time}\n", "*" * 55) - - -def migrate_tp_into_pp() -> None: - """ - Step 1 migrate TP>PP - first migrate Finished Programs, then Active Programs and Draft last - """ - start_time = timezone.now() - # queryset.model.__name__ - model_name = "TargetPopulation" - - print(f"*** Data Migration {model_name} ***\n", "*" * 60) - get_statistics() - - for ba in BusinessArea.objects.all().values_list("name", flat=True): - if ba not in BA_ORDER_LIST: - BA_ORDER_LIST.append(ba) - - print("BA order: ", BA_ORDER_LIST) - # first migrate for all Active Programs and newest created - for program_status in PROGRAM_STATUS_ORDER_LIST: - for business_area_name in BA_ORDER_LIST: - business_area = BusinessArea.objects.filter(name=business_area_name).values("id", "name").first() - if not business_area: - # added just because in unit test we have just one BA - continue - print(f"\n *** Processing TPs for BA: {business_area['name']}.") - for program in Program.objects.filter(business_area_id=business_area["id"], status=program_status): - tp_list_ids = [ - str(tp_id) - for tp_id in list( - TargetPopulation.objects.filter(program=program) - .values_list("id", flat=True) - .order_by("-created_at") # process newest created first - ) - ] - if tp_list_ids: - print(f"\n **** Found {len(tp_list_ids)} TPs for {program.name} - {program_status}.") - - for tp_id in tp_list_ids: - with transaction.atomic(): - tp = TargetPopulation.objects.get(id=tp_id) - migrate_tp(tp) - # double check any PP without TP - pp_without_tp = PaymentPlan.all_objects.filter( - program_cycle__program=program, targeting_criteria__isnull=True - ) - if pp_without_tp.exists(): - for pp in pp_without_tp: - pp.targeting_criteria = TargetingCriteriaFactory() - pp.save() - - # Migrate Message & Survey - for model in (Message, Survey): - print(f"Processing with migration {model.__name__} objects.") - model_ids_list = [ - str(obj_id) - for obj_id in list( - model.objects.filter( - business_area_id=business_area["id"], - target_population__isnull=False, - payment_plan__isnull=True, - ).values_list("id", flat=True) - ) - ] - with transaction.atomic(): - update_list = migrate_message_and_survey(model_ids_list, model, str(business_area["id"])) - model.objects.bulk_update(update_list, ["payment_plan_id"], 1000) - - print(f"Completed in {timezone.now() - start_time}\n", "*" * 55) - get_statistics(after_migration_status=True) diff --git a/src/hct_mis_api/one_time_scripts/program_cycle_data_migration.py b/src/hct_mis_api/one_time_scripts/program_cycle_data_migration.py deleted file mode 100644 index bd2a2e405b..0000000000 --- a/src/hct_mis_api/one_time_scripts/program_cycle_data_migration.py +++ /dev/null @@ -1,202 +0,0 @@ -import logging -from datetime import date, timedelta -from random import randint -from typing import List - -from django.core.exceptions import ValidationError -from django.db import transaction -from django.utils import timezone - -from hct_mis_api.apps.core.models import BusinessArea -from hct_mis_api.apps.payment.models import Payment, PaymentPlan -from hct_mis_api.apps.program.models import Program, ProgramCycle -from hct_mis_api.apps.targeting.models import TargetPopulation - -logger = logging.getLogger(__name__) - - -def adjust_cycles_start_and_end_dates_for_active_program(program: Program) -> None: - cycles_qs = ProgramCycle.objects.filter(program=program).only("start_date", "end_date").order_by("start_date") - if not cycles_qs: - return - - previous_cycle = None - with transaction.atomic(): - for cycle in cycles_qs: - # skip validations for migration data - cycle.clean = lambda: None - - # probably it's not possible but to be sure that no any cycles without end_date - if cycle.end_date is None: - cycle.end_date = cycle.start_date - - if previous_cycle: - if cycle.start_date <= previous_cycle.end_date: - cycle.start_date = previous_cycle.end_date + timedelta(days=1) - if cycle.end_date < cycle.start_date: - cycle.end_date = cycle.start_date - try: - cycle.save(update_fields=["start_date", "end_date"]) - except ValidationError: - # if validation error just save one day cycle - cycle.end_date = cycle.start_date - cycle.save(update_fields=["start_date", "end_date"]) - - previous_cycle = cycle - - -def generate_unique_cycle_title(start_date: str) -> str: - # add to the cycle title just random 4 digits - while True: - cycle_name = f"Cycle {start_date} ({str(randint(1111, 9999))})" - if not ProgramCycle.objects.filter(title=cycle_name).exists(): - return cycle_name - - -def create_new_program_cycle(program_id: str, status: str, start_date: date, end_date: date) -> ProgramCycle: - cycle = ProgramCycle( - title=generate_unique_cycle_title(str(start_date)), - program_id=program_id, - status=status, - start_date=start_date, - end_date=end_date, - created_by=None, - ) - # skip validations for migration data - cycle.clean = lambda: None # type: ignore - cycle.save() - return ProgramCycle.objects.get(pk=cycle.pk) - - -def processing_with_finished_program(program: Program) -> None: - start_date = program.start_date - end_date = program.end_date - program_id_str = str(program.id) - # update if exists or create new cycle - if cycle := ProgramCycle.objects.filter(program_id=program.id).first(): - # skip validations for migration data - cycle.clean = lambda: None - - if cycle.start_date != start_date: - cycle.start_date = start_date - if cycle.end_date != end_date: - cycle.end_date = end_date - if cycle.status != ProgramCycle.FINISHED: - cycle.status = ProgramCycle.FINISHED - try: - cycle.save(update_fields=["start_date", "end_date", "status"]) - except ValidationError: - # if validation error just save one day cycle - cycle.end_date = cycle.start_date - cycle.save(update_fields=["start_date", "end_date", "status"]) - else: - cycle = create_new_program_cycle(program_id_str, ProgramCycle.FINISHED, start_date, end_date) - - # update TP - TargetPopulation.objects.filter(program_id=program_id_str).update(program_cycle=cycle) - # update Payment Plan - PaymentPlan.objects.filter(program_id=program_id_str).update(program_cycle=cycle) - - -def processing_with_active_program(payment_plans_list_ids: List[str], default_cycle_id: List[str]) -> None: - hhs_in_cycles_dict = dict() - for comparing_with_pp_id in payment_plans_list_ids: - comparing_with_pp = ( - PaymentPlan.objects.filter(id=comparing_with_pp_id).only("id", "program_id", "target_population_id").first() - ) - new_hh_ids = set( - [ - str(hh_id) - for hh_id in comparing_with_pp.eligible_payments.values_list("household_id", flat=True).iterator() - ] - ) - cycles = ( - ProgramCycle.objects.filter(program_id=comparing_with_pp.program_id) - .exclude(id__in=default_cycle_id) - .only("id") - ) - for cycle in cycles: - cycle_id_str = str(cycle.id) - if cycle_id_str not in hhs_in_cycles_dict: - hhs_in_cycles_dict[cycle_id_str] = set( - [ - str(hh_id) - for hh_id in Payment.objects.filter(parent__program_cycle=cycle) - .values_list("household_id", flat=True) - .iterator() - ] - ) - hh_ids_in_cycles = hhs_in_cycles_dict[cycle_id_str] - # check any conflicts - if new_hh_ids.intersection(hh_ids_in_cycles): - continue - - TargetPopulation.objects.filter(id=comparing_with_pp.target_population_id).update(program_cycle=cycle) - comparing_with_pp.program_cycle = cycle - hhs_in_cycles_dict[cycle_id_str].update(new_hh_ids) - break - - if not comparing_with_pp.program_cycle: - cycle = create_new_program_cycle( - str(comparing_with_pp.program_id), - ProgramCycle.ACTIVE, - comparing_with_pp.start_date.date(), - comparing_with_pp.end_date.date(), - ) - TargetPopulation.objects.filter(id=comparing_with_pp.target_population_id).update(program_cycle=cycle) - comparing_with_pp.program_cycle = cycle - hhs_in_cycles_dict[str(cycle.id)] = new_hh_ids - - comparing_with_pp.save(update_fields=["program_cycle"]) - - -def program_cycle_data_migration() -> None: - start_time = timezone.now() - print("*** Starting Program Cycle Data Migration ***\n", "*" * 60) - print(f"Initial Cycles: {ProgramCycle.objects.all().count()}") - - for ba in BusinessArea.objects.all().only("id", "name"): - program_qs = Program.objects.filter(business_area_id=ba.id).only( - "id", "name", "start_date", "end_date", "status" - ) - if program_qs: - print(f"Processing {program_qs.count()} programs for {ba.name}.") - for program in program_qs: - # FINISHED programs - if program.status == Program.FINISHED: - processing_with_finished_program(program) - - # ACTIVE and DRAFT programs - if program.status in [Program.DRAFT, Program.ACTIVE]: - with transaction.atomic(): - print(f"-- Creating Cycle for {program.name} [{program.id}]") - default_cycle = ProgramCycle.objects.filter(program_id=program.id).first() - - payment_plan_qs_ids = [ - str(pp_id) - for pp_id in PaymentPlan.objects.filter(program_id=program.id) - .order_by("start_date", "created_at") - .only("id") - .values_list("id", flat=True) - .iterator() - ] - PaymentPlan.objects.filter(program_id=program.id).update(program_cycle=None) - # using list for .exclude__in=[] - default_cycle_id = [str(default_cycle.id)] if default_cycle else [] - processing_with_active_program(payment_plan_qs_ids, default_cycle_id) - - if default_cycle and payment_plan_qs_ids: - default_cycle.delete() - - # we can have TP without PaymentPlans - if default_cycle and not payment_plan_qs_ids: - # if payment_plans_list_ids empty just assign default cycle to TP - TargetPopulation.objects.filter(program_id=program.id, program_cycle__isnull=True).update( - program_cycle=default_cycle - ) - - # after create all Cycles let's adjust dates to find any overlapping - adjust_cycles_start_and_end_dates_for_active_program(program) - - print(f"Total Cycles: {ProgramCycle.objects.all().count()}") - print(f"Migration completed in {timezone.now() - start_time}\n", "*" * 60) diff --git a/src/hct_mis_api/one_time_scripts/remove_migrated_data_is_original.py b/src/hct_mis_api/one_time_scripts/remove_migrated_data_is_original.py index bed5769143..1801dd36b5 100644 --- a/src/hct_mis_api/one_time_scripts/remove_migrated_data_is_original.py +++ b/src/hct_mis_api/one_time_scripts/remove_migrated_data_is_original.py @@ -22,7 +22,7 @@ def remove_migrated_data_is_original(batch_size: int = 1000) -> None: for model in _get_model_list_is_original(): if model.__name__ == "GrievanceTicket": model_qs = model.default_for_migrations_fix - elif model.__name__ in ["HouseholdSelection", "EntitlementCard", "Feedback", "Message"]: + elif model.__name__ in ["EntitlementCard", "Feedback", "Message"]: model_qs = model.original_and_repr_objects else: model_qs = model.all_objects @@ -58,7 +58,7 @@ def get_statistic_is_original() -> None: if model.__name__ == "GrievanceTicket": queryset_all = model.default_for_migrations_fix.all().only("is_original", "id") queryset_is_original = queryset_all.filter(is_original=True) - elif model.__name__ in ["HouseholdSelection", "EntitlementCard", "Feedback", "Message"]: + elif model.__name__ in ["EntitlementCard", "Feedback", "Message"]: queryset_all = model.original_and_repr_objects.all().only("is_original", "id") queryset_is_original = queryset_all.filter(is_original=True) else: diff --git a/src/hct_mis_api/one_time_scripts/soft_delete_original_objects.py b/src/hct_mis_api/one_time_scripts/soft_delete_original_objects.py index 354864f5d3..ff20342113 100644 --- a/src/hct_mis_api/one_time_scripts/soft_delete_original_objects.py +++ b/src/hct_mis_api/one_time_scripts/soft_delete_original_objects.py @@ -16,4 +16,4 @@ def soft_delete_original_objects() -> None: IndividualIdentity.objects.filter(individual__program__isnull=True).delete() BankAccountInfo.objects.filter(individual__program__isnull=True).delete() # objects that cannot be deleted because they do not support soft-delete: - # Feedback, Message, GrievanceTicket, HouseholdSelection + # Feedback, Message, GrievanceTicket diff --git a/tests/selenium/payment_verification/test_payment_verification.py b/tests/selenium/payment_verification/test_payment_verification.py index 179d097017..70e1076fd3 100644 --- a/tests/selenium/payment_verification/test_payment_verification.py +++ b/tests/selenium/payment_verification/test_payment_verification.py @@ -267,7 +267,7 @@ def test_smoke_payment_verification( assert "Timeframe" in pagePaymentVerification.getStartdate().text assert "Last Modified Date" in pagePaymentVerification.getUpdatedat().text assert "PP-0000-00-1122334" in pagePaymentVerification.getCashPlanTableRow().text - assert "PENDING" in pagePaymentVerification.getStatusContainer().text + assert "FINISHED" in pagePaymentVerification.getStatusContainer().text assert "Rows per page: 5 1–1 of 1" in pagePaymentVerification.getTablePagination().text.replace("\n", " ") def test_smoke_payment_verification_details( diff --git a/tests/unit/apps/household/test_household_status_endpoint.py b/tests/unit/apps/household/test_household_status_endpoint.py index c83fe3fd79..8e9a3a0fc7 100644 --- a/tests/unit/apps/household/test_household_status_endpoint.py +++ b/tests/unit/apps/household/test_household_status_endpoint.py @@ -21,10 +21,9 @@ ROLE_NO_ROLE, PendingIndividualRoleInHousehold, ) -from hct_mis_api.apps.payment.fixtures import PaymentFactory +from hct_mis_api.apps.payment.fixtures import PaymentFactory, PaymentPlanFactory +from hct_mis_api.apps.payment.models import Payment, PaymentPlan from hct_mis_api.apps.registration_data.fixtures import RegistrationDataImportFactory -from hct_mis_api.apps.targeting.fixtures import TargetPopulationFactory -from hct_mis_api.apps.targeting.models import HouseholdSelection, TargetPopulation # used for ease of assertions, so it imitates serializer's behaviour @@ -144,18 +143,22 @@ def test_getting_individual_with_status_targeted(self) -> None: document_type = DocumentTypeFactory(key=IDENTIFICATION_TYPE_TO_KEY_MAPPING[IDENTIFICATION_TYPE_TAX_ID]) document = PendingDocumentFactory(individual=individual, type=document_type) tax_id = document.document_number - target_popuplation = TargetPopulationFactory( + payment_plan = PaymentPlanFactory( business_area=self.business_area, created_by=self.user, ) - target_popuplation.households.add(household) + PaymentFactory( + parent=payment_plan, + household=household, + delivered_quantity=None, + ) response = self.api_client.get(f"/api/hh-status?tax_id={tax_id}") self.assertEqual(response.status_code, 200) data = response.json() info = data["info"] - self.assertEqual(info["status"], "targeted") - self.assertEqual(info["date"], _time(HouseholdSelection.objects.first().updated_at)) + self.assertEqual(info["status"], "merged to population") + self.assertEqual(info["date"], _time(household.created_at)) def test_getting_individual_with_status_sent_to_cash_assist(self) -> None: household, individuals = create_household(household_args={"size": 1, "business_area": self.business_area}) @@ -163,21 +166,24 @@ def test_getting_individual_with_status_sent_to_cash_assist(self) -> None: document_type = DocumentTypeFactory(key=IDENTIFICATION_TYPE_TO_KEY_MAPPING[IDENTIFICATION_TYPE_TAX_ID]) document = PendingDocumentFactory(individual=individual, type=document_type) tax_id = document.document_number - - target_popuplation = TargetPopulationFactory( + payment_plan = PaymentPlanFactory( business_area=self.business_area, created_by=self.user, + status=PaymentPlan.Status.TP_LOCKED, + ) + PaymentFactory( + parent=payment_plan, + household=household, + status=Payment.STATUS_PENDING, + delivered_quantity=999, ) - target_popuplation.households.add(household) - target_popuplation.status = TargetPopulation.STATUS_PROCESSING - target_popuplation.save() response = self.api_client.get(f"/api/hh-status?tax_id={tax_id}") self.assertEqual(response.status_code, 200) data = response.json() self.assertIsNotNone(data["info"]) info = data["info"] - self.assertEqual(info["status"], "sent to cash assist") + self.assertEqual(info["status"], "paid") def test_getting_individual_with_status_paid(self) -> None: household, individuals = create_household(household_args={"size": 1, "business_area": self.business_area}) diff --git a/tests/unit/apps/household/test_individual_query.py b/tests/unit/apps/household/test_individual_query.py index 5b99e0c7b7..73a87e6ff4 100644 --- a/tests/unit/apps/household/test_individual_query.py +++ b/tests/unit/apps/household/test_individual_query.py @@ -304,6 +304,7 @@ def setUpTestData(cls) -> None: }, rdi_merge_status=MergeStatusModel.PENDING, ) + rebuild_search_index() @parameterized.expand( diff --git a/tests/unit/apps/payment/snapshots/snap_test_all_payment_plan_queries.py b/tests/unit/apps/payment/snapshots/snap_test_all_payment_plan_queries.py index d10e5d002b..c64e2e85c5 100644 --- a/tests/unit/apps/payment/snapshots/snap_test_all_payment_plan_queries.py +++ b/tests/unit/apps/payment/snapshots/snap_test_all_payment_plan_queries.py @@ -7,6 +7,33 @@ snapshots = Snapshot() +snapshots['TestPaymentPlanQueries::test_all_payment_plans_filter_by_delivery_types 1'] = { + 'data': { + 'allPaymentPlans': { + 'edges': [ + { + 'node': { + 'dispersionEndDate': '2020-12-10', + 'dispersionStartDate': '2020-08-10', + 'status': 'OPEN', + 'totalEntitledQuantity': 100.0, + 'unicefId': 'PP-01' + } + }, + { + 'node': { + 'dispersionEndDate': '2020-10-10', + 'dispersionStartDate': '2020-10-10', + 'status': 'LOCKED', + 'totalEntitledQuantity': 100.0, + 'unicefId': 'PP-02' + } + } + ] + } + } +} + snapshots['TestPaymentPlanQueries::test_all_payment_verification_log_entries 1'] = { 'data': { 'allPaymentVerificationLogEntries': { @@ -23,6 +50,37 @@ } } +snapshots['TestPaymentPlanQueries::test_all_payments_filter_by_household_id 1'] = { + 'data': { + 'allPayments': { + 'edgeCount': 1, + 'edges': [ + { + 'node': { + 'conflicted': False, + 'deliveredQuantity': 50.0, + 'deliveredQuantityUsd': 100.0, + 'entitlementQuantity': 100.0, + 'entitlementQuantityUsd': 200.0, + 'fspAuthCode': '', + 'parent': { + 'unicefId': 'PP-01' + }, + 'paymentPlanHardConflicted': False, + 'paymentPlanHardConflictedData': [ + ], + 'paymentPlanSoftConflicted': False, + 'paymentPlanSoftConflictedData': [ + ], + 'unicefId': 'RCPT-0060-20-0.000.001' + } + } + ], + 'totalCount': 1 + } + } +} + snapshots['TestPaymentPlanQueries::test_fetch_all_payment_plans 1'] = { 'data': { 'allPaymentPlans': { @@ -222,6 +280,15 @@ 'totalEntitledQuantity': 100.0, 'unicefId': 'PP-01' } + }, + { + 'node': { + 'dispersionEndDate': '2020-10-10', + 'dispersionStartDate': '2020-10-10', + 'status': 'LOCKED', + 'totalEntitledQuantity': 100.0, + 'unicefId': 'PP-02' + } } ] } @@ -234,11 +301,11 @@ 'edges': [ { 'node': { - 'dispersionEndDate': '2020-12-10', - 'dispersionStartDate': '2020-08-10', - 'status': 'OPEN', + 'dispersionEndDate': '2020-10-10', + 'dispersionStartDate': '2020-10-10', + 'status': 'LOCKED', 'totalEntitledQuantity': 100.0, - 'unicefId': 'PP-01' + 'unicefId': 'PP-02' } } ] @@ -277,15 +344,6 @@ 'data': { 'allPaymentPlans': { 'edges': [ - { - 'node': { - 'dispersionEndDate': '2020-10-10', - 'dispersionStartDate': '2020-10-10', - 'status': 'LOCKED', - 'totalEntitledQuantity': 100.0, - 'unicefId': 'PP-02' - } - } ] } } @@ -303,14 +361,23 @@ 'totalEntitledQuantity': 100.0, 'unicefId': 'PP-01' } - }, + } + ] + } + } +} + +snapshots['TestPaymentPlanQueries::test_fetch_all_payment_plans_filters 6'] = { + 'data': { + 'allPaymentPlans': { + 'edges': [ { 'node': { - 'dispersionEndDate': '2020-10-10', - 'dispersionStartDate': '2020-10-10', - 'status': 'LOCKED', + 'dispersionEndDate': '2020-12-10', + 'dispersionStartDate': '2020-08-10', + 'status': 'OPEN', 'totalEntitledQuantity': 100.0, - 'unicefId': 'PP-02' + 'unicefId': 'PP-01' } } ] @@ -318,10 +385,28 @@ } } -snapshots['TestPaymentPlanQueries::test_fetch_all_payment_plans_filters 6'] = { +snapshots['TestPaymentPlanQueries::test_fetch_all_payment_plans_filters 7'] = { + 'data': { + 'allPaymentPlans': { + 'edges': [ + ] + } + } +} + +snapshots['TestPaymentPlanQueries::test_fetch_all_payment_plans_filters 8'] = { 'data': { 'allPaymentPlans': { 'edges': [ + { + 'node': { + 'dispersionEndDate': '2020-12-10', + 'dispersionStartDate': '2020-08-10', + 'status': 'OPEN', + 'totalEntitledQuantity': 100.0, + 'unicefId': 'PP-01' + } + } ] } } @@ -453,14 +538,6 @@ 'name': 'Locked FSP', 'value': 'LOCKED_FSP' }, - { - 'name': 'Migration Blocked', - 'value': 'MIGRATION_BLOCKED' - }, - { - 'name': 'Migration Failed', - 'value': 'MIGRATION_FAILED' - }, { 'name': 'Open', 'value': 'TP_OPEN' @@ -966,3 +1043,18 @@ } } } + +snapshots['TestPaymentPlanQueries::test_payment_plans_with_targeting_criteria 1'] = { + 'data': { + 'paymentPlan': { + 'name': 'Test PP with TargetingCriteria', + 'status': 'TP_OPEN', + 'targetingCriteria': { + 'flagExcludeIfActiveAdjudicationTicket': False, + 'flagExcludeIfOnSanctionList': False, + 'householdIds': 'HH-1, HH-2', + 'individualIds': 'IND-01, IND-02' + } + } + } +} diff --git a/tests/unit/apps/payment/test_all_payment_plan_queries.py b/tests/unit/apps/payment/test_all_payment_plan_queries.py index 731d37dd72..0baacee701 100644 --- a/tests/unit/apps/payment/test_all_payment_plan_queries.py +++ b/tests/unit/apps/payment/test_all_payment_plan_queries.py @@ -21,6 +21,7 @@ from hct_mis_api.apps.core.utils import encode_id_base64 from hct_mis_api.apps.household.fixtures import HouseholdFactory, IndividualFactory from hct_mis_api.apps.payment.fixtures import ( + DeliveryMechanismFactory, DeliveryMechanismPerPaymentPlanFactory, FinancialServiceProviderFactory, PaymentFactory, @@ -40,6 +41,10 @@ PaymentVerificationPlan, ) from hct_mis_api.apps.program.fixtures import ProgramCycleFactory +from hct_mis_api.apps.targeting.fixtures import ( + TargetingCriteriaFactory, + TargetingCriteriaRuleFactory, +) def create_child_payment_plans(pp: PaymentPlan, created_by: User) -> None: @@ -160,8 +165,8 @@ class TestPaymentPlanQueries(APITestCase): """ ALL_PAYMENT_PLANS_FILTER_QUERY = """ - query AllPaymentPlans($businessArea: String!, $search: String, $status: [String], $totalEntitledQuantityFrom: Float, $totalEntitledQuantityTo: Float, $dispersionStartDate: Date, $dispersionEndDate: Date, $program: String, $programCycle: String) { - allPaymentPlans(businessArea: $businessArea, search: $search, status: $status, totalEntitledQuantityFrom: $totalEntitledQuantityFrom, totalEntitledQuantityTo: $totalEntitledQuantityTo, dispersionStartDate: $dispersionStartDate, dispersionEndDate: $dispersionEndDate, program: $program, orderBy: "unicef_id", programCycle: $programCycle) { + query AllPaymentPlans($businessArea: String!, $search: String, $status: [String], $totalEntitledQuantityFrom: Float, $totalEntitledQuantityTo: Float, $dispersionStartDate: Date, $dispersionEndDate: Date, $program: String, $programCycle: String, $verificationStatus: [String], $serviceProvider: String, $deliveryTypes: [String]) { + allPaymentPlans(businessArea: $businessArea, search: $search, status: $status, totalEntitledQuantityFrom: $totalEntitledQuantityFrom, totalEntitledQuantityTo: $totalEntitledQuantityTo, dispersionStartDate: $dispersionStartDate, dispersionEndDate: $dispersionEndDate, program: $program, orderBy: "unicef_id", programCycle: $programCycle, verificationStatus: $verificationStatus, serviceProvider: $serviceProvider, deliveryTypes: $deliveryTypes) { edges { node { dispersionEndDate @@ -202,8 +207,8 @@ class TestPaymentPlanQueries(APITestCase): """ ALL_PAYMENTS_QUERY = """ - query AllPayments($paymentPlanId: String!, $businessArea: String!) { - allPayments(paymentPlanId: $paymentPlanId, businessArea: $businessArea, orderBy: "unicef_id") { + query AllPayments($paymentPlanId: String, $businessArea: String!, $householdId: String) { + allPayments(paymentPlanId: $paymentPlanId, businessArea: $businessArea, orderBy: "unicef_id", householdId: $householdId) { edgeCount edges { node { @@ -283,6 +288,21 @@ class TestPaymentPlanQueries(APITestCase): } """ + PAYMENT_PLAN_QUERY_WITH_TARGETING_CRITERIA = """ + query PaymentPlan($id: ID!) { + paymentPlan(id: $id) { + name + status + targetingCriteria { + householdIds + individualIds + flagExcludeIfOnSanctionList + flagExcludeIfActiveAdjudicationTicket + } + } + } + """ + @classmethod def setUpTestData(cls) -> None: super().setUpTestData() @@ -312,6 +332,10 @@ def setUpTestData(cls) -> None: ) cls.pp.unicef_id = "PP-01" cls.pp.save() + cash_dm = DeliveryMechanismFactory(code="cash", is_active=True) + referral_dm = DeliveryMechanismFactory(code="referral", is_active=True) + DeliveryMechanismPerPaymentPlanFactory(payment_plan=cls.pp, delivery_mechanism=cash_dm) + PaymentVerificationSummaryFactory(payment_plan=cls.pp, status="ACTIVE") hoh1 = IndividualFactory(household=None) hoh2 = IndividualFactory(household=None) @@ -415,6 +439,7 @@ def setUpTestData(cls) -> None: financial_service_provider__payment_gateway_id="test123", created_by=cls.user, sent_by=cls.user, + delivery_mechanism=referral_dm, ) with patch("hct_mis_api.apps.payment.models.PaymentPlan.get_exchange_rate", return_value=2.0): @@ -451,8 +476,6 @@ def test_fetch_all_payments_for_open_payment_plan(self) -> None: def test_fetch_all_payment_plans_filters(self) -> None: just_random_program_cycle = ProgramCycleFactory(program=self.pp.program) for filter_data in [ - {"search": self.pp.unicef_id}, - {"status": self.pp.status}, { "totalEntitledQuantityFrom": float(self.pp_conflicted.total_entitled_quantity - 10), "totalEntitledQuantityTo": float(self.pp_conflicted.total_entitled_quantity + 10), @@ -463,6 +486,10 @@ def test_fetch_all_payment_plans_filters(self) -> None: }, {"programCycle": encode_id_base64(self.pp.program_cycle.pk, "ProgramCycleNode")}, {"programCycle": encode_id_base64(just_random_program_cycle.pk, "ProgramCycleNode")}, + {"search": self.pp.unicef_id}, + {"status": self.pp.status}, + {"serviceProvider": "test"}, + {"verificationStatus": ["ACTIVE", "FINISHED"]}, ]: self.snapshot_graphql_request( request_string=self.ALL_PAYMENT_PLANS_FILTER_QUERY, @@ -474,6 +501,18 @@ def test_fetch_all_payment_plans_filters(self) -> None: }, ) + @freeze_time("2020-10-10") + def test_all_payment_plans_filter_by_delivery_types(self) -> None: + self.snapshot_graphql_request( + request_string=self.ALL_PAYMENT_PLANS_FILTER_QUERY, + context={"user": self.user}, + variables={ + "businessArea": "afghanistan", + "program": encode_id_base64(self.pp.program.pk, "Program"), + **{"deliveryTypes": ["cash", "referral"]}, + }, + ) + @freeze_time("2020-10-10") def test_filter_payment_plans_with_source_id(self) -> None: create_child_payment_plans(self.pp, self.user) @@ -639,7 +678,6 @@ def test_all_payment_verification_log_entries(self) -> None: } """ payment_plan_id = str(self.pp.id) - PaymentVerificationSummaryFactory(payment_plan=self.pp) PaymentVerificationSummaryFactory(payment_plan=self.pp_conflicted) pvp = PaymentVerificationPlanFactory(payment_plan=self.pp) pvp2 = PaymentVerificationPlanFactory(payment_plan=self.pp_conflicted) @@ -987,3 +1025,41 @@ def test_payment_plans_export_download_properties( context={"user": user}, variables={"businessArea": "afghanistan", "id": encoded_payment_plan_id}, ) + + @freeze_time("2020-10-10") + def test_all_payments_filter_by_household_id(self) -> None: + self.snapshot_graphql_request( + request_string=self.ALL_PAYMENTS_QUERY, + context={"user": self.user}, + variables={ + "businessArea": "afghanistan", + "householdId": encode_id_base64(self.p1.household_id, "Household"), + }, + ) + + @freeze_time("2020-10-10") + def test_payment_plans_with_targeting_criteria(self) -> None: + payment_plan = PaymentPlanFactory( + name="Test PP with TargetingCriteria", + status=PaymentPlan.Status.TP_OPEN, + program_cycle=self.program_cycle, + dispersion_start_date=datetime(2020, 8, 10), + dispersion_end_date=datetime(2020, 12, 10), + is_follow_up=False, + created_by=self.user, + currency="PLN", + ) + targeting_criteria = TargetingCriteriaFactory() + TargetingCriteriaRuleFactory( + targeting_criteria=targeting_criteria, + household_ids="HH-1, HH-2", + individual_ids="IND-01, IND-02", + ) + payment_plan.targeting_criteria = targeting_criteria + payment_plan.save() + + self.snapshot_graphql_request( + request_string=self.PAYMENT_PLAN_QUERY_WITH_TARGETING_CRITERIA, + context={"user": self.user}, + variables={"businessArea": "afghanistan", "id": encode_id_base64(payment_plan.id, "PaymentPlan")}, + ) diff --git a/tests/unit/apps/payment/test_build_summary.py b/tests/unit/apps/payment/test_build_summary.py index fce60c04df..2eb6e71a2f 100644 --- a/tests/unit/apps/payment/test_build_summary.py +++ b/tests/unit/apps/payment/test_build_summary.py @@ -14,10 +14,7 @@ build_summary, ) from hct_mis_api.apps.program.fixtures import ProgramFactory -from hct_mis_api.apps.targeting.fixtures import ( - TargetingCriteriaFactory, - TargetPopulationFactory, -) +from hct_mis_api.apps.targeting.fixtures import TargetingCriteriaFactory class TestBuildSummary(TestCase): @@ -29,15 +26,12 @@ def setUpTestData(cls) -> None: cls.program = ProgramFactory(business_area=cls.business_area) cls.program.admin_areas.set(Area.objects.order_by("?")[:3]) - cls.target_population = TargetPopulationFactory( - created_by=cls.user, - targeting_criteria=TargetingCriteriaFactory(), - business_area=cls.business_area, - ) cls.payment_plan = PaymentPlanFactory( name="TEST", program_cycle=cls.program.cycles.first(), business_area=cls.business_area, + targeting_criteria=TargetingCriteriaFactory(), + created_by=cls.user, ) PaymentVerificationSummaryFactory(payment_plan=cls.payment_plan) diff --git a/tests/unit/apps/payment/test_delete_verification_mutation.py b/tests/unit/apps/payment/test_delete_verification_mutation.py index 2c08c256b2..d4bed441b3 100644 --- a/tests/unit/apps/payment/test_delete_verification_mutation.py +++ b/tests/unit/apps/payment/test_delete_verification_mutation.py @@ -15,10 +15,6 @@ ) from hct_mis_api.apps.payment.models import PaymentVerificationPlan from hct_mis_api.apps.program.fixtures import ProgramFactory -from hct_mis_api.apps.targeting.fixtures import ( - TargetingCriteriaFactory, - TargetPopulationFactory, -) class TestDeleteVerificationMutation(APITestCase): @@ -48,11 +44,6 @@ def setUpTestData(cls) -> None: cls.program = ProgramFactory(business_area=cls.business_area) cls.program.admin_areas.set(Area.objects.order_by("?")[:3]) - cls.target_population = TargetPopulationFactory( - created_by=cls.user, - targeting_criteria=(TargetingCriteriaFactory()), - business_area=cls.business_area, - ) cls.payment_plan = PaymentPlanFactory( name="TEST", program_cycle=cls.program.cycles.first(), diff --git a/tests/unit/apps/payment/test_models.py b/tests/unit/apps/payment/test_models.py index cd35d67754..33af1c79a9 100644 --- a/tests/unit/apps/payment/test_models.py +++ b/tests/unit/apps/payment/test_models.py @@ -57,7 +57,10 @@ from hct_mis_api.apps.registration_data.fixtures import RegistrationDataImportFactory from hct_mis_api.apps.steficon.fixtures import RuleCommitFactory from hct_mis_api.apps.steficon.models import Rule -from hct_mis_api.apps.targeting.fixtures import TargetingCriteriaFactory +from hct_mis_api.apps.targeting.fixtures import ( + TargetingCriteriaFactory, + TargetingCriteriaRuleFactory, +) pytestmark = pytest.mark.django_db @@ -329,8 +332,7 @@ def test_payment_plan_exclude_hh_property(self) -> None: self.assertEqual(pp.excluded_household_ids_targeting_level, [hh.unicef_id]) def test_payment_plan_has_empty_criteria_property(self) -> None: - pp: PaymentPlan = PaymentPlanFactory(targeting_criteria=None, created_by=self.user) - + pp: PaymentPlan = PaymentPlanFactory(created_by=self.user) self.assertTrue(pp.has_empty_criteria) def test_payment_plan_has_empty_ids_criteria_property(self) -> None: @@ -382,6 +384,15 @@ def test_remove_imported_file(self) -> None: self.assertIsNone(pp.imported_file) self.assertIsNone(pp.imported_file_date) + def test_has_empty_ids_criteria(self) -> None: + pp = PaymentPlanFactory(created_by=self.user) + TargetingCriteriaRuleFactory( + targeting_criteria=pp.targeting_criteria, + household_ids="HH-1, HH-2", + individual_ids="IND-01, IND-02", + ) + self.assertFalse(pp.has_empty_ids_criteria) + class TestPaymentModel(TestCase): @classmethod diff --git a/tests/unit/apps/payment/test_payment_plan_services.py b/tests/unit/apps/payment/test_payment_plan_services.py index 5a767c43cd..9e3aaa6b8f 100644 --- a/tests/unit/apps/payment/test_payment_plan_services.py +++ b/tests/unit/apps/payment/test_payment_plan_services.py @@ -284,7 +284,7 @@ def test_create(self, get_exchange_rate_mock: Any) -> None: self.assertEqual(pp.total_households_count, 0) self.assertEqual(pp.total_individuals_count, 0) self.assertEqual(pp.payment_items.count(), 0) - with self.assertNumQueries(74): + with self.assertNumQueries(77): prepare_payment_plan_task.delay(str(pp.id)) pp.refresh_from_db() self.assertEqual(pp.status, PaymentPlan.Status.TP_OPEN) @@ -371,7 +371,7 @@ def test_create_follow_up_pp(self, get_exchange_rate_mock: Any) -> None: follow_up_pp.refresh_from_db() self.assertEqual(follow_up_pp.status, PaymentPlan.Status.OPEN) - self.assertEqual(follow_up_pp.target_population, pp.target_population) + # self.assertEqual(follow_up_pp.target_population, pp.target_population) self.assertEqual(follow_up_pp.program, pp.program) self.assertEqual(follow_up_pp.program_cycle, pp.program_cycle) self.assertEqual(follow_up_pp.business_area, pp.business_area) @@ -721,7 +721,7 @@ def test_full_rebuild(self, get_exchange_rate_mock: Any) -> None: self.assertEqual(pp.total_households_count, 0) self.assertEqual(pp.total_individuals_count, 0) self.assertEqual(pp.payment_items.count(), 0) - with self.assertNumQueries(74): + with self.assertNumQueries(77): prepare_payment_plan_task.delay(str(pp.id)) pp.refresh_from_db() self.assertEqual(pp.status, PaymentPlan.Status.TP_OPEN) diff --git a/tests/unit/apps/periodic_data_update/test_periodic_data_update_export_template_service.py b/tests/unit/apps/periodic_data_update/test_periodic_data_update_export_template_service.py index 545b71ac5f..2929869971 100644 --- a/tests/unit/apps/periodic_data_update/test_periodic_data_update_export_template_service.py +++ b/tests/unit/apps/periodic_data_update/test_periodic_data_update_export_template_service.py @@ -21,7 +21,7 @@ ) from hct_mis_api.apps.household.fixtures import create_household_and_individuals from hct_mis_api.apps.household.models import FEMALE, MALE -from hct_mis_api.apps.payment.fixtures import PaymentFactory +from hct_mis_api.apps.payment.fixtures import PaymentFactory, PaymentPlanFactory from hct_mis_api.apps.payment.models import Payment from hct_mis_api.apps.periodic_data_update.fixtures import ( PeriodicDataUpdateTemplateFactory, @@ -33,7 +33,6 @@ from hct_mis_api.apps.program.models import Program from hct_mis_api.apps.registration_data.fixtures import RegistrationDataImportFactory from hct_mis_api.apps.sanction_list.fixtures import SanctionListIndividualFactory -from hct_mis_api.apps.targeting.fixtures import TargetPopulationFactory class TestPeriodicDataUpdateExportTemplateService(TestCase): @@ -229,11 +228,11 @@ def test_get_individuals_queryset_target_population_id_filter(self) -> None: }, ], ) - tp = TargetPopulationFactory() + pp = PaymentPlanFactory() self.periodic_data_update_template.filters = { - "target_population_id": encode_id_base64(str(tp.pk), "TargetPopulation") + "target_population_id": encode_id_base64(str(pp.pk), "TargetPopulation") } - tp.households.add(self.household) + PaymentFactory(parent=pp, household=self.household) self.periodic_data_update_template.save() service = PeriodicDataUpdateExportTemplateService(self.periodic_data_update_template) queryset = service._get_individuals_queryset() diff --git a/tests/unit/apps/program/test_program_cycle_rest_api.py b/tests/unit/apps/program/test_program_cycle_rest_api.py index 4a4197462b..9553df3159 100644 --- a/tests/unit/apps/program/test_program_cycle_rest_api.py +++ b/tests/unit/apps/program/test_program_cycle_rest_api.py @@ -27,8 +27,6 @@ from hct_mis_api.apps.program.api.views import ProgramCycleViewSet from hct_mis_api.apps.program.fixtures import ProgramCycleFactory, ProgramFactory from hct_mis_api.apps.program.models import Program, ProgramCycle -from hct_mis_api.apps.targeting.fixtures import TargetPopulationFactory -from hct_mis_api.apps.targeting.models import TargetPopulation from tests.unit.api.base import HOPEApiTestCase @@ -175,10 +173,9 @@ def test_delete_program_cycle(self) -> None: program=self.program, status=ProgramCycle.DRAFT, ) - # create TP and PP - tp = TargetPopulationFactory(program_cycle=cycle3, program=self.program) - pp = PaymentPlanFactory(program_cycle=cycle3, target_population=tp) - self.assertEqual(TargetPopulation.objects.count(), 1) + # create PP + pp = PaymentPlanFactory(program_cycle=cycle3) + self.assertEqual(PaymentPlan.objects.count(), 1) self.assertEqual(ProgramCycle.objects.count(), 4) self.client.force_authenticate(user=self.user) url = reverse( @@ -189,17 +186,12 @@ def test_delete_program_cycle(self) -> None: bad_response = self.client.delete(url) self.assertEqual(bad_response.status_code, status.HTTP_400_BAD_REQUEST) self.assertIn("Don’t allow to delete Cycle with assigned Target Population", bad_response.data) - tp.delete() - - bad_response = self.client.delete(url) - self.assertEqual(bad_response.status_code, status.HTTP_400_BAD_REQUEST) - self.assertIn("Don’t allow to delete Cycle with assigned Payment Plan", bad_response.data) pp.delete() response = self.client.delete(url) self.assertEqual(response.status_code, status.HTTP_204_NO_CONTENT) self.assertEqual(ProgramCycle.objects.count(), 3) - self.assertEqual(TargetPopulation.objects.count(), 0) + self.assertEqual(PaymentPlan.objects.count(), 0) def test_filter_by_status(self) -> None: self.client.force_authenticate(user=self.user) diff --git a/tests/unit/apps/program/test_program_query.py b/tests/unit/apps/program/test_program_query.py index eb35702900..970ac941c3 100644 --- a/tests/unit/apps/program/test_program_query.py +++ b/tests/unit/apps/program/test_program_query.py @@ -11,9 +11,9 @@ create_afghanistan, ) from hct_mis_api.apps.core.models import PeriodicFieldData +from hct_mis_api.apps.payment.fixtures import PaymentPlanFactory from hct_mis_api.apps.program.fixtures import ProgramFactory from hct_mis_api.apps.program.models import Program -from hct_mis_api.apps.targeting.fixtures import TargetPopulationFactory PROGRAM_QUERY = """ query Program($id: ID!) { @@ -99,7 +99,7 @@ def setUpTestData(cls) -> None: label="PDU Field Other", pdu_data=pdu_data_other, ) - TargetPopulationFactory(program=cls.program) + PaymentPlanFactory(program_cycle=cls.program.cycles.first()) @parameterized.expand( [ diff --git a/tests/unit/apps/registration_data/test_admin.py b/tests/unit/apps/registration_data/test_admin.py index b23402617a..5872e2cff4 100644 --- a/tests/unit/apps/registration_data/test_admin.py +++ b/tests/unit/apps/registration_data/test_admin.py @@ -21,15 +21,12 @@ PendingHousehold, PendingIndividual, ) +from hct_mis_api.apps.payment.fixtures import PaymentFactory, PaymentPlanFactory +from hct_mis_api.apps.payment.models import Payment from hct_mis_api.apps.program.fixtures import ProgramFactory from hct_mis_api.apps.registration_data.admin import RegistrationDataImportAdmin from hct_mis_api.apps.registration_data.fixtures import RegistrationDataImportFactory from hct_mis_api.apps.registration_data.models import RegistrationDataImport -from hct_mis_api.apps.targeting.fixtures import ( - HouseholdSelectionFactory, - TargetPopulationFactory, -) -from hct_mis_api.apps.targeting.models import HouseholdSelection from hct_mis_api.apps.utils.elasticsearch_utils import rebuild_search_index from hct_mis_api.apps.utils.models import MergeStatusModel @@ -147,17 +144,15 @@ def setUpTestData(cls) -> None: individual=cls.individuals[0], ) - cls.target_population = TargetPopulationFactory(business_area=afghanistan, program=program) - cls.household_selection = HouseholdSelectionFactory( - household=cls.household, target_population=cls.target_population - ) + cls.payment_plan = PaymentPlanFactory(business_area=afghanistan, program_cycle=program.cycles.first()) + cls.payment = PaymentFactory(household=cls.household, parent=cls.payment_plan) rebuild_search_index() def test_delete_merged_rdi(self) -> None: self.assertEqual(GrievanceTicket.objects.count(), 2) self.assertEqual(TicketIndividualDataUpdateDetails.objects.count(), 1) self.assertEqual(TicketComplaintDetails.objects.count(), 1) - self.assertEqual(HouseholdSelection.objects.count(), 1) + self.assertEqual(Payment.objects.count(), 1) self.assertEqual(RegistrationDataImport.objects.count(), 1) @@ -177,8 +172,8 @@ def test_delete_merged_rdi(self) -> None: self.assertEqual(TicketComplaintDetails.objects.count(), 0) self.assertIsNone(TicketComplaintDetails.objects.filter(ticket=self.grievance_ticket1).first()) - self.assertEqual(HouseholdSelection.objects.count(), 0) - self.assertIsNone(HouseholdSelection.objects.filter(household=self.household).first()) + self.assertEqual(Payment.objects.count(), 0) + self.assertIsNone(Payment.objects.filter(household=self.household).first()) self.assertEqual(RegistrationDataImport.objects.count(), 0) self.assertIsNone(RegistrationDataImport.objects.filter(id=self.rdi.id).first()) diff --git a/tests/unit/apps/targeting/test_admin.py b/tests/unit/apps/targeting/test_admin.py deleted file mode 100644 index 468a1ced01..0000000000 --- a/tests/unit/apps/targeting/test_admin.py +++ /dev/null @@ -1,26 +0,0 @@ -from hct_mis_api.apps.targeting.fixtures import TargetPopulationFactory -from tests.unit.apps.household.test_admin import BaseTest - - -# temporary added test for AutoCompleteFilterTemp have to be removed after fix in AutoCompleteFilter -class HouseholdSelectionAdminTest(BaseTest): - def test_household_selection_filtering_by_targeting(self) -> None: - base_url = "/api/unicorn/targeting/householdselection/" - targeting_removed = TargetPopulationFactory(name="Test TP for test", is_removed=True) - targeting_1 = TargetPopulationFactory(name="Test TP for test 222") - self.assertTrue(targeting_removed.is_removed) - self.assertFalse(targeting_1.is_removed) - - # removed tp - url = f"{base_url}?&target_population__exact={str(targeting_removed.id)}" - res = self.app.get(url, user=self.superuser) - self.assertEqual(res.status_code, 200) - - url = f"{base_url}?&target_population__exact={str(targeting_1.id)}" - res = self.app.get(url, user=self.superuser) - self.assertEqual(res.status_code, 200) - - # invalid id - url = f"{base_url}?&target_population__exact=00000000-1111-0000-1111-faceb00c1111" - res = self.app.get(url, user=self.superuser) - self.assertEqual(res.status_code, 200) diff --git a/tests/unit/apps/targeting/test_steficon.py b/tests/unit/apps/targeting/test_steficon.py deleted file mode 100644 index 2fdb0c6e79..0000000000 --- a/tests/unit/apps/targeting/test_steficon.py +++ /dev/null @@ -1,44 +0,0 @@ -from decimal import Decimal - -from django.test import TestCase - -from hct_mis_api.apps.core.fixtures import create_afghanistan -from hct_mis_api.apps.core.models import BusinessArea -from hct_mis_api.apps.household.fixtures import HouseholdFactory, IndividualFactory -from hct_mis_api.apps.steficon.models import Rule -from hct_mis_api.apps.targeting.celery_tasks import target_population_apply_steficon -from hct_mis_api.apps.targeting.fixtures import TargetPopulationFactory -from hct_mis_api.apps.targeting.models import TargetPopulation - - -class TestTargetingSteficon(TestCase): - @classmethod - def setUpTestData(cls) -> None: - super().setUpTestData() - create_afghanistan() - cls.business_area = BusinessArea.objects.get(slug="afghanistan") - rule, __ = Rule.objects.update_or_create( - name="TestRule1", defaults={"definition": "result.value=Decimal('1.3')"} - ) - rule.commit(is_release=True, force=True) - assert rule.latest # sanity check - cls.target_population = TargetPopulationFactory(steficon_rule=rule.latest, business_area=cls.business_area) - if not cls.target_population.households.exists(): - hoh = IndividualFactory(household=None, business_area=cls.business_area) - households = [HouseholdFactory(head_of_household=hoh)] - cls.target_population.households.add(*households) - - assert cls.target_population.selections.count() == 1 # sanity check - entry = cls.target_population.selections.first() - assert entry.vulnerability_score is None - - def test_queue(self) -> None: - target_population_apply_steficon(self.target_population.pk) - - entry = self.target_population.selections.first() - entry.refresh_from_db() - self.target_population.refresh_from_db() - assert ( - self.target_population.status == TargetPopulation.STATUS_STEFICON_COMPLETED - ), self.target_population.status - assert entry.vulnerability_score == Decimal("1.3"), entry.vulnerability_score diff --git a/tests/unit/apps/targeting/test_target_population_views.py b/tests/unit/apps/targeting/test_target_population_views.py index 3824fa501b..39f4b1d213 100644 --- a/tests/unit/apps/targeting/test_target_population_views.py +++ b/tests/unit/apps/targeting/test_target_population_views.py @@ -16,9 +16,9 @@ UserFactory, ) from hct_mis_api.apps.account.permissions import Permissions +from hct_mis_api.apps.payment.fixtures import PaymentPlanFactory +from hct_mis_api.apps.payment.models import PaymentPlan from hct_mis_api.apps.program.fixtures import ProgramFactory -from hct_mis_api.apps.targeting.fixtures import TargetPopulationFactory -from hct_mis_api.apps.targeting.models import TargetPopulation pytestmark = pytest.mark.django_db @@ -33,28 +33,28 @@ def set_up(self, api_client: Callable, afghanistan: BusinessAreaFactory, id_to_b self.program1 = ProgramFactory(business_area=self.afghanistan, name="Program1") self.program2 = ProgramFactory(business_area=self.afghanistan, name="Program2") - self.tp1 = TargetPopulationFactory( + self.tp1 = PaymentPlanFactory( business_area=self.afghanistan, - program=self.program1, - status=TargetPopulation.STATUS_OPEN, + program_cycle=self.program1.cycles.first(), + status=PaymentPlan.Status.TP_OPEN, name="Test TP 1", ) - self.tp2 = TargetPopulationFactory( + self.tp2 = PaymentPlanFactory( business_area=self.afghanistan, - program=self.program1, - status=TargetPopulation.STATUS_LOCKED, + program_cycle=self.program1.cycles.first(), + status=PaymentPlan.Status.TP_LOCKED, name="Test TP 2", ) - self.tp3 = TargetPopulationFactory( + self.tp3 = PaymentPlanFactory( business_area=self.afghanistan, - program=self.program1, - status=TargetPopulation.STATUS_ASSIGNED, + program_cycle=self.program1.cycles.first(), + status=PaymentPlan.Status.OPEN, name="Test 3 TP", ) - self.tp_program2 = TargetPopulationFactory( + self.tp_program2 = PaymentPlanFactory( business_area=self.afghanistan, - program=self.program2, - status=TargetPopulation.STATUS_ASSIGNED, + program_cycle=self.program2.cycles.first(), + status=PaymentPlan.Status.OPEN, name="Test TP Program 2", ) @@ -135,31 +135,31 @@ def test_list_target_populations( response_json = response.json()["results"] assert len(response_json) == 3 assert { - "id": id_to_base64(self.tp1.id, "TargetPopulation"), + "id": id_to_base64(self.tp1.id, "PaymentPlan"), "name": self.tp1.name, "status": self.tp1.get_status_display(), "created_by": self.tp1.created_by.get_full_name(), "created_at": "2022-01-01T00:00:00Z", } in response_json assert { - "id": id_to_base64(self.tp2.id, "TargetPopulation"), + "id": id_to_base64(self.tp2.id, "PaymentPlan"), "name": self.tp2.name, "status": self.tp2.get_status_display(), "created_by": self.tp2.created_by.get_full_name(), "created_at": "2022-01-01T00:00:00Z", } in response_json assert { - "id": id_to_base64(self.tp3.id, "TargetPopulation"), + "id": id_to_base64(self.tp3.id, "PaymentPlan"), "name": self.tp3.name, - "status": self.tp3.get_status_display(), + "status": "Assigned", "created_by": self.tp3.created_by.get_full_name(), "created_at": "2022-01-01T00:00:00Z", } in response_json assert { - "id": id_to_base64(self.tp_program2.id, "TargetPopulation"), + "id": id_to_base64(self.tp_program2.id, "PaymentPlan"), "name": self.tp_program2.name, "created_by": self.tp1.created_by.get_full_name(), - "status": self.tp1.get_status_display(), + "status": "Assigned", "created_at": "2022-01-01T00:00:00Z", } not in response_json @@ -177,7 +177,7 @@ def test_list_target_populations_filter( self.afghanistan, self.program1, ) - response = self.client.get(self.url_list, {"status": TargetPopulation.STATUS_OPEN}) + response = self.client.get(self.url_list, {"status": PaymentPlan.Status.TP_OPEN}) assert response.status_code == status.HTTP_200_OK response_json = response.json()["results"] @@ -237,7 +237,7 @@ def test_list_target_populations_caching( assert etag_second_call == etag # After update, it does not use the cached data - self.tp1.status = TargetPopulation.STATUS_PROCESSING + self.tp1.status = PaymentPlan.Status.TP_PROCESSING self.tp1.save() with CaptureQueriesContext(connection) as ctx: response = self.client.get(self.url_list) diff --git a/tests/unit/apps/targeting/test_targeting_criteria.py b/tests/unit/apps/targeting/test_targeting_criteria.py index 3123876a1a..839d7fc32a 100644 --- a/tests/unit/apps/targeting/test_targeting_criteria.py +++ b/tests/unit/apps/targeting/test_targeting_criteria.py @@ -15,13 +15,16 @@ ) from hct_mis_api.apps.household.models import Household, Individual from hct_mis_api.apps.payment.fixtures import PaymentPlanFactory +from hct_mis_api.apps.targeting.fixtures import ( + TargetingCriteriaFactory, + TargetingCriteriaRuleFactory, +) from hct_mis_api.apps.targeting.models import ( TargetingCriteria, TargetingCriteriaRule, TargetingCriteriaRuleFilter, TargetingIndividualBlockRuleFilter, TargetingIndividualRuleFilterBlock, - TargetPopulation, ) @@ -148,7 +151,7 @@ def get_targeting_criteria_for_filters(filters: List[Dict]) -> TargetingCriteria return targeting_criteria @classmethod - def create_criteria(cls, *args: Any, **kwargs: Any) -> TargetPopulation: + def create_criteria(cls, *args: Any, **kwargs: Any) -> TargetingCriteria: criteria = cls.get_targeting_criteria_for_filters(*args, **kwargs) PaymentPlanFactory( name="tp", @@ -375,72 +378,85 @@ def create_criteria(cls, targeting_criteria_data: Dict) -> TargetingCriteria: return criteria def test_household_ids(self) -> None: - assert ( - Household.objects.filter( - self.create_criteria( - { - "household_ids": f"{self.hh_1.unicef_id}", - "individual_ids": "", - } - ).get_query() - ) - .distinct() - .count() - == 1 + t_criteria = TargetingCriteriaFactory() + PaymentPlanFactory( + name="tp", + created_by=self.user, + business_area=self.business_area, + targeting_criteria=t_criteria, ) - assert ( - Household.objects.filter( - self.create_criteria( - { - "household_ids": f"{self.hh_3.unicef_id}, {self.hh_2.unicef_id}", - "individual_ids": "", - } - ).get_query() - ) - .distinct() - .count() - == 2 + TargetingCriteriaRuleFactory( + targeting_criteria=t_criteria, + **{ + "household_ids": f"{self.hh_1.unicef_id}", + "individual_ids": "", + }, ) + assert Household.objects.filter(t_criteria.get_query()).distinct().count() == 1 + t_criteria2 = TargetingCriteriaFactory() + PaymentPlanFactory( + name="tp", + created_by=self.user, + business_area=self.business_area, + targeting_criteria=t_criteria2, + ) + TargetingCriteriaRuleFactory( + targeting_criteria=t_criteria2, + **{ + "household_ids": f"{self.hh_3.unicef_id}, {self.hh_2.unicef_id}", + "individual_ids": "", + }, + ) + assert Household.objects.filter(t_criteria2.get_query()).distinct().count() == 2 + def test_individual_ids(self) -> None: - assert ( - Household.objects.filter( - self.create_criteria( - { - "household_ids": "", - "individual_ids": f"{self.hh_1.individuals.first().unicef_id}", - } - ).get_query() - ) - .distinct() - .count() - == 1 + t_criteria = TargetingCriteriaFactory() + PaymentPlanFactory( + name="tp", + created_by=self.user, + business_area=self.business_area, + targeting_criteria=t_criteria, ) - assert ( - Household.objects.filter( - self.create_criteria( - { - "household_ids": "", - "individual_ids": f"{self.hh_2.individuals.first().unicef_id}, {self.hh_1.individuals.first().unicef_id}", - } - ).get_query() - ) - .distinct() - .count() - == 2 + TargetingCriteriaRuleFactory( + targeting_criteria=t_criteria, + **{ + "household_ids": "", + "individual_ids": f"{self.hh_1.individuals.first().unicef_id}", + }, + ) + assert Household.objects.filter(t_criteria.get_query()).distinct().count() == 1 + t_criteria2 = TargetingCriteriaFactory() + PaymentPlanFactory( + name="tp", + created_by=self.user, + business_area=self.business_area, + targeting_criteria=t_criteria2, + ) + TargetingCriteriaRuleFactory( + targeting_criteria=t_criteria2, + **{ + "household_ids": "", + "individual_ids": f"{self.hh_2.individuals.first().unicef_id}, {self.hh_1.individuals.first().unicef_id}", + }, ) + assert Household.objects.filter(t_criteria2.get_query()).distinct().count() == 2 + def test_household_and_individual_ids(self) -> None: - assert ( - Household.objects.filter( - self.create_criteria( - { - "household_ids": f"{self.hh_1.unicef_id}, {self.hh_2.unicef_id}", - "individual_ids": f"{self.hh_3.individuals.first().unicef_id}", - } - ).get_query() - ) - .distinct() - .count() - == 3 + t_criteria = TargetingCriteriaFactory() + PaymentPlanFactory( + name="tp", + created_by=self.user, + business_area=self.business_area, + targeting_criteria=t_criteria, ) + TargetingCriteriaRuleFactory( + targeting_criteria=t_criteria, + **{ + "household_ids": f"{self.hh_1.unicef_id}, {self.hh_2.unicef_id}", + "individual_ids": f"{self.hh_3.individuals.first().unicef_id}", + }, + ) + + assert Household.objects.filter(t_criteria.get_query()).distinct().count() == 3 diff --git a/tests/unit/apps/targeting/test_targeting_criteria_exlude_need_adjudication.py b/tests/unit/apps/targeting/test_targeting_criteria_exlude_need_adjudication.py index 1dcf03de56..414e298974 100644 --- a/tests/unit/apps/targeting/test_targeting_criteria_exlude_need_adjudication.py +++ b/tests/unit/apps/targeting/test_targeting_criteria_exlude_need_adjudication.py @@ -9,10 +9,8 @@ create_household_and_individuals, ) from hct_mis_api.apps.household.models import Household -from hct_mis_api.apps.targeting.fixtures import ( - TargetingCriteriaFactory, - TargetPopulationFactory, -) +from hct_mis_api.apps.payment.fixtures import PaymentFactory, PaymentPlanFactory +from hct_mis_api.apps.targeting.fixtures import TargetingCriteriaFactory from hct_mis_api.apps.targeting.services.targeting_service import ( TargetingCriteriaQueryingBase, ) @@ -56,11 +54,15 @@ def setUpTestData(cls) -> None: flag_exclude_if_active_adjudication_ticket=True, flag_exclude_if_on_sanction_list=True, ) - TargetPopulationFactory( + pp = PaymentPlanFactory( targeting_criteria=targeting_criteria, business_area=cls.business_area, - households=[cls.household1, cls.household2], ) + for hh in [cls.household1, cls.household2]: + PaymentFactory( + household=hh, + parent=pp, + ) cls.representative2 = IndividualFactory(household=None) cls.household2.representatives.set([cls.representative2]) diff --git a/tests/unit/apps/targeting/test_targeting_criteria_rule_filter.py b/tests/unit/apps/targeting/test_targeting_criteria_rule_filter.py index d1c12e542f..93462c9ad7 100644 --- a/tests/unit/apps/targeting/test_targeting_criteria_rule_filter.py +++ b/tests/unit/apps/targeting/test_targeting_criteria_rule_filter.py @@ -41,7 +41,6 @@ TargetingCriteriaRuleFilter, TargetingIndividualBlockRuleFilter, TargetingIndividualRuleFilterBlock, - TargetPopulation, ) from hct_mis_api.apps.utils.models import MergeStatusModel @@ -393,9 +392,9 @@ def test_rule_filter_collector_without_arg(self) -> None: self.assertEqual(queryset.count(), 4) def test_tc_rule_query_for_ind_hh_ids(self) -> None: - tp = TargetPopulation(program=self.households[0].program) + pp = PaymentPlanFactory(program_cycle=self.households[0].program.cycles.first()) tc = TargetingCriteria() - tc.target_population = tp + tc.payment_plan = pp tc.save() tcr = TargetingCriteriaRule(household_ids="HH-1, HH-2", individual_ids="IND-11, IND-22") tcr.targeting_criteria = tc diff --git a/tests/unit/apps/targeting/test_xlsx_export_targeting_service.py b/tests/unit/apps/targeting/test_xlsx_export_targeting_service.py index 39602c3ea7..8732e40405 100644 --- a/tests/unit/apps/targeting/test_xlsx_export_targeting_service.py +++ b/tests/unit/apps/targeting/test_xlsx_export_targeting_service.py @@ -1,7 +1,13 @@ +from hct_mis_api.apps.account.fixtures import UserFactory from hct_mis_api.apps.core.base_test_case import APITestCase from hct_mis_api.apps.core.fixtures import create_afghanistan -from hct_mis_api.apps.targeting.fixtures import TargetPopulationFactory -from hct_mis_api.apps.targeting.models import TargetPopulation +from hct_mis_api.apps.household.fixtures import HouseholdFactory, IndividualFactory +from hct_mis_api.apps.payment.fixtures import PaymentFactory, PaymentPlanFactory +from hct_mis_api.apps.payment.models import PaymentPlan +from hct_mis_api.apps.targeting.fixtures import ( + TargetingCriteriaFactory, + TargetingCriteriaRuleFactory, +) from hct_mis_api.apps.targeting.services.xlsx_export_targeting_service import ( XlsxExportTargetingService, ) @@ -12,12 +18,15 @@ class TestXlsxExportTargetingService(APITestCase): def setUpTestData(cls) -> None: super().setUpTestData() cls.business_area = create_afghanistan() - cls.target_population = TargetPopulationFactory( - business_area=cls.business_area, status=TargetPopulation.STATUS_OPEN + cls.user = UserFactory() + cls.payment_plan = PaymentPlanFactory( + business_area=cls.business_area, + status=PaymentPlan.Status.TP_OPEN, + created_by=cls.user, ) def test_add_version(self) -> None: - service = XlsxExportTargetingService(self.target_population) + service = XlsxExportTargetingService(self.payment_plan) service._create_workbook() service._add_version() self.assertEqual( @@ -30,8 +39,44 @@ def test_add_version(self) -> None: ) def test_add_standard_columns_headers(self) -> None: - service = XlsxExportTargetingService(self.target_population) + service = XlsxExportTargetingService(self.payment_plan) service._create_workbook() service._add_standard_columns_headers() headers = [cell.value for cell in service.ws_individuals[1]] self.assertEqual(headers, ["Household unicef_id", "unicef_id", "Linked Households", "Bank account information"]) + + def test_export_service_households_property(self) -> None: + program = self.payment_plan.program_cycle.program + hh1 = HouseholdFactory( + business_area=self.business_area, program=program, head_of_household=IndividualFactory(household=None) + ) + hh2 = HouseholdFactory( + business_area=self.business_area, program=program, head_of_household=IndividualFactory(household=None) + ) + p1 = PaymentFactory( + parent=self.payment_plan, + vulnerability_score=11, + household=hh1, + ) + p2 = PaymentFactory( + parent=self.payment_plan, + vulnerability_score=99, + household=hh2, + ) + targeting_criteria = TargetingCriteriaFactory() + TargetingCriteriaRuleFactory( + targeting_criteria=targeting_criteria, household_ids=f"{p1.household.unicef_id}, {p2.household.unicef_id}" + ) + self.payment_plan.targeting_criteria = targeting_criteria + self.payment_plan.save() + service = XlsxExportTargetingService(self.payment_plan) + self.assertEqual(len(service.households), 2) + + self.payment_plan.status = PaymentPlan.Status.LOCKED + self.payment_plan.vulnerability_score_min = 10 + self.payment_plan.vulnerability_score_max = 12 + self.payment_plan.save() + + service = XlsxExportTargetingService(self.payment_plan) + self.assertEqual(len(service.households), 1) + self.assertEqual(service.households.first().unicef_id, p1.household.unicef_id)