Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions packages/app-builder/src/components/Cases/CaseAlerts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ export const AlertCard = ({
<DecisionPanel
dataModel={dataModel}
decision={decision}
onClose={() => setOpenDetails(null)}
onScreeningSelect={setPanelScreeningId}
withReviewOpened={openDetails.withReview}
/>
Expand Down Expand Up @@ -278,7 +277,7 @@ const TriggerFieldsRow = ({
<span key={field.id} data-field-item className="inline-flex shrink-0 items-baseline gap-xs">
{index > 0 ? <span className="text-grey-placeholder">&middot;</span> : null}
<span className="font-medium">{field.name}:</span>
<span className="max-w-[120px] truncate">
<span className="max-w-30 truncate">
<FormatData data={parseUnknownData(triggerObject[field.name])} />
</span>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,13 @@ import { Button, Switch } from 'ui-design-system';
type DecisionPanelProps = {
decision: DetailedCaseDecision;
dataModel: DataModel;
onClose: () => void;
onScreeningSelect: (screeningId: string) => void;
withReviewOpened?: boolean;
};

export function DecisionPanel({
decision,
dataModel,
onClose,
onScreeningSelect,
withReviewOpened = false,
}: DecisionPanelProps) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const CommentLine = ({ comment }: { comment: ScreeningMatch['comments'][n
const fullName = getFullName(user);

return (
<div key={comment.id} className="flex flex-col gap-sm">
<div key={comment.id} className="flex flex-col text-s gap-sm font-normal">
<div className="flex items-center gap-xs">
<Avatar size="xs" firstName={user?.firstName} lastName={user?.lastName} />
<span className="flex items-baseline gap-xs">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,40 +46,45 @@ export const MatchCard = ({
return (
<Collapsible.Container defaultOpen={defaultOpen}>
<Collapsible.Title size="small">
<div className="flex grow items-center justify-between gap-sm">
<div className="flex flex-wrap items-center gap-sm">
<span className="text-s font-medium">{entity.caption}</span>
{hasAiSuggestion ? (
<div className="flex flex-col gap-sm">
<div className="flex grow items-center justify-between gap-sm">
<div className="flex flex-wrap items-center gap-sm">
<span className="text-s font-medium">{entity.caption}</span>
{hasAiSuggestion ? (
<Tag color="grey">
{t(`screenings:match.ai_suggestion.${aiSuggestion.confidence}`)}
<Icon icon="wand" className="size-4" />
</Tag>
) : null}
<Tag color="grey">
{t(`screenings:match.ai_suggestion.${aiSuggestion.confidence}`)}
<Icon icon="wand" className="size-4" />
{t('screenings:match.similarity', {
percent: Math.round(entity.score * 100),
})}
</Tag>
) : null}
<Tag color="grey">
{t('screenings:match.similarity', {
percent: Math.round(entity.score * 100),
})}
</Tag>
</div>
<div className="flex items-center gap-sm" onClick={(e) => e.stopPropagation()}>
{!hideEnrich && !match.enriched ? <EnrichMatchButton matchId={match.id} /> : null}
{!hideReview ? (
<div className="inline-flex h-8 shrink-0 text-nowrap">
{unreviewable ? (
<Tag color="grey">{t('screenings:match.not_reviewable')}</Tag>
) : canReview ? (
<ReviewMatchPopover
screening={screening}
screeningMatch={match}
open={isPopoverOpen}
onOpenChange={setIsPopoverOpen}
/>
) : (
<StatusTag status={match.status} disabled />
)}
</div>
) : null}
</div>
<div className="flex items-center gap-sm" onClick={(e) => e.stopPropagation()}>
{!hideEnrich && !match.enriched ? <EnrichMatchButton matchId={match.id} /> : null}
{!hideReview ? (
<div className="inline-flex h-8 shrink-0 text-nowrap">
{unreviewable ? (
<Tag color="grey">{t('screenings:match.not_reviewable')}</Tag>
) : canReview ? (
<ReviewMatchPopover
screening={screening}
screeningMatch={match}
open={isPopoverOpen}
onOpenChange={setIsPopoverOpen}
/>
) : (
<StatusTag status={match.status} disabled />
)}
</div>
) : null}
</div>
</div>
{match.comments.map((comment) => {
return <CommentLine key={comment.id} comment={comment} />;
})}
</div>
</Collapsible.Title>
{hasAiSuggestion && aiSuggestion.reason ? (
Expand Down Expand Up @@ -108,9 +113,6 @@ export const MatchCard = ({
</div>
) : null}

{match.comments.map((comment) => {
return <CommentLine key={comment.id} comment={comment} />;
})}
<MatchDetails entity={entity} />
</div>
</Collapsible.Content>
Expand Down