I have three pages in my web app: main-view, offers-view and chats-view connected through a tabbed nav bar. On offers and chats the user can click on a right menu and choose to see a list of offers that they created.
Currently this list of ‘posted offers’ gets added to the offer-view but I really want it to either (1) get added to the offer view and switch the user to that view OR (2) get added to whatever the current view is.
So as you can see the list will show up on my view-offers even if the user is still looking at the view-chats instead. That means the user wont see the posted-offers list unless they go choose the offers-view tab manually.
I tried adding a on pageMounted to force the router to jump to view-offers no matter what but it didnt get triggered.
I would prefer to have posted-offers load on top of the current view (view-offers or view-chats) but no idea how to set data-view to be the current view?
Not exactly … I have two views (offer-view and chats-view) where the user can select a right side menu. In there they can choose to see all offers they have posted. When they select that option what I have been doing is loading /post-offers/ in the #offers-view (as you see in the HTML above).
The issue with this is that if the user selected the right side menu from the chats-view then they don’t see the new posted-offers view which is inside the offers-view and not visible.
Is there a way to do one of the following things?
Option 1: Force the #offer-view to become the main view after the user selects “Posted Offers”
Option 2: Be able to open /posted-offers/ in the current view which could be either offers-view or chat-view
This same code exists in chats.html to allow the user to click on their avatar and activate the right panel menu.
The postoffers.html is a nav bar with a back button and then a scrollable list of Offer cards. The way it works currently is this view gets added to the offers-view.
Hope the above helps clear up the structure. The user can get to the Posted Offers by either:
clicking on the avatar image in the top right while on the Offers (offers-view) page, then clicking on Posted Offers and the list will become visible immediately
clicking on the avatar image in the top right while on the Chats (chats-view) page, then clicking on Posted Offers and the list will NOT become visible but the user has to choose the Offers tab on the bottom nav to switch views to see the Posted Offers list.