EmployeeController

EmployeeController

Controller for employees.

Constructor

new EmployeeController()

Source:

Methods

create(employee) → {Promise.<any>}

Create a new employee, return employee ID if successful

Source:
Parameters:
Name Type Description
employee Object

The Employee Object

Returns:
Type:
Promise.<any>
  • The id of the Employee Object

delete(id) → {Promise.<any>}

Delete a Employee instance

Source:
Parameters:
Name Type Description
id string

The id of the Employee Object

Returns:
Type:
Promise.<any>

enrollTerminalFcm(id, token) → {Promise.<any>}

Enroll a new FCM token for terminal app

Source:
Parameters:
Name Type Description
id string

The id of the Employee Object

token string

The FCM token for the Terminal Mobile App

Returns:
Type:
Promise.<any>

resetEmployeePassword(id, email_address, code, password) → {Promise.<any>}

Resets an employee password

Source:
Parameters:
Name Type Description
id string

Id of the employee

email_address string

Email address of the employee

code string

Reset code

password string

The new password to set

Returns:
Type:
Promise.<any>

revokeTerminalFcm(token) → {Promise.<any>}

Revoke a FCM token for terminal app

Source:
Parameters:
Name Type Description
token string

The FCM token for the Terminal Mobile App

Returns:
Type:
Promise.<any>

sendPasswordResetCode(email_address, method) → {Promise.<any>}

Sends a password reset code to employee

Source:
Parameters:
Name Type Default Description
email_address string

Id of the employee

method string EMAIL

The new password to set

Returns:
Type:
Promise.<any>

update(id, employee) → {Promise.<any>}

Update a employee

Source:
Parameters:
Name Type Description
id string

The id of the Employee Object

employee Object

The Employee Object

Returns:
Type:
Promise.<any>
  • The id of the Employee Object