Closed romanoe closed 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 :)
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 😄
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