Process to add Setting in Tenant Settingss
Approaches
Use one of the following approaches to add new settings in tenant settings.
- Add new setting in existing standard setting
types. - Create new standard setting
typeand add settings.
Steps
- Standard Setting Schema changes.
- Update Standard Setting schema file.
- Implement setting in Protrak server and API.
Standard Setting Schema changes
- Create standard
attribute(s). attribute name must be start with Standard. e.g. StandardDateFormat. - Add attribute(s) in setting
type(if required create new standardtypeand add theattribute(s)). - If new standard setting
typecreated select the Tenantlifecycle. - Update the Tenant
lifecyclewith required changes. - Make sure that newly created schema elements name must be unique (i.e. schema elements with that name should not be exists in any other tenants in production).
- Configure new
typeandattributes(s)inType Layoutswith visibilityroleto Tenant AdministratorDashboard layout: If new dashboard widgets added then make Widget View as Scroll.Create LayoutView Layout
Navigation: If newtypecreated then add Tab in the group Tenant Settings with Tenant Administrator in Roles
Update Standard Setting schema file
- Export the standard settings schema.
- Update the file: protrak /Utility/TenantCreation/ImportStandardSchemaAndCreateStandardTypeInstances/StandardTenantSettingSchema.json.
- Commit the new standard setting schema changes in it.
Implement setting changes in Protrak server
Prorigo.Protrak.Services.Impl.Constants.GlobalConstants: If new standard settingtypecreated then add settingtypename.List<Contracts.TypeInstance> ISettingsService.GetSettingsTypeInstances()service: If new standard settingtypecreated then addtypename in this method to read setting from settingtypeinstance.Contracts.TenantSettings ISettingsService.GetTenantSettings():Prorigo.Protrak.Contracts.TenantSettingis the wrapper class for all tenant settings properties.- Add new property in
Prorigo.Protrak.Contracts.TenantSettingproperties. - Use
ISettingsService.GetTenantSettings()service to make use of newly added tenant setting in server and Api's.
Prorigo.Protrak.Services.Impl.Instanceservice: To clear tenant setting cached data on update of any standard setting type instance.ClearAndUpdateSettingTypeInstancesCachedData: if new standard settingtypeadded then add thetypename in the function.