swiss-seismological-service / REIA-web

Frontend report generation for results of the near real time event specific loss calculations.
GNU Affero General Public License v3.0
0 stars 1 forks source link

Feature: scenario layout #36

Closed romanoe closed 6 months ago

romanoe commented 6 months ago

Proposition of a scenario layout. The layout is updated based on riskAssessment provided to DataComponent. The elements which are type dependent are :

Any more elegant approaches to handle this are welcomed. 😄

Edit : Also Version display is dependent

schmidni commented 6 months ago

Basically, lgtm. I think there is almost no "elegant" way of handling without a lot of (currently still unnecessary) effort.

What I mentioned and would have tried to do, is to logically separate the code for the scenario version. ie. display the normal RIA and then, if it is a scenario, change the relevant parts. That way it would imo be a bit easier to find out what happens where.

But I leave it up to you to decide how you prefer it :)

romanoe commented 6 months ago

Basically, lgtm. I think there is almost no "elegant" way of handling without a lot of (currently still unnecessary) effort.

What I mentioned and would have tried to do, is to logically separate the code for the scenario version. ie. display the normal RIA and then, if it is a scenario, change the relevant parts. That way it would imo be a bit easier to find out what happens where.

But I leave it up to you to decide how you prefer it :)

I prefer to keep it this way for now, but if significant layout differences arise, we might consider having two different layouts to avoid complicating the logic of the DataComponent. Let's wait and see if there are any new layout requests 😄