-
Notifications
You must be signed in to change notification settings - Fork 57
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
chore(inao): Make inao applications share code #16473
base: main
Are you sure you want to change the base?
Changes from all commits
4938e1a
c81c7b0
f537fb5
c697766
965b458
70e7f47
f6a8cac
6ee2687
3af4055
398e498
e888f11
945268f
64f5872
55ffd7a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,18 +18,21 @@ import { format as formatNationalId } from 'kennitala' | |
import { useSubmitApplication } from '../../hooks/useSubmitApplication' | ||
import { m } from '../../lib/messages' | ||
import { FinancialStatementCemetery } from '../../lib/dataSchema' | ||
import { currencyStringToNumber, formatCurrency } from '../../utils/helpers' | ||
import { AboutOverview } from './AboutOverview' | ||
import { ValueLine } from './ValueLine' | ||
import { CapitalNumberOverview } from './CapitalNumbersOverview' | ||
import { BOARDMEMEBER } from '../../utils/constants' | ||
import { FileValueLine } from './FileValueLine' | ||
import BottomBar from './BottomBar' | ||
import { | ||
columnStyle, | ||
sectionColumn, | ||
starterColumnStyle, | ||
} from './overviewStyles.css' | ||
import { | ||
AboutOverview, | ||
CapitalNumberOverview, | ||
ValueLine, | ||
BottomBar, | ||
FileValueLine, | ||
formatCurrency, | ||
currencyStringToNumber, | ||
} from '@island.is/application/templates/inao/shared' | ||
|
||
export const CemeteryOverview = ({ | ||
application, | ||
|
@@ -86,7 +89,15 @@ export const CemeteryOverview = ({ | |
<Box marginBottom={2}> | ||
<Divider /> | ||
<Box paddingY={3}> | ||
<AboutOverview answers={answers} /> | ||
<AboutOverview | ||
about={answers.about} | ||
fullName={m.fullName} | ||
nationalId={m.nationalId} | ||
powerOfAttorneyName={m.powerOfAttorneyName} | ||
powerOfAttorneyNationalId={m.powerOfAttorneyNationalId} | ||
email={m.email} | ||
phoneNumber={m.phoneNumber} | ||
/> | ||
</Box> | ||
<Divider /> | ||
<Box paddingY={3}> | ||
|
@@ -175,7 +186,15 @@ export const CemeteryOverview = ({ | |
<Divider /> | ||
|
||
<Box paddingY={3}> | ||
<CapitalNumberOverview answers={answers} /> | ||
<CapitalNumberOverview | ||
capitalNumbersMessage={m.capitalNumbers} | ||
capitalIncomeMessage={m.capitalIncome} | ||
capitalIncome={answers.capitalNumbers.capitalIncome} | ||
capitalCostMessage={m.capitalCost} | ||
capitalCost={answers.capitalNumbers.capitalCost} | ||
totalCapitalMessage={m.totalCapital} | ||
total={answers.capitalNumbers.total} | ||
/> | ||
</Box> | ||
<Divider /> | ||
<Box paddingY={3}> | ||
|
@@ -309,7 +328,10 @@ export const CemeteryOverview = ({ | |
) : null} | ||
{fileName ? ( | ||
<> | ||
<FileValueLine label={answers.attachments?.file?.[0]?.name} /> | ||
<FileValueLine | ||
label={answers.attachments?.file?.[0]?.name} | ||
files={m.files} | ||
/> | ||
Comment on lines
+331
to
+334
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Possible mismatch in props for The Apply this diff if <FileValueLine
label={answers.attachments?.file?.[0]?.name}
- files={m.files}
+ files={answers.attachments?.file}
|
||
<Divider /> | ||
</> | ||
) : null} | ||
|
@@ -372,6 +394,8 @@ export const CemeteryOverview = ({ | |
loading={loading} | ||
onSendButtonClick={onSendButtonClick} | ||
onBackButtonClick={onBackButtonClick} | ||
goBack={m.goBack} | ||
send={m.send} | ||
/> | ||
</Box> | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeRabbit has some valid concerns here, for example this; shouldn't it be the other way around?
Also other things Coderabbit mentioned