Editor - Settings - Includes - Users

This view is where you can add "special" users such as Administrators, business owners, city manager. in summary, it is a user administrator view. When listing a large amount of data it is advisable to make pagination.

Controller: usersSettingsEditorCtrl

Main Models

  • curTab: In the view these are classified by which this model has 4 states ‘users’, 'owners', 'citymanager' y 'administrators'.
  • filtered: This contains the filtered users, and the filtering depends on curTab

Models to filter

  • filter: this serves to filter users

Utility Functions

  • changeTap(tap, event): this function changes the status of curTap depending on what is sent in the parameter tap.
  • removeUser(user): it serves to remove a user from the database.
  • showUserSettings(user): this function opens a modal, this modal is used to add or modify a user. the modal that opens this function is theme/views/editor/settings/user-settings.html
  • changeUserData(user): It serves to update the basic information of a user.

Example of base theme

  1. TAP section: if click in any activate te función changeTap and firter de users again
  2. filtered: list the user by tab, any change here activate the function changeUserData
  3. changeUserData(user): when enabled/disabled
  4. showUserSettings(user)
  5. removeUser(user)
  6. curUser
    7.showUserSettings: but to add new user with the model curUser