Skip to content

Commit 03b116a

Browse files
rename all the "sanctionCheck" into "screening"
1 parent a7346d3 commit 03b116a

73 files changed

Lines changed: 583 additions & 632 deletions

File tree

Some content is hidden

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

packages/app-builder/src/components/Cases/RequiredActions.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ export const RequiredActions = ({
2929
const hasPendingScreening = decision.screenings.some((s) => s.status === 'in_review');
3030
const isPendingDecision =
3131
decision.reviewStatus === 'pending' && decision.outcome === 'block_and_review';
32-
const isThereSanctionChecks = decision.screenings.length > 0;
32+
const areThereScreenings = decision.screenings.length > 0;
3333

34-
return isPendingDecision || isThereSanctionChecks ? (
34+
return isPendingDecision || areThereScreenings ? (
3535
<div className="bg-grey-98 group-hover:bg-grey-95 flex flex-col gap-2.5 rounded-sm p-4 transition-colors">
3636
<span className="text-grey-50 text-xs">{t('sanctions:required_actions.title')}</span>
37-
{isThereSanctionChecks ? (
37+
{areThereScreenings ? (
3838
<div className="flex flex-col gap-1.5">
3939
<div className="flex items-center gap-2">
4040
<Checkbox disabled={true} size="small" checked={!hasPendingScreening} />
@@ -96,7 +96,7 @@ export const RequiredActions = ({
9696
<ReviewDecisionModal
9797
decisionId={decision.id}
9898
store={reviewDecisionModalStore}
99-
sanctionCheck={decision.screenings[0]}
99+
screening={decision.screenings[0]}
100100
/>
101101
</div>
102102
) : null}

packages/app-builder/src/components/Cases/cases-i18n.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { type Namespace } from 'i18next';
22

33
import { decisionsI18n } from '../Decisions/decisions-i18n';
44
import { filtersI18n } from '../Filters/filters-i18n';
5-
import { sanctionsI18n } from '../Sanctions/sanctions-i18n';
5+
import { sanctionsI18n } from '../Screenings/screenings-i18n';
66

77
export const casesI18n = [
88
'cases',

packages/app-builder/src/components/Decisions/SanctionCheckDetail.tsx renamed to packages/app-builder/src/components/Decisions/ScreeningDetail.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
import { decisionsI18n } from '@app-builder/components';
2-
import { isSanctionCheckError, type SanctionCheck } from '@app-builder/models/sanction-check';
2+
import { isScreeningError, type Screening } from '@app-builder/models/screening';
33
import { useTranslation } from 'react-i18next';
44
import * as R from 'remeda';
55
import { Collapsible } from 'ui-design-system';
66
import { Icon } from 'ui-icons';
77

8-
import { MatchCard } from '../Sanctions/MatchCard';
9-
import { SanctionCheckErrors } from '../Sanctions/SanctionCheckErrors';
10-
import { SanctionStatusTag } from '../Sanctions/SanctionStatusTag';
8+
import { MatchCard } from '../Screenings/MatchCard';
9+
import { ScreeningErrors } from '../Screenings/ScreeningErrors';
10+
import { ScreeningStatusTag } from '../Screenings/ScreeningStatusTag';
1111

12-
export function SanctionCheckDetail({ sanctionCheck }: { sanctionCheck: SanctionCheck }) {
13-
const hasError = isSanctionCheckError(sanctionCheck);
12+
export function ScreeningDetail({ screening }: { screening: Screening }) {
13+
const hasError = isScreeningError(screening);
1414

1515
return (
1616
<Collapsible.Container className="bg-grey-100">
1717
<Collapsible.Title>
1818
<div className="flex grow items-center justify-between">
19-
<span>{sanctionCheck.config.name}</span>
20-
<SanctionStatusTag status={sanctionCheck.status} border="square" className="h-8" />
19+
<span>{screening.config.name}</span>
20+
<ScreeningStatusTag status={screening.status} border="square" className="h-8" />
2121
</div>
2222
</Collapsible.Title>
2323
<Collapsible.Content>
2424
<div className="flex flex-col gap-4">
25-
{hasError ? <SanctionCheckErrors sanctionCheck={sanctionCheck} /> : null}
26-
{sanctionCheck.request ? <SearchInput request={sanctionCheck.request} /> : null}
25+
{hasError ? <ScreeningErrors screening={screening} /> : null}
26+
{screening.request ? <SearchInput request={screening.request} /> : null}
2727
<div className="flex flex-col gap-2">
28-
{sanctionCheck.matches.map((match) => (
28+
{screening.matches.map((match) => (
2929
<MatchCard
3030
readonly
3131
key={match.id}
32-
unreviewable={hasError || sanctionCheck.partial}
32+
unreviewable={hasError || screening.partial}
3333
match={match}
3434
/>
3535
))}
@@ -40,7 +40,7 @@ export function SanctionCheckDetail({ sanctionCheck }: { sanctionCheck: Sanction
4040
);
4141
}
4242

43-
const SearchInput = ({ request }: { request: NonNullable<SanctionCheck['request']> }) => {
43+
const SearchInput = ({ request }: { request: NonNullable<Screening['request']> }) => {
4444
const { t } = useTranslation(decisionsI18n);
4545
const searchInputList = R.pipe(
4646
R.values(request.queries),

packages/app-builder/src/components/Scenario/Sanction/Actions/DeleteScreeningRule.tsx renamed to packages/app-builder/src/components/Scenario/Screening/Actions/DeleteScreeningRule.tsx

File renamed without changes.

packages/app-builder/src/components/Scenario/Sanction/FieldAstFormula.tsx renamed to packages/app-builder/src/components/Scenario/Screening/FieldAstFormula.tsx

File renamed without changes.

packages/app-builder/src/components/Scenario/Sanction/FieldDataset.tsx renamed to packages/app-builder/src/components/Scenario/Screening/FieldDataset.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Callout } from '@app-builder/components/Callout';
2-
import { DatasetTag } from '@app-builder/components/Sanctions/DatasetTag';
3-
import { type ScreeningCategory } from '@app-builder/models/sanction-check';
2+
import { DatasetTag } from '@app-builder/components/Screenings/DatasetTag';
3+
import { type ScreeningCategory } from '@app-builder/models/screening';
44
import { useEditorMode } from '@app-builder/services/editor/editor-mode';
55
import clsx from 'clsx';
66
import Fuse from 'fuse.js';

packages/app-builder/src/components/Scenario/Sanction/FieldDatasetFilters.tsx renamed to packages/app-builder/src/components/Scenario/Screening/FieldDatasetFilters.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { DatasetTag } from '@app-builder/components/Sanctions/DatasetTag';
2-
import { type ScreeningCategory } from '@app-builder/models/sanction-check';
1+
import { DatasetTag } from '@app-builder/components/Screenings/DatasetTag';
2+
import { type ScreeningCategory } from '@app-builder/models/screening';
33
import { type OpenSanctionsCatalogSection } from 'marble-api';
44
import { toggle } from 'radash';
55
import { type Dispatch, type SetStateAction, useEffect, useMemo, useState } from 'react';

packages/app-builder/src/components/Scenario/Sanction/FieldEntityType.tsx renamed to packages/app-builder/src/components/Scenario/Screening/FieldEntityType.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type SEARCH_ENTITIES } from '@app-builder/constants/sanction-check-entity';
1+
import { type SEARCH_ENTITIES } from '@app-builder/constants/screening-entity';
22
import { useEditorMode } from '@app-builder/services/editor/editor-mode';
33
import { useState } from 'react';
44
import { useTranslation } from 'react-i18next';

packages/app-builder/src/components/Scenario/Sanction/FieldNode.tsx renamed to packages/app-builder/src/components/Scenario/Screening/FieldNode.tsx

File renamed without changes.

packages/app-builder/src/components/Scenario/Sanction/FieldNodeConcat.tsx renamed to packages/app-builder/src/components/Scenario/Screening/FieldNodeConcat.tsx

File renamed without changes.

0 commit comments

Comments
 (0)