Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into 201639_Individuals_Add_a_n…
Browse files Browse the repository at this point in the history
…ew_section_to_Display_Delivery_mechanism_details_for_an_individual

# Conflicts:
#	src/frontend/data/schema.graphql
#	src/frontend/src/__generated__/graphql.tsx
#	src/frontend/src/__generated__/introspection-result.ts
  • Loading branch information
Maciej Szewczyk committed Sep 26, 2024
2 parents a94de87 + fef8aa6 commit 1067882
Show file tree
Hide file tree
Showing 54 changed files with 6,840 additions and 553 deletions.
5,592 changes: 5,592 additions & 0 deletions src/frontend/data/schema.graphql

Large diffs are not rendered by default.

173 changes: 53 additions & 120 deletions src/frontend/src/__generated__/graphql.tsx

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src/frontend/src/__generated__/introspection-result.ts

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

27 changes: 13 additions & 14 deletions src/frontend/src/apollo/fragments/GrievanceTicketFragment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,20 +207,6 @@ export const grievanceTicketDetailed = gql`
}
needsAdjudicationTicketDetails {
id
dedupEngineSimilarityPair {
isDuplicate
similarityScore
individual1 {
unicefId
fullName
photo
}
individual2 {
unicefId
fullName
photo
}
}
hasDuplicatedDocument
extraData {
goldenRecords {
Expand All @@ -233,6 +219,19 @@ export const grievanceTicketDetailed = gql`
proximityToScore
score
}
dedupEngineSimilarityPair {
similarityScore
individual1 {
unicefId
fullName
photo
}
individual2 {
unicefId
fullName
photo
}
}
}
goldenRecordsIndividual {
id
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/apollo/fragments/RegistrationFragments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const registrationMinimal = gql`
refuseReason
totalHouseholdsCountWithValidPhoneNo
adminUrl
isDeduplicated
biometricDeduplicated
}
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const PAYMENT_PLAN_QUERY = gql`
availablePaymentRecordsCount
bankReconciliationSuccess
bankReconciliationError
exchangeRate
createdBy {
id
firstName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export const GrievancesFilters = ({
const showIssueType =
filter.category === GRIEVANCE_CATEGORIES.SENSITIVE_GRIEVANCE ||
filter.category === GRIEVANCE_CATEGORIES.DATA_CHANGE ||
filter.category === GRIEVANCE_CATEGORIES.NEEDS_ADJUDICATION ||
filter.category === GRIEVANCE_CATEGORIES.GRIEVANCE_COMPLAINT;

const updatedPriorityChoices = useMemo(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,15 @@ import { useTranslation } from 'react-i18next';
import { hasPermissions, PERMISSIONS } from 'src/config/permissions';

export interface Individual {
__typename?: 'IndividualNode';
__typename?: 'DeduplicationEngineSimilarityPairIndividualNode';
unicefId?: string;
fullName: string;
fullName?: string;
photo?: string;
}

export interface BiometricsResultsProps {
ticketId: string;
similarityScore: string;
faceMatchResult: 'Duplicates' | 'Uniqueness';
individual1?: Individual;
individual2?: Individual;
}
Expand All @@ -50,7 +49,6 @@ const Placeholder: React.FC = () => (
export const BiometricsResults = ({
ticketId,
similarityScore,
faceMatchResult,
individual1,
individual2,
}: BiometricsResultsProps): React.ReactElement => {
Expand Down Expand Up @@ -146,7 +144,7 @@ export const BiometricsResults = ({
</strong>
</div>
<div>
{t('Face images matching suggests:')} {faceMatchResult}
{t('Face images matching suggests: Duplicates')}
</div>
</Box>
</DialogContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const NeedsAdjudicationActions: React.FC<
const { isActiveProgram } = useProgramContext();
const actionsDisabled =
!isTicketForApproval || !isActiveProgram || !selectedIndividualIds.length;
const { dedupEngineSimilarityPair } = ticket.needsAdjudicationTicketDetails;
const { dedupEngineSimilarityPair } = ticket.needsAdjudicationTicketDetails.extraData;

return (
<Box
Expand Down Expand Up @@ -90,11 +90,6 @@ export const NeedsAdjudicationActions: React.FC<
<BiometricsResults
ticketId={ticket.id}
similarityScore={dedupEngineSimilarityPair.similarityScore}
faceMatchResult={
dedupEngineSimilarityPair.isDuplicate
? t('Duplicates')
: t('Uniqueness')
}
individual1={dedupEngineSimilarityPair.individual1}
individual2={dedupEngineSimilarityPair.individual2}
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid, Typography } from '@mui/material';
import { Box, Grid, IconButton, Tooltip, Typography } from '@mui/material';
import * as React from 'react';
import { useTranslation } from 'react-i18next';
import { PaymentPlanQuery } from '@generated/graphql';
Expand All @@ -9,6 +9,7 @@ import { LabelizedField } from '@core/LabelizedField';
import { OverviewContainer } from '@core/OverviewContainer';
import { Title } from '@core/Title';
import { UniversalMoment } from '@core/UniversalMoment';
import { Info } from '@mui/icons-material';

interface FollowUpPaymentPlanDetailsProps {
baseUrl: string;
Expand All @@ -33,6 +34,7 @@ export function FollowUpPaymentPlanDetails({
unicefId: sourcePaymentPlanUnicefId,
},
targetPopulation,
exchangeRate,
} = paymentPlan;

return (
Expand Down Expand Up @@ -96,6 +98,28 @@ export function FollowUpPaymentPlanDetails({
<UniversalMoment>{dispersionEndDate}</UniversalMoment>
</LabelizedField>
</Grid>
<Grid item xs={3}>
<Box display="flex" alignItems="center">
<Box mr={1}>
<LabelizedField label={t('FX Rate Applied')}>
{exchangeRate}
</LabelizedField>
</Box>
<Tooltip
title={t(
'If displayed exchange rate differs from Vision, please contact your designated focal point for resolution',
)}
>
<IconButton
color="primary"
aria-label="exchange-rate"
data-cy="info-exchange-rate"
>
<Info />
</IconButton>
</Tooltip>
</Box>
</Grid>
</Grid>
</OverviewContainer>
</ContainerColumnWithBorder>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid, Typography } from '@mui/material';
import { Box, Grid, IconButton, Tooltip, Typography } from '@mui/material';
import * as React from 'react';
import { useTranslation } from 'react-i18next';
import { renderUserName } from '@utils/utils';
Expand All @@ -11,6 +11,7 @@ import { Title } from '@core/Title';
import { UniversalMoment } from '@core/UniversalMoment';
import { FieldBorder } from '@core/FieldBorder';
import { RelatedFollowUpPaymentPlans } from './RelatedFollowUpPaymentPlans';
import { Info } from '@mui/icons-material';

interface PaymentPlanDetailsProps {
baseUrl: string;
Expand All @@ -29,6 +30,7 @@ export const PaymentPlanDetails = ({
currency,
startDate,
endDate,
exchangeRate,
dispersionStartDate,
dispersionEndDate,
followUps,
Expand Down Expand Up @@ -89,6 +91,26 @@ export const PaymentPlanDetails = ({
<UniversalMoment>{dispersionEndDate}</UniversalMoment>
</LabelizedField>
</Grid>
<Grid item xs={3}>
<Box mr={1}>
<LabelizedField label={t('FX Rate Applied')}>
{exchangeRate}
</LabelizedField>
</Box>
<Tooltip
title={t(
'If displayed exchange rate differs from Vision, please contact your designated focal point for resolution',
)}
>
<IconButton
color="primary"
aria-label="exchange-rate"
data-cy="info-exchange-rate"
>
<Info />
</IconButton>
</Tooltip>
</Grid>
</Grid>
<Grid container direction="column" item xs={3} spacing={6}>
<Grid item xs={12}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,50 @@ exports[`components/paymentmodule/PaymentPlanDetails/PaymentPlanDetails should r
</div>
</div>
</div>
<div
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-3 css-1equabv-MuiGrid-root"
>
<div
class="MuiBox-root css-15ro776"
>
<div>
<span
class="sc-hLQSwg hqLXmS"
color="textSecondary"
>
FX Rate Applied
</span>
<div
data-cy="label-FX Rate Applied"
>
-
</div>
</div>
</div>
<button
aria-label="exchange-rate"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-colorPrimary MuiIconButton-sizeMedium css-zt49xb-MuiButtonBase-root-MuiIconButton-root"
data-cy="info-exchange-rate"
data-mui-internal-clone-element="true"
tabindex="0"
type="button"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-i4bv87-MuiSvgIcon-root"
data-testid="InfoIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"
/>
</svg>
<span
class="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
/>
</button>
</div>
</div>
<div
class="MuiGrid-root MuiGrid-container MuiGrid-item MuiGrid-spacing-xs-6 MuiGrid-direction-xs-column MuiGrid-grid-xs-3 css-1ua2l6q-MuiGrid-root"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid, Typography } from '@mui/material';
import { Box, Grid, IconButton, Tooltip, Typography } from '@mui/material';
import * as React from 'react';
import { useTranslation } from 'react-i18next';
import { PaymentPlanQuery } from '@generated/graphql';
Expand All @@ -9,6 +9,7 @@ import { LabelizedField } from '@core/LabelizedField';
import { OverviewContainer } from '@core/OverviewContainer';
import { Title } from '@core/Title';
import { UniversalMoment } from '@core/UniversalMoment';
import { Info } from '@mui/icons-material';

interface FollowUpPaymentPlanDetailsProps {
baseUrl: string;
Expand All @@ -33,6 +34,7 @@ export function FollowUpPaymentPlanDetails({
unicefId: sourcePaymentPlanUnicefId,
},
targetPopulation,
exchangeRate,
} = paymentPlan;

return (
Expand Down Expand Up @@ -96,6 +98,28 @@ export function FollowUpPaymentPlanDetails({
<UniversalMoment>{dispersionEndDate}</UniversalMoment>
</LabelizedField>
</Grid>
<Grid item xs={3}>
<Box display="flex" alignItems="center">
<Box mr={1}>
<LabelizedField label={t('FX Rate Applied')}>
{exchangeRate}
</LabelizedField>
</Box>
<Tooltip
title={t(
'If displayed exchange rate differs from Vision, please contact your designated focal point for resolution',
)}
>
<IconButton
color="primary"
aria-label="exchange-rate"
data-cy="info-exchange-rate"
>
<Info />
</IconButton>
</Tooltip>
</Box>
</Grid>
</Grid>
</OverviewContainer>
</ContainerColumnWithBorder>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid, Typography } from '@mui/material';
import { Box, Grid, IconButton, Tooltip, Typography } from '@mui/material';
import * as React from 'react';
import { useTranslation } from 'react-i18next';
import { renderUserName } from '@utils/utils';
Expand All @@ -11,6 +11,7 @@ import { Title } from '@core/Title';
import { UniversalMoment } from '@core/UniversalMoment';
import { FieldBorder } from '@core/FieldBorder';
import { RelatedFollowUpPaymentPlans } from './RelatedFollowUpPaymentPlans';
import { Info } from '@mui/icons-material';

interface PaymentPlanDetailsProps {
baseUrl: string;
Expand All @@ -32,6 +33,7 @@ export const PaymentPlanDetails = ({
dispersionStartDate,
dispersionEndDate,
followUps,
exchangeRate,
} = paymentPlan;

return (
Expand Down Expand Up @@ -89,6 +91,26 @@ export const PaymentPlanDetails = ({
<UniversalMoment>{dispersionEndDate}</UniversalMoment>
</LabelizedField>
</Grid>
<Grid item xs={3}>
<Box mr={1}>
<LabelizedField label={t('FX Rate Applied')}>
{exchangeRate}
</LabelizedField>
</Box>
<Tooltip
title={t(
'If displayed exchange rate differs from Vision, please contact your designated focal point for resolution',
)}
>
<IconButton
color="primary"
aria-label="exchange-rate"
data-cy="info-exchange-rate"
>
<Info />
</IconButton>
</Tooltip>
</Grid>
</Grid>
<Grid container direction="column" item xs={3} spacing={6}>
<Grid item xs={12}>
Expand Down
Loading

0 comments on commit 1067882

Please sign in to comment.