Skip to content

Feature/eap full form#2122

Merged
frozenhelium merged 10 commits intoproject/early-action-protocolsfrom
feature/eap-full-form
Jan 13, 2026
Merged

Feature/eap full form#2122
frozenhelium merged 10 commits intoproject/early-action-protocolsfrom
feature/eap-full-form

Conversation

@shreeyash07
Copy link
Copy Markdown
Collaborator

@shreeyash07 shreeyash07 commented Dec 4, 2025

Summary

Implement of full eap form with add edit functionality

Depends On

IFRCGo/go-api#2590

Changes

  • Add and edit form functionality
  • Add proper guidance text in the form fields
  • Add Input component for contact, approaches, indicators other form fields
  • Add approval modal for eap full form

This PR Ensures:

  • No typos or grammatical errors
  • No conflict markers left in the code
  • No unwanted comments, temporary files, or auto-generated files
  • No inclusion of secret keys or sensitive data
  • No console.log statements meant for debugging
  • All CI checks have passed

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Dec 4, 2025

⚠️ No Changeset found

Latest commit: 9e4a407

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@shreeyash07 shreeyash07 changed the base branch from develop to project/early-action-protocols December 4, 2025 09:38
@frozenhelium frozenhelium force-pushed the project/early-action-protocols branch 3 times, most recently from d10a0db to 5ccc1bc Compare December 11, 2025 10:04
@shreeyash07 shreeyash07 force-pushed the feature/eap-full-form branch 2 times, most recently from 0adbb63 to c9c84d0 Compare December 12, 2025 05:10
@shreeyash07 shreeyash07 force-pushed the feature/eap-full-form branch from c9c84d0 to a172ce2 Compare December 12, 2025 05:33
@frozenhelium frozenhelium force-pushed the project/early-action-protocols branch from e52c062 to 4c88096 Compare December 15, 2025 06:59
@shreeyash07 shreeyash07 force-pushed the feature/eap-full-form branch 2 times, most recently from f8aabc4 to 1cb8802 Compare December 15, 2025 10:45
@shreeyash07 shreeyash07 force-pushed the feature/eap-full-form branch from 1cb8802 to 04d7790 Compare December 19, 2025 11:14
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not prefix string key with namespace

Comment thread app/src/views/EapFullForm/EapActivationProcess/index.tsx Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not prefix string key with namespace, lets remove unused keys

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here too

Comment on lines +70 to +96
function getNextStep(current: TabKeys, direction: 1 | -1) {
if (direction === 1) {
const mapping: { [key in TabKeys]?: TabKeys } = {
overview: 'riskAnalysis',
riskAnalysis: 'triggerModel',
triggerModel: 'selectionActions',
selectionActions: 'eapActivation',
eapActivation: 'meal',
meal: 'nationalSocietyCapacity',
nationalSocietyCapacity: 'financeLogistics',
};
return mapping[current];
}
if (direction === -1) {
const mapping: { [key in TabKeys]?: TabKeys } = {
financeLogistics: 'nationalSocietyCapacity',
nationalSocietyCapacity: 'meal',
meal: 'eapActivation',
eapActivation: 'selectionActions',
selectionActions: 'triggerModel',
triggerModel: 'riskAnalysis',
riskAnalysis: 'overview',
};
return mapping[current];
}
return undefined;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create a utility function and reuse it

Comment thread app/src/views/EapFullForm/schema.ts Outdated
Comment thread app/src/views/EapFullForm/styles.module.css Outdated
Comment thread app/src/views/SimplifiedEapForm/EnablingApproaches/index.tsx
Comment on lines +46 to +50
alert.show('Status updated successfully!', { variant: 'success' });
},
formData: true,
onFailure: () => {
alert.show('Failed to update the status!', { variant: 'danger' });
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add translations

<NumberInput
label={strings.financeTotalBudgetLabel}
name="total_budget"
value={value?.total_budget}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As value is always defined, I don't think we need a ? here

fileIdToUrlMap={fileIdToUrlMap}
onChange={setFieldValue}
url="/api/v2/eap-file/multiple/"
value={value?.meal_relevant_files}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In here too


const strings = useTranslation(i18n);
const error = getErrorObject(formError);
const noop = () => { };
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is there here? Add note.

Comment on lines +157 to +169
onChange={setFieldValue}
disabled={disabled}
/>
</InputSection>
<InputSection
title={strings.objectiveTitle}
description={strings.objectiveDescription}
withAsteriskOnTitle
>
<TextArea
label={strings.workWithGovernmentDescriptionLabel}
name="objective"
value={value?.objective}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why aren't errors handled here?

emptyMessage={strings.noIndicatorsMessage}
>
<ListView layout="block">
{value.indicators?.map((indicator, i) => (
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add NonFieldError plz

Comment on lines +148 to +150
const selectedSectors = value?.planned_operations?.map(
({ sector }) => sector,
);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

memo plz

Comment on lines +193 to +195
const selectedApproaches = value?.enable_approaches?.map(
({ approach }) => approach,
);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useMemo pls

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here too

Comment thread app/src/views/EapFullForm/index.tsx Outdated
Comment on lines +523 to +525
const latestFullEapId = eapDetailResponse?.full_eap_details?.toSorted(
(a, b) => compareNumber(a.version, b.version, -1),
)?.[0]?.id;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

memo pls

@shreeyash07 shreeyash07 force-pushed the feature/eap-full-form branch from 79e1e7a to 2da8205 Compare January 8, 2026 08:28
[onFieldChange],
);

return (
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section currently looks like:

Image

But should look like:

Image

There a a lot of other section which should be laid out similary

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed this comment can we do this in another PR?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved this changes please check @frozenhelium

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants