2. Admin Management - Add Sales Code table under Sales Code table after Subscription Management table this table is able to view, edit, add, delete this table only accessible if user_type == 1
Logic: User Management Table: Only User Type not 0 can access User Management table Subscription Management Table: Only MAF Admin: User ID = 1; so only MAF Admin can access Subscription Management Sales Code Management Table: Only User Type = 1 can access Sales Code Management table, once user is assigned in sales code management table, their user type will become 1 MAF Admin will assign sales code to Agency (User Type becomes 1; Parent is MAF) first, then Agency will be able to access the Sales Code Management table to assign sales code to each agent (Parent is Agency) MAF Admin is able to view all sales agencies/agents, other agencies only can view their immediate agencies or agents. When deleting row in the Sales Code, it is subject to below validation:
if client is linked to the agency/agent’s sales code, deletion will be rejected. You may need to request MAF Admin to delete the sale code from the client first before the row can be deleted if agency has children code, deletion will be rejected
3. MAF Admin can view all clients 4. Agency/Agent can only view their clients 5. Only MAF Admin can update clients values so MAF Admin will input the Agency/Agent’s sales code to the client user or user can input sales code at registration Details: Open inspect to check the data in network to determine user type is 1 or 0 SALES_CODE_TYPES: 0: client 1: ‘AGENCY’, 2: ‘AGENT’ so if 0, means client if 1, means agency if 2, means agent or sales so user_type is the value to control; if the user in sales code, then should be 1 or 2; otherwise, it is 0 Any sales agency is able to create sales code and assign to the agent so sales agency is able to create his own sales agencies or sales agents under his umbrella; Sale codes can be assigned to user with existing account, user can be under any agency if a sales code is assigned to the user; so the user could be both client and sales agent/agency |
Add Comment