Skip to content

Commit

Permalink
Adjust PaymentPlan model to contain informations coming from TP and HS (
Browse files Browse the repository at this point in the history
#4372)

* init

* add tp list rest

* init changes

* add TP_MIGRATION_MAPPING

* modify create target population add collector group

* style 🎯

* add collector filters blocks

* upd few more fields and properties

* move full_rebuild & refactoring

* add collector rule groups

* add CheckConstraint & migrations

* update validation & migrations

* upd tests

* upd migrations

* fe cleanup & add more ut 🌟

* coverage 💯

* init script

* upd

* script optimization

* refactor: create/upd mutation

* add updated_tc_rules

* refactor mutations

* refactor mutations

* upd migrations

* more fixes

* migrations // fix initdemo

* migration

* add more statuses transitions

* fixes

* fixes // upd unit tests

* more refactoring and upd unit tests

* unit tests // fixes

* conflicts & remove unused TPnode

* migrations conflict

* migration

* add TODOs & skip

* add more tests // fixes

* remove unused code

* fixes // add more tests

* upd snapshot

* more tests

* more tests

* add more 💯 🌟

* upd migration script

* change mutations part 1

* add more test & refactoring migration script

* add test_migrate_tp_into_pp

* more adjustments

* upd tests & fix .delete()

* remove imports

* upd test

* delete, copy

* accountability

* add filters isTargetPopulation & isPaymentPlan

* more changes

* generate schema

* add migrate_message_and_survey

* fix update targeting_criteria

* upd filter

* migration script upd

* more changes

* more

* add more unit tests ⭐

* fix migration script & upd unit tests 🌟

* next part

* more

* more changes

* upd filters

* add total_households_count_with_valid_phone_no

* upd filter

* fix

* another part

* add noStatus filter

* statusNot

* add GraphQLError when no ba header for allPrograms query

* frontend compiles

* fixes

* fix payments lists TP

* fix pp list

* lint

* fix snapshots

* minor fixes

* fix buttons and status

* fix pp queries

* fix generated

* fix schema

* fix e2e fixtures

* upd statuses

* fixes 🌟

* unit tests ⭐

* unit tests & coverage 🌟

* fix e2e

* fix e2e

* fix labels + lock unlock

* id undefined

* fix mutation

* bring back verify manual

* bug fixes

* targeting hh fix

* upd fe test

* fix fe fixtures

* fix more e2e

* again fix more e2e

* fix e2e

* schema

* upd filtering

* test with e2e

* test with test_edit_targeting

* add xfail

* small fixes

* update snapshots

* fixes

* upd test

* add open pp mutation

* fix upd currency ⭐

* review

* migration

* ba fixtures

* fe schema upd

* remove isPaymentPlanApplicable and Draft status

* clean up

* upd filters

* fix status

* change steficon mutation

* steficon pp

* upd mutations

* upd schema

* fixes for SetSteficonRuleOnPaymentPlanPaymentListMutation

* fe lint

* remove none option in vulnerability component

* fix ut

* fe fixes

* more fixes

* upd query 🌟

* review

* one more fix

* revert filtering back

---------

Co-authored-by: Maciej Szewczyk <[email protected]>
Co-authored-by: Maciej Szewczyk <[email protected]>
Co-authored-by: marekbiczysko <[email protected]>
  • Loading branch information
4 people authored Jan 13, 2025
1 parent 9c6454c commit 952f776
Show file tree
Hide file tree
Showing 269 changed files with 8,203 additions and 14,235 deletions.
287 changes: 75 additions & 212 deletions src/frontend/data/schema.graphql

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const fakeApolloAllCommunicationMessages = [
targetPopulation: '',
createdBy: '',
first: 10,
paymentPlan: '',
orderBy: '-created_at',
},
},
Expand All @@ -27,14 +28,12 @@ export const fakeApolloAllCommunicationMessages = [
{
cursor: 'YXJyYXljb25uZWN0aW9uOjA=',
node: {
id:
'Q29tbXVuaWNhdGlvbk1lc3NhZ2VOb2RlOjExMDZmNThmLTJkZDMtNDQ5OC1hZjNkLTI2YzNhNDc2ZjkwZg==',
id: 'Q29tbXVuaWNhdGlvbk1lc3NhZ2VOb2RlOjExMDZmNThmLTJkZDMtNDQ5OC1hZjNkLTI2YzNhNDc2ZjkwZg==',
unicefId: 'MSG-23-0005',
title: 'jij',
numberOfRecipients: 1,
createdBy: {
id:
'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2',
id: 'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2',
firstName: 'Root',
lastName: 'Rootkowski',
email: '[email protected]',
Expand All @@ -48,14 +47,12 @@ export const fakeApolloAllCommunicationMessages = [
{
cursor: 'YXJyYXljb25uZWN0aW9uOjE=',
node: {
id:
'Q29tbXVuaWNhdGlvbk1lc3NhZ2VOb2RlOjExNzVmMzMwLTM2Y2MtNDM5NC04MjAyLWU4NjY3ZTI5ZTc4MA==',
id: 'Q29tbXVuaWNhdGlvbk1lc3NhZ2VOb2RlOjExNzVmMzMwLTM2Y2MtNDM5NC04MjAyLWU4NjY3ZTI5ZTc4MA==',
unicefId: 'MSG-22-0002',
title: 'You got credit of USD 200',
numberOfRecipients: 2,
createdBy: {
id:
'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2',
id: 'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2',
firstName: 'Root',
lastName: 'Rootkowski',
email: '[email protected]',
Expand All @@ -69,14 +66,12 @@ export const fakeApolloAllCommunicationMessages = [
{
cursor: 'YXJyYXljb25uZWN0aW9uOjI=',
node: {
id:
'Q29tbXVuaWNhdGlvbk1lc3NhZ2VOb2RlOjc1OGJiMjg0LTJjZjAtNGZjYy1hY2YyLTY5NDdlZDhkZGNlNg==',
id: 'Q29tbXVuaWNhdGlvbk1lc3NhZ2VOb2RlOjc1OGJiMjg0LTJjZjAtNGZjYy1hY2YyLTY5NDdlZDhkZGNlNg==',
unicefId: 'MSG-22-0004',
title: 'We hold your back!',
numberOfRecipients: 2,
createdBy: {
id:
'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2',
id: 'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2',
firstName: 'Root',
lastName: 'Rootkowski',
email: '[email protected]',
Expand All @@ -90,14 +85,12 @@ export const fakeApolloAllCommunicationMessages = [
{
cursor: 'YXJyYXljb25uZWN0aW9uOjM=',
node: {
id:
'Q29tbXVuaWNhdGlvbk1lc3NhZ2VOb2RlOjQxYjllNTE0LWI1NmMtNDY1OS1hYmFhLWE5ZWYwNzVlOThlMQ==',
id: 'Q29tbXVuaWNhdGlvbk1lc3NhZ2VOb2RlOjQxYjllNTE0LWI1NmMtNDY1OS1hYmFhLWE5ZWYwNzVlOThlMQ==',
unicefId: 'MSG-22-0003',
title: 'Hello There!',
numberOfRecipients: 2,
createdBy: {
id:
'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2',
id: 'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2',
firstName: 'Root',
lastName: 'Rootkowski',
email: '[email protected]',
Expand All @@ -111,14 +104,12 @@ export const fakeApolloAllCommunicationMessages = [
{
cursor: 'YXJyYXljb25uZWN0aW9uOjQ=',
node: {
id:
'Q29tbXVuaWNhdGlvbk1lc3NhZ2VOb2RlOjBkMDQ3NDg0LTUzODAtNGJmMi1hOTViLWM4NjVmNWUzYmM4OQ==',
id: 'Q29tbXVuaWNhdGlvbk1lc3NhZ2VOb2RlOjBkMDQ3NDg0LTUzODAtNGJmMi1hOTViLWM4NjVmNWUzYmM4OQ==',
unicefId: 'MSG-22-0001',
title: 'Hello World!',
numberOfRecipients: 2,
createdBy: {
id:
'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2',
id: 'VXNlck5vZGU6NDE5NmMyYzUtYzJkZC00OGQyLTg4N2YtM2E5ZDM5ZTc4OTE2',
firstName: 'Root',
lastName: 'Rootkowski',
email: '[email protected]',
Expand Down
8 changes: 3 additions & 5 deletions src/frontend/fixtures/paymentmodule/fakeApolloPaymentPlan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
PaymentVerificationPlanSampling,
PaymentVerificationPlanStatus,
PaymentVerificationPlanVerificationChannel,
ProgramStatus,
} from '../../src/__generated__/graphql';

export const fakeApolloPaymentPlan: PaymentPlanQuery['paymentPlan'] = {
Expand Down Expand Up @@ -39,13 +40,9 @@ export const fakeApolloPaymentPlan: PaymentPlanQuery['paymentPlan'] = {
program: {
id: 'UHJvZ3JhbU5vZGU6NWJhMjEzY2UtNmNlOS00NTc4LThhNDgtYjFmMDgyM2Q2MDAy',
name: 'Already attention fear well hit instead person.',
status: ProgramStatus.Active,
__typename: 'ProgramNode',
},
targetPopulation: {
id: 'VGFyZ2V0UG9wdWxhdGlvbk5vZGU6MzlmMjQ0YzEtZGRiMC00ZGZmLWE0MzEtN2JiMDFhMTdiMThm',
name: 'Report should property early adult.',
__typename: 'TargetPopulationNode',
},
currency: 'PLN',
currencyName: 'Polish złoty',
startDate: '2020-10-27',
Expand Down Expand Up @@ -302,6 +299,7 @@ export const fakeApolloPaymentPlan: PaymentPlanQuery['paymentPlan'] = {
__typename: 'ReconciliationSummaryNode',
},
__typename: 'PaymentPlanNode',
excludedIds: '',
};

export const fakeApolloPaymentPlanWithWrongBackgroundActionStatus: PaymentPlanQuery['paymentPlan'] =
Expand Down
4 changes: 3 additions & 1 deletion src/frontend/fixtures/programs/fakeApolloAllPrograms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ export const fakeApolloAllPrograms = [
startDate: '2020-01-20',
endDate: '2020-08-19',
status: 'ACTIVE',
caId: '123-21-PRG-00001',
internalData: {
caId: '123-21-PRG-00001',
},
description:
'Purpose she occur lose new wish day per little because east like bill.',
budget: '691946197.49',
Expand Down
Loading

0 comments on commit 952f776

Please sign in to comment.