SmartIT_Extensions/BMC/smart-it-full-helix/scripts/app/ticket/sbe-request-vo.js

60 lines
2.0 KiB
JavaScript

"use strict";
function SbeRequestVO() {
this.type = EntityVO.TYPE_SBEREQUEST;
this.serviceName = '';
this.orderId = '';
this.serviceId = '';
this.description = '';
this.desc = '';
this.excerpt = '';
this.status = {};
this.quantity = '';
this.paymentType = '';
this.freeLabelText = '';
this.currency = '';
this.completedDate = '';
this.onceCost = '';
this.monthlyCost = '';
this.yearlyCost = '';
this.ticketType = EntityVO.TYPE_SBEREQUEST;
this.requestedBy = {};
this.requestedFor = {};
this.canRequestAgain = '';
this.orderTitle = '';
this.modifiedDate = null;
this.customFields = null;
this.questionDefinitions = null;
this.conditionalQuestions = null;
this.answers = null;
this.approvalSummaries = null;
this.hideAttributes = null;
this.isAttributeHidden = {};
}
SbeRequestVO.prototype = Object.create(BaseVO.prototype);
SbeRequestVO.prototype.constructor = SbeRequestVO;
/**
* @override
* @return {Array} properties
*/
SbeRequestVO.prototype.getProps = function () {
return BaseVO.prototype.getProps().concat('type', 'serviceName', 'orderId', 'serviceId', 'description', 'excerpt', 'status', 'quantity', 'paymentType', 'freeLabelText', 'currency', 'completedDate', 'onceCost', 'monthlyCost', 'yearlyCost', 'ticketType', 'requestedBy', 'requestedFor', 'canRequestAgain', 'orderTitle', 'modifiedDate', 'customFields', 'answers', 'isInApproval');
};
/**
* @override
*/
SbeRequestVO.prototype.postBuild = function () {
this.accessMappings = {
detailsEditAllowed: false,
summaryEditAllowed: false,
statusEditAllowed: false,
timelineEditAllowed: false,
relationsEditAllowed: false,
priorityEditAllowed: false,
coordinatorEditAllowed: false,
tasksEditAllowed: false,
requestedforEditAllowed: false,
incidentTypeEditAllowed: false
};
this.paymentType = this.paymentType === 'FREE' ? ' - ' : this.paymentType;
};