{"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","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","dailyReports","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","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,oBAEA,CACAD,MAAA,WACAC,QAAA,aAEA,CACAD,MAAA,eACA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,EAAAjhB,KAAAxB,QAAAkN,aAAAgU,gBAAA1f,KAAA8P,EAAA,2BAAA,CACAoS,YAAAxX,EAAAhP,SAIA6D,EAAA6C,KAAAsI,EAAAhP,OAAA,SAAA+hB,GACA,WAAAA,EAAA9d,IAAA,aAAAgD,cACA,IAAApH,IAAAoU,OAAAC,aAAA,CACAC,GAAA7P,KAAA8P,EAAA,UAAA2N,EAAA0E,KACApS,aAAA0N,EAAA9d,IAAA,gBACAsQ,SAAA1Q,EAAAkK,KAAA,SAAAlN,GACAkhB,EAAA9U,IAAA,QAAApM,IACAyD,QAGA,SAAAyd,EAAA9d,IAAA,aAAAgD,cACA,IAAApH,IAAAoU,OAAA0H,WAAA,CACAxH,GAAA7P,KAAA8P,EAAA,IAAA2N,EAAA0E,KACA7K,kBAAA,CAEAxN,OAAAvO,IAAAmG,QAAAC,YAAA4V,YAAAC,WAAAtQ,MAEA+I,SAAA1Q,EAAAkK,KAAA,SAAAlN,GACAkhB,EAAA9U,IAAA,QAAApM,IACAyD,QAIA,IAAAzE,IAAAogB,OAAA3b,KAAA4b,IAAA6B,EAAA,CACA5B,cAAA,CACA,IAAA4B,EAAA0E,QAIAniB,MAEAA,KAAA2Q,eAAAjG,IACA1K,OAIAA,KAAA2Q","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: '
' + (isControlled ? '> ' : '') + fieldName + '
',\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: \"contract\", display: \"Contract\"},\n {value: \"status\", display: \"Status\"},\n {value: \"number\", display: \"Number\"},\n {value: \"description\", display: \"Description\"},\n {value: \"created\", display: \"Created\"},\n {value: \"amount\", display: \"Amount\"}\n ],\n filters: [\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: '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: {\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 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 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_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 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 '' + displayValue + '';\n } else if (column.type === 'url') {\n return '' + displayValue + '';\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($('', {\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($('', {\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(`\"`, '');\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});"]}