Skip to content

Implement roles and privileges management components

Laxmana Arasavilli requested to merge ui_feature_roles-management-screen into dev

User description

  • Added PrivilegeFilterSection for filtering privileges with search and date range options.
  • Created Privileges component to display and manage privileges with pagination.
  • Developed Roles component for managing roles with search and filtering capabilities.
  • Introduced RolesFilterSection for filtering roles based on search and date range.
  • Implemented RolesPrivilegeMapping for managing role-privilege associations.
  • Configured getPrivilegeColumns and getRoleColumns for table column definitions.
  • Added mock data for privileges and roles to facilitate development.
  • Created ToggleSwitch component for toggling options in the UI.
  • Defined response models for logs and role privileges.
  • Updated page structure to include roles, privileges, and role-privilege mapping tabs.

PR Type

Enhancement


Description

  • Implement comprehensive roles and privileges management system

  • Add role-privilege mapping functionality with modal interface

  • Create filtering and search components for roles/privileges

  • Introduce badge customization system with theme support


Diagram Walkthrough

flowchart LR
  A["Role Management"] --> B["Privilege Management"]
  B --> C["Role-Privilege Mapping"]
  A --> D["Filter & Search"]
  B --> D
  C --> E["Modal Interface"]
  D --> F["Badge Customization"]

File Walkthrough

Relevant files
Enhancement
28 files
RolePrevileges.ts
Define role and privilege response models                               
+34/-0   
StorefrontDetailsResponse.ts
Add storefront configuration response model                           
+29/-0   
app.ts
Add badge customization constants and mappings                     
+29/-0   
ui.ts
Add roles and privileges UI constants                                       
+16/-1   
privilegeData.ts
Add mock privilege data for development                                   
+151/-0 
rolePrivilegeMappingData.ts
Add mock role-privilege mapping data                                         
+115/-0 
rolesData.ts
Add mock roles data for development                                           
+39/-0   
LogsFilterSection.tsx
Refactor logs filter with improved mobile support               
+83/-74 
page.tsx
Update logs page with refactored components                           
+18/-22 
ManageMapping.tsx
Create role-privilege mapping modal component                       
+110/-0 
PrivilegeFilterSection.tsx
Create privilege filtering component with search                 
+159/-0 
Privileges.tsx
Create privileges management component with table               
+85/-0   
Roles.tsx
Create roles management component with filtering                 
+81/-0   
RolesFilterSection.tsx
Create roles filtering component with search                         
+142/-0 
RolesPrivilegeMapping.tsx
Create role-privilege mapping display component                   
+94/-0   
getPrivilegeColumns.tsx
Define privilege table column configuration                           
+33/-0   
getRoleColumns.tsx
Define role table column configuration                                     
+39/-0   
page.tsx
Create main roles page with tabs                                                 
+42/-0   
StatCard.tsx
Add margin styling to stat card                                                   
+1/-1     
withBadgeCustomization.tsx
Enhance badge customization with flexible theming               
+8/-23   
Badge.tsx
Add quinary theme and className support                                   
+21/-11 
Button.tsx
Change default font size to text-xs                                           
+1/-1     
DateRangePicker.tsx
Set default date range to last month                                         
+6/-2     
Pagination.tsx
Adjust dropdown width for pagination                                         
+1/-1     
SearchBar.tsx
Increase debounce delay to 2 seconds                                         
+1/-1     
Table.tsx
Add className prop and center text alignment                         
+4/-2     
Tabs.tsx
Improve tab styling and responsive layout                               
+1/-1     
ToggleSwitch.tsx
Create new toggle switch component                                             
+42/-0   
Bug fix
3 files
logsData.ts
Fix import path for LogsResponse                                                 
+1/-1     
ViewLogDetails.tsx
Fix import path for LogDetails model                                         
+1/-1     
getLogDetailsColumns.tsx
Fix import path for LogDetails model                                         
+1/-1     
Configuration changes
1 files
tsconfig.json
Clean up TypeScript path configuration                                     
+5/-5     
Additional files
1 files
LogsResponse.ts [link]   

Edited by Rashmi Gaddam

Merge request reports

Loading