Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Back merge STG > DEV #4518

Merged
merged 29 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5c0132b
skip unstable
pavlo-mk Dec 3, 2024
9175069
Merge pull request #4502 from unicef/skip-unstable-e2e
johniak Dec 3, 2024
3b1746e
Merge pull request #4503 from unicef/develop
domdinicola Dec 4, 2024
4bc612a
STG // Fix RDI import dmd json field (#4504)
pavlo-mk Dec 4, 2024
4ac5566
remove generateroles from upgrade, update generateroles based on admi…
pkujawa Dec 5, 2024
2328af6
Merge branch 'staging' into permissions-reset-after-upgrade
pkujawa Dec 5, 2024
bc03fd0
Merge pull request #4506 from unicef/permissions-reset-after-upgrade
domdinicola Dec 5, 2024
eb08987
[STG] Payment Plan export xlsx: added FSP template doc types list (#4…
pavlo-mk Dec 6, 2024
78f7caa
Dashboard fix
srugano Dec 9, 2024
093aaaf
215787_drop_cash_assist_migration_script_fix (#4509)
MarekBiczysko Dec 9, 2024
4287227
Merge branch 'staging' into dashboard_fix1
srugano Dec 9, 2024
da78ba7
Merge pull request #4510 from unicef/dashboard_fix1
srugano Dec 9, 2024
be85651
Merge pull request #4512 from unicef/staging
johniak Dec 9, 2024
9d77170
2226242_Payment_verification_page_not_accessible (#4514)
MarekBiczysko Dec 10, 2024
43d0927
rollback generateroles to upgrade, skip updating existing roles
pkujawa Dec 10, 2024
5b15e07
Back merge PROD > STG (#4516)
pavlo-mk Dec 11, 2024
3228cd2
Merge branch 'staging' into generateroles_handle_2
pkujawa Dec 11, 2024
03bf48e
add correct permission for cycles page
Dec 11, 2024
6c66922
Merge pull request #4515 from unicef/generateroles_handle_2
pkujawa Dec 11, 2024
3b1e1cd
fe fix
pavlo-mk Dec 11, 2024
1f9dc4e
just new line
pavlo-mk Dec 11, 2024
f466892
Merge pull request #4520 from unicef/fix-perm-cycles
johniak Dec 12, 2024
ac4bc8f
back merge
pavlo-mk Dec 12, 2024
24b64d6
Merge pull request #4523 from unicef/prod_back_merge
johniak Dec 12, 2024
5b27458
Master into stg (#4534)
pavlo-mk Dec 23, 2024
c32b034
conflicts
pavlo-mk Dec 23, 2024
6883189
Merge branch 'develop' into stg_into_develop
pavlo-mk Dec 23, 2024
92c37ba
fix test & migration
pavlo-mk Dec 23, 2024
369ab67
Merge remote-tracking branch 'origin/stg_into_develop' into stg_into_…
pavlo-mk Dec 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ distribution = true

[project]
name = "hope"
version = "2.15.0"
version = "2.16.0"
description = "HCT MIS is UNICEF's humanitarian cash transfer platform."
authors = [
{ name = "Tivix" },
Expand Down
14 changes: 9 additions & 5 deletions src/frontend/fixtures/paymentmodule/fakeApolloPaymentPlan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export const fakeApolloPaymentPlan: PaymentPlanQuery['paymentPlan'] = {
version: 1000,
unicefId: 'PP-0060-22-00000001',
status: PaymentPlanStatus.Locked,
programCycle: {
id: 'UHJvZ3JhbUN5Y2xlOjljNDMzZWQzLTcwZjUtNDRhOC1iZmQ5LTA1Mjg3YTAwNzQxNQ==',
},
isFollowUp: false,
sourcePaymentPlan: null,
excludedHouseholds: null,
Expand Down Expand Up @@ -43,7 +46,7 @@ export const fakeApolloPaymentPlan: PaymentPlanQuery['paymentPlan'] = {
name: 'Report should property early adult.',
__typename: 'TargetPopulationNode',
},
currency: "PLN",
currency: 'PLN',
currencyName: 'Polish złoty',
startDate: '2020-10-27',
endDate: '2021-09-08',
Expand Down Expand Up @@ -301,7 +304,8 @@ export const fakeApolloPaymentPlan: PaymentPlanQuery['paymentPlan'] = {
__typename: 'PaymentPlanNode',
};

export const fakeApolloPaymentPlanWithWrongBackgroundActionStatus: PaymentPlanQuery['paymentPlan'] = {
...fakeApolloPaymentPlan,
backgroundActionStatus: PaymentPlanBackgroundActionStatus.XlsxExporting,
};
export const fakeApolloPaymentPlanWithWrongBackgroundActionStatus: PaymentPlanQuery['paymentPlan'] =
{
...fakeApolloPaymentPlan,
backgroundActionStatus: PaymentPlanBackgroundActionStatus.XlsxExporting,
};
2 changes: 1 addition & 1 deletion src/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "frontend",
"version": "2.15.0",
"version": "2.16.0",
"private": true,
"type": "module",
"scripts": {
Expand Down
5 changes: 4 additions & 1 deletion src/frontend/src/__generated__/graphql.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/frontend/src/apollo/queries/paymentmodule/PaymentPlan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ export const PAYMENT_PLAN_QUERY = gql`
version
unicefId
status
programCycle {
id
}
canCreateFollowUp
backgroundActionStatus
canCreatePaymentVerificationPlan
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,41 @@ export function GrievancesSidebar({
const shouldShowReassignBoxDataChange = (): boolean => {
let { individual, household } = ticket;
const { category, issueType, status } = ticket;

if (category.toString() === GRIEVANCE_CATEGORIES.NEEDS_ADJUDICATION) {
individual = ticket.needsAdjudicationTicketDetails.selectedIndividual;
household =
ticket.needsAdjudicationTicketDetails.selectedIndividual?.household;
}
const isOneIndividual = household?.activeIndividualsCount === 1;

const isOneIndividual = household?.activeIndividualsCount === 1;
if (isOneIndividual) return false;
const isRightCategory =
(category.toString() === GRIEVANCE_CATEGORIES.DATA_CHANGE &&
issueType.toString() === GRIEVANCE_ISSUE_TYPES.DELETE_INDIVIDUAL) ||
(category.toString() === GRIEVANCE_CATEGORIES.DATA_CHANGE &&
issueType.toString() === GRIEVANCE_ISSUE_TYPES.EDIT_INDIVIDUAL) ||
(category.toString() === GRIEVANCE_CATEGORIES.SYSTEM_FLAGGING &&
ticket?.systemFlaggingTicketDetails?.approveStatus) ||
(category.toString() === GRIEVANCE_CATEGORIES.NEEDS_ADJUDICATION &&
ticket?.needsAdjudicationTicketDetails?.selectedIndividual);

const isRightCategory = [
{
category: GRIEVANCE_CATEGORIES.DATA_CHANGE,
issueType: GRIEVANCE_ISSUE_TYPES.DELETE_INDIVIDUAL,
},
{
category: GRIEVANCE_CATEGORIES.DATA_CHANGE,
issueType: GRIEVANCE_ISSUE_TYPES.EDIT_INDIVIDUAL,
},
{
category: GRIEVANCE_CATEGORIES.SYSTEM_FLAGGING,
approveStatus: ticket?.systemFlaggingTicketDetails?.approveStatus,
},
{
category: GRIEVANCE_CATEGORIES.NEEDS_ADJUDICATION,
selectedIndividual:
ticket?.needsAdjudicationTicketDetails?.selectedIndividual,
},
].some(
(condition) =>
category.toString() === condition.category &&
(issueType.toString() === condition.issueType ||
condition.approveStatus ||
condition.selectedIndividual),
);

if (!isRightCategory) return false;

Expand All @@ -47,23 +65,22 @@ export function GrievancesSidebar({

const householdsAndRoles = individual?.householdsAndRoles || [];
const isHeadOfHousehold = individual?.id === household?.headOfHousehold?.id;
const hasRolesToReassign =
householdsAndRoles?.filter((el) => el.role !== 'NO_ROLE').length > 0;
const hasRolesToReassign = householdsAndRoles.some(
(el) => el.role !== 'NO_ROLE',
);

let isProperDataChange = true;
if (
category.toString() === GRIEVANCE_CATEGORIES.DATA_CHANGE &&
issueType.toString() === GRIEVANCE_ISSUE_TYPES.EDIT_INDIVIDUAL
) {
if (
isEmpty(ticket.individualDataUpdateTicketDetails.individualData.role) &&
isEmpty(
ticket.individualDataUpdateTicketDetails.individualData.relationship,
)
) {
const { role, relationship } =
ticket.individualDataUpdateTicketDetails.individualData;
if (isEmpty(role) && isEmpty(relationship)) {
isProperDataChange = false;
}
}

return (
(isHeadOfHousehold || hasRolesToReassign) &&
isProperDataChange &&
Expand Down
Loading
Loading