Few questions from beginner

Hello everybody. I'm new to Filament and everything seems understandable for me. I have googled a lot, but didn' find answers to mz questions... I would like to do an app for warehouse. What i would like to do/need in first: 1. Different dashboards for different user types/roles (admin,general type user, warehouse operator etc.) with one login form and use username instead of email. 2. Completely custom dashboard theme/template (optional, not neccesary at start) 3. Insert data to multiple tables: Warehouse transactions logging. For example, make record to table with material deposited in mass storage and make record to another table about this action in the same time. Then have two views - of material in mass storage and a list of transactions. Kindly asking someone can point me the right direction (explanation, tutorials, etc.) Many thanks in advance and also huuuge thanks for Filament creators.
5 Replies
toeknee
toeknee16mo ago
You’d be better off using policies for resource and widget control’s but if you are wanting different themes etc you could look at the #multi-context and #theme-color-switcher 3. Is just relationship manager by the sounds of it
Michal Čabala
Michal Čabala16mo ago
Many thanks for answer. I made a further research, documentation reading etc. According to this, I can do all what I need by user roles and permissions only, doesn't need different dashboards for user types. So now, I would like to: 1. Overwrite routes to use "admin panel as frontend". So URL for the admin panel will be root, not with the admin (or whatever) slug in URL. 2. (Warehouse app) I have a model, for example StoredMaterial (palletes). I would like to do that admin/general user can see/edit/delete all records, but warehouse opersator can see/edit/delete only oldest palletes of each material (for FIFO purposes). What is the best way to do that? 3. Model StoredMaterialTransactions (or History), which will be the same structure as StoredMaterial, but it will have extra field with palette status (1 - deposited, 2 - withdrawn, 3 - deleted, 4 - updated etc.) So when warehouse operator will deposit (create) or withdraw (delete) a palette with material, it will also make record to Transactions about that. Hope It's understandable in poor english. Many thanks for your time.
Andrew Wallo
Andrew Wallo16mo ago
Well I think the help section is more for issues and general questions rather than people to tell you how to build your application but if you want to look for a quick setup there are many authorization and permission packages on Filament’s website in the plugin section You can learn from those plugins as well, they are a great opportunity to learn as well as Filament documentation
John
John16mo ago
You can set the root path to empty in the config file: 'path' => env('FILAMENT_PATH', ''), For 2. you can manage that within standard Laravel policy. With additional queries to limit the table results, either in a Laravel global scope or in Filament getTableQuery. 3. Use Laravel model events for that.
Michal Čabala
Michal Čabala16mo ago
Thank you! So far, working great! Many many thanks.