0.2.5 • Published 7 years ago

fh-wfm-user-angular v0.2.5

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

Raincatcher User Angular User Interface

This module is an AngularJS implementation of User functionality for the Raincatcher project.s

Setup

angular.module('app', [
...
, require('fh-wfm-user-angular')({
  templates: {
    //Optional template for the login screen
    //Note: This will be loaded from the angular template cache.
    login: 'mycustomlogintempalateid'
  }
})
...
])

Templates

Login

A custom html template can be passed in when rendering the login directive.

This template has access to the Controller as ctrl.

Login Controller Properties

The Login Controller is assigned the following properties that are accessible to the custom template if required.

PropertyTypeDescriptionExample
loginfunctionAuthenticates the user with a username and password parametersctrl.login("someusername", "somepassowrd")
logoutfunctionLogs out the currently logged out userctrl.logout()
hasSessionbooleanIdentifies if the currently logged in user has a valid sessionctrl.hasSession
loginErrorMessagestringA message to display to the user if there is an error messagectrl.loginErrorMessage = "Invalid Credentials"

Topics

As part of rendering Users, this module publishes and subscribes to several topics. These topics can be implemented in your application or you can use the fh-wfm-user module that already has implementations for these topics.

Published Topics

Each of the following topics subscribes to the error and done topics. If the parameter includes a topicUid, the error topic should have the topicUid appended to the done or error topic.

TopicParameters
wfm:workorders:listNONE
wfm:membership:listNONE
wfm:users:listNONE
wfm:users:create{userToCreate: userToCreate}
wfm:users:update{userToUpdate: userToUpdate}
wfm:users:read{id: "USERID"}
wfm:users:remove{userToRemove: {id: "USERID"}}
wfm:users:has_sessionNONE
wfm:users:clear_sessionNONE
wfm:users:read_profileNONE
wfm:users:authenticate{username: "user1234", password: "pass1234"}
wfm:groups:listNONE
wfm:groups:create{groupToCreate: groupToCreate}
wfm:groups:update{groupToUpdate: groupToUpdate}
wfm:groups:read{id: "GROUPID"}
wfm:groups:remove{groupToRemove: {id: "GROUPID"}}
1.0.0-pre.1

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.2-pre.1

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.2.0-pre.1

7 years ago

0.1.1

7 years ago

0.1.1-pre.1

7 years ago

0.1.0

7 years ago

0.1.0-pre.2

7 years ago

0.1.0-pre.1

7 years ago