Problem Statement
- The admin dashboard type of reports should be dependent on the tenant.
- In the admin dashboard Table, all fields are in string formate when fetched from the JSON even though their datatype is number or Date. Because of this, the sorting of the table on these fields is not working as expected.
- In the admin dashboard Table, there is a requirement to have filters so that the table data can be filtered depending on the required field value
- In the admin dashboard Table, there should be an option for multiple tabs of the table (These tables are the subset of the master data that we are getting)
Proposed Solution
1. The admin dashboard type of reports should be dependent on the tenant
Solution
For a given tenant's root org the supported report type can be stored in the bucket where the report JSON is stored.
Pro's
all the dashboard types are stored as a JSON and if a new type has to be added this will make it easy to add
2. In the admin dashboard Table, all fields are in string formate when fetched from the JSON even though their datatype is number or Date. Because of this, the sorting of the table on these fields is not working as expected
solution 1
- Each of the filed data can have two attributes that specify the datatype of the field and sortable
- JSON can have the filterable column list and also the multiple tabs to be shown
Solution benefits
1. All the types of reports will be available to all the admin user associated with the root-org
2. This field datatype will help to convert the field from string to the required type so that operation can be performed on the sameSolution 2
1. Depending on the field Name UI will change the Fields Datatype
The drawback of this approach
the changes has to be done depending on the field name and this may not be so accurate