App Access
1. Tree Structure of Access Rights
App Access rights in a hierarchical tree structure component.Access rights are divided into "parent" nodes (main categories) and "child" nodes (subcategories). Each parent node can contain multiple child nodes representing specific access rights under that category. Users can expand or collapse nodes to view their children (sub-rights).
App Access (Light-Mode)
App Access (Dark-Mode)
2. Add Parent Node
The "Add Parent Node" button allows users to create a new access right at the parent level. When clicked, a modal form appears where users can input the name of the new parent access right. After create, the parent node is added to the tree structure and is initially empty with no child nodes.
Add Parent Node (Light-Mode)
Add Parent Node (Dark-Mode)
3. Add Child Node
Next to each parent node, there is a "+" button that allows users to add a child access right to that parent node. When clicked, a modal form appears where users can input the name and code for the new child access right. After Create, the child node is added under the selected parent node.
Add Child Node (Light-Mode)
Add Child Node (Dark-Mode)
4. Edit Access Rights
Next to each parent and child node, there is an edit (pencil) button. When clicked, it opens a modal form where users can modify the name (and code for child nodes) of the access right. After editing and saving, the updated values are reflected in the tree structure.
5. Delete Access Rights
Next to each parent and child node, there is a delete (trash) button. When clicked the selected access right (parent or child) is removed from the tree. Deleting a parent node will also remove all its child nodes.
6. Submit Access Rights
At the bottom of the page, there is a "Submit" button. When clicked, the current structure of access rights is sent to the server for saving.
7. Modal Form for Adding/Editing Nodes
A modal form for adding and editing both parent and child access rights. For parents, only the name is required. For children, both the name and a unique access right code (within 3-10 characters) are required. The form validates the input before submitting to ensure the necessary information is provided.
8. Fetching Existing Access Rights
The app fetches existing access rights for the given appId from the server when the component loads.
Modified at 2024-10-14 14:37:52