Members
popUpHandler
This is an object which consists of two functions namely closeIframe and open.
closeIframe is a function that closes the form view in offender's dashboard
open is a function that opens the forms in iframe in offender's dashboard
- Source:
session_info
This is an object to store some of the values after offender's dashboard is loaded
- Source:
StaffAction
This is an object that consists of various functions to handle the staff's responses to be displayed in offender's dashboard.
Forms and Activities gets filtered out and gets displayed on its respective view section. Status of forms are also displayed
- Source:
toastrOptions
This object sets default values for popup modal
- Source:
Methods
changeFirstQueuePosition(mess)
to be deleted
This function updates the offender's queue position's message
Parameters:
Name | Type | Description |
---|---|---|
mess |
string | Queue position's message |
- Source:
current()
Current is the main function of this project,
when dashboard is loaded this function is called,
this function loads the roadmap, gets current queue position and renders it in offender's dashboard, loads Plea form and get registration details of the offender
- Source:
errorToastr(message)
This function shows the error (red) popup message on the screen
Parameters:
Name | Type | Description |
---|---|---|
message |
string | Error Message |
- Source:
errorToastr()
This function shows the error (red) popup message on the screen
- Source:
findCurrentStaff()
This function handles offender's session with current staff and unsubscribe session with the previous staff
- Source:
getHistory(staff_id)
This function loads the road map on the sidebar
Parameters:
Name | Type | Description |
---|---|---|
staff_id |
string | ID of staff |
- Source:
getLegalDocuments()
This function gets all the legal documents associated with offender
- Source:
getRegistrationDetails()
This function gets the offender's registration details
- Source:
getStaffResonse(staff_id)
to be deleted
This function loads UI for currently subscribed staff's response
Parameters:
Name | Type | Description |
---|---|---|
staff_id |
string | ID of staff |
- Source:
getStaffSessionActivities()
This function loads the forms or activities when staff sends it
- Source:
getStaffSessionActivitiesUpdate()
This function gets new/latest staff's response and calls the StaffAction.updateDOM() function to render it's corresponding UI.
This function also shows the unread form counter number in mobile device
- Source:
hidePDSuggestionForm()
This function hides the plea form form the offender's dashboard
- Source:
iframeControls()
This function handles the css of iframe
- Source:
infoToastr(message)
This function shows the information (blue) popup message on the screen
Parameters:
Name | Type | Description |
---|---|---|
message |
string | Information Message |
- Source:
infoToastr()
This function shows the information (blue) popup message on the screen
- Source:
jist_close()
This function stops the video session whenever staff ends the session with the offender
- Source:
jist_start()
This function starts the video session and hides the content of queue information
- Source:
jist_stop()
This function stops the video session and shows the content of queue information
- Source:
loadPDSuggestionForm()
This function display's the plea form in the offender's dashboard
- Source:
newInfoBox()
to be deleted
This function takes message as parameter and returns the html template with current time
- Source:
newOpenFineUrl(id)
This function opens payment acknowledgment in iframe
Parameters:
Name | Type | Description |
---|---|---|
id |
string | ID of payment acknowledgement |
- Source:
openFineUrl(fineUrl)
This function opens the new window for payment url
Parameters:
Name | Type | Description |
---|---|---|
fineUrl |
string | Url of payment acknowledgement |
- Source:
pd_choice_opinion(val)
This function sends opinion chosen of Plea form by offender to the staff
Parameters:
Name | Type | Description |
---|---|---|
val |
string | Value of Plea form's chosen option |
- Source:
render_queue_counter(data)
This function displays the queue information such as queue position and current staff type with whome offfender is waiting
Parameters:
Name | Type | Description |
---|---|---|
data |
string | Queue data such as staff's id, staff's type, and queue position |
- Source:
successToastr(message)
This function shows the success (green) popup message on the screen
Parameters:
Name | Type | Description |
---|---|---|
message |
string | Success Message |
- Source:
successToastr()
This function shows the success (green) popup message on the screen
- Source:
wait()
This function handles the session with currently subscribed staff, auto starts the offender's video if the video session was previously started when the page is reloaded, and updates the offender's queue information
- Source:
wasVideoStarted(offender_staff_session_id)
This function checks whether video session was started or not
Parameters:
Name | Type | Description |
---|---|---|
offender_staff_session_id |
string | ID of offender staff session |
- Source: