-
Notifications
You must be signed in to change notification settings - Fork 33
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
Conversation
… days left based on project end date
There was a problem hiding this 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
, andinvestmentEndDate
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)
…o end date is set
…for missing End Date
src/Angor/Client/Pages/View.razor
Outdated
{ | ||
endDate = project.ProjectInfo.Stages.First().ReleaseDate; | ||
} | ||
throw new InvalidOperationException("Project must have a valid End Date. Projects without End Date are not supported."); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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;
There was a problem hiding this 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
Can you suggest how to handle it? |
No description provided.