{"version":3,"sources":["1initializers.js","dashboardviews.js","edittaskviews.js","lookaheadviews.js","schedulingmodels.js","settingsviews.js","tasklistviews.js","templateviews.js"],"names":["PJQ","collections","schedule","models","views","modules","routes","route","name","callback","accessKey","app","session","set","share","ScheduleShare","fetch","success","get","LookAhead","projectId","id","Schedule","view","renderView","ScheduleDashboard","model","shareKey","projectWall","initProjectNavigator","parseInt","lookAheadId","noRoute","taskId","router","navigate","toString","trigger","replace","addRoutes","BaseView","extend","defaults","template","templating","Template","constants","SCHEDULE","activeView","TASK_LIST","initTaskId","isShowCriticalPath","isAdmin","events","click .btn-notification-history","click .btn-view-timeline","click .btn-view-task-list","click .btn-view-calendar","click .btn-export-schedule","click .btn-export-view","click .btn-export-gantt","click .btn-export-calendar","click .btn-share-schedule","click .btn-order-gantt","click .btn-add-task","click .btn-add-milestone","click .btn-save-as-template","click .btn-import-template","click .btn-upload-template","click .btn-schedule-settings","change .cb-show-critical-path","click .btn-view-requested-changes","click .btn-zoom-in","click .btn-zoom-out","click .btn-view-master","click .btn-delete-look-ahead","beforeFirstRender","_beforeFirstRender","_asyncToGenerator","_regeneratorRuntime","mark","_callee","initLookAhead","_initLookAhead","wrap","_context","prev","next","this","options","canViewLookAheads","canManageLookAheads","preferences","project","lookAheads","hasPermission","fetchScheduleSettings","settings","sent","fetchSchedule","fetchScheduleLookAheads","initLookAheadId","lookAhead","render","stop","apply","arguments","beforeRender","renderData","statuses","TaskStatuses","afterRender","_this","chart","isFetched","$activeView","$","renderTaskList","TIMELINE","renderTimeline","CALENDAR","renderCalendar","initTask","tasks","editTask","renderPendingCount","lookAheadChoices","_","each","push","getDisplayName","subtext","lookAheadPicker","inputs","Selectpicker","el","isIntChoices","isMultiple","isBlockSubtext","defaultValue","choices","onChange","value","setValue","newLookAhead","NewLookAheadModal","onSave","bind","add","deleteLookAhead","_this2","modals","YesNo","header","body","onYes","destroy","remove","notifications","notify","successNotify","message","viewMasterSchedule","viewNotificationHistory","_viewNotificationHistory","_callee2","_context2","abrupt","fetchScheduleNotifications","NotificationHistory","context","collection","extraColumns","index","data","title","type","row","_row$get","shareSchedule","sharingModal","sharing","SharingModal","subject","urlChanged","setActiveView","newActiveView","activateCalendar","$overrideEl","afterChartInit","length","undefined","calendars","FullCalendar","size","getCalendarTasks","onTaskEdit","task","canDelete","onTaskDelete","deleteTaskClicked","activateTimeline","_PJQ$views$charts$dht","_this3","opts","$chart","hasOverride","refreshTasks","getGanttTasks","contextTask","sortColumnCookie","cookies","SCHEDULE_GANTT_SORT_COLUMN","sortDirectionCookie","SCHEDULE_GANTT_SORT_DIRECTION","enableColumnSorting","hasPref","preferenceTypes","ENABLE_GANTT_COLUMN_SORTING","ch","charts","dhtmlxGantt","_defineProperty","canEdit","enableSorting","sortField","helpers","cookieHelpers","getCookie","sortAsc","onSort","sort","setCookie","field","asc","onAddSubTask","parent","fnAdd","newTask","Task","templateId","status","getDefault","summaryTaskId","start","finish","sortOrder","filter","save","startInlineEdit","onTaskAdd","parentTaskId","onTaskMoved","taskModel","editedValue","isTrueDate","endDate","Date","end_date","setHours","unscheduled","text","duration","percentComplete","Math","round","progress","start_date","dateHelpers","getDateDaysDiff","updateTaskTime","onTaskUpdateSummary","updateSummaryTask","onTaskUpdated","dependencyInfo","ajax","Request","endpoint","urlHelpers","generateEndpoint","dependTaskId","source","offset","lag","linkTypes","post","done","changes","colTask","parseDateString","updateTask","dependency","max","dependencies","delete","zoomInGantt","zoomIn","zoomLevel","getZoom","attr","zoomOutGantt","zoomOut","showCriticalPath","toggleCriticalPath","activateTaskList","addLoader","taskList","TaskList","afterTableRendered","removeLoader","_this4","fnSave","patch","res","change","changedTask","changedTasks","determineChangedTasks","TaskChangeNotifications","noNotify","loader","Loader","isNew","find","fnModal","EditTaskModal","isSummaryTask","dep","updatedDep","onClose","onDelete","deleteTask","showConfirmation","summaryTask","isLastRemainingTask","DeleteCancel","originalTask","summary","nestedTasks","deletedDependencies","getNestedTasks","taskNestedTasks","concat","nestedTask","put","existingSummaryTask","existingSummaryName","existingSummaryStart","existingSummaryFinish","existingSummaryDuration","existingSummaryPercentComplete","addTaskClicked","parentIsSummary","addMilestoneClicked","weekendWork","isAllDay","isMilestone","notes","editSettings","SettingsModal","saveAsTemplate","SaveAsTemplateModal","importTemplate","ImportTemplateModal","onImport","uploadTemplate","UploadTemplateModal","exportSchedule","parameter","isApi2","response","files","downloadFile","url","isEndpoint","fail","xhr","err","result","orderGantt","getGanttData","OrderGanttModal","reportData","templateName","fileName","exportView","exportCalendar","exportGantt","_PJQ$app$session$proj","loadingText","rect","getBoundingClientRect","$report","clone","elementHelpers","addInvisibleElement","height","params","queueDownload","html","width","attributes","logoURL","EMAIL_LOGO_URL","getPref","filename","e","$temp","currentTarget","fnCallback","append","exportToPNG","exportToPDF","exportToExcel","exportToMSProject","exportToPrimavera","viewRequestedChanges","ViewRequestedChangesModal","onApprove","pendingCount","pendingRequestedChanges","btn","replaceWith","BaseModal","subTemplates","requestedChanges","maxWidth","click .btn-delete-requested-change","click .btn-approve-requested-change","click .btn-reject-requested-change","click .btn-request-task","click .btn-close","renderRequestedChanges","renderSubTemplate","isPendingList","deleteRequestedChange","cid","closest","requestedChange","isDirty","approveRequestedChangeClicked","newStart","newFinish","getDay","approveRequestedChange","updateWeekendWork","onNo","approve","rejectRequestedChange","reject","viewTask","close","click .btn-order","email","phone","user","contact","inputHelpers","inputMaskPhone","order","isValid","$email","val","validators","validateEmail","setInputError","$phone","formatHelpers","numbersOnly","removeModal","contactBadge","GLOBAL","comments","isShowCloseButton","canAddAttachment","canDeleteAttachment","canAddComment","canAddChangeRequest","canManageChangeRequest","click .btn-save","click .btn-delete","click .btn-add-comment","change .progress-slider","change .cb-completed-notification","click .btn-add-dependency","click .btn-add-successor","click .btn-save-dependency","click .btn-cancel-dependency","click .btn-edit-dependency","click .btn-delete-dependency","click .btn-add-requested-change","click .btn-view-task","focusout .input-duration","beforeModalCreated","_beforeModalCreated","_callee3","_context3","fetchScheduleStatuses","listenTo","getNewDateAddDays","startPicker","finishPicker","silent","isSuccessor","ASAP_SCHEDULE_CONTRAINT_ENABLED","hasCompleteStatus","toLowerCase","includes","enableNotificationSettings","ENABLE_SCHEDULE_TASK_NOTIFICATION_SETTINGS","isOverdue","checkDateIsBeforeToday","renderDatePickers","Datepicker","datepickerOptions","format","dateFormats","datePicker","DATE","defaultDate","newDate","Binder","$el","watchElements","groupUserId","groupLevels","GROUP_LEVELS","groups","GroupsSelectInput","isShowAddButton","isReadOnly","addButton","selectedGroups","onAfterSave","reset","AutocompleteInput","uniq","map","ENABLE_PROJECT_LOCATIONS","ProjectLocationPicker","contacts","ContactsSelectInput","selectedContact","assignees","displayContactsBlock","contexts","PROJECTCONTACTS","USERS","isSingleChoice","selectedContacts","renderDependencies","renderCompletion","renderComments","fileUploader","FileUploaderGrid","attachments","canUpload","previewImageDimension","includeProjectAttachments","onSuccess","attachment","focus","checkDuration","fetchNotifications","addDependency","contextDependency","saveDependency","TaskDependency","addSuccessor","relTaskId","dependencyPicker","getValue","showError","dependencyTypePicker","isNaN","minStart","getMinStart","editDependency","deleteDependency","scheduleDependency","cancelDependency","noneSelectedText","isLiveSearch","setMinDate","progressSlider","bootstrapSlider","handle","class","colorClass","completionChanged","disableCompletedNotificationChanged","$message","addClass","removeClass","percent","$slider","$text","modal","scrollTop","addRequestedChange","AddRequestedChangeModal","checked","addComment","trim","comment","TaskComment","commentText","createdOn","createdBy","validate","errorText","nameValid","errorAlert","Alert","fnCheck","noNotifyTaskIds","isUploading","prop","hasChanged","preventNotifyTaskIds","completeStatus","isCompleteStatus","compSpan","SaveDontSave","onDontSave","restore","RequestedChange","oldStart","oldFinish","minDate","$reason","reason","hideError","change .cb-notify-task","change .cb-notify-none","changeNotifyTask","changeNotifyNone","is","_beforeModalCreated2","_callee4","_context4","_this5","dueDatePicker","getDateString","validationAlert","lookAheadStart","lookAheadFinish","checkDateRangesOverlap","isPrepend","error","BaseModel","idAttribute","notifyName","parse","scheduleTaskStatuses","TaskDependencies","RequestedChanges","Tasks","statusId","actual","shareData","sh","arr","urlOptions","subTasks","projectContacts","ProjectContacts","Groups","TaskComments","ScheduleTaskAttachments","objectHelpers","refinedType","getSummaryTaskName","deps","getDependencies","depTask","dependencyTypes","START_START","FINISH_START","getSuccessors","assignedOnly","resultIds","fnCheckDeps","taskData","successor","indexOf","successorTask","cTaskData","initAttributes","getGanttTask","GanttTask","end","thumbnail","style","textColor","getCalendarTask","CalendarTask","getCalendarTaskTitle","allDay","backgroundColor","borderColor","assigneesArray","assignee","cName","join","beforeSave","toJSON","getChangedModels","afterSave","relTask","where","Notifications","newDependencyTask","newSuccessorTask","getTooltip","dependTask","TaskStatus","ScheduleTaskAttachment","File","ProjectContact","Settings","lookAheadManagers","TaskListItemGroup","Templates","BaseCollection","LookAheads","sortedModels","sortBy","fnGetSubtasks","subTask","_toConsumableArray","GanttTasks","CalendarTasks","getValidDependencies","explicitAllow","invalidTaskIds","tId","checkTask","getValidSuccessors","ScheduleCustomField","customFields","CustomField","Notification","notificationTypeNames","def","findWhere","isDefault","copy","Files","ScheduleCustomFields","masterUserId","isAPIv2","click .btn-delete-tasks","deleteTasks","deleteAllScheduleTasks","$notifications","listen","click .add-task-status","click .edit-task-status","click .delete-task-status","click .save-task-status","click .cancel-edit-task-status","colorpickerChange","keyup .colorpicker-input-box","taskStatusContext","dataTable","dataTables","DataTable","isHideSearch","rowId","sortableOptions","targets","pageLength","bSort","language","zeroRecords","columns","searchable","orderable","visible","display","content","disabledAttr","addClicked","copyDefaultStatuses","addStatus","newStatus","color","addRow","refresh","colorPicker","colors","ColorPicker","autoInputFallback","css","editClicked","getRow","editStatus","setBGColor","keyCode","blur","split","setColor","toUpperCase","getColor","statusSave","$row","$name","isColorValid","isNameValid","successFn","wasNew","cancelEditStatus","removeRow","deleteClicked","deleteStatus","wasDefault","returnName","u","TaskListDataTable","emptyTable","paging","scrollRows","level","orderCookie","SCHEDULE_TASK_LIST_ORDER","click .btn-edit-task","click .btn-delete-task","keyup .datatable-search","click .task-list-clear-filters","headerData","afterDataTableRender","self","rows","every","toggleChildRow","beforeDataTableRender","statusFilterPicker","setFilter","getContextMenuOptions","actions","iconClass","onClick","isShown","addToSummaryTaskClicked","removeSummaryTask","isDanger","SummaryTaskModal","isNewTask","search","searchText","getSearchText","searchDataTable","hasVisibleChildren","filteredModels","some","String","summaryTaskIds","forEach","rowData","childTable","child","node","rowMatches","contains","childMatches","showRow","hasClass","show","hide","getRowChildData","getRowChildTable","hideColumnHeaders","parentId","onChildTableRendered","getColumns","_this$preferences$get","_this6","columnData","padding","offsetClass","active","checkDateBetweenDays","overdue","group","groupBy","MONTH","MONTH_YEAR","WEEK","startOfWeek","moment","startOf","toDate","endOfWeek","endOf","DAY","groupByGroup","gr","groupName","attribute","isArrayGroup","GROUP_LABEL","enableOverdueStatus","className","createdRow","editTaskClicked","stopPropagation","target","onRowDoubleClick","getFilterData","statusFilter","getFilter","filtered","clearFilters","deselectAll","searchBar","filterBidders","settingsRes","off","on","isSummaryUpdate","isDelete","scrollY","levels","taskTable","findSummaryTask","t","findDataTable","table","childDataTables","TemplateManagement","templates","addTemplate","NewTemplateModal","editTemplate","EditTemplateModal","fitHeight","TextEditorInput","label","deleteTemplate","fetchScheduleTemplates","tmp","existingTemplate","copyAssignees","copyDependencies","copyComments","copyAttachments","change .cb-weekend-work","_this7","allowedExtensions","makeUploadEndpoint","onDrop","weekendWorkChanged","click .btn-import","templatePicker","selectedTemplate","startDate","startDatePicker"],"mappings":"4gQAAAA,IAAAC,YAAAC,SAAA,GAEAF,IAAAG,OAAAD,SAAA,GAEAF,IAAAI,MAAAF,SAAA,GAEAF,IAAAK,QAAAH,SAAA,CACAI,OAAA,CACA,CACAC,MAAA,4BACAC,KAAA,gBACAC,SAAA,SAAAC,GACAV,IAAAW,IAAAC,QAAAC,IAAA,YAAAH,GACA,IAAAI,EAAA,IAAAd,IAAAG,OAAAD,SAAAa,cAAA,CACAL,UAAAA,IAEAI,EAAAE,MAAA,CACAC,QAAA,WAC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,KAAAq2B,gBAAAjY,YACAhH,GAAA,GAEApX,KAAAq2B,gBAAArU,YAGA5K,GAIA,IAAA5c,IAAAmR,KAAAC,QAAA,CACAC,SAAArR,IAAAkO,QAAAoD,WAAAC,iBAAA,CACA,CACAF,SAAA,WACAvI,MAAAtD,KAAAC,QAAAI,QAAAxE,IAEA,CACAgQ,SAAA,YAEA,CACAA,SAAA,SACAvI,MAAAtD,KAAAm2B,iBAAAt6B,KAEA,CACA,CACA2V,UAAA,QACAlO,MAAA9I,IAAAkO,QAAA0C,YAAAuX,cAAA,IAAAlY,KAAAzK,KAAAo2B,WAAA,eAEA,CACA5kB,UAAA,kBACAlO,MAAAtD,KAAA4B,EAAA,2BAAAqf,KAAA,YAEA,CACAzP,UAAA,qBACAlO,MAAAtD,KAAA4B,EAAA,8BAAAqf,KAAA,YAEA,CACAzP,UAAA,iBACAlO,MAAAtD,KAAA4B,EAAA,0BAAAqf,KAAA,YACA,CACAzP,UAAA,oBACAlO,MAAAtD,KAAA4B,EAAA,6BAAAqf,KAAA,gBAGAjR,MAAA1D,KAAA/J,EAAAoB,KAAA,SAAA+N,GACA,GAAA,mBAAA1R,KAAAC,QAAAmR,SAAA,CACA,IAAAc,EAAA,IAAA1X,IAAAG,OAAAD,SAAAoB,SAAA4V,GACAQ,EAAAxQ,WAAA,EACA1B,KAAAC,QAAAmR,SAAAc,GAEAlS,KAAA6X,cACArd,IAAA8J,cAAAC,OAAAC,cAAA,CACAC,QAAA,gCAEAzE","file":"app.js","sourcesContent":["PJQ.collections.schedule = {};\n\nPJQ.models.schedule = {};\n\nPJQ.views.schedule = {};\n\nPJQ.modules.schedule = {\n    routes: [\n        {\n            route: 'schedule/share/:accessKey',\n            name: 'scheduleShare',\n            callback: function (accessKey) {\n                PJQ.app.session.set('accessKey', accessKey);\n                let share = new PJQ.models.schedule.ScheduleShare({\n                    accessKey: accessKey\n                });\n                share.fetch({\n                    success: function () {\n                        let schedule;\n                        if (share.get('lookAheadId') > 0) {\n                            schedule = new PJQ.models.schedule.LookAhead({\n                                projectId: share.get('projectId'),\n                                id: share.get('lookAheadId')\n                            });\n                        } else if (share.get('projectId') > 0) {\n                            schedule = new PJQ.models.schedule.Schedule({\n                                projectId: share.get('projectId')\n                            });\n                        }\n                        schedule.fetch({\n                            success: function () {\n                                PJQ.app.view.renderView(PJQ.views.schedule.ScheduleDashboard, {\n                                    model: schedule,\n                                    shareKey: accessKey\n                                });\n                            }\n                        });\n                    }\n                });\n            }\n        },\n        {\n            route: 'projects/:projectId/schedule',\n            name: 'projectSchedule',\n            callback: function (projectId) {\n                PJQ.modules.projectWall.initProjectNavigator(parseInt(projectId), \"projectschedule\");\n            }\n        },\n        {\n            route: 'projects/:projectId/schedule/lookaheads/:lookAheadId',\n            name: 'projectSchedule',\n            callback: function (projectId, lookAheadId) {\n                PJQ.modules.projectWall.initProjectNavigator(parseInt(projectId), \"projectschedule\", {\n                    lookAheadId: parseInt(lookAheadId),\n                    noRoute: true\n                });\n            }\n        },\n        {\n            route: 'projects/:projectId/schedule/:taskId',\n            name: 'projectSchedule',\n            callback: function (projectId, taskId) {\n                PJQ.app.router.navigate('projects/' + projectId.toString() + '/schedule', {\n                    trigger: false,\n                    replace: true\n                });\n                PJQ.modules.projectWall.initProjectNavigator(parseInt(projectId), \"projectschedule\", {\n                    taskId: taskId\n                });\n            }\n        },\n    ]\n};\n\nPJQ.app.addRoutes(PJQ.modules.schedule.routes);","PJQ.views.schedule.ScheduleDashboard = PJQ.views.BaseView.extend({\r\n    defaults: {\r\n        template: new PJQ.templating.Template(PJQ.constants.modules.SCHEDULE, 'Schedule-Dashboard'),\r\n        activeView: PJQ.constants.schedule.views.TASK_LIST,\r\n        initTaskId: null,\r\n        isShowCriticalPath: false,\r\n        isAdmin: true\r\n    },\r\n    events: {\r\n        'click .btn-notification-history': 'viewNotificationHistory',\r\n        'click .btn-view-timeline': 'activateTimeline',\r\n        'click .btn-view-task-list': 'activateTaskList',\r\n        'click .btn-view-calendar': 'activateCalendar',\r\n        'click .btn-export-schedule': 'exportSchedule',\r\n        'click .btn-export-view': 'exportView',\r\n        'click .btn-export-gantt': 'exportGantt',\r\n        'click .btn-export-calendar': 'exportCalendar',\r\n        'click .btn-share-schedule': 'shareSchedule',\r\n        'click .btn-order-gantt': 'orderGantt',\r\n        'click .btn-add-task': 'addTaskClicked',\r\n        'click .btn-add-milestone': 'addMilestoneClicked',\r\n        'click .btn-save-as-template': 'saveAsTemplate',\r\n        'click .btn-import-template': 'importTemplate',\r\n        'click .btn-upload-template': 'uploadTemplate',\r\n        'click .btn-schedule-settings': 'editSettings',\r\n        'change .cb-show-critical-path': 'showCriticalPath',\r\n        'click .btn-view-requested-changes': 'viewRequestedChanges',\r\n        'click .btn-zoom-in': 'zoomInGantt',\r\n        'click .btn-zoom-out': 'zoomOutGantt',\r\n        'click .btn-view-master': 'viewMasterSchedule',\r\n        'click .btn-delete-look-ahead': 'deleteLookAhead',\r\n    },\r\n    beforeFirstRender: async function () {\r\n        this.options.canViewLookAheads = false;\r\n        this.options.canManageLookAheads = false;\r\n        this.options.preferences = PJQ.app.session.project ? PJQ.app.session.project.preferences : PJQ.app.session.preferences;\r\n        this.lookAheads = null;\r\n\r\n        if(this.model != null){\r\n            this.schedule = this.model;\r\n        }\r\n\r\n        if (this.options.project != null) {\r\n            this.options.isAdmin = this.options.project.hasPermission('schedule.isAdmin');\r\n            this.options.canViewLookAheads = this.options.project.hasPermission('schedule.canViewLookAheads');\r\n            this.options.canManageLookAheads = this.options.project.hasPermission('schedule.canManageLookAheads');\r\n\r\n            this.settings = await this.options.project.fetchScheduleSettings();\r\n            this.model = this.schedule = await this.options.project.fetchSchedule();\r\n\r\n            if (this.options.canViewLookAheads) {\r\n                this.lookAheads = await this.options.project.fetchScheduleLookAheads();\r\n            }\r\n        } else {\r\n            this.options.isAdmin = this.model.get('templateId') > 0 && PJQ.app.session.hasPermission('schedule.isAdmin');\r\n            this.settings = await PJQ.app.session.fetchScheduleSettings();\r\n        }\r\n        this.options.activeView = this.settings.get('defaultView');\r\n\r\n        if (this.options.initLookAheadId > 0) {\r\n            if(this.options.shareKey != null) {\r\n                let initLookAhead = new PJQ.models.schedule.LookAhead({\r\n                    id: this.options.initLookAheadId\r\n                });\r\n                if (initLookAhead != null) {\r\n                    this.options.lookAhead = initLookAhead;\r\n                    await this.options.lookAhead.fetch();\r\n                }\r\n                this.options.initLookAheadId = null;\r\n            }\r\n            else if(this.lookAheads != null){\r\n                let initLookAhead = this.lookAheads.get(this.options.initLookAheadId);\r\n                if (initLookAhead != null) {\r\n                    this.options.lookAhead = initLookAhead;\r\n                    await this.options.lookAhead.fetch();\r\n                }\r\n                this.options.initLookAheadId = null;\r\n            }\r\n        }\r\n\r\n        this.render();\r\n    },\r\n    beforeRender: function () {\r\n        if (this.options.lookAhead) {\r\n            this.model = this.options.lookAhead;\r\n        } else {\r\n            this.model = this.schedule;\r\n        }\r\n    },\r\n    renderData: function () {\r\n        return {\r\n            model: this.model,\r\n            settings: this.settings,\r\n            project: this.options.project,\r\n            isShowCriticalPath: this.options.isShowCriticalPath,\r\n            activeView: this.options.activeView,\r\n            statuses: this.model ? this.model.statuses : new PJQ.collections.schedule.TaskStatuses(),\r\n            isAdmin: this.options.isAdmin,\r\n            lookAhead: this.options.lookAhead,\r\n            canViewLookAheads: this.options.canViewLookAheads,\r\n            canManageLookAheads: this.options.canManageLookAheads,\r\n            preferences: this.options.preferences\r\n        };\r\n    },\r\n    afterRender: function () {\r\n        this.chart = null;\r\n\r\n        if (this.model != null && this.model.isFetched) {\r\n            this.$activeView = this.$('.schedule-dashboard-view');\r\n            switch (this.options.activeView) {\r\n                case PJQ.constants.schedule.views.TASK_LIST:\r\n                    this.renderTaskList();\r\n                    break;\r\n                case PJQ.constants.schedule.views.TIMELINE:\r\n                    this.renderTimeline();\r\n                    break;\r\n                case PJQ.constants.schedule.views.CALENDAR:\r\n                default:\r\n                    this.renderCalendar();\r\n                    break;\r\n            }\r\n\r\n            if (this.options.initTaskId > 0) {\r\n                let initTask = this.model.tasks.get(this.options.initTaskId);\r\n                if (initTask != null) {\r\n                    this.editTask(initTask);\r\n                }\r\n                this.options.initTaskId = null;\r\n            }\r\n            this.renderPendingCount();\r\n\r\n            if (this.options.canViewLookAheads && this.model.get('projectId') > 0) {\r\n                let lookAheadChoices = [{\r\n                    id: -1,\r\n                    name: \"<i class='fal fa-plus mr-1'></i>New Look-Ahead\"\r\n                }];\r\n                _.each(this.lookAheads.models, (lookAhead) => {\r\n                    lookAheadChoices.push({\r\n                        id: lookAhead.id,\r\n                        name: '<strong>' + lookAhead.getDisplayName() + '</strong> | ' + (lookAhead.get('duration') / 7) + ' weeks',\r\n                        subtext: 'Actual: ' + lookAhead.getDisplayName(true)\r\n                    });\r\n                })\r\n\r\n                this.lookAheadPicker = new PJQ.inputs.Selectpicker({\r\n                    el: this.$('.select-look-ahead'),\r\n                    isIntChoices: true,\r\n                    isMultiple: false,\r\n                    isBlockSubtext: true,\r\n                    defaultValue: this.options.lookAhead ? this.options.lookAhead.id : 0,\r\n                    choices: [\r\n                        {\r\n                            name: \"\",\r\n                            choices: [{\r\n                                id: 0,\r\n                                name: \"Master Schedule\"\r\n                            }]\r\n                        },\r\n                        {\r\n                            name: \"Look-Aheads\",\r\n                            choices: lookAheadChoices\r\n                        }\r\n                    ],\r\n                    onChange: (value) => {\r\n                        if (value === -1) {\r\n                            this.lookAheadPicker.setValue(this.options.lookAhead ? this.options.lookAhead.id : 0);\r\n                            this.newLookAhead();\r\n                        } else {\r\n                            this.options.lookAhead = value > 0 ? this.lookAheads.get(value) : null;\r\n                        }\r\n\r\n                        if (this.options.lookAhead != null) {\r\n                            this.options.lookAhead.fetch({\r\n                                success: () => {\r\n                                    this.render();\r\n                                }\r\n                            })\r\n                        } else {\r\n                            this.render();\r\n                        }\r\n\r\n                        let route = 'projects/' + this.model.get('projectId').toString() + '/schedule';\r\n                        if (this.options.lookAhead != null) {\r\n                            route += '/lookaheads/' + this.options.lookAhead.id.toString();\r\n                        }\r\n                        PJQ.app.router.navigate(route, {\r\n                            trigger: false,\r\n                            replace: true\r\n                        });\r\n                    }\r\n                });\r\n            }\r\n        }\r\n    },\r\n    newLookAhead: function () {\r\n        new PJQ.views.schedule.NewLookAheadModal({\r\n            projectId: this.options.project.id,\r\n            schedule: this.schedule,\r\n            lookAheads: this.lookAheads,\r\n            onSave: _.bind(function (lookAhead) {\r\n                this.lookAheads.add(lookAhead);\r\n                this.options.lookAhead = lookAhead;\r\n                lookAhead.isFetched = true;\r\n                this.render();\r\n            }, this)\r\n        });\r\n    },\r\n    deleteLookAhead: function () {\r\n        if (this.options.lookAhead == null) {\r\n            return;\r\n        }\r\n\r\n        new PJQ.views.modals.YesNo({\r\n            header: \"Delete Schedule Look-Ahead?\",\r\n            body: \"Are you sure you want to delete this look-ahead? This action cannot be undone.\",\r\n            onYes: () => {\r\n                this.options.lookAhead.destroy({\r\n                    success: () => {\r\n                        this.lookAheads.remove(this.options.lookAhead);\r\n                        this.options.lookAhead = null;\r\n                        this.render();\r\n\r\n                        PJQ.notifications.notify.successNotify({\r\n                            message: 'Look-Ahead deleted successfully'\r\n                        });\r\n                    }\r\n                });\r\n            }\r\n        });\r\n    },\r\n    viewMasterSchedule: function () {\r\n        this.options.lookAhead = null;\r\n        this.render();\r\n    },\r\n    viewNotificationHistory: async function () {\r\n        if (this.options.project == null) {\r\n            return;\r\n        }\r\n\r\n        let notifications = await this.options.project.fetchScheduleNotifications(null, true);\r\n        new PJQ.views.notifications.NotificationHistory({\r\n            context: \"Project Schedule\",\r\n            collection: notifications,\r\n            extraColumns: [\r\n                {\r\n                    \"index\": 1,\r\n                    \"data\": \"\",\r\n                    \"title\": \"Task\",\r\n                    // \"width\": \"20%\",\r\n                    \"render\": function (data, type, row) {\r\n                        return row.get('taskName') ?? \"\";\r\n                    }\r\n                }\r\n            ]\r\n        });\r\n    },\r\n    shareSchedule: function () {\r\n        let sharingModal = new PJQ.views.sharing.SharingModal({\r\n            subject: 'A project schedule has been shared with you',\r\n            project: this.options.project,\r\n            onSave: _.bind(function (data) {\r\n                this.model.share(data, _.bind(function (share) {\r\n                    PJQ.notifications.notify.successNotify({\r\n                        message: 'Schedule share email sent'\r\n                    });\r\n                }, this));\r\n            }, this)\r\n        });\r\n        this.model.share(null, function (share) {\r\n            let callback = _.bind(sharingModal.urlChanged, sharingModal);\r\n            callback(share.get('url'));\r\n        });\r\n    },\r\n    setActiveView: function (newActiveView) {\r\n        if (newActiveView != null) {\r\n            this.options.activeView = newActiveView;\r\n            this.render();\r\n        }\r\n    },\r\n    activateCalendar: function () {\r\n        this.setActiveView(PJQ.constants.schedule.views.CALENDAR);\r\n    },\r\n    renderCalendar: function ($overrideEl, afterChartInit = null) {\r\n        new PJQ.views.calendars.FullCalendar({\r\n            el: _.size($overrideEl) > 0 ? $overrideEl : this.$activeView,\r\n            collection: this.model.tasks.getCalendarTasks(),\r\n            schedule: this.model,\r\n            project: this.options.project,\r\n            onTaskEdit: _.bind(function (task) {\r\n                this.editTask(task);\r\n            }, this),\r\n            canDelete: this.options.isAdmin,\r\n            onTaskDelete: _.bind(function (task) {\r\n                this.deleteTaskClicked(task);\r\n            }, this)\r\n        });\r\n        if (typeof afterChartInit === 'function') {\r\n            afterChartInit();\r\n        }\r\n    },\r\n    activateTimeline: function () {\r\n        this.setActiveView(PJQ.constants.schedule.views.TIMELINE);\r\n    },\r\n    renderTimeline: function (opts = null) {\r\n        if (opts == null) {\r\n            opts = {};\r\n        }\r\n\r\n        let hasOverride = _.size(opts.$overrideEl) > 0,\r\n            $chart;\r\n        if (hasOverride) {\r\n            $chart = opts.$overrideEl;\r\n        } else {\r\n            if (this.chart != null) {\r\n                this.chart.refreshTasks(this.model.tasks.getGanttTasks(), opts.contextTask);\r\n                return;\r\n            }\r\n\r\n            $chart = this.$activeView;\r\n        }\r\n        let sortColumnCookie = PJQ.constants.cookies.SCHEDULE_GANTT_SORT_COLUMN,\r\n            sortDirectionCookie = PJQ.constants.cookies.SCHEDULE_GANTT_SORT_DIRECTION,\r\n            prefs = PJQ.app.session.project != null ? PJQ.app.session.project.preferences : PJQ.app.session.preferences,\r\n            enableColumnSorting = prefs.hasPref(PJQ.constants.preferenceTypes.ENABLE_GANTT_COLUMN_SORTING),\r\n            ch = new PJQ.views.charts.dhtmlxGantt({\r\n                el: $chart,\r\n                shareKey: this.options.shareKey,\r\n                schedule: this.model,\r\n                settings: this.settings,\r\n                canEdit: this.options.isAdmin,\r\n                enableSorting: enableColumnSorting,\r\n                sortField: !enableColumnSorting ? null : PJQ.helpers.cookieHelpers.getCookie(sortColumnCookie),\r\n                sortAsc: !enableColumnSorting ? null : PJQ.helpers.cookieHelpers.getCookie(sortDirectionCookie) === 'asc',\r\n                isShowCriticalPath: this.options.isShowCriticalPath,\r\n                onSort: function (sort) {\r\n                    PJQ.helpers.cookieHelpers.setCookie(sortColumnCookie, sort.field);\r\n                    PJQ.helpers.cookieHelpers.setCookie(sortDirectionCookie, sort.asc ? 'asc' : 'desc');\r\n                },\r\n                onAddSubTask: (parent) => {\r\n                    let fnAdd = () => {\r\n                        let newTask = new PJQ.models.schedule.Task({\r\n                            projectId: this.model ? this.model.get('projectId') : null,\r\n                            templateId: this.model ? this.model.get('templateId') : null,\r\n                            lookAheadId: this.model ? this.model.get('lookAheadId') : null,\r\n                            status: this.model.statuses.getDefault(),\r\n                            summaryTaskId: parent.get('taskId'),\r\n                            start: parent && parent.get('isSummaryTask') ? parent.get('start') : null,\r\n                            finish: parent && parent.get('isSummaryTask') ? parent.get('start') : null,\r\n                            sortOrder: _.size(_.filter(this.model.tasks.models, function (model) {\r\n                                if (parent) {\r\n                                    return model.get('summaryTaskId') === parent.get('taskId')\r\n                                } else {\r\n                                    return model.get('summaryTaskId') == null;\r\n                                }\r\n                            }, this)) + 1\r\n                        });\r\n                        newTask.save(null, {\r\n                            success: _.bind(function () {\r\n                                this.model.tasks.add(newTask);\r\n                                this.chart.refreshTasks();\r\n                                this.chart.startInlineEdit(newTask.id);\r\n                            }, this)\r\n                        });\r\n                    }\r\n                    if (!parent.get('isSummaryTask')) {\r\n                        new PJQ.views.modals.YesNo({\r\n                            header: \"Convert to Summary Task?\",\r\n                            body: \"Creating a sub-task will convert this task to a summary task. Are you sure you want to proceed?\",\r\n                            onYes: _.bind(function () {\r\n                                parent.set('isSummaryTask', true);\r\n                                fnAdd();\r\n                            }, this)\r\n                        });\r\n                    } else {\r\n                        fnAdd();\r\n                    }\r\n                },\r\n                onTaskAdd: _.bind(function (task, callback) {\r\n                    let parent = task.parent ? this.model.tasks.get(task.parent) : null,\r\n                        newTask = new PJQ.models.schedule.Task({\r\n                            projectId: this.model ? this.model.get('projectId') : null,\r\n                            templateId: this.model ? this.model.get('templateId') : null,\r\n                            status: this.model.statuses.getDefault(),\r\n                            summaryTaskId: parent && parent.get('isSummaryTask') ? parent.get('taskId') : null,\r\n                            parentTaskId: null,\r\n                            start: parent && parent.get('isSummaryTask') ? parent.get('start') : null,\r\n                            finish: parent && parent.get('isSummaryTask') ? parent.get('start') : null,\r\n                            sortOrder: _.size(_.filter(this.model.tasks.models, function (model) {\r\n                                if (parent) {\r\n                                    return model.get('summaryTaskId') === parent.get('taskId')\r\n                                } else {\r\n                                    return model.get('summaryTaskId') == null;\r\n                                }\r\n                            }, this)) + 1\r\n                        });\r\n                    newTask.save(null, {\r\n                        success: _.bind(function () {\r\n                            this.model.tasks.add(newTask);\r\n                            this.chart.refreshTasks();\r\n                            if (typeof callback === 'function') {\r\n                                callback(newTask);\r\n                            }\r\n                        }, this)\r\n                    });\r\n                }, this),\r\n                onTaskEdit: _.bind(function (task) {\r\n                    this.editTask(task);\r\n                }, this),\r\n                onTaskDelete: _.bind(function (task) {\r\n                    if (task) {\r\n                        this.deleteTaskClicked(task, false);\r\n                    }\r\n                }, this),\r\n                onTaskMoved: _.bind(function (taskModel, task, editedValue, isTrueDate = false) {\r\n                    // The gantt considers the end_date to be the day after the last working day, e.g., Start Date is August 08, 2022, and the duration is 2 days,\r\n                    // the Gantt considers the end_date as August 10, 2022, whereas our API considers it to be August 09, 2022. So we subtract a day from the end_date\r\n                    let endDate = new Date(task.end_date - 1);\r\n                    endDate.setHours(0, 0, 0, 0);\r\n                    if (task.type === 'milestone' || isTrueDate) {\r\n                        endDate = new Date(task.end_date);\r\n                    }\r\n                    if (task.unscheduled) {\r\n                        // if the task in unscheduled, we need to handle it in different ways\r\n                        if (editedValue === 'text') {\r\n                            taskModel.set({\r\n                                name: task.text,\r\n                                start: null,\r\n                                finish: null,\r\n                                duration: task.duration,\r\n                                percentComplete: Math.round(task.progress * 100)\r\n                            });\r\n                        } else if (editedValue === 'start_date') {\r\n                            taskModel.set({\r\n                                name: task.text,\r\n                                start: task.start_date,\r\n                                finish: task.start_date,\r\n                                duration: 1,\r\n                                percentComplete: Math.round(task.progress * 100)\r\n                            });\r\n                        } else if (editedValue === 'end_date') {\r\n                            taskModel.set({\r\n                                name: task.text,\r\n                                start: task.end_date,\r\n                                finish: task.end_date,\r\n                                duration: 1,\r\n                                percentComplete: Math.round(task.progress * 100)\r\n                            });\r\n                        }\r\n                    } else {\r\n                        taskModel.set({\r\n                            name: task.text,\r\n                            start: task.start_date,\r\n                            finish: endDate,\r\n                            duration: PJQ.helpers.dateHelpers.getDateDaysDiff(endDate, task.start_date, !taskModel.get('weekendWork'), true),\r\n                            percentComplete: Math.round(task.progress * 100)\r\n                        });\r\n                    }\r\n                    this.updateTaskTime(taskModel, taskModel.get('name'), taskModel.get('start'), taskModel.get('finish'), taskModel.get('duration'), taskModel.get('percentComplete'));\r\n                }, this),\r\n                onTaskUpdateSummary: _.bind(function (task, summaryTaskId = null, isNewTask = false) {\r\n                    if (isNewTask) {\r\n                        this.model.tasks.add(task);\r\n                    }\r\n                    if (parseInt(summaryTaskId) !== parseInt(task.get('summaryTaskId'))) {\r\n                        this.updateSummaryTask(task, summaryTaskId);\r\n                    }\r\n                }, this),\r\n                onTaskUpdated: _.bind(function (taskModel, task) {\r\n                    let endDate = new Date(task.end_date);\r\n                    endDate.setHours(0, 0, 0, 0);\r\n                    if (task.type === 'milestone') {\r\n                        endDate = new Date(task.end_date);\r\n                    }\r\n                    taskModel.set({\r\n                        name: task.text,\r\n                        start: task.start_date,\r\n                        finish: endDate,\r\n                        duration: task.duration,\r\n                        percentComplete: Math.round(task.progress * 100)\r\n                    });\r\n                    this.updateTaskTime(taskModel, taskModel.get('name'), taskModel.get('start'), taskModel.get('finish'), taskModel.get('duration'), taskModel.get('percentComplete'));\r\n                }, this),\r\n                onTaskUpdateSummary: _.bind(function (task, summaryTaskId = null, isNewTask = false) {\r\n                    if (isNewTask) {\r\n                        this.model.tasks.add(task);\r\n                    }\r\n                    if (parseInt(summaryTaskId) !== parseInt(task.get('summaryTaskId'))) {\r\n                        this.updateSummaryTask(task, summaryTaskId);\r\n                    }\r\n                }, this),\r\n                onDependencyAdd: _.bind(function (task, dependencyInfo) {\r\n                    new PJQ.ajax.Request({\r\n                        endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\r\n                            {\r\n                                endpoint: 'schedule'\r\n                            },\r\n                            {\r\n                                endpoint: 'tasks',\r\n                                value: task.get('taskId')\r\n                            },\r\n                            {\r\n                                endpoint: 'dependencies'\r\n                            }\r\n                        ]),\r\n                        data: {\r\n                            taskId: task.get('taskId'),\r\n                            dependTaskId: parseInt(dependencyInfo.source),\r\n                            offset: dependencyInfo.lag,\r\n                            type: PJQ.constants.schedule.linkTypes[parseInt(dependencyInfo.type)]\r\n                        }\r\n                    }).post().done(_.bind(function (data) {\r\n                        _.each(data.changes, function (task) {\r\n                            let colTask = this.model.tasks.get(task.taskId);\r\n                            task.start = PJQ.helpers.dateHelpers.parseDateString(task.start, false);\r\n                            task.finish = PJQ.helpers.dateHelpers.parseDateString(task.finish, false);\r\n                            colTask.set({\r\n                                start: task.start,\r\n                                finish: task.finish\r\n                            });\r\n                            this.chart.updateTask(colTask);\r\n                        }, this);\r\n\r\n                        let task = this.model.tasks.get(data.dependency.taskId);\r\n\r\n                        // Fetch the task to get the dependencyId\r\n                        task.fetch({\r\n                            success: _.bind(function (task) {\r\n                                let dependency = _.max(task.dependencies.models, function (dependency) {\r\n                                    return dependency.get('dependencyId');\r\n                                }, this);\r\n                                this.model.dependencies.add(dependency);\r\n                                this.chart.refreshTasks();\r\n                            }, this)\r\n                        })\r\n                    }, this));\r\n                }, this),\r\n                onDependencyDelete: _.bind(function (task, dependencyInfo) {\r\n                    new PJQ.ajax.Request({\r\n                        endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\r\n                            {\r\n                                endpoint: 'schedule'\r\n                            },\r\n                            {\r\n                                endpoint: 'tasks',\r\n                                value: task.get('taskId')\r\n                            },\r\n                            {\r\n                                endpoint: 'dependencies',\r\n                                value: dependencyInfo.id\r\n                            }\r\n                        ])\r\n                    }).delete().done(_.bind(function (data) {\r\n                        this.model.dependencies.remove(dependencyInfo.id);\r\n                        task.dependencies.remove(dependencyInfo.id);\r\n                    }, this));\r\n                }, this)\r\n            });\r\n\r\n        if (!hasOverride) {\r\n            this.chart = ch;\r\n        }\r\n    },\r\n    zoomInGantt: function () {\r\n        this.chart.zoomIn();\r\n        let zoomLevel = this.chart.getZoom();\r\n        this.$('.btn-zoom-in').attr('disabled', (zoomLevel === 0));\r\n        this.$('.btn-zoom-out').attr('disabled', (zoomLevel === 4));\r\n    },\r\n    zoomOutGantt: function () {\r\n        this.chart.zoomOut();\r\n        let zoomLevel = this.chart.getZoom();\r\n        this.$('.btn-zoom-in').attr('disabled', (zoomLevel === 0));\r\n        this.$('.btn-zoom-out').attr('disabled', (zoomLevel === 4));\r\n    },\r\n    showCriticalPath: function () {\r\n        this.options.isShowCriticalPath = !this.options.isShowCriticalPath;\r\n        this.chart.toggleCriticalPath(this.options.isShowCriticalPath);\r\n    },\r\n    activateTaskList: function () {\r\n        this.setActiveView(PJQ.constants.schedule.views.TASK_LIST);\r\n    },\r\n    renderTaskList: function () {\r\n        this.addLoader();\r\n        this.taskList = new PJQ.views.schedule.TaskList({\r\n            el: this.$activeView,\r\n            project: this.options.project,\r\n            schedule: this.model,\r\n            model: this.model,\r\n            isAdmin: this.options.isAdmin,\r\n            onTaskEdit: _.bind(function (task) {\r\n                this.editTask(task);\r\n            }, this),\r\n            onTaskDelete: _.bind(function (task) {\r\n                this.deleteTaskClicked(task);\r\n            }, this),\r\n            onTaskUpdateSummary: _.bind(function (task, summaryTaskId = null, isNewTask = false) {\r\n                if (isNewTask) {\r\n                    this.model.tasks.add(task);\r\n                }\r\n                if (parseInt(summaryTaskId) !== parseInt(task.get('summaryTaskId'))) {\r\n                    this.updateSummaryTask(task, summaryTaskId);\r\n                }\r\n            }, this),\r\n            afterTableRendered: _.bind(function () {\r\n                this.removeLoader();\r\n            }, this)\r\n        });\r\n    },\r\n    updateTaskTime: function (task, name, start, finish, duration, percentComplete) {\r\n        this.addLoader();\r\n        if (task.model) {\r\n            task.model.set({\r\n                name: name,\r\n                duration: duration,\r\n                percentComplete: percentComplete\r\n            });\r\n        }\r\n\r\n        let fnSave = () => {\r\n            new PJQ.ajax.Request({\r\n                data: {\r\n                    name: name,\r\n                    start: start,\r\n                    finish: finish,\r\n                    duration: duration,\r\n                    percentComplete: percentComplete\r\n                },\r\n                endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\r\n                    {\r\n                        endpoint: 'schedule'\r\n                    },\r\n                    {\r\n                        endpoint: 'tasks',\r\n                        value: task.model ? task.model.get('taskId') : task.get('taskId')\r\n                    }\r\n                ])\r\n            }).patch().done(_.bind(function (res) {\r\n                this.removeLoader();\r\n                let updatedTask = task.model ? task.model : task;\r\n                if (_.size(res.changes) > 0) {\r\n                    _.each(res.changes, function (change) {\r\n                        let changedTask = this.model.tasks.get(change.taskId);\r\n                        if (changedTask != null) {\r\n                            changedTask.set({\r\n                                start: PJQ.helpers.dateHelpers.parseDateString(change.start, false),\r\n                                finish: PJQ.helpers.dateHelpers.parseDateString(change.finish, false)\r\n                            });\r\n\r\n                            if (this.options.activeView === PJQ.constants.schedule.views.TASK_LIST) {\r\n                                PJQ.app.session.project.trigger('scheduleTaskChanged', changedTask, false);\r\n                            }\r\n\r\n                            if (this.chart && typeof this.chart.updateTask === 'function') {\r\n                                this.chart.updateTask(changedTask);\r\n                            }\r\n                        }\r\n                    }, this);\r\n                }\r\n                if (this.options.activeView === PJQ.constants.schedule.views.TIMELINE) {\r\n                    this.chart.updateTask(task);\r\n                }\r\n            }, this));\r\n        };\r\n        if ((task.model ? task.model : task).get('projectId') > 0 && this.settings.get('notificationsEnabled') && this.settings.get('dateChangeNotificationsMode') === 1) {\r\n            let changedTasks = (task.model ? task.model : task).determineChangedTasks();\r\n            new PJQ.views.schedule.TaskChangeNotifications({\r\n                changedTasks: changedTasks,\r\n                onSave: _.bind(function (res) {\r\n                    fnSave(res.noNotify);\r\n                }, this)\r\n            });\r\n        } else {\r\n            fnSave();\r\n        }\r\n    },\r\n    addLoader: function () {\r\n        this.loader = new PJQ.Loader(this.$('.schedule-dashboard-view'));\r\n    },\r\n    removeLoader: function () {\r\n        this.loader.remove();\r\n    },\r\n    editTask: function (task) {\r\n        let taskModel = task,\r\n            isNew = task.id == null;\r\n        if (this.chart && task == null) {\r\n            taskModel = _.find(this.chart.collection.models, function (model) {\r\n                return model.get('id') === task.get('taskId');\r\n            })\r\n        }\r\n        let fnModal = _.bind(function () {\r\n            new PJQ.views.schedule.EditTaskModal({\r\n                project: this.options.project,\r\n                isSummaryTask: task.get('isSummaryTask'),\r\n                schedule: this.model,\r\n                model: task,\r\n                onSave: _.bind(function () {\r\n                    // Need to fetch the task to get any new dependencies ids, otherwise you cannot delete the dependency if you edit it again without refreshing.\r\n                    task.fetch({\r\n                        success: _.bind(function (taskModel) {\r\n                            _.each(this.model.dependencies.models, function (dep) {\r\n                                if (dep && dep.id < 0) {\r\n                                    this.model.dependencies.remove(dep);\r\n                                }\r\n                                let updatedDep = taskModel.dependencies.get(dep.id);\r\n                                if (updatedDep != null) {\r\n                                    dep.set('offset', updatedDep.get('offset'));\r\n                                    dep.set('type', updatedDep.get('type'));\r\n                                }\r\n                            }, this)\r\n                            this.model.dependencies.add(taskModel.dependencies.models);\r\n\r\n                            if (this.options.activeView === PJQ.constants.schedule.views.TIMELINE) {\r\n                                if (_.size(this.model.tasks.models) === 1) {\r\n                                    this.render()\r\n                                } else {\r\n                                    this.renderTimeline();\r\n                                }\r\n                            } else if (this.options.activeView === PJQ.constants.schedule.views.TASK_LIST) {\r\n                                if (_.size(this.model.tasks.models) === 1) {\r\n                                    this.render()\r\n                                } else {\r\n                                    PJQ.app.session.project.trigger('scheduleTaskChanged', taskModel, isNew);\r\n                                }\r\n                            } else {\r\n                                this.render();\r\n                            }\r\n                        }, this)\r\n                    })\r\n                }, this),\r\n                onClose: _.bind(function () {\r\n                    if (task.isNew()) {\r\n                        this.model.tasks.remove(task);\r\n                        if (this.options.activeView === PJQ.constants.schedule.views.TIMELINE && _.size(this.model.tasks) > 0) {\r\n                            this.renderTimeline();\r\n                        } else {\r\n                            this.render();\r\n                        }\r\n                    } else {\r\n                        this.renderPendingCount();\r\n                    }\r\n                }, this),\r\n                onDelete: _.bind(function () {\r\n                    this.deleteTask(task);\r\n                }, this)\r\n            });\r\n        }, this);\r\n        if (!task.isNew()) {\r\n            task.fetch({\r\n                success: _.bind(function () {\r\n                    fnModal();\r\n                }, this)\r\n            })\r\n        } else {\r\n            fnModal();\r\n        }\r\n    },\r\n    deleteTaskClicked: function (task, showConfirmation = true) {\r\n        let summaryTask = _.find(this.model.tasks.models, function (model) {\r\n                return model.get('taskId') === task.get('summaryTaskId')\r\n            }, this),\r\n            isLastRemainingTask = false;\r\n        if (summaryTask != null) {\r\n            isLastRemainingTask = true;\r\n            _.each(this.model.tasks.models, function (model) {\r\n                if (model.get('summaryTaskId') === summaryTask.get('taskId') && model.get('taskId') !== task.get('taskId')) {\r\n                    isLastRemainingTask = false;\r\n                }\r\n            }, this)\r\n        }\r\n        if (isLastRemainingTask && showConfirmation) {\r\n            new PJQ.views.modals.DeleteCancel({\r\n                header: \"Confirm Deletion\",\r\n                body: \"This is the last remaining task in the summary task \\\"\" + summaryTask.get('name') + \"\\\". Deleting this task will also delete the summary task. Are you sure you want to delete this task?\",\r\n                onDelete: _.bind(function () {\r\n                    this.deleteTask(task, summaryTask);\r\n                }, this)\r\n            });\r\n        } else if (showConfirmation) {\r\n            new PJQ.views.modals.DeleteCancel({\r\n                header: \"Confirm Deletion\",\r\n                body: \"Are you sure you want to delete this task?\",\r\n                onDelete: _.bind(function () {\r\n                    this.deleteTask(task);\r\n                }, this)\r\n            });\r\n        } else {\r\n            this.deleteTask(task);\r\n        }\r\n    },\r\n    deleteTask: function (originalTask, summary) {\r\n        let nestedTasks = [originalTask],\r\n            deletedDependencies = [],\r\n            getNestedTasks = _.bind(function (task) {\r\n                // First get the nested tasks for the passed through task\r\n                let taskNestedTasks = _.filter(this.model.tasks.models, function (model) {\r\n                    return model.get('parentTaskId') === task.get('taskId') || model.get('summaryTaskId') === task.get('taskId')\r\n                }, this);\r\n                // Concat this tasks nested tasks with the existing nested tasks array\r\n                nestedTasks = nestedTasks.concat(taskNestedTasks);\r\n                //Check if any of the child tasks have children\r\n                _.each(taskNestedTasks, function (nestedTask) {\r\n                    let hasChild = _.find(this.model.tasks.models, function (model) {\r\n                        return model.get('summaryTaskId') === nestedTask.get('taskId') || model.get('parentTaskId') === nestedTask.get('taskId');\r\n                    }, this)\r\n                    // if a child task exists, then run the function again to get those child tasks\r\n                    if (hasChild) {\r\n                        getNestedTasks(nestedTask);\r\n                    }\r\n                }, this);\r\n            }, this);\r\n        // Get the nested tasks that need to be deleted from the original task\r\n        getNestedTasks(originalTask);\r\n        // Find the dependencies that include any of the tasks that will be deleted\r\n        _.each(this.model.dependencies.models, function (dependency) {\r\n            let deletedTask = _.find(nestedTasks, function (task) {\r\n                return task.get('taskId') === dependency.get('taskId') || task.get('taskId') === dependency.get('dependTaskId');\r\n            })\r\n            if (deletedTask) {\r\n                deletedDependencies.push(dependency);\r\n            }\r\n        }, this);\r\n        this.model.tasks.remove(nestedTasks);\r\n        this.model.dependencies.remove(deletedDependencies);\r\n        if (summary) {\r\n            this.model.tasks.remove(summary)\r\n            summary.destroy();\r\n        }\r\n        originalTask.destroy();\r\n        if (this.options.activeView === PJQ.constants.schedule.views.TIMELINE && _.size(this.model.tasks.models) > 0) {\r\n            this.chart.refreshTasks();\r\n        } else if (this.options.activeView === PJQ.constants.schedule.views.TASK_LIST && _.size(this.model.tasks.models) > 0) {\r\n            PJQ.app.session.project.trigger('scheduleTaskChanged', originalTask, false, false, true);\r\n        } else {\r\n            this.render()\r\n        }\r\n    },\r\n    updateSummaryTask: function (task, summaryTaskId = null) {\r\n        new PJQ.ajax.Request({\r\n            endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\r\n                {\r\n                    endpoint: 'schedule'\r\n                },\r\n                {\r\n                    endpoint: 'tasks',\r\n                    value: task.model ? task.model.get('taskId') : task.get('taskId')\r\n                },\r\n                {\r\n                    endpoint: 'summary',\r\n                    value: summaryTaskId\r\n                }\r\n            ])\r\n        }).put().done(_.bind(function () {\r\n            if (task.model) {\r\n                task = task.model;\r\n            }\r\n            if (summaryTaskId > 0) {\r\n                let summaryTask = this.model.tasks.get(summaryTaskId),\r\n                    existingSummaryTask = task.get('summaryTaskId') ? this.model.tasks.get(task.get('summaryTaskId')) : null\r\n                summaryTask.set('isSummaryTask', true);\r\n                task.set('summaryTaskId', parseInt(summaryTaskId));\r\n                _.each(summaryTask.dependencies.models, function (dep) {\r\n                    let id = dep.get('dependencyId');\r\n                    _.each(this.model.tasks.models, function (model) {\r\n                        if (model.dependencies.get(id)) {\r\n                            model.dependencies.remove(id)\r\n                        }\r\n                    }, this)\r\n                }, this)\r\n\r\n                let name = task.get('name'),\r\n                    start = new Date(task.get('start')),\r\n                    finish = new Date(task.get('finish')),\r\n                    duration = task.get('duration'),\r\n                    percentComplete = task.get('percentComplete');\r\n                this.updateTaskTime(task, name, start, finish, duration, percentComplete);\r\n\r\n                // if the summary task is being changed from an existing one, check if there are any other existing tasks on that summary task.\r\n                // if not, it will no longer be a summary task and needs to reflect that.\r\n                if (existingSummaryTask) {\r\n                    let existingSummaryTaskHasChildren = _.find(this.model.tasks.models, function (task) {\r\n                        return task.get('summaryTaskId') === existingSummaryTask.get('taskId')\r\n                    }, this) != null;\r\n                    if (!existingSummaryTaskHasChildren) {\r\n                        existingSummaryTask.set({\r\n                            isSummaryTask: false,\r\n                        });\r\n\r\n                        let existingSummaryName = existingSummaryTask.get('name'),\r\n                            existingSummaryStart = new Date(existingSummaryTask.get('start')),\r\n                            existingSummaryFinish = new Date(existingSummaryTask.get('finish')),\r\n                            existingSummaryDuration = existingSummaryTask.get('duration'),\r\n                            existingSummaryPercentComplete = existingSummaryTask.get('percentComplete');\r\n                        this.updateTaskTime(existingSummaryTask, existingSummaryName, existingSummaryStart, existingSummaryFinish, existingSummaryDuration, existingSummaryPercentComplete);\r\n                    }\r\n                }\r\n            } else {\r\n                let summaryTask = _.find(this.model.tasks.models, function (model) {\r\n                    return model.get('taskId') === task.get('summaryTaskId') && model.get('taskId') !== task.get('taskId');\r\n                },)\r\n                let name = summaryTask.get('name'),\r\n                    start = new Date(summaryTask.get('start')),\r\n                    finish = new Date(summaryTask.get('finish')),\r\n                    duration = summaryTask.get('duration'),\r\n                    percentComplete = summaryTask.get('percentComplete');\r\n                this.updateTaskTime(summaryTask, name, start, finish, duration, percentComplete);\r\n                task.set('summaryTaskId', null);\r\n\r\n                // If the summary task the task is being removed from has no more tasks underneath it, it will no longer be a summary task.\r\n                summaryTask.set('isSummaryTask', _.find(this.model.tasks.models, function (task) {\r\n                    return task.get('summaryTaskId') === summaryTask.get('taskId')\r\n                }, this) != null);\r\n            }\r\n            if (this.options.activeView === PJQ.constants.schedule.views.TASK_LIST) {\r\n                PJQ.app.session.project.trigger('scheduleTaskChanged', task, false, true);\r\n            } else {\r\n                this.render();\r\n            }\r\n        }, this))\r\n    },\r\n    addTaskClicked: function (task) {\r\n        let parentIsSummary = false;\r\n        if (task && parseInt(task.parent) > 0) {\r\n            let parent = this.model.tasks.get(task.parent);\r\n            parentIsSummary = parent.get('isSummaryTask');\r\n        }\r\n        let newTask = new PJQ.models.schedule.Task({\r\n            projectId: this.model ? this.model.get('projectId') : null,\r\n            templateId: this.model ? this.model.get('templateId') : null,\r\n            lookAheadId: this.options.lookAhead != null ? this.options.lookAhead.id : null,\r\n            parentTaskId: parseInt(task.parent) > 0 && !parentIsSummary ? parseInt(task.parent) : null,\r\n            summaryTaskId: parseInt(task.parent) > 0 && parentIsSummary ? parseInt(task.parent) : null,\r\n            sortOrder: _.size(_.filter(this.model.tasks.models, function (model) {\r\n                return model.get('summaryTaskId') == null;\r\n            }, this)) + 1\r\n        });\r\n        this.model.tasks.add(newTask);\r\n        this.editTask(newTask);\r\n    },\r\n    addMilestoneClicked: function () {\r\n        let newTask = new PJQ.models.schedule.Task({\r\n            name: \"\",\r\n            duration: 1,\r\n            start: null,\r\n            finish: null,\r\n            weekendWork: false,\r\n            isAllDay: true,\r\n            isMilestone: true,\r\n            percentComplete: 0,\r\n            notes: \"\",\r\n            status: this.model.statuses.getDefault(),\r\n            projectId: this.model ? this.model.get('projectId') : null,\r\n            templateId: this.model ? this.model.get('templateId') : null\r\n        });\r\n        this.model.tasks.add(newTask);\r\n        this.editTask(newTask);\r\n    },\r\n    editSettings: function () {\r\n        new PJQ.views.schedule.SettingsModal({\r\n            model: this.settings,\r\n            project: this.options.project,\r\n            onSave: _.bind(function () {\r\n                this.setActiveView(this.settings.get('defaultView'));\r\n                this.render();\r\n            }, this)\r\n        });\r\n    },\r\n    saveAsTemplate: function () {\r\n        new PJQ.views.schedule.SaveAsTemplateModal({\r\n            project: this.options.project\r\n        });\r\n    },\r\n    importTemplate: function () {\r\n        new PJQ.views.schedule.ImportTemplateModal({\r\n            project: this.options.project,\r\n            onImport: _.bind(function (schedule) {\r\n                this.schedule = schedule;\r\n                this.options.project.schedule = this.model;\r\n                this.render();\r\n            }, this)\r\n        });\r\n    },\r\n    uploadTemplate: function () {\r\n        new PJQ.views.schedule.UploadTemplateModal({\r\n            project: this.options.project,\r\n            onImport: _.bind(function () {\r\n                this.model.fetch({\r\n                    success: _.bind(function () {\r\n                        this.render();\r\n                    }, this)\r\n                });\r\n            }, this)\r\n        });\r\n    },\r\n    exportSchedule: function () {\r\n        let projectId = null,\r\n            endpoint = null;\r\n        if (this.options.project == null) {\r\n            projectId = this.model.get('projectId');\r\n            endpoint = PJQ.helpers.urlHelpers.generateEndpoint([\r\n                {\r\n                    endpoint: 'projects',\r\n                    value: projectId\r\n                },\r\n                {\r\n                    endpoint: 'schedule',\r\n                    value: 'export'\r\n                }\r\n            ], [\r\n                {\r\n                    parameter: 'shareKey',\r\n                    value: this.options.shareKey\r\n                }\r\n            ]);\r\n        }\r\n\r\n        new PJQ.ajax.Request({\r\n            endpoint: this.options.project ? this.options.project.endpoint(false) + '/schedule/export' + (this.options.lookAhead != null ? ('?lookAheadId=' + this.options.lookAhead.id) : '') : endpoint,\r\n            data: {\r\n                isApi2: true\r\n            }\r\n        }).post().done(_.bind(function (response) {\r\n            PJQ.files.downloadFile(response.url, {\r\n                isEndpoint: false\r\n            });\r\n        }, this)).fail(_.bind(function (xhr, err, result) {\r\n        }, this));\r\n    },\r\n    orderGantt: function () {\r\n        this.getGanttData(_.bind(function (data) {\r\n            new PJQ.views.schedule.OrderGanttModal({\r\n                reportData: {\r\n                    data: data,\r\n                    templateName: 'schedule-gantt',\r\n                    fileName: this.options.project.get('projectName').replace(' ', '_') + '_Gantt'\r\n                },\r\n                project: this.options.project\r\n            });\r\n        }, this));\r\n    },\r\n    exportView: function () {\r\n        switch (this.options.activeView) {\r\n            case PJQ.constants.schedule.views.CALENDAR:\r\n                this.exportCalendar();\r\n                return;\r\n            case PJQ.constants.schedule.views.TASK_LIST:\r\n                this.exportSchedule();\r\n                return;\r\n            case PJQ.constants.schedule.views.TIMELINE:\r\n                this.exportGantt();\r\n                return;\r\n        }\r\n    },\r\n    exportCalendar: function () {\r\n        let loader = new PJQ.Loader(this.$('.btn-export'), {\r\n                type: 'button',\r\n                loadingText: 'Exporting'\r\n            }),\r\n            rect = this.$('.fc-day-grid')[0].getBoundingClientRect(),\r\n            $report = this.$activeView.clone();\r\n        PJQ.helpers.elementHelpers.addInvisibleElement($report);\r\n        $report.find('.fc-day-grid-container').height('inherit');\r\n\r\n        let params = [];\r\n        if(!this.options.project && this.options.shareKey){\r\n            params.push({\r\n                parameter: 'shareKey',\r\n                value: this.options.shareKey\r\n            })\r\n        }\r\n\r\n        let endpoint = PJQ.helpers.urlHelpers.generateEndpoint([\r\n            {\r\n                endpoint: 'schedule'\r\n            },\r\n            {\r\n                endpoint: 'export',\r\n                value: 'calendar'\r\n            }\r\n        ], params);\r\n\r\n        PJQ.files.queueDownload(endpoint, {\r\n            data: {\r\n                    html: $report.html(),\r\n                    height: rect.height,\r\n                    width: rect.width,\r\n                    project: this.options.project ? this.options.project.attributes : null,\r\n                    logoURL: PJQ.app.session.project?.preferences.hasPref(PJQ.constants.preferenceTypes.EMAIL_LOGO_URL) ? PJQ.app.session.project.preferences.getPref(PJQ.constants.preferenceTypes.EMAIL_LOGO_URL) : ''\r\n                },\r\n            templateName: 'schedule-calendar',\r\n            filename: (this.options.project ? this.options.project.get('projectName').replace(' ', '_') : 'Project') + '_Calendar'\r\n        }, function(){\r\n            $report.remove();\r\n            loader.remove();\r\n        }, true);\r\n    },\r\n    exportGantt: function (e) {\r\n        let loader = new PJQ.Loader(this.$('.btn-export'), {\r\n                type: 'button',\r\n                loadingText: 'Exporting'\r\n            }),\r\n            $temp = $('<div class=\"invisible wd-100\" />'),\r\n            target = $(e.currentTarget),\r\n            type = target.data('export'),\r\n            fnCallback = _.bind(function () {\r\n                loader.remove();\r\n            }, this);\r\n\r\n        $('body').append($temp);\r\n        switch (type) {\r\n            case \"png\":\r\n                this.chart.exportToPNG(fnCallback);\r\n                break;\r\n            case \"pdf\":\r\n                this.chart.exportToPDF(fnCallback);\r\n                break;\r\n            case \"excel\":\r\n                this.chart.exportToExcel(fnCallback);\r\n                break;\r\n            case \"msproject\":\r\n                this.chart.exportToMSProject(fnCallback);\r\n                break;\r\n            case \"primavera\":\r\n                this.chart.exportToPrimavera(fnCallback);\r\n                break;\r\n        }\r\n    },\r\n    viewRequestedChanges: function () {\r\n        this.model.fetch({\r\n            success: _.bind(function () {\r\n                new PJQ.views.schedule.ViewRequestedChangesModal({\r\n                    model: this.model,\r\n                    onTaskEdit: _.bind(function (task) {\r\n                        this.editTask(task);\r\n                    }, this),\r\n                    onClose: _.bind(function () {\r\n                        this.renderPendingCount();\r\n                    }, this),\r\n                    onApprove: _.bind(function () {\r\n                        this.render();\r\n                    }, this)\r\n                })\r\n            }, this)\r\n        });\r\n    },\r\n    renderPendingCount: function () {\r\n        if (this.options.project != null && this.options.lookAhead == null) {\r\n            let pendingCount = _.size(_.filter(this.model.pendingRequestedChanges.models, function (change) {\r\n                return change.get('approvedOn') == null && change.get('rejectedOn') == null;\r\n            }));\r\n            let btn = '<button type=\"button\" class=\"btn btn-light btn-view-requested-changes ht-40p\" ' + (pendingCount === 0 ? 'disabled' : '') + ' >Change Requests<span class=\"badge ' + (pendingCount === 0 ? 'badge-secondary' : 'badge-danger') + ' fs-14 lh-15 ml-1 req-change-count\">' + pendingCount.toString() + '</span></button>',\r\n                $btn = this.$('.btn-view-requested-changes');\r\n            $btn.replaceWith(btn);\r\n        }\r\n    }\r\n});\r\n\r\nPJQ.views.schedule.ViewRequestedChangesModal = PJQ.views.BaseModal.extend({\r\n    defaults: {\r\n        template: new PJQ.templating.Template(PJQ.constants.modules.SCHEDULE, 'Modal-View-Requested-Changes'),\r\n        subTemplates: {\r\n            requestedChanges: new PJQ.templating.Template(PJQ.constants.modules.SCHEDULE, 'Task-Requested-Changes')\r\n        },\r\n        maxWidth: 800,\r\n        width: '90%',\r\n        onSave: null,\r\n        onTaskEdit: null,\r\n        onApprove: null\r\n    },\r\n    events: {\r\n        'click .btn-delete-requested-change': 'deleteRequestedChange',\r\n        'click .btn-approve-requested-change': 'approveRequestedChangeClicked',\r\n        'click .btn-reject-requested-change': 'rejectRequestedChange',\r\n        'click .btn-request-task': 'viewTask',\r\n        'click .btn-close': 'close'\r\n    },\r\n    renderData: function () {\r\n        return {\r\n            model: this.model\r\n        };\r\n    },\r\n    afterRender: function () {\r\n        this.model.pendingRequestedChanges.models = _.filter(this.model.pendingRequestedChanges.models, function (model) {\r\n            return model.get('approvedOn') === null && model.get('rejectedOn') === null;\r\n        });\r\n        this.renderRequestedChanges();\r\n    },\r\n    renderRequestedChanges: function () {\r\n        this.renderSubTemplate(false, this.options.subTemplates.requestedChanges, this.$('.requested-changes-outer'), {\r\n            model: this.model,\r\n            requestedChanges: this.model.pendingRequestedChanges,\r\n            canEdit: true,\r\n            isPendingList: true\r\n        });\r\n    },\r\n    deleteRequestedChange: function (e) {\r\n        let target = $(e.currentTarget),\r\n            cid = target.closest('.card').data('cid'),\r\n            requestedChange = this.model.pendingRequestedChanges.get(cid);\r\n        new PJQ.views.modals.DeleteCancel({\r\n            header: \"Confirm Deletion\",\r\n            body: \"Are you sure you want to delete this requested change?\",\r\n            onDelete: _.bind(function () {\r\n                requestedChange.set('isDeleted', true);\r\n                this.model.isDirty = true;\r\n                this.renderRequestedChanges();\r\n            }, this)\r\n        });\r\n    },\r\n    approveRequestedChangeClicked: function (e) {\r\n        ;\r\n        let target = $(e.currentTarget),\r\n            cid = target.closest('.card').data('cid'),\r\n            requestedChange = this.model.pendingRequestedChanges.get(cid),\r\n            newStart = new Date(requestedChange.get('newStart')),\r\n            newFinish = new Date(requestedChange.get('newFinish')),\r\n            task = _.find(this.model.tasks.models, function (task) {\r\n                return task.get('taskId') === requestedChange.get('taskId');\r\n            })\r\n        if ((newFinish.getDay() === (0 || 6) || newStart.getDay() === (0 || 6)) && !task.get('weekendWork')) {\r\n            new PJQ.views.modals.YesNo({\r\n                header: 'Weekend Work',\r\n                body: 'The new start or finish falls on the weekend. Would you like to turn weekend work on?',\r\n                onYes: _.bind(function () {\r\n                    task.updateWeekendWork(true)\r\n                    this.approveRequestedChange(requestedChange);\r\n                }, this),\r\n                onNo: _.bind(function () {\r\n                    this.approveRequestedChange(requestedChange);\r\n                }, this)\r\n            })\r\n        } else {\r\n            this.approveRequestedChange(requestedChange);\r\n        }\r\n    },\r\n    approveRequestedChange: function (change) {\r\n        let requestedChange = change;\r\n        requestedChange.approve(_.bind(function (res) {\r\n            this.model.set({\r\n                start: new Date(res.requestedChange.newStart),\r\n                finish: new Date(res.requestedChange.newFinish)\r\n            });\r\n            if (_.size(res.changes) > 0) {\r\n                _.each(res.changes, function (change) {\r\n                    let changedTask = this.model.tasks.get(change.taskId);\r\n                    if (changedTask != null) {\r\n                        changedTask.set({\r\n                            start: PJQ.helpers.dateHelpers.parseDateString(change.start, false),\r\n                            finish: PJQ.helpers.dateHelpers.parseDateString(change.finish, false)\r\n                        });\r\n                    }\r\n                }, this);\r\n            }\r\n            this.renderRequestedChanges();\r\n\r\n            if (typeof this.options.onApprove === 'function') {\r\n                this.options.onApprove();\r\n            }\r\n        }, this));\r\n    },\r\n    rejectRequestedChange: function (e) {\r\n        let target = $(e.currentTarget),\r\n            cid = target.closest('.card').data('cid'),\r\n            requestedChange = this.model.pendingRequestedChanges.get(cid);\r\n        requestedChange.reject(_.bind(function (res) {\r\n            this.renderRequestedChanges();\r\n        }, this));\r\n    },\r\n    viewTask: function (e) {\r\n        let target = $(e.currentTarget),\r\n            taskId = target.data('taskId'),\r\n            task = this.model.tasks.get(taskId);\r\n        this.editTask(task);\r\n    },\r\n    editTask: function (task) {\r\n        if (typeof this.options.onTaskEdit === 'function') {\r\n            this.options.onTaskEdit(task);\r\n        }\r\n    },\r\n    close: function () {\r\n        if (typeof this.options.onClose === 'function') {\r\n            this.options.onClose();\r\n        }\r\n    }\r\n});\r\n\r\nPJQ.views.schedule.OrderGanttModal = PJQ.views.BaseModal.extend({\r\n    defaults: {\r\n        template: new PJQ.templating.Template(PJQ.constants.modules.SCHEDULE, 'Modal-Order-Gantt'),\r\n        maxWidth: 500,\r\n        onSave: null\r\n    },\r\n    events: {\r\n        'click .btn-order': 'order'\r\n    },\r\n    renderData: function () {\r\n        let email = '',\r\n            phone = '';\r\n        if (PJQ.app.session.user != null) {\r\n            email = PJQ.app.session.user.get('email');\r\n            phone = PJQ.app.session.user.get('phone');\r\n        } else if (PJQ.app.session.contact != null) {\r\n            phone = PJQ.app.session.contact.get('phone');\r\n        }\r\n        return {\r\n            email: email,\r\n            phone: phone\r\n        };\r\n    },\r\n    afterRender: function () {\r\n        PJQ.helpers.inputHelpers.inputMaskPhone(this.$('.input-phone'));\r\n    },\r\n    order: function () {\r\n        let isValid = true,\r\n            $email = this.$('.input-email'),\r\n            email = $email.val();\r\n        if (!PJQ.helpers.validators.validateEmail(email).success) {\r\n            isValid = false;\r\n            PJQ.helpers.inputHelpers.setInputError($email, false);\r\n        } else {\r\n            PJQ.helpers.inputHelpers.setInputError($email, true);\r\n        }\r\n\r\n        let $phone = this.$('.input-phone'),\r\n            phone = PJQ.helpers.formatHelpers.numbersOnly($phone.val());\r\n        if (_.size(phone) < 10) {\r\n            isValid = false;\r\n            PJQ.helpers.inputHelpers.setInputError($phone, false);\r\n\r\n        } else {\r\n            PJQ.helpers.inputHelpers.setInputError($phone, true);\r\n        }\r\n\r\n        if (!isValid) {\r\n            return;\r\n        }\r\n\r\n        new PJQ.ajax.Request({\r\n            endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\r\n                {\r\n                    endpoint: 'projects',\r\n                    value: this.options.project.id\r\n                },\r\n                {\r\n                    endpoint: 'schedule'\r\n                },\r\n                {\r\n                    endpoint: 'ordergantt'\r\n                }\r\n            ], [\r\n                {\r\n                    parameter: 'email',\r\n                    value: email\r\n                },\r\n                {\r\n                    parameter: 'phone',\r\n                    value: phone\r\n                }\r\n            ]),\r\n            data: this.options.reportData\r\n        }).post().done(_.bind(function () {\r\n            PJQ.notifications.notify.successNotify({\r\n                message: 'Print order placed successfully'\r\n            });\r\n            this.removeModal();\r\n        }, this));\r\n    }\r\n});\r\n","PJQ.views.schedule.EditTaskModal = PJQ.views.BaseModal.extend({\n    defaults: {\n        template: new PJQ.templating.Template(PJQ.constants.modules.SCHEDULE, 'Modal-Edit-Task'),\n        subTemplates: {\n            contactBadge: new PJQ.templating.Template(PJQ.constants.modules.GLOBAL, 'Contacts-Select-Input-Contacts'),\n            comments: new PJQ.templating.Template(PJQ.constants.modules.SCHEDULE, 'Comments'),\n            dependencies: new PJQ.templating.Template(PJQ.constants.modules.SCHEDULE, 'Task-Dependencies'),\n            requestedChanges: new PJQ.templating.Template(PJQ.constants.modules.SCHEDULE, 'Task-Requested-Changes')\n        },\n        width: '90%',\n        maxWidth: 800,\n        statuses: null,\n        isShowCloseButton: true,\n        onSave: null,\n        onClose: null,\n        canAddAttachment: true,\n        canDeleteAttachment: true,\n        canAddComment: true,\n        canAddChangeRequest: true,\n        canManageChangeRequest: true,\n        canEdit: true,\n        isAdmin: true,\n        isSummaryTask: false,\n        start: null,\n        finish: null\n    },\n    events: {\n        'click .btn-notification-history': 'viewNotificationHistory',\n        'click .btn-close': 'close',\n        'click .btn-save': 'save',\n        'click .btn-delete': 'delete',\n        'click .btn-add-comment': 'addComment',\n        'change .progress-slider': 'completionChanged',\n        'change .cb-completed-notification': 'disableCompletedNotificationChanged',\n        'click .btn-add-dependency': 'addDependency',\n        'click .btn-add-successor': 'addSuccessor',\n        'click .btn-save-dependency': 'saveDependency',\n        'click .btn-cancel-dependency': 'cancelDependency',\n        'click .btn-edit-dependency': 'editDependency',\n        'click .btn-delete-dependency': 'deleteDependency',\n        'click .btn-add-requested-change': 'addRequestedChange',\n        'click .btn-delete-requested-change': 'deleteRequestedChange',\n        'click .btn-approve-requested-change': 'approveRequestedChangeClicked',\n        'click .btn-reject-requested-change': 'rejectRequestedChange',\n        'click .btn-view-task': 'viewTask',\n        'focusout .input-duration': 'checkDuration'\n    },\n    beforeModalCreated: async function () {\n        this.isFetched = false;\n\n        if (this.options.statuses == null && this.options.schedule != null) {\n            this.options.statuses = this.options.schedule.statuses;\n        } else {\n            this.options.statuses = await PJQ.app.session.fetchScheduleStatuses();\n        }\n\n        this.preferences = this.options.project ? this.options.project.preferences : PJQ.app.session.preferences;\n\n        if (this.options.project != null) {\n            this.options.canAddComment = this.options.project.hasPermission('schedule.canAddComment');\n            this.options.canAddAttachment = this.options.project.hasPermission('schedule.canAddAttachment');\n            this.options.canDeleteAttachment = this.options.project.hasPermission('schedule.canDeleteAttachment');\n            this.options.canAddChangeRequest = this.options.project.hasPermission('schedule.canAddChangeRequest');\n            this.options.canManageChangeRequest = this.options.project.hasPermission('schedule.canManageChangeRequest');\n            this.options.canEdit = this.options.project.hasPermission('schedule.isAdmin');\n            this.options.isAdmin = this.options.project.hasPermission('schedule.isAdmin');\n        } else if (this.model.get('templateId') != null && !(this.model.get('templateId') > 0)) {\n            this.options.canAddComment = false;\n            this.options.canAddAttachment = false;\n            this.options.canDeleteAttachment = false;\n            this.options.canAddChangeRequest = false;\n            this.options.canManageChangeRequest = false;\n            this.options.canEdit = false;\n            this.options.isAdmin = false;\n        } else if (this.model.get('projectId') > 0) {\n            // if there is no project passed in, but this task is for a project\n            //  then it is a share and all permissions are false\n            this.options.canAddComment = false;\n            this.options.canAddAttachment = false;\n            this.options.canDeleteAttachment = false;\n            this.options.canAddChangeRequest = false;\n            this.options.canManageChangeRequest = false;\n            this.options.canEdit = false;\n            this.options.isAdmin = false;\n        } else if (this.options.project == null) {\n            this.options.canAddComment = PJQ.app.session.hasPermission('calendar.isAdmin');\n            this.options.canAddAttachment = PJQ.app.session.hasPermission('calendar.isAdmin');\n            this.options.canDeleteAttachment = PJQ.app.session.hasPermission('calendar.isAdmin');\n            this.options.canAddChangeRequest = PJQ.app.session.hasPermission('calendar.isAdmin');\n            this.options.canManageChangeRequest = PJQ.app.session.hasPermission('calendar.isAdmin');\n            this.options.canEdit = PJQ.app.session.hasPermission('calendar.isAdmin');\n            this.options.isAdmin = PJQ.app.session.hasPermission('calendar.isAdmin');\n        }\n\n        this.listenTo(this.model, 'change:weekendWork', _.bind(function () {\n            let start = this.model.get('start');\n            if (start != null && this.model.get('duration') > 0) {\n                let start = PJQ.helpers.dateHelpers.getNewDateAddDays(this.model.get('start'), 1, !this.model.get('weekendWork'), true),\n                    finish = PJQ.helpers.dateHelpers.getNewDateAddDays(start, this.model.get('duration'), !this.model.get('weekendWork'), true);\n                this.model.set('finish', finish);\n                this.startPicker.setValue(start);\n                this.finishPicker.setValue(finish);\n            }\n        }, this));\n\n        this.listenTo(this.model, 'change:start', _.bind(function () {\n            let start = this.model.get('start'),\n                finish = this.model.get('finish'),\n                duration = this.model.get('duration'),\n                weekendWork = this.model.get('weekendWork');\n\n            if (this.model.get('isMilestone')) {\n                this.model.set('finish', start);\n            } else {\n                if (start != null) {\n                    start = PJQ.helpers.dateHelpers.getNewDateAddDays(start, 1, !weekendWork, true);\n                    if (finish == null) {\n                        finish = PJQ.helpers.dateHelpers.getNewDateAddDays(start, duration === 0 ? 1 : duration, !weekendWork, true);\n                        duration = PJQ.helpers.dateHelpers.getDateDaysDiff(finish, start, !weekendWork, true);\n                    } else {\n                        duration = PJQ.helpers.dateHelpers.getDateDaysDiff(finish, start, !weekendWork, true);\n                        if (duration < 1) {\n                            duration = 1;\n                            finish = start;\n                        }\n                    }\n                } else {\n                    // Don't allow unscheduled tasks on tasks that belong to a summary task\n                    if (this.model.get('summaryTaskId') != null) {\n                        start = finish;\n                        duration = 1;\n                    }\n                    // If task doesn't belong to summary task, then set it as unscheduled\n                    else {\n                        finish = null;\n                        duration = 0;\n                    }\n                }\n                if (this.finishPicker) {\n                    this.finishPicker.setValue(finish);\n                }\n                if (this.startPicker) {\n                    this.startPicker.setValue(start);\n                }\n                this.$('.input-duration').val(duration);\n                this.model.set({\n                    start: start,\n                    finish: finish,\n                    duration: duration\n                }, {\n                    silent: true\n                });\n            }\n        }, this));\n\n        this.listenTo(this.model, 'change:finish', _.bind(function () {\n            let start = this.model.get('start'),\n                finish = this.model.get('finish'),\n                duration = this.model.get('duration'),\n                weekendWork = this.model.get('weekendWork');\n            if (finish != null) {\n                if (start == null) {\n                    finish = PJQ.helpers.dateHelpers.getNewDateAddDays(finish, 1, !weekendWork, true);\n                    start = finish;\n                    duration = 1;\n                } else {\n                    duration = PJQ.helpers.dateHelpers.getDateDaysDiff(finish, start, !weekendWork, true);\n                    finish = PJQ.helpers.dateHelpers.getNewDateAddDays(start, duration, !weekendWork, true);\n                    if (duration < 1) {\n                        duration = 1;\n                        start = finish;\n                    }\n                }\n            } else {\n                // Don't allow unscheduled tasks on tasks that belong to a summary task\n                if (this.model.get('summaryTaskId') != null) {\n                    finish = start;\n                    duration = 1;\n                }\n                // If task doesn't belong to summary task, then set it as unscheduled\n                else {\n                    start = finish;\n                    duration = 0;\n                }\n            }\n            if (this.startPicker) {\n                this.startPicker.setValue(start);\n            }\n            if (this.finishPicker) {\n                this.finishPicker.setValue(finish);\n            }\n            this.$('.input-duration').val(duration);\n            this.model.set({\n                start: start,\n                finish: finish,\n                duration: duration\n            }, {\n                silent: true\n            });\n        }, this));\n\n        this.listenTo(this.model, 'change:duration', _.bind(function () {\n            if (!this.model.get('isMilestone')) {\n                let start = this.model.get('start');\n                if (start == null) {\n                    return;\n                }\n                let newFinish = start;\n                let duration = this.model.get('duration');\n                if (duration == null) {\n                    this.model.set('duration', null);\n                    this.model.set('finish', newFinish, {\n                        silent: true\n                    });\n                } else {\n                    // Don't allow unscheduled tasks on tasks that belong to a summary task\n                    if (duration === 0 && this.model.get('summaryTaskId')) {\n                        this.model.set('duration', null);\n                        this.model.set('finish', newFinish, {\n                            silent: true\n                        });\n                        return;\n                    }\n                    newFinish = PJQ.helpers.dateHelpers.getNewDateAddDays(start, duration, !this.model.get('weekendWork'), true);\n                    this.model.set('finish', newFinish, {\n                        silent: true,\n                        duration: duration\n                    });\n                }\n\n                this.finishPicker.setValue(newFinish);\n            }\n        }, this));\n\n        if (this.options.settings == null) {\n            if (this.options.project != null) {\n                this.settings = await this.options.project.fetchScheduleSettings();\n            } else {\n                this.settings = await PJQ.app.session.fetchScheduleSettings();\n            }\n        }\n\n        this.options.isSuccessor = false;\n        if ((PJQ.app.session.project && PJQ.app.session.project.preferences.hasPref(PJQ.constants.preferenceTypes.ASAP_SCHEDULE_CONTRAINT_ENABLED)) ||\n            (PJQ.app.session.project == null && PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.ASAP_SCHEDULE_CONTRAINT_ENABLED))) {\n            _.each(this.model.dependencies.models, function (model) {\n                if (model.get('taskId') === this.model.get('taskId')) {\n                    this.options.isSuccessor = true;\n                }\n            }, this);\n        }\n\n        this.hasCompleteStatus = false;\n        _.each(this.options.statuses.models, function (model) {\n            if (model.get('name').toLowerCase().includes('complete')) {\n                this.hasCompleteStatus = true;\n            }\n        }, this)\n\n        this.isFetched = true;\n        this.render();\n    },\n    beforeRender: function () {\n        if (this.model.status == null) {\n            this.model.status = this.options.statuses.getDefault();\n        }\n    },\n    renderData: function () {\n        return {\n            model: this.model,\n            project: this.options.project,\n            settings: this.settings,\n            statuses: this.options.statuses,\n            schedule: this.options.schedule,\n            canAddComment: this.options.canAddComment,\n            canAddChangeRequest: this.options.canAddChangeRequest,\n            canEdit: this.options.canEdit,\n            isAdmin: this.options.isAdmin,\n            isSummaryTask: this.options.isSummaryTask,\n            isSuccessor: this.options.isSuccessor,\n            preferences: this.preferences,\n            enableNotificationSettings: this.preferences ? this.preferences.hasPref(PJQ.constants.preferenceTypes.ENABLE_SCHEDULE_TASK_NOTIFICATION_SETTINGS) : false,\n            isOverdue: this.model.get('percentComplete') < 100 && this.model.get('finish') != null && this.model.id != null && PJQ.helpers.dateHelpers.checkDateIsBeforeToday(this.model.get('finish')) && (this.settings && this.settings.get('enableOverdueStatus')) && this.model.status.get('name').toLowerCase() !== 'complete' && this.hasCompleteStatus\n        };\n    },\n    renderDatePickers: function () {\n        if (this.options.start) {\n            this.model.set('start', this.options.start);\n        }\n        if (this.options.finish) {\n            this.model.set('finish', this.options.finish);\n        }\n\n        this.startPicker = new PJQ.inputs.Datepicker({\n            el: this.$('.input-start-date'),\n            datepickerOptions: {\n                format: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE,\n                defaultDate: this.model.get('start')\n            },\n            onChange: _.bind(function (newDate) {\n                this.model.set('start', newDate);\n            }, this)\n        });\n\n        if (!this.model.get('isMilestone')) {\n            this.finishPicker = new PJQ.inputs.Datepicker({\n                el: this.$('.input-finish-date'),\n                datepickerOptions: {\n                    format: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE,\n                    defaultDate: this.model.get('finish')\n                },\n                onChange: _.bind(function (newDate) {\n                    this.model.set('finish', newDate);\n                }, this)\n            });\n        }\n    },\n    afterRender: function () {\n        if (!this.isFetched) {\n            return;\n        }\n\n        if (this.settings != null && this.settings.isFetched) {\n            new PJQ.Binder(this.$el, this.model, {\n                watchElements: [\n                    'input',\n                    'textarea'\n                ]\n            });\n\n            this.renderDatePickers();\n\n            let groupUserId = null,\n                groupLevels = null;\n            if (this.options.project != null) {\n                groupUserId = this.options.project.get('masterUserId');\n                groupLevels = this.options.project.preferences.getPref(PJQ.constants.preferenceTypes.GROUP_LEVELS)\n            }\n            new PJQ.views.groups.GroupsSelectInput({\n                el: this.$('.schedule-task-groups'),\n                isShowAddButton: false,\n                groupLevels: groupLevels,\n                groupUserId: groupUserId,\n                isReadOnly: !this.options.canEdit,\n                addButton: this.$('.btn-edit-groups'),\n                selectedGroups: this.model.groups.models,\n                onAfterSave: _.bind(function (selectedGroups) {\n                    this.model.groups.reset(selectedGroups);\n                    this.model.isDirty = true;\n                }, this)\n            });\n\n            new PJQ.inputs.Selectpicker({\n                el: this.$('.select-status'),\n                defaultValue: this.model.status.id,\n                onChange: _.bind(function (value) {\n                    this.model.status = this.options.statuses.get(value);\n                    this.model.isDirty = true;\n                }, this)\n            });\n\n            if (this.options.canEdit) {\n                new PJQ.inputs.AutocompleteInput({\n                    el: this.$('input.task-category'),\n                    source: this.model.collection == null ? [] : _.uniq(_.map(_.filter(this.model.collection.models, _.bind(function (task) {\n                        return _.size(task.get('category')) > 0 && task.id !== this.model.id;\n                    }, this)), function (task) {\n                        return task.get('category');\n                    }))\n                });\n            }\n\n            if (this.preferences.hasPref(PJQ.constants.preferenceTypes.ENABLE_PROJECT_LOCATIONS)) {\n                new PJQ.inputs.ProjectLocationPicker({\n                    el: this.$('.select-location'),\n                    project: this.options.project,\n                    canEdit: this.options.canEdit,\n                    onChange: _.bind(function (value) {\n                        this.model.set('locationId', value);\n                    }, this),\n                    defaultValue: this.model.get('locationId')\n                });\n            }\n\n            if (this.options.schedule != null) {\n                new PJQ.views.contacts.ContactsSelectInput({\n                    el: this.$('.task-assigned'),\n                    selectedContact: this.model.assignees.models,\n                    isReadOnly: !this.options.canEdit,\n                    displayContactsBlock: true,\n                    context: this.options.project != null ? PJQ.constants.contacts.contexts.PROJECTCONTACTS : PJQ.constants.contacts.contexts.USERS,\n                    isSingleChoice: false,\n                    onChange: _.bind(function (selectedContacts) {\n                        this.model.assignees.reset(selectedContacts);\n                        this.model.isDirty = true;\n                    }, this)\n                });\n\n                this.renderDependencies();\n            }\n\n            this.renderCompletion();\n\n            if (!this.model.isNew()) {\n                if (this.options.project != null && this.options.schedule != null) {\n                    this.renderRequestedChanges();\n                }\n                this.renderComments();\n            }\n\n            this.fileUploader = new PJQ.views.files.FileUploaderGrid({\n                el: this.$('.task-file-uploader'),\n                collection: this.model.attachments,\n                canUpload: this.options.canAddAttachment,\n                canDelete: this.options.canDeleteAttachment,\n                previewImageDimension: 150,\n                includeProjectAttachments: true,\n                onSuccess: _.bind(function () {\n                    this.model.isDirty = true;\n                }, this),\n                onDelete: _.bind(function (attachment, callback) {\n                    if (attachment.id > 0) {\n                        attachment.set('isDeleted', true);\n                    } else {\n                        attachment.destroy();\n                    }\n                    this.model.isDirty = true;\n                    callback();\n                }, this)\n            });\n        }\n\n        this.$('.task-name').focus();\n        this.$('.input-duration').attr('disabled', this.settings.get('lockSchedule') || !this.options.canEdit || this.model.get('isSummaryTask'));\n    },\n    checkDuration: function () {\n        let duration = this.model.get('duration');\n        if (duration == null || duration === 0) {\n            duration = 1;\n            this.$('.input-duration').val(duration);\n            this.model.set('duration', duration);\n        }\n        // else if (duration === 0) {\n        //     this.model.set({\n        //         start: null,\n        //         finish: null,\n        //         duration: 0\n        //     }, {silent: true});\n        //     this.startPicker.setValue(null);\n        //     this.finishPicker.setValue(null);\n        //     this.$('.input-duration').attr('disabled', true);\n        // }\n    },\n    viewNotificationHistory: function () {\n        this.model.fetchNotifications(function (notifications) {\n            new PJQ.views.notifications.NotificationHistory({\n                collection: notifications\n            });\n        })\n    },\n    addDependency: function () {\n        if (this.contextDependency != null) {\n            let saved = this.saveDependency();\n            if (!saved) {\n                return;\n            }\n        }\n\n        this.contextDependency = new PJQ.models.schedule.TaskDependency({\n            taskId: this.model.id,\n            dependTaskId: 0,\n            offset: 0\n        });\n        this.renderDependencies();\n    },\n    addSuccessor: function () {\n        if (this.contextDependency != null) {\n            let saved = this.saveDependency();\n            if (!saved) {\n                return;\n            }\n        }\n\n        this.contextDependency = new PJQ.models.schedule.TaskDependency({\n            taskId: 0,\n            dependTaskId: this.model.id,\n            offset: 0\n        });\n        this.renderDependencies();\n    },\n    saveDependency: function () {\n        let relTaskId = this.dependencyPicker.getValue();\n        if (relTaskId == null) {\n            this.dependencyPicker.showError();\n            return false;\n        }\n\n        if (this.contextDependency.get('taskId') === this.model.id) {\n            this.contextDependency.set('dependTaskId', relTaskId);\n        } else {\n            this.contextDependency.set('taskId', relTaskId);\n        }\n        let offset = parseInt(this.$('.input-dependency-offset').val());\n        this.contextDependency.set({\n            type: this.dependencyTypePicker.getValue(),\n            offset: !isNaN(offset) ? offset : 0\n        });\n        this.model.dependencies.add(this.contextDependency);\n        this.options.schedule.dependencies.add(this.contextDependency);\n        if (!this.contextDependency.get('dependencyId')) {\n            this.contextDependency.set('dependencyId', -(this.options.schedule.dependencies.length + 1))\n        }\n        this.model.isDirty = true;\n        this.contextDependency = null;\n        this.renderDependencies();\n\n        let minStart = this.model.getMinStart();\n        if (this.model.get('start') == null || PJQ.helpers.dateHelpers.getDateDaysDiff(minStart, this.model.get('start'), !this.model.get('weekendWork')) > 0) {\n            this.model.set({\n                start: minStart,\n                finish: PJQ.helpers.dateHelpers.getNewDateAddDays(minStart, this.model.get('duration'), !this.model.get('weekendWork'), true)\n            }, {\n                silent: true\n            });\n            this.startPicker.setValue(this.model.get('start'));\n            this.finishPicker.setValue(this.model.get('finish'));\n        }\n\n        return true;\n    },\n    editDependency: function (e) {\n        let target = $(e.currentTarget),\n            cid = target.closest('.card').data('cid');\n        this.contextDependency = this.model.dependencies.get(cid);\n        this.renderDependencies();\n    },\n    deleteDependency: function (e) {\n        let target = $(e.currentTarget),\n            cid = target.closest('.card').data('cid'),\n            dependency = this.model.dependencies.get(cid),\n            scheduleDependency = this.options.schedule.dependencies.get(dependency.get('dependencyId'));\n        new PJQ.views.modals.DeleteCancel({\n            header: \"Confirm Deletion\",\n            body: \"Are you sure you want to delete this \" + (dependency.get('taskId') === this.model.id ? 'dependency' : 'successor') + \"?\",\n            onDelete: _.bind(function () {\n                if (dependency.id !== 0) {\n                    dependency.set('isDeleted', true);\n                    scheduleDependency.set('isDeleted', true);\n                } else {\n                    this.model.dependencies.remove(dependency);\n                    this.options.schedule.dependencies.remove(scheduleDependency);\n                }\n                this.model.isDirty = true;\n                this.renderDependencies();\n            }, this)\n        });\n    },\n    cancelDependency: function (e) {\n        this.contextDependency = null;\n        this.renderDependencies();\n    },\n    renderDependencies: function () {\n        this.renderSubTemplate(false, this.options.subTemplates.dependencies, this.$('.dependencies-outer'), {\n            model: this.model,\n            schedule: this.options.schedule,\n            canEdit: this.options.canEdit,\n            contextDependency: this.contextDependency\n        }, _.bind(function () {\n            this.renderSubTemplate(false, this.options.subTemplates.dependencies, this.$('.successors-outer'), {\n                model: this.model,\n                schedule: this.options.schedule,\n                isSuccessor: true,\n                canEdit: this.options.canEdit,\n                contextDependency: this.contextDependency\n            }, _.bind(function () {\n                if (this.contextDependency != null) {\n                    this.dependencyPicker = new PJQ.inputs.Selectpicker({\n                        el: this.$('.select-dependency'),\n                        noneSelectedText: 'Select Task',\n                        isIntChoices: true,\n                        isLiveSearch: true,\n                        isBlockSubtext: true,\n                        defaultValue: this.contextDependency.get('taskId') === this.model.id ? this.contextDependency.get('dependTaskId') : this.contextDependency.get('taskId')\n                    });\n\n                    this.dependencyTypePicker = new PJQ.inputs.Selectpicker({\n                        el: this.$('.select-dependency-type'),\n                        noneSelectedText: 'Select Type',\n                        defaultValue: this.contextDependency.get('type')\n                    });\n                }\n            }, this));\n        }, this));\n\n        let minStart = this.model.getMinStart();\n        this.startPicker.setMinDate(minStart);\n        if (this.finishPicker != null) {\n            this.finishPicker.setMinDate(minStart);\n        }\n    },\n    renderRequestedChanges: function () {\n        this.renderSubTemplate(false, this.options.subTemplates.requestedChanges, this.$('.requested-changes-outer'), {\n            model: this.model,\n            requestedChanges: this.model.requestedChanges,\n            canEdit: this.options.canManageChangeRequest\n        });\n    },\n    renderComments: function () {\n        this.renderSubTemplate(false, this.options.subTemplates.comments, this.$('.comments-outer'), {\n            comments: this.model.comments.models,\n            canEdit: this.options.canEdit\n        });\n    },\n    renderCompletion: function () {\n        this.progressSlider = this.$('.progress-slider').bootstrapSlider({\n            handle: 'square'\n        });\n\n        this.$('#progress-slider').append($('<div>', {\n            class: 'font-weight-light fs-14 bg-' + this.options.colorClass + ' text-' + (this.options.colorClass === 'warning' ? 'dark' : 'light')\n        }).text(this.model.get('percentComplete') + '%'));\n\n        this.completionChanged();\n    },\n    disableCompletedNotificationChanged: function () {\n        let $message = this.$('.comp-notify-message-outer');\n        if (this.model.get('disableCompletedNotification')) {\n            $message.addClass('hidden');\n        } else {\n            $message.removeClass('hidden');\n        }\n    },\n    completionChanged: function () {\n        let percent = this.progressSlider.data('bootstrapSlider').getValue(),\n            $slider = this.$('.slider-selection'),\n            $text = this.$('.progress-percent');\n        $text.text(percent + '%');\n        $text.removeClass('text-danger').removeClass('text-warning').removeClass('text-success');\n        $slider.removeClass('slider-bg-danger bg-danger').removeClass('slider-bg-warning bg-warning')\n            .removeClass('slider-bg-success bg-success');\n        if (percent < 60) {\n            $text.addClass('text-danger');\n            $slider.addClass('slider-bg-danger bg-danger');\n        } else if (percent >= 60 && percent < 100) {\n            $text.addClass('text-warning');\n            $slider.addClass('slider-bg-warning bg-warning');\n        } else {\n            $text.addClass('text-success');\n            $slider.addClass('slider-bg-success bg-success');\n        }\n        if (this.model.get('percentComplete') !== percent) {\n            this.model.set('percentComplete', percent);\n        }\n    },\n    viewTask: function (e) {\n        this.model = this.model.collection.get($(e.currentTarget).data('cid'));\n        this.model.fetch({\n            success: _.bind(function () {\n                this.render();\n                this.modal.scrollTop(0);\n            }, this)\n        })\n    },\n    addRequestedChange: function () {\n        new PJQ.views.schedule.AddRequestedChangeModal({\n            task: this.model,\n            isSuccessor: this.options.isSuccessor,\n            onSave: _.bind(function (requestedChange) {\n                this.model.requestedChanges.add(requestedChange);\n                if (this.options.schedule != null) {\n                    this.options.schedule.pendingRequestedChanges.add(requestedChange);\n                }\n                this.renderRequestedChanges();\n            }, this)\n        });\n    },\n    deleteRequestedChange: function (e) {\n        let target = $(e.currentTarget),\n            cid = target.closest('.card').data('cid'),\n            requestedChange = this.model.requestedChanges.get(cid);\n        new PJQ.views.modals.DeleteCancel({\n            header: \"Confirm Deletion\",\n            body: \"Are you sure you want to delete this requested change?\",\n            onDelete: _.bind(function () {\n                requestedChange.set('isDeleted', true);\n                this.model.isDirty = true;\n                this.renderRequestedChanges();\n            }, this)\n        });\n    },\n    approveRequestedChangeClicked: function (e) {\n        let target = $(e.currentTarget),\n            cid = target.closest('.card').data('cid'),\n            requestedChange = this.model.requestedChanges.get(cid),\n            newStart = new Date(requestedChange.get('newStart')),\n            newFinish = new Date(requestedChange.get('newFinish'));\n        if ((newFinish.getDay() === (0 || 6) || newStart.getDay() === (0 || 6)) && !this.model.get('weekendWork')) {\n            new PJQ.views.modals.YesNo({\n                header: 'Weekend Work',\n                body: 'The new start or finish falls on the weekend and approving will enable weekend work. Continue?',\n                onYes: _.bind(function () {\n                    this.$('.btn-weekend-work')[0].checked = true;\n                    this.model.updateWeekendWork(true);\n                    this.approveRequestedChange(requestedChange);\n                }, this),\n                onNo: _.bind(function () {\n                    this.approveRequestedChange(requestedChange);\n                }, this)\n            })\n        } else {\n            this.approveRequestedChange(requestedChange);\n        }\n    },\n    approveRequestedChange: function (change) {\n        let requestedChange = change;\n        requestedChange.approve(_.bind(function (res) {\n            let newStart = new Date(res.requestedChange.newStart),\n                newFinish = new Date(res.requestedChange.newFinish);\n            this.model.set({\n                start: newStart,\n                finish: newFinish\n            });\n            this.startPicker.setValue(newStart);\n            this.finishPicker.setValue(newFinish);\n            this.renderRequestedChanges();\n        }, this));\n    },\n    rejectRequestedChange: function (e) {\n        let target = $(e.currentTarget),\n            cid = target.closest('.card').data('cid'),\n            requestedChange = this.model.requestedChanges.get(cid);\n        requestedChange.reject(_.bind(function (res) {\n            this.renderRequestedChanges();\n        }, this));\n    },\n    addComment: function () {\n        let val = this.$('.item-new-comment').val().trim();\n        if (_.size(val) === 0)\n            return;\n\n        let comment = new PJQ.models.schedule.TaskComment({\n            taskId: this.model.id,\n            commentText: val,\n            createdOn: new Date()\n        });\n        if (!this.model.isNew()) {\n            comment.save(null, {\n                success: _.bind(function () {\n                    this.model.comments.add(comment);\n                    this.renderComments();\n                }, this)\n            });\n        } else {\n            comment.createdBy = PJQ.app.session.user;\n            this.model.comments.add(comment);\n            this.renderComments();\n        }\n        this.$('.item-new-comment').val('');\n    },\n    validate: function () {\n        let isValid = true,\n            errorText = \"\";\n        // Check if Task Name is filled out\n        let nameValid = this.$('.task-name').val().trim().length === 0;\n        PJQ.helpers.inputHelpers.setInputError(this.$('.task-name'), !nameValid);\n        if (nameValid) {\n            errorText += '<li>Task name cannot be empty.</li>';\n            isValid = false;\n        }\n\n        if (!isValid) {\n            if (this.errorAlert != null) {\n                this.errorAlert.destroy();\n            }\n            this.errorAlert = new PJQ.Alert(this.$('.error-container'), {\n                type: 'danger',\n                text: errorText\n            });\n        }\n        return isValid;\n    },\n    save: function () {\n        if (!this.validate()) {\n            return;\n        }\n\n        let fnCheck = _.bind(function (noNotifyTaskIds) {\n            if (this.fileUploader.isUploading()) {\n                new PJQ.views.BaseModal({\n                    header: \"Files Uploading\",\n                    body: \"You can't save while files are uploading\"\n                });\n            } else {\n                this.$('.modal-footer>button').prop('disabled', true);\n                new PJQ.Loader(this.$('.btn-save'), {\n                    loadingText: ''\n                });\n\n                if (this.contextDependency != null) {\n                    let saved = this.saveDependency();\n                    if (!saved) {\n                        return;\n                    }\n                }\n                if (this.model.hasChanged() || this.model.isNew()) {\n                    let fnSave = _.bind(function () {\n                        this.model.save({\n                            preventNotifyTaskIds: noNotifyTaskIds\n                        }, {\n                            notify: true,\n                            success: _.bind(function () {\n                                if (typeof this.options.onSave === 'function') {\n                                    this.options.onSave(this.model);\n                                }\n                                this.removeModal();\n                            }, this)\n                        });\n                    }, this);\n\n                    // this code is designed to just match status names that match \"complete\" exactly\" (not case sensitive)\n                    // if the task is 100% and the status is not complete (and they have a complete status)\n                    // ask if they want to set it to complete\n                    // if the task is complete and not set to 100%, ask if they want to set it to 100%\n                    let completeStatus = this.options.statuses.find(function (status) {\n                        return status.get('name').toLowerCase() === 'complete';\n                    });\n                    if (completeStatus != null) {\n                        let isCompleteStatus = this.model.status.id !== completeStatus.id,\n                            header = null,\n                            body = null,\n                            compSpan = '<strong style=\"color:' + completeStatus.get('color') + '\">Complete</strong>';\n                        if (this.model.get('percentComplete') === 100 && isCompleteStatus) {\n                            header = 'Mark as Complete?';\n                            body = 'This task is marked as 100% complete.  Would you like to change the status to ' + compSpan + '?';\n                        } else if (this.model.get('percentComplete') < 100 && !isCompleteStatus) {\n                            header = 'Mark as Complete?';\n                            body = 'This task is marked as ' + compSpan + '.  Would you like to change the progress to 100%?';\n                        }\n\n                        if (header != null && body != null) {\n                            new PJQ.views.modals.YesNo({\n                                header: header,\n                                body: body,\n                                onYes: _.bind(function () {\n                                    this.model.set('percentComplete', 100);\n                                    this.model.status = completeStatus;\n                                    fnSave();\n                                }, this),\n                                onNo: _.bind(function () {\n                                    fnSave();\n                                }, this)\n                            });\n                        } else {\n                            fnSave();\n                        }\n                    } else {\n                        fnSave();\n                    }\n                } else {\n                    if (typeof this.options.onSave === 'function') {\n                        this.options.onSave(this.model);\n                    }\n                    this.removeModal();\n                }\n            }\n        }, this);\n        if (this.model.get('projectId') > 0 && this.settings.get('notificationsEnabled') && this.settings.get('dateChangeNotificationsMode') === 1) {\n            let changedTasks = this.model.determineChangedTasks();\n            if (_.size(changedTasks) > 0) {\n                new PJQ.views.schedule.TaskChangeNotifications({\n                    changedTasks: changedTasks,\n                    onSave: _.bind(function (res) {\n                        fnCheck(res.noNotify);\n                    }, this)\n                });\n            } else {\n                fnCheck();\n            }\n        } else {\n            fnCheck();\n        }\n    },\n    close: function () {\n        if (this.options.canEdit && this.model.hasChanged()) {\n            new PJQ.views.modals.SaveDontSave({\n                header: \"Unsaved Changes\",\n                body: \"Do you want to save changes?\",\n                onSave: _.bind(function () {\n                    this.save();\n                }, this),\n                onDontSave: _.bind(function () {\n                    this.model.restore();\n                    this.onClose(this.model);\n                    this.removeModal();\n                }, this)\n            });\n        } else {\n            this.onClose(this.model);\n            this.removeModal();\n        }\n    },\n    delete: function () {\n        new PJQ.views.modals.DeleteCancel({\n            header: \"Confirm Deletion\",\n            body: \"Are you sure you want to delete this task?\",\n            onDelete: _.bind(function () {\n                if (this.options.onDelete) {\n                    this.options.onDelete(this.model);\n                }\n                this.removeModal();\n            }, this)\n        });\n    }\n});\n\nPJQ.views.schedule.AddRequestedChangeModal = PJQ.views.BaseModal.extend({\n    defaults: {\n        template: new PJQ.templating.Template(PJQ.constants.modules.SCHEDULE, 'Modal-Add-Requested-Change'),\n        maxWidth: 500,\n        onSave: null\n    },\n    events: {\n        'click .btn-save': 'save'\n    },\n    beforeModalCreated: function () {\n        this.model = new PJQ.models.schedule.RequestedChange({\n            taskId: this.options.task.id,\n            oldStart: this.options.task.get('start'),\n            oldFinish: this.options.task.get('finish'),\n            newStart: this.options.task.get('start'),\n            newFinish: this.options.task.get('finish')\n        });\n    },\n    renderData: function () {\n        return {\n            model: this.model,\n            isSuccessor: this.options.isSuccessor\n        };\n    },\n    afterRender: function () {\n        this.startPicker = new PJQ.inputs.Datepicker({\n            el: this.$('.input-new-start'),\n            datepickerOptions: {\n                format: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE,\n                defaultDate: this.model.get('newStart'),\n                minDate: this.options.task.getMinStart()\n            },\n            onChange: _.bind(function (newDate) {\n                this.model.set('newStart', newDate);\n            }, this)\n        });\n\n        this.finishPicker = new PJQ.inputs.Datepicker({\n            el: this.$('.input-new-finish'),\n            datepickerOptions: {\n                format: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE,\n                defaultDate: this.model.get('newFinish')\n            },\n            onChange: _.bind(function (newDate) {\n                this.model.set('newFinish', newDate);\n            }, this)\n        });\n    },\n    save: function () {\n        let $reason = this.$('.input-reason'),\n            reason = $reason.val();\n\n        let isValid = true;\n        if (this.model.get('newStart') == null) {\n            this.startPicker.showError();\n            isValid = false;\n        } else {\n            this.startPicker.hideError();\n        }\n\n        if (this.model.get('newFinish') == null) {\n            this.finishPicker.showError();\n            isValid = false;\n        } else {\n            this.finishPicker.hideError();\n        }\n\n        if (_.size(reason) === 0) {\n            PJQ.helpers.inputHelpers.setInputError($reason, false);\n            isValid = false;\n        } else {\n            PJQ.helpers.inputHelpers.setInputError($reason, true);\n        }\n\n        if (isValid) {\n            this.model.save({\n                reason: reason\n            }, {\n                success: _.bind(function () {\n                    if (typeof this.options.onSave === 'function') {\n                        this.options.onSave(this.model);\n                    }\n\n                    this.removeModal();\n                    PJQ.notifications.notify.successNotify({\n                        message: 'Change request submitted'\n                    });\n                }, this)\n            });\n        }\n    }\n});\n\nPJQ.views.schedule.TaskChangeNotifications = PJQ.views.BaseModal.extend({\n    defaults: {\n        template: new PJQ.templating.Template(PJQ.constants.modules.SCHEDULE, 'Modal-Change-Notifications'),\n        maxWidth: 500,\n        onSave: null\n    },\n    events: {\n        'change .cb-notify-task': 'changeNotifyTask',\n        'change .cb-notify-none': 'changeNotifyNone',\n        'click .btn-save': 'save'\n    },\n    renderData: function () {\n        return {\n            changedTasks: this.options.changedTasks\n        };\n    },\n    changeNotifyTask: function () {\n        this.$('.cb-notify-none').prop('checked', _.size(this.$('.cb-notify-task:checked')) === 0);\n    },\n    changeNotifyNone: function () {\n        if (this.$('.cb-notify-none').prop('checked')) {\n            this.$('.cb-notify-task').prop('checked', false);\n        }\n    },\n    save: function () {\n        let notify = [],\n            noNotify = [];\n        this.$('.cb-notify-task').each(function () {\n            if ($(this).is(':checked')) {\n                notify.push($(this).data('id'));\n            } else {\n                noNotify.push($(this).data('id'));\n            }\n        });\n        if (typeof this.options.onSave === 'function') {\n            this.options.onSave({\n                notify: notify,\n                noNotify: noNotify\n            });\n        }\n        this.removeModal();\n    }\n});\n","PJQ.views.schedule.NewLookAheadModal = PJQ.views.BaseModal.extend({\n    defaults: {\n        template: new PJQ.templating.Template(PJQ.constants.modules.SCHEDULE, 'modal-edit-lookahead'),\n        maxWidth: 600\n    },\n    events: {\n        'click .btn-save': 'save'\n    },\n    beforeModalCreated: async function () {\n        if (this.model == null) {\n            this.model = new PJQ.models.schedule.LookAhead({\n                projectId: this.options.projectId\n            });\n        }\n\n        this.render();\n    },\n    renderData: function () {\n        return {\n            model: this.model,\n            lookAheads: this.options.lookAheads\n        };\n    },\n    afterRender: function () {\n        new PJQ.Binder(this.$el, this.model, {\n            watchElements: [\n                'input',\n                'select'\n            ]\n        });\n\n        let minStart = null;\n        if (this.options.lookAheads != null && _.size(this.options.lookAheads.models) > 0) {\n            minStart = _.max(_.map(this.options.lookAheads.models, (lookAhead) => {\n                return new Date(PJQ.helpers.dateHelpers.getNewDateAddDays(new Date(lookAhead.get('start')), lookAhead.get('duration')));\n            }));\n        }\n\n        if (minStart == null) {\n            minStart = new Date();\n        }\n\n        if (this.model.get('start') == null) {\n            this.model.set('start', minStart);\n        }\n        this.dueDatePicker = new PJQ.inputs.Datepicker({\n            el: this.$('.input-start-date'),\n            datepickerOptions: {\n                format: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE,\n                defaultDate: PJQ.helpers.dateHelpers.getDateString(minStart, PJQ.helpers.dateHelpers.dateFormats.DATE, true)\n            },\n            onChange: (newDate) => {\n                this.model.set('start', newDate);\n            }\n        });\n\n        if (this.model.get('duration') == null) {\n            this.model.set('duration', 14);\n        }\n        new PJQ.inputs.Selectpicker({\n            el: this.$('.select-duration'),\n            isIntChoices: true,\n            isMultiple: false,\n            defaultValue: this.model.get('duration')\n        });\n\n        if (this.options.lookAheads != null && _.size(this.options.lookAheads.models) > 0) {\n            new PJQ.inputs.Selectpicker({\n                el: this.$('.select-use-look-ahead'),\n                isIntChoices: true,\n                isMultiple: false,\n                defaultValue: 2,\n                choices: _.map(this.options.lookAheads.models, (lookAhead) => {\n                    return {\n                        name: lookAhead.getDisplayName(),\n                        value: lookAhead.id\n                    };\n                })\n                // onChange: (value) => {\n                //     this.model.set('')\n                // }\n            });\n        }\n    },\n    validate: function () {\n        if (this.validationAlert != null) {\n            this.validationAlert.destroy();\n        }\n\n        if (this.options.schedule != null) {\n            let lookAheadStart = new Date(this.model.get('start')),\n                lookAheadFinish = PJQ.helpers.dateHelpers.getNewDateAddDays(lookAheadStart, this.model.get('duration'));\n            if (null == _.find(this.options.schedule.tasks.models, (task) => {\n                return PJQ.helpers.dateHelpers.checkDateRangesOverlap(task.get('start'), task.get('finish'), lookAheadStart, lookAheadFinish);\n            })) {\n                this.validationAlert = new PJQ.Alert(this.$('.modal-body'), {\n                    text: \"The Look Ahead date range does not contain with any tasks in the schedule. Please select a different date range.\",\n                    isPrepend: true,\n                    type: 'warning'\n                });\n                return false;\n            }\n        }\n        return true;\n    },\n    save: function () {\n        if (!this.validate()) {\n            return;\n        }\n\n        this.model.save(null, {\n            success: _.bind(function () {\n                this.removeModal();\n                if (typeof this.options.onSave === 'function') {\n                    this.options.onSave(this.model);\n                }\n            }, this),\n            error: _.bind(function (model, response) {\n                // this.showErrors(response.responseJSON);\n            }, this)\n        });\n    },\n    // deleteTemplate: function () {\n    // \tnew PJQ.views.modals.DeleteCancel({\n    // \t\theader: \"Confirm Deletion\",\n    // \t\tbody: \"Are you sure you want to delete this template?\",\n    // \t\tonDelete: _.bind(function () {\n    // \t\t\tif (typeof this.options.onDelete === 'function') {\n    // \t\t\t\tthis.options.onDelete(this.model);\n    // \t\t\t}\n    // \t\t\tthis.removeModal();\n    // \t\t}, this)\n    // \t});\n    // }\n});","// Models\r\nPJQ.models.schedule.Template = PJQ.models.BaseModel.extend({\r\n    idAttribute: 'templateId',\r\n    notifyName: 'Template',\r\n    endpoint: function () {\r\n        return PJQ.helpers.urlHelpers.generateEndpoint([\r\n            {\r\n                endpoint: 'schedule'\r\n            },\r\n            {\r\n                endpoint: 'templates',\r\n                value: this.id\r\n            }\r\n        ], this.get('projectId') > 0 ? [\r\n            {\r\n                parameter: 'projectId',\r\n                value: this.get('projectId')\r\n            },\r\n            {\r\n                parameter: 'copyAssignees',\r\n                value: this.get('copyAssignees')\r\n            },\r\n            {\r\n                parameter: 'copyDependencies',\r\n                value: this.get('copyDependencies')\r\n            },\r\n            {\r\n                parameter: 'copyComments',\r\n                value: this.get('copyComments')\r\n            },\r\n            {\r\n                parameter: 'copyAttachments',\r\n                value: this.get('copyAttachments')\r\n            },\r\n            {\r\n                parameter: 'overwrite',\r\n                value: this.get('overwrite')\r\n            }\r\n        ] : null);\r\n    },\r\n    parse: function (model) {\r\n        if (!model)\r\n            return model;\r\n\r\n        if (model.project != null) {\r\n            this.project = model.project;\r\n        } else {\r\n            this.user = PJQ.app.session.user;\r\n        }\r\n\r\n        this.statuses = new PJQ.collections.schedule.TaskStatuses(model.statuses);\r\n        PJQ.app.session.scheduleTaskStatuses = this.statuses;\r\n\r\n        this.dependencies = new PJQ.collections.schedule.TaskDependencies(model.dependencies);\r\n\r\n        this.pendingRequestedChanges = new PJQ.collections.schedule.RequestedChanges(model.requestedChanges);\r\n\r\n        this.tasks = new PJQ.collections.schedule.Tasks();\r\n        if (model.tasks) {\r\n            _.each(model.tasks, function (task) {\r\n                this.tasks.add(new this.tasks.model(_.defaults({\r\n                    status: task.status != null ? task.status : this.statuses.get(task.statusId),\r\n                    requestedChanges: _.filter(this.pendingRequestedChanges.models, function (dependency) {\r\n                        return dependency.get('taskId') === task.taskId;\r\n                    }),\r\n                    dependencies: _.filter(this.dependencies.models, function (dependency) {\r\n                        return dependency.get('taskId') === task.taskId || dependency.get('dependTaskId') === task.taskId;\r\n                    })\r\n                }, task)));\r\n            }, this);\r\n        }\r\n\r\n        return model;\r\n    }\r\n});\r\n\r\nPJQ.models.schedule.LookAhead = PJQ.models.BaseModel.extend({\r\n    idAttribute: 'id',\r\n    notifyName: 'Look-Ahead',\r\n    endpoint: function () {\r\n        return PJQ.helpers.urlHelpers.generateEndpoint([\r\n            {\r\n                endpoint: 'projects',\r\n                value: this.get('projectId')\r\n            },\r\n            {\r\n                endpoint: 'schedule'\r\n            },\r\n            {\r\n                endpoint: 'lookaheads',\r\n                value: this.id\r\n            }\r\n        ]);\r\n    },\r\n    parse: function (model) {\r\n        if (!model)\r\n            return model;\r\n\r\n        if (model.project != null) {\r\n            this.project = model.project;\r\n        } else {\r\n            this.user = PJQ.app.session.user;\r\n        }\r\n\r\n        this.statuses = new PJQ.collections.schedule.TaskStatuses(model.statuses);\r\n        PJQ.app.session.scheduleTaskStatuses = this.statuses;\r\n\r\n        this.dependencies = new PJQ.collections.schedule.TaskDependencies(model.dependencies);\r\n\r\n        this.pendingRequestedChanges = new PJQ.collections.schedule.RequestedChanges(model.requestedChanges);\r\n\r\n        this.tasks = new PJQ.collections.schedule.Tasks();\r\n        if (model.tasks) {\r\n            _.each(model.tasks, function (task) {\r\n                this.tasks.add(new this.tasks.model(_.defaults({\r\n                    status: task.status != null ? task.status : this.statuses.get(task.statusId),\r\n                    requestedChanges: _.filter(this.pendingRequestedChanges.models, function (dependency) {\r\n                        return dependency.get('taskId') === task.taskId;\r\n                    }),\r\n                    dependencies: _.filter(this.dependencies.models, function (dependency) {\r\n                        return dependency.get('taskId') === task.taskId || dependency.get('dependTaskId') === task.taskId;\r\n                    })\r\n                }, task)));\r\n            }, this);\r\n        }\r\n\r\n        return model;\r\n    },\r\n    getDisplayName: function (actual) {\r\n        let start, finish;\r\n        if (actual) {\r\n            start = new Date(this.get('tasksStart'));\r\n            finish = new Date(this.get('tasksFinish'));\r\n            if (start == null || finish == null) {\r\n                return \"\";\r\n            }\r\n        } else {\r\n            start = new Date(this.get('start'));\r\n            finish = PJQ.helpers.dateHelpers.getNewDateAddDays(start, this.get('duration'));\r\n        }\r\n\r\n        let startStr = PJQ.helpers.dateHelpers.getDateString(start, PJQ.helpers.dateHelpers.dateFormats.DATE, true),\r\n            finishStr = PJQ.helpers.dateHelpers.getDateString(finish, PJQ.helpers.dateHelpers.dateFormats.DATE, true);\r\n        return startStr + ' - ' + finishStr;\r\n    },\r\n    share: function (shareData, callback) {\r\n        let sh = new PJQ.models.schedule.ScheduleShare(_.defaults(shareData ? shareData : {}, {\r\n            projectId: this.get('projectId'),\r\n            lookAheadId: this.id\r\n        }));\r\n        sh.save(null, {\r\n            success: function () {\r\n                if (typeof callback === 'function') {\r\n                    callback(sh);\r\n                }\r\n            }\r\n        });\r\n    }\r\n});\r\n\r\nPJQ.models.schedule.ScheduleShare = PJQ.models.BaseModel.extend({\r\n    idAttribute: 'accessKey',\r\n    notifyName: 'Schedule',\r\n    endpoint: function () {\r\n        if (this.get('projectId') > 0) {\r\n            let params = [];\r\n            if (this.get('lookAheadId') > 0) {\r\n                params.push({\r\n                    parameter: 'lookAheadId',\r\n                    value: this.get('lookAheadId')\r\n                });\r\n            }\r\n\r\n            return PJQ.helpers.urlHelpers.generateEndpoint([\r\n                {\r\n                    endpoint: 'projects',\r\n                    value: this.get('projectId')\r\n                },\r\n                {\r\n                    endpoint: 'schedule'\r\n                },\r\n                {\r\n                    endpoint: 'share'\r\n                }\r\n            ], params);\r\n        }\r\n        return PJQ.helpers.urlHelpers.generateEndpoint([\r\n            {\r\n                endpoint: 'schedule'\r\n            },\r\n            {\r\n                endpoint: 'share',\r\n                value: this.id\r\n            }\r\n        ]);\r\n    }\r\n});\r\n\r\nPJQ.models.schedule.Schedule = PJQ.models.schedule.Template.extend({\r\n    notifyName: 'Schedule',\r\n    endpoint: function () {\r\n        let arr;\r\n        if (this.get('projectId') != null) {\r\n            arr = [\r\n                {\r\n                    endpoint: 'projects',\r\n                    value: this.get('projectId')\r\n                },\r\n                {\r\n                    endpoint: 'schedule'\r\n                }\r\n            ];\r\n        } else {\r\n            arr = [\r\n                {\r\n                    endpoint: 'schedule'\r\n                }\r\n            ];\r\n        }\r\n        return PJQ.helpers.urlHelpers.generateEndpoint(arr);\r\n    },\r\n    share: function (shareData, callback) {\r\n        let sh = new PJQ.models.schedule.ScheduleShare(_.defaults(shareData ? shareData : {}, {\r\n            projectId: this.get('projectId')\r\n        }));\r\n        sh.save(null, {\r\n            success: function () {\r\n                if (typeof callback === 'function') {\r\n                    callback(sh);\r\n                }\r\n            }\r\n        });\r\n    }\r\n});\r\n\r\nPJQ.models.schedule.Task = PJQ.models.BaseModel.extend({\r\n    notifyName: 'Task',\r\n    idAttribute: 'taskId',\r\n    endpoint: function (urlOptions) {\r\n        let arr;\r\n        if (this.isNew() && this.get('projectId') > 0) {\r\n            arr = [\r\n                {\r\n                    endpoint: 'projects',\r\n                    value: this.get('projectId')\r\n                },\r\n                {\r\n                    endpoint: 'schedule'\r\n                },\r\n                {\r\n                    endpoint: 'tasks'\r\n                }\r\n            ];\r\n        } else if (this.isNew() && this.get('templateId') > 0) {\r\n            arr = [\r\n                {\r\n                    endpoint: 'schedule'\r\n                },\r\n                {\r\n                    endpoint: 'templates',\r\n                    value: this.get('templateId')\r\n                },\r\n                {\r\n                    endpoint: 'tasks'\r\n                }\r\n            ];\r\n        } else {\r\n            arr = [\r\n                {\r\n                    endpoint: 'schedule'\r\n                },\r\n                {\r\n                    endpoint: 'tasks',\r\n                    value: this.id\r\n                }\r\n            ]\r\n        }\r\n        return PJQ.helpers.urlHelpers.generateEndpoint(arr)\r\n    },\r\n    parse: function (model) {\r\n        model = _.defaults(model ? model : {}, {\r\n            name: \"\",\r\n            duration: 1,\r\n            start: null,\r\n            finish: null,\r\n            weekendWork: false,\r\n            isAllDay: true,\r\n            isMilestone: false,\r\n            percentComplete: 0,\r\n            notes: \"\",\r\n            lookAheadId: null,\r\n            projectId: null,\r\n            templateId: null\r\n        });\r\n\r\n        //if the parsed value is an array, this was a save response that returned multiple tasks\r\n        //the multiple tasks are returned because dependency relationships caused other tasks to be modified\r\n        if (model.changes != null) {\r\n            this.set('taskId', model.task.taskId);\r\n            if (this.collection != null) {\r\n                _.each(model.changes, function (task) {\r\n                    let colTask = this.collection.get(task.taskId);\r\n                    if(colTask == null){\r\n                        return;\r\n                    }\r\n\r\n                    task.start = PJQ.helpers.dateHelpers.parseDateString(task.start, false);\r\n                    task.finish = PJQ.helpers.dateHelpers.parseDateString(task.finish, false);\r\n                    colTask.set({\r\n                        start: task.start,\r\n                        finish: task.finish\r\n                    });\r\n                }, this);\r\n            }\r\n            model = model.task;\r\n        }\r\n\r\n        if (model.subTasks != null) {\r\n            this.subTasks = new PJQ.collections.schedule.Tasks(model.subTasks);\r\n        }\r\n\r\n        if (model.project != null) {\r\n            this.project = model.project;\r\n        }\r\n\r\n        if (model.status != null) {\r\n            this.status = model.status;\r\n        } else if ((PJQ.app.session.scheduleTaskStatuses != null)) {\r\n            if (model.statusId > 0) {\r\n                this.status = PJQ.app.session.scheduleTaskStatuses.get(model.statusId);\r\n            } else {\r\n                this.status = PJQ.app.session.scheduleTaskStatuses.getDefault();\r\n            }\r\n        }\r\n\r\n        if (_.size(model.start) > 0) {\r\n            model.start = typeof model.start === 'string' ? PJQ.helpers.dateHelpers.parseDateString(model.start, false) : model.start;\r\n        }\r\n\r\n        if (_.size(model.finish) > 0) {\r\n            model.finish = typeof model.finish === 'string' ? PJQ.helpers.dateHelpers.parseDateString(model.finish, false) : model.finish;\r\n        }\r\n\r\n        this.assignees = new PJQ.collections.projectContacts.ProjectContacts(model.assignees);\r\n        this.groups = new PJQ.collections.groups.Groups(model.groups);\r\n        this.comments = new PJQ.collections.schedule.TaskComments(model.comments);\r\n        this.attachments = new PJQ.collections.schedule.ScheduleTaskAttachments(model.attachments);\r\n\r\n        if (PJQ.helpers.objectHelpers.refinedType(model.requestedChanges, true) === 'backboneCollection') {\r\n            this.requestedChanges = model.requestedChanges;\r\n        } else {\r\n            this.requestedChanges = new PJQ.collections.schedule.RequestedChanges(model.requestedChanges);\r\n        }\r\n\r\n        if (_.size(model.dependencies) > 0) {\r\n            if (PJQ.helpers.objectHelpers.refinedType(model.dependencies, true) === 'backboneCollection') {\r\n                this.dependencies = model.dependencies;\r\n            } else {\r\n                this.dependencies = new PJQ.collections.schedule.TaskDependencies(model.dependencies);\r\n            }\r\n        } else if (this.dependencies == null) {\r\n            this.dependencies = new PJQ.collections.schedule.TaskDependencies();\r\n        }\r\n\r\n        return model;\r\n    },\r\n    getSummaryTaskName: function (tasks) {\r\n        let summaryTaskId = this.get('summaryTaskId'),\r\n            name = '';\r\n        if (summaryTaskId > 0) {\r\n            let summaryTask = tasks.get(this.get('summaryTaskId'));\r\n            if (summaryTask != null) {\r\n                name += summaryTask.getSummaryTaskName(tasks) + summaryTask.get('name') + ' > ';\r\n            }\r\n        }\r\n        return name;\r\n    },\r\n    getMinStart: function () {\r\n        if (this.collection == null) {\r\n            return null;\r\n        }\r\n\r\n        let deps = this.getDependencies();\r\n        if (_.size(deps) === 0) {\r\n            return null;\r\n        }\r\n\r\n        return _.max(_.map(deps, function (dep) {\r\n            let depTask = this.collection.get(dep.get('dependTaskId'));\r\n            if (dep.get('type') === PJQ.constants.schedule.dependencyTypes.START_START) {\r\n                if (dep.get('offset') !== 0) {\r\n                    return depTask.get('start');\r\n                }\r\n                return PJQ.helpers.dateHelpers.getNewDateAddDays(depTask.get('finish'), dep.get('offset'), !this.get('weekendWork'));\r\n            } else if (dep.get('type') === PJQ.constants.schedule.dependencyTypes.FINISH_START) {\r\n                return PJQ.helpers.dateHelpers.getNewDateAddDays(depTask.get('finish'), 1 + dep.get('offset'), !this.get('weekendWork'));\r\n            }\r\n            return null;\r\n        }, this));\r\n    },\r\n    getDependencies: function () {\r\n        return _.filter(this.dependencies.models, function (dependency) {\r\n            return dependency.get('taskId') === this.id && !dependency.get('isDeleted');\r\n        }, this);\r\n    },\r\n    getSuccessors: function () {\r\n        return _.filter(this.dependencies.models, function (dependency) {\r\n            return dependency.get('dependTaskId') === this.id && !dependency.get('isDeleted');\r\n        }, this);\r\n    },\r\n    updateWeekendWork: function (weekendWork) {\r\n        new PJQ.ajax.Request({\r\n            endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\r\n                {\r\n                    endpoint: 'schedule'\r\n                },\r\n                {\r\n                    endpoint: 'tasks',\r\n                    value: this.get('taskId')\r\n                },\r\n                {\r\n                    endpoint: 'updateweekendwork'\r\n                },\r\n            ], [\r\n                {\r\n                    parameter: 'weekendWork',\r\n                    value: weekendWork\r\n                }\r\n            ]),\r\n        }).put().done(_.bind(function () {\r\n            this.set('weekendWork', weekendWork);\r\n        }, this));\r\n    },\r\n    determineChangedTasks: function (assignedOnly = true) {\r\n        let result = [],\r\n            resultIds = [],\r\n            fnCheckDeps = _.bind(function (taskData) {\r\n                _.each(taskData.task.getSuccessors(), function (successor) {\r\n                    if (resultIds.indexOf(successor.get('taskId')) !== -1) {\r\n                        return;\r\n                    }\r\n\r\n                    let successorTask = this.collection.get(successor.get('taskId')),\r\n                        cTaskData = null;\r\n                    if (assignedOnly && _.size(successorTask.assignees) === 0) {\r\n                        return;\r\n                    }\r\n\r\n                    if (successor.get('type') === PJQ.constants.schedule.dependencyTypes.FINISH_START && PJQ.helpers.dateHelpers.getDateDaysDiff(successorTask.get('start'), taskData.newFinish, !successorTask.get('weekendWork')) <= 0) {\r\n                        let newStart = PJQ.helpers.dateHelpers.getNewDateAddDays(taskData.newFinish, 1, !successorTask.get('weekendWork'));\r\n                        cTaskData = {\r\n                            task: successorTask,\r\n                            newStart: newStart,\r\n                            newFinish: PJQ.helpers.dateHelpers.getNewDateAddDays(newStart, successorTask.get('duration'), !successorTask.get('weekendWork'), true)\r\n                        };\r\n                    } else if (successor.get('type') === PJQ.constants.schedule.dependencyTypes.START_START && PJQ.helpers.dateHelpers.getDateDaysDiff(successorTask.get('start'), taskData.newStart, !successorTask.get('weekendWork')) <= 0) {\r\n                        cTaskData = {\r\n                            task: successorTask,\r\n                            newStart: taskData.newStart,\r\n                            newFinish: PJQ.helpers.dateHelpers.getNewDateAddDays(taskData.newStart, successorTask.get('duration'), !successorTask.get('weekendWork'), true)\r\n                        };\r\n                    }\r\n                    if (cTaskData != null) {\r\n                        result.push(cTaskData);\r\n                        resultIds.push(successor.get('taskId'));\r\n                        fnCheckDeps(cTaskData);\r\n                    }\r\n                }, this);\r\n            }, this);\r\n\r\n        if (this.id > 0 && (!assignedOnly || _.size(this.assignees) > 0) && (0 !== PJQ.helpers.dateHelpers.getDateDaysDiff(this.initAttributes.start, this.attributes.start, false) || 0 !== PJQ.helpers.dateHelpers.getDateDaysDiff(this.initAttributes.finish, this.attributes.finish, false))) {\r\n            result.push({\r\n                task: this,\r\n                newStart: this.get('start'),\r\n                newFinish: this.get('finish')\r\n            });\r\n            resultIds.push(this.id);\r\n        }\r\n        fnCheckDeps({\r\n            task: this,\r\n            newStart: this.get('start'),\r\n            newFinish: this.get('finish')\r\n        });\r\n        return result;\r\n    },\r\n    getGanttTask: function () {\r\n        return new PJQ.models.charts.GanttTask({\r\n            id: this.id,\r\n            model: this,\r\n            name: this.get('name'),\r\n            start: this.get('start'),\r\n            end: this.get('finish'),\r\n            duration: this.get('duration'),\r\n            isMilestone: this.get('isMilestone'),\r\n            thumbnail: this.get('isMilestone') ? 'https://app.panteratools.com//assets/libs/svgs/light/flag.svg' : null,\r\n            progress: this.get('percentComplete'),\r\n            dependencies: _.map(this.getDependencies(), function (dep) {\r\n                return dep.get('dependTaskId');\r\n            }),\r\n            style: this.status != null ? 'fill: ' + this.status.get('color') : 'fill: #6c757d',\r\n            textColor: '#4CAF50'\r\n        });\r\n    },\r\n    getCalendarTask: function (tasks) {\r\n        return new PJQ.models.calendars.CalendarTask({\r\n            id: this.id,\r\n            model: this,\r\n            title: this.getCalendarTaskTitle(tasks),\r\n            isMilestone: this.get('isMilestone'),\r\n            start: this.get('start'),\r\n            progress: this.get('percentComplete'),\r\n            end: PJQ.helpers.dateHelpers.getNewDateAddDays(this.get('finish'), 1),\r\n            allDay: this.get('isAllDay'),\r\n            backgroundColor: (this.status ? this.status.get('color') : '#6c757d') + ' !important',\r\n            borderColor: (this.status ? this.status.get('color') : '#6c757d') + ' !important'\r\n        });\r\n    },\r\n    getCalendarTaskTitle: function (tasks) {\r\n        let name = this.getSummaryTaskName(tasks) + this.get('name'),\r\n            assigneesArray = [];\r\n        _.each(this.assignees.models, function (assignee) {\r\n            let cName = _.size(assignee.get('contactName')) > 0 ? assignee.get('contactName') : assignee.get('companyName');\r\n            if (_.size(cName) > 0) {\r\n                assigneesArray.push(cName);\r\n            }\r\n        }, this)\r\n\r\n        if (_.size(assigneesArray) >= 1) {\r\n            return name + \" (\" + assigneesArray.join(', ') + ')';\r\n        } else {\r\n            return name;\r\n        }\r\n    },\r\n    beforeSave: function () {\r\n        this.set('statusId', this.status != null ? this.status.id : 0);\r\n        this.set('assignees', this.assignees.toJSON());\r\n        this.set('groups', this.groups.toJSON());\r\n        this.set('dependencies', this.dependencies.getChangedModels());\r\n        this.set('requestedChanges', this.requestedChanges.getChangedModels());\r\n        this.set('attachments', this.attachments.getChangedModels());\r\n    },\r\n    afterSave: function () {\r\n        if (this.collection != null) {\r\n            _.each(this.dependencies.models, function (dep) {\r\n                let relTaskId;\r\n                if (dep.get('taskId') !== this.id) {\r\n                    relTaskId = dep.get('taskId');\r\n                } else {\r\n                    relTaskId = dep.get('dependTaskId');\r\n                }\r\n\r\n                let relTask = this.collection.get(relTaskId);\r\n                if (relTask != null) {\r\n                    let relDep = relTask.dependencies.where({\r\n                        taskId: dep.get('taskId'),\r\n                        dependTaskId: dep.get('dependTaskId')\r\n                    });\r\n                    if (relDep == null && !dep.get('isDeleted')) {\r\n                        relTask.dependencies.add(dep);\r\n                    } else if (dep.get('isDeleted')) {\r\n                        relTask.dependencies.remove(dep);\r\n                    }\r\n                }\r\n            }, this);\r\n        }\r\n    },\r\n    fetchNotifications: function (callback) {\r\n        if (this.notifications == null) {\r\n            this.notifications = new PJQ.collections.schedule.Notifications(null, {\r\n                taskId: this.id\r\n            })\r\n        }\r\n\r\n        this.notifications.fetch({\r\n            success: _.bind(function () {\r\n                callback(this.notifications);\r\n            }, this)\r\n        });\r\n    },\r\n    newDependencyTask: function () {\r\n        let start = PJQ.helpers.dateHelpers.getNewDateAddDays(this.get('start'), -1, !this.get('weekendWork')),\r\n            newTask = new PJQ.models.schedule.Task({\r\n                projectId: this.get('projectId'),\r\n                templateId: this.get('templateId'),\r\n                start: start,\r\n                finish: start\r\n            });\r\n        newTask.dependencies.add({\r\n            taskId: this.id,\r\n            dependTaskId: newTask.id,\r\n            type: PJQ.constants.schedule.dependencyTypes.FINISH_START,\r\n            offset: 0\r\n        });\r\n        return newTask;\r\n    },\r\n    newSuccessorTask: function () {\r\n        let start = PJQ.helpers.dateHelpers.getNewDateAddDays(this.get('finish'), 1, !this.get('weekendWork')),\r\n            newTask = new PJQ.models.schedule.Task({\r\n                projectId: this.get('projectId'),\r\n                templateId: this.get('templateId'),\r\n                start: start,\r\n                finish: start\r\n            });\r\n        newTask.dependencies.add({\r\n            taskId: newTask.id,\r\n            dependTaskId: this.id,\r\n            type: PJQ.constants.schedule.dependencyTypes.FINISH_START,\r\n            offset: 0\r\n        });\r\n        return newTask;\r\n    }\r\n});\r\n\r\nPJQ.models.schedule.TaskDependency = PJQ.models.BaseModel.extend({\r\n    notifyName: 'Dependency',\r\n    idAttribute: 'dependencyId',\r\n    endpoint: function () {\r\n        return PJQ.helpers.urlHelpers.generateEndpoint([\r\n            {\r\n                endpoint: 'schedule'\r\n            },\r\n            {\r\n                endpoint: 'tasks',\r\n                value: this.get('taskId')\r\n            },\r\n            {\r\n                endpoint: 'dependencies',\r\n                value: this.id\r\n            }\r\n        ]);\r\n    },\r\n    getTooltip: function (tasks) {\r\n        let result,\r\n            dependTask = _.find(tasks.models, function (task) {\r\n                return this.get('dependTaskId') === task.id;\r\n            }, this),\r\n            task = _.find(tasks.models, function (task) {\r\n                return this.get('taskId') === task.id;\r\n            }, this);\r\n        if (this.get('offset') > 0 || this.get('offset') < 0) {\r\n            result = task.get('name') + ' can start no earlier than ' + (this.get('offset') > 0 ? (this.get('offset') + ' days after ') : (-this.get('offset') + ' days before ')) + dependTask.get('name') + (this.get('type') === PJQ.constants.schedule.dependencyTypes.FINISH_START ? ' finishes' : ' starts');\r\n        } else {\r\n            result = dependTask.get('name') + ' must ' + (this.get('type') === PJQ.constants.schedule.dependencyTypes.FINISH_START ? 'finish' : 'start') + ' before ' + task.get('name') + ' can start';\r\n        }\r\n        return result;\r\n    }\r\n});\r\n\r\nPJQ.models.schedule.RequestedChange = PJQ.models.BaseModel.extend({\r\n    notifyName: 'Requested Change',\r\n    idAttribute: 'changeId',\r\n    endpoint: function () {\r\n        if (this.id > 0) {\r\n            return PJQ.helpers.urlHelpers.generateEndpoint([\r\n                {\r\n                    endpoint: 'schedule'\r\n                },\r\n                {\r\n                    endpoint: 'changes',\r\n                    value: this.id\r\n                }\r\n            ]);\r\n        }\r\n\r\n        return PJQ.helpers.urlHelpers.generateEndpoint([\r\n            {\r\n                endpoint: 'schedule'\r\n            },\r\n            {\r\n                endpoint: 'tasks',\r\n                value: this.get('taskId')\r\n            },\r\n            {\r\n                endpoint: 'changes'\r\n            }\r\n        ]);\r\n    },\r\n    parse: function (model) {\r\n        if (!model) {\r\n            return model;\r\n        }\r\n\r\n        if (model.newStart != null) {\r\n            model.newStart = PJQ.helpers.dateHelpers.parseDateString(model.newStart, false);\r\n            model.newFinish = PJQ.helpers.dateHelpers.parseDateString(model.newFinish, false);\r\n        }\r\n\r\n        if (model.oldStart != null) {\r\n            model.oldStart = PJQ.helpers.dateHelpers.parseDateString(model.oldStart, false);\r\n            model.oldFinish = PJQ.helpers.dateHelpers.parseDateString(model.oldFinish, false);\r\n        }\r\n        return model;\r\n    },\r\n    approve: function (callback) {\r\n        new PJQ.ajax.Request({\r\n            endpoint: this.endpoint() + '/approve',\r\n            data: this.toJSON()\r\n        }).post().done(_.bind(function (response) {\r\n            this.set(response.requestedChange);\r\n            if (typeof callback === 'function') {\r\n                callback(response);\r\n            }\r\n        }, this));\r\n    },\r\n    reject: function (callback) {\r\n        new PJQ.ajax.Request({\r\n            endpoint: this.endpoint() + '/reject',\r\n            data: this.toJSON()\r\n        }).post().done(_.bind(function (response) {\r\n            this.set(response);\r\n            if (typeof callback === 'function') {\r\n                callback(response);\r\n            }\r\n        }, this));\r\n    },\r\n});\r\n\r\nPJQ.models.schedule.TaskStatus = PJQ.models.BaseModel.extend({\r\n    notifyName: 'Status',\r\n    idAttribute: 'statusId',\r\n    endpoint: function () {\r\n        return PJQ.helpers.urlHelpers.generateEndpoint([\r\n            {\r\n                endpoint: 'schedule'\r\n            },\r\n            {\r\n                endpoint: 'statuses',\r\n                value: this.id\r\n            }\r\n        ]);\r\n    }\r\n});\r\n\r\nPJQ.models.schedule.ScheduleTaskAttachment = PJQ.models.files.File.extend({\r\n    idAttribute: 'attachmentId',\r\n    endpoint: function () {\r\n        return PJQ.helpers.urlHelpers.generateEndpoint([\r\n            {\r\n                endpoint: 'schedule'\r\n            },\r\n            {\r\n                endpoint: 'tasks',\r\n                value: this.get('taskId')\r\n            },\r\n            {\r\n                endpoint: 'attachments',\r\n                value: this.id\r\n            }\r\n        ]);\r\n    }\r\n});\r\n\r\nPJQ.models.schedule.TaskComment = PJQ.models.BaseModel.extend({\r\n    notifyName: 'Comment',\r\n    idAttribute: 'commentId',\r\n    endpoint: function () {\r\n        return PJQ.helpers.urlHelpers.generateEndpoint([\r\n            {\r\n                endpoint: 'schedule'\r\n            },\r\n            {\r\n                endpoint: 'tasks',\r\n                value: this.get('taskId')\r\n            },\r\n            {\r\n                endpoint: 'comments',\r\n                value: this.id\r\n            }\r\n        ]);\r\n    },\r\n    parse: function (model) {\r\n        if (!model) {\r\n            return model;\r\n        }\r\n        if (model.createdBy != null) {\r\n            this.createdBy = new PJQ.models.projectContacts.ProjectContact(model.createdBy);\r\n        }\r\n        return model;\r\n    }\r\n});\r\n\r\nPJQ.models.schedule.Settings = PJQ.models.BaseModel.extend({\r\n    notifyName: 'Schedule Settings',\r\n    idAttribute: 'userId',\r\n    endpoint: function () {\r\n        if (this.get('projectId') > 0) {\r\n            return PJQ.helpers.urlHelpers.generateEndpoint([\r\n                {\r\n                    endpoint: 'projects',\r\n                    value: this.get('projectId')\r\n                },\r\n                {\r\n                    endpoint: 'schedule'\r\n                },\r\n                {\r\n                    endpoint: 'settings'\r\n                }\r\n            ]);\r\n        }\r\n        return PJQ.helpers.urlHelpers.generateEndpoint([\r\n            {\r\n                endpoint: 'schedule'\r\n            },\r\n            {\r\n                endpoint: 'settings'\r\n            }\r\n        ]);\r\n    },\r\n    parse: function (model) {\r\n        if (!model) {\r\n            return model;\r\n        }\r\n\r\n        this.lookAheadManagers = new PJQ.collections.projectContacts.ProjectContacts(model.lookAheadManagers);\r\n        return model;\r\n    },\r\n    beforeSave: function () {\r\n        this.set('lookAheadManagers', this.lookAheadManagers.toJSON());\r\n    },\r\n});\r\n\r\nPJQ.models.schedule.TaskListItemGroup = PJQ.models.BaseModel.extend({});\r\n\r\n// Collections\r\nPJQ.collections.schedule.Templates = PJQ.collections.BaseCollection.extend({\r\n    model: PJQ.models.schedule.Template,\r\n    endpoint: function () {\r\n        return PJQ.helpers.urlHelpers.generateEndpoint([\r\n            {\r\n                endpoint: 'schedule'\r\n            },\r\n            {\r\n                endpoint: 'templates'\r\n            }\r\n        ]);\r\n    }\r\n});\r\n\r\nPJQ.collections.schedule.LookAheads = PJQ.collections.BaseCollection.extend({\r\n    model: PJQ.models.schedule.LookAhead,\r\n    endpoint: function () {\r\n        return PJQ.helpers.urlHelpers.generateEndpoint([\r\n            {\r\n                endpoint: 'projects',\r\n                value: this.options.projectId\r\n            },\r\n            {\r\n                endpoint: 'schedule'\r\n            },\r\n            {\r\n                endpoint: 'lookaheads'\r\n            }\r\n        ]);\r\n    }\r\n});\r\n\r\nPJQ.collections.schedule.Tasks = PJQ.collections.BaseCollection.extend({\r\n    model: PJQ.models.schedule.Task,\r\n    getGanttTasks: function () {\r\n        let sortedModels = _.sortBy(this.models, function (model) {\r\n            if (model.get('start') != null) {\r\n                return new Date(model.get('start'));\r\n            }\r\n        });\r\n        let fnGetSubtasks = _.bind(function (task) {\r\n                let subTasks = _.filter(sortedModels, function (model) {\r\n                    return model.get('summaryTaskId') === task.id && model.id !== task.id;\r\n                });\r\n                _.each(subTasks, function (subTask) {\r\n                    subTasks.push(...fnGetSubtasks(subTask));\r\n                });\r\n                return subTasks;\r\n            }, this),\r\n            tasks = [];\r\n        _.each(sortedModels, function (model) {\r\n            if (model.get('summaryTaskId') > 0) {\r\n                return;\r\n            }\r\n\r\n            tasks.push(model.getGanttTask());\r\n            _.each(fnGetSubtasks(model), function (subTask) {\r\n                tasks.push(subTask.getGanttTask());\r\n            })\r\n        });\r\n        return new PJQ.collections.charts.GanttTasks(tasks);\r\n    },\r\n    getCalendarTasks: function () {\r\n        return new PJQ.collections.calendars.CalendarTasks(_.map(_.filter(this.models, function (model) {\r\n            return !model.get('isSummaryTask');\r\n        }), function (model) {\r\n            return model.getCalendarTask(this);\r\n        }, this));\r\n    },\r\n    getValidDependencies: function (task, explicitAllow = null) {\r\n        // tasks that cannot be dependencies:\r\n        // existing successors (recursively)\r\n        // dependencies that already exist\r\n        let invalidTaskIds = [],\r\n            fnCheck = _.bind(function (deps) {\r\n                _.each(deps, function (dep) {\r\n                    let tId = dep.get('taskId');\r\n                    invalidTaskIds.push(tId);\r\n                    fnCheck(this.get(tId).getSuccessors());\r\n                }, this);\r\n            }, this);\r\n        fnCheck(task.getSuccessors());\r\n        invalidTaskIds.push(..._.map(task.getDependencies(), function (dep) {\r\n            return dep.get('dependTaskId');\r\n        }));\r\n        return _.filter(this.models, function (checkTask) {\r\n            return (explicitAllow != null && explicitAllow === checkTask.id) || (checkTask.id !== task.id && invalidTaskIds.indexOf(checkTask.id) === -1);\r\n        });\r\n    },\r\n    getValidSuccessors: function (task, explicitAllow = null) {\r\n        // tasks that cannot be successors:\r\n        // existing dependencies (recursively)\r\n        // successors that already exist\r\n        let invalidTaskIds = [],\r\n            fnCheck = _.bind(function (deps) {\r\n                _.each(deps, function (dep) {\r\n                    let tId = dep.get('dependTaskId');\r\n                    invalidTaskIds.push(tId);\r\n                    fnCheck(this.get(tId).getDependencies());\r\n                }, this);\r\n            }, this);\r\n        fnCheck(task.getDependencies());\r\n        invalidTaskIds.push(..._.map(task.getSuccessors(), function (dep) {\r\n            return dep.get('taskId');\r\n        }));\r\n        return _.filter(this.models, function (checkTask) {\r\n            return (explicitAllow != null && explicitAllow === checkTask.id) || checkTask.id !== task.id && invalidTaskIds.indexOf(checkTask.id) === -1;\r\n        });\r\n    }\r\n});\r\n\r\nPJQ.models.schedule.ScheduleCustomField = PJQ.models.customFields.CustomField.extend({\r\n    endpoint: function () {\r\n        return PJQ.helpers.urlHelpers.generateEndpoint([\r\n            {\r\n                endpoint: 'schedule'\r\n            },\r\n            {\r\n                endpoint: 'customFields',\r\n                value: this.id\r\n            }\r\n        ])\r\n    }\r\n});\r\n\r\nPJQ.models.schedule.Notification = PJQ.models.notifications.Notification.extend({\r\n    notificationTypeNames: PJQ.constants.schedule.notificationTypeNames,\r\n    endpoint: function () {\r\n        return PJQ.helpers.urlHelpers.generateEndpoint([\r\n            {\r\n                endpoint: 'schedule'\r\n            },\r\n            {\r\n                endpoint: 'tasks',\r\n                value: this.get('taskId') ? this.get('taskId') : this.collection.options.task.id\r\n            },\r\n            {\r\n                endpoint: 'notifications',\r\n                value: this.id\r\n            }\r\n        ])\r\n    }\r\n});\r\n\r\n//Collections\r\nPJQ.collections.schedule.TaskDependencies = PJQ.collections.BaseCollection.extend({\r\n    model: PJQ.models.schedule.TaskDependency\r\n});\r\n\r\nPJQ.collections.schedule.RequestedChanges = PJQ.collections.BaseCollection.extend({\r\n    model: PJQ.models.schedule.RequestedChange\r\n});\r\n\r\nPJQ.collections.schedule.TaskStatuses = PJQ.collections.BaseCollection.extend({\r\n    model: PJQ.models.schedule.TaskStatus,\r\n    endpoint: function () {\r\n        return PJQ.helpers.urlHelpers.generateEndpoint([\r\n            {\r\n                endpoint: 'schedule'\r\n            },\r\n            {\r\n                endpoint: 'statuses'\r\n            }\r\n        ]);\r\n    },\r\n    getDefault: function () {\r\n        let def = this.findWhere({isDefault: true});\r\n        if (def == null && this.length > 0) {\r\n            def = this.models[0];\r\n        }\r\n        return def != null ? def : null;\r\n    },\r\n    copy: function (callback) {\r\n        new PJQ.ajax.Request({\r\n            endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\r\n                {\r\n                    endpoint: 'schedule'\r\n                },\r\n                {\r\n                    endpoint: 'statuses'\r\n                },\r\n                {\r\n                    endpoint: 'copy'\r\n                }\r\n            ])\r\n        }).post().done(_.bind(function (statuses) {\r\n            this.reset(statuses);\r\n            callback();\r\n        }, this));\r\n\r\n    }\r\n});\r\n\r\nPJQ.collections.schedule.TaskComments = PJQ.collections.BaseCollection.extend({\r\n    model: PJQ.models.schedule.TaskComment\r\n});\r\n\r\nPJQ.collections.schedule.ScheduleTaskAttachments = PJQ.collections.files.Files.extend({\r\n    model: PJQ.models.schedule.ScheduleTaskAttachment\r\n});\r\n\r\nPJQ.collections.schedule.ScheduleCustomFields = PJQ.collections.BaseCollection.extend({\r\n    model: PJQ.models.schedule.ScheduleCustomField,\r\n    options: {\r\n        masterUserId: null\r\n    },\r\n    endpoint: function () {\r\n        let arr;\r\n        if (this.get('projectId') != null) {\r\n            arr = [\r\n                {\r\n                    endpoint: 'projects',\r\n                    value: this.options.project ? this.options.project.id : null\r\n                },\r\n                {\r\n                    endpoint: 'schedule'\r\n                },\r\n                {\r\n                    endpoint: 'customFields'\r\n                }\r\n            ];\r\n        } else {\r\n            arr = [\r\n                {\r\n                    endpoint: 'schedule'\r\n                },\r\n                {\r\n                    endpoint: 'customFields'\r\n                }\r\n            ];\r\n        }\r\n        return PJQ.helpers.urlHelpers.generateEndpoint(arr);\r\n    }\r\n});\r\n\r\nPJQ.collections.schedule.Notifications = PJQ.collections.notifications.Notifications.extend({\r\n    defaults: {\r\n        isAPIv2: true\r\n    },\r\n    model: PJQ.models.schedule.Notification,\r\n    endpoint: function () {\r\n        if (this.options.projectId > 0) {\r\n            return PJQ.helpers.urlHelpers.generateEndpoint([\r\n                {\r\n                    endpoint: 'projects',\r\n                    value: this.options.projectId\r\n                },\r\n                {\r\n                    endpoint: 'schedule'\r\n                },\r\n                {\r\n                    endpoint: 'notifications'\r\n                }\r\n            ]);\r\n        }\r\n\r\n        return PJQ.helpers.urlHelpers.generateEndpoint([\r\n            {\r\n                endpoint: 'schedule'\r\n            },\r\n            {\r\n                endpoint: 'tasks',\r\n                value: this.options.taskId\r\n            },\r\n            {\r\n                endpoint: 'notifications'\r\n            }\r\n        ]);\r\n    }\r\n});\r\n","PJQ.views.schedule.SettingsModal = PJQ.views.BaseModal.extend({\n    defaults: {\n        template: new PJQ.templating.Template(PJQ.constants.modules.SCHEDULE, 'Modal-Settings'),\n        maxWidth: 500,\n        onSave: null\n    },\n    events: {\n        'click .btn-save': 'save',\n        'click .btn-delete-tasks': 'deleteTasks'\n    },\n    beforeModalCreated: function () {\n        if (this.model == null) {\n            this.model = new PJQ.models.schedule.Settings({\n                projectId: this.options.project != null ? this.options.project.id : null\n            });\n        }\n        if (!this.model.isFetched) {\n            this.model.fetch({\n                success: function () {\n                    this.render();\n                }\n            });\n        }\n    },\n    renderData: function () {\n        return {\n            model: this.model,\n            project: this.options.project\n        };\n    },\n    afterRender: function () {\n        if (!this.model.isFetched) {\n            return;\n        }\n\n        new PJQ.views.schedule.Settings({\n            el: this.$('.settings-outer'),\n            model: this.model,\n            project: this.options.project\n        });\n    },\n    deleteTasks: function () {\n        new PJQ.views.modals.DeleteCancel({\n            header: \"Confirm Deletion\",\n            body: \"Are you sure you want to delete all tasks on this schedule?\",\n            onDelete: _.bind(function () {\n                this.options.project.deleteAllScheduleTasks(_.bind(function () {\n                    if (typeof this.options.onSave === 'function') {\n                        this.options.onSave(this.model);\n                    }\n                    this.removeModal();\n                }, this));\n            }, this)\n        });\n    },\n    save: function () {\n        if (this.model.hasChanged()) {\n            this.model.save({}, {\n                notify: true,\n                success: _.bind(function () {\n                    if (typeof this.options.onSave === 'function') {\n                        this.options.onSave(this.model);\n                    }\n                    this.removeModal();\n                }, this)\n            });\n        } else {\n            this.removeModal();\n        }\n    }\n});\n\nPJQ.views.schedule.Settings = PJQ.views.BaseView.extend({\n    defaults: {\n        template: new PJQ.templating.Template(PJQ.constants.modules.SCHEDULE, 'Settings'),\n        onChange: null\n    },\n    events: {\n        'click .btn-save': 'save'\n    },\n    beforeFirstRender: function () {\n        if (this.model == null) {\n            this.model = new PJQ.models.schedule.Settings({\n                projectId: this.options.project != null ? this.options.project.id : null\n            });\n        }\n        this.listenTo(this.model, 'change:notificationsEnabled', function () {\n            let $notifications = this.$('.notification-settings');\n            if (this.model.get('notificationsEnabled')) {\n                $notifications.removeClass('hidden');\n            } else {\n                $notifications.addClass('hidden');\n            }\n        });\n\n        let listen = _.bind(function () {\n            if (typeof this.options.onChange === 'function') {\n                this.listenTo(this.model, 'change', function () {\n                    this.options.onChange(this.model);\n                });\n            }\n        }, this);\n        if (!this.model.isFetched) {\n            this.model.fetch({\n                success: _.bind(function () {\n                    listen();\n                    this.render();\n                }, this)\n            });\n        } else {\n            listen();\n        }\n    },\n    renderData: function () {\n        return {\n            model: this.model,\n            project: this.options.project\n        };\n    },\n    afterRender: function () {\n        if (!this.model.isFetched) {\n            return;\n        }\n\n        new PJQ.Binder(this.$el, this.model, {\n            watchElements: [\n                'input',\n                'textarea'\n            ]\n        });\n\n        if (this.options.project != null) {\n            new PJQ.views.contacts.ContactsSelectInput({\n                el: this.$('.look-ahead-managers'),\n                context: PJQ.constants.contacts.contexts.PROJECTCONTACTS,\n                selectedContact: this.model.lookAheadManagers.models,\n                isSingleChoice: false,\n                onChange: _.bind(function (selectedContacts) {\n                    this.model.lookAheadManagers.reset(selectedContacts);\n                    this.model.set('isDirty', true);\n                }, this)\n            });\n        }\n\n        new PJQ.inputs.Selectpicker({\n            el: this.$('.select-default-view'),\n            defaultValue: this.model.get('defaultView') ? this.model.get('defaultView') : 'view_group',\n            onChange: _.bind(function (value) {\n                this.model.set('defaultView', value);\n            }, this)\n        });\n\n        new PJQ.inputs.Selectpicker({\n            el: this.$('.select-date-change-notif-mode'),\n            defaultValue: this.model.get('dateChangeNotificationsMode'),\n            onChange: _.bind(function (value) {\n                this.model.set('dateChangeNotificationsMode', value);\n            }, this)\n        });\n    }\n});\n\nPJQ.views.schedule.TaskStatuses = PJQ.views.BaseView.extend({\n    defaults: {\n        template: new PJQ.templating.Template(PJQ.constants.modules.SCHEDULE, 'Schedule-Statuses')\n    },\n    events: {\n        'click .add-task-status': 'addClicked',\n        'click .edit-task-status': 'editClicked',\n        'click .delete-task-status': 'deleteClicked',\n        'click .save-task-status': 'statusSave',\n        'click .cancel-edit-task-status': 'cancelEditStatus',\n        'colorpickerChange': 'setBGColor',\n        'keyup .colorpicker-input-box': 'setBGColor'\n    },\n    beforeFirstRender: function () {\n        this.taskStatusContext = null;\n        this.collection = new PJQ.collections.schedule.TaskStatuses();\n        this.collection.fetch({\n            success: _.bind(function () {\n                this.render();\n            }, this)\n        });\n    },\n    renderData: function () {\n        return {};\n    },\n    afterRender: function () {\n        this.dataTable = new PJQ.views.dataTables.DataTable({\n            el: this.$(\".task-status-table\"),\n            isHideSearch: true,\n            data: this.collection.models,\n            rowId: \"cid\",\n            order: [0, 'asc'],\n            sortableOptions: {\n                data: this.collection\n            },\n            targets: 'no-sort',\n            pageLength: 50,\n            bSort: false,\n            language: {\n                zeroRecords: 'Click \"Add\" to create a new Task Status'\n            },\n            columns: [\n                {\n                    \"data\": \"attributes.sortOrder\",\n                    \"title\": \"\",\n                    \"searchable\": false,\n                    \"orderable\": false,\n                    \"visible\": false,\n                    \"render\": _.bind(function (data, type, row) {\n                        return '<div><i class=\"fas fa-sort\"></i></div>';\n                    }, this)\n                },\n                {\n                    \"data\": {\n                        \"display\": _.bind(function (row) {\n                            if (this.taskStatusContext != null && this.taskStatusContext.get('name') === row.get('name') && this.taskStatusContext.get('sortOrder') === row.get('sortOrder')) {\n                                return '<input type=\"text\" class=\"form-control input-task-status wd-200p\" value=\"' + row.get('name') + '\">';\n                            } else {\n                                return '<span style=\"color:' + row.get('color') + ';\">' + row.get('name') + '</span>';\n                            }\n                        }, this)\n                    },\n                    \"title\": \"Status\",\n                    \"width\": \"200px\"\n                },\n                {\n                    \"data\": \"\",\n                    \"title\": \"Default\",\n                    \"width\": \"50px\",\n                    \"orderable\": false,\n                    \"searchable\": false,\n                    \"render\": _.bind(function (data, type, row) {\n                        let content = row.get('isDefault') === true ? \"Yes\" : \"No\";\n                        if (this.taskStatusContext != null && this.taskStatusContext.get('name') === row.get('name') && this.taskStatusContext.get('sortOrder') === row.get('sortOrder')) {\n                            content = '<div class=\"pretty p-switch mr-1 wd-120p mr-2 ml-2\">\\n' +\n                                '                <input type=\"checkbox\" class=\"input-default-status\"\\n' +\n                                '                       />\\n' +\n                                '                <div class=\"state p-primary\">\\n' +\n                                '                    <label><span class=\"fs-16\">Default Status</span></label>\\n' +\n                                '                </div>\\n' +\n                                '            </div>'\n                        }\n                        if (this.taskStatusContext != null && this.taskStatusContext.get('isDefault') === true) {\n                            this.$('.input-default-status').prop('checked', true);\n                            this.$('.input-default-status').prop('disabled', true);\n                        } else {\n                            this.$('.input-default-status').prop('checked', false);\n                            this.$('.input-default-status').prop('disabled', false);\n                        }\n\n                        return '<div>' + content + '</div>'\n                    }, this)\n                },\n                {\n                    \"data\": \"\",\n                    \"title\": \"\",\n                    \"orderable\": false,\n                    \"searchable\": false,\n                    \"width\": \"200px\",\n                    \"render\": _.bind(function (data, type, row) {\n                        let content = '';\n                        if (this.taskStatusContext != null && this.taskStatusContext.get('name') === row.get('name')) {\n                            return '<div class=\"input-group task-status-color-input wd-200p\"><input type=\"text\" class=\"form-control colorpicker-input-box\"/><span class=\"input-group-append\"><div class=\"input-group color-picker\"><span class=\"input-group-text colorpicker-input-addon\"><i></i></span></div></span></div>'\n                        }\n                        return '<div>' + content + '</div>'\n                    }, this)\n                },\n                {\n                    \"data\": \"\",\n                    \"title\": \"\",\n                    \"orderable\": false,\n                    \"searchable\": false,\n                    \"render\": _.bind(function (data, type, row) {\n                        let content = '';\n                        if (this.taskStatusContext != null && this.taskStatusContext.get('name') === row.get('name')) {\n                            content = '<button type=\"button\" class=\"btn btn-success save-task-status wd-30p ml-1\"><i class=\"fal fa-save\"></i></button><button type=\"button\" class=\"btn btn-danger cancel-edit-task-status wd-30p ml-1\"><i class=\"fal fa-times\"></i></button>';\n                        } else {\n                            let disabledAttr = this.taskStatusContext != null ? ' disabled ' : '';\n                            content = '<button type=\"button\" class=\"btn btn-info edit-task-status wd-30p ml-1\"' + disabledAttr + '><i class=\"fal fa-pencil\"></i></button><button type=\"button\" class=\"btn btn-danger delete-task-status wd-30p ml-1\"' + disabledAttr + '><i class=\"fal fa-trash\"></i></button>';\n                        }\n                        return '<div class=\"text-align-right show-on-row-hover\">' + content + '</div>'\n                    }, this),\n                    \"width\": \"80px\",\n                }\n            ],\n        });\n    },\n    addClicked: function () {\n        this.taskStatusContext = null;\n        if (this.collection.models.length > 0 && this.collection.models[0].get('userId') === -1)\n            this.copyDefaultStatuses(_.bind(this.addStatus, this));\n        else\n            this.addStatus();\n    },\n    addStatus: function () {\n        let newStatus = new PJQ.models.schedule.TaskStatus({\n            name: \"\",\n            color: \"#000000\",\n            isDefault: false,\n            sortOrder: this.collection.models.length + 1,\n        });\n        this.dataTable.addRow(newStatus);\n        this.taskStatusContext = newStatus;\n        this.$('.add-task-status').prop('disabled', true);\n        this.dataTable.refresh();\n        this.colorPicker = new PJQ.colors.ColorPicker(this.$('.color-picker'), {\n            format: 'hex',\n            color: this.taskStatusContext.get('color'),\n            autoInputFallback: false\n        });\n        this.$('.colorpicker-input-box').val(this.taskStatusContext.get('color'));\n        this.$('.input-task-status').css('color', this.taskStatusContext.get('color'));\n    },\n    editClicked: function (e) {\n        this.taskStatusContext = this.dataTable.getRow($(e.currentTarget).closest('tr')).data();\n        if (this.taskStatusContext.get('userId') === -1)\n            this.copyDefaultStatuses(_.bind(function (newStatus) {\n                this.taskStatusContext = newStatus;\n                this.editStatus();\n            }, this));\n        else\n            this.editStatus();\n    },\n    editStatus: function () {\n        this.$('.add-task-status').prop('disabled', true);\n        this.dataTable.refresh();\n        this.colorPicker = new PJQ.colors.ColorPicker(this.$('.color-picker'), {\n            format: 'hex',\n            color: this.taskStatusContext.get('color'),\n            autoInputFallback: false\n        });\n        this.$('.colorpicker-input-box').val(this.taskStatusContext.get('color'));\n        this.$('.input-task-status').css('color', this.taskStatusContext.get('color'));\n    },\n    setBGColor: function (e) {\n        if (e.type === 'keyup') {\n            if (e.keyCode === 13) {\n                $(e.currentTarget).blur()\n            }\n            let color = this.$('.colorpicker-input-box').val();\n            if (color.split('')[0] === '#' && color.trim().length === 7) {\n                this.colorPicker.setColor(color);\n                this.taskStatusContext.set('color', color.toUpperCase());\n                this.$('.input-task-status').css('color', color.toUpperCase());\n                PJQ.helpers.inputHelpers.setInputError(this.$('.colorpicker-input-box'), true);\n            }\n        } else {\n            let color = this.colorPicker.getColor();\n            if (color.split('')[0] === '#' && color.trim().length === 7) {\n                this.$('.colorpicker-input-box').val(color);\n                this.taskStatusContext.set('color', color);\n                this.$('.input-task-status').css('color', color);\n                PJQ.helpers.inputHelpers.setInputError(this.$('.colorpicker-input-box'), true);\n            }\n        }\n    },\n    statusSave: function (e) {\n        let $row = $(e.currentTarget).closest('tr'),\n            status = this.dataTable.getRow($row).data(),\n            $name = $row.find('.input-task-status'),\n            color = this.$('.colorpicker-input-box').val(),\n            isColorValid = color.split('')[0] === '#' && color.trim().length === 7;\n\n        if (_.size($name) > 0) {\n            status.set('name', $name.val())\n        }\n        let isNameValid = _.size(status.get('name')) > 0;\n\n        status.set('color', color);\n        status.set('isDefault', (this.$('.input-default-status').prop('checked')));\n        status.set('sortOrder', this.taskStatusContext.get('sortOrder'));\n\n        PJQ.helpers.inputHelpers.setInputError($name, isNameValid);\n        PJQ.helpers.inputHelpers.setInputError(this.$('.colorpicker-input-box'), isColorValid, {\n            errorText: isColorValid ? \"\" : \"Hex must begin with a # followed by 6 letters and/or numbers!\"\n        });\n\n        let isDefault = status.get('isDefault'),\n            successFn = _.bind(function (isDefault) {\n                if (isDefault) {\n                    _.each(this.collection.models, _.bind(function (status) {\n                        if (status.get('statusId') !== this.taskStatusContext.get('statusId'))\n                            status.set('isDefault', false);\n                    }, this));\n                }\n                this.taskStatusContext = null;\n                this.render()\n            }, this);\n\n        if (isNameValid && isColorValid) {\n            let wasNew = this.taskStatusContext.isNew();\n            this.taskStatusContext.save(null, {\n                success: _.bind(function () {\n                    if (wasNew)\n                        this.collection.add(this.taskStatusContext);\n                    successFn(isDefault);\n                }, this)\n            });\n        }\n    },\n    cancelEditStatus: function (e) {\n        let $row = $(e.currentTarget).closest('tr'),\n            row = this.dataTable.getRow($row);\n        if (this.taskStatusContext.get('name').length === 0) {\n            this.dataTable.removeRow(row);\n        }\n        this.$('.add-task-status').prop('disabled', false);\n        this.taskStatusContext = null;\n        this.dataTable.refresh();\n\n    },\n    deleteClicked: function (e) {\n        this.taskStatusContext = this.dataTable.getRow($(e.currentTarget).closest('tr')).data();\n\n        if (this.taskStatusContext.get('userId') === -1)\n            this.copyDefaultStatuses(_.bind(function (newStatus) {\n                this.taskStatusContext = newStatus;\n                this.deleteStatus(e);\n            }, this));\n        else\n            this.deleteStatus(e);\n    },\n    deleteStatus: function (e) {\n        let $row = $(e.currentTarget).closest('tr'),\n            row = this.dataTable.getRow($row);\n        new PJQ.views.modals.DeleteCancel({\n            header: \"Delete Task Status\",\n            body: \"Are you sure you want to delete this status?  All tasks that have this status will be set to the Default status if you continue.\",\n            onDelete: _.bind(function () {\n                this.dataTable.removeRow(row);\n                this.dataTable.refresh();\n\n                let wasDefault = this.taskStatusContext.get('isDefault');\n                this.taskStatusContext.destroy();\n                this.taskStatusContext = null;\n                _.each(this.collection.models, _.bind(function (status, index) {\n                    status.set('sortOrder', index + 1);\n                }, this));\n\n                if (wasDefault && this.collection.models.length > 0)\n                    this.collection.models[0].set('isDefault', true);\n\n                this.render();\n            }, this)\n        });\n\n    },\n    copyDefaultStatuses: function (callback) {\n        new PJQ.views.modals.YesNo({\n            header: \"Change Task Statuses?\",\n            body: 'You are currently using the system default task statuses.  To edit a task status, we will need to create custom task statuses for your company.  This may take a minute, would you like to continue?',\n            onYes: _.bind(function () {\n                this.collection.copy(_.bind(function () {\n                    let newStatus = null;\n                    if (this.taskStatusContext != null) {\n                        let returnName = this.taskStatusContext.get('name');\n                        newStatus = _.find(this.collection.models, function (u) {\n                            return u.get('name') === returnName;\n                        });\n                    }\n                    this.dataTable.options.data = this.collection.models\n                    this.dataTable.render();\n                    callback(newStatus);\n                }, this));\n            }, this)\n        });\n    }\n});\n","PJQ.views.schedule.TaskListDataTable = PJQ.views.dataTables.DataTable.extend({\r\n    defaults: {\r\n        subTemplates: {\r\n            header: new PJQ.templating.Template(PJQ.constants.modules.SCHEDULE, 'Data-Table-Header-Task-List')\r\n        },\r\n        language: {\r\n            emptyTable: 'No tasks were found',\r\n            zeroRecords: \"No tasks were found\"\r\n        },\r\n        settings: null,\r\n        onTaskEdit: null,\r\n        onTaskDelete: null,\r\n        paging: false,\r\n        scrollRows: true,\r\n        isShowCriticalPath: false,\r\n        isAdmin: true,\r\n        level: 0,\r\n        order: [3, 'asc'],\r\n        orderCookie: PJQ.constants.cookies.SCHEDULE_TASK_LIST_ORDER\r\n    },\r\n    events: {\r\n        'click .btn-edit-task': 'editTaskClicked',\r\n        'click .btn-delete-task': 'deleteTaskClicked',\r\n        'keyup .datatable-search': 'search',\r\n        'click .task-list-clear-filters': 'clearFilters'\r\n    },\r\n    headerData: function () {\r\n        return {\r\n            statuses: this.model.statuses\r\n        };\r\n    },\r\n    afterDataTableRender: function () {\r\n        let self = this;\r\n        if(_.size(this.model.tasks.models) < 200) {\r\n            this.dataTable.rows().every(function () {\r\n                let task = this.data();\r\n                if (task.get('isSummaryTask')) {\r\n                    self.toggleChildRow(this);\r\n                }\r\n            });\r\n        }\r\n\r\n        if(typeof this.options.afterTableRendered === 'function'){\r\n            this.options.afterTableRendered();\r\n        }\r\n    },\r\n    beforeDataTableRender: function () {\r\n        this.options.hasCompleteStatus = false;\r\n        this.preferences = this.options.project ? this.options.project.preferences : PJQ.app.session.preferences;\r\n        _.each(this.model.statuses.models, function (model) {\r\n            if (model.get('name').toLowerCase().includes('complete')) {\r\n                this.options.hasCompleteStatus = true;\r\n            }\r\n        }, this)\r\n\r\n        this.statusFilterPicker = new PJQ.inputs.Selectpicker({\r\n            el: this.$('select.task-list-filter'),\r\n            defaultValue: this.options.filter,\r\n            isMultiple: true,\r\n            isIntChoices: true,\r\n            noneSelectedText: 'No Filters',\r\n            onChange: _.bind(function (value) {\r\n                this.setFilter('status', value);\r\n            }, this)\r\n        });\r\n    },\r\n    getContextMenuOptions: function () {\r\n        return {\r\n            actions: [\r\n                {\r\n                    name: 'Edit',\r\n                    iconClass: 'fal fa-pencil',\r\n                    onClick: _.bind(function (row) {\r\n                        this.editTask(row.data());\r\n                    }, this),\r\n                    isShown: _.bind(function (row) {\r\n                        return true;\r\n                    }, this)\r\n                },\r\n                {\r\n                    name: 'New Dependency',\r\n                    iconClass: 'fal fa-plus',\r\n                    onClick: _.bind(function (row) {\r\n                        let newTask = row.data().newDependencyTask();\r\n                        this.model.tasks.add(newTask);\r\n                        this.editTask(newTask);\r\n                    }, this),\r\n                    isShown: _.bind(function (row) {\r\n                        return false;\r\n                    }, this)\r\n                },\r\n                {\r\n                    name: 'New Successor',\r\n                    iconClass: 'fal fa-plus',\r\n                    onClick: _.bind(function (row) {\r\n                        let newTask = row.data().newSuccessorTask();\r\n                        this.model.tasks.add(newTask);\r\n                        this.editTask(newTask);\r\n                    }, this),\r\n                    isShown: _.bind(function (row) {\r\n                        return false;\r\n                    }, this)\r\n                },\r\n                {\r\n                    name: 'Add to Summary Task',\r\n                    onClick: _.bind(function (row) {\r\n                        let task = row.data();\r\n                        this.addToSummaryTaskClicked(task);\r\n                    }, this),\r\n                    isShown: _.bind(function (row) {\r\n                        let task = row.data();\r\n                        if(task) {\r\n                            return !this.options.settings.get('lockSchedule');\r\n                        }\r\n                        else{\r\n                            return false;\r\n                        }\r\n                    }, this)\r\n                },\r\n                {\r\n                    name: 'Remove from Summary Task',\r\n                    onClick: _.bind(function (row) {\r\n                        let task = row.data();\r\n                        this.removeSummaryTask(task);\r\n                    }, this),\r\n                    isShown: _.bind(function (row) {\r\n                        let task = row.data();\r\n                        if(task) {\r\n                            return task.get('summaryTaskId') > 0 && !this.options.settings.get('lockSchedule');\r\n                        }\r\n                        else{\r\n                            return false;\r\n                        }\r\n                    }, this)\r\n                },\r\n                {\r\n                    name: 'Delete',\r\n                    iconClass: 'fal fa-trash',\r\n                    isDanger: true,\r\n                    onClick: _.bind(function (row) {\r\n                        this.deleteTask(row.data());\r\n                    }, this),\r\n                    isShown: _.bind(function (row) {\r\n                        return true;\r\n                    }, this)\r\n                }\r\n            ]\r\n        };\r\n    },\r\n    addToSummaryTaskClicked: function (task) {\r\n        new PJQ.views.charts.SummaryTaskModal({\r\n            tasks: this.model.tasks,\r\n            task: task,\r\n            project: this.options.project,\r\n            schedule: this.options.schedule,\r\n            onSave: _.bind(function (task, summaryTaskId, isNewTask = false) {\r\n                if (typeof this.options.onTaskUpdateSummary === 'function') {\r\n                    this.options.onTaskUpdateSummary(task, summaryTaskId, isNewTask);\r\n                }\r\n            }, this)\r\n        });\r\n    },\r\n    search: function (searchText) {\r\n        searchText = this.getSearchText();\r\n\r\n        this.searchDataTable(this.dataTable, searchText);\r\n    },\r\n    searchDataTable: function(dataTable, searchText) {\r\n        searchText = searchText.toLowerCase();\r\n        let hasVisibleChildren = false,\r\n            self = this;\r\n\r\n            // Filter the collection\r\n            let filteredModels = this.model.tasks.filter(function (model) {\r\n                // Check each attribute in the model\r\n                return _.some(model.attributes, function (value) {\r\n                    // Ensure the value is a string and perform a case-insensitive comparison\r\n                    if ((typeof value === 'string' || value instanceof String) && _.size(value) > 0) {\r\n                        return value.toLowerCase().includes(searchText);\r\n                    }\r\n                    return false;\r\n                });\r\n            });\r\n\r\n            // Extract summaryTaskIds from filteredModels\r\n            let summaryTaskIds = _.uniq(filteredModels.map(function (model) {\r\n                return model.get('summaryTaskId');\r\n            }));\r\n\r\n            // Include models whose id matches one of the summaryTaskIds\r\n            this.model.tasks.forEach(function (model) {\r\n                if (summaryTaskIds.includes(model.id) && !_.findWhere(filteredModels, {id: model.id})) {\r\n                    filteredModels.push(model);\r\n                }\r\n            });\r\n\r\n            dataTable.rows().every(function () {\r\n                let row = this;\r\n                let rowData = row.data();\r\n                let childTable = row.child.isShown() && $(row.node()).next('tr').find('table').DataTable();\r\n\r\n\r\n                // Check if the current row matches the search text\r\n                let rowMatches = _.contains(filteredModels, rowData);\r\n\r\n\r\n                // Recursively search in child DataTable, if present\r\n                let childMatches = false;\r\n                if (childTable) {\r\n                    childMatches = self.searchDataTable(childTable, searchText);\r\n                }\r\n\r\n                // Check row visibility\r\n                let showRow = rowMatches || childMatches;\r\n                row.node().style.display = showRow ? '' : 'none';\r\n                // Rows with children have an extra <tr> after the actual row. If it isn't hidden there will be a grey line for every empty child table.\r\n                // Hide that row if the row is hidden, or show if not.\r\n                if (!$(row.node()).next('tr').hasClass('odd') && !$(row.node()).next('tr').hasClass('even')) {\r\n                    showRow ? $(row.node()).next('tr').show() : $(row.node()).next('tr').hide();\r\n                }\r\n\r\n                if (showRow) hasVisibleChildren = true;\r\n            });\r\n\r\n            return hasVisibleChildren;\r\n    },\r\n    removeSummaryTask: function (task) {\r\n        if (typeof this.options.onTaskUpdateSummary === 'function') {\r\n            this.options.onTaskUpdateSummary(task, 0);\r\n        }\r\n    },\r\n    getRowChildData: function (row) {\r\n        if(row && row.length > 0) {\r\n            return this.model.tasks.where({summaryTaskId: row.data().id});\r\n        }\r\n    },\r\n    getRowChildTable: function (opts) {\r\n        return new PJQ.views.schedule.TaskListDataTable(_.extend(opts, {\r\n            model: this.model,\r\n            onTaskEdit: this.options.onTaskEdit,\r\n            onTaskDelete: this.options.onTaskDelete,\r\n            onTaskUpdateSummary: this.options.onTaskUpdateSummary,\r\n            hasCompleteStatus: this.options.hasCompleteStatus,\r\n            scrollRows: false,\r\n            hideColumnHeaders: true,\r\n            settings: this.options.settings,\r\n            level: this.options.level + 1,\r\n            summaryTaskId: this.model.tasks.get(opts.parentId).id,\r\n            onChildTableRendered: _.bind(function(){\r\n                this.search(this.getSearchText);\r\n            }, this)\r\n        }));\r\n    },\r\n    getColumns: function () {\r\n        let columns = [];\r\n\r\n        columns.push({\r\n            \"columnData\": \"taskName\",\r\n            \"data\": \"attributes.name\",\r\n            \"title\": \"Name\",\r\n            \"width\": \"20%\",\r\n            \"render\": (data, type, row) => {\r\n                let padding = this.options.level * 15,\r\n                    html = '<i class=\"fal fa-plus-circle toggle-row ' + (!row.get('isSummaryTask') ? 'invisible' : '') + '\" data-type=\"\" data-id=\"' + row.id + '\" style=\"cursor: pointer\"></i>';\r\n\r\n                html += '<a class=\"btn-edit-task ml-2\" href=\"javascript:void(0)\" data-id=\"' + row.id + '\">' + data + '</a>';\r\n\r\n                return '<div style=\"padding-left:' + padding.toString() + 'px;\">' + html + '</div>';\r\n            },\r\n        });\r\n\r\n        columns.push({\r\n            \"columnData\": \"duration\",\r\n            \"data\": \"attributes.duration\",\r\n            \"title\": \"Duration\",\r\n            \"width\": \"50px\",\r\n        });\r\n\r\n        columns.push({\r\n            \"columnData\": \"start\",\r\n            \"data\": {\r\n                \"_\": function (row) {\r\n                    return new Date(row.attributes.start);\r\n                },\r\n                \"filter\": \"attributes.start\",\r\n                \"display\": function (row) {\r\n                    if (row.get('start') == null) {\r\n                        return '';\r\n                    }\r\n\r\n                    let offsetClass = '';\r\n                    if (row.get('finish') != null) {\r\n                        let active = PJQ.helpers.dateHelpers.checkDateBetweenDays(row.get('start'), row.get('finish')),\r\n                            overdue = row.get('percentComplete') < 100 && PJQ.helpers.dateHelpers.checkDateIsBeforeToday(row.get('finish'));\r\n                        if (active) {\r\n                            offsetClass = 'text-primary font-weight-medium';\r\n                        } else if (overdue) {\r\n                            offsetClass = 'text-danger font-weight-bold';\r\n                        } else {\r\n                            let offset = PJQ.helpers.dateHelpers.getDateDaysDiff(row.get('finish'), new Date());\r\n                            if (offset < 0) {\r\n                                offsetClass = 'text-muted';\r\n                            }\r\n                        }\r\n                    }\r\n                    return '<span class=\"' + offsetClass + '\">' + PJQ.helpers.dateHelpers.getDateString(new Date(row.get('start')), PJQ.helpers.dateHelpers.dateFormats.DATE) + '</span>';\r\n                }\r\n            },\r\n            \"group\": function (data, groupBy) {\r\n                switch (groupBy) {\r\n                    case PJQ.constants.schedule.taskList.groupBy.MONTH:\r\n                        return data.get('start') ? PJQ.helpers.dateHelpers.getDateString(data.get('start'), PJQ.helpers.dateHelpers.dateFormats.MONTH_YEAR) : null;\r\n                    case PJQ.constants.schedule.taskList.groupBy.WEEK:\r\n                        let startOfWeek = moment(data.get('start')).startOf('week').toDate(),\r\n                            endOfWeek = moment(data.get('start')).endOf('week').toDate();\r\n                        return data.get('start') != null ? PJQ.helpers.dateHelpers.getDateString(startOfWeek, PJQ.helpers.dateHelpers.dateFormats.DATE) + ' - ' + PJQ.helpers.dateHelpers.getDateString(endOfWeek, PJQ.helpers.dateHelpers.dateFormats.DATE) : null;\r\n                    case PJQ.constants.schedule.taskList.groupBy.DAY:\r\n                        return data.get('start') != null ? PJQ.helpers.dateHelpers.getDateString(data.get('start'), PJQ.helpers.dateHelpers.dateFormats.DATE) : null;\r\n                }\r\n                return 'N/A';\r\n            },\r\n            \"width\": \"100px\",\r\n            \"title\": \"Start\"\r\n        });\r\n\r\n        columns.push({\r\n            \"columnData\": \"finish\",\r\n            \"data\": {\r\n                \"_\": function (row) {\r\n                    return new Date(row.attributes.finish);\r\n                },\r\n                \"filter\": \"attributes.finish\",\r\n                \"display\": function (row) {\r\n                    if (row.get('finish') == null) {\r\n                        return '';\r\n                    }\r\n\r\n                    let offsetClass = '';\r\n                    if (row.get('start') != null) {\r\n                        let active = PJQ.helpers.dateHelpers.checkDateBetweenDays(row.get('start'), row.get('finish')),\r\n                            overdue = row.get('percentComplete') < 100 && PJQ.helpers.dateHelpers.checkDateIsBeforeToday(row.get('finish'));\r\n                        if (active) {\r\n                            offsetClass = 'text-primary font-weight-medium';\r\n                        } else if (overdue) {\r\n                            offsetClass = 'text-danger font-weight-bold';\r\n                        } else {\r\n                            let offset = PJQ.helpers.dateHelpers.getDateDaysDiff(row.get('finish'), new Date());\r\n                            if (offset < 0) {\r\n                                offsetClass = 'text-muted';\r\n                            }\r\n                        }\r\n                    }\r\n                    return '<span class=\"' + offsetClass + '\">' + PJQ.helpers.dateHelpers.getDateString(new Date(row.get('finish')), PJQ.helpers.dateHelpers.dateFormats.DATE) + '</span>';\r\n                }\r\n            },\r\n            \"width\": \"100px\",\r\n            \"title\": \"Finish\"\r\n        });\r\n\r\n        let groupByGroup = function (data) {\r\n            let gr = data.get('groups');\r\n            if (_.size(gr) === 0) {\r\n                return 'None';\r\n            }\r\n\r\n            return _.map(gr, function (group) {\r\n                return group.groupName;\r\n            }).join(', ');\r\n        }\r\n        columns.push({\r\n            \"attribute\": \"groups\",\r\n            \"columnData\": function (row) {\r\n                return row.get('groups');\r\n            },\r\n            \"isArrayGroup\": true,\r\n            \"group\": function (data) {\r\n                return groupByGroup(data);\r\n            },\r\n            \"render\": function (data, type, row) {\r\n                if (type === 'sort') {\r\n                    return groupByGroup(row);\r\n                }\r\n\r\n                if (_.size(row.groups.models) === 0) {\r\n                    return 'None';\r\n                }\r\n\r\n                return _.map(row.groups.models, function (group) {\r\n                    return group.get('groupName');\r\n                }).join(', ');\r\n            },\r\n            \"width\": \"200px\",\r\n            \"title\": this.preferences.getPref(PJQ.constants.preferenceTypes.GROUP_LABEL) ?? \"Trades\"\r\n        });\r\n\r\n        let groupByAssignee = function (data) {\r\n            let as = data.get('assignees');\r\n            if (_.size(as) === 0) {\r\n                return 'Nobody';\r\n            }\r\n\r\n            return _.map(as, function (assignee) {\r\n                return assignee.contactName;\r\n            }).join(', ');\r\n        }\r\n        columns.push({\r\n            \"attribute\": \"assignees\",\r\n            \"columnData\": function (row) {\r\n                return row.get('assignees');\r\n            },\r\n            \"render\": function (data, type, row) {\r\n                if (_.size(row.assignees.models) === 0) {\r\n                    return 'Nobody';\r\n                }\r\n\r\n                return _.map(row.assignees.models, function (assignee) {\r\n                    let res = assignee.get('contactName');\r\n                    return _.size(res) > 0 ? res : assignee.get('companyName');\r\n                }).join(', ');\r\n            },\r\n            \"width\": \"150px\",\r\n            \"title\": \"Assignees\"\r\n        });\r\n\r\n        columns.push({\r\n            \"data\": \"notes\",\r\n            \"title\": \"Notes\",\r\n            \"render\": function (data, type, row) {\r\n                return row.get('notes');\r\n            }\r\n        });\r\n\r\n        columns.push({\r\n            \"columnData\": \"percentComplete\",\r\n            \"data\": {\r\n                \"_\": function (row) {\r\n                    return row.status != null ? row.status.get('sortOrder') : 0;\r\n                },\r\n                \"filter\": \"attributes.percentComplete\",\r\n                \"display\": function (row) {\r\n                    let percent = row.get('percentComplete'),\r\n                        progressBg;\r\n                    if (percent < 60) {\r\n                        progressBg = 'bg-danger';\r\n                    } else if (percent >= 60 && percent < 100) {\r\n                        progressBg = 'bg-warning';\r\n                    } else {\r\n                        progressBg = 'bg-success';\r\n                    }\r\n                    return '<div class=\"progress ht-25p\"><div class=\"progress-bar ' + progressBg + ' text-white fs-16\" role=\"progressbar\" style=\"width:' + percent + '%\">' + percent + '%</div></div>';\r\n                }\r\n            },\r\n            \"width\": \"125px\",\r\n            \"title\": \"Progress\"\r\n        });\r\n\r\n        columns.push({\r\n            \"columnData\": \"status\",\r\n            \"data\": {\r\n                \"_\": function (row) {\r\n                    return row.status != null ? row.status.get('sortOrder') : 0;\r\n                },\r\n                \"filter\": \"attributes.statusId\",\r\n                \"display\": _.bind(function (row) {\r\n                    if (row.status == null) {\r\n                        return '';\r\n                    }\r\n\r\n                    let overdue = row.get('percentComplete') < 100 && PJQ.helpers.dateHelpers.checkDateIsBeforeToday(row.get('finish')),\r\n                        enableOverdueStatus = this.options.settings.get('enableOverdueStatus');\r\n                    if (row.get('finish') != null && this.options.hasCompleteStatus && (row.status == null || row.status.get('name').toLowerCase() !== 'complete') && overdue && enableOverdueStatus) {\r\n                        return '<span class=\"text-danger font-weight-bold\">Overdue</span>';\r\n                    } else {\r\n                        return '<span style=\"color:' + row.status.get('color') + '\">' + row.status.get('name') + '</span>';\r\n                    }\r\n                }, this)\r\n            },\r\n            \"width\": \"100px\",\r\n            \"title\": \"Status\"\r\n        });\r\n\r\n        columns.push({\r\n            \"title\": '',\r\n            \"render\": _.bind(function () {\r\n                let result = '<div class=\"show-on-row-hover\"><button type=\"button\" class=\"btn btn-info btn-edit-task mr-1\" title=\"Edit Task\"><i class=\"fal fa-pencil\"></i></button>';\r\n                if (this.options.isAdmin) {\r\n                    result += '<button type=\"button\" class=\"btn btn-danger btn-delete-task\" title=\"Delete Task\"><i class=\"fal fa-trash-alt\"></i></button>';\r\n                }\r\n                result += '</div>';\r\n                return result;\r\n            }, this),\r\n            \"orderable\": false,\r\n            \"searchable\": false,\r\n            \"width\": \"80px\",\r\n            \"className\": \"text-center\",\r\n            \"visible\": true\r\n        });\r\n\r\n        return columns;\r\n    },\r\n    createdRow: function (row, data) {\r\n    },\r\n    editTaskClicked: function (e) {\r\n        e.stopPropagation();\r\n\r\n        let target = $(e.currentTarget),\r\n            row = this.getRow(target.closest('tr'));\r\n        this.editTask(row.data());\r\n    },\r\n    deleteTaskClicked: function (e) {\r\n        e.stopPropagation();\r\n\r\n        let target = $(e.currentTarget),\r\n            row = this.getRow(target.closest('tr'));\r\n        this.deleteTask(row.data());\r\n    },\r\n    onRowDoubleClick: function (row) {\r\n        this.editTask(row.data());\r\n    },\r\n    editTask: function (task) {\r\n        if (typeof this.options.onTaskEdit === 'function') {\r\n            this.options.onTaskEdit(task);\r\n        }\r\n    },\r\n    deleteTask: function (task) {\r\n        if (typeof this.options.onTaskDelete === 'function') {\r\n            this.options.onTaskDelete(task);\r\n        }\r\n    },\r\n    getFilterData: function () {\r\n        // let statusFilter = this.getFilter('status'),\r\n        //         filtered = _.filter(this.model.tasks.models, function (task) {\r\n        //             return !task.get('isSummaryTask');\r\n        //         }, this);\r\n        //     if (_.size(statusFilter) > 0) {\r\n        //         filtered = _.filter(filtered, function (task) {\r\n        //             return statusFilter.indexOf(task.status.id) !== -1;\r\n        //         }, this);\r\n        //     }\r\n\r\n        let statusFilter = this.getFilter('status'),\r\n            filtered = _.filter(this.model.tasks.models, function (task) {\r\n                let summaryTaskId = task.get('summaryTaskId');\r\n                return this.options.summaryTaskId !== task.id && (this.options.summaryTaskId === summaryTaskId || (this.options.summaryTaskId == null && summaryTaskId == null));\r\n            }, this);\r\n        if (_.size(statusFilter) > 0) {\r\n            filtered = _.filter(filtered, function (task) {\r\n                return statusFilter.indexOf(task.status.id) !== -1;\r\n            }, this);\r\n        }\r\n\r\n        return filtered;\r\n    },\r\n    clearFilters: function () {\r\n        this.statusFilterPicker.deselectAll();\r\n        this.searchBar.val('');\r\n        this.filterBidders();\r\n    }\r\n});\r\n\r\nPJQ.views.schedule.TaskList = PJQ.views.BaseView.extend({\r\n    defaults: {\r\n        template: new PJQ.templating.Template(PJQ.constants.modules.SCHEDULE, 'Task-List'),\r\n        onTaskEdit: null,\r\n        onTaskDelete: null,\r\n        isShowCriticalPath: false,\r\n        isAdmin: true\r\n    },\r\n    events: {},\r\n    renderData: function () {\r\n        return {\r\n            model: this.model\r\n        };\r\n    },\r\n    beforeRender: function () {\r\n        if (this.options.settings == null) {\r\n            if (this.options.project != null) {\r\n                this.options.project.fetchScheduleSettings(_.bind(function (settingsRes) {\r\n                    this.settings = settingsRes;\r\n                }, this));\r\n            } else {\r\n                PJQ.app.session.fetchScheduleSettings(_.bind(function (settingsRes) {\r\n                    this.settings = settingsRes;\r\n                }, this));\r\n            }\r\n        }\r\n    },\r\n    afterRender: function () {\r\n        this.dataTable = new PJQ.views.schedule.TaskListDataTable({\r\n            el: this.$('.task-list'),\r\n            model: this.model,\r\n            isShowCriticalPath: this.options.isShowCriticalPath,\r\n            isAdmin: this.options.isAdmin,\r\n            settings: this.settings,\r\n            afterTableRendered: _.bind(function(){\r\n                if(typeof this.options.afterTableRendered === 'function'){\r\n                    this.options.afterTableRendered();\r\n                }\r\n            }, this),\r\n            onTaskEdit: _.bind(function (task) {\r\n                if (typeof this.options.onTaskEdit === 'function') {\r\n                    this.options.onTaskEdit(task);\r\n                }\r\n            }, this),\r\n            onTaskDelete: _.bind(function (task) {\r\n                if (typeof this.options.onTaskDelete === 'function') {\r\n                    this.options.onTaskDelete(task);\r\n                }\r\n            }, this),\r\n            onTaskUpdateSummary: _.bind(function (task, summaryTaskId) {\r\n                if (typeof this.options.onTaskUpdateSummary === 'function') {\r\n                    this.options.onTaskUpdateSummary(task, summaryTaskId);\r\n                }\r\n            }, this),\r\n        });\r\n\r\n        if(this.options.project != null){\r\n            this.options.project.off('scheduleTaskChanged');\r\n            this.options.project.on('scheduleTaskChanged', function(task, isNew, isSummaryUpdate = false, isDelete = false){\r\n                let $scroll = this.dataTable.$el.find('.dataTables_scrollBody'),\r\n                    scrollY = $scroll.scrollTop();\r\n\r\n                if(isSummaryUpdate){\r\n                    this.dataTable.render();\r\n                } else if(task.get('summaryTaskId')){\r\n                    // levels tracks how many child tables we'll need to go through to get to the target child table\r\n                    // Work from the top down to find the child table we want\r\n                    let levels = 0,\r\n                        summaryTaskIds = [],\r\n                        taskTable = null,\r\n                        // findSummaryTask will start at the edited task, and work its way up to find the highest level task\r\n                        findSummaryTask = _.bind(function(t){\r\n                            levels++;\r\n                            if(t.get('summaryTaskId')){\r\n                                let summaryTask = this.model.tasks.get(t.get('summaryTaskId'));\r\n                                summaryTaskIds.push(summaryTask.id);\r\n                                // If the summary task also has a summaryTaskId, then keep going up\r\n                                if(summaryTask.get('summaryTaskId')){\r\n                                    findSummaryTask(summaryTask);\r\n                                }\r\n                            }\r\n                        }, this);\r\n\r\n                    // initial call of findSummaryTask\r\n                    findSummaryTask(task);\r\n\r\n                    // Once we've found all the relevant tasks then we need to work from the top down to find the child table.\r\n                    let findDataTable = _.bind(function(table){\r\n                        // find the relevant child table\r\n                        let childTable = _.find(table.options.childDataTables, function(child){\r\n                            return summaryTaskIds.find((id) => id === child.options.summaryTaskId)\r\n                        }, this);\r\n\r\n                        // Reduce the levels. If levels is 0 then we've found the target table, otherwise we need to keep going.\r\n                        levels--;\r\n                        if(levels === 0){\r\n                            taskTable = childTable;\r\n                        } else{\r\n                            findDataTable(childTable);\r\n                        }\r\n                    }, this);\r\n\r\n                    // initial call of findDataTable. Will always start with the highest level table\r\n                    findDataTable(this.dataTable);\r\n\r\n                    // Assuming we've found the table successfully, then we can refresh or add a row. If we didn't find the table, then just re-render the whole table.\r\n                    if(taskTable != null) {\r\n                        if(isDelete){\r\n                            let row = taskTable.getRow(task.cid);\r\n                            if(row){\r\n                                taskTable.removeRow(row);\r\n                            }\r\n                        }\r\n                        else if (isNew) {\r\n                            taskTable.addRow(task);\r\n                        } else {\r\n                            taskTable.refresh();\r\n                        }\r\n                    }\r\n                    else{\r\n                        this.dataTable.render();\r\n                    }\r\n                } else{\r\n                    if(isDelete){\r\n                        let row = this.dataTable.getRow(task.cid);\r\n                        if(row){\r\n                            this.dataTable.removeRow(row);\r\n                        }\r\n                    }\r\n                    else if(isNew){\r\n                        this.dataTable.addRow(task);\r\n                    } else{\r\n                        this.dataTable.refresh();\r\n                    }\r\n                }\r\n                this.dataTable.$el.find('.dataTables_scrollBody').scrollTop(scrollY);\r\n            }, this);\r\n        }\r\n    }\r\n});\r\n","PJQ.views.schedule.TemplateManagement = PJQ.views.templates.TemplateManagement.extend({\r\n    beforeFirstRender: function () {\r\n        this.collection = new PJQ.collections.schedule.Templates();\r\n        this.listenTo(this.collection, 'fetch', this.render);\r\n        this.collection.fetch();\r\n    },\r\n    addTemplate: function () {\r\n        new PJQ.views.templates.NewTemplateModal({\r\n            model: new PJQ.models.schedule.Template(),\r\n            onSave: _.bind(function (template) {\r\n                this.collection.add(template);\r\n                this.editTemplate(template);\r\n            }, this)\r\n        });\r\n    },\r\n    editTemplate: function (template) {\r\n        new PJQ.views.schedule.EditTemplateModal({\r\n            model: template,\r\n            onClose: _.bind(function () {\r\n                this.dataTable.refresh();\r\n            }, this),\r\n            onDelete: _.bind(function (template) {\r\n                if (template.id > 0) {\r\n                    let row = this.dataTable.getRow(template.cid);\r\n                    this.collection.remove(template);\r\n                    template.destroy();\r\n                    this.dataTable.removeRow(row);\r\n                }\r\n            }, this)\r\n        });\r\n    }\r\n});\r\n\r\nPJQ.views.schedule.EditTemplateModal = PJQ.views.BaseModal.extend({\r\n    defaults: {\r\n        template: new PJQ.templating.Template(PJQ.constants.modules.SCHEDULE, 'Modal-Edit-Template'),\r\n        maxWidth: '90%',\r\n        fitHeight: true,\r\n        onClose: null\r\n    },\r\n    events: {\r\n        'click .btn-close': 'close',\r\n        'click .btn-delete': 'deleteTemplate'\r\n    },\r\n    beforeModalCreated: function () {\r\n        this.listenTo(this.model, 'fetch', this.render);\r\n        this.model.fetch();\r\n    },\r\n    renderData: function () {\r\n        return {\r\n            model: this.model\r\n        };\r\n    },\r\n    afterRender: function () {\r\n        if (this.model.isFetched) {\r\n            // new PJQ.Alert(this.$('.manage-template-alert'), {\r\n            // \ttext: \"Task start and finish dates are shown as they were originally saved.  When importing these templates on a project, you will be asked to specify a start date.  All task dates will be modified according using the start date provided.\",\r\n            // \tisPrepend: true,\r\n            // \tcookie: PJQ.constants.cookies.SCHEDULE_TEMPLATE_DATES_ORIGIN\r\n            // });\r\n\r\n            new PJQ.inputs.TextEditorInput({\r\n                el: this.$('.edit-template-name'),\r\n                label: 'Name',\r\n                value: this.model.get('name'),\r\n                onSave: _.bind(function (value) {\r\n                    this.model.patch({\r\n                        name: value\r\n                    });\r\n                }, this)\r\n            });\r\n\r\n            new PJQ.views.schedule.ScheduleDashboard({\r\n                el: this.$('.manage-template'),\r\n                model: this.model\r\n            });\r\n        }\r\n    },\r\n    close: function () {\r\n        if (typeof this.options.onClose === 'function') {\r\n            this.options.onClose(this.model);\r\n        }\r\n    },\r\n    deleteTemplate: function () {\r\n        new PJQ.views.modals.DeleteCancel({\r\n            header: \"Confirm Deletion\",\r\n            body: \"Are you sure you want to delete this template?\",\r\n            onDelete: _.bind(function () {\r\n                if (typeof this.options.onDelete === 'function') {\r\n                    this.options.onDelete(this.model);\r\n                }\r\n                this.removeModal();\r\n            }, this)\r\n        });\r\n    }\r\n});\r\n\r\nPJQ.views.schedule.SaveAsTemplateModal = PJQ.views.BaseModal.extend({\r\n    defaults: {\r\n        template: new PJQ.templating.Template(PJQ.constants.modules.SCHEDULE, 'Modal-Save-As-Template'),\r\n        maxWidth: 500\r\n    },\r\n    events: {\r\n        'click .btn-save': 'save'\r\n    },\r\n    beforeModalCreated: function () {\r\n        this.model = new PJQ.models.schedule.Template({\r\n            projectId: this.options.project.id\r\n        });\r\n\r\n        this.options.project.fetchScheduleTemplates(_.bind(function (tmp) {\r\n            this.templates = tmp;\r\n            this.render();\r\n        }, this));\r\n    },\r\n    renderData: function () {\r\n        return {\r\n            templates: this.templates\r\n        };\r\n    },\r\n    afterRender: function () {\r\n        if (this.templates != null && this.templates.isFetched) {\r\n            new PJQ.inputs.AutocompleteInput({\r\n                el: this.$('.input-template-name'),\r\n                source: _.map(this.templates.models, function (template) {\r\n                    return template.get('name')\r\n                })\r\n            });\r\n        }\r\n    },\r\n    save: function () {\r\n        let $name = this.$('.input-template-name'),\r\n            name = $name.val();\r\n        if (_.size(name.trim()) === 0) {\r\n            PJQ.helpers.inputHelpers.setInputError($name);\r\n            return;\r\n        } else {\r\n            PJQ.helpers.inputHelpers.setInputError($name, true);\r\n        }\r\n\r\n        let existingTemplate = this.templates.findWhere({name: name}),\r\n            fnSave = _.bind(function () {\r\n                this.model.set({\r\n                    name: name,\r\n                    copyAssignees: this.$('.input-copy-assignees').prop('checked'),\r\n                    copyDependencies: this.$('.input-copy-dependencies').prop('checked'),\r\n                    copyComments: this.$('.input-copy-comments').prop('checked'),\r\n                    copyAttachments: this.$('.input-copy-attachments').prop('checked')\r\n                });\r\n                this.model.save(null, {\r\n                    success: _.bind(function () {\r\n                        this.removeModal();\r\n                        PJQ.notifications.notify.successNotify({\r\n                            message: 'Schedule Template Created'\r\n                        });\r\n                    }, this)\r\n                });\r\n            }, this);\r\n        if (existingTemplate != null) {\r\n            new PJQ.views.modals.YesNo({\r\n                header: \"Overwrite Template\",\r\n                body: \"A template already exists with this name.  Would you like to overwrite it?\",\r\n                onYes: _.bind(function () {\r\n                    this.model.set('templateId', existingTemplate.id);\r\n                    fnSave();\r\n                }, this)\r\n            });\r\n        } else {\r\n            fnSave();\r\n        }\r\n    }\r\n});\r\n\r\nPJQ.views.schedule.UploadTemplateModal = PJQ.views.BaseModal.extend({\r\n    defaults: {\r\n        template: new PJQ.templating.Template(PJQ.constants.modules.SCHEDULE, 'Modal-Upload-Template'),\r\n        maxWidth: 500,\r\n        onImport: null,\r\n        weekendWork: true\r\n    },\r\n    events: {\r\n        'change .cb-weekend-work': 'weekendWorkChanged'\r\n    },\r\n    renderData: function () {\r\n        return {\r\n            weekendWork: this.options.weekendWork\r\n        };\r\n    },\r\n    afterRender: function () {\r\n        this.fileUploader = new PJQ.views.files.FileUploaderGrid({\r\n            el: this.$('.template-uploader'),\r\n            allowedExtensions: ['mpp', 'mpx', 'mspdi', 'pp'],\r\n            endpoint: this.makeUploadEndpoint(),\r\n            previewImageDimension: 150,\r\n            onDrop: () => {\r\n                this.$('.import-loading').removeClass('hidden');\r\n                this.$('.btn-close').prop('disabled', true);\r\n            },\r\n            onSuccess: () => {\r\n                if (typeof this.options.onImport === 'function') {\r\n                    this.options.onImport();\r\n                }\r\n                this.removeModal();\r\n            }\r\n        });\r\n    },\r\n    makeUploadEndpoint: function () {\r\n        let params = [{\r\n            parameter: 'weekendWork',\r\n            value: this.options.weekendWork\r\n        }];\r\n        return PJQ.helpers.urlHelpers.generateEndpoint([\r\n            {\r\n                endpoint: 'projects',\r\n                value: this.options.project.id\r\n            },\r\n            {\r\n                endpoint: 'schedule'\r\n            },\r\n            {\r\n                endpoint: 'upload'\r\n            }\r\n        ], params)\r\n    },\r\n    weekendWorkChanged: function (e) {\r\n        this.options.weekendWork = $(e.currentTarget).prop('checked');\r\n        this.fileUploader.options.endpoint = this.makeUploadEndpoint();\r\n    }\r\n});\r\n\r\nPJQ.views.schedule.ImportTemplateModal = PJQ.views.BaseModal.extend({\r\n    defaults: {\r\n        template: new PJQ.templating.Template(PJQ.constants.modules.SCHEDULE, 'Modal-Import-Template'),\r\n        maxWidth: 500,\r\n        onImport: null\r\n    },\r\n    events: {\r\n        'click .btn-import': 'save'\r\n    },\r\n    beforeModalCreated: function () {\r\n        this.options.project.fetchScheduleTemplates(_.bind(function (tmp) {\r\n            this.templates = tmp;\r\n            this.render();\r\n        }, this));\r\n    },\r\n    renderData: function () {\r\n        return {\r\n            templates: this.templates\r\n        };\r\n    },\r\n    afterRender: function () {\r\n        if (this.templates != null && this.templates.isFetched) {\r\n            this.templatePicker = new PJQ.inputs.Selectpicker({\r\n                el: this.$('.select-template'),\r\n                onChange: _.bind(function (value) {\r\n                    this.selectedTemplate = this.templates.get(value);\r\n                }, this),\r\n                isIntChoices: true,\r\n                noneSelectedText: 'Select Template'\r\n            });\r\n\r\n            this.startDate = _.size(this.options.project.get('startDate')) > 0 ? new Date(this.options.project.get('startDate')) : null;\r\n            this.startDatePicker = new PJQ.inputs.Datepicker({\r\n                el: this.$('.input-start-date'),\r\n                datepickerOptions: {\r\n                    format: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE,\r\n                    defaultDate: this.startDate\r\n                },\r\n                onChange: _.bind(function (value) {\r\n                    this.startDate = value;\r\n                }, this)\r\n            });\r\n        }\r\n    },\r\n    save: function () {\r\n        let isValid = true;\r\n        if (this.selectedTemplate == null) {\r\n            this.templatePicker.showError();\r\n            isValid = false;\r\n        } else {\r\n            this.templatePicker.hideError();\r\n        }\r\n\r\n        if (this.startDate == null) {\r\n            this.startDatePicker.showError();\r\n            isValid = false;\r\n        } else {\r\n            this.startDatePicker.hideError();\r\n        }\r\n\r\n        if (!isValid) {\r\n            return;\r\n        }\r\n\r\n        new PJQ.ajax.Request({\r\n            endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\r\n                {\r\n                    endpoint: 'projects',\r\n                    value: this.options.project.id\r\n                },\r\n                {\r\n                    endpoint: 'schedule'\r\n                },\r\n                {\r\n                    endpoint: 'import',\r\n                    value: this.selectedTemplate.id\r\n                }\r\n            ], [\r\n                {\r\n                    parameter: 'start',\r\n                    value: PJQ.helpers.dateHelpers.getDateString(new Date(this.startDate), 'yyyy-MM-dd')\r\n                },\r\n                {\r\n                    parameter: 'importAssignees',\r\n                    value: this.$('.input-import-assignees').prop('checked')\r\n                },\r\n                {\r\n                    parameter: 'importDependencies',\r\n                    value: this.$('.input-import-dependencies').prop('checked')\r\n                },\r\n                {\r\n                    parameter: 'importComments',\r\n                    value: this.$('.input-import-comments').prop('checked')\r\n                }, {\r\n                    parameter: 'importAttachments',\r\n                    value: this.$('.input-import-attachments').prop('checked')\r\n                }\r\n            ])\r\n        }).put().done(_.bind(function (response) {\r\n            if (typeof this.options.onImport === 'function') {\r\n                let result = new PJQ.models.schedule.Schedule(response);\r\n                result.isFetched = true;\r\n                this.options.onImport(result);\r\n            }\r\n            this.removeModal();\r\n            PJQ.notifications.notify.successNotify({\r\n                message: 'Schedule Template Imported'\r\n            });\r\n        }, this));\r\n    }\r\n});"]}