Skip to content

Commit 3408b16

Browse files
pavlo-mkMaciej Szewczykmmaciekk
authored
REST Target Population > Payment Plan > Payment Verification [All in one XD] (#4698)
* add new serializers * WIP: add new fields * WIP: add new fields part 2 * WIP: fixes & upd filters * add test list pp * add more utests * add more tests & filters * add cache * upd * add TP list details * fix cache pp/tp list * add payments, hhs list * test with lookup_field * add more tests * more tests * PaymentPlanDetail instead of PaymentPlanQuery, is_follow_up instead of isFollowUp * more updates ufter changing to Payment Plan hook * more changes * add ApprovalProcessSerializer * add more fields * tests * tests * add more fields * add more fields & tests * more changes * tests and more serializers * more fields * add eligible_payments_count * eligible_payments_count frontend * fixes & tests & add program small * Update serializers.py * upd FollowUpPaymentPlanSerializer * add program_cycle_id * more changes * add new ser * generated * tp list + details query * WIP // REST TP/PP CRUD (#4729) * post, patch, delete * black * add more actions * add unit tests * coverage * fix utests * fix utests * fix tests ⭐ * add more tests * add tests 🌟 * remove tp snapshots * add currency_choices * add apply_engine_formula * add test apply_engine_formula * add open pp * WIP: PP lock/unlock, delete, exclude_hh * WIP: PP apply entitlement formula, FSP lock/unlock * WIP: entitlement_export_xlsx * conflicts * fix * add entitlement_import_xlsx * generate-rest-api-types-camelcase * generate-rest-api-types-camelcase * rm payment 0024 ?<>? * generate types * add more api endpoints * tests & fixes * next part fixes * more changes * more changes * new fields * add types everywhere (useQuery) * fixes * fixes & add more tests * more fixes * fixes * rewrite create pp and create follow up pp mutations * create PP add id * review & cache & tests * fix unit tests * use normal id instead of base64 * fix tests base64 ids * add id * read_only * read_only * more changes * more actions PP * fix approval process * WIP // Rest Payment Verification (#4749) * add PaymentVerification list * upd * fix PaymentVerificationListSerializer * small fixes * more mutations * new serializers * add Payment mark as failed and revert * add TestPaymentViewSet * add test * upd * mark as failed forced failed * update rest * upd serializers * upd serializers PV * upd Pv details * next changes * payment id instead of id * more changes * merge rest/payment-plan to this branch * create pvp * conflicts * fe types + migrations * fix unit tests * fix unit tests * fix unit tests * upd fields * add program_id * add more fields * more fixes * remaining admin models changes rest gen. * more changes * add more action PVP * fixes + leave comments TODOs * upd serializers fields * test upd * fix * add fields * add mutations * fix build * mypy 🌟 * test 💯 * fix build (remove console error) * remove program id from profile query? * add more tests * add more tests * tables * tables tables tables * more unit tests * one more table * upd * look up individuals * add pagination * add hh/payments * add pagination to schema * fix tests * add new fields * tables fixes * more new fields * more fixes * more fixes * add program/payments * refactor and add PaymentVerificationRecordViewSet * fixes build * payment_list add program_name * upd tests & fixes * revert fe * fix test * apparent issues * fix finish cycle * fix camelize * review & clean up * fixes * add available_fsps_for_delivery_mechanisms * fixes and add cycles count * fixes & clean up * more fixes * tests clean up * more fixes * skip failing old tests * upd test & add choices urls * skip snapshot test * unit test * fix queryvariables * fix filter empty values * upd program filter * fix TP list * upd * fix api * rm old json * 500!!! * allow black create TP * fix create TP * fix display tp * null for delivery_mechanism_code * fix empty params * remove initial api calls * status choices for filters * filters (choices pv pp) * unit test * unit test * unit test * unit test * fix unit test --------- Co-authored-by: Maciej Szewczyk <[email protected]> Co-authored-by: Maciej Szewczyk <[email protected]>
1 parent 0d935a3 commit 3408b16

File tree

505 files changed

+20762
-21364
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

505 files changed

+20762
-21364
lines changed

src/frontend/generated/models/Household.ts

Lines changed: 89 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -14,94 +14,93 @@ import type { RdiMergeStatusEnum } from './RdiMergeStatusEnum';
1414
import type { RegistrationMethodEnum } from './RegistrationMethodEnum';
1515
import type { ResidenceStatusEnum } from './ResidenceStatusEnum';
1616
export type Household = {
17-
first_registration_date?: string;
18-
last_registration_date?: string;
19-
members: Array<Individual>;
20-
country: CountryEnum;
21-
country_origin?: CountryOriginEnum;
22-
size?: number | null;
23-
rdi_merge_status?: RdiMergeStatusEnum;
24-
is_original?: boolean;
25-
readonly created_at: string;
26-
readonly updated_at: string;
27-
is_removed?: boolean;
28-
removed_date?: string | null;
29-
last_sync_at?: string | null;
30-
internal_data?: any;
31-
withdrawn?: boolean;
32-
withdrawn_date?: string | null;
33-
consent_sign?: string;
34-
consent?: boolean | null;
35-
consent_sharing?: (ConsentSharingEnum | BlankEnum);
36-
residence_status?: (ResidenceStatusEnum | BlankEnum);
37-
address?: string;
38-
zip_code?: string | null;
39-
female_age_group_0_5_count?: number | null;
40-
female_age_group_6_11_count?: number | null;
41-
female_age_group_12_17_count?: number | null;
42-
female_age_group_18_59_count?: number | null;
43-
female_age_group_60_count?: number | null;
44-
pregnant_count?: number | null;
45-
male_age_group_0_5_count?: number | null;
46-
male_age_group_6_11_count?: number | null;
47-
male_age_group_12_17_count?: number | null;
48-
male_age_group_18_59_count?: number | null;
49-
male_age_group_60_count?: number | null;
50-
female_age_group_0_5_disabled_count?: number | null;
51-
female_age_group_6_11_disabled_count?: number | null;
52-
female_age_group_12_17_disabled_count?: number | null;
53-
female_age_group_18_59_disabled_count?: number | null;
54-
female_age_group_60_disabled_count?: number | null;
55-
male_age_group_0_5_disabled_count?: number | null;
56-
male_age_group_6_11_disabled_count?: number | null;
57-
male_age_group_12_17_disabled_count?: number | null;
58-
male_age_group_18_59_disabled_count?: number | null;
59-
male_age_group_60_disabled_count?: number | null;
60-
children_count?: number | null;
61-
male_children_count?: number | null;
62-
female_children_count?: number | null;
63-
children_disabled_count?: number | null;
64-
male_children_disabled_count?: number | null;
65-
female_children_disabled_count?: number | null;
66-
returnee?: boolean | null;
67-
flex_fields?: any;
68-
fchild_hoh?: boolean | null;
69-
child_hoh?: boolean | null;
70-
start?: string | null;
71-
deviceid?: string;
72-
name_enumerator?: string;
73-
org_enumerator?: (OrgEnumeratorEnum | BlankEnum);
74-
org_name_enumerator?: string;
75-
village?: string;
76-
registration_method?: (RegistrationMethodEnum | BlankEnum);
77-
currency?: (CurrencyEnum | BlankEnum);
78-
unhcr_id?: string;
79-
registration_id?: string | null;
80-
program_registration_id?: string | null;
81-
total_cash_received_usd?: string | null;
82-
total_cash_received?: string | null;
83-
family_id?: string | null;
84-
origin_unicef_id?: string | null;
85-
collect_type?: CollectTypeEnum;
86-
enumerator_rec_id?: number | null;
87-
flex_registrations_record_id?: number | null;
88-
household_collection?: number | null;
89-
admin_area?: string | null;
90-
admin1?: string | null;
91-
admin2?: string | null;
92-
admin3?: string | null;
93-
admin4?: string | null;
94-
storage_obj?: number | null;
95-
/**
96-
* If this household was copied from another household, this field will contain the household it was copied from.
97-
*/
98-
copied_from?: string | null;
99-
/**
100-
* This is only used to track collector (primary or secondary) of a household.
101-
* They may still be a HOH of this household or any other household.
102-
* Through model will contain the role (ROLE_CHOICE) they are connected with on.
103-
*/
104-
readonly representatives: Array<string>;
105-
programs?: Array<string>;
17+
first_registration_date?: string;
18+
last_registration_date?: string;
19+
members: Array<Individual>;
20+
country: CountryEnum;
21+
country_origin?: CountryOriginEnum;
22+
size?: number | null;
23+
rdi_merge_status?: RdiMergeStatusEnum;
24+
is_original?: boolean;
25+
readonly created_at: string;
26+
readonly updated_at: string;
27+
is_removed?: boolean;
28+
removed_date?: string | null;
29+
last_sync_at?: string | null;
30+
internal_data?: any;
31+
withdrawn?: boolean;
32+
withdrawn_date?: string | null;
33+
consent_sign?: string;
34+
consent?: boolean | null;
35+
consent_sharing?: ConsentSharingEnum | BlankEnum;
36+
residence_status?: ResidenceStatusEnum | BlankEnum;
37+
address?: string;
38+
zip_code?: string | null;
39+
female_age_group_0_5_count?: number | null;
40+
female_age_group_6_11_count?: number | null;
41+
female_age_group_12_17_count?: number | null;
42+
female_age_group_18_59_count?: number | null;
43+
female_age_group_60_count?: number | null;
44+
pregnant_count?: number | null;
45+
male_age_group_0_5_count?: number | null;
46+
male_age_group_6_11_count?: number | null;
47+
male_age_group_12_17_count?: number | null;
48+
male_age_group_18_59_count?: number | null;
49+
male_age_group_60_count?: number | null;
50+
female_age_group_0_5_disabled_count?: number | null;
51+
female_age_group_6_11_disabled_count?: number | null;
52+
female_age_group_12_17_disabled_count?: number | null;
53+
female_age_group_18_59_disabled_count?: number | null;
54+
female_age_group_60_disabled_count?: number | null;
55+
male_age_group_0_5_disabled_count?: number | null;
56+
male_age_group_6_11_disabled_count?: number | null;
57+
male_age_group_12_17_disabled_count?: number | null;
58+
male_age_group_18_59_disabled_count?: number | null;
59+
male_age_group_60_disabled_count?: number | null;
60+
children_count?: number | null;
61+
maleChildrenCount?: number | null;
62+
femaleChildrenCount?: number | null;
63+
children_disabled_count?: number | null;
64+
male_children_disabled_count?: number | null;
65+
female_children_disabled_count?: number | null;
66+
returnee?: boolean | null;
67+
flex_fields?: any;
68+
fchild_hoh?: boolean | null;
69+
child_hoh?: boolean | null;
70+
start?: string | null;
71+
deviceid?: string;
72+
name_enumerator?: string;
73+
org_enumerator?: OrgEnumeratorEnum | BlankEnum;
74+
org_name_enumerator?: string;
75+
village?: string;
76+
registration_method?: RegistrationMethodEnum | BlankEnum;
77+
currency?: CurrencyEnum | BlankEnum;
78+
unhcr_id?: string;
79+
registration_id?: string | null;
80+
program_registration_id?: string | null;
81+
total_cash_received_usd?: string | null;
82+
total_cash_received?: string | null;
83+
family_id?: string | null;
84+
origin_unicef_id?: string | null;
85+
collect_type?: CollectTypeEnum;
86+
enumerator_rec_id?: number | null;
87+
flex_registrations_record_id?: number | null;
88+
household_collection?: number | null;
89+
admin_area?: string | null;
90+
admin1?: string | null;
91+
admin2?: string | null;
92+
admin3?: string | null;
93+
admin4?: string | null;
94+
storage_obj?: number | null;
95+
/**
96+
* If this household was copied from another household, this field will contain the household it was copied from.
97+
*/
98+
copied_from?: string | null;
99+
/**
100+
* This is only used to track collector (primary or secondary) of a household.
101+
* They may still be a HOH of this household or any other household.
102+
* Through model will contain the role (ROLE_CHOICE) they are connected with on.
103+
*/
104+
readonly representatives: Array<string>;
105+
programs?: Array<string>;
106106
};
107-

src/frontend/src/api/targetPopulationApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
import { PaginatedPaymentPlanListList } from '@restgenerated/models/PaginatedPaymentPlanListList';
12
import { api, handleApiResponse } from './api';
2-
import { TargetPopulationList } from '@restgenerated/models/TargetPopulationList';
33

44
export const fetchTargetPopulations = async (
55
businessAreaSlug: string,
66
programId: string,
77
params = {},
8-
): Promise<TargetPopulationList> => {
8+
): Promise<PaginatedPaymentPlanListList> => {
99
return handleApiResponse(
1010
api.get(
1111
`${businessAreaSlug}/programs/${programId}/targeting/target-populations/`,

src/frontend/src/apollo/queries/paymentmodule/AllPaymentPlansForTable.ts

Lines changed: 0 additions & 118 deletions
This file was deleted.

0 commit comments

Comments
 (0)