Skip to content

Commit 9125185

Browse files
shreeyash07frozenhelium
authored andcommitted
fix(eap): update eap section according to new UI
1 parent c25dc65 commit 9125185

File tree

14 files changed

+118
-151
lines changed

14 files changed

+118
-151
lines changed

app/src/App/routes/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ const accountMyFormsEap = customWrapRoute({
763763
parent: accountMyFormsLayout,
764764
path: 'eap-applications',
765765
component: {
766-
render: () => import('#views/EapApplications'),
766+
render: () => import('#views/AccountMyFormsEap'),
767767
props: {},
768768
},
769769
context: {

app/src/views/EapApplications/EapTableActions/i18n.json renamed to app/src/views/AccountMyFormsEap/EapTableActions/i18n.json

File renamed without changes.

app/src/views/EapApplications/EapTableActions/index.tsx renamed to app/src/views/AccountMyFormsEap/EapTableActions/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,16 @@ function EapTableActions(props: Props) {
4141
<Link
4242
to="eapFullForm"
4343
urlParams={{ eapId }}
44-
variant="secondary"
44+
styleVariant="outline"
45+
colorVariant="primary"
4546
>
4647
{strings.eapFormLink}
4748
</Link>
4849
<Link
4950
to="simplifiedEapForm"
5051
urlParams={{ eapId }}
51-
variant="secondary"
52+
styleVariant="outline"
53+
colorVariant="primary"
5254
>
5355
{strings.simplifiedEapLink}
5456
</Link>
File renamed without changes.
File renamed without changes.
Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ import EapTableActions, { type Props as EapTableActionProps } from './EapTableAc
3636
import Filters, { type FilterValue } from './Filters';
3737

3838
import i18n from './i18n.json';
39-
import styles from './styles.module.css';
4039

4140
type EapResponse = GoApiResponse<'/api/v2/eap-registration/'>;
4241
type EapListItem = NonNullable<EapResponse['results']>[number];
@@ -108,7 +107,6 @@ export function Component() {
108107
${item.disaster_type_details?.name}
109108
${baseYear} - ${addedYear}`;
110109
},
111-
{ columnClassName: styles.title },
112110
),
113111
createStringColumn<EapListItem, number>(
114112
'eap_type_display',
@@ -119,7 +117,6 @@ export function Component() {
119117
'status_display',
120118
strings.eapStatus,
121119
(item) => item.status_display,
122-
{ columnClassName: styles.status },
123120
),
124121
createExpandColumn<EapListItem, Key>(
125122
'expandRow',
@@ -147,7 +144,6 @@ export function Component() {
147144
'title',
148145
'',
149146
() => strings.eapRegistration,
150-
{ columnClassName: styles.detailTitle },
151147
),
152148
createEmptyColumn(),
153149
createElementColumn<EapListItem, number, EapTableActionProps>(
@@ -180,7 +176,6 @@ export function Component() {
180176
keySelector={numericIdSelector}
181177
data={subRows}
182178
columns={detailColumns}
183-
cellClassName={styles.subCell}
184179
/>
185180
</>
186181
);
@@ -194,7 +189,6 @@ export function Component() {
194189

195190
return (
196191
<Container
197-
childrenContainerClassName={styles.eapFormLinks}
198192
heading={strings.eapApplicationsHeading}
199193
withHeaderBorder
200194
filters={(eapResponse?.count ?? 0) > 0 && (
@@ -203,10 +197,11 @@ export function Component() {
203197
onChange={setFilterField}
204198
/>
205199
)}
206-
actions={(
200+
headerActions={(
207201
<Link
208202
to="newEapDevelopmentRegistration"
209-
variant="secondary"
203+
styleVariant="outline"
204+
colorVariant="primary"
210205
>
211206
{strings.eapRegistrationLink}
212207
</Link>
@@ -221,7 +216,6 @@ export function Component() {
221216
)}
222217
>
223218
<Table
224-
className={styles.table}
225219
data={eapResponse?.results}
226220
columns={baseColumns}
227221
rowModifier={rowModifier}

app/src/views/DrefDetail/index.tsx

Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,56 @@
1-
import { Container } from '@ifrc-go/ui';
1+
import {
2+
Container,
3+
ListView,
4+
} from '@ifrc-go/ui';
25
import { useTranslation } from '@ifrc-go/ui/hooks';
36

47
import SurgeContentContainer from '#components/domain/SurgeContentContainer';
58
import Link from '#components/Link';
69

710
import i18n from './i18n.json';
8-
import styles from './styles.module.css';
911

1012
/** @knipignore */
1113
// eslint-disable-next-line import/prefer-default-export
1214
export function Component() {
1315
const strings = useTranslation(i18n);
1416

1517
return (
16-
<Container
17-
className={styles.drefDetail}
18-
contentViewType="vertical"
19-
childrenContainerClassName={styles.content}
20-
>
21-
<SurgeContentContainer
22-
heading={strings.drefIntroHeading}
18+
<Container>
19+
<ListView
20+
layout="block"
2321
>
24-
<div>{strings.drefIntroDetailOne}</div>
25-
<div>{strings.drefIntroDetailTwo}</div>
26-
</SurgeContentContainer>
27-
<SurgeContentContainer
28-
heading={strings.drefProcessHeading}
29-
>
30-
<div>{strings.drefProcessSubHeading}</div>
31-
<ul>
32-
<li>
33-
{strings.drefProcessListOne}
34-
</li>
35-
<li>
36-
{strings.drefProcessListTwo}
37-
</li>
38-
</ul>
39-
<div>
40-
{strings.drefProcessDetailOne}
41-
</div>
42-
<div>
43-
{strings.drefProcessDetailTwo}
44-
</div>
45-
</SurgeContentContainer>
46-
<Link
47-
to="newDrefApplicationForm"
48-
withUnderline
49-
>
50-
{strings.drefDrefApplication}
51-
</Link>
22+
<SurgeContentContainer
23+
heading={strings.drefIntroHeading}
24+
>
25+
<div>{strings.drefIntroDetailOne}</div>
26+
<div>{strings.drefIntroDetailTwo}</div>
27+
</SurgeContentContainer>
28+
<SurgeContentContainer
29+
heading={strings.drefProcessHeading}
30+
>
31+
<div>{strings.drefProcessSubHeading}</div>
32+
<ul>
33+
<li>
34+
{strings.drefProcessListOne}
35+
</li>
36+
<li>
37+
{strings.drefProcessListTwo}
38+
</li>
39+
</ul>
40+
<div>
41+
{strings.drefProcessDetailOne}
42+
</div>
43+
<div>
44+
{strings.drefProcessDetailTwo}
45+
</div>
46+
</SurgeContentContainer>
47+
<Link
48+
to="newDrefApplicationForm"
49+
withUnderline
50+
>
51+
{strings.drefDrefApplication}
52+
</Link>
53+
</ListView>
5254
</Container>
5355
);
5456
}

app/src/views/DrefDetail/styles.module.css

Lines changed: 0 additions & 11 deletions
This file was deleted.

app/src/views/EapApplications/styles.module.css

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)