Skip to content
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

Adding Forecast DB model #575

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Adding Forecast DB model #575

wants to merge 3 commits into from

Conversation

astride
Copy link

@astride astride commented Jan 8, 2025

Creating a Forecast model and DB table.

@astride astride linked an issue Jan 8, 2025 that may be closed by this pull request
@astride astride requested a review from trulshj January 8, 2025 13:39

public DateOnly MonthYear { get; set; }

public int OriginalValue { get; set; }
Copy link
Author

Choose a reason for hiding this comment

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

Do we actually need to save the original value? This value will be retrieved and calculated based on information from the staffing table (and other tables?) on every single page load regardless. Or am I overlooking something?

Copy link
Contributor

Choose a reason for hiding this comment

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

That depends if we want to actually recalculate every single time or if we want to pre-calculate it and save and then regenerate periodically or whenever the staffing table updates.

Copy link
Author

Choose a reason for hiding this comment

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

Agreed. I do believe Odd Morten said (before you joined) that everytime someone opens the Prognose page, he wants real-time data to be pulled. @idamand @MariaBonde Am I remembering that correctly?

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe that is correct @astride!

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes I think he said that prognose should be updated every time bemanning gets updated? Sidenote, I was thinking about how it will work if there is an adjusted value, and then bemanning gets updated with a new value, but in that case, Odd Morten said to just save the higher number I think?

Copy link
Author

Choose a reason for hiding this comment

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

@MariaBonde I think you are right, but also: If a change is made in Bemanning after you have opened the Prognose page, you will only see those changes on the Prognose page if you manually refresh the Prognose page or you re-enter it. Does that sound right?

The Bemanning page also seems to work that way; if someone else changes something in Bemanning while you have the Bemanning page open, those changes will be reflected on your screen only after a manual refresh.

Copy link
Author

Choose a reason for hiding this comment

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

@MariaBonde I agree on the sidenote!

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes I think that sounds reasonable, especially if bemanning works that way

backend/Core/Forecasts/Forecast.cs Outdated Show resolved Hide resolved
backend/Core/Forecasts/Forecast.cs Show resolved Hide resolved
Copy link
Contributor

@MariaBonde MariaBonde left a comment

Choose a reason for hiding this comment

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

lgtm!!

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.

Add Forecast DB model
4 participants