UserProfile

UserProfile

new UserProfile()

Description:
  • Handles Custom properties in the user profile

Source:

Methods

(static) getProfileAutoStore() → {string}

Description:
  • Returns the current ProfileAutoStore type

Source:
Returns:

The profileAutoStore type

Type
string

(static) loadCustomLocalProfileSetting(key) → {any}

Description:
  • Returns custom property object from the user profile vuexStore for given key

Source:
Parameters:
Name Type Description
key string

Key for which to return the value

Returns:

Value of given custom property

Type
any

(static) loadCustomLocalProfileSettings() → {Object}

Description:
  • Returns all custom properties of the user profile from the vuexStore

Source:
Returns:

The custom properties object with all key/values

Type
Object

(static) loadFromServer() → {Promise.<any>}

Description:
  • Triggers reload of user profile from the server

Source:
Returns:
Type
Promise.<any>

(static) removeCustomLocalProfileProperties() → {void}

Description:
  • Removes all custom properties from the vuexStore If userProfile AutoStore = 'onChange' it will also save the changes to the database

Source:
Returns:
Type
void

(static) removeCustomLocalProfileProperty(key) → {void}

Description:
  • Removes custom property by key from the vuexStore If userProfile AutoStore = 'onChange' it will also save the changes to the database

Source:
Parameters:
Name Type Description
key string

The custom property key to remove

Returns:
Type
void

(static) saveCustomLocalProfileProperty(oSettings) → {void}

Description:
  • Saves custom property/properties in the vuexStore If userProfile AutoStore = 'onChange' it will also save the changes to the database

Source:
Parameters:
Name Type Description
oSettings Object

The object containing the new settings (key: value)

Returns:
Type
void

(static) saveToServer(bShowSuccessMsg, methodName, oData) → {void}

Description:
  • Method to save the UserProfile settings on the backend side

Source:
Parameters:
Name Type Description
bShowSuccessMsg boolean

Flag for displaying the success message or not, default will show if not specified

methodName boolean

Name of method to be called on save (setCustomProperty, deleteCustomProperty etc.) default: SaveUserProfile

oData object

Data to be sent to the backend; contains custom property or whole user profile by default

Returns:
Type
void

(static) setProfileAutoStore(cProfileAutoStore) → {void}

Description:
  • Sets the profileAutoStore strategy to the given value, which handles when savings should occur

Source:
Parameters:
Name Type Description
cProfileAutoStore string

Type of profileAutoStore, can be "onChange" or "onLogout" or "" (empty)

Returns:
Type
void