-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add decision details information box to application page
- Loading branch information
1 parent
f6c786c
commit aaf7794
Showing
15 changed files
with
436 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ node_modules | |
screenshots | ||
report | ||
coverage | ||
|
||
certificates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
frontend/benefit/applicant/src/components/applications/StatusIcon.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { $StatusIcon } from 'benefit/applicant/components/applications/Applications.sc'; | ||
import { APPLICATION_STATUSES } from 'benefit-shared/constants'; | ||
import { IconAlertCircleFill, IconCheckCircle, IconCheckCircleFill, IconCrossCircleFill } from 'hds-react'; | ||
import React from 'react'; | ||
|
||
type Props = { | ||
status: APPLICATION_STATUSES | ||
} | ||
|
||
const StatusIcon = ({ status }: Props): JSX.Element => { | ||
let Component; | ||
switch (status) { | ||
case APPLICATION_STATUSES.DRAFT: | ||
Component = <span />; | ||
break; | ||
|
||
case APPLICATION_STATUSES.INFO_REQUIRED: | ||
Component = IconAlertCircleFill; | ||
break; | ||
|
||
case APPLICATION_STATUSES.RECEIVED: | ||
Component = IconCheckCircle; | ||
break; | ||
|
||
case APPLICATION_STATUSES.ACCEPTED: | ||
Component = IconCheckCircleFill; | ||
break; | ||
|
||
case APPLICATION_STATUSES.REJECTED: | ||
Component = IconCrossCircleFill; | ||
break; | ||
|
||
case APPLICATION_STATUSES.CANCELLED: | ||
Component = IconCrossCircleFill; | ||
break; | ||
|
||
case APPLICATION_STATUSES.HANDLING: | ||
Component = IconCheckCircle; | ||
break; | ||
|
||
default: | ||
return <span />; | ||
} | ||
|
||
return ( | ||
<$StatusIcon className={`status-icon status-icon--${status}`}> | ||
<Component /> | ||
</$StatusIcon> | ||
); | ||
}; | ||
|
||
export default StatusIcon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.