8000 Enhance investment status display by miladsoft · Pull Request #414 · block-core/angor · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Enhance investment status display #414

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 9, 2025
Merged

Conversation

miladsoft
Copy link
Member

No description provided.

@Copilot Copilot AI review requested due to automatic review settings June 7, 2025 10:01
Copy link
@Copilot 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

Enhance the investment status display by introducing distinct logic for projects that haven't started yet, handling missing end dates via stage fallbacks, and updating the days-left calculation.

  • Introduce currentDate, startDate, and investmentEndDate variables
  • Add fallback to stage release date when EndDate is undefined
  • Split status display into “days until start,” “days left,” and “after end” branches
Comments suppressed due to low confidence (1)

src/Angor/Client/Pages/View.razor:407

  • [nitpick] This new branch for displaying days until start isn't covered by existing tests. Consider adding a unit test for a project with a future start date.
@if (currentDate < startDate)

{
endDate = project.ProjectInfo.Stages.First().ReleaseDate;
}
throw new InvalidOperationException("Project must have a valid End Date. Projects without End Date are not supported.");
Copy link
Collaborator

Choose a reason for hiding this comment

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

What actually happens when we throw in the html?

Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need to throw an exception, by this logic you would also throw an exception if start date is null.
We don't expect that t o happen
just keep this line
var endDate = project.ProjectInfo.EndDate;

Copy link
Collaborator
@DavidGershony DavidGershony left a comment

Choose a reason for hiding this comment

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

I think the verification should be handled without crashing the UI

@dangershony
Copy link
Member

I think the verification should be handled without crashing the UI

Can you suggest how to handle it?
Milad previously handled it quietly, but then you get invalid data supressed.
I don't see how end date will not exist

@dangershony dangershony merged commit 6e59acd into main Jun 9, 2025
3 checks passed
@dangershony dangershony deleted the fix/investment-status-logic branch June 9, 2025 16:46
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
0