{"version":3,"sources":["1initializers.js","myprojectsviews.js","projectinvitesviews.js","projectlistinputs.js"],"names":["PJQ","app","module","constants","modules","PROJECTLIST","addOldRoutes","route","name","callback","router","navigate","trigger","replace","projectsList","routes","session","project","APP","get","initNavigator","activeItem","view","renderView","views","projects","MyProjectList","addRoutes","MyProjectListDataTable","dataTables","DataTable","extend","defaults","subTemplates","header","templating","Template","language","zeroRecords","onGoToProject","_","noop","onUploadRevision","onChangeReport","onArchive","onDelete","onRecycle","onRestore","settings","events","keyup .datatable-search","click .project-list-clear-filters","change .project-list-favorite-filter","beforeDataTableRender","this","options","scrollRows","preferences","hasPref","preferenceTypes","ENABLE_DATA_TABLE_FIXED_HEADER","canAdd","hasPermission","IS_PROJECT_HOME_READONLY","isAdmin","projectStatusSelectPicker","inputs","Selectpicker","el","$","defaultValue","collection","status","isMultiple","onChange","bind","statusFilterChanged","afterDataTableRender","renderSubTemplate","prop","addContextMenu","actions","iconClass","onClick","isShown","row","data","attributes","masterUserId","isDanger","getFilterData","getFavoriteFilter","filter","models","isFavorite","afterSearch","favoriteFilter","set","save","getStatusFilter","getValue","isSimple","show","hide","loader","Loader","$el","parent","fetch","success","dataTable","clear","rows","add","remove","clearFilters","val","getRowGroup","groupBy","fieldValue","bidsDue","rDueText","helpers","dateHelpers","getDateString","Date","dateFormats","DATE_TIME","user","displayName","user2","projectStatuses","projectStatusId","startDate","DATE","endDate","startsWith","each","customFields","customField","getCustomFieldValue","fieldTypes","undefined","DATETIME","ENABLE_NEW_PROJECT_WALL","NEW_APP_PORTAL","BOOL","CHOICE","choices","choice","find","value","push","join","MONEY","type","parseFloat","formatHelpers","numbersOnly","formatCurrency","parseInt","INT","toLocaleString","BaseView","template","click .btn-new-project","click .btn-edit-project","click .btn-archive-project","click .archive-projects","click .btn-restore-project","click .restore-projects","click .btn-recycle-project","click .btn-delete-project","click .delete-projects","click .btn-favorite-project","click .invite-projects","click .projects-action-cancel","change .select-project","click .projects-action-confirm","click .btn-project-list-settings","beforeFirstRender","_beforeFirstRender","_asyncToGenerator","_regeneratorRuntime","mark","_callee","erpObjects","_this","wrap","_context","prev","next","isFetched","ProjectSettings","fetchProjectCustomFields","collections","Projects","isMyProjects","customFieldIds","getVisibleCustomFieldIds","fetchERPIntegration","erpIntegration","sent","fetchLinkedProjects","t0","obj","internalId","fetchProjectMessageEmailTemplates","fetchProjectStatuses","render","stop","apply","arguments","beforeRender","renderData","isMultipleProjectSelectMode","selectedProjects","afterRender","collapsedGroups","dataTableOptions","headerData","deferRender","colReorder","fixedColumnsLeft","fixedColumnsRight","realtime","orderFixed","columnDefs","orderable","target","columns","getColumns","pageLength","dom","onRowDoubleClick","editProject","uploadRevision","changeReport","archiveProject","deleteProject","recycleProject","restoreProject","column","index","columnData","order","on","columnDef","customFieldId","map","includeAllColumns","length","width","title","projectId","searchable","className","visible","getSelectedProjectIds","isColumnSelected","created","display","dateTemp","addDays","PROJECT_USER_1_LABEL","getPref","PROJECT_USER_2_LABEL","ENABLE_PROJECT_STATUS_ID","st","TEXT","urlHelpers","isURL","foundGroupByColumn","addColumnHelper","notVisible","projectMessageCount","_exObj$data$externalN","_exObj$data","exObj","erp","getERPBadge","externalNumber","projectName","editProjectButton","e","getRow","currentTarget","closest","window","pjqProjectId","id","toString","pjqWallContext","pjqIsNewProject","location","href","accessKey","newProject","endpoint","generateEndpoint","ajax","Request","post","done","fail","archiveProjectButton","archiveText","size","BaseModal","okButtonText","body","isShowCancelButton","onOk","archiveProjectList","ids","parameter","draw","restoreProjectButton","restoreText","restoreProjectList","recycleProjectButton","deleteProjectButton","projectNameString","deleteText","modals","DeleteCancel","recycleProjectList","deleteProjectList","favoriteProject","favoriteProjectList","$favoriteButton","removeClass","addClass","multipleProjectActionInitialize","sender","text","multipleProjectMode","invalidate","refresh","multipleProjectSelection","sp","multipleProjectActionConfirm","actionText","multipleProjectActionCancel","projectInvites","MyProjectListSettingsModal","onSave","ProjectInvitesModal","emailTemplates","projectMessage","onSend","onClose","files","RawFileUploaderModal","downloadFile","NewProjectModal","minWidth","keyup .input-project-name","click .btn-save-project","beforeModalCreated","model","Project","focus","projectNameChanged","projectNameBlank","keyCode","removeModal","click .settings-close","click .settings-save","change .select-column","append","isHideSearch","col","columnSelected","ProjectInviteListDataTable","click .project-invites-list-clear-filters","change .project-invites-list-favorite-filter","favoriteFilterChanged","setFavoriteFilter","ProjectInvitesList","click .btn-join-directory","click .btn-go-to-project","click .btn-delete-project-invite","isProjectInvites","includeColumnsDefault","includeColumns","BiddingProjectsList","BIDDING_PROJECTS_INCLUDE_COLUMNS","split","columnName","html","contextMenuOptions","goToProject","deleteProjectInvite","orderCookie","cookies","PROJECT_INVITES_ORDER_COOKIE","ProjectInvitesSettings","deleteProjectInviteClicked","delete","cid","removeRow","notifications","notify","successNotify","message","joinDirectory","goToProjectClicked","contact","BIDDING_PROJECTS_REQUIRE_APPROVAL","needsApproval","isBidding","_PJQ$views$projects$P","prototype","call","concat","Array","slice","SelectpickerProjectMessageSendOptions","event","clickedIndex","lastValue","setValue","exclusiveChoices","attr","objectHelpers","refinedType","indexOf","union","item","isMirrorOptionColors","setInputColors"],"mappings":"m6NAAAA,IAAAC,IAAAC,SAAAF,IAAAG,UAAAC,QAAAC,aACAL,IAAAC,IAAAK,aAAA,CACA,CACAC,MAAA,GACAC,KAAA,UACAC,SAAA,WACAT,IAAAC,IAAAS,OAAAC,SAAA,WAAA,CACAC,SAAA,EACAC,SAAA,QAOAb,IAAAI,QAAAU,aAAA,CACAC,OAAA,CACA,CACAR,MAAA,WACAC,KAAA,WACAC,SAAA,WACAT,IAAAC,IAAAe,QAAAC,QAAA,KACAjB,IAAAC,IAAAC,SAAAF,IAAAG,UAAAC,QAAAc,IACAlB,IAAAC,IAAAe,QAAAG,IAAA,cACAnB,IAAAC,IAAAmB,cAAA,CACAC,WAAA,eAIArB,IAAAC,IAAAmB,gBAIApB,IAAAC,IAAAqB,KAAAC,WAAAvB,IAAAwB,MAAAC,SAAAC,iBAIA,CACAnB,MAAA,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A,WACA3E,IAAAC,IAAAS,OAAAC,SAAA,YAAAM,EAAAiR,GAAAC,WAAA,CACAvR,SAAA,KAEA0C,UCvoBAtD,IAAAkE,OAAAgW,sCAAAla,IAAAkE,OAAAC,aAAApC,OAAA,CACA2C,SAAA,SAAAyV,EAAAC,GAGA,GAFA9W,KAAA+W,UAAA/W,KAAA8C,WAEA,IAAA5D,EAAA2Q,KAAA7P,KAAA+W,WACA/W,KAAAgX,SAAA,CAAA,WACA,GAAAhX,KAAAC,QAAAkB,YAAA,EAAAjC,EAAA2Q,KAAA7P,KAAAC,QAAAgX,kBAAA,CACA,IAAAA,EAAA,GACAlR,EAAAhF,EAAAf,KAAAoD,IAAA4C,KAAA,UAAA8Q,IAAAI,KAAA,SACA,UAAAxa,IAAA0H,QAAA+S,cAAAC,YAAApX,KAAAC,QAAAgX,kBACAA,EAAAjX,KAAAC,QAAAgX,iBAEAA,EAAA/Q,KAAAlG,KAAAC,QAAAgX,kBAEAjX,KAAA+W,WAAA,IAAA7X,EAAAmY,QAAAJ,EAAAlR,GAAA,CAAA,IAAAA,GAAA7G,EAAAoY,MAAA,CAAA,KAAApY,EAAAoD,OAAAtC,KAAA+W,UAAA,SAAAQ,GACA,OAAA,IAAArY,EAAAmY,QAAAJ,EAAAM,MAGAvX,KAAAgX,SAAAhX,KAAA+W,WAEA/W,KAAAC,QAAAuX,uBAAAxX,KAAAC,QAAAkB,YACAnB,KAAAyX,iBAGAzX,KAAAC,QAAAmB,SAAApB,KAAA+W","file":"app.js","sourcesContent":["if (PJQ.app.module === PJQ.constants.modules.PROJECTLIST) {\n\tPJQ.app.addOldRoutes([\n\t\t{\n\t\t\troute: '',\n\t\t\tname: 'default',\n\t\t\tcallback: function () {\n\t\t\t\tPJQ.app.router.navigate('projects', {\n\t\t\t\t\ttrigger: true,\n\t\t\t\t\treplace: true\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t]);\n}\n\nPJQ.modules.projectsList = {\n\troutes: [\n\t\t{\n\t\t\troute: 'projects',\n\t\t\tname: 'projects',\n\t\t\tcallback: function () {\n\t\t\t\tPJQ.app.session.project = null;\n\t\t\t\tif (PJQ.app.module === PJQ.constants.modules.APP) {\n\t\t\t\t\tif (PJQ.app.session.get('ownsPortal')) {\n\t\t\t\t\t\tPJQ.app.initNavigator({\n\t\t\t\t\t\t\tactiveItem: \"myprojects\"\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tPJQ.app.initNavigator();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tPJQ.app.view.renderView(PJQ.views.projects.MyProjectList);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\troute: 'myprojects',\n\t\t\tname: 'myprojects',\n\t\t\tcallback: function () {\n\t\t\t\tPJQ.app.session.project = null;\n\t\t\t\tPJQ.app.initNavigator({\n\t\t\t\t\tactiveItem: \"myprojects\"\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\troute: 'projectinvites',\n\t\t\tname: 'projectinvites',\n\t\t\tcallback: function () {\n\t\t\t\tPJQ.app.session.project = null;\n\t\t\t\tPJQ.app.initNavigator({\n\t\t\t\t\tactiveItem: \"projectinvites\"\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\troute: 'biddingprojects',\n\t\t\tname: 'biddingprojects',\n\t\t\tcallback: function () {\n\t\t\t\tPJQ.app.session.project = null;\n\t\t\t\tPJQ.app.initNavigator({\n\t\t\t\t\tactiveItem: \"biddingprojects\"\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t]\n};\n\nPJQ.app.addRoutes(PJQ.modules.projectsList.routes);","PJQ.views.projects.MyProjectListDataTable = PJQ.views.dataTables.DataTable.extend({\n\tdefaults: {\n\t\tsubTemplates: {\n\t\t\theader: new PJQ.templating.Template(PJQ.constants.modules.PROJECTLIST, 'Data-Table-Header-Project-List')\n\t\t},\n\t\tlanguage: {\n\t\t\tzeroRecords: \"You haven't created any projects yet\"\n\t\t},\n\t\tonGoToProject: _.noop,\n\t\tonUploadRevision: _.noop,\n\t\tonChangeReport: _.noop,\n\t\tonArchive: _.noop,\n\t\tonDelete: _.noop,\n\t\tonRecycle: _.noop,\n\t\tonRestore: _.noop,\n\t\tsettings: null\n\t},\n\tevents: {\n\t\t'keyup .datatable-search': 'search',\n\t\t'click .project-list-clear-filters': 'clearFilters',\n\t\t'change .project-list-favorite-filter': 'favoriteFilter'\n\t},\n\tbeforeDataTableRender: function () {\n\t\tthis.options.scrollRows = PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.ENABLE_DATA_TABLE_FIXED_HEADER);\n\n\t\tthis.options.canAdd = PJQ.app.session.hasPermission('projects.canAdd') && !PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.IS_PROJECT_HOME_READONLY);\n\t\tthis.options.isAdmin = PJQ.app.session.hasPermission('projects.isAdmin');\n\n\t\tif (this.options.isAdmin) {\n\t\t\tthis.projectStatusSelectPicker = new PJQ.inputs.Selectpicker({\n\t\t\t\tel: this.$('select.project-list-status-filter'),\n\t\t\t\tdefaultValue: this.options.collection.options.status != null ? this.options.collection.options.status : 'ready',\n\t\t\t\tisMultiple: false,\n\t\t\t\tonChange: _.bind(function () {\n\t\t\t\t\tthis.statusFilterChanged();\n\t\t\t\t}, this)\n\t\t\t});\n\t\t}\n\t},\n\tafterDataTableRender: function () {\n\t\tthis.renderSubTemplate(false, new PJQ.templating.Template(PJQ.constants.modules.PROJECTLIST, 'Project-Commands'), this.$('div.project-list-buttons'), {\n\t\t\tcanAdd: this.options.canAdd,\n\t\t\tisAdmin: this.options.isAdmin\n\t\t});\n\t\tthis.$('input.project-list-favorite-filter').prop('checked', this.options.settings.get('isFavoriteFilter'));\n\n\t\tthis.addContextMenu({\n\t\t\tactions: [\n\t\t\t\t{\n\t\t\t\t\tname: 'Go to Project',\n\t\t\t\t\ticonClass: 'fal fa-arrow-alt-from-left',\n\t\t\t\t\tonClick: _.bind(this.options.onGoToProject, this),\n\t\t\t\t\tisShown: _.bind(function (row) {\n\t\t\t\t\t\tlet project = row.data();\n\t\t\t\t\t\treturn (project.attributes.status === 'READY' || project.attributes.status === 'BUSY' || project.attributes.status === 'HIDDEN' || project.attributes.status === 'ARCHIVE');\n\t\t\t\t\t}, this)\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'Upload Revision',\n\t\t\t\t\ticonClass: 'fal fa-cloud-upload',\n\t\t\t\t\tonClick: _.bind(this.options.onUploadRevision, this),\n\t\t\t\t\tisShown: _.bind(function (row) {\n\t\t\t\t\t\tlet project = row.data();\n\t\t\t\t\t\treturn this.options.isAdmin && (PJQ.app.session.get('masterUserId') === project.attributes.masterUserId) && (project.attributes.status === 'READY' || project.attributes.status === 'BUSY' || project.attributes.status === 'HIDDEN');\n\t\t\t\t\t}, this)\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'Change Report',\n\t\t\t\t\ticonClass: 'fal fa-file',\n\t\t\t\t\tonClick: _.bind(this.options.onChangeReport, this),\n\t\t\t\t\tisShown: _.bind(function (row) {\n\t\t\t\t\t\tlet project = row.data();\n\t\t\t\t\t\treturn this.options.isAdmin && (PJQ.app.session.get('masterUserId') === project.attributes.masterUserId) && (project.attributes.status === 'READY' || project.attributes.status === 'BUSY' || project.attributes.status === 'HIDDEN' || project.attributes.status === 'ARCHIVE');\n\t\t\t\t\t}, this)\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'Archive',\n\t\t\t\t\ticonClass: 'fal fa-archive',\n\t\t\t\t\tonClick: _.bind(this.options.onArchive, this),\n\t\t\t\t\tisShown: _.bind(function (row) {\n\t\t\t\t\t\tlet project = row.data();\n\t\t\t\t\t\treturn this.options.isAdmin && (PJQ.app.session.get('masterUserId') === project.attributes.masterUserId) && (project.attributes.status === 'READY' || project.attributes.status === 'BUSY' || project.attributes.status === 'HIDDEN');\n\t\t\t\t\t}, this)\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'Restore',\n\t\t\t\t\ticonClass: 'fal fa-redo',\n\t\t\t\t\tonClick: _.bind(this.options.onRestore, this),\n\t\t\t\t\tisShown: _.bind(function (row) {\n\t\t\t\t\t\tlet project = row.data();\n\t\t\t\t\t\treturn this.options.isAdmin && (PJQ.app.session.get('masterUserId') === project.attributes.masterUserId) && (project.attributes.status === 'ARCHIVE' || project.attributes.status === 'DELETED');\n\t\t\t\t\t}, this)\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'Recycle Bin',\n\t\t\t\t\ticonClass: 'fal fa-trash',\n\t\t\t\t\tisDanger: true,\n\t\t\t\t\tonClick: _.bind(this.options.onRecycle, this),\n\t\t\t\t\tisShown: _.bind(function (row) {\n\t\t\t\t\t\tlet project = row.data();\n\t\t\t\t\t\treturn this.options.isAdmin && (PJQ.app.session.get('masterUserId') === project.attributes.masterUserId) && (project.attributes.status === 'READY' || project.attributes.status === 'BUSY' || project.attributes.status === 'HIDDEN' || project.attributes.status === 'ARCHIVE');\n\t\t\t\t\t}, this)\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'Delete',\n\t\t\t\t\ticonClass: 'fal fa-trash',\n\t\t\t\t\tisDanger: true,\n\t\t\t\t\tonClick: _.bind(this.options.onDelete, this),\n\t\t\t\t\tisShown: _.bind(function (row) {\n\t\t\t\t\t\tlet project = row.data();\n\t\t\t\t\t\treturn this.options.isAdmin && (PJQ.app.session.get('masterUserId') === project.attributes.masterUserId) && (project.attributes.status === 'DELETED');\n\t\t\t\t\t}, this)\n\t\t\t\t}\n\t\t\t]\n\t\t});\n\t},\n\tgetFilterData: function () {\n\t\tif (!this.getFavoriteFilter()) {\n\t\t\treturn this.options.collection.models;\n\t\t}\n\n\t\treturn _.filter(this.options.collection.models, function (row) {\n\t\t\treturn row.attributes.isFavorite;\n\t\t}, this);\n\t},\n\tafterSearch: function () {\n\t\t//this.$('.project-selector-clear-filters').prop('disabled', _.size(this.$('input.datatable-search').val()) === 0 && _.size(this.projectStatusFilter) === 0);\n\t},\n\tfavoriteFilter: function () {\n\t\tthis.options.settings.set('isFavoriteFilter', this.$('input.project-list-favorite-filter').prop('checked'));\n\t\tthis.options.settings.save();\n\t\tthis.filter();\n\t},\n\tgetFavoriteFilter: function () {\n\t\treturn this.options.settings.get('isFavoriteFilter'); //this.$('input.project-list-favorite-filter').prop('checked');\n\t},\n\tgetStatusFilter: function () {\n\t\treturn this.projectStatusSelectPicker.getValue();\n\t},\n\tstatusFilterChanged: function () {\n\t\tthis.options.collection.options.isSimple = false;\n\t\tthis.options.collection.options.status = this.getStatusFilter();\n\n\t\tif (this.options.collection.options.status === 'ready') {\n\t\t\tthis.$('a.archive-projects').show();\n\t\t\tthis.$('a.restore-projects').hide();\n\t\t}\n\t\telse {\n\t\t\tthis.$('a.archive-projects').hide();\n\t\t\tthis.$('a.restore-projects').show();\n\t\t}\n\n\t\tlet loader = new PJQ.Loader(this.$el.parent());\n\t\tthis.options.collection.fetch({\n\t\t\tsuccess: _.bind(function () {\n\t\t\t\tthis.dataTable.clear();\n\t\t\t\tthis.dataTable.rows.add(this.collection.models);\n\t\t\t\tthis.filter();\n\t\t\t\t//this.dataTable.draw();\n\t\t\t\tloader.remove();\n\t\t\t}, this)\n\t\t});\n\t},\n\tclearFilters: function () {\n\t\tthis.$('input.datatable-search').val('');\n\t\tthis.$('input.project-list-favorite-filter').prop('checked', false);\n\t\tthis.options.settings.set('isFavoriteFilter', false);\n\t\tthis.options.settings.save();\n\n\t\tthis.filter();\n\t},\n\tgetRowGroup: function (row, groupBy) {\n\t\tif (groupBy === null)\n\t\t\treturn null;\n\n\t\tlet fieldValue = row.get(groupBy);\n\t\tif (groupBy === 'bidsDue') {\n\t\t\tif (row.attributes.bidsDue == null)\n\t\t\t\tfieldValue = \"N/A\";\n\t\t\telse if (row.attributes.rDueText === 'ASAP')\n\t\t\t\tfieldValue = row.attributes.rDueText;\n\t\t\telse\n\t\t\t\tfieldValue = PJQ.helpers.dateHelpers.getDateString(new Date(row.attributes.bidsDue), PJQ.helpers.dateHelpers.dateFormats.DATE_TIME);\n\t\t}\n\t\telse if (groupBy === 'userDisplayName') {\n\t\t\tfieldValue = (row.attributes.user && row.attributes.user.displayName) ? row.attributes.user.displayName : '';\n\t\t}\n\t\telse if (groupBy === 'user2DisplayName') {\n\t\t\tfieldValue = (row.attributes.user2 && row.attributes.user2.displayName) ? row.attributes.user2.displayName : '';\n\t\t}\n\t\telse if (groupBy === 'projectStatusId') {\n\t\t\tfieldValue = PJQ.app.session.projectStatuses.get(row.attributes.projectStatusId).get('name');\n\t\t}\n\t\telse if (groupBy === 'startDate') {\n\t\t\tfieldValue = row.attributes.startDate ? PJQ.helpers.dateHelpers.getDateString(new Date(row.attributes.startDate), PJQ.helpers.dateHelpers.dateFormats.DATE, true) : 'N/A';\n\t\t}\n\t\telse if (groupBy === 'endDate') {\n\t\t\tfieldValue = row.attributes.endDate ? PJQ.helpers.dateHelpers.getDateString(new Date(row.attributes.endDate), PJQ.helpers.dateHelpers.dateFormats.DATE, true) : 'N/A';\n\t\t}\n\t\telse if (groupBy.startsWith('fieldValue')) {\n\t\t\t_.each(PJQ.app.session.customFields.project[PJQ.app.session.get(\"masterUserId\")].models, _.bind(function (customField) {\n\t\t\t\t// todo: only show the ones the user wants to.\n\t\t\t\tif (groupBy === 'fieldValue' + customField.get('fieldNumber')) {\n\t\t\t\t\tfieldValue = row.getCustomFieldValue(customField.get('id'));\n\t\t\t\t\tfieldValue = fieldValue ? fieldValue : '';\n\t\t\t\t\tswitch (customField.get('fieldType')) {\n\t\t\t\t\t\tcase PJQ.constants.customFields.fieldTypes.DATE:\n\t\t\t\t\t\t\tif (fieldValue) {\n\t\t\t\t\t\t\t\tfieldValue = PJQ.helpers.dateHelpers.getDateString(new Date(fieldValue), PJQ.helpers.dateHelpers.dateFormats.DATE, true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (fieldValue === undefined)\n\t\t\t\t\t\t\t\tfieldValue = '';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase PJQ.constants.customFields.fieldTypes.DATETIME:\n\t\t\t\t\t\t\tif (fieldValue) {\n\t\t\t\t\t\t\t\tfieldValue = PJQ.helpers.dateHelpers.getDateString(new Date(fieldValue), PJQ.helpers.dateHelpers.dateFormats.DATE_TIME, !PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.ENABLE_NEW_PROJECT_WALL) && !PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.NEW_APP_PORTAL));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (fieldValue === undefined)\n\t\t\t\t\t\t\t\tfieldValue = '';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase PJQ.constants.customFields.fieldTypes.BOOL:\n\t\t\t\t\t\t\tif (fieldValue != null)\n\t\t\t\t\t\t\t\tfieldValue = fieldValue ? 'Yes' : 'No';\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tfieldValue = '';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase PJQ.constants.customFields.fieldTypes.CHOICE:\n\t\t\t\t\t\t\tif (fieldValue) {\n\t\t\t\t\t\t\t\tlet choices = [];\n\n\t\t\t\t\t\t\t\t// convert single choice value into array so that the logic below can work for both types.\n\t\t\t\t\t\t\t\tif (typeof fieldValue === 'number')\n\t\t\t\t\t\t\t\t\tfieldValue = [fieldValue];\n\n\t\t\t\t\t\t\t\t_.each(customField.choices.models, _.bind(function (choice) {\n\t\t\t\t\t\t\t\t\tif (_.find(fieldValue, function (value) {\n\t\t\t\t\t\t\t\t\t\treturn value === choice.get('id');\n\t\t\t\t\t\t\t\t\t}))\n\t\t\t\t\t\t\t\t\t\tchoices.push(choice.get('choiceName'));\n\t\t\t\t\t\t\t\t}, this));\n\n\t\t\t\t\t\t\t\tfieldValue = choices.join((', '));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase PJQ.constants.customFields.fieldTypes.MONEY:\n\t\t\t\t\t\t\tif (type === 'sort' || type === 'type') {\n\t\t\t\t\t\t\t\tif (fieldValue && fieldValue !== '$')\n\t\t\t\t\t\t\t\t\tfieldValue = parseFloat(PJQ.helpers.formatHelpers.numbersOnly(fieldValue, true));\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tfieldValue = 0;\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tfieldValue = PJQ.helpers.formatHelpers.formatCurrency(parseInt(PJQ.helpers.formatHelpers.numbersOnly(fieldValue)));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase PJQ.constants.customFields.fieldTypes.INT:\n\t\t\t\t\t\t\tif (type !== 'sort' && type !== 'type' && fieldValue) {\n\t\t\t\t\t\t\t\tfieldValue = parseInt(fieldValue).toLocaleString();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, this));\n\t\t}\n\t\treturn fieldValue ? fieldValue : 'N/A';\n\t},\n\n});\n\nPJQ.views.projects.MyProjectList = PJQ.views.BaseView.extend({\n\tdefaults: {\n\t\ttemplate: new PJQ.templating.Template(PJQ.constants.modules.PROJECTLIST, 'Project-List')\n\t},\n\tevents: {\n\t\t'click .btn-new-project': 'newProject',\n\t\t'click .btn-edit-project': 'editProjectButton',\n\t\t'click .btn-archive-project': 'archiveProjectButton',\n\t\t'click .archive-projects': 'multipleProjectActionInitialize',\n\t\t'click .btn-restore-project': 'restoreProjectButton',\n\t\t'click .restore-projects': 'multipleProjectActionInitialize',\n\t\t'click .btn-recycle-project': 'recycleProjectButton',\n\t\t'click .btn-delete-project': 'deleteProjectButton',\n\t\t'click .delete-projects': 'multipleProjectActionInitialize',\n\t\t'click .btn-favorite-project': 'favoriteProject',\n\t\t'click .invite-projects': 'multipleProjectActionInitialize',\n\t\t'click .projects-action-cancel': 'multipleProjectActionCancel',\n\t\t'change .select-project': 'multipleProjectSelection',\n\t\t'click .projects-action-confirm': 'multipleProjectActionConfirm',\n\t\t'click .btn-project-list-settings': 'settings'\n\t},\n\tbeforeFirstRender: async function () {\n\t\tthis.isFetched = false;\n\n\t\tthis.options.canAdd = PJQ.app.session.hasPermission('projects.canAdd');\n\t\tthis.options.isAdmin = PJQ.app.session.hasPermission('projects.isAdmin');\n\n\t\tthis.settings = new PJQ.models.projects.ProjectSettings();\n\t\tawait this.settings.fetch();\n\n\t\tawait PJQ.app.session.fetchProjectCustomFields(PJQ.app.session.get(\"masterUserId\"));\n\n\t\tthis.collection = new PJQ.collections.projects.Projects(null, {\n\t\t\tisSimple: false,\n\t\t\tstatus: 'ready',\n\t\t\tisMyProjects: true,\n\t\t\tcustomFieldIds: this.getVisibleCustomFieldIds()\n\t\t});\n\t\tawait this.collection.fetch();\n\n\t\tthis.erpIntegration = await PJQ.app.session.fetchERPIntegration();\n\t\tif (this.erpIntegration != null) {\n\t\t\tlet erpObjects;\n\t\t\ttry {\n\t\t\t\terpObjects = await this.erpIntegration.fetchLinkedProjects();\n\t\t\t} catch {\n\t\t\t\terpObjects = null;\n\t\t\t}\n\t\t\tif (erpObjects != null) {\n\t\t\t\t_.each(erpObjects, (obj) => {\n\t\t\t\t\tlet project = this.collection.get(obj.internalId);\n\t\t\t\t\tif (project != null) {\n\t\t\t\t\t\tproject.set('externalObject', obj);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tawait PJQ.app.session.fetchProjectMessageEmailTemplates();\n\t\tawait PJQ.app.session.fetchProjectStatuses();\n\n\t\tthis.isFetched = true;\n\t\tthis.render();\n\t},\n\tbeforeRender: function () {\n\t\tthis.renderData = {\n\t\t\tisFetched: this.isFetched\n\t\t};\n\t\tthis.isMultipleProjectSelectMode = false;\n\t\tthis.selectedProjects = [];\n\t},\n\tafterRender: function () {\n\t\tif (!this.isFetched) {\n\t\t\tthis.loader = new PJQ.Loader(this.$el);\n\t\t}\n\t\telse {\n\t\t\tif (this.loader) {\n\t\t\t\tthis.loader.remove();\n\t\t\t\tthis.loader = null;\n\t\t\t}\n\n\t\t\tthis.collapsedGroups = [];\n\n\t\t\tlet dataTableOptions = {\n\t\t\t\tsubTemplates: {\n\t\t\t\t\theader: new PJQ.templating.Template(PJQ.constants.modules.PROJECTLIST, 'Data-Table-Header-Project-List')\n\t\t\t\t},\n\t\t\t\theaderData: {\n\t\t\t\t\tisAdmin: this.options.isAdmin\n\t\t\t\t},\n\t\t\t\tel: this.$('.project-list'),\n\t\t\t\tcollection: this.collection,\n\t\t\t\tdata: this.collection.models,\n\t\t\t\tdeferRender: true,\n\t\t\t\tcolReorder: {\n\t\t\t\t\tfixedColumnsLeft: 2,\n\t\t\t\t\tfixedColumnsRight: 1,\n\t\t\t\t\trealtime: false\n\t\t\t\t},\n\t\t\t\torderFixed: [[0, 'desc']],\n\t\t\t\tcolumnDefs: [{orderable: false, target: 0}],\n\t\t\t\tcolumns: this.getColumns(false),\n\t\t\t\tcustomFieldIds: this.getVisibleCustomFieldIds(),\n\t\t\t\tpageLength: this.settings.get('rowsPerPage'),\n\t\t\t\tdom: '<\"top\"<\"project-list-buttons\"><\"project-list-buttons-right\">p>rt<\"bottom\"p<\"clear\">>',\n\t\t\t\tonRowDoubleClick: _.bind(function (row) {\n\t\t\t\t\tif (this.collection.options.status === 'ready' || this.collection.options.status === 'archive')\n\t\t\t\t\t\tthis.editProject(row.data());\n\t\t\t\t}, this),\n\t\t\t\tonGoToProject: _.bind(function (row) {\n\t\t\t\t\tthis.editProject(row.data());\n\t\t\t\t}, this),\n\t\t\t\tonUploadRevision: _.bind(function (row) {\n\t\t\t\t\tthis.uploadRevision(row.data());\n\t\t\t\t}, this),\n\t\t\t\tonChangeReport: _.bind(function (row) {\n\t\t\t\t\tthis.changeReport(row.data());\n\t\t\t\t}, this),\n\t\t\t\tonArchive: _.bind(function (row) {\n\t\t\t\t\tthis.archiveProject(row.data());\n\t\t\t\t}, this),\n\t\t\t\tonDelete: _.bind(function (row) {\n\t\t\t\t\tthis.deleteProject(row.data());\n\t\t\t\t}, this),\n\t\t\t\tonRecycle: _.bind(function (row) {\n\t\t\t\t\tthis.recycleProject(row.data());\n\t\t\t\t}, this),\n\t\t\t\tonRestore: _.bind(function (row) {\n\t\t\t\t\tthis.restoreProject(row.data());\n\t\t\t\t}, this),\n\t\t\t\tsettings: this.settings,\n\t\t\t\tcollapsedGroups: this.collapsedGroups\n\t\t\t};\n\n\t\t\tif (this.settings.get('groupBy')) {\n\t\t\t\t_.each(this.getColumns(false), _.bind(function (column, index) {\n\t\t\t\t\tif (column.columnData === this.settings.get('groupBy'))\n\t\t\t\t\t\tdataTableOptions.orderFixed.push([index, 'asc']);\n\t\t\t\t}, this));\n\n\t\t\t\tdataTableOptions.groupBy = this.settings.get('groupBy');\n\t\t\t}\n\n\t\t\tif (this.settings.get('orderBy')) {\n\t\t\t\t_.each(this.getColumns(false), _.bind(function (column, index) {\n\t\t\t\t\tif (column.columnData === this.settings.get('orderBy'))\n\t\t\t\t\t\tdataTableOptions.order = [[0,'desc'],[index, this.settings.get('orderAscending') ? 'asc' : 'desc']];\n\t\t\t\t}, this));\n\t\t\t}\n\n\t\t\tthis.dataTable = new PJQ.views.projects.MyProjectListDataTable(dataTableOptions);\n\t\t\tthis.dataTable.$el.on('draw.dt', _.bind(function () {\n\t\t\t\tthis.$('.btn-edit-project, .btn-archive-project, .btn-restore-project, .btn-delete-project, .btn-recycle-project').prop('disabled', this.isMultipleProjectSelectMode);\n\t\t\t}, this));\n\t\t}\n\t},\n\tgetVisibleCustomFieldIds: function () {\n\t\tlet customFieldIds = _.filter(this.getColumns(false), function (columnDef) {\n\t\t\treturn (columnDef.customFieldId);\n\t\t});\n\n\t\tcustomFieldIds = _.map(customFieldIds, function (columnDef) {\n\t\t\treturn columnDef.customFieldId;\n\t\t});\n\n\t\treturn customFieldIds;\n\t},\n\tgetColumns: function (includeAllColumns = false) {\n\t\tlet columns = [];\n\n\t\t// favorites column\n\t\tif (!includeAllColumns) {\n\t\t\tcolumns.push({\n\t\t\t\t\"width\": \"15px\",\n\t\t\t\t\"columnData\": 'isFavorite',\n\t\t\t\t\"title\": '',\n\t\t\t\t\"render\": function (data, type, row) {\n\t\t\t\t\tif (type === 'sort' || type === 'type')\n\t\t\t\t\t\treturn row.attributes.isFavorite;\n\t\t\t\t\treturn row.attributes.isFavorite ? '' : '';\n\t\t\t\t},\n\t\t\t\t\"orderable\": false,\n\t\t\t\t\"searchable\": false,\n\t\t\t\t\"className\": \"text-center\",\n\t\t\t\t\"visible\": true\n\t\t\t});\n\n\t\t\t// multi project select checkbox\n\t\t\tcolumns.push({\n\t\t\t\t\"width\": \"15px\",\n\t\t\t\t\"columnData\": '',\n\t\t\t\t\"data\": \"attributes.projectId\",\n\t\t\t\t\"title\": \"\",\n\t\t\t\t\"orderable\": false,\n\t\t\t\t\"searchable\": false,\n\t\t\t\t\"render\": _.bind(function (data, type, row) {\n\t\t\t\t\tlet isSelected = false;\n\t\t\t\t\tisSelected = _.find(this.getSelectedProjectIds(), function (projectId) {\n\t\t\t\t\t\treturn projectId === data;\n\t\t\t\t\t}) != null;\n\n\t\t\t\t\tlet isDisabled = (PJQ.app.session.get('masterUserId') !== row.attributes.masterUserId);\n\n\t\t\t\t\treturn ('
');\n\t\t\t\t}, this),\n\t\t\t\t\"visible\": false\n\t\t\t});\n\t\t}\n\n\t\t// core fields\n\t\tif (includeAllColumns) {\n\t\t\tcolumns.push({\n\t\t\t\t\"width\": \"15px\",\n\t\t\t\t\"columnData\": \"icons\",\n\t\t\t\t\"data\": null,\n\t\t\t\t\"title\": \"Icons\",\n\t\t\t\t\"visible\": this.settings.isColumnSelected(\"icons\"),\n\t\t\t\t\"orderable\": false\n\t\t\t});\n\n\t\t\tif (this.erpIntegration != null) {\n\t\t\t\tcolumns.push({\n\t\t\t\t\t\"width\": \"15px\",\n\t\t\t\t\t\"columnData\": \"erpObject\",\n\t\t\t\t\t\"data\": null,\n\t\t\t\t\t\"title\": \"ERP Status\",\n\t\t\t\t\t\"visible\": this.settings.isColumnSelected(\"erpObject\"),\n\t\t\t\t\t\"orderable\": false\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tcolumns.push({\n\t\t\t\t\"columnData\": \"projectId\",\n\t\t\t\t\"data\": \"attributes.projectId\",\n\t\t\t\t\"title\": \"Project Id\",\n\t\t\t\t\"visible\": this.settings.isColumnSelected(\"projectId\")\n\t\t\t});\n\t\t\tcolumns.push({\n\t\t\t\t\"columnData\": \"projectName\",\n\t\t\t\t\"data\": \"attributes.projectName\",\n\t\t\t\t\"title\": \"Name\",\n\t\t\t\t\"visible\": this.settings.isColumnSelected(\"projectName\")\n\t\t\t});\n\t\t\tcolumns.push({\n\t\t\t\t\"columnData\": \"address1\",\n\t\t\t\t\"data\": \"attributes.address1\",\n\t\t\t\t\"title\": \"Address 1\",\n\t\t\t\t\"visible\": this.settings.isColumnSelected(\"address1\")\n\t\t\t});\n\t\t\tcolumns.push({\n\t\t\t\t\"columnData\": \"address2\",\n\t\t\t\t\"data\": \"attributes.address2\",\n\t\t\t\t\"title\": \"Address 2\",\n\t\t\t\t\"visible\": this.settings.isColumnSelected(\"address2\")\n\t\t\t});\n\t\t\tcolumns.push({\n\t\t\t\t\"columnData\": \"city\",\n\t\t\t\t\"data\": \"attributes.city\",\n\t\t\t\t\"title\": \"City\",\n\t\t\t\t\"visible\": this.settings.isColumnSelected(\"city\")\n\t\t\t});\n\t\t\tcolumns.push({\n\t\t\t\t\"columnData\": \"state\",\n\t\t\t\t\"data\": \"attributes.state\",\n\t\t\t\t\"title\": \"State\",\n\t\t\t\t\"visible\": this.settings.isColumnSelected(\"state\")\n\t\t\t});\n\t\t\tcolumns.push({\n\t\t\t\t\"columnData\": \"zip\",\n\t\t\t\t\"data\": \"attributes.zip\",\n\t\t\t\t\"title\": \"Zip\",\n\t\t\t\t\"visible\": this.settings.isColumnSelected(\"zip\")\n\t\t\t});\n\t\t\tcolumns.push({\n\t\t\t\t\"columnData\": \"created\",\n\t\t\t\t\"data\": {\n\t\t\t\t\t\"_\": function (row) {\n\t\t\t\t\t\treturn new Date(row.attributes.created);\n\t\t\t\t\t},\n\t\t\t\t\t\"filter\": \"attributes.created\",\n\t\t\t\t\t\"display\": function (row) {\n\t\t\t\t\t\treturn PJQ.helpers.dateHelpers.getDateString(new Date(row.attributes.created), PJQ.helpers.dateHelpers.dateFormats.DATE_TIME, true);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"title\": \"Created\",\n\t\t\t\t\"visible\": this.settings.isColumnSelected(\"created\")\n\t\t\t});\n\t\t\tcolumns.push({\n\t\t\t\t\"columnData\": 'bidsDue',\n\t\t\t\t\"data\": {\n\t\t\t\t\t\"_\": function (row) {\n\n\t\t\t\t\t\tlet dateTemp = new Date();\n\t\t\t\t\t\tif (row.attributes.bidsDue == null)\n\t\t\t\t\t\t\treturn dateTemp.addDays(-20000);\n\t\t\t\t\t\tif (row.attributes.rDueText === 'ASAP')\n\t\t\t\t\t\t\treturn dateTemp.addDays(-10000);\n\n\t\t\t\t\t\treturn new Date(row.attributes.bidsDue);\n\t\t\t\t\t},\n\t\t\t\t\t\"filter\": \"attributes.bidsDue\",\n\t\t\t\t\t\"display\": function (row) {\n\t\t\t\t\t\tif (row.attributes.bidsDue == null)\n\t\t\t\t\t\t\treturn \"N/A\";\n\t\t\t\t\t\tif (row.attributes.rDueText === 'ASAP')\n\t\t\t\t\t\t\treturn row.attributes.rDueText;\n\n\t\t\t\t\t\treturn PJQ.helpers.dateHelpers.getDateString(new Date(row.attributes.bidsDue), PJQ.helpers.dateHelpers.dateFormats.DATE_TIME);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"title\": \"Bids Due\",\n\t\t\t\t\"visible\": this.settings.isColumnSelected(\"bidsDue\")\n\t\t\t});\n\n\t\t\tcolumns.push({\n\t\t\t\t\"columnData\": 'userDisplayName',\n\t\t\t\t\"data\": {\n\t\t\t\t\t\"_\": function (row) {\n\t\t\t\t\t\treturn (row.attributes.user && row.attributes.user.displayName) ? row.attributes.user.displayName : '';\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"title\": PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.PROJECT_USER_1_LABEL) ? PJQ.app.session.preferences.getPref(PJQ.constants.preferenceTypes.PROJECT_USER_1_LABEL) : \"Project Contact\",\n\t\t\t\t\"visible\": this.settings.isColumnSelected(\"userDisplayName\")\n\t\t\t});\n\n\t\t\tcolumns.push({\n\t\t\t\t\"columnData\": 'user2DisplayName',\n\t\t\t\t\"data\": {\n\t\t\t\t\t\"_\": function (row) {\n\t\t\t\t\t\treturn (row.attributes.user2 && row.attributes.user2.displayName) ? row.attributes.user2.displayName : '';\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"title\": PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.PROJECT_USER_2_LABEL) ? PJQ.app.session.preferences.getPref(PJQ.constants.preferenceTypes.PROJECT_USER_2_LABEL) : \"Project Contact 2\",\n\t\t\t\t\"visible\": this.settings.isColumnSelected(\"user2DisplayName\")\n\t\t\t});\n\n\t\t\tif (PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.ENABLE_PROJECT_STATUS_ID)) {\n\t\t\t\tcolumns.push({\n\t\t\t\t\t\"columnData\": 'projectStatusId',\n\t\t\t\t\t\"data\": {\n\t\t\t\t\t\t\"_\": function (row) {\n\t\t\t\t\t\t\tlet st = PJQ.app.session.projectStatuses.get(row.attributes.projectStatusId);\n\t\t\t\t\t\t\treturn st ? st.get('name') : '';\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"title\": \"Project Status\",\n\t\t\t\t\t\"visible\": this.settings.isColumnSelected(\"projectStatusId\")\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tcolumns.push({\n\t\t\t\t\"columnData\": \"startDate\",\n\t\t\t\t\"data\": {\n\t\t\t\t\t\"_\": function (row) {\n\t\t\t\t\t\treturn new Date(row.attributes.startDate);\n\t\t\t\t\t},\n\t\t\t\t\t\"filter\": \"attributes.startDate\",\n\t\t\t\t\t\"display\": function (row) {\n\t\t\t\t\t\treturn row.attributes.startDate ? PJQ.helpers.dateHelpers.getDateString(new Date(row.attributes.startDate), PJQ.helpers.dateHelpers.dateFormats.DATE, true) : 'N/A';\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"title\": \"Start Date\",\n\t\t\t\t\"visible\": this.settings.isColumnSelected(\"startDate\")\n\t\t\t});\n\n\t\t\tcolumns.push({\n\t\t\t\t\"columnData\": \"endDate\",\n\t\t\t\t\"data\": {\n\t\t\t\t\t\"_\": function (row) {\n\t\t\t\t\t\treturn new Date(row.attributes.endDate);\n\t\t\t\t\t},\n\t\t\t\t\t\"filter\": \"attributes.endDate\",\n\t\t\t\t\t\"display\": function (row) {\n\t\t\t\t\t\treturn row.attributes.endDate ? PJQ.helpers.dateHelpers.getDateString(new Date(row.attributes.endDate), PJQ.helpers.dateHelpers.dateFormats.DATE, true) : 'N/A';\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"title\": \"End Date\",\n\t\t\t\t\"visible\": this.settings.isColumnSelected(\"endDate\")\n\t\t\t});\n\n\t\t\t_.each(PJQ.app.session.customFields.project[PJQ.app.session.get(\"masterUserId\")].models, _.bind(function (customField) {\n\t\t\t\tif (customField.get('fieldType') !== 'CONTACT')\n\t\t\t\t\tcolumns.push({\n\t\t\t\t\t\t\"columnData\": 'fieldValue' + customField.get('fieldNumber'),\n\t\t\t\t\t\t\"title\": customField.get('fieldName'),\n\t\t\t\t\t\t\"render\": function (data, type, row) {\n\t\t\t\t\t\t\tlet fieldValue = row.getCustomFieldValue(customField.get('id'));\n\t\t\t\t\t\t\tfieldValue = fieldValue ? fieldValue : '';\n\t\t\t\t\t\t\tswitch (customField.get('fieldType')) {\n\t\t\t\t\t\t\t\tcase PJQ.constants.customFields.fieldTypes.TEXT:\n\t\t\t\t\t\t\t\t\tif (fieldValue && type !== 'sort' && type !== 'type') {\n\t\t\t\t\t\t\t\t\t\tif (PJQ.helpers.urlHelpers.isURL(fieldValue))\n\t\t\t\t\t\t\t\t\t\t\tfieldValue = '' + fieldValue + '';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\tcase PJQ.constants.customFields.fieldTypes.DATE:\n\t\t\t\t\t\t\t\t\tif (fieldValue) {\n\t\t\t\t\t\t\t\t\t\tif (type !== 'sort' && type !== 'type') {\n\t\t\t\t\t\t\t\t\t\t\tfieldValue = PJQ.helpers.dateHelpers.getDateString(new Date(fieldValue), PJQ.helpers.dateHelpers.dateFormats.DATE, true) || '';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (fieldValue === undefined)\n\t\t\t\t\t\t\t\t\t\tfieldValue = '';\n\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase PJQ.constants.customFields.fieldTypes.DATETIME:\n\t\t\t\t\t\t\t\t\tif (fieldValue) {\n\t\t\t\t\t\t\t\t\t\tif (type !== 'sort' && type !== 'type') {\n\t\t\t\t\t\t\t\t\t\t\tfieldValue = PJQ.helpers.dateHelpers.getDateString(new Date(fieldValue), PJQ.helpers.dateHelpers.dateFormats.DATETIME, !PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.ENABLE_NEW_PROJECT_WALL) && !PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.NEW_APP_PORTAL)) || '';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (fieldValue === undefined)\n\t\t\t\t\t\t\t\t\t\tfieldValue = '';\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase PJQ.constants.customFields.fieldTypes.BOOL:\n\t\t\t\t\t\t\t\t\tif (fieldValue != null)\n\t\t\t\t\t\t\t\t\t\tfieldValue = fieldValue ? 'Yes' : 'No';\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\tfieldValue = '';\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase PJQ.constants.customFields.fieldTypes.CHOICE:\n\t\t\t\t\t\t\t\t\tif (fieldValue) {\n\t\t\t\t\t\t\t\t\t\tlet choices = [];\n\n\t\t\t\t\t\t\t\t\t\t// convert single choice value into array so that the logic below can work for both types.\n\t\t\t\t\t\t\t\t\t\tif (typeof fieldValue === 'number')\n\t\t\t\t\t\t\t\t\t\t\tfieldValue = [fieldValue];\n\n\t\t\t\t\t\t\t\t\t\t_.each(customField.choices.models, _.bind(function (choice) {\n\t\t\t\t\t\t\t\t\t\t\tif (_.find(fieldValue, function (value) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn value === choice.get('id');\n\t\t\t\t\t\t\t\t\t\t\t}))\n\t\t\t\t\t\t\t\t\t\t\t\tchoices.push(choice.get('choiceName'));\n\t\t\t\t\t\t\t\t\t\t}, this));\n\n\t\t\t\t\t\t\t\t\t\tfieldValue = choices.join((', '));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase PJQ.constants.customFields.fieldTypes.MONEY:\n\t\t\t\t\t\t\t\t\tif (type === 'sort' || type === 'type') {\n\t\t\t\t\t\t\t\t\t\tif (fieldValue && fieldValue !== '$')\n\t\t\t\t\t\t\t\t\t\t\tfieldValue = parseFloat(PJQ.helpers.formatHelpers.numbersOnly(fieldValue, true));\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tfieldValue = 0;\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn fieldValue;\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"customFieldId\": customField.get('id'),\n\t\t\t\t\t\t\"visible\": this.settings.isColumnSelected('fieldValue' + customField.get('fieldNumber'))\n\t\t\t\t\t});\n\n\t\t\t}, this));\n\t\t}\n\t\telse {\n\n\t\t\tlet foundGroupByColumn = false;\n\t\t\tif (!this.settings.get('groupBy'))\n\t\t\t\tfoundGroupByColumn = true;\n\n\t\t\t_.each(this.settings.get('columns'), _.bind(function (column) {\n\n\t\t\t\tif (column === this.settings.get('groupBy'))\n\t\t\t\t\tfoundGroupByColumn = true;\n\n\t\t\t\tthis.addColumnHelper(columns, column);\n\t\t\t}, this));\n\n\t\t\tif (!foundGroupByColumn)\n\t\t\t\tthis.addColumnHelper(columns, this.settings.get('groupBy'), true);\n\n\t\t\tcolumns.push({\n\t\t\t\t\"title\": '',\n\t\t\t\t\"render\": _.bind(function (data, type, row) {\n\t\t\t\t\tif (this.options.isAdmin && PJQ.app.session.get('masterUserId') === row.attributes.masterUserId) {\n\t\t\t\t\t\tif (row.attributes.status === 'READY' || row.attributes.status === 'BUSY' || row.attributes.status === 'HIDDEN')\n\t\t\t\t\t\t\treturn '
';\n\t\t\t\t\t\telse if (row.attributes.status === 'DELETED')\n\t\t\t\t\t\t\treturn '
';\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\treturn '
';\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\treturn '
';\n\t\t\t\t\t}\n\t\t\t\t}, this),\n\t\t\t\t\"orderable\": false,\n\t\t\t\t\"searchable\": false,\n\t\t\t\t\"width\": \"120px\",\n\t\t\t\t\"className\": \"text-center\",\n\t\t\t\t\"visible\": true\n\t\t\t});\n\t\t}\n\n\t\treturn columns;\n\t},\n\taddColumnHelper: function (columns, column, notVisible) {\n\t\tlet visible = true;\n\t\tif (notVisible)\n\t\t\tvisible = false;\n\n\t\tswitch (column) {\n\t\t\tcase 'icons':\n\t\t\t\tcolumns.push({\n\t\t\t\t\t\"columnData\": \"icons\",\n\t\t\t\t\t\"data\": null,\n\t\t\t\t\t\"title\": \"\",\n\t\t\t\t\t\"visible\": visible,\n\t\t\t\t\t\"orderable\": false,\n\t\t\t\t\t\"render\": function (data, type, row) {\n\t\t\t\t\t\treturn row.attributes.projectMessageCount === 0 ? '' : '';\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase 'erpObject':\n\t\t\t\tif (this.erpIntegration != null) {\n\t\t\t\t\tcolumns.push({\n\t\t\t\t\t\t\"columnData\": \"erpObject\",\n\t\t\t\t\t\t\"data\": null,\n\t\t\t\t\t\t\"title\": \"ERP\",\n\t\t\t\t\t\t\"visible\": visible,\n\t\t\t\t\t\t\"orderable\": false,\n\t\t\t\t\t\t\"width\": 100,\n\t\t\t\t\t\t\"render\": function (data, type, row) {\n\t\t\t\t\t\t\tlet exObj = row.get('externalObject');\n\t\t\t\t\t\t\tif (exObj == null) {\n\t\t\t\t\t\t\t\treturn '';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (type === 'sort' || type === 'type') {\n\t\t\t\t\t\t\t\treturn exObj.data?.externalNumber ?? \"\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn PJQ.helpers.erp.getERPBadge(exObj.status, exObj);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'projectId':\n\t\t\t\tcolumns.push({\n\t\t\t\t\t\"columnData\": \"projectId\",\n\t\t\t\t\t\"data\": \"attributes.projectId\",\n\t\t\t\t\t\"title\": \"Project Id\",\n\t\t\t\t\t\"visible\": visible,\n\t\t\t\t\t\"orderable\": (this.settings.get('groupBy') !== 'projectId')\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase 'projectName':\n\t\t\t\tcolumns.push({\n\t\t\t\t\t\"columnData\": \"projectName\",\n\t\t\t\t\t\"data\": \"attributes.projectName\",\n\t\t\t\t\t\"title\": \"Name\",\n\t\t\t\t\t\"visible\": visible,\n\t\t\t\t\t\"orderable\": (this.settings.get('groupBy') !== 'projectName'),\n\t\t\t\t\t\"render\": _.bind(function (data, type, row) {\n\t\t\t\t\t\treturn \"\" + row.attributes.projectName + '';\n\t\t\t\t\t}, this)\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase 'address1':\n\t\t\t\tcolumns.push({\n\t\t\t\t\t\"columnData\": \"address1\",\n\t\t\t\t\t\"data\": \"attributes.address1\",\n\t\t\t\t\t\"title\": \"Address 1\",\n\t\t\t\t\t\"visible\": visible,\n\t\t\t\t\t\"orderable\": (this.settings.get('groupBy') !== 'address1')\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase 'address2':\n\t\t\t\tcolumns.push({\n\t\t\t\t\t\"columnData\": \"address2\",\n\t\t\t\t\t\"data\": \"attributes.address2\",\n\t\t\t\t\t\"title\": \"Address 2\",\n\t\t\t\t\t\"visible\": visible,\n\t\t\t\t\t\"orderable\": (this.settings.get('groupBy') !== 'address2')\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase 'city':\n\t\t\t\tcolumns.push({\n\t\t\t\t\t\"columnData\": \"city\",\n\t\t\t\t\t\"data\": \"attributes.city\",\n\t\t\t\t\t\"title\": \"City\",\n\t\t\t\t\t\"visible\": visible,\n\t\t\t\t\t\"orderable\": (this.settings.get('groupBy') !== 'city')\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase 'state':\n\t\t\t\tcolumns.push({\n\t\t\t\t\t\"columnData\": \"state\",\n\t\t\t\t\t\"data\": \"attributes.state\",\n\t\t\t\t\t\"title\": \"State\",\n\t\t\t\t\t\"visible\": visible,\n\t\t\t\t\t\"orderable\": (this.settings.get('groupBy') !== 'state')\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase 'zip':\n\t\t\t\tcolumns.push({\n\t\t\t\t\t\"columnData\": \"zip\",\n\t\t\t\t\t\"data\": \"attributes.zip\",\n\t\t\t\t\t\"title\": \"Zip\",\n\t\t\t\t\t\"visible\": visible,\n\t\t\t\t\t\"orderable\": (this.settings.get('groupBy') !== 'zip')\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase 'created':\n\t\t\t\tcolumns.push({\n\t\t\t\t\t\"columnData\": \"created\",\n\t\t\t\t\t\"data\": {\n\t\t\t\t\t\t\"_\": function (row) {\n\t\t\t\t\t\t\treturn new Date(row.attributes.created);\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"filter\": \"attributes.created\",\n\t\t\t\t\t\t\"display\": function (row) {\n\t\t\t\t\t\t\treturn PJQ.helpers.dateHelpers.getDateString(new Date(row.attributes.created), PJQ.helpers.dateHelpers.dateFormats.DATE_TIME, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"title\": \"Created\",\n\t\t\t\t\t\"visible\": visible,\n\t\t\t\t\t\"orderable\": (this.settings.get('groupBy') !== 'created')\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase 'bidsDue':\n\t\t\t\tcolumns.push({\n\t\t\t\t\t\"columnData\": 'bidsDue',\n\t\t\t\t\t\"orderable\": (this.settings.get('groupBy') !== 'bidsDue'),\n\t\t\t\t\t\"data\": {\n\t\t\t\t\t\t\"_\": function (row) {\n\n\t\t\t\t\t\t\tlet dateTemp = new Date();\n\t\t\t\t\t\t\tif (row.attributes.bidsDue == null)\n\t\t\t\t\t\t\t\treturn dateTemp.addDays(-20000);\n\t\t\t\t\t\t\tif (row.attributes.rDueText === 'ASAP')\n\t\t\t\t\t\t\t\treturn dateTemp.addDays(-10000);\n\n\t\t\t\t\t\t\treturn new Date(row.attributes.bidsDue);\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"filter\": \"attributes.bidsDue\",\n\t\t\t\t\t\t\"display\": function (row) {\n\t\t\t\t\t\t\tif (row.attributes.bidsDue == null)\n\t\t\t\t\t\t\t\treturn \"N/A\";\n\t\t\t\t\t\t\tif (row.attributes.rDueText === 'ASAP')\n\t\t\t\t\t\t\t\treturn row.attributes.rDueText;\n\n\t\t\t\t\t\t\treturn PJQ.helpers.dateHelpers.getDateString(new Date(row.attributes.bidsDue), PJQ.helpers.dateHelpers.dateFormats.DATE_TIME);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"title\": \"Bids Due\", \"visible\": visible\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase 'userDisplayName':\n\t\t\t\tcolumns.push({\n\t\t\t\t\t\"columnData\": 'userDisplayName',\n\t\t\t\t\t\"data\": {\n\t\t\t\t\t\t\"_\": function (row) {\n\t\t\t\t\t\t\treturn (row.attributes.user && row.attributes.user.displayName) ? row.attributes.user.displayName : '';\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"title\": PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.PROJECT_USER_1_LABEL) ? PJQ.app.session.preferences.getPref(PJQ.constants.preferenceTypes.PROJECT_USER_1_LABEL) : \"Project Contact\",\n\t\t\t\t\t\"visible\": visible\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase 'user2DisplayName':\n\t\t\t\tcolumns.push({\n\t\t\t\t\t\"columnData\": 'user2DisplayName',\n\t\t\t\t\t\"data\": {\n\t\t\t\t\t\t\"_\": function (row) {\n\t\t\t\t\t\t\treturn (row.attributes.user2 && row.attributes.user2.displayName) ? row.attributes.user2.displayName : '';\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"title\": PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.PROJECT_USER_2_LABEL) ? PJQ.app.session.preferences.getPref(PJQ.constants.preferenceTypes.PROJECT_USER_2_LABEL) : \"Project Contact 2\",\n\t\t\t\t\t\"visible\": visible\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase 'projectStatusId':\n\t\t\t\tcolumns.push({\n\t\t\t\t\t\"columnData\": 'projectStatusId',\n\t\t\t\t\t\"data\": {\n\t\t\t\t\t\t\"_\": function (row) {\n\t\t\t\t\t\t\tlet st = PJQ.app.session.projectStatuses.get(row.attributes.projectStatusId);\n\t\t\t\t\t\t\treturn st ? st.get('name') : '';\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"title\": \"Project Status\",\n\t\t\t\t\t\"visible\": visible\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase 'startDate':\n\t\t\t\tcolumns.push({\n\t\t\t\t\t\"columnData\": \"startDate\",\n\t\t\t\t\t\"data\": {\n\t\t\t\t\t\t\"_\": function (row) {\n\t\t\t\t\t\t\treturn new Date(row.attributes.startDate);\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"filter\": \"attributes.startDate\",\n\t\t\t\t\t\t\"display\": function (row) {\n\t\t\t\t\t\t\treturn row.attributes.startDate ? PJQ.helpers.dateHelpers.getDateString(new Date(row.attributes.startDate), PJQ.helpers.dateHelpers.dateFormats.DATE, true) : 'N/A';\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"title\": \"Start Date\",\n\t\t\t\t\t\"visible\": visible\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase 'endDate':\n\t\t\t\tcolumns.push({\n\t\t\t\t\t\"columnData\": \"endDate\",\n\t\t\t\t\t\"data\": {\n\t\t\t\t\t\t\"_\": function (row) {\n\t\t\t\t\t\t\treturn new Date(row.attributes.endDate);\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"filter\": \"attributes.endDate\",\n\t\t\t\t\t\t\"display\": function (row) {\n\t\t\t\t\t\t\treturn row.attributes.endDate ? PJQ.helpers.dateHelpers.getDateString(new Date(row.attributes.endDate), PJQ.helpers.dateHelpers.dateFormats.DATE, true) : 'N/A';\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"title\": \"End Date\",\n\t\t\t\t\t\"visible\": visible\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif (column.startsWith('fieldValue')) {\n\t\t\t\t\t// Project Custom Fields\n\t\t\t\t\t_.each(PJQ.app.session.customFields.project[PJQ.app.session.get(\"masterUserId\")].models, _.bind(function (customField) {\n\t\t\t\t\t\t// todo: only show the ones the user wants to.\n\t\t\t\t\t\tif (column === 'fieldValue' + customField.get('fieldNumber'))\n\t\t\t\t\t\t\tcolumns.push({\n\t\t\t\t\t\t\t\t\"columnData\": 'fieldValue' + customField.get('fieldNumber'),\n\t\t\t\t\t\t\t\t\"orderable\": (this.settings.get('groupBy') !== 'fieldValue' + customField.get('fieldNumber')),\n\t\t\t\t\t\t\t\t\"title\": customField.get('fieldName'),\n\t\t\t\t\t\t\t\t\"render\": function (data, type, row) {\n\t\t\t\t\t\t\t\t\tlet fieldValue = row.getCustomFieldValue(customField.get('id'));\n\t\t\t\t\t\t\t\t\tfieldValue = fieldValue ? fieldValue : '';\n\t\t\t\t\t\t\t\t\tswitch (customField.get('fieldType')) {\n\t\t\t\t\t\t\t\t\t\tcase PJQ.constants.customFields.fieldTypes.TEXT:\n\t\t\t\t\t\t\t\t\t\t\tif (fieldValue && type !== 'sort' && type !== 'type') {\n\t\t\t\t\t\t\t\t\t\t\t\tif (PJQ.helpers.urlHelpers.isURL(fieldValue))\n\t\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = '' + fieldValue + '';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\tcase PJQ.constants.customFields.fieldTypes.DATE:\n\t\t\t\t\t\t\t\t\t\t\tif (fieldValue) {\n\t\t\t\t\t\t\t\t\t\t\t\tif (type !== 'sort' && type !== 'type')\n\t\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = PJQ.helpers.dateHelpers.getDateString(new Date(fieldValue), PJQ.helpers.dateHelpers.dateFormats.DATE, true);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif (fieldValue === undefined)\n\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = '';\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase PJQ.constants.customFields.fieldTypes.DATETIME:\n\t\t\t\t\t\t\t\t\t\t\tif (fieldValue) {\n\t\t\t\t\t\t\t\t\t\t\t\tif (type !== 'sort' && type !== 'type')\n\t\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = PJQ.helpers.dateHelpers.getDateString(new Date(fieldValue), PJQ.helpers.dateHelpers.dateFormats.DATE_TIME, !PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.ENABLE_NEW_PROJECT_WALL) && !PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.NEW_APP_PORTAL));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif (fieldValue === undefined)\n\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = '';\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase PJQ.constants.customFields.fieldTypes.BOOL:\n\t\t\t\t\t\t\t\t\t\t\tif (fieldValue != null)\n\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = fieldValue ? 'Yes' : 'No';\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = '';\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase PJQ.constants.customFields.fieldTypes.CHOICE:\n\t\t\t\t\t\t\t\t\t\t\tif (fieldValue) {\n\t\t\t\t\t\t\t\t\t\t\t\tlet choices = [];\n\n\t\t\t\t\t\t\t\t\t\t\t\t// convert single choice value into array so that the logic below can work for both types.\n\t\t\t\t\t\t\t\t\t\t\t\tif (typeof fieldValue === 'number')\n\t\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = [fieldValue];\n\n\t\t\t\t\t\t\t\t\t\t\t\t_.each(customField.choices.models, _.bind(function (choice) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (_.find(fieldValue, function (value) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn value === choice.get('id');\n\t\t\t\t\t\t\t\t\t\t\t\t\t}))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tchoices.push(choice.get('choiceName'));\n\t\t\t\t\t\t\t\t\t\t\t\t}, this));\n\n\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = choices.join((', '));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase PJQ.constants.customFields.fieldTypes.MONEY:\n\t\t\t\t\t\t\t\t\t\t\tif (type === 'sort' || type === 'type') {\n\t\t\t\t\t\t\t\t\t\t\t\tif (fieldValue && fieldValue !== '$')\n\t\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = parseFloat(PJQ.helpers.formatHelpers.numbersOnly(fieldValue, true));\n\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = 0;\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = PJQ.helpers.formatHelpers.formatCurrency(parseInt(PJQ.helpers.formatHelpers.numbersOnly(fieldValue)));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase PJQ.constants.customFields.fieldTypes.INT:\n\t\t\t\t\t\t\t\t\t\t\tif (type !== 'sort' && type !== 'type' && fieldValue) {\n\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = parseInt(fieldValue).toLocaleString();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturn fieldValue;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"customFieldId\": customField.get('id'),\n\t\t\t\t\t\t\t\t\"visible\": visible\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t}, this));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t},\n\teditProjectButton: function (e) {\n\t\tlet row = this.dataTable.getRow($(e.currentTarget).closest('tr'));\n\t\tthis.editProject(row.data())\n\t},\n\teditProject: function (project) {\n\t\tif (PJQ.app.session.get('masterUserId') === project.attributes.masterUserId || PJQ.app.module === PJQ.constants.modules.APP) {\n\t\t\twindow.pjqProjectId = project.id.toString();\n\t\t\twindow.pjqWallContext = 'project';\n\t\t\twindow.pjqIsNewProject = false;\n\t\t\tPJQ.app.router.navigate('projects/' + project.id.toString(), {\n\t\t\t\ttrigger: true\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\twindow.location.href = '/Default.aspx?tabId=' + PJQ.app.session.preferences.getPref('projectWallSubTabId') + '&key=' + project.attributes.accessKey;\n\t\t}\n\t},\n\tnewProject: function () {\n\t\tif (PJQ.app.module === PJQ.constants.modules.APP) {\n\n\t\t\tlet endpoint = PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t\t{\n\t\t\t\t\tendpoint: 'projects'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tendpoint: 'new'\n\t\t\t\t}\n\t\t\t]);\n\t\t\tnew PJQ.ajax.Request({\n\t\t\t\tendpoint: endpoint\n\t\t\t}).post().done(_.bind(function (project) {\n\t\t\t\tPJQ.app.router.navigate('projects/' + project.projectId.toString() + '/details', {\n\t\t\t\t\ttrigger: true\n\t\t\t\t});\n\t\t\t}, this)).fail(function () {\n\t\t\t});\n\n\t\t\t/*\n\t\t\tnew PJQ.views.projects.NewProjectModal({\n\t\t\t\tonSave: function (project) {\n\t\t\t\t\twindow.pjqProjectId = 0;\n\t\t\t\t\twindow.pjqWallContext = 'project';\n\t\t\t\t\twindow.pjqIsNewProject = true;\n\t\t\t\t\tPJQ.app.router.navigate('projects/' + project.id.toString() + '/details', {\n\t\t\t\t\t\ttrigger: true\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t */\n\t\t}\n\t\telse {\n\t\t\twindow.pjqProjectId = 0;\n\t\t\twindow.pjqWallContext = 'project';\n\t\t\twindow.pjqIsNewProject = true;\n\t\t\tPJQ.app.router.navigate('projects/0', {\n\t\t\t\ttrigger: true\n\t\t\t});\n\t\t}\n\t},\n\tarchiveProjectButton: function (e) {\n\t\tlet row = this.dataTable.getRow($(e.currentTarget).closest('tr')),\n\t\t\tproject = row.data();\n\t\tthis.archiveProject(project);\n\t},\n\tarchiveProject: function (project) {\n\t\tlet projectNameString = (_.size(project.get('projectName')) > 0 ? ('' + project.get('projectName') + '') : 'this project'),\n\t\t\tarchiveText = 'Are you sure you want to archive ' + projectNameString + '?';\n\n\t\tnew PJQ.views.BaseModal({\n\t\t\theader: \"Confirm Archive\",\n\t\t\tokButtonText: 'Archive',\n\t\t\tbody: archiveText,\n\t\t\tisShowCancelButton: true,\n\t\t\tonOk: _.bind(function () {\n\t\t\t\tthis.archiveProjectList([project.id]);\n\t\t\t}, this)\n\t\t});\n\t},\n\tarchiveProjectList: function (ids) {\n\t\tlet endpoint = PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t{\n\t\t\t\tendpoint: 'projects'\n\t\t\t},\n\t\t\t{\n\t\t\t\tendpoint: 'archive'\n\t\t\t}\n\t\t], [\n\t\t\t{\n\t\t\t\tparameter: \"projects\",\n\t\t\t\tvalue: ids\n\t\t\t}\n\t\t]);\n\t\tnew PJQ.ajax.Request({\n\t\t\tendpoint: endpoint\n\t\t}).post().done(_.bind(function () {\n\t\t\t_.each(ids, _.bind(function (id) {\n\t\t\t\tthis.dataTable.dataTable\n\t\t\t\t\t.row($('.btn-favorite-project[data-project-id=\"' + id.toString() + '\"]').closest('tr'))\n\t\t\t\t\t.remove()\n\t\t\t\t\t.draw();\n\t\t\t}, this));\n\t\t}, this)).fail(function () {\n\t\t});\n\t},\n\trestoreProjectButton: function (e) {\n\t\tlet row = this.dataTable.getRow($(e.currentTarget).closest('tr')),\n\t\t\tproject = row.data();\n\t\tthis.restoreProject(project);\n\n\t},\n\trestoreProject: function (project) {\n\t\tlet projectNameString = (_.size(project.get('projectName')) > 0 ? ('' + project.get('projectName') + '') : 'this project'),\n\t\t\trestoreText = 'Are you sure you want to restore ' + projectNameString + '?';\n\n\t\tnew PJQ.views.BaseModal({\n\t\t\theader: \"Confirm Restore\",\n\t\t\tbody: restoreText,\n\t\t\tisShowCancelButton: true,\n\t\t\tonOk: _.bind(function () {\n\t\t\t\tthis.restoreProjectList([project.id]);\n\t\t\t}, this)\n\t\t});\n\t},\n\trestoreProjectList: function (ids) {\n\t\tlet endpoint = PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t{\n\t\t\t\tendpoint: 'projects'\n\t\t\t},\n\t\t\t{\n\t\t\t\tendpoint: 'restore'\n\t\t\t}\n\t\t], [\n\t\t\t{\n\t\t\t\tparameter: \"projects\",\n\t\t\t\tvalue: ids\n\t\t\t}\n\t\t]);\n\t\tnew PJQ.ajax.Request({\n\t\t\tendpoint: endpoint\n\t\t}).post().done(_.bind(function () {\n\t\t\t_.each(ids, _.bind(function (id) {\n\t\t\t\tthis.dataTable.dataTable\n\t\t\t\t\t.row($('.btn-favorite-project[data-project-id=\"' + id.toString() + '\"]').closest('tr'))\n\t\t\t\t\t.remove()\n\t\t\t\t\t.draw();\n\t\t\t}, this));\n\t\t}, this)).fail(function () {\n\t\t});\n\t},\n\trecycleProjectButton: function (e) {\n\t\tlet row = this.dataTable.getRow($(e.currentTarget).closest('tr')),\n\t\t\tproject = row.data();\n\t\tthis.recycleProject(project);\n\t},\n\tdeleteProjectButton: function (e) {\n\t\tlet row = this.dataTable.getRow($(e.currentTarget).closest('tr')),\n\t\t\tproject = row.data();\n\t\tthis.deleteProject(project);\n\t},\n\trecycleProject: function (project) {\n\t\tlet projectNameString = (_.size(project.get('projectName')) > 0 ? ('' + project.get('projectName') + '') : 'this project'),\n\t\t\tdeleteText = this.dataTable.getStatusFilter() === 'deleted' ? 'Are you sure you want to PERMANENTLY DELETE ' + projectNameString + '?' : 'Are you sure you want to move ' + projectNameString + ' to the Recycle Bin?';\n\n\t\tnew PJQ.views.modals.DeleteCancel({\n\t\t\theader: \"Confirm Deletion\",\n\t\t\tbody: deleteText,\n\t\t\tonDelete: _.bind(function () {\n\t\t\t\tthis.recycleProjectList([project.id]);\n\t\t\t}, this)\n\t\t});\n\t},\n\tdeleteProject: function (project) {\n\t\tlet projectNameString = (_.size(project.get('projectName')) > 0 ? ('' + project.get('projectName') + '') : 'this project'),\n\t\t\tdeleteText = this.dataTable.getStatusFilter() === 'deleted' ? 'Are you sure you want to PERMANENTLY DELETE ' + projectNameString + '?' : 'Are you sure you want to move ' + projectNameString + ' to the Recycle Bin?';\n\n\t\tnew PJQ.views.modals.DeleteCancel({\n\t\t\theader: \"Confirm Deletion\",\n\t\t\tbody: deleteText,\n\t\t\tonDelete: _.bind(function () {\n\t\t\t\tthis.deleteProjectList([project.id]);\n\t\t\t}, this)\n\t\t});\n\t},\n\trecycleProjectList: function (ids) {\n\t\tlet endpoint = PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t{\n\t\t\t\tendpoint: 'projects'\n\t\t\t},\n\t\t\t{\n\t\t\t\tendpoint: 'recycle'\n\t\t\t}\n\t\t], [\n\t\t\t{\n\t\t\t\tparameter: \"projects\",\n\t\t\t\tvalue: ids\n\t\t\t}\n\t\t]);\n\t\tnew PJQ.ajax.Request({\n\t\t\tendpoint: endpoint\n\t\t}).post().done(_.bind(function () {\n\t\t\t_.each(ids, _.bind(function (id) {\n\t\t\t\tthis.dataTable.dataTable\n\t\t\t\t\t.row($('.btn-favorite-project[data-project-id=\"' + id.toString() + '\"]').closest('tr'))\n\t\t\t\t\t.remove()\n\t\t\t\t\t.draw();\n\t\t\t}, this));\n\t\t}, this)).fail(function () {\n\t\t});\n\t},\n\tdeleteProjectList: function (ids) {\n\t\tlet endpoint = PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t{\n\t\t\t\tendpoint: 'projects'\n\t\t\t},\n\t\t\t{\n\t\t\t\tendpoint: 'deleterecycle'\n\t\t\t}\n\t\t], [\n\t\t\t{\n\t\t\t\tparameter: \"projects\",\n\t\t\t\tvalue: ids\n\t\t\t}\n\t\t]);\n\t\tnew PJQ.ajax.Request({\n\t\t\tendpoint: endpoint\n\t\t}).post().done(_.bind(function () {\n\t\t\t_.each(ids, _.bind(function (id) {\n\t\t\t\tthis.dataTable.dataTable\n\t\t\t\t\t.row($('.btn-favorite-project[data-project-id=\"' + id.toString() + '\"]').closest('tr'))\n\t\t\t\t\t.remove()\n\t\t\t\t\t.draw();\n\t\t\t}, this));\n\t\t}, this)).fail(function () {\n\t\t});\n\t},\n\tfavoriteProject: function (e) {\n\t\tlet row = this.dataTable.getRow($(e.currentTarget).closest('tr')),\n\t\t\tproject = row.data();\n\t\tthis.favoriteProjectList([project.id], !project.get('isFavorite'));\n\t},\n\tfavoriteProjectList: function (ids, isFavorite) {\n\t\tlet endpoint = PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t{\n\t\t\t\tendpoint: 'projects'\n\t\t\t},\n\t\t\t{\n\t\t\t\tendpoint: 'favorites'\n\t\t\t}\n\t\t], [\n\t\t\t{\n\t\t\t\tparameter: \"projects\",\n\t\t\t\tvalue: ids\n\t\t\t},\n\t\t\t{\n\t\t\t\tparameter: \"isFavorite\",\n\t\t\t\tvalue: isFavorite\n\t\t\t}\n\t\t]);\n\t\tnew PJQ.ajax.Request({\n\t\t\tendpoint: endpoint\n\t\t}).post().done(_.bind(function () {\n\t\t\t_.each(ids, _.bind(function (id) {\n\t\t\t\t_.each(this.dataTable.options.collection.models, function (row) {\n\t\t\t\t\tif (row.attributes.projectId === id)\n\t\t\t\t\t\trow.attributes.isFavorite = isFavorite;\n\t\t\t\t}, this);\n\n\t\t\t\tlet $favoriteButton = $('.btn-favorite-project[data-project-id=\"' + id + '\"] i');\n\t\t\t\tif (isFavorite) {\n\t\t\t\t\t$favoriteButton.removeClass('far').addClass(('fas'));\n\t\t\t\t\t$favoriteButton.removeClass('text-muted').addClass(('text-gold'));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$favoriteButton.removeClass('fas').addClass(('far'));\n\t\t\t\t\t$favoriteButton.removeClass('text-gold').addClass(('text-muted'));\n\t\t\t\t}\n\t\t\t}, this));\n\t\t}, this)).fail(function () {\n\t\t});\n\n\t},\n\tmultipleProjectActionInitialize: function (sender) {\n\n\t\t// label the primary action button\n\t\tthis.$('.projects-action-confirm').text($(sender.currentTarget).text());\n\n\t\t// track which mode we're in\n\t\tthis.multipleProjectMode = $(sender.currentTarget).prop('className').replace('dropdown-item ', '');\n\n\t\t// show the action buttons\n\t\tthis.$('.projects-action-confirm').prop('disabled', true);\n\t\tthis.$('.btn-other-project-actions').parent().hide();\n\t\tthis.$('.projects-action-confirm, .projects-action-cancel').show();\n\n\t\t// clear existing selections\n\t\tthis.selectedProjects = [];\n\t\tthis.dataTable.dataTable.rows().invalidate().draw(false);\n\n\t\t// disable all other header controls\n\t\tthis.$('.btn-new-project, .btn-other-project-actions, .btn-edit-project, .btn-archive-project, .btn-restore-project, .btn-delete-project, .btn-recycle-project, .project-list-status-filter').prop('disabled', true);\n\t\tthis.$('.filter-option').addClass('text-muted');\n\n\t\t// show the checkbox column\n\t\tthis.dataTable.dataTable.column(1).visible(true);\n\t\tthis.dataTable.refresh();\n\n\t\tthis.isMultipleProjectSelectMode = true;\n\t},\n\tmultipleProjectSelection: function (e) {\n\t\tlet row = this.dataTable.getRow($(e.currentTarget).closest('tr')),\n\t\t\tproject = row.data();\n\t\tif ($(e.currentTarget).prop('checked')) {\n\t\t\tthis.selectedProjects.push(project);\n\t\t}\n\t\telse {\n\t\t\tthis.selectedProjects = _.filter(this.selectedProjects, function (sp) {\n\t\t\t\treturn sp.id !== project.id\n\t\t\t});\n\t\t}\n\n\t\tthis.$('.projects-action-confirm').prop('disabled', _.size(this.selectedProjects) === 0);\n\t},\n\tmultipleProjectActionConfirm: function () {\n\n\t\tif (this.multipleProjectMode === 'invite-projects') {\n\t\t\tthis.projectInvites();\n\t\t\treturn;\n\t\t}\n\t\tlet actionText = '';\n\t\tswitch (this.multipleProjectMode) {\n\t\t\tcase 'favorite-projects':\n\t\t\t\tactionText = 'Are you sure you want to mark ' + _.size(this.selectedProjects) + ' Projects as Favorites?';\n\t\t\t\tbreak;\n\t\t\tcase 'unfavorite-projects':\n\t\t\t\tactionText = 'Are you sure you want to unmark ' + _.size(this.selectedProjects) + ' Projects as Favorites?';\n\t\t\t\tbreak;\n\t\t\tcase 'archive-projects':\n\t\t\t\tactionText = 'Are you sure you want to archive ' + _.size(this.selectedProjects) + ' Projects?';\n\t\t\t\tbreak;\n\t\t\tcase 'restore-projects':\n\t\t\t\tactionText = 'Are you sure you want to restore ' + _.size(this.selectedProjects) + ' Projects?';\n\t\t\t\tbreak;\n\t\t\tcase 'delete-projects':\n\t\t\t\tactionText = this.dataTable.getStatusFilter() === 'deleted' ? 'Are you sure you want to PERMANENTLY DELETE ' + _.size(this.selectedProjects) + ' Projects?' : 'Are you sure you want to move ' + _.size(this.selectedProjects) + ' Projects to the Recycle Bin?';\n\t\t\t\tbreak;\n\t\t}\n\n\t\tnew PJQ.views.BaseModal({\n\t\t\theader: \"Confirm Action\",\n\t\t\tbody: actionText,\n\t\t\tisShowCancelButton: true,\n\t\t\tonOk: _.bind(function () {\n\t\t\t\tswitch (this.multipleProjectMode) {\n\t\t\t\t\tcase 'favorite-projects':\n\t\t\t\t\t\tthis.favoriteProjectList(this.getSelectedProjectIds(), true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'unfavorite-projects':\n\t\t\t\t\t\tthis.favoriteProjectList(this.getSelectedProjectIds(), false);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'archive-projects':\n\t\t\t\t\t\tthis.archiveProjectList(this.getSelectedProjectIds());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'restore-projects':\n\t\t\t\t\t\tthis.restoreProjectList(this.getSelectedProjectIds());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'delete-projects':\n\t\t\t\t\t\tif (this.dataTable.getStatusFilter() === 'deleted') {\n\t\t\t\t\t\t\tthis.deleteProjectList(this.getSelectedProjectIds());\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthis.recycleProjectList(this.getSelectedProjectIds());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tthis.multipleProjectActionCancel();\n\t\t\t}, this)\n\t\t});\n\t},\n\tgetSelectedProjectIds: function () {\n\t\treturn _.map(this.selectedProjects, function (project) {\n\t\t\treturn project.id;\n\t\t});\n\t},\n\tmultipleProjectActionCancel: function () {\n\t\t// hide the action buttons\n\t\tthis.$('.projects-action-confirm, .projects-action-cancel').hide();\n\t\tthis.$('.btn-other-project-actions').parent().show();\n\n\t\t// hide the checkbox column\n\t\tthis.dataTable.dataTable.column(1).visible(false);\n\n\t\t// enable all other header controls\n\t\tthis.$('.btn-new-project, .btn-other-project-actions, .btn-edit-project, .btn-archive-project, .btn-restore-project, .btn-delete-project, .btn-recycle-project, .project-list-status-filter').prop('disabled', false);\n\t\tthis.$('.filter-option').removeClass('text-muted');\n\n\t\tthis.isMultipleProjectSelectMode = false;\n\t},\n\tsettings: function () {\n\t\tnew PJQ.views.projects.MyProjectListSettingsModal({\n\t\t\tcolumns: this.getColumns(true),\n\t\t\tsettings: this.settings,\n\t\t\tonSave: _.bind(function () {\n\t\t\t\tthis.collection = new PJQ.collections.projects.Projects(null, {\n\t\t\t\t\tisSimple: false,\n\t\t\t\t\tstatus: 'ready',\n\t\t\t\t\tcustomFieldIds: this.getVisibleCustomFieldIds()\n\t\t\t\t});\n\t\t\t\tthis.collection.fetch({\n\t\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\t\tthis.isFetched = true;\n\t\t\t\t\t\tthis.render();\n\t\t\t\t\t}, this)\n\t\t\t\t});\n\t\t\t}, this)\n\t\t});\n\t},\n\tprojectInvites: function () {\n\t\tnew PJQ.views.projectInvites.ProjectInvitesModal({\n\t\t\tprojects: this.selectedProjects,\n\t\t\temailTemplates: PJQ.app.session.emailTemplates.projectMessage.models,\n\t\t\tonSend: _.bind(function () {\n\t\t\t\tthis.multipleProjectActionCancel();\n\t\t\t}, this),\n\t\t\tonClose: _.bind(function () {\n\t\t\t\tthis.multipleProjectActionCancel();\n\t\t\t}, this)\n\t\t});\n\t},\n\tuploadRevision: function (project) {\n\t\tnew PJQ.views.files.RawFileUploaderModal({\n\t\t\tproject: project\n\t\t});\n\t},\n\tchangeReport: function (project) {\n\t\tPJQ.files.downloadFile(\n\t\t\tPJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t\t{\n\t\t\t\t\tendpoint: 'projects',\n\t\t\t\t\tvalue: project.id\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tendpoint: 'changereport'\n\t\t\t\t}\n\t\t\t])\n\t\t);\n\t}\n});\n\nPJQ.views.projects.NewProjectModal = PJQ.views.BaseModal.extend({\n\tdefaults: {\n\t\ttemplate: new PJQ.templating.Template(PJQ.constants.modules.PROJECTLIST, 'Modal-New-Project'),\n\t\tminWidth: '500px',\n\t\tonSave: _.noop\n\t},\n\tevents: {\n\t\t'keyup .input-project-name': 'projectNameChanged',\n\t\t'click .btn-save-project': 'onSave'\n\t},\n\tbeforeModalCreated: function () {\n\t\tthis.model = new PJQ.models.projects.Project();\n\t},\n\tbeforeRender: function () {\n\t\tthis.renderData = {\n\t\t\tmodel: this.model\n\t\t};\n\t},\n\tafterRender: function () {\n\t\tthis.$('.input-project-name').focus();\n\t},\n\tprojectNameChanged: function (e) {\n\t\tlet projectName = this.$('.input-project-name').val(),\n\t\t\tprojectNameBlank = _.size(projectName) === 0;\n\t\tthis.$('.btn-save-project').prop('disabled', projectNameBlank);\n\t\tif (!projectNameBlank && e.keyCode === 13) {\n\t\t\tthis.onSave();\n\t\t}\n\t},\n\tonSave: function () {\n\t\tlet projectName = this.$('.input-project-name').val();\n\t\tif (_.size(projectName) === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tnew PJQ.Loader(this.$('.modal-content'));\n\t\tthis.model.save({\n\t\t\tprojectName: projectName\n\t\t}, {\n\t\t\tsuccess: _.bind(function () {\n\t\t\t\tthis.removeModal();\n\t\t\t\tif (typeof this.options.onSave === 'function') {\n\t\t\t\t\tthis.options.onSave(this.model);\n\t\t\t\t}\n\t\t\t}, this)\n\t\t});\n\t}\n});\n\nPJQ.views.projects.MyProjectListSettingsModal = PJQ.views.BaseModal.extend({\n\tdefaults: {\n\t\tcolumns: [],\n\t\ttemplate: new PJQ.templating.Template(PJQ.constants.modules.PROJECTLIST, 'Project-List-Settings'),\n\t\tminWidth: '40%',\n\t\tonSave: _.noop,\n\t\tsettings: null\n\t},\n\tevents: {\n\t\t'click .settings-close': 'removeModal',\n\t\t'click .settings-save': 'onSave',\n\t\t'change .select-column': 'columnSelected'\n\t},\n\tbeforeRender: function () {\n\t\tthis.renderData = {\n\t\t\tmodel: this.model\n\t\t};\n\t},\n\tafterRender: function () {\n\t\t// iterate through columns and build GroupBy dropdown.\n\t\t_.each(this.options.columns, _.bind(function (column) {\n\t\t\tthis.$('select.grouping').append('');\n\t\t}, this));\n\n\t\tnew PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('select.rows-per-page'),\n\t\t\tdefaultValue: this.options.settings.get('rowsPerPage')\n\t\t});\n\n\t\tnew PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('select.grouping'),\n\t\t\tdefaultValue: this.options.settings.get('groupBy')\n\t\t});\n\n\t\tthis.dataTable = new PJQ.views.dataTables.DataTable({\n\t\t\tel: this.$('.column-settings'),\n\t\t\tdata: this.options.columns,\n\t\t\tisHideSearch: true,\n\t\t\torder: [],\n\t\t\tcolumns: [\n\t\t\t\t{\"data\": \"title\", \"title\": \"Column\", \"orderable\": false},\n\t\t\t\t{\n\t\t\t\t\t\"data\": \"visible\",\n\t\t\t\t\t\"title\": \"Show\",\n\t\t\t\t\t\"orderable\": false,\n\t\t\t\t\t\"searchable\": false,\n\t\t\t\t\t\"render\": _.bind(function (data) {\n\t\t\t\t\t\treturn ('
');\n\t\t\t\t\t}, this),\n\t\t\t\t\t\"width\": '10%'\n\t\t\t\t}\n\t\t\t],\n\t\t\tdom: '<\"top\"<\"clear\">>rt<\"bottom\"p<\"clear\">>'\n\n\t\t});\n\t},\n\tonSave: function () {\n\t\tthis.options.settings.set('rowsPerPage', parseInt(this.$('select.rows-per-page').val()));\n\t\tthis.options.settings.set('groupBy', this.$('select.grouping').val());\n\n\t\t// todo: column settings.\n\t\t_.each(this.dataTable.options.data, _.bind(function (column) {\n\t\t\tlet columns = this.options.settings.get('columns');\n\t\t\tif (column.visible) {\n\t\t\t\t// add to end if missing\n\t\t\t\tif (_.find(columns, function (col) {\n\t\t\t\t\treturn col === column.columnData\n\t\t\t\t}) === undefined)\n\t\t\t\t\tcolumns.push(column.columnData);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// remove if present\n\t\t\t\tcolumns = _.filter(columns, function (col) {\n\t\t\t\t\treturn col !== column.columnData;\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis.options.settings.set('columns', columns);\n\t\t}, this));\n\n\t\tthis.options.settings.save();\n\n\t\tif (this.options.onSave) {\n\t\t\tthis.options.onSave(this.model);\n\t\t}\n\t\tthis.removeModal();\n\t},\n\tcolumnSelected: function (sender) {\n\t\tthis.dataTable.dataTable.row($(sender.currentTarget).closest('tr')).data().visible = $(sender.currentTarget).prop('checked');\n\t}\n});\n","PJQ.views.projects.ProjectInviteListDataTable = PJQ.views.dataTables.DataTable.extend({\n\tdefaults: {\n\t\tsubTemplates: {\n\t\t\theader: new PJQ.templating.Template(PJQ.constants.modules.PROJECTLIST, 'Data-Table-Header-Project-Invites-List')\n\t\t},\n\t\tdeferRender: true,\n\t\tlanguage: {\n\t\t\tzeroRecords: \"You haven't been sent any project invites yet\"\n\t\t},\n\t\tonGoToProject: _.noop,\n\t\tonUploadRevision: _.noop,\n\t\tonChangeReport: _.noop,\n\t\tonArchive: _.noop,\n\t\tonDelete: _.noop,\n\t\tonRecycle: _.noop,\n\t\tonRestore: _.noop,\n\t\tsettings: null\n\t},\n\tevents: {\n\t\t'keyup .datatable-search': 'search',\n\t\t'click .project-invites-list-clear-filters': 'clearFilters',\n\t\t'change .project-invites-list-favorite-filter': 'favoriteFilterChanged'\n\t},\n\tbeforeDataTableRender: function () {\n\t\tthis.options.scrollRows = PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.ENABLE_DATA_TABLE_FIXED_HEADER);\n\t},\n\tafterDataTableRender: function () {\n\t\tthis.$('input.project-invites-list-favorite-filter').prop('checked', this.options.settings.getFavoriteFilter());\n\t},\n\tgetFilterData: function () {\n\t\tlet favoriteFilter = this.options.settings.getFavoriteFilter();\n\t\tif (!favoriteFilter) {\n\t\t\treturn this.options.collection.models;\n\t\t}\n\n\t\treturn _.filter(this.options.collection.models, function (row) {\n\t\t\tif (favoriteFilter)\n\t\t\t\treturn row.attributes.isFavorite;\n\t\t}, this);\n\t},\n\tafterSearch: function () {\n\t\t//this.$('.project-selector-clear-filters').prop('disabled', _.size(this.$('input.datatable-search').val()) === 0 && _.size(this.projectStatusFilter) === 0);\n\t},\n\tfavoriteFilterChanged: function () {\n\t\tthis.options.settings.setFavoriteFilter(this.$('input.project-invites-list-favorite-filter').prop('checked'));\n\t\tthis.filter();\n\t},\n\tclearFilters: function () {\n\t\tthis.$('input.datatable-search').val('');\n\t\tthis.$('input.project-invites-list-favorite-filter').prop('checked', false);\n\t\tthis.options.settings.setFavoriteFilter(false);\n\n\t\tthis.filter();\n\t}\n});\n\nPJQ.views.projects.ProjectInvitesList = PJQ.views.BaseView.extend({\n\tdefaults: {\n\t\ttemplate: new PJQ.templating.Template(PJQ.constants.modules.PROJECTLIST, 'Project-Invites-List'),\n\t\tlanguage: {\n\t\t\tzeroRecords: \"You haven't been sent any project invites yet\"\n\t\t}\n\t},\n\tevents: {\n\t\t'click .btn-join-directory': 'joinDirectory',\n\t\t'click .btn-favorite-project': 'favoriteProject',\n\t\t'click .btn-go-to-project': 'goToProjectClicked',\n\t\t'click .btn-delete-project-invite': 'deleteProjectInviteClicked'\n\t},\n\tbeforeFirstRender: function () {\n\t\tif (this.collection == null) {\n\t\t\tthis.collection = new PJQ.collections.projects.Projects([], {\n\t\t\t\tisProjectInvites: true,\n\t\t\t\tisSimple: true\n\t\t\t});\n\t\t}\n\n\t\tthis.collection.fetch({\n\t\t\tsuccess: _.bind(function () {\n\t\t\t\tthis.render();\n\t\t\t}, this)\n\t\t});\n\t},\n\trenderData: function () {\n\t\treturn {\n\t\t\tcollection: this.collection\n\t\t};\n\t},\n\tafterRender: function () {\n\t\tlet columns;\n\t\tif (!this.collection.isFetched) {\n\t\t\tnew PJQ.Loader(this.$('.project-invites-list'));\n\t\t}\n\t\telse {\n\t\t\tif (PJQ.app.session.get('portalId') === 4) {\n\t\t\t\tcolumns = [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"columnData\": 'isFavorite',\n\t\t\t\t\t\t\"title\": '',\n\t\t\t\t\t\t\"render\": function (data, type, row) {\n\t\t\t\t\t\t\tif (type === 'sort' || type === 'type')\n\t\t\t\t\t\t\t\treturn row.attributes.isFavorite;\n\t\t\t\t\t\t\treturn row.attributes.isFavorite ? '' : '';\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"orderable\": false,\n\t\t\t\t\t\t\"searchable\": false,\n\t\t\t\t\t\t\"className\": \"text-center\",\n\t\t\t\t\t\t\"width\": \"60px\",\n\t\t\t\t\t\t\"visible\": true\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"data\": \"attributes.projectName\",\n\t\t\t\t\t\t\"title\": \"Name\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"data\": \"attributes.companyName\",\n\t\t\t\t\t\t\"title\": \"General Contractor\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"data\": \"attributes.city\",\n\t\t\t\t\t\t\"title\": \"City\",\n\t\t\t\t\t\t\"width\": \"20%\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"data\": \"attributes.state\",\n\t\t\t\t\t\t\"title\": \"State\",\n\t\t\t\t\t\t\"width\": \"20%\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"columnData\": 'bidsDue',\n\t\t\t\t\t\t\"data\": {\n\t\t\t\t\t\t\t\"_\": function (row) {\n\n\t\t\t\t\t\t\t\tlet dateTemp = new Date();\n\t\t\t\t\t\t\t\tif (row.attributes.bidsDue == null)\n\t\t\t\t\t\t\t\t\treturn dateTemp.addDays(-20000);\n\t\t\t\t\t\t\t\tif (row.attributes.rDueText === 'ASAP')\n\t\t\t\t\t\t\t\t\treturn dateTemp.addDays(-10000);\n\n\t\t\t\t\t\t\t\treturn new Date(row.attributes.bidsDue);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"filter\": \"attributes.bidsDue\",\n\t\t\t\t\t\t\t\"display\": function (row) {\n\t\t\t\t\t\t\t\tif (row.attributes.bidsDue == null)\n\t\t\t\t\t\t\t\t\treturn \"N/A\";\n\t\t\t\t\t\t\t\tif (row.attributes.rDueText === 'ASAP')\n\t\t\t\t\t\t\t\t\treturn row.attributes.rDueText;\n\n\t\t\t\t\t\t\t\treturn PJQ.helpers.dateHelpers.getDateString(new Date(row.attributes.bidsDue), PJQ.helpers.dateHelpers.dateFormats.DATE_TIME);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"title\": \"Bids Due\",\n\t\t\t\t\t\t\"width\": \"150px\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"data\": \"\",\n\t\t\t\t\t\t\"title\": \"\",\n\t\t\t\t\t\t\"orderable\": false,\n\t\t\t\t\t\t\"searchable\": false,\n\t\t\t\t\t\t\"width\": \"80px\",\n\t\t\t\t\t\t\"render\": function () {\n\t\t\t\t\t\t\treturn '
';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t\telse{\n\t\t\t\tlet includeColumnsDefault = 'projectName,city,state,bidsDue';\n\t\t\t\tthis.includeColumns = includeColumnsDefault;\n\n\t\t\t\tif ((this instanceof PJQ.views.projects.BiddingProjectsList) && PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.BIDDING_PROJECTS_INCLUDE_COLUMNS))\n\t\t\t\t\tthis.includeColumns = PJQ.app.session.preferences.getPref(PJQ.constants.preferenceTypes.BIDDING_PROJECTS_INCLUDE_COLUMNS);\n\n\t\t\t\tcolumns = [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"columnData\": 'isFavorite',\n\t\t\t\t\t\t\"title\": '',\n\t\t\t\t\t\t\"render\": function (data, type, row) {\n\t\t\t\t\t\t\tif (type === 'sort' || type === 'type')\n\t\t\t\t\t\t\t\treturn row.attributes.isFavorite;\n\t\t\t\t\t\t\treturn row.attributes.isFavorite ? '' : '';\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"orderable\": false,\n\t\t\t\t\t\t\"searchable\": false,\n\t\t\t\t\t\t\"className\": \"text-center\",\n\t\t\t\t\t\t\"width\": \"60px\",\n\t\t\t\t\t\t\"visible\": true\n\t\t\t\t\t}\n\t\t\t\t];\n\n\t\t\t\t_.each(this.includeColumns.split(','), _.bind(function(columnName) {\n\t\t\t\t\tswitch (columnName) {\n\t\t\t\t\t\tcase 'projectId':\n\t\t\t\t\t\t\tcolumns.push(\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"data\": \"attributes.projectId\",\n\t\t\t\t\t\t\t\t\t\"title\": \"Project Id\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'projectName':\n\t\t\t\t\t\t\tcolumns.push(\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"data\": \"attributes.projectName\",\n\t\t\t\t\t\t\t\t\t\"title\": \"Name\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'address1':\n\t\t\t\t\t\t\tcolumns.push(\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"data\": \"attributes.address1\",\n\t\t\t\t\t\t\t\t\t\"title\": \"Address 1\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'address2':\n\t\t\t\t\t\t\tcolumns.push(\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"data\": \"attributes.address2\",\n\t\t\t\t\t\t\t\t\t\"title\": \"Address 2\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'city':\n\t\t\t\t\t\t\tcolumns.push(\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"data\": \"attributes.city\",\n\t\t\t\t\t\t\t\t\t\"title\": \"City\",\n\t\t\t\t\t\t\t\t\t\"width\": (this.includeColumns === includeColumnsDefault) ? \"20%\" : null\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'state':\n\t\t\t\t\t\t\tcolumns.push({\n\t\t\t\t\t\t\t\t\"data\": \"attributes.state\",\n\t\t\t\t\t\t\t\t\"title\": \"State\",\n\t\t\t\t\t\t\t\t\"width\": (this.includeColumns === includeColumnsDefault) ? \"20%\" : null\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'zip':\n\t\t\t\t\t\t\tcolumns.push({\n\t\t\t\t\t\t\t\t\"data\": \"attributes.zip\",\n\t\t\t\t\t\t\t\t\"title\": \"Zip\"\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'country':\n\t\t\t\t\t\t\tcolumns.push({\n\t\t\t\t\t\t\t\t\"data\": \"attributes.country\",\n\t\t\t\t\t\t\t\t\"title\": \"Country\"\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'created':\n\t\t\t\t\t\t\tcolumns.push({\n\t\t\t\t\t\t\t\t\"columnData\": \"created\",\n\t\t\t\t\t\t\t\t\"data\": {\n\t\t\t\t\t\t\t\t\t\"_\": function (row) {\n\t\t\t\t\t\t\t\t\t\treturn new Date(row.attributes.created);\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"filter\": \"attributes.created\",\n\t\t\t\t\t\t\t\t\t\"display\": function (row) {\n\t\t\t\t\t\t\t\t\t\treturn PJQ.helpers.dateHelpers.getDateString(new Date(row.attributes.created), PJQ.helpers.dateHelpers.dateFormats.DATE_TIME, true);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"title\": \"Created\"\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'bidsDue':\n\t\t\t\t\t\t\tcolumns.push({\n\t\t\t\t\t\t\t\t\"columnData\": 'bidsDue',\n\t\t\t\t\t\t\t\t\"data\": {\n\t\t\t\t\t\t\t\t\t\"_\": function (row) {\n\n\t\t\t\t\t\t\t\t\t\tlet dateTemp = new Date();\n\t\t\t\t\t\t\t\t\t\tif (row.attributes.bidsDue == null)\n\t\t\t\t\t\t\t\t\t\t\treturn dateTemp.addDays(-20000);\n\t\t\t\t\t\t\t\t\t\tif (row.attributes.rDueText === 'ASAP')\n\t\t\t\t\t\t\t\t\t\t\treturn dateTemp.addDays(-10000);\n\n\t\t\t\t\t\t\t\t\t\treturn new Date(row.attributes.bidsDue);\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"filter\": \"attributes.bidsDue\",\n\t\t\t\t\t\t\t\t\t\"display\": function (row) {\n\t\t\t\t\t\t\t\t\t\tif (row.attributes.bidsDue == null)\n\t\t\t\t\t\t\t\t\t\t\treturn \"N/A\";\n\t\t\t\t\t\t\t\t\t\tif (row.attributes.rDueText === 'ASAP')\n\t\t\t\t\t\t\t\t\t\t\treturn row.attributes.rDueText;\n\n\t\t\t\t\t\t\t\t\t\treturn PJQ.helpers.dateHelpers.getDateString(new Date(row.attributes.bidsDue), PJQ.helpers.dateHelpers.dateFormats.DATE_TIME);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"title\": \"Bids Due\",\n\t\t\t\t\t\t\t\t\"width\": \"150px\"\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'startDate':\n\t\t\t\t\t\t\tcolumns.push({\n\t\t\t\t\t\t\t\t\"columnData\": \"startDate\",\n\t\t\t\t\t\t\t\t\"data\": {\n\t\t\t\t\t\t\t\t\t\"_\": function (row) {\n\t\t\t\t\t\t\t\t\t\treturn new Date(row.attributes.startDate);\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"filter\": \"attributes.startDate\",\n\t\t\t\t\t\t\t\t\t\"display\": function (row) {\n\t\t\t\t\t\t\t\t\t\treturn row.attributes.startDate ? PJQ.helpers.dateHelpers.getDateString(new Date(row.attributes.startDate), PJQ.helpers.dateHelpers.dateFormats.DATE, true) : 'N/A';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"title\": \"Start Date\"\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'endDate':\n\t\t\t\t\t\t\tcolumns.push({\n\t\t\t\t\t\t\t\t\"columnData\": \"endDate\",\n\t\t\t\t\t\t\t\t\"data\": {\n\t\t\t\t\t\t\t\t\t\"_\": function (row) {\n\t\t\t\t\t\t\t\t\t\treturn new Date(row.attributes.endDate);\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"filter\": \"attributes.endDate\",\n\t\t\t\t\t\t\t\t\t\"display\": function (row) {\n\t\t\t\t\t\t\t\t\t\treturn row.attributes.endDate ? PJQ.helpers.dateHelpers.getDateString(new Date(row.attributes.endDate), PJQ.helpers.dateHelpers.dateFormats.DATE, true) : 'N/A';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"title\": \"End Date\"\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'userDisplayName':\n\t\t\t\t\t\t\tcolumns.push({\n\t\t\t\t\t\t\t\t\"columnData\": 'userDisplayName',\n\t\t\t\t\t\t\t\t\"data\": {\n\t\t\t\t\t\t\t\t\t\"_\": function (row) {\n\t\t\t\t\t\t\t\t\t\treturn (row.attributes.user && row.attributes.user.displayName) ? row.attributes.user.displayName : '';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"title\": PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.PROJECT_USER_1_LABEL) ? PJQ.app.session.preferences.getPref(PJQ.constants.preferenceTypes.PROJECT_USER_1_LABEL) : \"Project Contact\"\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'user2DisplayName':\n\t\t\t\t\t\t\tcolumns.push({\n\t\t\t\t\t\t\t\t\"columnData\": 'user2DisplayName',\n\t\t\t\t\t\t\t\t\"data\": {\n\t\t\t\t\t\t\t\t\t\"_\": function (row) {\n\t\t\t\t\t\t\t\t\t\treturn (row.attributes.user2 && row.attributes.user2.displayName) ? row.attributes.user2.displayName : '';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"title\": PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.PROJECT_USER_2_LABEL) ? PJQ.app.session.preferences.getPref(PJQ.constants.preferenceTypes.PROJECT_USER_2_LABEL) : \"Project Contact 2\"\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tif (columnName.startsWith('fieldValue')) {\n\t\t\t\t\t\t\t\t// Project Custom Fields\n\t\t\t\t\t\t\t\t_.each(PJQ.app.session.customFields.project[(PJQ.app.session.preferences.hasPref('portalOwner') ? PJQ.app.session.preferences.getPref('portalOwner') : PJQ.app.session.get('masterUserId'))].models, _.bind(function (customField) {\n\t\t\t\t\t\t\t\t\tif (columnName === 'fieldValue' + customField.get('fieldNumber'))\n\t\t\t\t\t\t\t\t\t\tcolumns.push({\n\t\t\t\t\t\t\t\t\t\t\t\"columnData\": 'fieldValue' + customField.get('fieldNumber'),\n\t\t\t\t\t\t\t\t\t\t\t\"title\": customField.get('fieldName'),\n\t\t\t\t\t\t\t\t\t\t\t\"render\": function (data, type, row) {\n\t\t\t\t\t\t\t\t\t\t\t\tlet fieldValue = row.getCustomFieldValue(customField.get('id'));\n\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = fieldValue ? fieldValue : '';\n\t\t\t\t\t\t\t\t\t\t\t\tswitch (customField.get('fieldType')) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tcase PJQ.constants.customFields.fieldTypes.TEXT:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (fieldValue && type !== 'sort' && type !== 'type') {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (PJQ.helpers.urlHelpers.isURL(fieldValue))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = '' + fieldValue + '';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t\t\t\tcase PJQ.constants.customFields.fieldTypes.DATE:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (fieldValue) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (type !== 'sort' && type !== 'type')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = PJQ.helpers.dateHelpers.getDateString(new Date(fieldValue), PJQ.helpers.dateHelpers.dateFormats.DATE, true);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (fieldValue === undefined)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = '';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\tcase PJQ.constants.customFields.fieldTypes.DATETIME:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (fieldValue) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (type !== 'sort' && type !== 'type')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = PJQ.helpers.dateHelpers.getDateString(new Date(fieldValue), PJQ.helpers.dateHelpers.dateFormats.DATE_TIME, !PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.ENABLE_NEW_PROJECT_WALL) && !PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.NEW_APP_PORTAL));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (fieldValue === undefined)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = '';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\tcase PJQ.constants.customFields.fieldTypes.BOOL:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (fieldValue != null)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = fieldValue ? 'Yes' : 'No';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = '';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\tcase PJQ.constants.customFields.fieldTypes.CHOICE:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (fieldValue) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlet choices = [];\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// convert single choice value into array so that the logic below can work for both types.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (typeof fieldValue === 'number')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = [fieldValue];\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t_.each(customField.choices.models, _.bind(function (choice) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (_.find(fieldValue, function (value) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn value === choice.get('id');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tchoices.push(choice.get('choiceName'));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}, this));\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = choices.join((', '));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\tcase PJQ.constants.customFields.fieldTypes.MONEY:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (type === 'sort' || type === 'type') {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (fieldValue && fieldValue !== '$')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = parseFloat(PJQ.helpers.formatHelpers.numbersOnly(fieldValue, true));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = 0;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = PJQ.helpers.formatHelpers.formatCurrency(parseInt(PJQ.helpers.formatHelpers.numbersOnly(fieldValue)));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\tcase PJQ.constants.customFields.fieldTypes.INT:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (type !== 'sort' && type !== 'type' && fieldValue) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfieldValue = parseInt(fieldValue).toLocaleString();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\treturn fieldValue;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t}, this));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\t\t\t\t}, this));\n\n\t\t\t\tcolumns.push({\n\t\t\t\t\t\t\"data\": \"\",\n\t\t\t\t\t\t\"title\": \"\",\n\t\t\t\t\t\t\"orderable\": false,\n\t\t\t\t\t\t\"searchable\": false,\n\t\t\t\t\t\t\"width\": (this instanceof PJQ.views.projects.BiddingProjectsList) ? \"50px\" : \"80px\",\n\t\t\t\t\t\t\"render\": _.bind(function () {\n\t\t\t\t\t\t\tlet html = '
';\n\n\t\t\t\t\t\t\tif (!(this instanceof PJQ.views.projects.BiddingProjectsList))\n\t\t\t\t\t\t\t\thtml += '';\n\n\t\t\t\t\t\t\thtml += '
';\n\t\t\t\t\t\t\treturn html;\n\t\t\t\t\t\t}, this)\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis.dataTable = new PJQ.views.projects.ProjectInviteListDataTable({\n\t\t\t\tel: this.$('.project-invites-list'),\n\t\t\t\tcollection: this.collection,\n\t\t\t\tdata: this.collection.models,\n\t\t\t\tlanguage: this.options.language,\n\t\t\t\tcontextMenuOptions: {\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Go to Project',\n\t\t\t\t\t\t\tonClick: _.bind(function (row) {\n\t\t\t\t\t\t\t\tthis.goToProject(row.data());\n\t\t\t\t\t\t\t}, this)\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Delete',\n\t\t\t\t\t\t\ticonClass: 'fal fa-trash',\n\t\t\t\t\t\t\tisDanger: true,\n\t\t\t\t\t\t\tonClick: _.bind(function (row) {\n\t\t\t\t\t\t\t\tthis.deleteProjectInvite(row.data().id);\n\t\t\t\t\t\t\t}, this),\n\t\t\t\t\t\t\tisShown: _.bind(function() {\n\t\t\t\t\t\t\t\treturn !(this instanceof PJQ.views.projects.BiddingProjectsList);\n\t\t\t\t\t\t\t}, this)\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\torderCookie: PJQ.constants.cookies.PROJECT_INVITES_ORDER_COOKIE,\n\t\t\t\torder: [[4, \"desc\"]],\n\t\t\t\tcolumns: columns,\n\t\t\t\tdom: '<\"top\"<\"clear\"><\"project-list-buttons\"><\"project-list-buttons-right\">p>rt<\"bottom\"p<\"clear\">>',\n\t\t\t\tonRowDoubleClick: _.bind(function (row) {\n\t\t\t\t\tthis.goToProject(row.data());\n\t\t\t\t}, this),\n\t\t\t\tonGoToProject: _.bind(function (row) {\n\t\t\t\t\tthis.goToProject(row.data());\n\t\t\t\t}, this),\n\t\t\t\tsettings: new PJQ.models.projects.ProjectInvitesSettings()\n\t\t\t});\n\t\t}\n\t},\n\tdeleteProjectInviteClicked: function (e) {\n\t\tlet row = this.dataTable.getRow($(e.currentTarget).closest('tr'));\n\t\tthis.deleteProjectInvite(row.data().id);\n\t},\n\tdeleteProjectInvite: function (projectId) {\n\t\tnew PJQ.views.modals.DeleteCancel({\n\t\t\theader: \"Confirm Deletion\",\n\t\t\tbody: \"Are you sure you want to permanently delete this project invite? It will never appear in your invites list again after it is deleted.\",\n\t\t\tonDelete: _.bind(function () {\n\t\t\t\tnew PJQ.ajax.Request({\n\t\t\t\t\tendpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tendpoint: 'projects'\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tendpoint: 'invites',\n\t\t\t\t\t\t\tvalue: projectId\n\t\t\t\t\t\t}\n\t\t\t\t\t])\n\t\t\t\t}).delete().done(_.bind(function () {\n\t\t\t\t\tlet project = this.collection.get(projectId),\n\t\t\t\t\t\trow = this.dataTable.getRow(project.cid);\n\t\t\t\t\tthis.dataTable.removeRow(row);\n\t\t\t\t\tPJQ.notifications.notify.successNotify({\n\t\t\t\t\t\tmessage: 'Project Invite successfully deleted'\n\t\t\t\t\t});\n\t\t\t\t}, this));\n\t\t\t}, this)\n\t\t});\n\t},\n\tjoinDirectory: function () {\n\t\tPJQ.app.session.joinDirectory(_.bind(function () {\n\t\t\tthis.render();\n\t\t}, this));\n\t},\n\tfavoriteProject: function (e) {\n\t\tlet row = this.dataTable.getRow($(e.currentTarget).closest('tr')),\n\t\t\tproject = row.data();\n\t\tthis.favoriteProjectList([project.id], !project.get('isFavorite'));\n\t},\n\tfavoriteProjectList: function (ids, isFavorite) {\n\t\tlet endpoint = PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t{\n\t\t\t\tendpoint: 'projects'\n\t\t\t},\n\t\t\t{\n\t\t\t\tendpoint: 'favorites'\n\t\t\t}\n\t\t], [\n\t\t\t{\n\t\t\t\tparameter: \"projects\",\n\t\t\t\tvalue: ids\n\t\t\t},\n\t\t\t{\n\t\t\t\tparameter: \"isFavorite\",\n\t\t\t\tvalue: isFavorite\n\t\t\t}\n\t\t]);\n\t\tnew PJQ.ajax.Request({\n\t\t\tendpoint: endpoint\n\t\t}).post().done(_.bind(function () {\n\t\t\t_.each(ids, _.bind(function (id) {\n\t\t\t\t_.each(this.dataTable.options.collection.models, function (row) {\n\t\t\t\t\tif (row.attributes.projectId === id)\n\t\t\t\t\t\trow.attributes.isFavorite = isFavorite;\n\t\t\t\t}, this);\n\n\t\t\t\tlet $favoriteButton = $('.btn-favorite-project[data-project-id=\"' + id + '\"] i');\n\t\t\t\tif (isFavorite) {\n\t\t\t\t\t$favoriteButton.removeClass('far').addClass(('fas'));\n\t\t\t\t\t$favoriteButton.removeClass('text-muted').addClass(('text-gold'));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$favoriteButton.removeClass('fas').addClass(('far'));\n\t\t\t\t\t$favoriteButton.removeClass('text-gold').addClass(('text-muted'));\n\t\t\t\t}\n\t\t\t}, this));\n\t\t}, this)).fail(function () {\n\t\t});\n\n\t},\n\tgoToProjectClicked: function (e) {\n\t\tlet row = this.dataTable.getRow($(e.currentTarget).closest('tr'));\n\t\tthis.goToProject(row.data());\n\t},\n\tgoToProject: function (project) {\n\t\tPJQ.app.router.navigate('projects/' + project.id.toString(), {\n\t\t\ttrigger: true\n\t\t});\n\t}\n});\n\nPJQ.views.projects.BiddingProjectsList = PJQ.views.projects.ProjectInvitesList.extend({\n\tdefaults: {\n\t\ttemplate: new PJQ.templating.Template(PJQ.constants.modules.PROJECTLIST, 'bidding-projects-list'),\n\t\tlanguage: {\n\t\t\tzeroRecords: \"There are no bidding projects available at this time\"\n\t\t}\n\t},\n\tbeforeFirstRender: function () {\n\t\tif (PJQ.app.session.contact != null && PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.BIDDING_PROJECTS_REQUIRE_APPROVAL) && PJQ.app.session.contact.get('isApprovalRequired')) {\n\t\t\tthis.collection = null;\n\t\t\tthis.needsApproval = true;\n\t\t}\n\t\telse {\n\t\t\tif (this.collection == null) {\n\t\t\t\tthis.collection = new PJQ.collections.projects.Projects([], {\n\t\t\t\t\tisBidding: true\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tlet callback = _.bind(function() {\n\t\t\t\tthis.collection.fetch({\n\t\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\t\tthis.render();\n\t\t\t\t\t}, this)\n\t\t\t\t});\n\t\t\t}, this);\n\n\t\t\tif (PJQ.app.session.get('portalId') !== 4) {\n\t\t\t\tPJQ.app.session.fetchProjectCustomFields((PJQ.app.session.preferences.hasPref('portalOwner') ? PJQ.app.session.preferences.getPref('portalOwner') : PJQ.app.session.get('masterUserId')),\n\t\t\t\t\t_.bind(function () {\n\t\t\t\t\t\tcallback();\n\t\t\t\t\t}, this));\n\t\t\t}\n\t\t\telse\n\t\t\t\tcallback();\n\t\t}\n\t},\n\tafterRender: function () {\n\t\tif (this.collection != null) {\n\t\t\tPJQ.views.projects.ProjectInvitesList.prototype.afterRender.call(this, ...arguments);\n\t\t}\n\t},\n\trenderData: function () {\n\t\treturn {\n\t\t\tcollection: this.collection,\n\t\t\tneedsApproval: this.needsApproval === true\n\t\t}\n\t},\n\tgoToProject: function (project) {\n\t\tnew PJQ.ajax.Request({\n\t\t\tendpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t\t{\n\t\t\t\t\tendpoint: 'projects',\n\t\t\t\t\tvalue: project.get('accessKey')\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tendpoint: 'follow'\n\t\t\t\t}\n\t\t\t])\n\t\t}).get().done(_.bind(function () {\n\t\t\tPJQ.app.router.navigate('projects/' + project.id.toString(), {\n\t\t\t\ttrigger: true\n\t\t\t});\n\t\t}, this));\n\t}\n});\n","PJQ.inputs.SelectpickerProjectMessageSendOptions = PJQ.inputs.Selectpicker.extend({\n\tonChange: function (event, clickedIndex) {\n\t\tthis.lastValue = this.getValue();\n\n\t\tif (_.size(this.lastValue) === 0) {\n\t\t\tthis.setValue([\"1\"]);\n\t\t} else if (this.options.isMultiple && _.size(this.options.exclusiveChoices) > 0) {\n\t\t\tlet exclusiveChoices = [],\n\t\t\t\tchoice = $(this.$el.find('option')[clickedIndex]).attr('value');\n\t\t\tif (PJQ.helpers.objectHelpers.refinedType(this.options.exclusiveChoices) === 'array')\n\t\t\t\texclusiveChoices = this.options.exclusiveChoices;\n\t\t\telse\n\t\t\t\texclusiveChoices.push(this.options.exclusiveChoices);\n\n\t\t\tthis.lastValue = (_.indexOf(exclusiveChoices, choice) !== -1) ? [\"1\", choice] : _.union([\"1\"], _.filter(this.lastValue, function (item) {\n\t\t\t\treturn _.indexOf(exclusiveChoices, item) === -1;\n\t\t\t}));\n\n\t\t\tthis.setValue(this.lastValue);\n\t\t}\n\t\tif (this.options.isMirrorOptionColors && !this.options.isMultiple) {\n\t\t\tthis.setInputColors();\n\t\t}\n\n\t\tthis.options.onChange(this.lastValue);\n\t}\n});"]}