how can redirect to View Page in a Panel?

Hey guys, i have a saas project with 3 panel, Panel SuperAdmin, Panel Company, Panel Coowner, The Panel Coowner it's about 90% only for view information, however i have the typical menu with call to index view and show the table with action, i can control the actions with roles and permission, however in the panel coowner i have menu that only need show information, so my question is, how can configure the menu for show the only the view page, i mean go to view no index with the click... like a redirection, i dont' wanna make a livewire page, i only need make a redirect or show only the view page.. thank you guys!
11 Replies
Dennis Koch
Dennis Koch7mo ago
I don’t really understand where you want to redirect. The default ViewAction should redirect to the ViewPage already
TranceCode
TranceCodeOP7mo ago
sorry bro, i mention the redirect like an option, but i mean click in the menu and show the view, not the table! how can do this? Filament have any configuration for this? or if you can give me an orientation i really appreciate that 😃
No description
awcodes
awcodes7mo ago
How would that even work? The view requires a record. So you would have to hard code a record id for the navigation. If that’s what you want to do though. You can disable the resource navigation and manually add navigation items to the panel.
TranceCode
TranceCodeOP7mo ago
It would be possible because in some cases there will only be one record for the end user, for that reason I seek to directly show the information friend
No description
awcodes
awcodes7mo ago
Well, I told you how. 🙂
TranceCode
TranceCodeOP7mo ago
Thank you bro! now understand @awcodes and @Dennis Koch really appreciate your tips
awcodes
awcodes7mo ago
Seams odd to go to the view instead of the edit if there’s only one record though. But to each their own. Also make sure there’s no possible way to delete that record in the db. 😅
TranceCode
TranceCodeOP7mo ago
Of course, I think that if it does not exist it will not load anything, but if it does exist, I will take it to the view view, for this I will consult the id of that record that is associated with the logged in user, there it will show only that record, it is impossible not to have none related anyway... 😅
awcodes
awcodes7mo ago
It’s possible with a custom page, but not a view page. The view page has to have a record otherwise it will 404.
TranceCode
TranceCodeOP7mo ago
😅 😂 Well, I'll better leave it for a future update, for now it's going to take me more time hahahaha thanks thanks bro!
Want results from more Discord servers?
Add your server