Skip to content

Commit

Permalink
2215787_drop_cash_assist_part_2 (#4521)
Browse files Browse the repository at this point in the history
* 2215787_drop_cash_assist_part_2

* fixture fix

* ut

* ut

* ut

* fix schnappy

* migration fix

* ut

* ut

* upd unit tests 🌟

* upd object_id_filter ⭐

* fix generate_report_service 💯

* fix filters & update tests 💯 ⭐

* upd migrations

* upd migrations

---------

Co-authored-by: marekbiczysko <[email protected]>
Co-authored-by: Maciej Szewczyk <[email protected]>
Co-authored-by: pavlo-mk <[email protected]>
  • Loading branch information
4 people authored Dec 17, 2024
1 parent 6af1548 commit cccdcf0
Show file tree
Hide file tree
Showing 51 changed files with 802 additions and 2,012 deletions.
46 changes: 16 additions & 30 deletions src/frontend/data/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -533,11 +533,6 @@ type ContentTypeObjectType {
id: ID!
appLabel: String!
model: String!
paymentverificationplanSet(offset: Int, before: String, after: String, first: Int, last: Int): PaymentVerificationPlanNodeConnection!
paymentverificationSet(offset: Int, before: String, after: String, first: Int, last: Int): PaymentVerificationNodeConnection!
paymentverificationsummarySet(offset: Int, before: String, after: String, first: Int, last: Int): PaymentVerificationSummaryNodeConnection!
ticketcomplaintdetailsSet(offset: Int, before: String, after: String, first: Int, last: Int): TicketComplaintDetailsNodeConnection!
ticketsensitivedetailsSet(offset: Int, before: String, after: String, first: Int, last: Int): TicketSensitiveDetailsNodeConnection!
logEntries(offset: Int, before: String, after: String, first: Int, last: Int): PaymentVerificationLogEntryNodeConnection!
name: String
}
Expand Down Expand Up @@ -1286,6 +1281,7 @@ type FinancialServiceProviderXlsxTemplateNode implements Node {
columns: [String]
coreFields: [String!]!
flexFields: [String!]!
documentTypes: [String!]!
financialServiceProviders(offset: Int, before: String, after: String, first: Int, last: Int): FinancialServiceProviderNodeConnection!
}

Expand Down Expand Up @@ -2143,6 +2139,18 @@ input IndividualUpdateDataObjectType {
deliveryMechanismData: [DeliveryMechanismDataObjectType]
deliveryMechanismDataToEdit: [EditDeliveryMechanismDataObjectType]
deliveryMechanismDataToRemove: [ID]
consent: Boolean
residenceStatus: String
countryOrigin: String
country: String
address: String
village: String
currency: String
unhcrId: String
nameEnumerator: String
orgEnumerator: String
orgNameEnumerator: String
registrationMethod: String
}

type InvalidPaymentVerificationPlan {
Expand Down Expand Up @@ -2529,8 +2537,8 @@ type PaymentNode implements Node {
followUps(offset: Int, before: String, after: String, first: Int, last: Int): PaymentNodeConnection!
householdSnapshot: PaymentHouseholdSnapshotNode
paymentVerification: PaymentVerificationNode
ticketComplaintDetails: TicketComplaintDetailsNode
ticketSensitiveDetails: TicketSensitiveDetailsNode
ticketComplaintDetails(offset: Int, before: String, after: String, first: Int, last: Int): TicketComplaintDetailsNodeConnection!
ticketSensitiveDetails(offset: Int, before: String, after: String, first: Int, last: Int): TicketSensitiveDetailsNodeConnection!
adminUrl: String
paymentPlanHardConflicted: Boolean
paymentPlanHardConflictedData: [PaymentConflictDataNode]
Expand Down Expand Up @@ -2762,8 +2770,6 @@ type PaymentVerificationNode implements Node {
updatedAt: DateTime!
version: BigInt!
paymentVerificationPlan: PaymentVerificationPlanNode!
paymentContentType: ContentTypeObjectType
paymentObjectId: UUID
payment: GenericPaymentNode
status: PaymentVerificationStatus!
statusDate: DateTime
Expand Down Expand Up @@ -2794,8 +2800,6 @@ type PaymentVerificationPlanNode implements Node {
version: BigInt!
unicefId: String
status: PaymentVerificationPlanStatus!
paymentPlanContentType: ContentTypeObjectType
paymentPlanObjectId: UUID
paymentPlan: PaymentPlanNode
sampling: PaymentVerificationPlanSampling!
verificationChannel: PaymentVerificationPlanVerificationChannel!
Expand Down Expand Up @@ -2875,20 +2879,6 @@ type PaymentVerificationSummaryNode implements Node {
activationDate: DateTime
completionDate: DateTime
paymentPlan: PaymentPlanNode
paymentPlanContentType: ContentTypeObjectType
paymentPlanObjectId: UUID
}

type PaymentVerificationSummaryNodeConnection {
pageInfo: PageInfo!
edges: [PaymentVerificationSummaryNodeEdge]!
totalCount: Int
edgeCount: Int
}

type PaymentVerificationSummaryNodeEdge {
node: PaymentVerificationSummaryNode
cursor: String!
}

enum PaymentVerificationSummaryStatus {
Expand Down Expand Up @@ -3149,7 +3139,7 @@ type Query {
paymentVerificationStatusChoices: [ChoiceObject]
allRapidProFlows(businessAreaSlug: String!): [RapidProFlow]
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, objectType: String): PaymentVerificationLogEntryNodeConnection
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], totalEntitledQuantityFrom: Float, totalEntitledQuantityTo: Float, dispersionStartDate: Date, dispersionEndDate: Date, isFollowUp: Boolean, sourcePaymentPlanId: String, program: String, programCycle: String, orderBy: String): PaymentPlanNodeConnection
paymentPlanStatusChoices: [ChoiceObject]
Expand Down Expand Up @@ -4141,8 +4131,6 @@ type TicketComplaintDetailsNode implements Node {
id: ID!
createdAt: DateTime!
updatedAt: DateTime!
paymentContentType: ContentTypeObjectType
paymentObjectId: UUID
household: HouseholdNode
individual: IndividualNode
payment: PaymentNode
Expand Down Expand Up @@ -4414,8 +4402,6 @@ type TicketSensitiveDetailsNode implements Node {
id: ID!
createdAt: DateTime!
updatedAt: DateTime!
paymentContentType: ContentTypeObjectType
paymentObjectId: UUID
household: HouseholdNode
individual: IndividualNode
payment: PaymentNode
Expand Down
Original file line number Diff line number Diff line change
@@ -1,50 +1,243 @@
import { GrievanceTicketNode } from '../../src/__generated__/graphql';

export const fakeGrievanceTicketPaymentVerification = {
id:
'R3JpZXZhbmNlVGlja2V0Tm9kZTo3ZTY1N2JiZC1hNzM4LTQ0MTktYjlmOS04YTIyOWI2MGUwNzU=',
unicefId: 'GRV-000004',
status: 5,
category: 1,
id: 'R3JpZXZhbmNlVGlja2V0Tm9kZTo2Zjc5M2RhZi1jZDRlLTRiYTMtYjg0OS0wYTljODg0ZWNhNTY=',
unicefId: 'GRV-0000002',
status: 1,
category: 4,
consent: true,
createdBy: null,
createdAt: '2022-04-08T09:22:18.806856',
updatedAt: '2022-04-11T09:14:45.395754',
description: '',
partner: null,
targetId: 'HH-23-0000.0003',
businessArea: {
postponeDeduplication: false,
__typename: 'UserBusinessAreaNode',
},
createdBy: {
id: 'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2',
firstName: 'Root',
lastName: 'Rootkowski',
email: '[email protected]',
__typename: 'UserNode',
},
createdAt: '2024-12-11T21:09:18.393442+00:00',
updatedAt: '2024-12-11T21:09:18.393452+00:00',
description: 'feijifjief',
language: '',
admin: null,
admin2: null,
area: '',
assignedTo: null,
adminUrl:
'/api/unicorn/grievance/grievanceticket/6f793daf-cd4e-4ba3-b849-0a9c884eca56/change/',
individual: null,
household: null,
paymentRecord: null,
household: {
id: 'SG91c2Vob2xkTm9kZTphYTAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDE=',
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: '',
maleChildrenCount: null,
femaleChildrenCount: null,
childrenDisabledCount: null,
size: 4,
totalCashReceived: null,
totalCashReceivedUsd: null,
currency: '',
firstRegistrationDate: '2023-12-10T20:40:33.544366+00:00',
lastRegistrationDate: '2024-12-09T20:40:33.544366+00:00',
sanctionListPossibleMatch: false,
sanctionListConfirmedMatch: false,
hasDuplicates: false,
unicefId: 'HH-23-0000.0003',
flexFields: {},
unhcrId: '',
geopoint: null,
village: '',
adminAreaTitle: '',
admin1: null,
admin2: null,
admin3: null,
admin4: null,
headOfHousehold: {
id: 'SW5kaXZpZHVhbE5vZGU6Y2MwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAx',
fullName: 'Jan Kowalski',
givenName: '',
familyName: '',
__typename: 'IndividualNode',
},
address: 'Ohio',
individuals: {
totalCount: 1,
__typename: 'IndividualNodeConnection',
edges: [
{
node: {
id: 'SW5kaXZpZHVhbE5vZGU6Y2MwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAx',
age: 29,
lastRegistrationDate: '2024-12-09',
rdiMergeStatus: 'PENDING',
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',
sex: 'MALE',
unicefId: 'IND-23-0000.0008',
birthDate: '1994-12-17',
maritalStatus: 'A_',
phoneNo: '',
phoneNoValid: false,
email: '',
sanctionListPossibleMatch: false,
sanctionListConfirmedMatch: false,
deduplicationGoldenRecordStatus: 'UNIQUE',
sanctionListLastCheck: null,
role: 'PRIMARY',
relationship: null,
status: 'ACTIVE',
documents: {
edges: [],
__typename: 'DocumentNodeConnection',
},
identities: {
edges: [],
__typename: 'IndividualIdentityNodeConnection',
},
household: {
id: 'SG91c2Vob2xkTm9kZTphYTAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDE=',
unicefId: 'HH-23-0000.0003',
status: 'ACTIVE',
importId: 'HH-23-0000.0003',
admin1: null,
admin2: null,
admin3: null,
admin4: null,
programs: {
edges: [],
__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: '',
__typename: 'HouseholdNode',
},
__typename: 'IndividualNode',
},
__typename: 'IndividualNodeEdge',
},
],
},
programs: {
edges: [],
__typename: 'ProgramNodeConnection',
},
__typename: 'HouseholdNode',
activeIndividualsCount: 1,
countryOrigin: '',
country: '',
zipCode: null,
femaleAgeGroup05Count: null,
femaleAgeGroup611Count: null,
femaleAgeGroup1217Count: null,
femaleAgeGroup1859Count: null,
femaleAgeGroup60Count: null,
pregnantCount: null,
maleAgeGroup05Count: null,
maleAgeGroup611Count: null,
maleAgeGroup1217Count: null,
maleAgeGroup1859Count: null,
maleAgeGroup60Count: null,
femaleAgeGroup05DisabledCount: null,
femaleAgeGroup611DisabledCount: null,
femaleAgeGroup1217DisabledCount: null,
femaleAgeGroup1859DisabledCount: null,
femaleAgeGroup60DisabledCount: null,
maleAgeGroup05DisabledCount: null,
maleAgeGroup611DisabledCount: null,
maleAgeGroup1217DisabledCount: null,
maleAgeGroup1859DisabledCount: null,
maleAgeGroup60DisabledCount: null,
fchildHoh: null,
childHoh: null,
start: null,
deviceid: '',
orgNameEnumerator: '',
returnee: null,
nameEnumerator: '',
lastSyncAt: null,
consentSharing: [],
orgEnumerator: 'A_',
updatedAt: '2024-12-09T20:40:33.645629+00:00',
consent: null,
collectIndividualData: 'A_',
registrationDataImport: {
name: 'Test Import',
dataSource: 'API',
importDate: '2024-12-09T20:40:33.635509+00:00',
importedBy: {
firstName: 'Andrea',
lastName: 'Brock',
email: '[email protected]',
username: 'AndreaBrock_1733776833579203297528',
__typename: 'UserNode',
},
__typename: 'RegistrationDataImportNode',
},
deliveredQuantities: [
{
totalDeliveredQuantity: '0',
currency: 'USD',
__typename: 'DeliveredQuantityNode',
},
],
programRegistrationId: null,
},
paymentRecord: {
id: 'UGF5bWVudE5vZGU6MTAwMDAwMDAtZmVlZC1iZWVmLTAwMDAtMDAwMDBiYWRmMDBk',
caId: 'RCPT-0060-24-0.000.078',
deliveredQuantity: null,
entitlementQuantity: null,
objType: 'Payment',
parent: {
id: 'UGF5bWVudFBsYW5Ob2RlOjAwMDAwMDAwLWZlZWQtYmVlZi0wMDAwLTAwMDAwYmFkZjAwZA==',
unicefId: 'PP-0060-24-00000023',
objType: 'PaymentPlan',
__typename: 'CashPlanAndPaymentPlanNode',
},
verification: null,
__typename: 'PaymentRecordAndPaymentNode',
},
relatedTickets: [],
linkedTickets: [],
existingTickets: [],
addIndividualTicketDetails: null,
individualDataUpdateTicketDetails: null,
householdDataUpdateTicketDetails: null,
deleteIndividualTicketDetails: null,
deleteHouseholdTicketDetails: null,
systemFlaggingTicketDetails: null,
paymentVerificationTicketDetails: {
id:
'VGlja2V0UGF5bWVudFZlcmlmaWNhdGlvbkRldGFpbHNOb2RlOmQ5NWFlNzA2LWRmNTQtNDYyMi1hODVmLTRiOGExZTg2Y2VhMQ==',
newStatus: null,
newReceivedAmount: 45,
approveStatus: false,
paymentVerificationStatus: 'NOT_RECEIVED',
hasMultiplePaymentVerifications: false,
paymentVerification: {
id:
'UGF5bWVudFZlcmlmaWNhdGlvbk5vZGU6NDhmZjMwODEtNTVhMy00Zjg4LWJjNTgtNTE0YWM0MGI0MzQ2',
receivedAmount: 0,
paymentObjectId: null,
paymentContentType: null,
},
__typename: 'TicketPaymentVerificationDetailsNode',
},
paymentVerificationTicketDetails: null,
needsAdjudicationTicketDetails: null,
issueType: null,
ticketNotes: { edges: [], __typename: 'TicketNoteNodeConnection' },
issueType: 18,
ticketNotes: {
edges: [],
__typename: 'TicketNoteNodeConnection',
},
priority: 0,
urgency: 0,
programs: [
{
name: 'Test Program',
id: 'UHJvZ3JhbU5vZGU6MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtZmFjZWIwMGMwMDAw',
__typename: 'ProgramNode',
},
],
comments: null,
documentation: [],
__typename: 'GrievanceTicketNode',
} as GrievanceTicketNode;
Loading

0 comments on commit cccdcf0

Please sign in to comment.