"use strict"; /** * Value object for work order item. * * @author Abhranil Naha * @constructor */ function WorkOrderVO() { this.type = EntityVO.TYPE_WORKORDER; this.workorderType = ''; this.completedDate = ''; this.impactedService = null; this.manager = null; this.managerGroup = null; this.location = {}; this.brokerVendorName = ''; this.needsAttention = 'No'; this.templateName = ''; this.woAutomationStatus = ''; this.templateName = ''; } WorkOrderVO.prototype = new TicketVO(); WorkOrderVO.prototype.constructor = WorkOrderVO; /** * @override * @return {Array} properties */ WorkOrderVO.prototype.getProps = function () { return TicketVO.prototype.getProps().concat('completedDate', 'impactedService', 'workorderType', 'manager', 'managerGroup', 'actualStartDate', 'actualEndDate', 'scheduledStartDate', 'scheduledEndDate', 'templateId', 'location', 'brokerVendorName', 'woAutomationStatus', 'needsAttention', 'templateName'); }; /** * @override */ WorkOrderVO.prototype.postBuild = function () { TicketVO.prototype.postBuild.call(this); this.scheduledStartDate = this.scheduledStartDate ? new Date(this.scheduledStartDate) : null; this.scheduledEndDate = this.scheduledEndDate ? new Date(this.scheduledEndDate) : null; this.actualStartDate = this.actualStartDate ? new Date(this.actualStartDate) : null; this.actualEndDate = this.actualEndDate ? new Date(this.actualEndDate) : null; this.scheduledStartDateHumanized = this.scheduledStartDate ? moment(this.scheduledStartDate).format('lll') : null; this.scheduledEndDateHumanized = this.scheduledEndDate ? moment(this.scheduledEndDate).format('lll') : null; this.actualStartDateHumanized = this.actualStartDate ? moment(this.actualStartDate).format('lll') : null; this.actualEndDateHumanized = this.actualEndDate ? moment(this.actualEndDate).format('lll') : null; };