- {monthsWithOrder.map(
- ({ month, order }) => (
+
+
+ {monthsWithOrder.map(
+ ({ month, order }) => (
+
+ {month.substring(0, 3)}
+
+ ),
+ )}
+
+ {(isNotDefined(eventTypeGroupedData)
+ || eventTypeGroupedData.length === 0
+ ) && (
+
+ )}
+ {eventTypeGroupedData?.map(
+ ({ event_type, events }) => (
- {month.substring(0, 3)}
+ {events.map((event) => (
+
+ ))}
),
)}
- {(isNotDefined(eventTypeGroupedData) || eventTypeGroupedData.length === 0) && (
-
- )}
- {eventTypeGroupedData?.map(
- ({ event_type, events }) => (
-
- {events.map((event) => (
-
- ))}
-
- ),
- )}
)}
-
+
);
}
diff --git a/app/src/views/CountryProfileOverview/styles.module.css b/app/src/views/CountryProfileOverview/styles.module.css
index 00fe81a262..295c2316f4 100644
--- a/app/src/views/CountryProfileOverview/styles.module.css
+++ b/app/src/views/CountryProfileOverview/styles.module.css
@@ -1,39 +1,33 @@
-.country-profile-overview {
- .seasonal-calendar-content {
- background-image:
- linear-gradient(to right, var(--go-ui-color-separator) var(--go-ui-width-separator-thin), transparent var(--go-ui-width-separator-thin)),
- linear-gradient(to bottom, var(--go-ui-color-separator) var(--go-ui-width-separator-thin), transparent var(--go-ui-width-separator-thin));
- background-size: calc(100% / 12);
+.seasonal-calendar-content {
+ background-image:
+ linear-gradient(to right, var(--go-ui-color-separator) var(--go-ui-width-separator-thin), transparent var(--go-ui-width-separator-thin)),
+ linear-gradient(to bottom, var(--go-ui-color-separator) var(--go-ui-width-separator-thin), transparent var(--go-ui-width-separator-thin));
+ background-size: calc(100% / 12);
- .event-list {
- display: grid;
- border-bottom: var(--go-ui-width-separator-thin) solid var(--go-ui-color-separator);
- padding: var(--go-ui-spacing-md) 0;
- grid-template-columns: repeat(12, 1fr);
- gap: var(--go-ui-spacing-3xs);
+ .event-list {
+ display: grid;
+ border-bottom: var(--go-ui-width-separator-thin) solid var(--go-ui-color-separator);
+ padding: var(--go-ui-spacing-md) 0;
+ grid-template-columns: repeat(12, 1fr);
+ gap: var(--go-ui-spacing-3xs);
- .month-name {
- text-align: center;
- font-size: var(--go-ui-font-size-sm);
+ .month-name {
+ text-align: center;
+ font-size: var(--go-ui-font-size-sm);
- @media screen and (max-width: 30rem) {
- transform: rotate(-30deg) translateX(-10%) translateY(20%);
- padding: 0;
- font-size: var(--go-ui-font-size-2xs);
- }
- }
-
- .event {
- padding: var(--go-ui-spacing-2xs) var(--go-ui-spacing-xs);
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- font-size: var(--go-ui-font-size-xs);
+ @media screen and (max-width: 30rem) {
+ transform: rotate(-30deg) translateX(-10%) translateY(20%);
+ padding: 0;
+ font-size: var(--go-ui-font-size-2xs);
}
}
- }
- .legend-container {
- flex-wrap: wrap;
+ .event {
+ padding: var(--go-ui-spacing-2xs) var(--go-ui-spacing-xs);
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ font-size: var(--go-ui-font-size-xs);
+ }
}
}
diff --git a/app/src/views/CountryProfilePreviousEvents/CountryHistoricalKeyFigures/index.tsx b/app/src/views/CountryProfilePreviousEvents/CountryHistoricalKeyFigures/index.tsx
index 40080d8f91..298ac537be 100644
--- a/app/src/views/CountryProfilePreviousEvents/CountryHistoricalKeyFigures/index.tsx
+++ b/app/src/views/CountryProfilePreviousEvents/CountryHistoricalKeyFigures/index.tsx
@@ -7,16 +7,15 @@ import {
} from '@ifrc-go/icons';
import {
InfoPopup,
- KeyFigure,
+ KeyFigureView,
+ ListView,
} from '@ifrc-go/ui';
import { useTranslation } from '@ifrc-go/ui/hooks';
import { getPercentage } from '@ifrc-go/ui/utils';
-import { _cs } from '@togglecorp/fujs';
import { type GoApiResponse } from '#utils/restRequest';
import i18n from './i18n.json';
-import styles from './styles.module.css';
type FigureData = GoApiResponse<'/api/v2/country/{id}/figure/'>;
@@ -33,11 +32,15 @@ function CountryHistoricalKeyFigures(props: Props) {
const strings = useTranslation(i18n);
return (
-
-
+ }
- className={styles.keyFigure}
value={data.active_drefs}
+ valueType="number"
info={(
)}
label={strings.countryHistoricalDREFOperations}
+ withShadow
/>
- }
- className={styles.keyFigure}
value={data.active_appeals}
+ valueType="number"
info={(
)}
label={strings.keyFiguresEmergencyAppeals}
+ withShadow
/>
- }
- className={styles.keyFigure}
value={data.target_population}
- compactValue
+ valueType="number"
+ valueOptions={{ compact: true }}
label={strings.keyFiguresTargetPopulation}
+ withShadow
/>
- }
- className={styles.keyFigure}
value={data.amount_requested_dref_included}
- compactValue
+ valueType="number"
+ valueOptions={{ compact: true }}
label={strings.keyFiguresFundingRequirements}
+ withShadow
/>
- }
- className={styles.keyFigure}
value={getPercentage(
data.amount_funded_dref_included,
data.amount_requested_dref_included,
)}
- suffix="%"
- compactValue
+ valueType="number"
+ valueOptions={{
+ suffix: '%',
+ compact: true,
+ }}
label={strings.keyFiguresAppealsFundingCoverage}
+ withShadow
/>
-
+
);
}
diff --git a/app/src/views/CountryProfilePreviousEvents/CountryHistoricalKeyFigures/styles.module.css b/app/src/views/CountryProfilePreviousEvents/CountryHistoricalKeyFigures/styles.module.css
deleted file mode 100644
index cb7e37889f..0000000000
--- a/app/src/views/CountryProfilePreviousEvents/CountryHistoricalKeyFigures/styles.module.css
+++ /dev/null
@@ -1,13 +0,0 @@
-.country-historical-key-figures {
- display: grid;
- grid-gap: var(--go-ui-spacing-md);
- grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
-
- .key-figure {
- border-radius: var(--go-ui-border-radius-lg);
- box-shadow: var(--go-ui-box-shadow-md);
- background-color: var(--go-ui-color-white);
- height: 100%;
- }
-
-}
diff --git a/app/src/views/CountryProfilePreviousEvents/index.tsx b/app/src/views/CountryProfilePreviousEvents/index.tsx
index 6a32560fdc..a59656bbc2 100644
--- a/app/src/views/CountryProfilePreviousEvents/index.tsx
+++ b/app/src/views/CountryProfilePreviousEvents/index.tsx
@@ -6,6 +6,7 @@ import { useOutletContext } from 'react-router-dom';
import {
BarChart,
Container,
+ ListView,
SelectInput,
} from '@ifrc-go/ui';
import { useTranslation } from '@ifrc-go/ui/hooks';
@@ -18,7 +19,7 @@ import {
} from '@togglecorp/fujs';
import AppealsTable from '#components/domain/AppealsTable';
-import WikiLink from '#components/WikiLink';
+import TabPage from '#components/TabPage';
import { type CountryOutletContext } from '#utils/outletContext';
import {
type GoApiResponse,
@@ -30,7 +31,6 @@ import EmergenciesOverMonth from './EmergenciesOverMonth';
import PastEventsChart from './PastEventsChart';
import i18n from './i18n.json';
-import styles from './styles.module.css';
type TimePeriodKey = 'this-year' | 'past-year' | 'last-two-years' | 'last-five-years' | 'last-ten-years';
type DisasterCountItem = GoApiResponse<'/api/v2/country/{id}/disaster-count/'>[number];
@@ -146,20 +146,10 @@ export function Component() {
}
// FIXME: properly handle low data and empty conditions in charts
return (
-
- )}
+
- {isDefined(figureResponse) && (
-
- )}
-
-
-
-
-
-
+ {isDefined(figureResponse) && (
+
+ )}
+
+
+
+
+
+
+
+
+
)}
-
+
);
}
diff --git a/app/src/views/CountryProfilePreviousEvents/styles.module.css b/app/src/views/CountryProfilePreviousEvents/styles.module.css
deleted file mode 100644
index 0e9c88a48b..0000000000
--- a/app/src/views/CountryProfilePreviousEvents/styles.module.css
+++ /dev/null
@@ -1,5 +0,0 @@
-.country-profile-previous-events {
- .key-figures {
- grid-column: 1 / -1;
- }
-}
diff --git a/app/src/views/CountryProfileRiskWatch/CountryRiskSourcesOutput/index.tsx b/app/src/views/CountryProfileRiskWatch/CountryRiskSourcesOutput/index.tsx
index 685aabe6c0..80bd0bebfc 100644
--- a/app/src/views/CountryProfileRiskWatch/CountryRiskSourcesOutput/index.tsx
+++ b/app/src/views/CountryProfileRiskWatch/CountryRiskSourcesOutput/index.tsx
@@ -54,7 +54,7 @@ function CountryRiskSourcesOutput() {
{
link: (
)}
- headingLevel={2}
>
)}
pending={pending}
- headingLevel={2}
>
{selectedHazardType === 'FI' && (
- )}
+ wikiLinkPathName="user_guide/Country_Pages#risk-watch"
>
- {hasImminentEvents && isDefined(countryResponse) && isDefined(countryResponse.iso3) && (
-
- )}
+
+ {strings.riskWatchDescription}
+
+ {hasImminentEvents
+ && isDefined(countryResponse)
+ && isDefined(countryResponse.iso3)
+ && (
+
+ )}
}
>
-
-
- {strings.eapDownloadButtonLabel}
-
- )}
- >
- {strings.eapDescription}
-
-
+
+ {strings.eapDownloadButtonLabel}
+
+ )}
+ spacing="lg"
+ withShadow
+ withPadding
+ withBackground
+ >
+ {strings.eapDescription}
+
-
+
);
}
diff --git a/app/src/views/CountryProfileRiskWatch/styles.module.css b/app/src/views/CountryProfileRiskWatch/styles.module.css
index 043c06b6b3..33dfb32c5d 100644
--- a/app/src/views/CountryProfileRiskWatch/styles.module.css
+++ b/app/src/views/CountryProfileRiskWatch/styles.module.css
@@ -1,26 +1,4 @@
-.risk-watch {
- .country-risk-watch {
- display: flex;
- flex-direction: column;
- gap: var(--go-ui-spacing-2xl);
- padding: var(--go-ui-spacing-2xl) 0;
-
- .risk-by-month-content {
- display: flex;
- flex-direction: column;
- gap: var(--go-ui-spacing-lg);
- }
-
- .eap-section {
- display: flex;
- justify-content: center;
-
- .eap-container {
- border-radius: var(--go-ui-border-radius-lg);
- box-shadow: var(--go-ui-box-shadow-sm);
- background-color: var(--go-ui-color-background);
- max-width: 40rem;
- }
- }
- }
+.eap-container {
+ align-self: center;
+ max-width: 40rem;
}
diff --git a/app/src/views/DrefApplicationForm/Actions/NSActionInput/index.tsx b/app/src/views/DrefApplicationForm/Actions/NSActionInput/index.tsx
index dcdbe53449..81332912c6 100644
--- a/app/src/views/DrefApplicationForm/Actions/NSActionInput/index.tsx
+++ b/app/src/views/DrefApplicationForm/Actions/NSActionInput/index.tsx
@@ -1,6 +1,7 @@
import { DeleteBinTwoLineIcon } from '@ifrc-go/icons';
import {
Button,
+ InlineLayout,
InputSection,
TextArea,
} from '@ifrc-go/ui';
@@ -18,7 +19,6 @@ import NonFieldError from '#components/NonFieldError';
import { type PartialDref } from '../../schema';
import i18n from './i18n.json';
-import styles from './styles.module.css';
type NsActionFormFields = NonNullable
[number];
@@ -61,31 +61,33 @@ function NsActionInput(props: Props) {
return (
-
-
+
+
+ )}
>
-
-
+
+
);
}
diff --git a/app/src/views/DrefApplicationForm/Actions/NSActionInput/styles.module.css b/app/src/views/DrefApplicationForm/Actions/NSActionInput/styles.module.css
deleted file mode 100644
index f244405dd4..0000000000
--- a/app/src/views/DrefApplicationForm/Actions/NSActionInput/styles.module.css
+++ /dev/null
@@ -1,16 +0,0 @@
-.ns-action-input {
- .content {
- display: flex;
- align-items: flex-start;
- gap: var(--go-ui-spacing-md);
- flex-wrap: wrap;
-
- .description-input {
- flex-grow: 1;
- }
-
- .remove-button {
- flex-shrink: 0;
- }
- }
-}
diff --git a/app/src/views/DrefApplicationForm/Actions/NeedInput/index.tsx b/app/src/views/DrefApplicationForm/Actions/NeedInput/index.tsx
index 3f0df58dbf..749da8c874 100644
--- a/app/src/views/DrefApplicationForm/Actions/NeedInput/index.tsx
+++ b/app/src/views/DrefApplicationForm/Actions/NeedInput/index.tsx
@@ -1,6 +1,7 @@
import { DeleteBinTwoLineIcon } from '@ifrc-go/icons';
import {
Button,
+ InlineLayout,
InputSection,
TextArea,
} from '@ifrc-go/ui';
@@ -19,7 +20,6 @@ import NonFieldError from '#components/NonFieldError';
import { type PartialDref } from '../../schema';
import i18n from './i18n.json';
-import styles from './styles.module.css';
type NeedFormFields = NonNullable[number];
const defaultNeedValue: NeedFormFields = {
@@ -61,31 +61,32 @@ function NeedInput(props: Props) {
return (
-
-
+
+
+ )}
>
-
-
+
+
);
}
diff --git a/app/src/views/DrefApplicationForm/Actions/NeedInput/styles.module.css b/app/src/views/DrefApplicationForm/Actions/NeedInput/styles.module.css
deleted file mode 100644
index 9f443a673f..0000000000
--- a/app/src/views/DrefApplicationForm/Actions/NeedInput/styles.module.css
+++ /dev/null
@@ -1,16 +0,0 @@
-.need-input {
- .content {
- display: flex;
- align-items: flex-start;
- gap: var(--go-ui-spacing-md);
- flex-wrap: wrap;
-
- .description-input {
- flex-grow: 1;
- }
-
- .remove-button {
- flex-shrink: 0;
- }
- }
-}
diff --git a/app/src/views/DrefApplicationForm/Actions/index.tsx b/app/src/views/DrefApplicationForm/Actions/index.tsx
index d70672049a..e68a0a7fe1 100644
--- a/app/src/views/DrefApplicationForm/Actions/index.tsx
+++ b/app/src/views/DrefApplicationForm/Actions/index.tsx
@@ -8,7 +8,10 @@ import {
Button,
Container,
DateInput,
+ Description,
+ InlineLayout,
InputSection,
+ ListView,
SelectInput,
TextArea,
} from '@ifrc-go/ui';
@@ -28,6 +31,7 @@ import {
import GoSingleFileInput from '#components/domain/GoSingleFileInput';
import NonFieldError from '#components/NonFieldError';
+import TabPage from '#components/TabPage';
import useGlobalEnums from '#hooks/domain/useGlobalEnums';
import { type GoApiResponse } from '#utils/restRequest';
@@ -40,7 +44,6 @@ import NeedInput from './NeedInput';
import NsActionInput from './NSActionInput';
import i18n from './i18n.json';
-import styles from './styles.module.css';
type GlobalEnumsResponse = GoApiResponse<'/api/v2/global-enums/'>;
type NsActionOption = NonNullable[number];
@@ -191,109 +194,112 @@ function Actions(props: Props) {
);
return (
-
+
-
-
-
- {value.did_national_society && (
-
-
+
+
- )}
-
-
-
-
- {strings.drefFormAddButton}
-
-
-
-
- {value?.national_society_actions?.map((nsAction, i) => (
-
- ))}
+
+
+ )}
+
+
+ {strings.drefFormAddButton}
+
+ )}
+ contentAlignment="end"
+ >
+
+
+
+
+
+
+ {value?.national_society_actions?.map((nsAction, i) => (
+
+ ))}
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
- {value.is_there_major_coordination_mechanism && (
+
+
+
+
+
- )}
-
- {value?.type_of_dref !== TYPE_ASSESSMENT && (
-
- {/* NOTE: Only when RESPONSE */}
- {value?.type_of_dref !== TYPE_IMMINENT && (
-
-
- {strings.drefFormAssessmentReportUploadButtonLabel}
-
- {strings.drefFormUploadTargetingSupportingDescription}
-
- )}
-
-
-
- {strings.drefFormAddButton}
-
-
-
- {value?.needs_identified?.map((need, i) => (
-
+
- ))}
- {value?.type_of_dref !== TYPE_IMMINENT && (
+
+ {value.is_there_major_coordination_mechanism && (
-
- {strings.drefFormGapsInAssessmentDescriptionHeading}
-
-
-
- {strings.drefFormGapsInAssessmentDescriptionPoint1}
-
-
- {strings.drefFormGapsInAssessmentDescriptionPoint2}
-
-
- {strings.drefFormGapsInAssessmentDescriptionPoint3}
-
-
- {strings.drefFormGapsInAssessmentDescriptionPoint4}
-
-
- {strings.drefFormGapsInAssessmentDescriptionPoint5}
-
-
- >
- )}
+ description={strings.drefFormCoordinationMechanismDescription}
>
)}
+
+
+ {value?.type_of_dref !== TYPE_ASSESSMENT && (
+
+
+ {value?.type_of_dref !== TYPE_IMMINENT && (
+
+
+ {strings.drefFormAssessmentReportUploadButtonLabel}
+
+
+ {strings.drefFormUploadTargetingSupportingDescription}
+
+
+ )}
+
+
+ {strings.drefFormAddButton}
+
+ )}
+ >
+
+
+
+
+ {value?.needs_identified?.map((need, i) => (
+
+ ))}
+ {value?.type_of_dref !== TYPE_IMMINENT && (
+
+
+ {strings.drefFormGapsInAssessmentDescriptionHeading}
+
+
+
+ {strings.drefFormGapsInAssessmentDescriptionPoint1}
+
+
+ {strings.drefFormGapsInAssessmentDescriptionPoint2}
+
+
+ {strings.drefFormGapsInAssessmentDescriptionPoint3}
+
+
+ {strings.drefFormGapsInAssessmentDescriptionPoint4}
+
+
+ {strings.drefFormGapsInAssessmentDescriptionPoint5}
+
+
+
+ )}
+ >
+
+
+ )}
+
)}
-
+
);
}
diff --git a/app/src/views/DrefApplicationForm/Actions/styles.module.css b/app/src/views/DrefApplicationForm/Actions/styles.module.css
deleted file mode 100644
index 0a8932cff0..0000000000
--- a/app/src/views/DrefApplicationForm/Actions/styles.module.css
+++ /dev/null
@@ -1,9 +0,0 @@
-.actions {
- display: flex;
- flex-direction: column;
- gap: var(--go-ui-spacing-2xl);
-
- .add-button-container {
- align-self: end;
- }
-}
diff --git a/app/src/views/DrefApplicationForm/DrefImportButton/DrefImportModal/index.tsx b/app/src/views/DrefApplicationForm/DrefImportButton/DrefImportModal/index.tsx
index 7dc4426fd7..095ccc5a70 100644
--- a/app/src/views/DrefApplicationForm/DrefImportButton/DrefImportModal/index.tsx
+++ b/app/src/views/DrefApplicationForm/DrefImportButton/DrefImportModal/index.tsx
@@ -4,6 +4,7 @@ import {
} from 'react';
import { DrefTwoIcon } from '@ifrc-go/icons';
import {
+ ListView,
Modal,
RawFileInput,
} from '@ifrc-go/ui';
@@ -190,24 +191,23 @@ function DrefImportModal(props: Props) {
-
-
- {strings.drefImportSelectFile}
-
-
- {strings.drefImportTemplate}
-
+
+
+
+ {strings.drefImportSelectFile}
+
+
+ {strings.drefImportTemplate}
+
+
);
}
diff --git a/app/src/views/DrefApplicationForm/DrefImportButton/index.tsx b/app/src/views/DrefApplicationForm/DrefImportButton/index.tsx
index be0a8a8347..2dc49dd5c1 100644
--- a/app/src/views/DrefApplicationForm/DrefImportButton/index.tsx
+++ b/app/src/views/DrefApplicationForm/DrefImportButton/index.tsx
@@ -28,7 +28,6 @@ function DrefImportButton(props: Props) {
return (
<>
diff --git a/app/src/views/DrefApplicationForm/EventDetail/index.tsx b/app/src/views/DrefApplicationForm/EventDetail/index.tsx
index d0c88ff38a..286dfe8546 100644
--- a/app/src/views/DrefApplicationForm/EventDetail/index.tsx
+++ b/app/src/views/DrefApplicationForm/EventDetail/index.tsx
@@ -6,6 +6,7 @@ import {
Container,
DateInput,
InputSection,
+ ListView,
NumberInput,
TextArea,
TextInput,
@@ -23,8 +24,10 @@ import {
import GoSingleFileInput from '#components/domain/GoSingleFileInput';
import MultiImageWithCaptionInput from '#components/domain/MultiImageWithCaptionInput';
import SourceInformationInput from '#components/domain/SourceInformationInput';
-import Link, { useLink } from '#components/Link';
+import Link from '#components/Link';
import NonFieldError from '#components/NonFieldError';
+import TabPage from '#components/TabPage';
+import useLink from '#hooks/domain/useLink';
import {
ONSET_SUDDEN,
@@ -35,7 +38,6 @@ import {
import { type PartialDref } from '../schema';
import i18n from './i18n.json';
-import styles from './styles.module.css';
type Value = PartialDref;
type SourceInformationFormFields = NonNullable[number];
@@ -132,11 +134,10 @@ function EventDetail(props: Props) {
);
return (
-
+
{value.type_of_dref === TYPE_RESPONSE && (
-
-
-
- {value.did_it_affect_same_area && (
-
+
+
- )}
- {value.did_it_affect_same_population && (
+ {value.did_it_affect_same_area && (
+
+
+
+ )}
+ {value.did_it_affect_same_population && (
+
+
+
+ )}
+ {value.did_ns_respond && (
+
+
+
+ )}
+ {value.did_ns_request_fund && (
+
+
+
+ )}
+ {
+ value.did_ns_request_fund
+ && value.did_ns_respond
+ && value.did_it_affect_same_population
+ && value.did_it_affect_same_area && (
+
+
+
+ )
+ }
-
- )}
- {value.did_ns_respond && (
+
- )}
- {value.did_ns_request_fund && (
+
+
+ )}
+
+
+ {value.type_of_dref !== TYPE_IMMINENT && (
-
)}
- {
- value.did_ns_request_fund
- && value.did_ns_respond
- && value.did_it_affect_same_population
- && value.did_it_affect_same_area && (
-
-
-
- )
- }
-
-
-
-
-
-
-
- )}
-
- {value.type_of_dref !== TYPE_IMMINENT && (
-
-
-
- )}
-
-
- {strings.drefFormRiskPeopleLabel}
-
-
-
- >
- ) : (
- <>
- {strings.drefFormPeopleAffected}
-
-
-
- >
- )}
- value={value?.num_affected}
- onChange={setFieldValue}
- error={error?.num_affected}
- hint={(
- value?.type_of_dref === TYPE_IMMINENT
- ? strings.drefFormPeopleAffectedDescriptionImminent
- : strings.drefFormPeopleAffectedDescriptionSlowSudden
- )}
- disabled={disabled}
- />
- {value?.type_of_dref !== TYPE_LOAN && value?.type_of_dref !== TYPE_IMMINENT && (
+ {strings.drefFormRiskPeopleLabel}
+
+
+
+ >
+ ) : (
<>
- {strings.drefFormPeopleInNeed}
+ {strings.drefFormPeopleAffected}
>
)}
- name="people_in_need"
- value={value?.people_in_need}
+ value={value?.num_affected}
onChange={setFieldValue}
- error={error?.people_in_need}
- hint={strings.drefFormPeopleInNeedDescriptionSlowSudden}
+ error={error?.num_affected}
+ hint={(
+ value?.type_of_dref === TYPE_IMMINENT
+ ? strings.drefFormPeopleAffectedDescriptionImminent
+ : strings.drefFormPeopleAffectedDescriptionSlowSudden
+ )}
disabled={disabled}
/>
- )}
-
-
-
-
- {/* NOTE: Empty div to preserve the layout */}
-
-
- {value.type_of_dref === TYPE_LOAN && (
-
-
+ {value?.type_of_dref !== TYPE_LOAN
+ && value?.type_of_dref !== TYPE_IMMINENT && (
+ {strings.drefFormPeopleInNeed}
+
+
+
+ >
+ )}
+ name="people_in_need"
+ value={value?.people_in_need}
onChange={setFieldValue}
- error={error?.amount_requested}
+ error={error?.people_in_need}
+ hint={strings.drefFormPeopleInNeedDescriptionSlowSudden}
disabled={disabled}
/>
-
-
- )}
- {value.type_of_dref !== TYPE_LOAN && value.type_of_dref !== TYPE_IMMINENT && (
-
-
- {strings.drefFormWhatWhereWhenDescriptionHeading}
-
-
-
- {strings.drefFormWhatWhereWhenDescriptionPoint1}
-
-
- {strings.drefFormWhatWhereWhenDescriptionPoint2}
-
-
- {strings.drefFormWhatWhereWhenDescriptionPoint3}
-
-
- >
)}
- >
-
-
- )}
- {value.type_of_dref === TYPE_RESPONSE && (
-
-
+
+
+ {/* NOTE: Empty div to preserve the layout */}
+
- )}
- {value.type_of_dref !== TYPE_LOAN && value.type_of_dref !== TYPE_IMMINENT && (
- <>
-
-
- {value.source_information?.map((source, index) => (
-
+
+
- ))}
-
-
- {strings.drefFormSourceInformationAddButton}
-
-
-
-
-
-
- >
- )}
- {value.type_of_dref === TYPE_IMMINENT && (
- <>
-
-
-
+
+
+ )}
+ {value.type_of_dref !== TYPE_LOAN && value.type_of_dref !== TYPE_IMMINENT && (
+
+ {strings.drefFormWhatWhereWhenDescriptionHeading}
+
+
+
+ {strings.drefFormWhatWhereWhenDescriptionPoint1}
+
+
+ {strings.drefFormWhatWhereWhenDescriptionPoint2}
+
+
+ {strings.drefFormWhatWhereWhenDescriptionPoint3}
+
+
+
+ )}
>
+ )}
+ {value.type_of_dref === TYPE_RESPONSE && (
-
-
- {value.source_information?.map((source, index) => (
-
+
+
+ {value.source_information?.map((source, index) => (
+
+ ))}
+
+ {strings.drefFormSourceInformationAddButton}
+
+
+
+
+
+ >
+ )}
+ {value.type_of_dref === TYPE_IMMINENT && (
+ <>
+
+
+
+
+
+
+
+
- ))}
-
+
+
+
+ {value.source_information?.map((source, index) => (
+
+ ))}
{strings.drefFormSourceInformationAddButton}
-
-
-
-
+
- {strings.drefFormUploadSupportingDocumentButton}
-
-
- >
- )}
+
+ {strings.drefFormUploadSupportingDocumentButton}
+
+
+ >
+ )}
+
-
+
);
}
diff --git a/app/src/views/DrefApplicationForm/EventDetail/styles.module.css b/app/src/views/DrefApplicationForm/EventDetail/styles.module.css
deleted file mode 100644
index 29fb7f36f1..0000000000
--- a/app/src/views/DrefApplicationForm/EventDetail/styles.module.css
+++ /dev/null
@@ -1,5 +0,0 @@
-.event-detail {
- display: flex;
- gap: var(--go-ui-spacing-2xl);
- flex-direction: column;
-}
diff --git a/app/src/views/DrefApplicationForm/ObsoletePayloadModal/index.tsx b/app/src/views/DrefApplicationForm/ObsoletePayloadModal/index.tsx
index 4442b40e27..a1a00bc56c 100644
--- a/app/src/views/DrefApplicationForm/ObsoletePayloadModal/index.tsx
+++ b/app/src/views/DrefApplicationForm/ObsoletePayloadModal/index.tsx
@@ -50,7 +50,6 @@ function ObsoletePayloadResolutionModal(props: Props) {
<>
{strings.drefChangesCancelButton}
diff --git a/app/src/views/DrefApplicationForm/Operation/InterventionInput/IndicatorInput/index.tsx b/app/src/views/DrefApplicationForm/Operation/InterventionInput/IndicatorInput/index.tsx
index 06d40069e6..7afae54742 100644
--- a/app/src/views/DrefApplicationForm/Operation/InterventionInput/IndicatorInput/index.tsx
+++ b/app/src/views/DrefApplicationForm/Operation/InterventionInput/IndicatorInput/index.tsx
@@ -1,6 +1,8 @@
import { DeleteBinTwoLineIcon } from '@ifrc-go/icons';
import {
Button,
+ InlineLayout,
+ ListView,
NumberInput,
TextInput,
} from '@ifrc-go/ui';
@@ -12,12 +14,9 @@ import {
useFormObject,
} from '@togglecorp/toggle-form';
-import NonFieldError from '#components/NonFieldError';
-
import { type PartialDref } from '../../../schema';
import i18n from './i18n.json';
-import styles from './styles.module.css';
type PlannedInterventionFormFields = NonNullable[number];
type IndicatorFormFields = NonNullable[number];
@@ -54,37 +53,42 @@ function IndicatorInput(props: Props) {
: undefined;
return (
-
-
-
-
-
+
+
+ )}
+ spacing="sm"
+ >
+
-
-
-
+
+
+
+
);
}
diff --git a/app/src/views/DrefApplicationForm/Operation/InterventionInput/IndicatorInput/styles.module.css b/app/src/views/DrefApplicationForm/Operation/InterventionInput/IndicatorInput/styles.module.css
deleted file mode 100644
index 5883576102..0000000000
--- a/app/src/views/DrefApplicationForm/Operation/InterventionInput/IndicatorInput/styles.module.css
+++ /dev/null
@@ -1,10 +0,0 @@
-.indicator {
- display: grid;
- grid-gap: var(--go-ui-spacing-sm) var(--go-ui-spacing-md);
- grid-template-columns: 10fr 4fr 1fr;
- align-items: center;
-
- @media screen and (max-width: 30rem) {
- grid-template-columns: 1fr;
- }
-}
diff --git a/app/src/views/DrefApplicationForm/Operation/InterventionInput/index.tsx b/app/src/views/DrefApplicationForm/Operation/InterventionInput/index.tsx
index 5f0b4b974c..61d57327ba 100644
--- a/app/src/views/DrefApplicationForm/Operation/InterventionInput/index.tsx
+++ b/app/src/views/DrefApplicationForm/Operation/InterventionInput/index.tsx
@@ -3,7 +3,9 @@ import { DeleteBinTwoLineIcon } from '@ifrc-go/icons';
import {
Button,
Container,
+ InlineLayout,
InputSection,
+ ListView,
NumberInput,
TextArea,
} from '@ifrc-go/ui';
@@ -27,7 +29,6 @@ import { type PartialDref } from '../../schema';
import IndicatorInput from './IndicatorInput';
import i18n from './i18n.json';
-import styles from './styles.module.css';
type PlannedInterventionFormFields = NonNullable[number];
type IndicatorFormFields = NonNullable[number];
@@ -98,7 +99,6 @@ function InterventionInput(props: Props) {
return (
)}
>
-
- }
- >
- {strings.drefFormRemoveIntervention}
-
-
+ }
+ spacing="sm"
+ >
+ {strings.drefFormRemoveIntervention}
+
+ )}
+ />
)}
+ empty={isNotDefined(value.indicators) || value.indicators.length === 0}
+ emptyMessage={strings.drefFormNoIndicatorMessage}
+ withCompactMessage
>
-
- {value?.indicators?.map((indicator, i) => (
-
- ))}
- {(isNotDefined(value.indicators) || value.indicators.length === 0) && (
-
- {strings.drefFormNoIndicatorMessage}
-
- )}
+
+
+ {value?.indicators?.map((indicator, i) => (
+
+ ))}
+
);
diff --git a/app/src/views/DrefApplicationForm/Operation/InterventionInput/styles.module.css b/app/src/views/DrefApplicationForm/Operation/InterventionInput/styles.module.css
deleted file mode 100644
index fd3570c3fe..0000000000
--- a/app/src/views/DrefApplicationForm/Operation/InterventionInput/styles.module.css
+++ /dev/null
@@ -1,10 +0,0 @@
-.intervention-input {
- .action {
- display: flex;
- justify-content: flex-end;
- }
-
- .empty-message {
- color: var(--go-ui-color-text-light);
- }
-}
diff --git a/app/src/views/DrefApplicationForm/Operation/ProposedActionsInput/ActivitiesInput/index.tsx b/app/src/views/DrefApplicationForm/Operation/ProposedActionsInput/ActivitiesInput/index.tsx
index 19e51ebd54..01e361e73c 100644
--- a/app/src/views/DrefApplicationForm/Operation/ProposedActionsInput/ActivitiesInput/index.tsx
+++ b/app/src/views/DrefApplicationForm/Operation/ProposedActionsInput/ActivitiesInput/index.tsx
@@ -2,6 +2,7 @@ import { DeleteBinLineIcon } from '@ifrc-go/icons';
import {
Container,
IconButton,
+ ListView,
SelectInput,
TextArea,
} from '@ifrc-go/ui';
@@ -65,7 +66,6 @@ function ActivitiesInput(props: Props) {
return (
)}
>
-
-
+
+
+
+
);
}
diff --git a/app/src/views/DrefApplicationForm/Operation/ProposedActionsInput/index.tsx b/app/src/views/DrefApplicationForm/Operation/ProposedActionsInput/index.tsx
index 5c98a5fb74..b0cdaa4301 100644
--- a/app/src/views/DrefApplicationForm/Operation/ProposedActionsInput/index.tsx
+++ b/app/src/views/DrefApplicationForm/Operation/ProposedActionsInput/index.tsx
@@ -5,8 +5,8 @@ import {
} from 'react';
import {
Button,
- Container,
InputSection,
+ ListView,
NumberInput,
SelectInput,
} from '@ifrc-go/ui';
@@ -191,7 +191,6 @@ function ProposedActionsInput(props: Props) {
/>
-