SmartIT_Extensions/BMC/smart-it-full-helix/scripts/app/person/ticket-summary-vo.js

42 lines
1.2 KiB
JavaScript

"use strict";
/**
* Value object for ticket item.
*
* @constructor
*/
function TicketSummaryVO() {
// simple fields
this.summary = '';
this.type = '';
this.status = '';
this.submitDate = '';
this.assignee = '';
this.modifiedDate = '';
this.isAutomatic = false;
this.subType = '';
this.categorizations = '';
this.detailedDescription = '';
this.priority = '';
this.templateGuid = '';
this.templateId = '';
this.chatSessionId = '';
this.reportedSource = '';
}
/**
* Setup inheritance chain.
*/
TicketSummaryVO.prototype = Object.create(BaseVO.prototype);
TicketSummaryVO.prototype.constructor = TicketSummaryVO;
/**
* @override
* @returns {Array}
*/
TicketSummaryVO.prototype.getProps = function () {
return BaseVO.prototype.getProps().concat('displayId', 'summary', 'type', 'status', 'submitDate', 'modifiedDate', 'assignee', 'isAutomatic', 'categorizations', 'detailedDescription', 'priority', 'templateGuid', 'templateId', 'chatSessionId', 'reportedSource');
};
TicketSummaryVO.prototype.postBuild = function () {
if (this.type === "change" || this.type === "task") {
this.subType = this.isAutomatic ? "-auto" : "";
}
};