Skip to content

Commit

Permalink
ocrvs-5736 duplicate review page bug fix (#5738)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nil20 authored Aug 7, 2023
1 parent 30bf50a commit 74e22fc
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
6 changes: 6 additions & 0 deletions packages/client/src/i18n/messages/views/duplicates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { defineMessages, MessageDescriptor } from 'react-intl'

interface IDuplicateDeclarationMessages
extends Record<string | number | symbol, MessageDescriptor> {
duplicateDeclarationDetails: MessageDescriptor
duplicateReviewHeader: MessageDescriptor
duplicateContentTitle: MessageDescriptor
duplicateContentSubtitle: MessageDescriptor
Expand All @@ -23,6 +24,11 @@ interface IDuplicateDeclarationMessages
}

const messagesToDefine: IDuplicateDeclarationMessages = {
duplicateDeclarationDetails: {
id: 'duplicates.content.header',
defaultMessage: 'Declaration Details',
description: 'Declaration details header of two duplicate ones'
},
duplicateReviewHeader: {
id: 'duplicates.review.header',
defaultMessage: 'Potential {event} duplicate review',
Expand Down
10 changes: 6 additions & 4 deletions packages/client/src/views/RegisterForm/RegisterForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ function FormAppBar({
}
desktopRight={
<>
{!isCorrection(declaration) && (
{!duplicate && !isCorrection(declaration) && (
<Button
id="save-exit-btn"
type="primary"
Expand Down Expand Up @@ -478,9 +478,11 @@ function FormAppBar({
}
mobileRight={
<>
<Button type="icon" size="small" onClick={handleSaveAndExit}>
<Icon name="DownloadSimple" />
</Button>
{!duplicate && !isCorrection(declaration) && (
<Button type="icon" size="small" onClick={handleSaveAndExit}>
<Icon name="DownloadSimple" />
</Button>
)}
<Button type="icon" size="small" onClick={handleExit}>
<Icon name="X" />
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,11 @@ export const DuplicateFormTabs = (props: IProps) => {
size={ContentSize.LARGE}
showTitleOnMobile
>
<Text element="h1" variant="h4" align="left" id="title-text">
{intl.formatMessage(
duplicateMessages.duplicateDeclarationDetails
)}
</Text>
<Stack direction="column" gap={20} alignItems={'stretch'}>
{comparisonDelcarationData.map((sections, index) => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1891,7 +1891,7 @@ class ReviewSectionComp extends React.Component<FullProps, State> {
labelForHideAction={intl.formatMessage(messages.hideLabel)}
labelForShowAction={intl.formatMessage(messages.showLabel)}
action={
viewRecord ? null : (
viewRecord || isDuplicate ? null : (
<Link
font="reg16"
element="button"
Expand Down

0 comments on commit 74e22fc

Please sign in to comment.