Skip to content

Add partner base names to agreement alerts#2642

Merged
pylipp merged 3 commits intomasterfrom
base-names-in-agreemnet-alerts
Mar 30, 2026
Merged

Add partner base names to agreement alerts#2642
pylipp merged 3 commits intomasterfrom
base-names-in-agreemnet-alerts

Conversation

@pylipp
Copy link
Copy Markdown
Contributor

@pylipp pylipp commented Mar 25, 2026

@pylipp pylipp requested a review from aerinsol March 25, 2026 15:16
@sentry
Copy link
Copy Markdown

sentry Bot commented Mar 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.28%. Comparing base (181eeb4) to head (797e12f).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2642      +/-   ##
==========================================
- Coverage   78.28%   78.28%   -0.01%     
==========================================
  Files         281      281              
  Lines       20603    20609       +6     
  Branches     2103     2105       +2     
==========================================
+ Hits        16129    16133       +4     
- Misses       4426     4428       +2     
  Partials       48       48              
Flag Coverage Δ
backend 99.50% <ø> (ø)
frontend 70.55% <ø> (-0.01%) ⬇️
sharedComponents 68.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pylipp pylipp force-pushed the base-names-in-agreemnet-alerts branch from 6a750af to 8f62101 Compare March 25, 2026 16:18
@pylipp
Copy link
Copy Markdown
Contributor Author

pylipp commented Mar 30, 2026

@aerinsol review appreciated :)
For the last popup I was considering to but the base information at the end, like:

BoxCare has a transfer request OPEN with you with the following details:

Created By: Jane Doe on ...
From BoxCare
Involved bases: Samos, Athens

X Reject    V Accept

Copy link
Copy Markdown
Member

@aerinsol aerinsol left a comment

Choose a reason for hiding this comment

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

@pylipp there is some inconsistency with how the request version (final screencap of the four) is bolding names and bases. I'd like that to be resolved before committing. My suggestions:

  • Bold the status (or OPEN in this case)
  • Make sure there's a colon : after From

And yes, I like the separate 'involved bases' section you have - clearer and faster to read.

@pylipp pylipp force-pushed the base-names-in-agreemnet-alerts branch from 8f62101 to 797e12f Compare March 30, 2026 20:25
@pylipp pylipp requested a review from Copilot March 30, 2026 20:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds partner base names to the transfer agreement overlay dialogs so users can see which bases are involved when reviewing/accepting/terminating agreements.

Changes:

  • Extend transfer-agreement table row data with partnerBases.
  • Populate partnerBases from GraphQL sourceBases / targetBases (currently only for bidirectional agreements).
  • Render partner base names in the agreement overlay text for several agreement states.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
front/src/views/Transfers/TransferAgreementOverview/TransferAgreementOverviewView.tsx Adds partnerBases to transformed table rows and fills it from sourceBases/targetBases for bidirectional agreements.
front/src/views/Transfers/TransferAgreementOverview/components/TransferAgreementOverlay.tsx Displays partner base names in the overlay dialog copy across multiple agreement states.

Comment on lines 262 to +266
agreementRow.partnerOrg = element.targetOrganisation.name;
agreementRow.partnerBases = element.targetBases?.map((base) => base.name) ?? [];
} else if (currentOrgId === targetOrgId) {
agreementRow.partnerOrg = element.sourceOrganisation.name;
agreementRow.partnerBases = element.sourceBases?.map((base) => base.name) ?? [];
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

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

partnerBases is only populated for Bidirectional agreements. For SendingTo / ReceivingFrom agreements the field stays as the default empty array, so the overlay will display no base names even though sourceBases/targetBases are available in the fragment. Populate partnerBases in the non-bidirectional branches as well (use targetBases when the partner is the target org, and sourceBases when the partner is the source org).

Copilot uses AI. Check for mistakes.
Comment on lines 45 to 49
Created By: <Text as="b">{data.requestedBy}</Text> on{" "}
<Text as="b">{data.requestedOn}</Text>
<br />
From <Text as="b">{data.partnerOrg}</Text>
Involved base(s): {data.partnerBases.join(", ")}
</chakra.span>
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

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

data.partnerBases.join(", ") renders an empty string when partnerBases is empty/undefined (e.g., agreements can legitimately have no active bases). Consider rendering a fallback like “All bases”/“—”, or conditionally hiding the line when there are no base names to show.

Copilot uses AI. Check for mistakes.
Comment on lines +69 to 71
Your transfer agreement with {data.partnerOrg} (involved base(s):{" "}
{data.partnerBases.join(", ")}) is currently <Text as="b">ACCEPTED</Text>.
</chakra.span>
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

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

If partnerBases is empty, this parenthesized “(involved base(s): …)” renders as (involved base(s): ), which looks broken. Use a conditional/fallback string to avoid showing empty parentheses.

Copilot uses AI. Check for mistakes.
Comment on lines +91 to 93
Your transfer agreement with {data.partnerOrg} (involved base(s):{" "}
{data.partnerBases.join(", ")}) is currently <Text as="b">DECLINED</Text>.
</chakra.span>
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

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

If partnerBases is empty, this parenthesized “(involved base(s): …)” renders as (involved base(s): ), which looks broken. Use a conditional/fallback string to avoid showing empty parentheses.

Copilot uses AI. Check for mistakes.
Comment on lines +110 to 112
Your transfer agreement with {data.partnerOrg} (involved base(s):{" "}
{data.partnerBases.join(", ")}) is currently <Text as="b">ENDED</Text>.
</chakra.span>
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

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

If partnerBases is empty, this parenthesized “(involved base(s): …)” renders as (involved base(s): ), which looks broken. Use a conditional/fallback string to avoid showing empty parentheses.

Copilot uses AI. Check for mistakes.
@pylipp pylipp merged commit 201aa89 into master Mar 30, 2026
18 checks passed
@pylipp pylipp deleted the base-names-in-agreemnet-alerts branch March 30, 2026 20:38
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