Hello forum
i need some help from experts here.
im creating a small project where i want to have 3 kind of users to login and based on there role go to their page.
I have a Admin role, Sales Rep role and Retailer role.
I have a Main.mxml that has a viewstack on it loading each module.
I have 4 Modules: Login.mxml, Admin.mxml, Sales.mxml and Retailer.mxml.
<?xml version="1.0" encoding="utf-8"?>
<data>
<user>
<userID>01</userID>
<userName>admin</userName>
<email>xxx</email>
<password>123456</password>
<role>Admin</role>
</user>
<user>
<userID>02</userID>
<userName>user</userName>
<email>xxx</email>
<password>123456</password>
<role>Sales</role>
</user>
<user>
<userID>03</userID>
<userName>retailer</userName>
<email>xxx</email>
<password>123456</password>
<role>Retailer</role>
</user>
</data>
I want to be able to when one of this 3 login it send them to their module.
What is the best way to do this
Any help please