|
I have a model of pay rates that I am trying to translate into pay charts. Here is the link to the GitHub code The current Department Pay Rates page has navigation links to: "Sales", "Management", "Senior Management" and "Hospitality" I want the Department Pay Rates page to change to the following: "Sales", "Management Departments" and "Hospitality"
edit: I want the new "Management Departments" navigation link to connect to a new page that contains two pay charts, one above the other (scrollable): "Management" & "Senior Management" each chart labeled with a title. Any ideas on how to make that change? |
|
Hi, You could try adding a subDept property to your deptList struct and adding the "Management" and "Senior Management" depts to it.
Then create a new "ManagementDepartmentsView" to loop over the subDept.
and inside the PayRateView ForEach add this conditional
Hopefully thats what your looking for. |
|
@Hectorcrdna That works perfectly! Unfortunately, I realized that I misworded my question/desired outcome... :/. Sorry! What I should have said was: I want the new "Management Departments" navigation link to connect to a new page that containts both the "Management" & "Senior Management" pay rate charts on the same page, Senior Management chart below the Management chart. So after clicking on "Management Departments" the next page should not have any links. It should have two pay charts that you can scroll through. I have edited my original post in attempt to clarify for any others that may want to answer. I'm not sure how to phrase that better, but I realize my explaination is a bit clunky. Does that make sense? The following code only shows a Senior Management paychart. I don't know why the Management pay chart is not showing. Also, I haven't figured out how to have two titles, one for "Management" about the management pay chart and one for "Senior Management" above the senior management pay chart both on the same page.
|
|
Hi, It's all good, it happens, I think i understand what your trying to do and for that you would wrap each ForEach in it's own Section then giving it a title, one for "Management" and one for "Senior Management".
|
|
SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's all new Paywall Editor allow you to remotely configure your paywall view without any code changes or app updates.
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.