Skip to main content

Process to add Setting in Tenant Settings

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 type and add settings.

Steps​

  1. Standard Setting Schema changes.
  2. Update Standard Setting schema file.
  3. 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 standard type and add the attribute(s)).
  • If new standard setting type created select the Tenant lifecycle.
  • Update the Tenant lifecycle with 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 type and attributes(s) in Type Layouts with visibility role to Tenant Administrator
    1. Dashboard layout: If new dashboard widgets added then make Widget View as Scroll.
    2. Create Layout
    3. View Layout
  • Navigation: If new type created 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 setting type created then add setting type name.
  • List<Contracts.TypeInstance> ISettingsService.GetSettingsTypeInstances() service: If new standard setting type created then add type name in this method to read setting from setting type instance.
  • Contracts.TenantSettings ISettingsService.GetTenantSettings():
    • Prorigo.Protrak.Contracts.TenantSetting is the wrapper class for all tenant settings properties.
    • Add new property in Prorigo.Protrak.Contracts.TenantSetting properties.
    • 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 setting type added then add the type name in the function.