{"version":3,"sources":["1initializers.js","2constants.js","newreportmodels.js","newreportviews.js","reportsmodels.js","reportsviews.js"],"names":["PJQ","collections","reports","models","views","modules","routes","route","name","callback","app","initNavigator","activeItem","addRoutes","constants","dynamicDates","value","display","supportedCustomFieldTypes","reportCategorySort","Custom Reports","Contacts","Project General","Field Tools","Job Costing","makeCustomReportType","key","columns","arguments","length","undefined","filters","type","viewItemColumn","viewRelatedItemColumn","isCustom","category","reportTypes","PROJECT_CONTACTS","isGlobalLevel","isIntChoices","isMultiple","inputType","choices","_choices","_asyncToGenerator","_regeneratorRuntime","mark","_callee2","options","wrap","_context2","prev","next","abrupt","Promise","_ref","_callee","res","rej","_context","session","fetchUserTypes","userTypes","_","map","userType","id","get","stop","_x2","_x3","apply","this","_x","PREQUAL","isProjectLevel","filterProjects","_columns","_callee3","result","formData","fnMakeCol","fieldCols","hasContactFields","cGroup","_context3","fetchPrequalForm","sent","size","tabs","push","group","isControlled","fieldName","templating","TemplateRenderer","parseMarkup","currentYear","helpers","dateHelpers","getCurrentYear","_toConsumableArray","tab","prequalTabId","tabName","baseColumns","dates","col","each","filter","fields","field","fieldType","indexOf","toUpperCase","toLowerCase","findWhere","constraints","customFieldId","prequalFieldId","dynamicKey","CONTRACT","primeContracts","primeContractStatus","statusId","primeContractStatusNames","CONTRACT_CHANGE_ORDER","changeOrderStatus","changeOrderStatusNames","CHANGE_REQUEST","changeRequests","changeRequestStatus","changeRequestStatusNames","scope","scopeNames","COMMITMENT","commitments","commitmentStatus","commitmentStatusNames","COMMITMENT_CHANGE_ORDER","CUSTOM","DIRECT_COST","directcosts","directCostStatus","directCostStatusNames","PAYABLE_INVOICE","invoicing","payableInvoiceStatus","payableInvoiceStatusNames","PAYABLE_INVOICE_PAYMENT","RECEIVABLE_INVOICE","receivableInvoiceStatus","receivableInvoiceStatusNames","RECEIVABLE_INVOICE_PAYMENT","ACTION_ITEM","customFields","fetchActionItemCustomFields","actionItems","statuses","statusNames","PUNCH_LIST","fetchPunchListCustomFields","punchlists","RFI","rfi","SUBMITTAL","fetchSubmittalCustomFields","_choices2","_callee5","_context5","_ref2","_callee4","_context4","project","fetchSubmittalStatuses","status","_x5","_x6","_x4","MEETING","meetings","meetingStatus","meetingStatusNames","DAILY_REPORT","sortName","dailyReports","DAILY_REPORT_DELIVERY","DAILY_REPORT_WORK_LOG","DAILY_REPORT_NOTE","filterTypes","DATE","DATE_RANGE","SELECT","date","WEEKDAYNAMES","short","shortest","long","bit","NewReport","BaseModel","extend","defaults","isAPIv2","idAttribute","endpoint","isNew","urlHelpers","generateEndpoint","parse","model","getReportOptions","opts","getFilters","setFilters","set","trigger","resetFilters","setTimezone","timezone","getColumns","reportOptions","setColumns","generate","_this","ajax","Request","data","toJSON","post","done","bind","response","reportData","export","_this2","format","pData","reportResult","rows","success","files","downloadFile","url","isEndpoint","CustomReport","projectId","_this3","params","parameter","attributes","fail","generatePreview","_this4","ReportOptions","NewReportList","BaseCollection","CustomReports","reporting","NewReportView","BaseView","template","Template","REPORTS","subTemplates","reportError","events","click .create-report","click .btn-save-report","click .btn-generate-report","click .btn-reset-filters","click .input-my-projects","click .input-toggle-specific-dates","click .report-export-excel","click .report-export-pdf","click .btn-custom-export","click .btn-delete-report","click .btn-clear-report","beforeFirstRender","_beforeFirstRender","_callee6","_context6","collection","customReports","fetch","projects","Projects","isSimple","fetchProjectStatuses","render","renderData","report","reportType","reportList","getReportChoices","_this5","rTypes","groupBy","sortBy","toString","rt","s","_makeCustomReportType","_callee8","_context8","_ref3","_callee7","_report$get","_report$columns","_report$filters","reportOpts","hasProjectCustomFieldFilter","projectCustomFields","_context7","find","projectCustomFieldId","fetchProjectCustomFields","choice","_x9","_x10","_x7","_x8","afterRender","_afterRender","_callee9","selectedReportId","_this6","_context9","reportTypePicker","inputs","Selectpicker","el","$","defaultValue","noneSelectedText","onChange","startsWith","reportId","parseInt","replace","savedReportPicker","isDisabled","renderReport","populateReportSelect","renderDataTable","generateReport","_this7","validate","then","content","unescapedHtml","unescapeHtml","iframe","document","createElement","style","width","height","border","onload","contentWindow","open","write","close","container","innerHTML","appendChild","loader","Loader","reportFilters","remove","html","textArea","exportExcel","dataTable","order","toArray","exportPDF","exportCustom","loadingText","toggleSpecificDates","e","$switch","currentTarget","$container","closest","$dynamicDateInput","$specificDateInput","prop","hide","selectpicker","show","val","deleteReport","modals","DeleteCancel","header","body","onDelete","destroy","clearReport","toggleMyProjects","$input","isChecked","checked","isMyProjects","stopListening","clone","attr","listenTo","hasChanged","renderFilterInputs","getColumnChoices","_getColumnChoices","_callee10","columnGroups","fnMakeChoice","_context10","column","_renderFilterInputs","_callee12","columnChoices","_this8","_context12","columnsPicker","isLiveSearch","projectsSelector","ProjectSelectorInput","isSingleChoice","canEdit","emptyNotice","selectedProjectIds","selectedProjects","idArr","projectStatusPicker","projectStatuses","_ref4","_callee11","$range","dateRange","defaultDateOne","defaultDateTwo","fnSetFilter","datePickerFrom","datePickerTo","filterVal","dynVal","_context11","parseDateString","date1","date2","Datepicker","datepickerOptions","dateFormats","datePicker","defaultDate","getDateString","setValueSilently","_x11","filteredMoneyColumns","cOrder","columnOrder","ReportCenterDataTable","paging","hasFooter","columnData","orderByChanged","details","dir","columnOrderChanged","afterDataTableRender","renderTableFooter","viewItem","viewReportItem","viewRelatedItem","viewRelatedReportItem","$footer","first","index","total","row","formatHelpers","numbersOnly","eq","text","formatCurrency","EditPayableInvoiceModal","PayableInvoice","EditReceivableInvoiceModal","ReceivableInvoice","DirectCostEditModal","DirectCost","CommitmentEditModal","Commitment","PrimeContractEditModal","PrimeContract","ChangeOrderEditModal","ChangeOrder","isValid","hideError","showError","saveReport","EditReportModal","onSave","save","add","notifications","notify","successNotify","message","groupedReports","updateChoices","setValue","enable","disable","BaseModal","maxWidth","isShowCloseButton","click .btn-close","click .btn-save","beforeRender","Binder","$el","watchElements","setInputFocus","input","focus","setSelectionRange","removeModal","dataTables","DataTable","language","emptyTable","zeroRecords","colReorder","realtime","click .view-item","click .view-related-item","afterHeaderRender","dataValue","title","displayValue","dt","props","stopImmediatePropagation","Report","getExtraParameters","parameters","ReportParameters","extraParamsArray","split","param","customField","thisReportParam","parameterObject","ReportParameter","inputDisplayName","option","splitOption","includes","ProjectCustomField","contacts","CompanyCustomField","ContactCustomField","users","Users","fnRender","objectHelpers","refinedType","customChoices","unshift","isFetched","ReportList","SubcontractorDiversityStatusExportModal","click .export","afterModalCreated","statePicker","StatePicker","country","values","getValue","onDownload","ReportView","testReport","extraParameters","click .export-report","click .btn-reload-report","selectedReport","renderCustomReportMarketing","fromDatePicker","calculateDate","Date","toDatePicker","renderExtraParameters","exportReport","reportParams","Object","keys","JSON","stringify","exportType","reloadReport","empty","addClass","src","isImage","renderError","renderSubTemplate","mathArr","daysInMonth","dnow","thisMonth","getMonth","thisDay","getDate","thisYear","getFullYear","thisMonthMath","thisDayMath","thisYearMath","thisMonthIsStatic","thisDayIsStatic","thisYearIsStatic","GetDaysInMonth","extraParams","cid"],"mappings":"s4PAAAA,IAAAC,YAAAC,QAAA,GAEAF,IAAAG,OAAAD,QAAA,GAEAF,IAAAI,MAAAF,QAAA,GAEAF,IAAAK,QAAAH,QAAA,CACAI,OAAA,CACA,CACAC,MAAA,UACAC,KAAA,UACAC,SAAA,WACAT,IAAAU,IAAAC,cAAA,CACAC,WAAA,cAIA,CACAL,MAAA,eACAC,KAAA,eACAC,SAAA,WACAT,IAAAU,IAAAC,cAAA,CACAC,WAAA,qBAMAZ,IAAAU,IAAAG,UAAAb,IAAAK,QAAAH,QAAAI,QC5BAN,IAAAc,UAAAZ,QAAA,CACAa,aAAA,CACA,CACAC,MAAA,WACAC,QAAA,aAEA,CACAD,MAAA,gBACAC,QAAA,iBAEA,CACAD,MAAA,kBACAC,QAAA,iBAEA,CACAD,MAAA,YACAC,QAAA,gBAEA,CACAD,MAAA,eACAC,QAAA,gBAEA,CACAD,MAAA,WACAC,QAAA,aAEA,CACAD,MAAA,iBACAC,QAAA,mBAEA,CACAD,MAAA,kBACAC,QAAA,oBAE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,IAEApB,sBAAA,WACAzgB,KAAAmgB,gBAAAngB,KAAAmgB,eAAAxgB,IAAA,oBAAA,SAAAK,KAAAmgB,eAAAxgB,IAAA,mBACAK,KAAAmgB,eAAAzC,mBAAAne,EAAAwK,KAAA,SAAAiB,GAEAhL,KAAAuhB,mBAAA,EAAAvhB,KAAAxB,QAAAwN,aAAAgU,gBAAAhgB,KAAAoQ,EAAA,2BAAA,CACAoS,YAAAxX,EAAAtP,SAIA6D,EAAA6C,KAAA4I,EAAAtP,OAAA,SAAAqiB,GACA,WAAAA,EAAApe,IAAA,aAAAgD,cACA,IAAApH,IAAA0U,OAAAC,aAAA,CACAC,GAAAnQ,KAAAoQ,EAAA,UAAA2N,EAAA0E,KACApS,aAAA0N,EAAApe,IAAA,gBACA4Q,SAAAhR,EAAAwK,KAAA,SAAAxN,GACAwhB,EAAAhV,IAAA,QAAAxM,IACAyD,QAGA,SAAA+d,EAAApe,IAAA,aAAAgD,cACA,IAAApH,IAAA0U,OAAA0H,WAAA,CACAxH,GAAAnQ,KAAAoQ,EAAA,IAAA2N,EAAA0E,KACA7K,kBAAA,CAEAxN,OAAA7O,IAAAmG,QAAAC,YAAAkW,YAAAC,WAAAxQ,MAEAiJ,SAAAhR,EAAAwK,KAAA,SAAAxN,GACAwhB,EAAAhV,IAAA,QAAAxM,IACAyD,QAIA,IAAAzE,IAAA0gB,OAAAjc,KAAAkc,IAAA6B,EAAA,CACA5B,cAAA,CACA,IAAA4B,EAAA0E,QAIAziB,MAEAA,KAAAiR,eAAAjG,IACAhL,OAIAA,KAAAiR","file":"app.js","sourcesContent":["PJQ.collections.reports = {};\n\nPJQ.models.reports= {};\n\nPJQ.views.reports = {};\n\nPJQ.modules.reports = {\n\troutes: [\n\t\t{\n\t\t\troute: 'reports',\n\t\t\tname: 'reports',\n\t\t\tcallback: function () {\n\t\t\t\tPJQ.app.initNavigator({\n\t\t\t\t\tactiveItem: \"reports\"\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\troute: 'reportsadhoc',\n\t\t\tname: 'reportsadhoc',\n\t\t\tcallback: function () {\n\t\t\t\tPJQ.app.initNavigator({\n\t\t\t\t\tactiveItem: \"reportsadhoc\"\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t]\n};\nPJQ.app.addRoutes(PJQ.modules.reports.routes);","PJQ.constants.reports = {\n    dynamicDates: [\n        {\n            value: \"pastYear\",\n            display: \"Past Year\"\n        },\n        {\n            value: \"pastSixMonths\",\n            display: \"Past 6 Months\"\n        },\n        {\n            value: \"pastThreeMonths\",\n            display: \"Past 3 Months\"\n        },\n        {\n            value: \"pastMonth\",\n            display: \"Past 1 Month\"\n        },\n        {\n            value: \"pastTwoWeeks\",\n            display: \"Past 2 Weeks\"\n        },\n        {\n            value: \"pastWeek\",\n            display: \"Past Week\"\n        },\n        {\n            value: \"sinceYesterday\",\n            display: \"Since Yesterday\"\n        },\n        {\n            value: \"throughTomorrow\",\n            display: \"Through Tomorrow\"\n        },\n        {\n            value: \"nextWeek\",\n            display: \"Next Week\"\n        },\n        {\n            value: \"nextTwoWeeks\",\n            display: \"Next 2 Weeks\"\n        },\n        {\n            value: \"nextMonth\",\n            display: \"Next 1 Month\"\n        },\n        {\n            value: \"nextThreeMonths\",\n            display: \"Next 3 Months\"\n        },\n        {\n            value: \"nextSixMonths\",\n            display: \"Next 6 Months\"\n        },\n        {\n            value: \"nextYear\",\n            display: \"Next 1 Year\"\n        }\n    ],\n    supportedCustomFieldTypes: [\n        'INT',\n        'PERCENT',\n        'MONEY',\n        'STATE',\n        // 'CALC',\n        'PHONE',\n        'TEXT',\n        'TEXTAREA',\n        'BOOL',\n        'CHOICE',\n        // GRID: 'GRID',\n        // 'CUSTOMGRID'\n        // 'GROUPSELECT',\n        // 'REGIONSELECT',\n        // 'DOWNLOAD',\n        // 'UPLOAD',\n        // 'FILE',\n        'DATE',\n        // 'TIME',\n        'DATETIME',\n    ],\n    reportCategorySort: {\n        \"Custom Reports\": 1,\n        \"Contacts\": 2,\n        \"Project General\": 3,\n        \"Field Tools\": 4,\n        \"Job Costing\": 5\n    },\n    makeCustomReportType: function (key, name, columns = [], filters = []) {\n        return {\n            name: name,\n            type: key,\n            key: key,\n            viewItemColumn: '',\n            viewRelatedItemColumn: '',\n            isCustom: true,\n            category: '',\n            columns: columns ?? [],\n            filters: filters ?? []\n        };\n    },\n    reportTypes: {\n        PROJECT_CONTACTS: {\n            name: 'Project Contacts',\n            type: 'projectContacts',\n            key: 'PROJECT_CONTACTS',\n            category: 'Contacts',\n            isGlobalLevel: false,\n            columns: [\n                {\n                    value: \"project\",\n                    display: \"Project\"\n                },\n                {\n                    value: \"userType\",\n                    display: \"User Type\"\n                },\n                {\n                    value: \"companyName\",\n                    display: \"Company Name\"\n                },\n                {\n                    value: \"contactName\",\n                    display: \"Contact Name\"\n                },\n                {\n                    value: \"email\",\n                    display: \"Email\"\n                },\n                {\n                    value: \"phone\",\n                    display: \"Phone\"\n                },\n                {\n                    value: \"cell\",\n                    display: \"Cell\"\n                },\n                {\n                    value: \"trades\",\n                    display: \"Trades\"\n                }\n            ],\n            filters: [\n                {\n                    name: 'User Types',\n                    key: 'userTypes',\n                    isIntChoices: true,\n                    isMultiple: true,\n                    inputType: 'select',\n                    choices: async function (options) {\n                        return new Promise(async (res, rej) => {\n                            PJQ.app.session.fetchUserTypes((userTypes) => {\n                                res(_.map(userTypes.models, (userType) => {\n                                    return {\n                                        id: userType.id,\n                                        name: userType.get('name')\n                                    };\n                                }));\n                            });\n                        });\n                    },\n                }\n            ]\n        },\n        PREQUAL: {\n            name: 'Prequalifications',\n            type: 'prequal',\n            key: 'PREQUAL',\n            category: 'Contacts',\n            isProjectLevel: false,\n            filterProjects: false,\n            columns: async function () {\n                let result = [],\n                    formData = await PJQ.app.session.fetchPrequalForm();\n                if (formData == null || _.size(formData.tabs) === 0) {\n                    return result;\n                }\n\n                result.push({\n                    value: \"percentComplete\",\n                    display: \"Overall Progress\",\n                    group: \"Progress\"\n                });\n\n                let fnMakeCol = (value, name, group, isControlled = false) => {\n                    let fieldName = PJQ.templating.TemplateRenderer.parseMarkup(name, {\n                        currentYear: PJQ.helpers.dateHelpers.getCurrentYear()\n                    });\n                    return {\n                        value: value,\n                        display: '<div class=\"of-hidden tof-ellipsis no-wrap max-wd-400p pr-4\" title=\"' + fieldName + '\">' + (isControlled ? '> ' : '') + fieldName + '</div>',\n                        group: group\n                    };\n                };\n                result.push(..._.map(formData.tabs, (tab) => {\n                    return fnMakeCol(\"tabProgress_\" + tab.prequalTabId, tab.tabName + \" Progress\", \"Progress\");\n                }));\n\n                result.push(..._.map(PJQ.constants.reports.reportTypes.PREQUAL.baseColumns.dates, (col) => {\n                    return {\n                        value: col.value,\n                        display: col.display,\n                        group: \"Dates\"\n                    };\n                }));\n\n                let fieldCols = [],\n                    hasContactFields = false;\n                _.each(formData.tabs, (tab) => {\n                    fieldCols.push(..._.map(_.filter(tab.fields, (field) => {\n                        return _.size(field.fieldType) > 0 && PJQ.constants.reports.supportedCustomFieldTypes.indexOf(field.fieldType.toUpperCase()) !== -1;\n                    }), (field) => {\n                        hasContactFields = hasContactFields || field.fieldName && field.fieldName.toLowerCase().indexOf('contact.') !== -1;\n\n                        let isControlled = null != _.findWhere(field.constraints, {customFieldId: field.prequalFieldId});\n                        return fnMakeCol(\"cf_\" + field.prequalFieldId, field.fieldName, tab.tabName, isControlled);\n                    }));\n                });\n\n                if (!hasContactFields) {\n                    let cGroup = 'Contact Info';\n                    result.push({\n                            value: \"contact.companyName\",\n                            display: \"Company Name\",\n                            group: cGroup\n                        },\n                        {\n                            value: \"contact.address\",\n                            display: \"Address\",\n                            group: cGroup\n                        },\n                        {\n                            value: \"contact.city\",\n                            display: \"City\",\n                            group: cGroup\n                        },\n                        {\n                            value: \"contact.state\",\n                            display: \"State\",\n                            group: cGroup\n                        }, {\n                            value: \"contact.zip\",\n                            display: \"Zip\",\n                            group: cGroup\n                        }, {\n                            value: \"contact.country\",\n                            display: \"Country\",\n                            group: cGroup\n                        });\n                }\n\n                result.push(...fieldCols);\n\n                return result;\n            },\n            baseColumns: {\n                dates: [\n                    {\n                        value: \"signedOn\",\n                        display: \"Date Signed\"\n                    },\n                    {\n                        value: \"expiresOn\",\n                        display: \"Expiration\"\n                    },\n                    {\n                        value: \"modifiedOn\",\n                        display: \"Last Modified\"\n                    },\n                    {\n                        value: \"lastRequestedOn\",\n                        display: \"Last Requested\"\n                    },\n                ]\n            },\n            filters: [\n                {\n                    name: 'Date Signed',\n                    inputType: 'daterange',\n                    dynamicKey: 'signedOn',\n                    key: 'signedOn',\n                    dates: [\n                        {\n                            name: 'From',\n                            key: 'fromDate'\n                        },\n                        {\n                            name: 'To',\n                            key: 'toDate'\n                        }\n                    ]\n                },\n                {\n                    name: 'Expiration',\n                    inputType: 'daterange',\n                    dynamicKey: 'expiresOn',\n                    key: 'expiresOn',\n                    dates: [\n                        {\n                            name: 'From',\n                            key: 'fromDate'\n                        },\n                        {\n                            name: 'To',\n                            key: 'toDate'\n                        }\n                    ]\n                },\n                {\n                    name: 'Last Modified',\n                    inputType: 'daterange',\n                    dynamicKey: 'modifiedOn',\n                    key: 'modifiedOn',\n                    dates: [\n                        {\n                            name: 'From',\n                            key: 'fromDate'\n                        },\n                        {\n                            name: 'To',\n                            key: 'toDate'\n                        }\n                    ]\n                }\n            ]\n        },\n        CONTRACT: {\n            name: 'Contracts',\n            type: 'contract',\n            key: 'CONTRACT',\n            category: 'Job Costing',\n            viewItemColumn: 'number',\n            columns: [\n                {value: \"project\", display: \"Project\"},\n                {value: \"status\", display: \"Status\"},\n                {value: \"number\", display: \"Number\"},\n                {value: \"description\", display: \"Description\"},\n                {value: \"created\", display: \"Created\"},\n                {value: \"start\", display: \"Start\"},\n                {value: \"estimatedComplete\", display: \"Est. Complete\"},\n                {value: \"substantialComplete\", display: \"Substantial Complete\"},\n                {value: \"actualComplete\", display: \"Act. Complete\"},\n                {value: \"contractDate\", display: \"Contract Date\"},\n                {value: \"signedDate\", display: \"Signed Date\"},\n                {value: \"executionDate\", display: \"Execution Date\"},\n                {value: \"issuedOn\", display: \"Issued On\"},\n                {value: \"returnedOn\", display: \"Returned On\"},\n                {value: \"letterOfIntent\", display: \"Letter Of Intent\"},\n                {value: \"approvalLetter\", display: \"Approval Letter\"},\n                {value: \"terminationDate\", display: \"Termination Date\"},\n                {value: \"inclusions\", display: \"Inclusions\"},\n                {value: \"exclusions\", display: \"Exclusions\"},\n                {value: \"executed\", display: \"Executed\"},\n                {value: \"amount\", display: \"Amount\"},\n                {value: \"approvedChanges\", display: \"Approved Changes\"},\n                {value: \"contractTotal\", display: \"Contract Total\"},\n                {value: \"billedToDate\", display: \"Billed To Date\"},\n                {value: \"amountRemaining\", display: \"Amount Remaining\"},\n            ],\n            filters: [\n                {\n                    name: 'Contract Status',\n                    key: 'statuses',\n                    isIntChoices: true,\n                    isMultiple: true,\n                    inputType: 'select',\n                    choices: _.map(PJQ.constants.primeContracts.primeContractStatus, (statusId) => {\n                        return {\n                            id: statusId,\n                            name: PJQ.constants.primeContracts.primeContractStatusNames[statusId]\n                        };\n                    })\n                },\n                {\n                    name: 'Created On Date',\n                    inputType: 'daterange',\n                    dynamicKey: 'createdOn',\n                    key: 'createdOn',\n                    dates: [\n                        {\n                            name: 'From',\n                            key: 'fromDate'\n                        },\n                        {\n                            name: 'To',\n                            key: 'toDate'\n                        }\n                    ]\n                }\n            ]\n        },\n        CONTRACT_CHANGE_ORDER: {\n            name: 'Contract Change Orders',\n            type: 'contractChangeOrder',\n            key: 'CONTRACT_CHANGE_ORDER',\n            viewItemColumn: 'number',\n            viewRelatedItemColumn: 'contract',\n            category: 'Job Costing',\n            columns: [\n                {value: \"project\", display: \"Project\"},\n                {value: \"status\", display: \"Status\"},\n                {value: \"contract\", display: \"Contract\"},\n                {value: \"number\", display: \"Number\"},\n                {value: \"description\", display: \"Description\"},\n                {value: \"invoicedDate\", display: \"Invoiced Date\"},\n                {value: \"dueDate\", display: \"Due Date\"},\n                {value: \"created\", display: \"Created\"},\n                {value: \"amount\", display: \"Amount\"},\n            ],\n            filters: [\n                {\n                    name: 'Change Order Status',\n                    key: 'statuses',\n                    isIntChoices: true,\n                    isMultiple: true,\n                    inputType: 'select',\n                    choices: _.map(PJQ.constants.primeContracts.changeOrderStatus, (statusId) => {\n                        return {\n                            id: statusId,\n                            name: PJQ.constants.primeContracts.changeOrderStatusNames[statusId]\n                        };\n                    })\n                },\n                {\n                    name: 'Due Date',\n                    inputType: 'daterange',\n                    dynamicKey: 'dueDate',\n                    key: 'dueDate',\n                    dates: [\n                        {\n                            name: 'From',\n                            key: 'fromDate'\n                        },\n                        {\n                            name: 'To',\n                            key: 'toDate'\n                        }\n                    ]\n                }\n            ]\n        },\n        CHANGE_REQUEST: {\n            name: 'Change Requests',\n            type: 'changeRequest',\n            key: 'CHANGE_REQUEST',\n            viewItemColumn: 'number',\n            viewRelatedItemColumn: 'contract',\n            category: 'Job Costing',\n            columns: [\n                {value: \"project\", display: \"Project\"},\n                {value: \"number\", display: \"Number\"},\n                {value: \"contract\", display: \"Contract\"},\n                {value: \"title\", display: \"Title\"},\n                {value: \"scope\", display: \"Scope\"},\n                {value: \"client\", display: \"Client\"},\n                {value: \"status\", display: \"Status\"},\n                {value: \"description\", display: \"Description\"},\n                {value: \"cost\", display: \"Cost\"},\n                {value: \"revenue\", display: \"Revenue\"},\n                {value: \"markupAmount\", display: \"Markup\"},\n                {value: \"taxAmount\", display: \"Tax\"},\n                {value: \"grandTotal\", display: \"Grand Total\"},\n                {value: \"created\", display: \"Created\"},\n            ],\n            filters: [\n                {\n                    name: 'Created On Date',\n                    inputType: 'daterange',\n                    dynamicKey: 'createdOn',\n                    key: 'createdOn',\n                    dates: [\n                        {\n                            name: 'From',\n                            key: 'fromDate'\n                        },\n                        {\n                            name: 'To',\n                            key: 'toDate'\n                        }\n                    ]\n                },\n                {\n                    name: 'Change Request Status',\n                    key: 'statuses',\n                    isIntChoices: true,\n                    isMultiple: true,\n                    inputType: 'select',\n                    choices: _.map(PJQ.constants.changeRequests.changeRequestStatus, (statusId) => {\n                        return {\n                            id: statusId,\n                            name: PJQ.constants.changeRequests.changeRequestStatusNames[statusId]\n                        };\n                    })\n                },\n                {\n                    name: 'Scope',\n                    key: 'scope',\n                    isIntChoices: true,\n                    inputType: 'select',\n                    choices: _.map(PJQ.constants.changeRequests.scope, (id) => {\n                        return {\n                            id: id,\n                            name: PJQ.constants.changeRequests.scopeNames[id]\n                        };\n                    })\n                }\n            ]\n        },\n        COMMITMENT: {\n            name: 'Commitments',\n            type: 'commitment',\n            key: 'COMMITMENT',\n            viewItemColumn: 'number',\n            category: 'Job Costing',\n            columns: [\n                {value: \"project\", display: \"Project\"},\n                {value: \"created\", display: \"Created\"},\n                {value: \"type\", display: \"Type\"},\n                {value: \"number\", display: \"Number\"},\n                {value: \"description\", display: \"Description\"},\n                {value: \"delivery\", display: \"Delivery\"},\n                {value: \"start\", display: \"Start\"},\n                {value: \"estimatedComplete\", display: \"Est. Complete\"},\n                {value: \"actualComplete\", display: \"Act. Complete\"},\n                {value: \"contractDate\", display: \"Contract Date\"},\n                {value: \"signedDate\", display: \"Signed Date\"},\n                {value: \"executionDate\", display: \"Execution Date\"},\n                {value: \"issuedOn\", display: \"Issued On\"},\n                {value: \"returnedOn\", display: \"Returned On\"},\n                {value: \"letterOfIntent\", display: \"Letter Of Intent\"},\n                {value: \"approvalLetter\", display: \"Approval Letter\"},\n                {value: \"paymentTerms\", display: \"Payment Terms\"},\n                {value: \"shippingInfo\", display: \"Shipping Info\"},\n                {value: \"inclusions\", display: \"Inclusions\"},\n                {value: \"exclusions\", display: \"Exclusions\"},\n                {value: \"company\", display: \"Company\"},\n                {value: \"status\", display: \"Status\"},\n                {value: \"amount\", display: \"Amount\"},\n                {value: \"approvedChanges\", display: \"Approved Changes\"},\n                {value: \"contractTotal\", display: \"Contract Total\"},\n                {value: \"billedToDate\", display: \"Billed To Date\"},\n                {value: \"amountRemaining\", display: \"Amount Remaining\"},\n            ],\n            filters: [\n                {\n                    name: 'Commitment Status',\n                    key: 'statuses',\n                    isIntChoices: true,\n                    isMultiple: true,\n                    inputType: 'select',\n                    choices: _.map(PJQ.constants.commitments.commitmentStatus, (statusId) => {\n                        return {\n                            id: statusId,\n                            name: PJQ.constants.commitments.commitmentStatusNames[statusId]\n                        };\n                    })\n                },\n                {\n                    name: 'Created On Date',\n                    inputType: 'daterange',\n                    dynamicKey: 'createdOn',\n                    key: 'createdOn',\n                    dates: [\n                        {\n                            name: 'From',\n                            key: 'fromDate'\n                        },\n                        {\n                            name: 'To',\n                            key: 'toDate'\n                        }\n                    ]\n                }\n            ]\n        },\n        COMMITMENT_CHANGE_ORDER: {\n            name: 'Commitment Change Orders',\n            type: 'commitmentChangeOrder',\n            key: 'COMMITMENT_CHANGE_ORDER',\n            viewItemColumn: 'number',\n            viewRelatedItemColumn: 'commitment',\n            category: 'Job Costing',\n            columns: [\n                {value: \"project\", display: \"Project\"},\n                {value: \"status\", display: \"Status\"},\n                {value: \"commitment\", display: \"Commitment\"},\n                {value: \"company\", display: \"Company\"},\n                {value: \"number\", display: \"Number\"},\n                {value: \"description\", display: \"Description\"},\n                {value: \"contractDate\", display: \"Contract Date\"},\n                {value: \"invoicedDate\", display: \"Invoiced Date\"},\n                {value: \"dueDate\", display: \"DueDate\"},\n                {value: \"created\", display: \"Created\"},\n                {value: \"amount\", display: \"Amount\"},\n            ],\n            filters: [\n                {\n                    name: 'Change Order Status',\n                    key: 'statuses',\n                    isIntChoices: true,\n                    isMultiple: true,\n                    inputType: 'select',\n                    choices: _.map(PJQ.constants.commitments.changeOrderStatus, (statusId) => {\n                        return {\n                            id: statusId,\n                            name: PJQ.constants.commitments.changeOrderStatusNames[statusId]\n                        };\n                    })\n                },\n                {\n                    name: 'Due Date',\n                    inputType: 'daterange',\n                    dynamicKey: 'dueDate',\n                    key: 'dueDate',\n                    dates: [\n                        {\n                            name: 'From',\n                            key: 'fromDate'\n                        },\n                        {\n                            name: 'To',\n                            key: 'toDate'\n                        }\n                    ]\n                }\n            ]\n        },\n        CUSTOM: {\n            name: 'Custom',\n            type: 'custom',\n            key: 'CUSTOM',\n            viewItemColumn: '',\n            viewRelatedItemColumn: '',\n            isCustom: true,\n            category: '',\n            columns: [],\n            filters: []\n        },\n        DIRECT_COST: {\n            name: 'Direct Costs',\n            type: 'directCost',\n            key: 'DIRECT_COST',\n            viewItemColumn: 'created',\n            category: 'Job Costing',\n            columns: [\n                {value: \"project\", display: \"Project\"},\n                {value: \"created\", display: \"Created\"},\n                {value: \"type\", display: \"Type\"},\n                {value: \"status\", display: \"Status\"},\n                {value: \"description\", display: \"Description\"},\n                {value: \"company\", display: \"Company\"},\n                {value: \"contact\", display: \"Contact\"},\n                {value: \"terms\", display: \"Terms\"},\n                {value: \"applied\", display: \"Applied\"},\n                {value: \"received\", display: \"Received\"},\n                {value: \"paid\", display: \"Paid\"},\n                {value: \"amount\", display: \"Amount\"},\n            ],\n            filters: [\n                {\n                    name: 'Direct Cost Status',\n                    key: 'statuses',\n                    isIntChoices: true,\n                    isMultiple: true,\n                    inputType: 'select',\n                    choices: _.map(PJQ.constants.directcosts.directCostStatus, (statusId) => {\n                        return {\n                            id: statusId,\n                            name: PJQ.constants.directcosts.directCostStatusNames[statusId]\n                        };\n                    })\n                },\n                {\n                    name: 'Created On Date',\n                    inputType: 'daterange',\n                    dynamicKey: 'createdOn',\n                    key: 'createdOn',\n                    dates: [\n                        {\n                            name: 'From',\n                            key: 'fromDate'\n                        },\n                        {\n                            name: 'To',\n                            key: 'toDate'\n                        }\n                    ]\n                }\n            ]\n        },\n        // PRODUCTION_QUANTITIES: {\n        //     name: 'Production Quantities',\n        //     type: 'productionQuantities',\n        //     key: 'PRODUCTION_QUANTITIES',\n        //     // viewItemColumn: 'created',\n        //     category: 'Field Tools',\n        //     columns: [\n        //         {value: \"project\", display: \"Project\"},\n        //         {value: \"subJob\", display: \"Sub Job\"},\n        //         {value: \"costCode\", display: \"Cost Code\"},\n        //         {value: \"quantity\", display: \"Quantity\"},\n        //         {value: \"installedQuantity\", display: \"Installed Quantity\"},\n        //         {value: \"unit\", display: \"Unit\"},\n        //         {value: \"description\", display: \"Description\"}\n        //     ],\n        //     filters: [\n        //         {\n        //             name: 'Created On Date',\n        //             inputType: 'daterange',\n        //             dynamicKey: 'createdOn',\n        //             key: 'createdOn',\n        //             dates: [\n        //                 {\n        //                     name: 'From',\n        //                     key: 'fromDate'\n        //                 },\n        //                 {\n        //                     name: 'To',\n        //                     key: 'toDate'\n        //                 }\n        //             ]\n        //         }\n        //     ]\n        // },\n        PAYABLE_INVOICE: {\n            name: 'Payable Invoices',\n            type: 'payableInvoice',\n            key: 'PAYABLE_INVOICE',\n            viewItemColumn: 'number',\n            viewRelatedItemColumn: 'commitment',\n            category: 'Job Costing',\n            columns: [\n                {\n                    value: \"project\",\n                    display: \"Project\"\n                },\n                {\n                    value: \"number\",\n                    display: \"Number\"\n                },\n                {\n                    value: \"commitment\",\n                    display: \"Commitment\"\n                },\n                {\n                    value: \"company\",\n                    display: \"Company\"\n                },\n                {\n                    value: \"billingDate\",\n                    display: \"Billing Date\"\n                },\n                {\n                    value: \"startDate\",\n                    display: \"Start Date\"\n                },\n                {\n                    value: \"endDate\",\n                    display: \"End Date\"\n                },\n                {\n                    value: \"status\",\n                    display: \"Status\"\n                },\n                {\n                    value: \"amount\",\n                    display: \"Amount\"\n                },\n                {\n                    value: \"notes\",\n                    display: \"Notes\"\n                },\n            ],\n            filters: [\n                {\n                    name: 'Invoice Status',\n                    key: 'statuses',\n                    isIntChoices: true,\n                    isMultiple: true,\n                    inputType: 'select',\n                    choices: _.map(PJQ.constants.invoicing.payableInvoiceStatus, (statusId) => {\n                        return {\n                            id: statusId,\n                            name: PJQ.constants.invoicing.payableInvoiceStatusNames[statusId]\n                        };\n                    })\n                },\n                {\n                    name: 'Billing Date',\n                    inputType: 'daterange',\n                    dynamicKey: 'billingDate',\n                    key: 'billingDate',\n                    dates: [\n                        {\n                            name: 'From',\n                            key: 'fromDate'\n                        },\n                        {\n                            name: 'To',\n                            key: 'toDate'\n                        }\n                    ]\n                },\n            ]\n        },\n        PAYABLE_INVOICE_PAYMENT: {\n            name: 'Payable Invoice Payments',\n            type: 'payableInvoicePayment',\n            key: 'PAYABLE_INVOICE_PAYMENT',\n            viewItemColumn: 'number',\n            viewRelatedItemColumn: 'invoice',\n            category: 'Job Costing',\n            columns: [\n                {\n                    value: \"project\",\n                    display: \"Project\"\n                },\n                {\n                    value: \"number\",\n                    display: \"Number\"\n                },\n                {\n                    value: \"invoice\",\n                    display: \"Invoice\"\n                },\n                {\n                    value: \"company\",\n                    display: \"Company\"\n                },\n                {\n                    value: \"dateReceived\",\n                    display: \"Date Received\"\n                },\n                {\n                    value: \"paymentMethod\",\n                    display: \"Payment Method\"\n                },\n                {\n                    value: \"notes\",\n                    display: \"Notes\"\n                },\n                {\n                    value: \"amount\",\n                    display: \"Amount\"\n                }\n            ],\n            filters: [\n                {\n                    name: 'Date Received',\n                    inputType: 'daterange',\n                    dynamicKey: 'dateReceived',\n                    key: 'dateReceived',\n                    dates: [\n                        {\n                            name: 'From',\n                            key: 'fromDate'\n                        },\n                        {\n                            name: 'To',\n                            key: 'toDate'\n                        }\n                    ]\n                },\n            ]\n        },\n        RECEIVABLE_INVOICE: {\n            name: 'Receivable Invoices',\n            type: 'receivableInvoice',\n            key: 'RECEIVABLE_INVOICE',\n            viewItemColumn: 'number',\n            viewRelatedItemColumn: 'contract',\n            category: 'Job Costing',\n            columns: [\n                {\n                    value: \"project\",\n                    display: \"Project\"\n                },\n                {\n                    value: \"number\",\n                    display: \"Number\"\n                },\n                {\n                    value: \"contract\",\n                    display: \"Contract\"\n                },\n                {\n                    value: \"billingDate\",\n                    display: \"Billing Date\"\n                },\n                {\n                    value: \"startDate\",\n                    display: \"Start Date\"\n                },\n                {\n                    value: \"endDate\",\n                    display: \"End Date\"\n                },\n                {\n                    value: \"status\",\n                    display: \"Status\"\n                },\n                {\n                    value: \"amount\",\n                    display: \"Amount\"\n                },\n                {\n                    value: \"notes\",\n                    display: \"Notes\"\n                }\n            ],\n            filters: [\n                {\n                    name: 'Invoice Status',\n                    key: 'statuses',\n                    isIntChoices: true,\n                    isMultiple: true,\n                    inputType: 'select',\n                    choices: _.map(PJQ.constants.invoicing.receivableInvoiceStatus, (statusId) => {\n                        return {\n                            id: statusId,\n                            name: PJQ.constants.invoicing.receivableInvoiceStatusNames[statusId]\n                        };\n                    })\n                },\n                {\n                    name: 'Billing Date',\n                    inputType: 'daterange',\n                    dynamicKey: 'billingDate',\n                    key: 'billingDate',\n                    dates: [\n                        {\n                            name: 'From',\n                            key: 'fromDate'\n                        },\n                        {\n                            name: 'To',\n                            key: 'toDate'\n                        }\n                    ]\n                }\n            ]\n        },\n        RECEIVABLE_INVOICE_PAYMENT: {\n            name: 'Receivable Invoice Payments',\n            type: 'receivableInvoicePayment',\n            key: 'RECEIVABLE_INVOICE_PAYMENT',\n            viewItemColumn: 'number',\n            viewRelatedItemColumn: 'invoice',\n            category: 'Job Costing',\n            columns: [\n                {\n                    value: \"project\",\n                    display: \"Project\"\n                },\n                {\n                    value: \"number\",\n                    display: \"Number\"\n                },\n                {\n                    value: \"invoice\",\n                    display: \"Invoice\"\n                },\n                {\n                    value: \"client\",\n                    display: \"Client\"\n                },\n                {\n                    value: \"dateReceived\",\n                    display: \"Date Received\"\n                },\n                {\n                    value: \"paymentMethod\",\n                    display: \"Payment Method\"\n                },\n                {\n                    value: \"notes\",\n                    display: \"Notes\"\n                },\n                {\n                    value: \"amount\",\n                    display: \"Amount\"\n                }\n            ],\n            filters: [\n                {\n                    name: 'Date Received',\n                    inputType: 'daterange',\n                    dynamicKey: 'dateReceived',\n                    key: 'dateReceived',\n                    dates: [\n                        {\n                            name: 'From',\n                            key: 'fromDate'\n                        },\n                        {\n                            name: 'To',\n                            key: 'toDate'\n                        }\n                    ]\n                },\n            ]\n        },\n        ACTION_ITEM: {\n            name: 'Action Items',\n            type: 'actionItem',\n            key: 'ACTION_ITEM',\n            category: 'Field Tools',\n            columns: [\n                {\n                    value: \"project\",\n                    display: \"Project\"\n                },\n                {\n                    value: \"title\",\n                    display: \"Title\"\n                },\n                {\n                    value: \"itemNumber\",\n                    display: \"Number\"\n                },\n                {\n                    value: \"dueDate\",\n                    display: \"Due\"\n                },\n                {\n                    value: \"priority\",\n                    display: \"Priority\"\n                },\n                {\n                    value: \"category\",\n                    display: \"Category\"\n                },\n                {\n                    value: \"location\",\n                    display: \"Location\"\n                },\n                {\n                    value: \"groupList\",\n                    display: \"Trades\"\n                },\n                {\n                    value: \"status\",\n                    display: \"Status\"\n                },\n                {\n                    value: \"assignedTo\",\n                    display: \"Assigned To\"\n                },\n                {\n                    value: \"ballInCourt\",\n                    display: \"Ball In Court\"\n                }\n            ],\n            customFields: function () {\n                return PJQ.app.session.fetchActionItemCustomFields();\n            },\n            filters: [\n                {\n                    name: 'Item Status',\n                    key: 'statuses',\n                    isIntChoices: true,\n                    isMultiple: true,\n                    inputType: 'select',\n                    choices: _.map(PJQ.constants.actionItems.statuses, (statusId) => {\n                        return {\n                            id: statusId,\n                            name: PJQ.constants.actionItems.statusNames[statusId]\n                        };\n                    })\n                },\n                {\n                    name: 'Due Date',\n                    inputType: 'daterange',\n                    dynamicKey: 'dueDate',\n                    key: 'dueDate',\n                    dates: [\n                        {\n                            name: 'From',\n                            key: 'fromDate'\n                        },\n                        {\n                            name: 'To',\n                            key: 'toDate'\n                        }\n                    ]\n                }\n            ]\n        },\n        PUNCH_LIST: {\n            name: 'Punch List',\n            type: 'punchList',\n            key: 'PUNCH_LIST',\n            category: 'Field Tools',\n            columns: [\n                {\n                    value: \"project\",\n                    display: \"Project\"\n                },\n                {\n                    value: \"title\",\n                    display: \"Title\"\n                },\n                {\n                    value: \"itemNumber\",\n                    display: \"Number\"\n                },\n                {\n                    value: \"dueDate\",\n                    display: \"Due\"\n                },\n                {\n                    value: \"assignedTo\",\n                    display: \"Assigned To\"\n                },\n                {\n                    value: \"priority\",\n                    display: \"Priority\"\n                },\n                {\n                    value: \"category\",\n                    display: \"Category\"\n                },\n                {\n                    value: \"location\",\n                    display: \"Location\"\n                },\n                {\n                    value: \"groupList\",\n                    display: \"Trades\"\n                },\n                {\n                    value: \"status\",\n                    display: \"Status\"\n                },\n            ],\n            customFields: function () {\n                return PJQ.app.session.fetchPunchListCustomFields();\n            },\n            filters: [\n                {\n                    name: 'Item Status',\n                    key: 'statuses',\n                    isIntChoices: true,\n                    isMultiple: true,\n                    inputType: 'select',\n                    choices: _.map(PJQ.constants.punchlists.statuses, (statusId) => {\n                        return {\n                            id: statusId,\n                            name: PJQ.constants.punchlists.statusNames[statusId]\n                        };\n                    })\n                },\n                {\n                    name: 'Due Date',\n                    inputType: 'daterange',\n                    dynamicKey: 'dueDate',\n                    key: 'dueDate',\n                    dates: [\n                        {\n                            name: 'From',\n                            key: 'fromDate'\n                        },\n                        {\n                            name: 'To',\n                            key: 'toDate'\n                        }\n                    ]\n                }\n            ]\n        },\n        RFI: {\n            name: 'RFI',\n            type: 'rfi',\n            key: 'RFI',\n            category: 'Field Tools',\n            columns: [\n                {\n                    value: \"project\",\n                    display: \"Project\"\n                },\n                {\n                    value: \"title\",\n                    display: \"Title\"\n                },\n                {\n                    value: \"number\",\n                    display: \"Number\"\n                },\n                {\n                    value: \"dueDate\",\n                    display: \"Due\"\n                },\n                {\n                    value: \"location\",\n                    display: \"Location\"\n                },\n                {\n                    value: \"trades\",\n                    display: \"Trades\"\n                },\n                {\n                    value: \"status\",\n                    display: \"Status\"\n                },\n            ],\n            filters: [\n                {\n                    name: 'Status',\n                    key: 'statuses',\n                    isIntChoices: true,\n                    isMultiple: true,\n                    inputType: 'select',\n                    choices: _.map(PJQ.constants.rfi.statuses, (statusId) => {\n                        return {\n                            id: statusId,\n                            name: PJQ.constants.rfi.statusNames[statusId]\n                        };\n                    })\n                },\n                {\n                    name: 'Due Date',\n                    inputType: 'daterange',\n                    dynamicKey: 'dueDate',\n                    key: 'dueDate',\n                    dates: [\n                        {\n                            name: 'From',\n                            key: 'fromDate'\n                        },\n                        {\n                            name: 'To',\n                            key: 'toDate'\n                        }\n                    ]\n                }\n            ]\n        },\n        SUBMITTAL: {\n            name: 'Submittals',\n            type: 'submittal',\n            key: 'SUBMITTAL',\n            category: 'Field Tools',\n            columns: [\n                {\n                    value: \"project\",\n                    display: \"Project\"\n                },\n                {\n                    value: \"submittalNumber\",\n                    display: \"Number\"\n                },\n                {\n                    value: \"title\",\n                    display: \"Title\"\n                },\n                {\n                    value: \"itemTypes\",\n                    display: \"Item Types\"\n                },\n                {\n                    value: \"dueDate\",\n                    display: \"Due Date\"\n                },\n                {\n                    value: \"groupList\",\n                    display: \"Trades\"\n                },\n                {\n                    value: \"notes\",\n                    display: \"Description\"\n                },\n                {\n                    value: \"status\",\n                    display: \"Status\"\n                },\n                {\n                    value: \"ballInCourt\",\n                    display: \"Ball In Court\"\n                },\n                {\n                    value: \"submitter\",\n                    display: \"Submitter\"\n                },\n                {\n                    value: \"approverList\",\n                    display: \"Approver List\"\n                },\n                {\n                    value: \"distributionList\",\n                    display: \"Distribution List\"\n                }\n            ],\n            customFields: function () {\n                return PJQ.app.session.fetchSubmittalCustomFields();\n            },\n            filters: [\n                {\n                    name: 'Status',\n                    key: 'statuses',\n                    isIntChoices: true,\n                    isMultiple: true,\n                    inputType: 'select',\n                    choices: async function (options) {\n                        return new Promise(async (res, rej) => {\n                            let statuses;\n                            if (options && options.project != null) {\n                                statuses = await options.project.fetchSubmittalStatuses();\n                            } else {\n                                statuses = await PJQ.app.session.fetchSubmittalStatuses();\n                            }\n                            if (statuses == null) {\n                                rej('Failed to fetch statuses');\n                            }\n\n                            res(_.map(statuses.models, (status) => {\n                                return {\n                                    id: status.id,\n                                    name: status.get('name')\n                                };\n                            }));\n                        });\n                    },\n                },\n                {\n                    name: 'Due Date',\n                    inputType: 'daterange',\n                    dynamicKey: 'dueDate',\n                    key: 'dueDate',\n                    dates: [\n                        {\n                            name: 'From',\n                            key: 'fromDate'\n                        },\n                        {\n                            name: 'To',\n                            key: 'toDate'\n                        }\n                    ]\n                }\n            ]\n        },\n        MEETING: {\n            name: 'Meetings',\n            type: 'meeting',\n            key: 'MEETING',\n            category: 'Field Tools',\n            columns: [\n                {\n                    value: \"project\",\n                    display: \"Project\"\n                },\n                {\n                    value: \"name\",\n                    display: \"Name\"\n                },\n                {\n                    value: \"number\",\n                    display: \"Number\"\n                },\n                {\n                    value: \"status\",\n                    display: \"Status\"\n                },\n                {\n                    value: \"date\",\n                    display: \"Date\"\n                },\n                {\n                    value: \"startTime\",\n                    display: \"Start Time\"\n                },\n                {\n                    value: \"endTime\",\n                    display: \"End Time\"\n                },\n                {\n                    value: \"description\",\n                    display: \"Description\"\n                },\n                {\n                    value: 'location',\n                    display: \"Location\"\n                },\n                {\n                    value: \"isPublic\",\n                    display: \"Public\"\n                },\n            ],\n            filters: [\n                {\n                    name: 'Status',\n                    key: 'statuses',\n                    isIntChoices: true,\n                    isMultiple: true,\n                    inputType: 'select',\n                    choices: _.map(PJQ.constants.meetings.meetingStatus, (statusId) => {\n                        return {\n                            id: statusId,\n                            name: PJQ.constants.meetings.meetingStatusNames[statusId]\n                        };\n                    })\n                },\n                {\n                    name: 'Meeting Date',\n                    inputType: 'daterange',\n                    dynamicKey: 'meetingDate',\n                    key: 'meetingDate',\n                    dates: [\n                        {\n                            name: 'From',\n                            key: 'fromDate'\n                        },\n                        {\n                            name: 'To',\n                            key: 'toDate'\n                        }\n                    ]\n                }\n            ]\n        },\n        DAILY_REPORT: {\n            name: 'Daily Reports',\n            type: 'dailyReport',\n            key: 'DAILY_REPORT',\n            sortName: 'Daily Report',\n            category: 'Field Tools',\n            columns: [\n                {\n                    value: \"project\",\n                    display: \"Project\"\n                },\n                {\n                    value: \"reportDate\",\n                    display: \"Report Date\"\n                },\n                {\n                    value: \"status\",\n                    display: \"Status\"\n                },\n                {\n                    value: \"workLogs\",\n                    display: \"Work Logs\"\n                },\n                {\n                    value: \"notes\",\n                    display: \"Notes\"\n                },\n                {\n                    value: \"surveyItems\",\n                    display: \"Survey Items\"\n                },\n                {\n                    value: \"expenses\",\n                    display: \"Expenses\"\n                },\n                {\n                    value: 'deliveries',\n                    display: \"Deliveries\"\n                },\n                {\n                    value: \"communicationLogs\",\n                    display: \"Communication Logs\"\n                },\n                {\n                    value: \"inspectionLogs\",\n                    display: \"Inspection Logs\"\n                },\n                {\n                    value: \"wasDelayed\",\n                    display: \"Delayed\"\n                },\n                {\n                    value: \"delayNotes\",\n                    display: \"Delay Notes\"\n                }\n            ],\n            filters: [\n                {\n                    name: 'Status',\n                    key: 'statuses',\n                    isIntChoices: true,\n                    isMultiple: true,\n                    inputType: 'select',\n                    choices: _.map(PJQ.constants.dailyReports.statuses, (statusId) => {\n                        return {\n                            id: statusId,\n                            name: PJQ.constants.dailyReports.statusNames[statusId]\n                        };\n                    })\n                },\n                {\n                    name: 'Report Date',\n                    inputType: 'daterange',\n                    dynamicKey: 'reportDate',\n                    key: 'reportDate',\n                    dates: [\n                        {\n                            name: 'From',\n                            key: 'fromDate'\n                        },\n                        {\n                            name: 'To',\n                            key: 'toDate'\n                        }\n                    ]\n                },\n                {\n                    name: 'Delayed',\n                    key: 'delayed',\n                    isIntChoices: true,\n                    isMultiple: true,\n                    inputType: 'select',\n                    choices: [\n                        {\n                            id: 1,\n                            name: 'Yes'\n                        },\n                        {\n                            id: 0,\n                            name: 'No'\n                        }\n                    ]\n                }\n            ]\n        },\n        DAILY_REPORT_DELIVERY: {\n            name: 'Daily Report Deliveries',\n            type: 'dailyReportDelivery',\n            key: 'DAILY_REPORT_DELIVERY',\n            category: 'Field Tools',\n            columns: [\n                {\n                    value: \"project\",\n                    display: \"Project\"\n                },\n                {\n                    value: \"reportDate\",\n                    display: \"Report Date\"\n                },\n                {\n                    value: \"time\",\n                    display: \"Time Delivered\"\n                },\n                {\n                    value: \"deliveryFrom\",\n                    display: \"Delivery From\"\n                },\n                {\n                    value: \"contents\",\n                    display: \"Contents\"\n                },\n                {\n                    value: \"trackingNumber\",\n                    display: \"Tracking Number\"\n                },\n                {\n                    value: \"purchaseOrderNumber\",\n                    display: \"Purchase Order Number\"\n                },\n                {\n                    value: 'notes',\n                    display: \"Notes\"\n                }\n            ],\n            filters: [\n                {\n                    name: 'Daily Report Status',\n                    key: 'statuses',\n                    isIntChoices: true,\n                    isMultiple: true,\n                    inputType: 'select',\n                    choices: _.map(PJQ.constants.dailyReports.statuses, (statusId) => {\n                        return {\n                            id: statusId,\n                            name: PJQ.constants.dailyReports.statusNames[statusId]\n                        };\n                    })\n                },\n                {\n                    name: 'Daily Report Date',\n                    inputType: 'daterange',\n                    dynamicKey: 'reportDate',\n                    key: 'reportDate',\n                    dates: [\n                        {\n                            name: 'From',\n                            key: 'fromDate'\n                        },\n                        {\n                            name: 'To',\n                            key: 'toDate'\n                        }\n                    ]\n                }\n            ]\n        },\n        DAILY_REPORT_WORK_LOG: {\n            name: 'Daily Report Work Logs',\n            type: 'dailyReportWorkLog',\n            key: 'DAILY_REPORT_WORK_LOG',\n            category: 'Field Tools',\n            columns: [\n                {\n                    value: \"project\",\n                    display: \"Project\"\n                },\n                {\n                    value: \"reportDate\",\n                    display: \"Report Date\"\n                },\n                {\n                    value: \"name\",\n                    display: \"Name\"\n                },\n                {\n                    value: \"quantity\",\n                    display: \"Quantity\"\n                },\n                {\n                    value: \"hours\",\n                    display: \"Hours\"\n                },\n                {\n                    value: \"overtimeHours\",\n                    display: \"Overtime Hours\"\n                },\n                {\n                    value: 'trades',\n                    display: \"Trades\"\n                },\n                {\n                    value: \"description\",\n                    display: \"Description\"\n                },\n            ],\n            filters: [\n                {\n                    name: 'Daily Report Status',\n                    key: 'statuses',\n                    isIntChoices: true,\n                    isMultiple: true,\n                    inputType: 'select',\n                    choices: _.map(PJQ.constants.dailyReports.statuses, (statusId) => {\n                        return {\n                            id: statusId,\n                            name: PJQ.constants.dailyReports.statusNames[statusId]\n                        };\n                    })\n                },\n                {\n                    name: 'Daily Report Date',\n                    inputType: 'daterange',\n                    dynamicKey: 'reportDate',\n                    key: 'reportDate',\n                    dates: [\n                        {\n                            name: 'From',\n                            key: 'fromDate'\n                        },\n                        {\n                            name: 'To',\n                            key: 'toDate'\n                        }\n                    ]\n                }\n            ]\n        },\n        DAILY_REPORT_NOTE: {\n            name: 'Daily Report Notes',\n            type: 'dailyReportNote',\n            key: 'DAILY_REPORT_NOTE',\n            category: 'Field Tools',\n            columns: [\n                {\n                    value: \"project\",\n                    display: \"Project\"\n                },\n                {\n                    value: \"reportDate\",\n                    display: \"Report Date\"\n                },\n                {\n                    value: \"category\",\n                    display: \"Category\"\n                },\n                {\n                    value: \"noteText\",\n                    display: \"Note\"\n                },\n                {\n                    value: \"created\",\n                    display: \"Created On\"\n                }\n            ],\n            filters: [\n                {\n                    name: 'Daily Report Status',\n                    key: 'statuses',\n                    isIntChoices: true,\n                    isMultiple: true,\n                    inputType: 'select',\n                    choices: _.map(PJQ.constants.dailyReports.statuses, (statusId) => {\n                        return {\n                            id: statusId,\n                            name: PJQ.constants.dailyReports.statusNames[statusId]\n                        };\n                    })\n                },\n                {\n                    name: 'Daily Report Date',\n                    inputType: 'daterange',\n                    dynamicKey: 'reportDate',\n                    key: 'reportDate',\n                    dates: [\n                        {\n                            name: 'From',\n                            key: 'fromDate'\n                        },\n                        {\n                            name: 'To',\n                            key: 'toDate'\n                        }\n                    ]\n                }\n            ]\n        },\n    },\n    filterTypes: {\n        DATE: 'date',\n        DATE_RANGE: 'daterange',\n        SELECT: 'select',\n    }\n};\n\nPJQ.constants.date = {\n    WEEKDAYNAMES: [\n        {\n            short: \"Sun\",\n            shortest: \"Su\",\n            long: \"Sunday\",\n            bit: 1\n        },\n        {\n            short: \"Mon\",\n            shortest: \"M\",\n            long: \"Monday\",\n            bit: 2\n        },\n        {\n            short: \"Tue\",\n            shortest: \"T\",\n            long: \"Tuesday\",\n            bit: 4\n        },\n        {\n            short: \"Wed\",\n            shortest: \"W\",\n            long: \"Wednesday\",\n            bit: 8\n        },\n        {\n            short: \"Thu\",\n            shortest: \"Th\",\n            long: \"Thursday\",\n            bit: 16\n        },\n        {\n            short: \"Fri\",\n            shortest: \"F\",\n            long: \"Friday\",\n            bit: 32\n        },\n        {\n            short: \"Sat\",\n            shortest: \"S\",\n            long: \"Saturday\",\n            bit: 64\n        }\n    ]\n};","PJQ.models.reports.NewReport = PJQ.models.BaseModel.extend({\n    defaults: {\n        isAPIv2: true\n    },\n    idAttribute: 'id',\n    endpoint: function () {\n        if (this.options.project && this.isNew()) {\n            return PJQ.helpers.urlHelpers.generateEndpoint([\n                {\n                    endpoint: 'projects',\n                    value: this.options.project.id\n                },\n                {\n                    endpoint: 'reports'\n                }\n            ])\n        } else {\n            return PJQ.helpers.urlHelpers.generateEndpoint([\n                {\n                    endpoint: 'reports',\n                    value: this.id\n                }\n            ]);\n        }\n    },\n    parse: function (model) {\n        return model;\n    },\n    getReportOptions: function () {\n        let opts = this.get('options');\n        return opts ? opts : {};\n    },\n    getFilters: function () {\n        let reportOptions = this.getReportOptions(),\n            filters = reportOptions.filters;\n        return filters ? filters : {};\n    },\n    setFilters: function (filters) {\n        let options = this.get('options') || {};\n        options.filters = filters;\n        this.set('options', options);\n        this.trigger('change');\n    },\n    resetFilters: function () {\n        let options = this.get('options') || {};\n        options.filters = {};\n        this.set('options', options);\n    },\n    setTimezone: function (timezone) {\n        let options = this.get('options') || {};\n        options.timezone = timezone;\n        this.set('options', options);\n    },\n    getColumns: function () {\n        let reportOptions = this.getReportOptions();\n        return reportOptions.columns ? reportOptions.columns : {};\n    },\n    setColumns: function (columns) {\n        let options = this.get('options') || {};\n        options.columns = columns;\n        this.set('options', options);\n        this.trigger('change');\n    },\n    generate: function () {\n        return new Promise((res, rej) => {\n            new PJQ.ajax.Request({\n                isAPIv2: true,\n                endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n                    {\n                        endpoint: 'reports'\n                    },\n                    {\n                        endpoint: 'generate'\n                    }\n                ]),\n                data: this.toJSON()\n            }).post().done(_.bind(function (response) {\n                this.reportData = response;\n                res(this.reportData);\n            }, this));\n        });\n    },\n    export: function (options = {format: 'pdf'}) {\n        return new Promise((res, rej) => {\n            let pData = this.toJSON();\n            pData.reportResult = this.reportData;\n\n            if (options.rows != null) {\n                pData.reportResult.rows = options.rows;\n            }\n\n            new PJQ.ajax.Request({\n                isAPIv2: true,\n                endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n                    {\n                        endpoint: 'reports'\n                    },\n                    {\n                        endpoint: 'export',\n                        value: options && _.size(options.format) > 0 ? options.format : 'pdf'\n                    }]),\n                data: pData\n            }).post().success(_.bind(function (response) {\n                PJQ.files.downloadFile(response.url, {\n                    isEndpoint: false\n                });\n                res(response);\n            }, this));\n        });\n    }\n});\n\nPJQ.models.reports.CustomReport = PJQ.models.reports.NewReport.extend({\n    defaults: {\n        isAPIv2: true\n    },\n    idAttribute: 'id',\n    endpoint: function () {\n        if (this.options.project && this.isNew()) {\n            return PJQ.helpers.urlHelpers.generateEndpoint([\n                {\n                    endpoint: 'projects',\n                    value: this.options.project.id\n                },\n                {\n                    endpoint: 'reports'\n                },\n                {\n                    endpoint: 'custom'\n                }\n            ])\n        } else {\n            return PJQ.helpers.urlHelpers.generateEndpoint([\n                {\n                    endpoint: 'reports'\n                },\n                {\n                    endpoint: 'custom',\n                    value: this.id\n                }\n            ]);\n        }\n    },\n    parse: function (model) {\n        return model;\n    },\n    getFilters: function () {\n        return {};\n    },\n    getColumns: function () {\n        return {};\n    },\n    export: function (projectId) {\n        return new Promise((res, rej) => {\n            let params = [];\n\n            if (projectId) {\n                params.push({\n                    parameter: 'projectId',\n                    value: projectId\n                });\n            }\n            new PJQ.ajax.Request({\n                isAPIv2: true,\n                endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n                    {\n                        endpoint: 'reports'\n                    },\n                    {\n                        endpoint: 'custom',\n                        value: this.id\n                    },\n                    {\n                        endpoint: 'export'\n                    }], params),\n                data: {\n                    options: this.attributes.options\n                }\n            }).post().success(_.bind(function (response) {\n                PJQ.files.downloadFile(response.url, {\n                    isEndpoint: false\n                });\n                res(response);\n            }, this)).fail(_.bind(function () {\n                res();\n            }, this))\n        });\n    },\n    generatePreview: function (projectId) {\n        let params = [];\n\n        if (projectId) {\n            params.push({\n                parameter: 'projectId',\n                value: projectId\n            });\n        }\n        return new Promise((res, rej) => {\n            new PJQ.ajax.Request({\n                isAPIv2: true,\n                endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n                    {\n                        endpoint: 'reports'\n                    },\n                    {\n                        endpoint: 'custom',\n                        value: this.id\n                    },\n                    {\n                        endpoint: 'preview'\n                    }], params),\n                data: this.toJSON()\n            }).post().success(_.bind(function (response) {\n                res(response);\n            }, this)).fail(_.bind(function () {\n                res();\n            }, this))\n        });\n    }\n});\n\nPJQ.models.reports.ReportOptions = PJQ.models.BaseModel.extend({});\n\nPJQ.collections.reports.NewReportList = PJQ.collections.BaseCollection.extend({\n    defaults: {\n        isAPIv2: true\n    },\n    model: PJQ.models.reports.NewReport,\n    endpoint: function () {\n        let params = [];\n        if (this.options.project) {\n            return PJQ.helpers.urlHelpers.generateEndpoint([\n                {\n                    endpoint: 'projects',\n                    value: this.options.project.id\n                },\n                {\n                    endpoint: 'reports'\n                }\n            ], params);\n        } else {\n            return PJQ.helpers.urlHelpers.generateEndpoint([\n                {\n                    endpoint: 'reports'\n                }\n            ], params);\n        }\n    }\n});\n\nPJQ.collections.reports.CustomReports = PJQ.collections.BaseCollection.extend({\n    defaults: {\n        isAPIv2: true\n    },\n    model: PJQ.models.reports.CustomReport,\n    endpoint: function () {\n        let params = [];\n        if (this.options.project) {\n            return PJQ.helpers.urlHelpers.generateEndpoint([\n                {\n                    endpoint: 'projects',\n                    value: this.options.project.id\n                },\n                {\n                    endpoint: 'reports'\n                },\n                {\n                    endpoint: 'custom'\n                }\n            ], params);\n        } else {\n            return PJQ.helpers.urlHelpers.generateEndpoint([\n                {\n                    endpoint: 'reports'\n                },\n                {\n                    endpoint: 'custom'\n                }\n            ], params);\n        }\n    }\n});","PJQ.views.reporting.NewReportView = PJQ.views.BaseView.extend({\n    defaults: {\n        template: new PJQ.templating.Template(PJQ.constants.modules.REPORTS, 'new-report-view'),\n        subTemplates: {\n            reportError: new PJQ.templating.Template(PJQ.constants.modules.REPORTS, 'report-error')\n        }\n    },\n    events: {\n        'click .create-report': 'createNewReport',\n        'click .btn-save-report': 'saveReport',\n        'click .btn-generate-report': 'generateReport',\n        'click .btn-reset-filters': 'resetFilters',\n        'click .input-my-projects': 'toggleMyProjects',\n        'click .input-toggle-specific-dates': 'toggleSpecificDates',\n        'click .report-export-excel': 'exportExcel',\n        'click .report-export-pdf': 'exportPDF',\n        'click .btn-custom-export': 'exportCustom',\n        'click .btn-delete-report': 'deleteReport',\n        'click .btn-clear-report': 'clearReport'\n    },\n    beforeFirstRender: async function () {\n        if (!this.collection) {\n            this.collection = new PJQ.collections.reports.NewReportList(null, {\n                project: this.options.project\n            });\n        }\n\n        if (!this.customReports) {\n            this.customReports = new PJQ.collections.reports.CustomReports(null, {\n                project: this.options.project\n            });\n        }\n\n        await this.collection.fetch();\n        await this.customReports.fetch();\n\n        if (!this.options.project) {\n            this.projects = new PJQ.collections.projects.Projects(null, {\n                isSimple: false,\n                status: 'ready'\n            });\n\n            await PJQ.app.session.fetchProjectStatuses();\n            await this.projects.fetch();\n        }\n        this.render();\n    },\n    renderData: function () {\n        return {\n            report: this.report,\n            reportType: this.reportType,\n            reportList: this.collection,\n            projects: this.projects\n        };\n    },\n    getReportChoices: function () {\n        let rTypes = _.filter(PJQ.constants.reports.reportTypes, (reportType) => {\n                return !reportType.isCustom\n                    && ((this.options.project != null && reportType.isProjectLevel !== false)\n                        || (this.options.project == null && reportType.isGlobalLevel !== false));\n            }),\n            result = _.map(_.groupBy(rTypes, 'category', this), (reportTypes, category) => {\n                return {\n                    name: category,\n                    choices: _.map(_.sortBy(reportTypes, 'name'), (reportType) => {\n                        return {\n                            id: reportType.key,\n                            name: reportType.name\n                        }\n                    })\n                };\n            });\n\n        if (_.size(this.customReports.models) > 0) {\n            result.push({\n                name: 'Custom Reports',\n                choices: _.map(this.customReports.models, function (report) {\n                    return {\n                        id: 'custom_' + report.id.toString(),\n                        name: report.get('name')\n                    };\n                })\n            });\n        }\n\n        return _.sortBy(result, (rt) => {\n            let s = PJQ.constants.reports.reportCategorySort[rt.name];\n            return s ? s : 100;\n        });\n    },\n    makeCustomReportType: async function (report, callback) {\n        return new Promise(async (res, rej) => {\n            let reportOpts = report.get('options'),\n                key = report.get('key'),\n                result = {\n                    name: report.get('name') ?? \"\",\n                    type: key,\n                    key: key,\n                    viewItemColumn: '',\n                    viewRelatedItemColumn: '',\n                    category: '',\n                    columns: report.columns ?? [],\n                    filters: report.filters ?? [],\n                    isCustom: true\n                };\n\n            let filters = reportOpts.filters;\n            if (_.size(filters) > 0) {\n                let hasProjectCustomFieldFilter = null != _.find(filters, (filter) => {\n                        return filter.projectCustomFieldId > 0;\n                    }),\n                    projectCustomFields = null;\n\n                if (hasProjectCustomFieldFilter) {\n                    projectCustomFields = await PJQ.app.session.fetchProjectCustomFields();\n                }\n\n                result.filters = [];\n                _.each(filters, (filter) => {\n                    if (filter.projectCustomFieldId > 0) {\n                        let field = projectCustomFields.get(filter.projectCustomFieldId);\n                        if (field != null) {\n                            result.filters.push({\n                                name: field.get('fieldName'),\n                                key: 'pcf_' + field.id.toString(),\n                                isIntChoices: true,\n                                isMultiple: true,\n                                inputType: 'select',\n                                choices: _.map(field.choices.models, (choice) => {\n                                    return {\n                                        id: choice.id,\n                                        name: choice.get('choiceName')\n                                    };\n                                })\n                            });\n\n                            result.inputType = 'select';\n                            result.isMultiple = false;\n                            result.isIntChoices = true;\n                            result.choices = _.map(field.choices.models, (choice) => {\n                                return {\n                                    id: choice.id,\n                                    name: choice.get('name')\n                                };\n                            })\n                        }\n                    }\n                });\n            }\n\n            if (typeof callback === 'function') {\n                callback(result);\n            }\n\n            res(result);\n        });\n    },\n    afterRender: async function () {\n        this.reportTypePicker = new PJQ.inputs.Selectpicker({\n            el: this.$('.select-report-type'),\n            defaultValue: this.reportType ? this.reportType.key : null,\n            noneSelectedText: 'Select Report Type',\n            choices: this.getReportChoices(),\n            isMultiple: false,\n            isIntChoices: false,\n            onChange: (value) => {\n                if (value.startsWith('custom_')) {\n                    let reportId = parseInt(value.replace('custom_', '')),\n                        report = this.customReports.get(reportId);\n                    if (report != null) {\n                        this.makeCustomReportType(report, (reportType) => {\n                            this.report = report;\n                            this.reportType = reportType;\n                            this.render();\n                        });\n                    }\n                    return;\n                }\n\n                this.reportType = PJQ.constants.reports.reportTypes[value];\n                this.report = new PJQ.models.reports.NewReport({\n                    type: this.reportType.type,\n                    projectId: this.options.project ? this.options.project.id : null\n                }, {\n                    project: this.options.project\n                });\n\n                this.render();\n            }\n        });\n\n        let selectedReportId = this.report ? this.report.get('type') != null ? this.report.id : -this.report.id : null;\n        this.savedReportPicker = new PJQ.inputs.Selectpicker({\n            el: this.$('.select-saved-report'),\n            defaultValue: selectedReportId,\n            noneSelectedText: _.size(this.collection.models) > 0 || _.size(this.customReports.models) > 0 ? 'Select Saved Report' : 'No saved reports exist',\n            isDisabled: _.size(this.collection.models) === 0 || _.size(this.customReports.models) > 0,\n            isMultiple: false,\n            isIntChoices: true,\n            onChange: _.bind(function (value) {\n                if (value > 0) {\n                    let report = this.collection.get(value);\n                    // If the report type changed, re-render to get the correct filter elements\n                    if (this.reportType !== report.get('type')) {\n                        this.reportType = _.find(PJQ.constants.reports.reportTypes, function (reportType) {\n                            return reportType.type === report.get('type');\n                        });\n\n                        this.report = report;\n                        this.render();\n                    } else {\n                        this.renderReport(report);\n                    }\n                } else {\n                    this.render();\n                }\n            }, this)\n        });\n\n        this.populateReportSelect();\n        if (this.report) {\n            this.renderReport(this.report);\n            this.renderDataTable();\n\n            // If this.report is an existing report on render, then generate it immediately\n            if (!this.report.isNew() && !this.report.reportData) {\n                this.generateReport();\n            }\n        }\n    },\n    generateReport: function () {\n        if (!this.reportType.isCustom && !this.validate()) {\n            return;\n        }\n\n        if (this.reportType.isCustom) {\n            let projectId = this.options.project ? this.options.project.id : null;\n            this.report.generatePreview(projectId).then((response) => {\n                if (response && response.content) {\n                    let unescapedHtml = this.unescapeHtml(response.content);\n\n                    let iframe = document.createElement('iframe');\n                    iframe.style.width = '100%';\n                    iframe.style.height = '100%';\n                    iframe.style.border = 'none';\n\n                    iframe.onload = function () {\n                        iframe.contentWindow.document.open();\n                        iframe.contentWindow.document.write(unescapedHtml);\n                        iframe.contentWindow.document.close();\n                    };\n\n                    let container = this.$('.custom-report-preview')[0];\n                    container.innerHTML = '';\n                    container.appendChild(iframe);\n                }\n            });\n        } else {\n            let loader = new PJQ.Loader(this.$('.report-table'));\n            this.report.setFilters(this.reportFilters);\n\n            this.report.generate().then((response) => {\n                loader.remove();\n                this.renderDataTable();\n            });\n        }\n    },\n    unescapeHtml: function (html) {\n        var textArea = document.createElement('textarea');\n        textArea.innerHTML = html;\n        return textArea.value;\n    },\n    exportExcel: function () {\n        if (!this.validate()) {\n            return;\n        }\n\n        let loader = new PJQ.Loader(this.$('.btn-export'));\n        this.report.setFilters(this.reportFilters);\n        this.report.export({\n            format: 'excel',\n            rows: this.dataTable ? this.dataTable.dataTable.rows({order: 'applied'}).data().toArray() : null\n        }).then((response) => {\n            PJQ.files.downloadFile(response.url, {\n                isEndpoint: false\n            });\n            loader.remove();\n        });\n    },\n    exportPDF: function () {\n        if (!this.validate()) {\n            return;\n        }\n        // todo: add loader to export button\n        this.report.setFilters(this.reportFilters);\n        this.report.export({\n            format: 'pdf',\n            rows: this.dataTable ? this.dataTable.dataTable.rows({order: 'applied'}).data().toArray() : null\n        }).then((response) => {\n            // todo: remove loader from export button\n        });\n    },\n    exportCustom: function () {\n        let loader = new PJQ.Loader(this.$('.btn-custom-export'), {\n            type: 'button',\n            loadingText: 'Exporting'\n        });\n\n        let projectId = this.options.project ? this.options.project.id : null;\n        this.report.export(projectId).then((response) => {\n            loader.remove();\n        });\n    },\n    toggleSpecificDates: function (e) {\n        let $switch = $(e.currentTarget),\n            $container = $switch.closest('.col-4'),\n            $dynamicDateInput = $container.find('.input-dynamic-date'),\n            $specificDateInput = $container.find('.input-specific-date'),\n            filters = this.report.getFilters();\n\n        // When the user switches between dynamic/specific, we want to clear the filter of the other.\n        if ($switch.prop('checked')) {\n            // hide and clear the value of the select input\n            $dynamicDateInput.hide().find('select').selectpicker('val', '');\n            $specificDateInput.show();\n\n            let key = $dynamicDateInput.find('select').data('key');\n            // remove the key from the filters object\n            delete filters[key];\n            this.report.setFilters(filters);\n        } else {\n            // hide and clear the value of both of the date inputs\n            $specificDateInput.hide().find('.filter-date').val('');\n            $dynamicDateInput.show();\n\n            let key = $specificDateInput.data('key');\n            // remove the key from the filters object\n            delete filters[key];\n            this.report.setFilters(filters);\n        }\n    },\n    deleteReport: function () {\n        if (this.report.id == null)\n            return;\n\n        new PJQ.views.modals.DeleteCancel({\n            header: \"Confirm Delete\",\n            body: \"Are you sure you want to delete this report?\",\n            onDelete: _.bind(function () {\n                this.collection.remove(this.report);\n                this.report.destroy({\n                    success: _.bind(function () {\n                        this.clearReport();\n                    }, this)\n                });\n            }, this)\n        });\n    },\n    clearReport: function () {\n        this.report = null;\n        this.reportType = null;\n        this.render();\n    },\n    toggleMyProjects: function (e) {\n        let $input = this.$('.input-my-projects'),\n            filters = this.report.getFilters(),\n            isChecked = $input[0].checked;\n\n        filters.isMyProjects = isChecked;\n\n        this.report.setFilters(filters);\n        this.render();\n    },\n    renderReport: function (report) {\n        // Stop listening to existing report\n        if (this.report != null) {\n            this.stopListening(this.report);\n        }\n\n        if (report != null) {\n            this.report = report;\n            this.reportFilters = _.clone(this.report.getFilters());\n            this.$('.btn-delete-report').attr('hidden', this.report.id == null);\n            this.listenTo(this.report, 'change reset', _.bind(function () {\n                this.$('.btn-save-report').prop('disabled', !this.report.hasChanged());\n            }, this));\n        }\n        this.$('.btn-save-report').prop('disabled', !this.report.hasChanged())\n        this.renderFilterInputs();\n    },\n    getColumnChoices: async function () {\n        if (!this.reportType)\n            return [];\n\n        let columns = [];\n        if (typeof this.reportType.columns === 'function') {\n            columns = await this.reportType.columns();\n        } else {\n            columns = this.reportType.columns;\n        }\n\n        let result = [],\n            columnGroups = _.groupBy(columns, (col) => {\n                return col.group ? col.group : '';\n            }, this),\n            fnMakeChoice = (column) => {\n                return {\n                    id: column.value,\n                    name: column.display\n                };\n            }\n        if (_.size(columnGroups) === 0) {\n            result.push(..._.map(columns, fnMakeChoice));\n        } else {\n            _.map(columnGroups, (columns, group) => {\n                result.push({\n                    name: group,\n                    choices: _.map(columns, fnMakeChoice)\n                });\n            });\n        }\n\n        if (typeof this.reportType.customFields === 'function') {\n            let customFields = await this.reportType.customFields();\n            if (customFields) {\n                _.each(customFields.models, (field) => {\n                    result.push({\n                        id: \"fieldValue\" + field.get('fieldNumber'),\n                        name: field.get('fieldName')\n                    });\n                });\n            }\n        }\n\n        return result;\n    },\n    renderFilterInputs: async function () {\n        if (!this.reportType.isCustom) {\n            let columnChoices = await this.getColumnChoices();\n            this.columnsPicker = new PJQ.inputs.Selectpicker({\n                el: this.$('.select-columns'),\n                noneSelectedText: 'No Columns Selected',\n                defaultValue: this.report.getColumns(),\n                isMultiple: true,\n                choices: columnChoices,\n                isLiveSearch: true,\n                onChange: _.bind(function (value) {\n                    this.report.setColumns(value);\n                }, this)\n            });\n\n            if (this.projects && this.reportType.filterProjects !== false) {\n                this.$('.input-my-projects')[0].checked = this.reportFilters.isMyProjects;\n                this.projectsSelector = new PJQ.views.projects.ProjectSelectorInput({\n                    el: this.$('.report-projects'),\n                    isSingleChoice: false,\n                    canEdit: !this.reportFilters.isMyProjects,\n                    emptyNotice: this.reportFilters.isMyProjects ? '\"My Projects\" is checked. This report will only use projects you are a contact on.' : 'No Project Filters',\n                    selectedProjectIds: this.reportFilters.isMyProjects ? [] : this.reportFilters.projects,\n                    projects: this.projects,\n                    onChange: _.bind(function (selectedProjects) {\n                        let idArr = _.map(selectedProjects, function (project) {\n                            return project.get('projectId') ? project.get('projectId') : project.id;\n                        });\n                        this.reportFilters.projects = idArr;\n                        this.report.setFilters(this.reportFilters);\n                    }, this)\n                });\n\n                this.projectStatusPicker = new PJQ.inputs.Selectpicker({\n                    el: this.$('.select-project-status-filter'),\n                    defaultValue: this.reportFilters.projectStatuses,\n                    noneSelectedText: 'Select Project Statuses',\n                    isMultiple: true,\n                    isIntChoices: true,\n                    onChange: _.bind(function (value) {\n                        this.reportFilters.projectStatuses = value;\n                        this.report.setFilters(this.reportFilters);\n                    }, this)\n                });\n            }\n        }\n\n        _.each(this.reportType.filters, async (filter) => {\n            if (filter.inputType === PJQ.constants.reports.filterTypes.SELECT) {\n                let choices;\n                if (typeof filter.choices === 'function') {\n                    choices = await filter.choices({project: this.options.project});\n                } else {\n                    choices = filter.choices;\n                }\n\n                new PJQ.inputs.Selectpicker({\n                    el: this.$('.select-filter[data-key=\"' + (filter.key) + '\"]'),\n                    defaultValue: this.reportFilters[filter.key],\n                    choices: choices,\n                    noneSelectedText: 'Select ' + filter.name,\n                    isMultiple: filter.isMultiple,\n                    isIntChoices: filter.isIntChoices,\n                    onChange: _.bind(function (value) {\n                        this.reportFilters[filter.key] = value;\n                        this.report.setFilters(this.reportFilters);\n                    }, this)\n                });\n            } else if (filter.inputType === PJQ.constants.reports.filterTypes.DATE_RANGE) {\n                let $range = this.$('.input-specific-date[data-key=\"' + (filter.key) + '\"]'),\n                    dateRange = [null, null],\n                    defaultDateOne = this.reportFilters[filter.key] ? PJQ.helpers.dateHelpers.parseDateString(dateRange[0], false) : null,\n                    defaultDateTwo = this.reportFilters[filter.key] ? PJQ.helpers.dateHelpers.parseDateString(dateRange[1], false) : null,\n                    fnSetFilter = () => {\n                        let date1 = dateRange[0] ? dateRange[0] : \"null\",\n                            date2 = dateRange[1] ? dateRange[1] : \"\";\n                        this.reportFilters[filter.key] = date1 + '|' + date2;\n                        this.report.setFilters(this.reportFilters);\n                    },\n                    datePickerFrom = new PJQ.inputs.Datepicker({\n                        el: $range.find('.date-from'),\n                        datepickerOptions: {\n                            format: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE,\n                            defaultDate: null\n                        },\n                        onChange: _.bind(function (date) {\n                            dateRange[0] = date ? PJQ.helpers.dateHelpers.getDateString(date, PJQ.helpers.dateHelpers.dateFormats.DATE) : null;\n                            fnSetFilter();\n                        }, this)\n                    }),\n                    datePickerTo = new PJQ.inputs.Datepicker({\n                        el: $range.find('.date-to'),\n                        datepickerOptions: {\n                            format: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE,\n                            defaultDate: null\n                        },\n                        onChange: _.bind(function (date) {\n                            dateRange[1] = date ? PJQ.helpers.dateHelpers.getDateString(date, PJQ.helpers.dateHelpers.dateFormats.DATE) : null;\n                            fnSetFilter();\n                        }, this)\n                    });\n\n                let filterVal = this.reportFilters[filter.dynamicKey],\n                    dynVal = null;\n                if (typeof filterVal === 'string') {\n                    dynVal = filterVal.replace('dyn:', '');\n                }\n                new PJQ.inputs.Selectpicker({\n                    el: this.$('.select-dynamic-date[data-key=\"' + (filter.dynamicKey) + '\"]'),\n                    defaultValue: dynVal,\n                    noneSelectedText: 'Select ' + filter.name + ' Range',\n                    isMultiple: false,\n                    isIntChoices: false,\n                    onChange: _.bind(function (value) {\n                        this.reportFilters[filter.dynamicKey] = _.size(value) > 0 ? (\"dyn:\" + value) : null;\n                        this.report.setFilters(this.reportFilters);\n                    }, this)\n                });\n\n                datePickerFrom.setValueSilently(defaultDateOne);\n                datePickerTo.setValueSilently(defaultDateTwo);\n            }\n        }, this)\n    },\n    renderDataTable: function () {\n        let filteredMoneyColumns;\n        // Currently we only want to render a footer for money columns\n        if (this.report && this.report.reportData) {\n            filteredMoneyColumns = _.filter(this.report.reportData.columns, function (column) {\n                return column.type === 'money';\n            }, this)\n        }\n\n        let order = [],\n            opts = this.report.get('options'),\n            cOrder = opts ? this.report.get('options').columnOrder : null;\n        if (this.report.reportData && this.report.reportData.columns && _.size(cOrder) >= 2 &&\n            this.report.get('options').columnOrder[0] < _.size(this.report.reportData.columns)) {\n            order = [cOrder];\n        }\n\n        this.dataTable = new PJQ.views.reporting.ReportCenterDataTable({\n            el: this.$('.report-table'),\n            paging: false,\n            hasFooter: _.size(filteredMoneyColumns) > 0,\n            data: this.report.reportData ? this.report.reportData.rows : null,\n            columnData: this.report.reportData ? this.report.reportData.columns : null,\n            order: order,\n            reportType: this.reportType,\n            orderByChanged: _.bind(function (details) {\n                let options = this.report.get('options');\n                options.columnOrder = [details[0].col, details[0].dir];\n                this.report.set('options', options);\n            }, this),\n            columnOrderChanged: _.bind(function (columns) {\n                this.report.setColumns(_.map(columns, function (column) {\n                    return column.data;\n                }));\n            }, this),\n            afterDataTableRender: _.bind(function () {\n                if (_.size(filteredMoneyColumns) > 0) {\n                    this.renderTableFooter();\n                }\n            }, this),\n            viewItem: _.bind(function (id) {\n                if (id) {\n                    this.viewReportItem(id);\n                }\n            }, this),\n            viewRelatedItem: _.bind(function (id) {\n                if (id) {\n                    this.viewRelatedReportItem(id);\n                }\n            }, this)\n        });\n    },\n    renderTableFooter: function () {\n        let $footer = this.$('tfoot').first();\n        _.each(this.report.reportData.columns, function (column, index) {\n            if (column.type != null && column.type.toLowerCase() === 'money') {\n                let total = 0;\n                _.each(this.report.reportData.rows, function (row) {\n                    if (row[column.index] != null) {\n                        total += parseInt(PJQ.helpers.formatHelpers.numbersOnly(row[column.index], false, true));\n                    }\n                });\n\n                let $footerCol = $footer.find('th').eq(index);\n                $footerCol.text(PJQ.helpers.formatHelpers.formatCurrency(total));\n            }\n        }, this);\n    },\n    viewReportItem: function (id) {\n        switch (this.reportType.type) {\n            case PJQ.constants.reports.PAYABLE_INVOICE.type:\n                new PJQ.views.invoicing.EditPayableInvoiceModal({\n                    model: new PJQ.models.invoicing.PayableInvoice({\n                        id: id\n                    })\n                })\n                break;\n            case PJQ.constants.reports.RECEIVABLE_INVOICE.type:\n                new PJQ.views.invoicing.EditReceivableInvoiceModal({\n                    model: new PJQ.models.invoicing.ReceivableInvoice({\n                        id: id\n                    })\n                })\n                break;\n            case PJQ.constants.reports.DIRECT_COST.type:\n                new PJQ.views.directcosts.DirectCostEditModal({\n                    model: new PJQ.models.directcosts.DirectCost({\n                        id: id\n                    })\n                })\n                break;\n            case PJQ.constants.reports.COMMITMENT.type:\n                new PJQ.views.commitments.CommitmentEditModal({\n                    model: new PJQ.models.commitments.Commitment({\n                        id: id\n                    })\n                })\n                break;\n            case PJQ.constants.reports.CONTRACT.type:\n                new PJQ.views.primeContracts.PrimeContractEditModal({\n                    model: new PJQ.models.primeContracts.PrimeContract({\n                        id: id\n                    })\n                })\n                break;\n            case PJQ.constants.reports.CONTRACT_CHANGE_ORDER.type:\n                new PJQ.views.primeContracts.ChangeOrderEditModal({\n                    model: new PJQ.models.primeContracts.ChangeOrder({\n                        id: id\n                    })\n                })\n                break;\n            case PJQ.constants.reports.COMMITMENT_CHANGE_ORDER.type:\n                new PJQ.views.commitments.ChangeOrderEditModal({\n                    model: new PJQ.models.commitments.ChangeOrder({\n                        id: id\n                    })\n                })\n                break;\n        }\n    },\n    viewRelatedReportItem: function (id) {\n        switch (this.reportType.type) {\n            case PJQ.constants.reports.PAYABLE_INVOICE.type:\n                new PJQ.views.commitments.CommitmentEditModal({\n                    model: new PJQ.models.commitments.Commitment({\n                        id: id\n                    })\n                })\n                break;\n            case PJQ.constants.reports.RECEIVABLE_INVOICE.type:\n                new PJQ.views.primeContracts.PrimeContractEditModal({\n                    model: new PJQ.models.primeContracts.PrimeContract({\n                        id: id\n                    })\n                })\n                break;\n            case PJQ.constants.reports.CONTRACT_CHANGE_ORDER.type:\n                new PJQ.views.primeContracts.PrimeContractEditModal({\n                    model: new PJQ.models.primeContracts.PrimeContract({\n                        id: id\n                    })\n                })\n                break;\n            case PJQ.constants.reports.COMMITMENT_CHANGE_ORDER.type:\n                new PJQ.views.commitments.CommitmentEditModal({\n                    model: new PJQ.models.commitments.Commitment({\n                        id: id\n                    })\n                })\n                break;\n        }\n    },\n    validate: function () {\n        let isValid = true;\n        if (_.size(this.report.getColumns()) === 0) {\n            isValid = false;\n        }\n\n        if (this.columnsPicker != null) {\n            isValid ? this.columnsPicker.hideError() : this.columnsPicker.showError();\n        }\n        return isValid;\n    },\n    saveReport: function () {\n        if (!this.validate()) {\n            return;\n        }\n\n        let isNew = this.report.isNew();\n        new PJQ.views.reporting.EditReportModal({\n            project: this.options.project,\n            model: this.report,\n            onSave: _.bind(function () {\n                this.report.save(null, {\n                    success: _.bind(function (model) {\n                        if (isNew) {\n                            this.collection.add(model);\n                        }\n                        this.populateReportSelect();\n\n                        PJQ.notifications.notify.successNotify({\n                            message: 'Report successfully saved'\n                        });\n                    }, this)\n                })\n            }, this)\n        });\n    },\n    populateReportSelect: function () {\n        // Group the reports by their type\n        let groupedReports = _.groupBy(this.collection.models, function (report) {\n            return report.get('type');\n        });\n\n        // Convert groupedReports to the format that updateChoices expects\n        let choices = _.map(groupedReports, function (reports, type) {\n            return {\n                name: _.find(PJQ.constants.reports.reportTypes, function (reportType) {\n                    return reportType.type === type;\n                }).name,\n                choices: _.map(reports, function (report) {\n                    return {\n                        id: report.id,\n                        name: report.get('name'),\n                        isCustom: false\n                    };\n                })\n            };\n        });\n\n        if (this.savedReportPicker) {\n            this.savedReportPicker.updateChoices(choices);\n            let selectedReportId = this.report ? this.report.get('type') != null ? this.report.id : -this.report.id : null;\n            this.savedReportPicker.setValue(selectedReportId);\n            if (_.size(this.collection.models) > 0 || _.size(this.customReports.models) > 0) {\n                this.savedReportPicker.enable();\n            } else {\n                this.savedReportPicker.disable();\n            }\n        }\n\n        if (this.report) {\n            this.$('.btn-delete-report').attr('hidden', this.report.id == null);\n        }\n    },\n    resetFilters: function () {\n        this.report.resetFilters();\n        this.renderReport(null);\n    }\n});\n\nPJQ.views.reporting.EditReportModal = PJQ.views.BaseModal.extend({\n    defaults: {\n        template: new PJQ.templating.Template(PJQ.constants.modules.REPORTS, 'modal-edit-report'),\n        width: '50%',\n        maxWidth: 400,\n        model: null,\n        isShowCloseButton: true,\n    },\n    events: {\n        'click .btn-close': 'close',\n        'click .btn-save': 'save'\n    },\n    beforeRender: function () {\n\n    },\n    renderData: function () {\n        return {\n            model: this.model\n        }\n    },\n    afterRender: function () {\n        new PJQ.Binder(this.$el, this.model, {\n            watchElements: ['input']\n        });\n\n        this.setInputFocus(this.$('.input-report-name')[0]);\n    },\n    setInputFocus: function (input) {\n        input.focus();\n        input.setSelectionRange(input.value.length, input.value.length);\n    },\n    save: function () {\n        this.options.onSave(this.model);\n        this.removeModal();\n    },\n    close: function () {\n        this.removeModal();\n    }\n});\n\nPJQ.views.reporting.ReportCenterDataTable = PJQ.views.dataTables.DataTable.extend({\n    defaults: {\n        language: {\n            emptyTable: 'Select from your saved reports, or create a new one to get started',\n            zeroRecords: \"No records match your request\"\n        },\n        subTemplates: {\n            header: new PJQ.templating.Template(PJQ.constants.modules.REPORTS, 'data-table-header-report-center')\n        },\n        colReorder: {\n            realtime: false\n        }\n    },\n    events: {\n        'click .view-item': 'viewItem',\n        'click .view-related-item': 'viewRelatedItem'\n    },\n    afterHeaderRender: function () {\n\n    },\n    getColumns: function () {\n        let columns = []\n\n        if (this.options.columnData) {\n            _.each(this.options.columnData, function (column) {\n                columns.push({\n                    \"data\": column.dataValue,\n                    \"title\": column.displayValue,\n                    \"render\": _.bind(function (dt, type, row) {\n                        let data = row.data[column.index],\n                            displayValue = data && data.text ? data.text : data;\n                        if (column.type.toLowerCase() === 'money') {\n                            displayValue = PJQ.helpers.formatHelpers.formatCurrency(displayValue);\n                        }\n\n                        if (column.type.indexOf('viewItem:') !== -1) {\n                            let itemType = column.type.replace('viewItem:', '');\n                            return '<a class=\"view-item\" href=\"javascript:void(0)\" data-item-type=\"' + itemType + '\" data-id=\"' + row.props.id + '\">' + displayValue + '</a>';\n                        } else if (column.type === 'url') {\n                            return '<a class=\"view-item\" target=\"_blank\" href=\"#' + data.url + '\">' + displayValue + '</a>';\n                        }\n                        return displayValue;\n                    }, this)\n                });\n            }, this)\n        } else {\n            columns.push({\n                \"data\": '',\n                \"title\": '',\n            })\n        }\n\n        return columns;\n    },\n    viewItem: function (e) {\n        e.stopImmediatePropagation();\n        let id = $(e.currentTarget).data('id');\n        if (typeof this.options.viewItem === 'function') {\n            this.options.viewItem(id);\n        }\n    },\n    viewRelatedItem: function (e) {\n        e.stopImmediatePropagation();\n        let id = $(e.currentTarget).data('id');\n        if (typeof this.options.viewItem === 'function') {\n            this.options.viewRelatedItem(id);\n        }\n    }\n});","PJQ.models.reports.Report = PJQ.models.BaseModel.extend({\n    idAttribute: 'reportId',\n    getExtraParameters: function (callback) {\n        if (this.get('extraParameters') && !this.parameters) {\n            this.parameters = new PJQ.collections.reports.ReportParameters();\n\n            let extraParamsArray = this.get('extraParameters').split(\"|||\");\n\n            _.each(extraParamsArray, function (param, index) {\n                let thisReportParam = param.split(\"||\"),\n                    parameterObject = new PJQ.models.reports.ReportParameter({\n                        name: thisReportParam[0],\n                        inputDisplayName: thisReportParam[1],\n                        inputType: thisReportParam[2],\n                        defaultValue: thisReportParam[4],\n                        value: thisReportParam[4],\n                        choices: []\n                    }),\n                    customField;\n\n                let choices = [];\n                if (parameterObject.get('inputType').toLowerCase() === 'select') {\n                    let options = thisReportParam[3].split(\"|\");\n\n                    _.each(options, function (option) {\n                        let splitOption = option.split(\":\")\n\n                        // Check if custom field options exist\n                        if (option.includes('ProjectCustomField:')) {\n                            customField = new PJQ.models.projects.ProjectCustomField({\n                                id: parseInt(splitOption[1])\n                            })\n                        } else if (option.includes('CompanyCustomField:')) {\n                            customField = new PJQ.models.contacts.CompanyCustomField({\n                                id: parseInt(splitOption[1])\n                            })\n                        } else if (option.includes('ContactCustomField:')) {\n                            customField = new PJQ.models.contacts.ContactCustomField({\n                                id: parseInt(splitOption[1])\n                            })\n                        } else if (option.includes('User:')) {\n                            customField = new PJQ.collections.users.Users({})\n                        } else {\n                            choices.push(option);\n                        }\n                    }, this)\n\n                    // Reused render function\n                    let fnRender = _.bind(function () {\n                        // Users uses a collection and not a model, so it needs to map through the models and not the choices\n                        if (PJQ.helpers.objectHelpers.refinedType(customField, true) === 'backboneCollection') {\n                            let customChoices = _.map(customField.models, function (model) {\n                                return model.get('contactName');\n                            }, this)\n\n                            // If there are choices existing that aren't included in custom field choices, then push them\n                            if (choices.length > 0) {\n                                customChoices.unshift(...choices);\n                            }\n\n                            parameterObject.set('choices', customChoices);\n                            // Custom fields use a model with a choices object\n                        } else {\n                            let customChoices = _.map(customField.choices.models, function (model) {\n                                return model.get('choiceName');\n                            }, this)\n\n                            //If there are choices existing that aren't included in custom field choices, then push them\n                            if (choices.length > 0) {\n                                customChoices.unshift(...choices);\n                            }\n\n                            // Finish setting choices\n                            parameterObject.set('choices', customChoices);\n                        }\n                        this.parameters.add(parameterObject);\n\n                        // Needs to use callback due to render timing issues. Will use callback if it is the last extra parameter\n                        if (index + 1 === extraParamsArray.length && typeof callback === 'function') {\n                            callback(this.parameters);\n                        }\n                    }, this);\n\n                    if (customField && !customField.isFetched) {\n                        customField.fetch({\n                            success: _.bind(function () {\n                                fnRender();\n                            }, this)\n                        })\n                    } else if (customField) {\n                        fnRender();\n                    }\n                }\n                // Parameter isn't a select input, so it is finished and can be pushed\n                else {\n                    this.parameters.add(parameterObject);\n\n                    // Needs to use callback due to render timing issues. Will use callback if it is the last extra parameter\n                    if (index + 1 === extraParamsArray.length && typeof callback === 'function') {\n                        callback(this.parameters);\n                    }\n                }\n            }, this)\n        } else if (this.parameters) {\n            if (typeof callback === 'function') {\n                callback(this.parameters);\n            }\n        } else {\n            callback(null);\n        }\n    },\n});\n\nPJQ.models.reports.ReportParameter = PJQ.models.BaseModel.extend({});\n\nPJQ.collections.reports.ReportList = PJQ.collections.BaseCollection.extend({\n    model: PJQ.models.reports.Report,\n    endpoint: function () {\n        if (this.options.project) {\n            return PJQ.helpers.urlHelpers.generateEndpoint([\n                {\n                    endpoint: 'projects',\n                    value: this.options.project.id\n                },\n                {\n                    endpoint: 'reports'\n                },\n                {\n                    endpoint: 'list'\n                }\n            ])\n        } else {\n            return PJQ.helpers.urlHelpers.generateEndpoint([\n                {\n                    endpoint: 'reports'\n                },\n                {\n                    endpoint: 'list'\n                }\n            ]);\n        }\n    }\n});\n\nPJQ.collections.reports.ReportParameters = PJQ.collections.BaseCollection.extend({\n    model: PJQ.models.reports.ReportParameter\n});","// temporary view for a custom report until we get a full new infrastructure in place\nPJQ.views.reporting.SubcontractorDiversityStatusExportModal = PJQ.views.BaseModal.extend({\n\tdefaults: {\n\t\ttemplate: new PJQ.templating.Template(PJQ.constants.modules.REPORTS, 'Modal-Subcontractor-Diversity-Status-Export'),\n\t\tmaxWidth: 600\n\t},\n\tevents: {\n\t\t'click .export': 'export',\n\t},\n\tafterModalCreated: function () {\n\t},\n\tbeforeRender: function () {\n\t},\n\tafterRender: function () {\n\t\tthis.statePicker = new PJQ.inputs.StatePicker({\n\t\t\tel: this.$('select.input-select-state'),\n\t\t\tcountry: 'US',\n\t\t\tdefaultValue: null,\n\t\t\tisMultiple: true,\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\t$('.export').prop('disabled', _.size(value) === 0);\n\t\t\t}, this)\n\t\t});\n\t},\n\texport: function () {\n\t\tlet options = this.model.get('options');\n\t\toptions[0].value.values = this.statePicker.getValue();\n\n\t\tif (typeof this.options.onDownload === 'function') {\n\t\t\tlet loader = new PJQ.Loader(this.$('.modal-content'));\n\t\t\tthis.options.onDownload(this.model.get('options'), _.bind(function () {\n\t\t\t\tloader.remove();\n\t\t\t\tthis.removeModal();\n\t\t\t}, this));\n\t\t}\n\t}\n});\n\nPJQ.views.reporting.ReportView = PJQ.views.BaseView.extend({\n\tdefaults: {\n\t\ttemplate: new PJQ.templating.Template(PJQ.constants.modules.REPORTS, 'report-view'),\n\t\tsubTemplates: {\n\t\t\treportError: new PJQ.templating.Template(PJQ.constants.modules.REPORTS, 'report-error'),\n\t\t\ttestReport: new PJQ.templating.Template(PJQ.constants.modules.REPORTS, 'test-report'),\n\t\t\textraParameters: new PJQ.templating.Template(PJQ.constants.modules.REPORTS, 'report-extra-parameters')\n\t\t}\n\t},\n\tevents: {\n\t\t'click .export-report': 'exportReport',\n\t\t'click .btn-reload-report': 'reloadReport'\n\t},\n\tbeforeFirstRender: function () {\n\t\tlet fnRender = _.bind(function () {\n\t\t\tthis.render();\n\t\t}, this);\n\n\t\tif (!this.collection) {\n\t\t\tthis.collection = new PJQ.collections.reports.ReportList(null, {\n\t\t\t\tproject: this.options.project\n\t\t\t});\n\t\t}\n\t\tif (!this.collection.isFetched) {\n\t\t\tthis.collection.fetch({\n\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\tfnRender();\n\t\t\t\t}, this)\n\t\t\t})\n\t\t}\n\t\telse {\n\t\t\tfnRender();\n\t\t}\n\t},\n\trenderData: function () {\n\t\treturn {\n\t\t\treportList: this.collection,\n\t\t\tselectedReport: this.selectedReport\n\t\t};\n\t},\n\tafterRender: function () {\n\t\tnew PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('.report-list'),\n\t\t\tdefaultValue: this.selectedReport ? this.selectedReport.get('reportId') : null,\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tif (value === 'PANTERAMARKETING') {\n\t\t\t\t\tthis.renderCustomReportMarketing();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.selectedReport = this.collection.get(value);\n\t\t\t\t\tthis.render();\n\t\t\t\t}\n\t\t\t}, this)\n\t\t});\n\n\t\tthis.fromDatePicker = new PJQ.inputs.Datepicker({\n\t\t\tel: this.$('.input-date-from'),\n\t\t\tdatepickerOptions: {\n\t\t\t\tdefaultDate: this.selectedReport && this.selectedReport.get('fromDateDefault') ? this.calculateDate(this.selectedReport.get('fromDateDefault').replace('Math:', '').split('|')) : new Date(),\n\t\t\t\tformat: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE\n\t\t\t},\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tthis.selectedReport.set('fromDate', PJQ.helpers.dateHelpers.getDateString(new Date(value), PJQ.helpers.dateHelpers.dateFormats.DATE));\n\t\t\t}, this)\n\t\t});\n\t\tthis.toDatePicker = new PJQ.inputs.Datepicker({\n\t\t\tel: this.$('.input-date-to'),\n\t\t\tdatepickerOptions: {\n\t\t\t\tdefaultDate: this.selectedReport && this.selectedReport.get('toDateDefault') ? this.calculateDate(this.selectedReport.get('toDateDefault').replace('Math:', '').split('|')) : new Date(),\n\t\t\t\tformat: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE\n\t\t\t},\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tthis.selectedReport.set('toDate', PJQ.helpers.dateHelpers.getDateString(new Date(value), PJQ.helpers.dateHelpers.dateFormats.DATE));\n\t\t\t}, this)\n\t\t});\n\n\t\t// We have to get the Extra Parameters before we can generate the report\n\t\tif(this.selectedReport){\n\t\t\tthis.renderExtraParameters();\n\t\t}\n\t},\n\texportReport: function (e) {\n\t\tlet $target = $(e.currentTarget),\n\t\t\ttype = $target.data('type'),\n\t\t\treportParams = {};\n\n\t\tif (this.selectedReport.get('hasDateFilter')) {\n\t\t\treportParams[\"FromDate\"] = PJQ.helpers.dateHelpers.getDateString(new Date(this.fromDatePicker.value), PJQ.helpers.dateHelpers.dateFormats.DATE);\n\t\t\treportParams[\"ToDate\"] = PJQ.helpers.dateHelpers.getDateString(new Date(this.toDatePicker.value), PJQ.helpers.dateHelpers.dateFormats.DATE);\n\t\t}\n\n\t\tif (this.selectedReport.parameters) {\n\t\t\t_.each(this.selectedReport.parameters.models, _.bind(function (param) {\n\t\t\t\treportParams[param.get('name')] = param.get('value');\n\t\t\t}, this))\n\t\t}\n\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: 'reports'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tendpoint: 'export'\n\t\t\t\t}\n\t\t\t]), data: {\n\t\t\t\treportId: this.selectedReport.get('reportId'),\n\t\t\t\tprojectId: PJQ.app.session.project ? PJQ.app.session.project.id : undefined,\n\t\t\t\tparameters: Object.keys(reportParams).length > 0 ? JSON.stringify(reportParams) : null,\n\t\t\t\texportType: type ? type : 'pdf'\n\t\t\t}\n\t\t}).post().done(_.bind(function (response) {\n\t\t\tPJQ.files.downloadFile(response.url, {\n\t\t\t\tisEndpoint: false\n\t\t\t});\n\t\t}, this));\n\t},\n\treloadReport: function () {\n\t\tthis.generateReport(this.selectedReport.parameters);\n\t},\n\trenderCustomReportMarketing: function () {\n\t\tlet $el = this.$('.report-container')\n\t\t$el.empty();\n\n\t\tthis.$('.custom-hide').addClass('hidden');\n\n\t\t$el.html($('<img>', {\n\t\t\tstyle: 'width: 100%',\n\t\t\tsrc: '/portals/_default/customReports.png'\n\t\t}));\n\t},\n\trenderReport: function (data) {\n\t\tif (data) {\n\t\t\tlet $el = this.$('.report-container')\n\t\t\t$el.empty();\n\n\t\t\tif (data.isImage) {\n\t\t\t\t$el.html($('<img>', {\n\t\t\t\t\tstyle: 'width: 100%',\n\t\t\t\t\tsrc: 'data:image/png;base64,' + data.reportData\n\t\t\t\t}));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlet template = data.reportData;\n\t\t\t\ttemplate = template.replace(`\"<!DOCTYPE HTML PUBLIC \\\\\"-//W3C//DTD HTML 4.01 Transitional//EN\\\\\">`, '');\n\t\t\t\ttemplate = template.replace(/\\\\/g, '');\n\t\t\t\tthis.$('.report-container').html(template);\n\t\t\t}\n\t\t}\n\t},\n\tgenerateReport: function (params) {\n\t\tif (this.selectedReport) {\n\t\t\tlet loader = new PJQ.Loader(this.$('.report-container'));\n\t\t\tlet reportParams = {};\n\n\t\t\tif (this.selectedReport.get('hasDateFilter')) {\n\t\t\t\treportParams[\"FromDate\"] = PJQ.helpers.dateHelpers.getDateString(new Date(this.fromDatePicker.value), PJQ.helpers.dateHelpers.dateFormats.DATE);\n\t\t\t\treportParams[\"ToDate\"] = PJQ.helpers.dateHelpers.getDateString(new Date(this.toDatePicker.value), PJQ.helpers.dateHelpers.dateFormats.DATE);\n\t\t\t}\n\n\t\t\tif (params) {\n\t\t\t\t_.each(params.models, _.bind(function (param) {\n\t\t\t\t\treportParams[param.get('name')] = param.get('value');\n\t\t\t\t}, this))\n\t\t\t}\n\n\t\t\tnew PJQ.ajax.Request({\n\t\t\t\tendpoint: \"/report/GenerateReport\",\n\t\t\t\tdata: {\n\t\t\t\t\treportId: this.selectedReport.get('reportId'),\n\t\t\t\t\tprojectId: PJQ.app.session.project ? PJQ.app.session.project.id : undefined,\n\t\t\t\t\tparameters: Object.keys(reportParams).length > 0 ? JSON.stringify(reportParams) : null\n\t\t\t\t}\n\t\t\t}).post().done(_.bind(function (data) {\n\t\t\t\tloader.remove();\n\t\t\t\tthis.renderReport(data);\n\t\t\t}, this)).fail(_.bind(function () {\n\t\t\t\tloader.remove();\n\t\t\t\tthis.renderError();\n\t\t\t}, this));\n\t\t}\n\t},\n\trenderError: function () {\n\t\tthis.renderSubTemplate(false, this.options.subTemplates.reportError, this.$('.report-container'));\n\t},\n\tcalculateDate: function (mathArr) {\n\t\tlet dnow = new Date(),\n\t\t\tthisMonth = dnow.getMonth() + 1,\n\t\t\tthisDay = dnow.getDate(),\n\t\t\tthisYear = dnow.getFullYear(),\n\t\t\tthisMonthMath = mathArr[0],\n\t\t\tthisDayMath = mathArr[1],\n\t\t\tthisYearMath = mathArr[2],\n\t\t\tthisMonthIsStatic = thisMonthMath.toLowerCase().indexOf('s:') != -1 ? true : false,\n\t\t\tthisDayIsStatic = thisDayMath.toLowerCase().indexOf('s:') != -1 ? true : false,\n\t\t\tthisYearIsStatic = thisYearMath.toLowerCase().indexOf('s:') != -1 ? true : false;\n\t\tif (thisMonthIsStatic) {\n\t\t\tthisMonth = thisMonthMath.replace('s:', '');\n\t\t}\n\t\telse {\n\t\t\tthisMonth = thisMonth + parseInt(thisMonthMath);\n\t\t}\n\t\tif (thisDayIsStatic) {\n\t\t\tthisDay = thisDayMath.replace('s:', '');\n\t\t}\n\t\telse {\n\t\t\tthisDay = thisDay + parseInt(thisDayMath);\n\t\t}\n\t\tif (thisYearIsStatic) {\n\t\t\tthisYear = thisYearMath.replace('s:', '');\n\t\t}\n\t\telse {\n\t\t\tthisYear = thisYear + parseInt(thisYearMath);\n\t\t}\n\n\t\tlet daysInMonth;\n\t\tif (thisDay < 1 && !thisDayIsStatic) {\n\t\t\tif (thisMonthIsStatic) {\n\t\t\t\tthisDay = 1;\n\t\t\t\tdaysInMonth = PJQ.helpers.dateHelpers.GetDaysInMonth(thisMonth, thisYear);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthisMonth = thisMonth - 1;\n\t\t\t\tdaysInMonth = PJQ.helpers.dateHelpers.GetDaysInMonth(thisMonth, thisYear);\n\t\t\t\tthisDay = daysInMonth + thisDay;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tdaysInMonth = PJQ.helpers.dateHelpers.GetDaysInMonth(thisMonth, thisYear);\n\t\t}\n\t\tif (thisDay > daysInMonth) {\n\t\t\tif (thisMonthIsStatic) {\n\t\t\t\tthisMonth = thisMonth + 1;\n\t\t\t\tdaysInMonth = PJQ.helpers.dateHelpers.GetDaysInMonth(thisMonth, thisYear)\n\t\t\t\tthisDay = thisDay - daysInMonth;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthisDay = daysInMonth;\n\t\t\t}\n\t\t}\n\t\tif (thisMonth < 1 && !thisMonthIsStatic) {\n\t\t\tthisMonth = thisMonth + 12;\n\t\t\tif (!thisYearIsStatic) {\n\t\t\t\tthisYear = thisYear - 1;\n\t\t\t}\n\t\t}\n\t\telse if (thisMonth > 12 && !thisMonthIsStatic) {\n\t\t\tthisMonth = thisMonth - 12;\n\t\t\tif (!thisYearIsStatic) {\n\t\t\t\tthisYear = thisYear + 1;\n\t\t\t}\n\t\t}\n\n\t\treturn new Date(thisYear, thisMonth, thisDay);\n\t},\n\trenderExtraParameters: function () {\n\t\tif (this.selectedReport && this.selectedReport.get('extraParameters') && this.selectedReport.get('extraParameters') !== 'NULL') {\n\t\t\tthis.selectedReport.getExtraParameters(_.bind(function (params) {\n\t\t\t\t// Render subtemplate with returned parameters\n\t\t\t\tthis.renderSubTemplate(false, this.options.subTemplates.extraParameters, this.$('.extra-parameter-inputs'), {\n\t\t\t\t\textraParams: params.models\n\t\t\t\t});\n\n\t\t\t\t// Add any binders or inputs required for parameters\n\t\t\t\t_.each(params.models, function (param) {\n\t\t\t\t\tif (param.get('inputType').toLowerCase() === 'select') {\n\t\t\t\t\t\tnew PJQ.inputs.Selectpicker({\n\t\t\t\t\t\t\tel: this.$(('select.' + param.cid)),\n\t\t\t\t\t\t\tdefaultValue: param.get('defaultValue'),\n\t\t\t\t\t\t\tonChange: _.bind(function (value) {\n\t\t\t\t\t\t\t\tparam.set('value', value);\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\telse if (param.get('inputType').toLowerCase() === 'date') {\n\t\t\t\t\t\tnew PJQ.inputs.Datepicker({\n\t\t\t\t\t\t\tel: this.$(('.' + param.cid)),\n\t\t\t\t\t\t\tdatepickerOptions: {\n\t\t\t\t\t\t\t\t// defaultDate: option.defaultValue ? option.defaultValue.to : null,\n\t\t\t\t\t\t\t\tformat: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonChange: _.bind(function (value) {\n\t\t\t\t\t\t\t\tparam.set('value', value);\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\telse {\n\t\t\t\t\t\tnew PJQ.Binder(this.$el, param, {\n\t\t\t\t\t\t\twatchElements: [\n\t\t\t\t\t\t\t\t('.' + param.cid)\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}, this)\n\t\t\t\t//Generate the report once the parameters are established\n\t\t\t\tthis.generateReport(params);\n\t\t\t}, this));\n\t\t}\n\t\telse {\n\t\t\t// There are no parameters to worry about, so we can just generate the report\n\t\t\tthis.generateReport();\n\t\t}\n\t}\n});"]}