Namespace: Manage

Appearition.Job.Manage

Use the functions under this module to create, edit and delete job records on the Appearition platform

Methods

Appearition.Job.Manage.CreateJob (request, requestOptions)number static

Creates a new job on the system. This successful request will return the JobId of the newly created record

Name Type Description
request Appearition.Job.Manage.JobListItemViewModel

Contains the details about the job to be created

requestOptions Appearition.RequestOptions

Contains the various callback methods for this request

Returns:
Type Description
number The ID of the newly created Job record. This is returned as part of the success callback function in the requestOptions param

Appearition.Job.Manage.GetJob (request, requestOptions)Appearition.Job.Manage.JobListItemViewModel static

Retrieves a specific job for the given JobId. Will return an Appearition.Job.Manage.JobListItemViewModel object

Name Type Description
request Appearition.Job.Manage.JobListItemViewModel

Contains the identifiers for retrieving the required records. Note only the JobId field is used server side to retrieve the record

requestOptions Appearition.RequestOptions

Contains the various callback methods for this request

Returns:
Type Description
Appearition.Job.Manage.JobListItemViewModel This is returned as part of the success callback function in the requestOptions param

Appearition.Job.Manage.Index (jobAssignmentId, requestOptions)Appearition.Job.Manage.JobIndexViewModel static

This method will return various data for setting up the index page of a job assignment. It will return a Appearition.Job.Manage.JobIndexViewModel object

Name Type Description
jobAssignmentId number

The unique identifier of the Job assignment

requestOptions Appearition.RequestOptions

configure callbacks

Returns:
Type Description
Appearition.Job.Manage.JobIndexViewModel This is returned as part of the success callback function in the requestOptions param

Appearition.Job.Manage.ListJobs (request, requestOptions)Array.<Appearition.Job.Manage.JobListItemViewModel> static

Retrieves a filtered list of jobs from the server based on the search criteria provided as part of the request param. Will return a collection of Appearition.Job.Manage.JobListItemViewModel

Name Type Description
request Appearition.Job.Manage.JobPagingViewModel

Contains the identifiers for retrieving the required records

requestOptions Appearition.RequestOptions

Contains the various callback methods for this request

Returns:
Type Description
Array.<Appearition.Job.Manage.JobListItemViewModel> This is returned as part of the success callback function in the requestOptions param

Appearition.Job.Manage.UpdateJob (request, requestOptions) static

Saves changes to the job. Nothing will be returned unless an error occurs

Name Type Description
request Appearition.Job.Manage.JobListItemViewModel

Contains the information of the job to be changed

requestOptions Appearition.RequestOptions

Contains the various callback methods for this request

Type Definitions

Appearition.Job.Manage.JobIndexViewModel

This is the data structure to send as part of the Appearition.Job.Manage.GetJobFormData method

Properties:
Name Type Description
Jobs Array.<Appearition.Job.Manage.JobListItemViewModel>

A collection of jobs from a search. This will be initially populated with a paged set of job assignments

Job Appearition.Job.Manage.JobListItemViewModel

An empty job record that can be used to populate a new job

Paging Appearition.Job.Manage.JobPagingViewModel

This data model allows configuration of job searches

SitePaging Appearition.Job.Manage.SitePagingViewModel

This data model allows configuration of site searches

UserPaging Appearition.Job.Manage.UserPagingViewModel

This data model allows configuration of user searches

Sites Array.<Appearition.Job.Manage.SiteListItemViewModel>

This collection can be used to hold any results from a site search

Users Array.<Appearition.Job.Manage.UserListItemViewModel>

This collection can be used to hold any results from a Users search

IsReadOnly boolean

Identifies if the logged in user can make changes to the job assignment or if it is read only

PdfTemplates Array.<Appearition.SelectListItem>

A collection of templates that can be used to generate a custom formatted report for submissions of a job

Appearition.Job.Manage.JobListItemViewModel

A data structure that represents a job in a search result.

Properties:
Name Type Description
TotalRecords number

The total number of jobs found in the search that this specific record came from.

JobNo string

An identifier assigned to the job.

JobId number

The unique identifier for the job (system allocated).

PTW string

An identifier assigned to the job.

TroubleTicket string

An identifier assigned to the job.

PurchaseOrderNo string

An identifier assigned to the job.

Comments string

Holds a description of the job.

SiteIds Array.<number>

A job can be allocated to one or many Sites. This collection holds the unique identifier for each allocated site. When a job is allocated to a site, it is referred to as a job assignment.

SiteNo string

Can be used in the UI to hold the SiteNo of a site. Not used server side.

SiteName string

Can be used in the UI to hold the name of a site. Not used server side.

Sites Array.<Appearition.Job.Manage.JobSiteViewModel>

A summary collection of allocated sites for a selected job

AssigneeUsername string

The unique login of the user allocated to the job.

AssigneeFirstName string

The first name of the user allocated to the job.

AssigneeLastName string

The last name of the user allocated to the job.

ScheduledStartUtcDateDisplay string

The date time when the job is scheduled to start (format d/MM/yy). Note, whilst the field name has UTC in it, the server side is actually converting the date time to Melbourne, Australia time (AEST)

ScheduledEndUtcDateDisplay string

The date time when the job is scheduled to end (format d/MM/yy). Note, whilst the field name has UTC in it, the server side is actually converting the date time to Melbourne, Australia time (AEST)

JobAssignedUtcDateDisplay string

The date time when the job was created (format d/MM/yy HH:mm). Note, whilst the field name has UTC in it, the server side is actually converting the date time to Melbourne, Australia time (AEST)

AssignerUsername string

The unique login of the user who created the job.

AssignerFirstName string

The first name of the user who created the job.

AssignerLastName string

The last name of the user who created the job.

JobStatus Appearition.Job.JobStatusEnum

The numeric version of the status of the job, refer to the JobStatusEnum for options

JobStatusName string

The name of the status of the job, refer to the JobStatusEnum for options

CanReview boolean

Indicates if the job is in a state that can be reviewed

ScheduledStartUtcDate string

The actual scheduled start date of the job as a UTC field. This value will differ from ScheduledStartUtcDateDisplay.

ScheduledEndUtcDate string

The actual scheduled end date of the job as a UTC field. This value will differ from ScheduledEndUtcDateDisplay.

DefaultPdfTemplateName string

The selected template that will be used to generate a job report for submissions

JobAssignments Array.<Appearition.Job.Manage.JobAssignmentListItemViewModel>

A collection of job assignments for the job

CanEdit boolean

Always set to TRUE. Only used for UI purposes. The server will always ensure only the correct user can make changes to a job

IsExpanded boolean

Used for UI purposes only. A job which has many sites allocated can be displayed expanded to show the site or collapsed for a more compact view

Appearition.Job.Manage.JobPagingViewModel

Data model holds all of the fields used to perform searches on the server for job records

Properties:
Name Type Description
JobNo string

An identifier assigned to the job.

PTW string

An identifier assigned to the job.

TroubleTicket string

An identifier assigned to the job.

PurchaseOrderNo string

An identifier assigned to the job.

SiteNo string

An identifier of a site

SiteName string

The name of a site

SiteStatusText string

The name of the site status

SiteStatus Appearition.Site.SiteStatusEnum

The numeric version of the site status

AssigneeUsername string

The unique login of the user allocated to the job.

AssigneeFirstName string

The first name of the user allocated to the job.

AssigneeLastName string

The last name of the user allocated to the job.

ScheduledStartUtcDate string

The actual scheduled start date of the job as a UTC value.

ScheduledStartUtcDateDisplay string

The actual scheduled start date of the job as a UTC value. The date format is (dd/MM/yyyy)

ScheduledEndUtcDate string

The actual scheduled end date of the job as a UTC value.

ScheduledEndUtcDateDisplay string

The actual scheduled end date of the job as a UTC value. The date format is (dd/MM/yyyy)

Page number

The page number of result set (zero based index)

RecordsPerPage number

The total number of results per page that the server will retrieve

SiteStatusList Array.<Appearition.SelectListItem>

A list of site statuses to show on the view to allow a user to choose from.

Appearition.Job.Manage.SiteListItemViewModel

Data model holds summary information for a site

Properties:
Name Type Description
Id number

The unique identifier of a site. As system generated value

SiteNo string

An identifier of a site

SiteName string

The name of a site

ShelterTypeName string

The name of the Shelter Type property of the site

MainsHybridGensetName string

A property of the site

SiteStatus Appearition.Site.SiteStatusEnum

The numeric version of the site status

SiteStatusName string

The name of the site status

SiteType string

A property of the site

Housing string

A property of the site

TotalRecords number

The total number of records found in the search result set that this record is part of

Appearition.Job.Manage.SitePagingViewModel

Data model holds all of the fields used to perform searches on the server for site records

Properties:
Name Type Description
SiteNo string

An identifier of a site

SiteName string

The name of a site

ShelterType Appearition.Site.ShelterTypeEnum

The numeric version of the shelter type field which is a property of a site

ShelterTypeText string

The name of the Shelter Type value

Page number

The page number of result set (zero based index)

RecordsPerPage number

The total number of results per page that the server will retrieve

Appearition.Job.Manage.UserListItemViewModel

Data model holds summary information for a user

Properties:
Name Type Description
AuthAccountId number

The unique identifier of a users authentication account record. This is a system generated value

UserProfileId number

The unique identifier of a users profile record. This is a system generated value

Username string

The login of a user

FirstName string

The first name of a user. Searching supports partial word filtering

LastName string

The first name of a user. Searching supports partial word filtering

EmailAddress string

The email address of the user

Mobile string

The mobile phone number of the user

IsLocked boolean

Indicates if the user is locked out of their account

TotalRecords number

The total number of records found in the search result set that this record is part of

Appearition.Job.Manage.UserPagingViewModel

Data model holds all of the fields used to perform searches on the server for user records

Properties:
Name Type Description
AuthAccountId number

The unique identifier of a users authentication account record. This is a system generated value

UserProfileId number

The unique identifier of a users profile record. This is a system generated value

Username string

The login of a user

FirstName string

The first name of a user. Searching supports partial word filtering

LastName string

The first name of a user. Searching supports partial word filtering

Role string

The name of a role on the system.

RoleText string

The display name of a role on the system. In most cases this will be the same as Role

IsLocked boolean

Indicates if the user is locked out of their account

Page number

The page number of result set (zero based index)

RecordsPerPage number

The total number of results per page that the server will retrieve