"use strict"; /** * Created by andey on 09-12-2016. */ function ActivityVO() { this.type = EntityVO.TYPE_ACTIVITY; this.scheduledEndDate = null; this.scheduledStartDate = null; this.actualStartDate = null; this.actualEndDate = null; this.location = null; this.templateId = null; this.templateGuid = null; this.requestedBy = {}; this.parentId = null; this.parentGuid = null; this.parentName = null; this.parentTitle = null; } ActivityVO.prototype = new TicketVO(); ActivityVO.prototype.constructor = ActivityVO; /** * @override * @return {Array} properties */ ActivityVO.prototype.getProps = function () { return TicketVO.prototype.getProps().concat('scheduledStartDate', 'scheduledEndDate', 'actualStartDate', 'actualEndDate', 'location', 'templateId', 'templateGuid', 'requestedBy', 'parentId', 'parentGuid', 'parentName', 'parentTitle'); }; /** * @override */ ActivityVO.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.requestedBy.fullName = (this.requestedBy.fullName) ? this.requestedBy.fullName : this.requestedBy.firstName + " " + this.requestedBy.lastName; };