{"version":3,"sources":["1Initializers.js","lineitemsview.js","timecardaddviews.js","timecardaddweeklyviews.js","timecarddatatables.js","timecardeditviews.js","timecardinputs.js","timecardmodels.js","timecardsettings.js","timecardviews.js"],"names":["PJQ","views","timecards","constants","view","BY_TIMECARD","BY_TIMECARD_GROUP","BY_PROJECT","BY_PROJECT_CONTACT","BY_PROJECT_CONTACT_TIMECARD","BY_CONTACT","BY_CONTACT_PROJECT","BY_CONTACT_PROJECT_TIMECARD","BY_TIMECARD_DATAENTRY","BY_TIMECARD_GROUP_DATAENTRY","PROJECTWALL_BY_TIMECARD","defaultDateRange","WEEK_TO_DATE","DAYS_7","DAYS_14","DAYS_28","MONTH_TO_DATE","selectionMode","NONE","APPROVE","UNAPPROVE","manageTimeCards","stage","SELECT_DATE","SELECT_PROJECT","SELECT_CONTACTS","MANAGE_TIMECARDS","timeCardGroupBy","CONTACT","DATE","helpers","app","module","modules","TIMECARDS","addOldRoutes","route","name","callback","router","navigate","trigger","replace","routes","session","project","APP","get","initNavigator","activeItem","renderView","TimeCardMain","projectId","projectWall","initProjectNavigator","parseInt","addRoutes","LineItemsView","BaseView","extend","defaults","template","templating","Template","onLineItemChanged","canEdit","events","keyup .li-overtime-hours, .li-regular-hours, .li-doubletime-hours","click .btn-add-line-item","click .btn-delete-line-item","click .btn-view-li-locations","beforeFirstRender","_this","this","model","options","contact","isFetched","fetchPermissions","perms","permissions","settings","fetchSubJobs","subJobs","fetchCostCodes","costCodes","render","systemPermissions","beforeRender","hasPermission","enableOvertime","enableDoubletime","enableClockIn","renderData","afterRender","renderLineItems","_this2","_","size","lineItems","models","add","newLineItem","columns","title","width","bind","data","type","row","opt","icons","toString","visible","isNew","costCode","subJob","getDisplayName","push","apply","orderable","searchable","className","time","dateHelpers","getDateString","Date","dateFormats","TIME","cid","hrs","formatHelpers","minutesToHHMM","dataTable","dataTables","DataTable","el","$","filter","lineItem","autoWidth","fixedHeader","header","footer","isHideSearch","paging","order","language","emptyTable","afterDataTableRender","renderInputs","onRowRemoved","contextMenuOptions","actions","isDanger","onClick","deleteLineItem","isShown","dom","_this3","inputHelpers","inputMaskHours","addListeners","binder","Binder","$el","delegate","useDecimalPercentFields","watchElements","each","timeInPicker","inputs","Datepicker","isTimeOnly","datepickerOptions","format","datePicker","DATE_TIME","defaultDate","onChange","value","set","timeOutPicker","SelectPickerCollection","pickerSelector","valueAttribute","selectPickerOptions","noneSelectedText","isLiveSearch","isIntChoices","isDisabled","choices","union","id","map","subtext","costCodeSelectorCollection","pickers","hideDisabled","sjId","sort","c1","c2","sortHelpers","sortAlphaNum","_this4","stopListening","listenTo","regularHours","reduce","mem","li","overtimeHours","doubletimeHours","getLineItemForInput","$input","getRow","closest","getLineItemElement","node","lineItemHoursChanged","e","currentTarget","minutes","minutesFromHHMM","val","addLineItem","TimeCardLineItem","timeCardId","notes","modals","DeleteCancel","body","onDelete","viewTimecardLocationsClicked","target","viewTimecardLocations","TimeCardLocationMapModal","AddTimeCardsModal","BaseModal","subTemplates","timecard","minWidth","timeCard","onSave","noop","click .timecard-delete","click .timecards-save","click .timecards-save-add-pq","click .timecards-continue","click .timecards-previous","click .timecards-close","keyup .overtime-time, .regular-time, .doubletime-time","keyup .time-in, .time-out","beforeModalCreated","collection","collections","TimeCards","step","enableLineItems","isAdmin","canAddQuantities","projectContacts","ProjectContact","user","toJSON","dateNow","timeCardDate","getFullYear","getMonth","getDate","stepTotal","parseDateString","selectedProject","date","renderStep","hoursChanged","_this5","selectedContacts","timeCardDatePicker","projects","ProjectSelector","isSingleChoice","onProjectSelected","prop","dataTableHeaderData","isHideDeletedFilter","fetchProjectContacts","timeCardContactSelect","contacts","ContactsSelectInput","context","contexts","PROJECTCONTACTS","saveButtonText","addButton","nextStep","edit","fnTc","parameters","searchFor","idFilter","startDate","DATE_YMD","endDate","page","pageSize","orderBy","orderDirection","timeZoneOffset","getTimezoneOffset","fetch","success","contactSelected","find","getTimeCard","TimeCard","createdBy","attributes","$tcOuter","empty","renderSubTemplate","_this6","fnTotal","getDateMinutesDiff","text","setStep","_this7","getValue","fnNextStep","YesNo","onYes","previousStep","deleteTimeCard","remove","$timecard","$lineItem","saveAndAddQuantities","saveTimeCards","addQuantities","productionQuantities","TimeCardQuantitiesAddModal","timeCards","isAddQuantities","isValid","isLineItemsValid","invalidCount","fnSave","ajax","Request","endpoint","urlHelpers","generateEndpoint","rows","isAPIv2","post","reset","notifications","notify","successNotify","message","removeModal","closeAddTimeCards","ManageTimeCardsByWeekModal","maxWidth","timeCardsView","click .last-week","click .next-week","click div.add-row-options a.dropdown-item","setDate","getDay","ProjectContacts","user2","projectContact","unshift","sortBy","toLowerCase","fetchUsers","users","disabledDays","day","renderWeek","append","contextSelectPicker","Selectpicker","isMultiple","mustSelectValue","defaultValue","onHide","newDate","arguments","length","undefined","removeClass","fnContinue","TimeCardContextProjects","getNewDateAddDays","hasLocation","categories","category","dateFormat","DATE_MONTH_DAY","tempDate","valueOf","i","newRows","_this8","_loop","j","sourceModels","timecard2","existingModels","getTime","newRow","addRow","click","recalculateTotals","TimeCardCategories","captureSignature","preferences","hasPref","preferenceTypes","ENABLE_TIMECARDS_SIGNATURE","signatures","SignatureSubmitModal","headerSubText","onSubmit","signature","cb","lastWeek","setValue","save","nextWeek","projectName","addClass","self","TimeCardWeekEditor","appendTo","setTimeout","_this9","grandTotalMinutes","_loop2","totalMinutes","getTotalTimeForDate","getFormattedTime","hasChanges","_toConsumableArray","signTimecards","saveClicked","BaseDataTable","zeroRecords","phoneWidth","click .btn-copy-phone","click .btn-copy-fax","click .btn-copy-cell","click .btn-copy-email","beforeDataTableRender","rowCallback","childDataTables","getContextMenuItems","isHideNoActions","onRowDoubleClick","editRow","rowsPerPage","indexOf","pageLength","columnsDefault","getColumns","column","index","columnData","orderAscending","createdRow","on","details","$dataTable","oInstance","oldOrder","src","dir","timecardsView","userSettings","afterDataTableRenderChild","columnOrderChanged","getRowChildTable","childOpts","getRowChildData","setRowStyle","status","isBlacklisted","statusChanged","statuses","childRowToggle","sender","rowOverride","$target","selector","tr","child","childDt","parentId","hide","renderChildRow","childClass","$childTable","class","show","childData","childTable","onApprove","isApproved","getChildTableSettings","loader","Loader","parent","cleanup","undelegateEvents","getIsRootView","dataIndex","copyPhone","inputId","uniqueId","hiddenInput","style","select","document","execCommand","copyEmail","fetchTimeCards","_fetchTimeCards","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wrap","_context","prev","next","abrupt","stop","_x","ProjectDataTable","click i.project-toggle-row","click .approve-project-time-cards","click .unapprove-project-time-cards","iconClass","approveTimeCards","includeAllColumns","includeColumns","defaultContent","window","columnName","timeCardSettings","html","getChildTableType","getSettings","fixedColumnsLeft","fixedColumnsRight","colReorder","realtime","parentDataTable","ContactDataTable","TimeCardDataTable","viewOptions","TimeCardContacts","approveTimeCardsClicked","_approveTimeCardsClicked","_callee2","approveNote","_context2","sent","c","warningNotify","invalidate","draw","_x2","_approveTimeCards","_callee3","_context3","_x3","_x4","click i.contact-toggle-row","click .approve-contact-time-cards","click .unapprove-contact-time-cards","maxEmailWidth","phoneFormatted","formatPhoneNumber","emailFormatted","userType","userTypes","getByIsCompany","TimeCardProjects","_approveTimeCardsClicked2","_callee4","_context4","_x5","_x6","_approveTimeCards2","_callee5","_this10","_context5","_x7","_x8","click i.timecard-toggle-row","click .view-time-card","click .delete-time-card","click .approve-time-card","click .unapprove-time-card","click .select-all-timecards","click .select-timecard","viewTimeCard","approveTimeCard","_includeColumns","renderTimeCardSelect","join","bidsDue","phone","cell","fax","email","userTypeId","selectAll","isChecked","parameter","done","response","addSelectedTimeCards","timeCardIds","selectedTimeCards","removeSelectedTimeCards","selectTimeCard","originalTimeCard","editModal","TimeCardDetailsModal","offsets","updateParentRows","viewTimeCardClicked","parentTR","parentRow","grandParentTR","grandParentRow","force","fn","delete","deleteTimeCardClicked","approveTimeCardClicked","approve","action","TimeCardDataEntryTable","drawCallback","inputMaskDecimal","click i.timecard-dataentry-toggle-row","change .input-notes","change .input-regular-hours","change .input-overtime-hours","change .input-doubletime-hours","groupByColumn","formatCurrency","valueChanged","fieldName","hasClass","parseFloat","timecardsModal","canApprove","canDelete","click .timecard-save","click .timecard-approve","keyup .overtime-hours, .regular-hours, .doubletime-hours","click .btn-view-locations","click .btn-manage-production-quantities","Project","fnFetch","canViewQuantities","canViewLocationMap","focus","renderTotals","_this11","_this12","approveClicked","deleteClicked","manageProductionQuantities","_this13","InstalledQuantitiesAddModal","installedQuantities","quantities","TimeCardEditor","isReadOnly","onNextField","click button.edit","inputmask","placeholder","positionCaretOnClick","off","which","definitions","5","validator","preventDefault","getTotalTime","hours","showDetails","click .delete-time-card-week","_this14","editors","_loop3","calculateWeekTotal","isDirty","isWeekNewAndEmpty","totalNotes","deleteWeek","deletedOn","input","TimeCardGroupEditor","click .delete-group","padStart","getValues","deleteGroup","groupName","BaseModel","idAttribute","params","parse","groups","TimeCardGroups","TimeCardLineItems","InstalledQuantities","beforeSave","TimeCardCategory","TimeCardGroup","TimeCardUserSettings","forCompany","viewSettings","setting","TimeCardSettings","BaseCollection","isExport","exportURL","url","totalRows","result","TimeCardSettingsModal","change .select-column","click button.settings-save","click .btn-geofence","defaultView","getDataTableInstance","col","selectedColumns","selectView","currentView","manageProjectGeofence","TimeCardGeofenceModal","columnSelected","fnOnSave","settingTemp","slice","columnTemp","keyup .input-longitude, .input-latitude, .input-radius","click .btn-save","click .cb-enable-geofence","geofenceEnabled","geofence","latitude","longitude","defaultLat","defaultLong","radius","renderMap","toggleStatus","_this15","geofenceMap","maps","GoogleMap","refreshMarkers","addListener","Math","round","latLng","lat","lng","positionChanged","valueType","isNaN","positionObject","google","LatLng","marker","circle","setPosition","setCenter","setRadius","Circle","fillColor","fillOpacity","strokeColor","strokeOpacity","strokeWeight","center","clickable","Marker","position","animation","Animation","DROP","getPosition","setZoom","coordinatesIn","coordinatesOut","renderMarkers","inMarker","outMarker","icon","infoWindowContent","infoWindow","InfoWindow","content","open","isShowHeader","useManualDateRange","click .btn-settings","keyup .input-search","click .search","click .clear-search","click .new-timecards","click .approve-batch","click .unapprove-batch","click .approval-continue","click .cancel-approval","click .export","click .export-weekly","click .btn-manual-range","click .btn-auto-range","click .btn-prev-date","click .btn-next-date","canAdd","canViewAll","showHeader","viewSelectPicker","_this16","fetchBudgetTimeStats","stats","$totals","concat","budgetedHours","actualHours","manualDateRange","autoDateRange","renderDateRange","dateRange","DAYS_30","getCurrentYear","getCurrentMonth","startDatePicker","endDatePicker","startDateString","endDateString","prevDateRange","nextDateRange","_this17","setInputError","stayOnPage","clearServerCache","pageCache","tableSettings","dataTableOptions","getPageCallback","getViewData","displayStart","deferRender","showPageSelector","ids","objectHelpers","refinedType","tc","tcCount","onTableDraw","css","pageNumber","orderArr","direction","fail","searchChanged","keyCode","search","clearFilter","addTimeCards","_this18","approveBatchStart","childDT","grandChildDT","showNotification","approveBatchCancel","hideNotification","approveBatchContinue","plural","uniq","_ref","without","export","files","downloadFile","exportList","exportWeekly","TIMECARD_WEEKLY_EXPORT_TEMPLATE","getPref"],"mappings":"s4PAAAA,IAAAC,MAAAC,UAAA,GAEAF,IAAAG,UAAAD,UAAA,CACAE,KAAA,CACAC,YAAA,WACAC,kBAAA,iBACAC,WAAA,UACAC,mBAAA,kBACAC,4BAAA,2BACAC,WAAA,UACAC,mBAAA,kBACAC,4BAAA,2BACAC,sBAAA,qBACAC,4BAAA,2BACAC,wBAAA,wBAEAC,iBAAA,CACAC,aAAA,EACAC,OAAA,EACAC,QAAA,GACAC,QAAA,GACAC,eAAA,GAEAC,cAAA,CACAC,KAAA,EACAC,QAAA,EACAC,UAAA,GAEAC,gBAAA,CACAC,MAAA,CACAC,YAAA,EACAC,eAAA,EACAC,gBAAA,EACAC,iBAAA,IAGAC,gBAAA,CACAC,QAAA,UACAC,KAAA,SAIAlC,IAAAmC,QAAAjC,UAAA,GAEAF,IAAAoC,IAAAC,SAAArC,IAAAG,UAAAmC,QAAAC,WACAvC,IAAAoC,IAAAI,aAAA,CACA,CACAC,MAAA,GACAC,KAAA,UACAC,S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G,UAAAua,gBAAAke,kCACA9zB,KAAAyzB,OAAAr0B","file":"app.js","sourcesContent":["PJQ.views.timecards = {};\n\nPJQ.constants.timecards = {\n view: {\n BY_TIMECARD: \"timecard\",\n BY_TIMECARD_GROUP: \"timecard-group\",\n BY_PROJECT: \"project\",\n BY_PROJECT_CONTACT: \"project-contact\",\n BY_PROJECT_CONTACT_TIMECARD: \"project-contact-timecard\",\n BY_CONTACT: \"contact\",\n BY_CONTACT_PROJECT: \"contact-project\",\n BY_CONTACT_PROJECT_TIMECARD: \"contact-project-timecard\",\n BY_TIMECARD_DATAENTRY: \"timecard-dataentry\",\n BY_TIMECARD_GROUP_DATAENTRY: \"timecard-group-dataentry\",\n PROJECTWALL_BY_TIMECARD: \"projectwall-timecard\"\n },\n defaultDateRange: {\n WEEK_TO_DATE: 0,\n DAYS_7: 7,\n DAYS_14: 14,\n DAYS_28: 28,\n MONTH_TO_DATE: -1\n },\n selectionMode: {\n NONE: 0,\n APPROVE: 1,\n UNAPPROVE: 2\n },\n manageTimeCards: {\n stage: {\n SELECT_DATE: 0,\n SELECT_PROJECT: 1,\n SELECT_CONTACTS: 2,\n MANAGE_TIMECARDS: 3\n }\n },\n timeCardGroupBy: {\n CONTACT: 'contact',\n DATE: 'date'\n }\n};\n\nPJQ.helpers.timecards = {};\n\nif (PJQ.app.module === PJQ.constants.modules.TIMECARDS) {\n PJQ.app.addOldRoutes([\n {\n route: '',\n name: 'default',\n callback: function () {\n PJQ.app.router.navigate('timecards', {\n trigger: true,\n replace: true\n });\n }\n }\n ]);\n}\n\nPJQ.modules.timecards = {\n routes: [\n {\n route: 'timecards',\n name: 'timecards',\n callback: function () {\n PJQ.app.session.project = null;\n if (PJQ.app.module === PJQ.constants.modules.APP) {\n if (PJQ.app.session.get('ownsPortal')) {\n PJQ.app.initNavigator({\n activeItem: \"timecards\"\n });\n }\n else {\n PJQ.app.initNavigator();\n }\n }\n else {\n PJQ.app.view.renderView(PJQ.views.timecards.TimeCardMain);\n }\n }\n },\n {\n route: 'projects/:projectId/timecards',\n name: 'timecardsProject',\n callback: function (projectId) {\n PJQ.modules.projectWall.initProjectNavigator(parseInt(projectId), \"timecardsProject\");\n }\n }\n ]\n};\n\nPJQ.app.addRoutes(PJQ.modules.timecards.routes);\n\n","PJQ.views.timecards.LineItemsView = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.TIMECARDS, 'timecard-line-items'),\n onLineItemChanged: null,\n canEdit: true\n },\n events: {\n 'keyup .li-overtime-hours, .li-regular-hours, .li-doubletime-hours': 'lineItemHoursChanged',\n 'click .btn-add-line-item': 'addLineItem',\n 'click .btn-delete-line-item': 'deleteLineItem',\n 'click .btn-view-li-locations': 'viewTimecardLocationsClicked'\n },\n beforeFirstRender: function () {\n this.model = this.options.model;\n this.contact = null;\n\n let fnFetch = () => {\n if (this.options.project != null) {\n this.options.project.fetchPermissions((perms) => {\n this.options.permissions = perms;\n if (this.options.settings.get('enableLineItems')) {\n this.options.project.fetchSubJobs((subJobs) => {\n this.subJobs = subJobs;\n this.options.project.fetchCostCodes((costCodes) => {\n this.costCodes = costCodes;\n this.isFetched = true;\n this.render();\n });\n });\n } else {\n this.isFetched = true;\n this.render();\n }\n });\n } else {\n this.options.permissions = PJQ.app.session.systemPermissions;\n this.isFetched = true;\n }\n };\n this.isFetched = false;\n fnFetch();\n },\n beforeRender: function () {\n if (this.isFetched) {\n this.options.canEdit = this.model.get('approvedOn') == null && this.options.permissions.hasPermission('timeCards.canAdd');\n this.options.enableOvertime = this.options.settings.get('enableOvertime');\n this.options.enableDoubletime = this.options.settings.get('enableDoubletime');\n this.options.enableClockIn = this.options.settings.get('enableClockIn')\n }\n },\n renderData: function () {\n return {\n model: this.model,\n contact: this.contact,\n project: this.options.project,\n canEdit: this.options.canEdit,\n enableOvertime: this.options.enableOvertime,\n enableDoubletime: this.options.enableDoubletime\n };\n },\n afterRender: function () {\n if (!this.isFetched)\n return;\n\n this.renderLineItems();\n },\n renderLineItems: function () {\n if (this.options.canEdit && _.size(this.model.lineItems.models) === 0) {\n this.model.lineItems.add(this.newLineItem());\n }\n\n let columns = [\n {\n \"title\": \"#\",\n \"width\": \"50px\",\n \"render\": _.bind(function (data, type, row, opt) {\n let icons = '';\n if ((row.get('latitudeIn') && row.get('longitudeIn')) || (row.get('latitudeOut') && row.get('longitudeOut'))) {\n icons += ''\n }\n return '
' + (opt.row + 1).toString() + icons + '
';\n }, this)\n },\n {\n \"title\": \"Sub Job\",\n \"width\": \"150px\",\n \"visible\": this.subJobs != null && _.size(this.subJobs.models) > 0,\n \"render\": (data, type, row) => {\n if (this.options.canEdit && row.isNew()) {\n return '';\n }\n\n let costCode = this.costCodes.get(row.get('costCodeId')),\n subJob = this.subJobs.get(costCode.get('subJobId'));\n return subJob ? subJob.get('name') : '';\n }\n },\n {\n \"title\": \"Cost Code\",\n \"width\": \"250px\",\n \"render\": (data, type, row) => {\n if (this.options.canEdit && row.isNew()) {\n return '';\n }\n\n let costCode = this.costCodes.get(row.get('costCodeId'));\n return costCode ? costCode.getDisplayName() : '';\n }\n }];\n\n if (this.options.enableClockIn) {\n columns.push(...[{\n \"data\": \"attributes.timeIn\",\n \"width\": \"150px\",\n \"title\": \"Time In\",\n \"orderable\": false,\n \"searchable\": false,\n \"className\": \"text-align-center\",\n \"render\": _.bind(function (data, type, row) {\n let time = '';\n if (data != null) {\n time = PJQ.helpers.dateHelpers.getDateString(new Date(data), PJQ.helpers.dateHelpers.dateFormats.TIME)\n }\n if (this.options.canEdit) {\n return '
';\n }\n return time;\n }, this),\n },\n {\n \"data\": \"attributes.timeOut\",\n \"width\": \"150px\",\n \"title\": \"Time Out\",\n \"orderable\": false,\n \"searchable\": false,\n \"className\": \"text-align-center\",\n \"render\": _.bind(function (data, type, row) {\n let time = '';\n if (data != null) {\n time = PJQ.helpers.dateHelpers.getDateString(new Date(data), PJQ.helpers.dateHelpers.dateFormats.TIME)\n }\n if (this.options.canEdit) {\n return '
';\n }\n return time;\n }, this),\n }]);\n } else {\n columns.push(...[\n {\n \"data\": \"attributes.regularHours\",\n \"width\": \"120px\",\n \"title\": this.options.enableOvertime || this.options.enableDoubletime ? \"Regular\" : \"Hours\",\n \"orderable\": false,\n \"searchable\": false,\n \"className\": \"text-align-center\",\n \"render\": _.bind(function (data, type, row) {\n let hrs = PJQ.helpers.formatHelpers.minutesToHHMM(row.get('regularHours'));\n if (this.options.canEdit) {\n return '';\n }\n return hrs;\n }, this),\n },\n {\n \"data\": \"attributes.overtimeHours\",\n \"width\": \"120px\",\n \"title\": \"Overtime\",\n \"orderable\": false,\n \"searchable\": false,\n \"className\": \"text-align-center\",\n \"visible\": this.options.enableOvertime === true,\n \"render\": _.bind(function (data, type, row) {\n let hrs = PJQ.helpers.formatHelpers.minutesToHHMM(row.get('overtimeHours'));\n if (this.options.canEdit) {\n return '';\n }\n return hrs;\n }, this),\n },\n {\n \"data\": \"attributes.doubletimeHours\",\n \"width\": \"120px\",\n \"title\": \"Double Time\",\n \"orderable\": false,\n \"searchable\": false,\n \"className\": \"text-align-center\",\n \"visible\": this.options.enableDoubletime === true,\n \"render\": _.bind(function (data, type, row) {\n let hrs = PJQ.helpers.formatHelpers.minutesToHHMM(row.get('doubletimeHours'));\n if (this.options.canEdit) {\n return '';\n }\n return hrs;\n }, this),\n }]);\n }\n\n if (this.options.canEdit) {\n columns.push({\n data: \"id\",\n title: \"\",\n orderable: false,\n searchable: false,\n width: 50,\n className: 'text-align-center',\n render: _.bind(function (data, type, row) {\n return '
';\n }, this)\n });\n }\n\n this.dataTable = new PJQ.views.dataTables.DataTable({\n el: this.$('.line-items-table'),\n data: _.filter(this.model.lineItems.models, function (lineItem) {\n return !lineItem.get('delete');\n }),\n autoWidth: false,\n fixedHeader: {\n header: false,\n footer: false\n },\n isHideSearch: true,\n paging: false,\n order: [1, 'asc'],\n language: {\n emptyTable: this.options.canEdit ? 'Click \"Add Line Item\" to create a new Line item' : 'No line items have been added yet'\n },\n columns: columns,\n afterDataTableRender: _.bind(function () {\n this.renderInputs();\n }, this),\n onRowRemoved: _.bind(function () {\n this.renderInputs();\n }, this),\n contextMenuOptions: {\n actions: [\n {\n name: 'Delete',\n isDanger: true,\n onClick: _.bind(function (row) {\n this.deleteLineItem(row);\n }, this),\n isShown: _.bind(function (row) {\n this.options.canEdit\n }, this),\n }\n ]\n },\n dom: '<\"top\"<\"clear\">>rt<\"bottom\"p<\"clear\">>'\n });\n },\n renderInputs: function () {\n PJQ.helpers.inputHelpers.inputMaskHours(this.$('.input-hours'));\n\n if (this.options.canEdit) {\n this.addListeners();\n if (!this.binder) {\n this.binder = new PJQ.Binder(this.$el, this.model.lineItems, {\n delegate: true,\n useDecimalPercentFields: true,\n watchElements: [\n 'input'\n ]\n });\n }\n\n _.each(this.model.lineItems.models, function(model){\n model.timeInPicker = new PJQ.inputs.Datepicker({\n el: this.$('.li-time-in[data-cid=\"' + model.cid + '\"]'),\n isTimeOnly: true,\n datepickerOptions: {\n format: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE_TIME,\n defaultDate: model.get('timeIn')\n },\n onChange: (value) => {\n model.set('timeIn', value);\n }\n });\n\n model.timeOutPicker = new PJQ.inputs.Datepicker({\n el: this.$('.li-time-out[data-cid=\"' + model.cid + '\"]'),\n isTimeOnly: true,\n datepickerOptions: {\n format: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE_TIME,\n defaultDate: model.get('timeOut')\n },\n onChange: (value) => {\n model.set('timeOut', value);\n }\n });\n }, this)\n\n\n if (this.subJobs != null && _.size(this.subJobs.models) > 0) {\n new PJQ.inputs.SelectPickerCollection(this.$el, this.model.lineItems.models, {\n pickerSelector: '.select-sub-job',\n valueAttribute: 'subJobId',\n selectPickerOptions: {\n noneSelectedText: 'Parent Job',\n isLiveSearch: true,\n isIntChoices: true,\n size: 8,\n isDisabled: _.bind(function (model) {\n return !model.isNew() || !this.options.canEdit;\n }, this),\n choices: _.union([{name: '', choices: {id: 0, name: 'Parent Job'}}], [{\n name: 'Sub Jobs', choices: _.map(this.subJobs.models, function (subJob) {\n return {\n id: subJob.id,\n name: subJob.get('code'),\n subtext: subJob.get('name')\n }\n }, this)\n }])\n },\n onChange: _.bind(function (model, value) {\n model.set('subJobId', value > 0 ? value : null);\n model.set('costCodeId', null);\n\n let costCodePicker = this.costCodeSelectorCollection.pickers[model.cid];\n costCodePicker.render();\n }, this)\n });\n }\n\n this.costCodeSelectorCollection = new PJQ.inputs.SelectPickerCollection(this.$el, this.model.lineItems.models, {\n pickerSelector: '.select-cost-code',\n valueAttribute: 'costCodeId',\n selectPickerOptions: {\n isLiveSearch: true,\n isIntChoices: true,\n hideDisabled: false,\n isDisabled: _.bind(function (model) {\n return !model.isNew() || !this.options.canEdit;\n }, this),\n choices: (model) => {\n let sjId = model.get('subJobId');\n return _.map(_.filter(this.costCodes.models, (costCode) => {\n return (sjId == null && costCode.get('subJobId') == null) || costCode.get('subJobId') === sjId;\n }).sort((c1, c2) => {\n return PJQ.helpers.sortHelpers.sortAlphaNum(c1.get('code'), c2.get('code'));\n }), function (costCode) {\n return {\n id: costCode.id,\n name: costCode.getDisplayName()\n };\n });\n }\n },\n onChange: _.bind(function (model, value) {\n model.set('costCodeId', value);\n }, this)\n });\n }\n },\n addListeners: function () {\n this.stopListening(this.model.lineItems);\n this.listenTo(this.model.lineItems, 'change', (lineItem) => {\n let lineItems = _.filter(this.model.lineItems.models, (lineItem) => {\n return !lineItem.get('delete');\n })\n this.model.set({\n regularHours: _.reduce(lineItems, function (mem, li) {\n return mem + li.get('regularHours');\n }, 0),\n overtimeHours: _.reduce(lineItems, function (mem, li) {\n return mem + li.get('overtimeHours');\n }, 0),\n doubletimeHours: _.reduce(lineItems, function (mem, li) {\n return mem + li.get('doubletimeHours');\n }, 0)\n });\n if (typeof this.options.onLineItemChanged === 'function') {\n this.options.onLineItemChanged(lineItem);\n }\n });\n },\n getLineItemForInput: function ($input) {\n if ($input == null || this.dataTable == null) {\n return null;\n }\n let row = this.dataTable.getRow($input.closest('tr'));\n if (row) {\n return row.data();\n }\n return null;\n },\n getLineItemElement: function (lineItem) {\n if (lineItem == null || this.dataTable == null) {\n return null;\n }\n let row = this.dataTable.getRow(lineItem.cid);\n if (row) {\n return $(row.node());\n }\n return null;\n },\n lineItemHoursChanged: function (e) {\n let lineItem = this.getLineItemForInput($(e.currentTarget)),\n type = $(e.currentTarget).data('type'),\n minutes = PJQ.helpers.formatHelpers.minutesFromHHMM($(e.currentTarget).val());\n lineItem.set(type, minutes);\n },\n addLineItem: function (e) {\n this.model.lineItems.add(this.newLineItem());\n this.renderLineItems();\n },\n newLineItem: function () {\n return new PJQ.models.timecards.TimeCardLineItem({\n timeCardId: this.model.id,\n notes: '',\n regularHours: 0,\n overtimeHours: 0,\n doubletimeHours: 0\n });\n },\n deleteLineItem: function (e) {\n let lineItem = this.getLineItemForInput($(e.currentTarget));\n if (lineItem) {\n new PJQ.views.modals.DeleteCancel({\n header: \"Confirm Deletion\",\n body: \"Are you sure you want to delete this Line Item?\",\n onDelete: _.bind(function () {\n lineItem.set('delete', true);\n this.renderLineItems();\n }, this)\n });\n }\n },\n viewTimecardLocationsClicked: function (e) {\n let target = $(e.currentTarget),\n lineItem = this.dataTable.getRow(target.closest('tr')).data();\n\n this.viewTimecardLocations(lineItem);\n },\n viewTimecardLocations: function (lineItem) {\n new PJQ.views.timecards.TimeCardLocationMapModal({\n model: lineItem\n });\n }\n});","PJQ.views.timecards.AddTimeCardsModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.TIMECARDS, 'modal-manage-timecards'),\n subTemplates: {\n timecard: new PJQ.templating.Template(PJQ.constants.modules.TIMECARDS, 'contact-timecard')\n },\n minWidth: '800px',\n timeCard: null,\n project: null,\n onSave: _.noop(),\n onDelete: _.noop()\n },\n events: {\n 'click .timecard-delete': 'deleteTimeCard',\n 'click .timecards-save': 'saveTimeCards',\n 'click .timecards-save-add-pq': 'saveAndAddQuantities',\n 'click .timecards-continue': 'nextStep',\n 'click .timecards-previous': 'previousStep',\n 'click .timecards-close': 'closeAddTimeCards',\n 'keyup .overtime-time, .regular-time, .doubletime-time': 'hoursChanged',\n 'keyup .time-in, .time-out': 'lineItemClockChanged',\n },\n beforeModalCreated: function () {\n this.collection = new PJQ.collections.timecards.TimeCards();\n this.options.step = PJQ.constants.timecards.manageTimeCards.stage.SELECT_DATE;\n\n this.options.enableLineItems = this.options.settings.get('enableLineItems');\n\n if (this.options.project != null) {\n this.options.permissions = this.options.project.permissions ? this.options.project.permissions : PJQ.app.session.project.permissions;\n } else {\n this.options.permissions = PJQ.app.session.systemPermissions;\n }\n\n this.options.isAdmin = this.options.permissions.hasPermission('timeCards.isAdmin');\n this.options.canAddQuantities = this.options.permissions.hasPermission('productionQuantities.canAdd');\n if (!this.options.isAdmin) {\n this.options.contact = new PJQ.models.projectContacts.ProjectContact(PJQ.app.session.user.toJSON());\n }\n\n let dateNow = new Date();\n this.options.timeCardDate = new Date(dateNow.getFullYear(), dateNow.getMonth(), dateNow.getDate());\n this.options.stepTotal = 4;\n if (this.options.timeCard != null) {\n this.options.project = this.options.project ? this.options.project : this.options.timeCard.get('project');\n this.collection.add(this.options.timeCard);\n this.options.timeCardDate = PJQ.helpers.dateHelpers.parseDateString(this.options.timeCard.get('date'), false);\n this.options.step = PJQ.constants.timecards.manageTimeCards.stage.MANAGE_TIMECARDS;\n } else if (this.options.project != null) {\n this.options.stepTotal -= 1;\n this.options.step = PJQ.constants.timecards.manageTimeCards.stage.SELECT_DATE;\n }\n\n if (!this.options.isAdmin) {\n this.options.stepTotal -= 1;\n }\n },\n beforeRender: function () {\n this.options.enableOvertime = this.options.settings.get('enableOvertime');\n this.options.enableDoubletime = this.options.settings.get('enableDoubletime');\n this.options.enableLineItems = this.options.settings.get('enableLineItems');\n this.options.enableClockIn = this.options.settings.get('enableClockIn');\n },\n renderData: function () {\n return {\n project: this.selectedProject,\n date: this.options.timeCardDate,\n settings: this.options.settings,\n stepTotal: this.options.stepTotal,\n step: this.options.step,\n enableOvertime: this.options.enableOvertime,\n enableDoubletime: this.options.enableDoubletime,\n enableLineItems: this.options.enableLineItems,\n enableClockIn: this.options.enableClockIn,\n canAddQuantities: this.options.canAddQuantities,\n isAdmin: this.options.isAdmin\n }\n },\n afterRender: function () {\n this.renderStep();\n },\n hoursChanged: function (e) {\n let $target = $(e.currentTarget).closest('.contact-timecard'),\n cid = $target.data('cid'),\n timecard = this.collection.get(cid),\n type = $(e.currentTarget).data('type'),\n minutes = PJQ.helpers.formatHelpers.minutesFromHHMM($(e.currentTarget).val());\n timecard.set(type, minutes);\n },\n renderStep: function () {\n switch (this.options.step) {\n case PJQ.constants.timecards.manageTimeCards.stage.SELECT_DATE:\n this.selectedContacts = [];\n this.timeCardDatePicker = new PJQ.inputs.Datepicker({\n el: this.$('.timecard-date'),\n datepickerOptions: {\n format: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE,\n defaultDate: this.options.timeCardDate,\n }\n });\n break;\n case PJQ.constants.timecards.manageTimeCards.stage.SELECT_PROJECT:\n this.selectedContacts = [];\n new PJQ.views.projects.ProjectSelector({\n el: this.$('.select-project'),\n isSingleChoice: true,\n onProjectSelected: _.bind(function (project) {\n this.selectedProject = project;\n if (project !== null) {\n this.$('.timecards-continue').prop('disabled', (this.selectedProject === null));\n } else {\n this.$('.timecards-continue').prop('disabled', true);\n }\n }, this),\n dataTableHeaderData: {\n isHideDeletedFilter: true\n }\n });\n break;\n case PJQ.constants.timecards.manageTimeCards.stage.SELECT_CONTACTS:\n this.selectedProject.fetchProjectContacts((projectContacts) => {\n this.timeCardContactSelect = new PJQ.views.contacts.ContactsSelectInput({\n el: this.$('.select-contacts'),\n context: PJQ.constants.contacts.contexts.PROJECTCONTACTS,\n saveButtonText: 'Select Contacts',\n contacts: projectContacts,\n isSingleChoice: false,\n addButton: this.$('.timecards-add-contacts'),\n onChange: _.bind(function (selectedContacts) {\n this.selectedContacts = selectedContacts;\n this.nextStep();\n }, this)\n });\n this.timeCardContactSelect.edit();\n })\n break;\n case PJQ.constants.timecards.manageTimeCards.stage.MANAGE_TIMECARDS:\n let fnTc = () => {\n let timecards = new PJQ.collections.timecards.TimeCards(),\n dateNow = new Date(),\n parameters = {\n searchFor: '',\n idFilter: _.size(this.selectedContacts) === 1 ? this.selectedContacts[0].id : _.map(this.selectedContacts, (contact) => {\n return contact.id;\n }),\n startDate: PJQ.helpers.dateHelpers.getDateString(this.options.timeCardDate, PJQ.helpers.dateHelpers.dateFormats.DATE_YMD),\n endDate: PJQ.helpers.dateHelpers.getDateString(this.options.timeCardDate, PJQ.helpers.dateHelpers.dateFormats.DATE_YMD),\n page: 1,\n pageSize: 2147483646,\n orderBy: 'companyName',\n orderDirection: 'asc',\n projectId: this.selectedProject.get('projectId'),\n timeZoneOffset: dateNow.getTimezoneOffset()\n };\n\n timecards.fetch({\n data: parameters,\n success: () => {\n _.each(timecards.models, (timecard) => {\n let contactSelected = _.find(this.selectedContacts, function (contact) {\n return contact.id === timecard.get('contact').id;\n }, this) != null;\n\n if (!this.collection.getTimeCard(timecard.get('id'), timecard.get('date')) && contactSelected)\n this.collection.add(timecard);\n });\n\n let date = this.options.timeCardDate\n _.each(this.selectedContacts, (contact) => {\n if (this.collection.getTimeCard(contact.get('id'), date))\n return;\n\n if (contact.get('contactId') == null)\n contact.set('contactId', 0);\n\n let timeCard = new PJQ.models.timecards.TimeCard({\n projectId: this.selectedProject.get('projectId'),\n id: contact.get('id'),\n date: PJQ.helpers.dateHelpers.parseDateString(PJQ.helpers.dateHelpers.getDateString(date, PJQ.helpers.dateHelpers.dateFormats.DATE, false)),\n notes: '',\n regularHours: 0,\n overtimeHours: 0,\n doubletimeHours: 0,\n createdBy: -PJQ.app.session.user.id,\n contact: contact.attributes\n });\n this.collection.add(timeCard);\n });\n\n let $tcOuter = this.$('.timecard-data');\n $tcOuter.empty();\n _.each(this.collection.models, function (model) {\n if (!model.get('deletedOn')) {\n this.renderSubTemplate(true, this.options.subTemplates.timecard, $tcOuter, {\n timecard: model,\n timecards: this.collection.models,\n contact: model.get('contact'),\n settings: this.options.settings,\n enableOvertime: this.options.enableOvertime,\n enableDoubletime: this.options.enableDoubletime,\n enableLineItems: this.options.enableLineItems,\n enableClockIn: this.options.enableClockIn,\n canEdit: this.options.canEdit,\n isAdmin: this.options.isAdmin\n }, _.bind(function (el) {\n new PJQ.Binder(el, model, {\n watchElements: [\n 'textarea'\n ]\n });\n let fnTotal = () => {\n let regularHours = PJQ.helpers.formatHelpers.minutesToHHMM(model.get('regularHours')),\n overtimeHours = PJQ.helpers.formatHelpers.minutesToHHMM(model.get('overtimeHours')),\n doubletimeHours = PJQ.helpers.formatHelpers.minutesToHHMM(model.get('doubletimeHours'));\n\n if (this.options.enableClockIn) {\n let minutes = 0;\n if (this.options.enableLineItems) {\n _.each(model.lineItems.models, function (lineItem) {\n if (lineItem.get('timeIn') != null && lineItem.get('timeOut') != null) {\n minutes += PJQ.helpers.dateHelpers.getDateMinutesDiff(new Date(lineItem.get('timeOut')), new Date(lineItem.get('timeIn')));\n }\n });\n } else if (model.get('timeIn') != null && model.get('timeOut') != null) {\n minutes = PJQ.helpers.dateHelpers.getDateMinutesDiff(new Date(model.get('timeOut')), new Date(model.get('timeIn')));\n }\n\n regularHours = minutes > 0 ? PJQ.helpers.formatHelpers.minutesToHHMM(minutes) : '00:00'\n }\n\n el.find('.label-regular-hours').text(regularHours);\n el.find('.label-overtime-hours').text(overtimeHours);\n el.find('.label-doubletime-hours').text(doubletimeHours);\n el.find('.regular-hours').val(regularHours);\n el.find('.overtime-hours').val(overtimeHours);\n el.find('.doubletime-hours').val(doubletimeHours);\n };\n fnTotal();\n\n if (this.options.enableLineItems) {\n new PJQ.views.timecards.LineItemsView({\n el: el.find('.line-items-outer'),\n model: model,\n project: this.selectedProject,\n settings: this.options.settings,\n onLineItemChanged: () => {\n fnTotal();\n }\n });\n } else {\n new PJQ.inputs.Datepicker({\n el: this.$('.time-in[data-cid=\"' + model.cid + '\"]'),\n isTimeOnly: true,\n datepickerOptions: {\n format: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE_TIME,\n defaultDate: model.get('timeIn')\n },\n onChange: (value) => {\n model.set('timeIn', value);\n fnTotal();\n }\n });\n\n new PJQ.inputs.Datepicker({\n el: this.$('.time-out[data-cid=\"' + model.cid + '\"]'),\n isTimeOnly: true,\n datepickerOptions: {\n format: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE_TIME,\n defaultDate: model.get('timeOut')\n },\n onChange: (value) => {\n model.set('timeOut', value);\n fnTotal();\n }\n });\n }\n }, this));\n }\n }, this);\n PJQ.helpers.inputHelpers.inputMaskHours(this.$('.input-hours'));\n }\n });\n };\n this.selectedProject.fetchPermissions((perms) => {\n this.options.permissions = perms;\n if (this.options.enableLineItems) {\n this.selectedProject.fetchSubJobs((subJobs) => {\n this.subJobs = subJobs;\n this.selectedProject.fetchCostCodes((costCodes) => {\n this.costCodes = costCodes;\n fnTc();\n });\n });\n } else {\n fnTc();\n }\n });\n break;\n }\n },\n setStep: function (step) {\n this.options.step = step;\n this.render();\n },\n nextStep: function () {\n switch (this.options.step) {\n case PJQ.constants.timecards.manageTimeCards.stage.SELECT_DATE:\n this.options.timeCardDate = this.timeCardDatePicker.getValue();\n\n if (this.options.project != null && this.options.contact != null) {\n this.selectedProject = this.options.project;\n this.selectedContacts = [this.options.contact];\n this.setStep(PJQ.constants.timecards.manageTimeCards.stage.MANAGE_TIMECARDS);\n } else if (this.options.project != null) {\n this.selectedProject = this.options.project;\n this.setStep(PJQ.constants.timecards.manageTimeCards.stage.SELECT_CONTACTS);\n } else {\n this.setStep(PJQ.constants.timecards.manageTimeCards.stage.SELECT_PROJECT);\n }\n break;\n case PJQ.constants.timecards.manageTimeCards.stage.SELECT_PROJECT:\n let fnNextStep = () => {\n if (this.options.contact != null) {\n this.selectedContacts = [this.options.contact];\n this.setStep(PJQ.constants.timecards.manageTimeCards.stage.MANAGE_TIMECARDS);\n } else {\n this.setStep(PJQ.constants.timecards.manageTimeCards.stage.SELECT_CONTACTS);\n }\n }\n if (this.options.project != null && this.selectedProject.get('projectId') !== this.options.project.get('projectId')) {\n if (this.selectedProject.get('projectId') !== this.options.project.get('projectId')) {\n new PJQ.views.modals.YesNo({\n header: \"Confirm Project Change\",\n body: \"Are you sure you want to change the Project? Doing so will clear any data you have entered without saving.\",\n onYes: _.bind(function () {\n this.options.project = this.selectedProject;\n fnNextStep();\n }, this)\n });\n } else {\n fnNextStep();\n }\n } else {\n fnNextStep();\n }\n break;\n case PJQ.constants.timecards.manageTimeCards.stage.SELECT_CONTACTS:\n this.setStep(PJQ.constants.timecards.manageTimeCards.stage.MANAGE_TIMECARDS);\n break;\n }\n },\n previousStep: function () {\n switch (this.options.step) {\n case PJQ.constants.timecards.manageTimeCards.stage.MANAGE_TIMECARDS:\n this.setStep(this.options.contact != null ? PJQ.constants.timecards.manageTimeCards.stage.SELECT_PROJECT : PJQ.constants.timecards.manageTimeCards.stage.SELECT_CONTACTS);\n break;\n case PJQ.constants.timecards.manageTimeCards.stage.SELECT_CONTACTS:\n this.setStep(PJQ.constants.timecards.manageTimeCards.stage.SELECT_PROJECT);\n break;\n case PJQ.constants.timecards.manageTimeCards.stage.SELECT_PROJECT:\n this.setStep(PJQ.constants.timecards.manageTimeCards.stage.SELECT_DATE);\n break;\n }\n },\n addLineItem: function (e) {\n let $target = $(e.currentTarget).closest('.contact-timecard'),\n cid = $target.data('cid'),\n timecard = this.collection.get(cid),\n lineItem = new PJQ.models.timecards.TimeCardLineItem({\n timeCardId: timecard.id,\n notes: ''\n });\n\n timecard.lineItems.add(lineItem);\n this.render();\n },\n deleteTimeCard: function (e) {\n let $target = $(e.currentTarget).closest('.contact-timecard'),\n cid = $target.data('cid'),\n timecard = this.collection.get(cid);\n\n new PJQ.views.modals.DeleteCancel({\n header: \"Confirm Deletion\",\n body: \"Are you sure you want to delete this Time Card?\",\n onDelete: _.bind(function () {\n this.collection.remove(timecard);\n this.selectedContacts = _.filter(this.selectedContacts, (contact) => {\n return contact.id !== timecard.get('contact').id\n });\n this.render();\n }, this)\n });\n },\n deleteLineItem: function (e) {\n let $timecard = $(e.currentTarget).closest('.contact-timecard'),\n $lineItem = $(e.currentTarget).closest('.timecard-line-item'),\n timecard = this.collection.get($timecard.data('cid'));\n\n if (timecard) {\n let lineItem = timecard.lineItems.get($lineItem.data('cid'));\n\n if (lineItem) {\n new PJQ.views.modals.DeleteCancel({\n header: \"Confirm Deletion\",\n body: \"Are you sure you want to delete this Line Item?\",\n onDelete: _.bind(function () {\n lineItem.set('delete', true);\n timecard.set({\n regularHours: timecard.get('regularHours') - lineItem.get('regularHours'),\n overtimeHours: timecard.get('overtimeHours') - lineItem.get('overtimeHours'),\n doubletimeHours: timecard.get('doubletimeHours') - lineItem.get('doubletimeHours')\n });\n this.render();\n }, this)\n });\n }\n }\n },\n saveAndAddQuantities: function () {\n this.saveTimeCards(null, true);\n },\n addQuantities: function () {\n new PJQ.views.productionQuantities.TimeCardQuantitiesAddModal({\n project: this.selectedProject,\n timeCards: this.collection\n });\n },\n saveTimeCards: function (e, isAddQuantities) {\n if (_.size(this.collection.models) === 0)\n return;\n\n let isValid = true,\n isLineItemsValid = true,\n invalidCount = 0,\n fnSave = _.bind(function () {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'timecards',\n },\n {\n endpoint: 'batch'\n }\n ]),\n data: {\n rows: this.collection.models\n },\n isAPIv2: true\n }).post().success(_.bind(function (data) {\n this.collection.reset(data.rows);\n PJQ.notifications.notify.successNotify({\n message: 'Time Cards saved successfully'\n });\n if (typeof this.options.onSave === 'function') {\n this.options.onSave();\n }\n this.removeModal();\n\n if (isAddQuantities) {\n this.addQuantities();\n }\n }, this));\n }, this);\n\n _.each(this.collection.models, _.bind(function (model) {\n if (!model.get('deletedOn') && (model.get('regularHours') + model.get('overtimeHours') + model.get('doubletimeHours') === 0) && !this.options.enableClockIn) {\n isValid = false;\n invalidCount++;\n } else if (this.options.enableClockIn && !this.options.enableLineItems && (model.get('timeIn') == null || model.get('timeOut') == null)) {\n isValid = false;\n invalidCount++\n } else if (this.options.enableLineItems && this.options.enableClockIn) {\n _.each(model.lineItems.models, _.bind(function (lineItem) {\n if (!lineItem.get('delete') && (lineItem.get('timeIn') == null || lineItem.get('timeOut') == null || lineItem.get('costCodeId') == null)) {\n isLineItemsValid = false;\n }\n }, this));\n }\n\n // Validate and set line items\n if (this.options.enableLineItems) {\n model.set('lineItems', model.lineItems.toJSON());\n }\n }, this));\n\n if (!isValid && isLineItemsValid) {\n new PJQ.views.modals.YesNo({\n header: \"Time Entry Warning\",\n body: invalidCount.toString() + \" Time Card\" + (invalidCount > 1 ? \"s do\" : \" does\") + \" not have time entered. Do you want to save anyway?\",\n onYes: _.bind(function () {\n fnSave();\n }, this)\n });\n } else if (isLineItemsValid) {\n fnSave();\n }\n },\n closeAddTimeCards: function () {\n if (this.options.step === PJQ.constants.timecards.manageTimeCards.stage.MANAGE_TIMECARDS) {\n new PJQ.views.modals.YesNo({\n header: \"Unsaved Time Cards\",\n body: \"Unsaved Time Cards will be lost. Are you sure you want to close without saving?\",\n onYes: _.bind(function () {\n this.removeModal();\n }, this)\n });\n } else {\n this.removeModal();\n }\n }\n});","PJQ.views.timecards.ManageTimeCardsByWeekModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.TIMECARDS, 'modal-manage-timecards-week'),\n maxWidth: '1400px',\n minWidth: '600px',\n onSave: _.noop(),\n onDelete: _.noop(),\n timeCardsView: null\n },\n events: {\n 'click .last-week': 'lastWeek',\n 'click .next-week': 'nextWeek',\n 'click div.add-row-options a.dropdown-item': 'newRow',\n 'click .timecards-save': 'saveClicked'\n },\n beforeModalCreated: function () {\n let today = new Date(PJQ.helpers.dateHelpers.getDateString(new Date(), PJQ.helpers.dateHelpers.dateFormats.DATE));\n this.startDate = new Date();\n switch (this.options.settings.get('weekStart')) {\n case 0: // Su\n this.startDate.setDate(this.startDate.getDate() - (this.startDate.getDay()) % 7);\n break;\n default:\n this.startDate.setDate(this.startDate.getDate() - (this.startDate.getDay() + (7 - this.options.settings.get('weekStart'))) % 7);\n break;\n }\n\n if (this.options.project != null) {\n this.options.permissions = PJQ.app.session.project.permissions;\n\n let projectContacts = new PJQ.collections.projectContacts.ProjectContacts(null, {\n project: PJQ.app.session.project\n });\n\n projectContacts.fetch({\n success: _.bind(function () {\n this.projectContacts = [];\n\n if (this.options.permissions.hasPermission('timeCards.canViewAll')) {\n this.projectContacts = projectContacts.models;\n\n // add project user 2 to top if not present\n if (PJQ.app.session.project.user2) {\n if (_.size(_.filter(this.projectContacts, function (projectContact) {\n return projectContact.get('id') === PJQ.app.session.project.user2.get('id');\n })) === 0) {\n this.projectContacts.unshift(PJQ.app.session.project.user2);\n }\n }\n\n // add project user 1 to top if not present\n if (PJQ.app.session.project.user) {\n if (_.size(_.filter(this.projectContacts, function (projectContact) {\n return projectContact.get('id') === PJQ.app.session.project.user.get('id');\n })) === 0) {\n this.projectContacts.unshift(PJQ.app.session.project.user);\n }\n }\n }\n\n // add current user to top if not present\n if (_.size(_.filter(this.projectContacts, function (projectContact) {\n return projectContact.get('id') === PJQ.app.session.user.get('id');\n })) === 0) {\n this.projectContacts.unshift(PJQ.app.session.user);\n }\n\n this.projectContacts = _.sortBy(this.projectContacts, function (user) {\n return user.get('contactName') ? user.get('contactName').toLowerCase() : '';\n });\n\n this.render();\n }, this)\n });\n } else {\n this.options.permissions = PJQ.app.session.systemPermissions;\n\n if (this.options.permissions.hasPermission('timeCards.canViewAll')) {\n PJQ.app.session.fetchUsers(_.bind(function (users) {\n this.users = _.sortBy(users.models, function (user) {\n return user.get('contactName') ? user.get('contactName').toLowerCase() : '';\n });\n this.render();\n }, this));\n } else {\n this.users = [PJQ.app.session.user];\n this.render();\n }\n }\n },\n afterRender: function () {\n if (!this.users && !this.projectContacts)\n return;\n\n this.datePicker = new PJQ.inputs.Datepicker({\n el: this.$('.select-week-input'),\n datepickerOptions: {\n defaultDate: this.startDate,\n format: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE\n },\n disabledDays: _.filter([0, 1, 2, 3, 4, 5, 6], _.bind(function (day) {\n return day !== this.options.settings.get('weekStart');\n }, this)),\n onChange: _.bind(function (value) {\n this.renderWeek(value);\n }, this)\n });\n\n if (PJQ.app.session.project) {\n _.each(this.projectContacts, _.bind(function (user) {\n this.$('.select-context').append(\"\");\n }, this));\n } else {\n _.each(this.users, _.bind(function (user) {\n this.$('.select-context').append(\"\");\n }, this));\n }\n\n this.context = PJQ.app.session.user;\n\n this.contextSelectPicker = new PJQ.inputs.Selectpicker({\n el: this.$('.select-context'),\n isIntChoices: true,\n isMultiple: false,\n mustSelectValue: true,\n defaultValue: this.context.get('id'),\n onHide: _.bind(function () {\n if (this.context.get('id') !== this.contextSelectPicker.getValue()) {\n if (PJQ.app.session.project) {\n _.each(this.projectContacts, _.bind(function (user) {\n if (user.get('id') === this.contextSelectPicker.getValue()) {\n this.context = user;\n this.renderWeek();\n }\n }, this));\n } else {\n _.each(this.users, _.bind(function (user) {\n if (user.get('id') === this.contextSelectPicker.getValue()) {\n this.context = user;\n this.renderWeek();\n }\n }, this));\n }\n }\n }, this)\n });\n\n this.renderWeek();\n },\n renderWeek: function (newDate = null) {\n if (newDate)\n this.startDate = newDate;\n\n this.projects = null;\n this.rows = [];\n this.$('.timecards-list, .add-row-options').empty();\n this.$('.timecards-empty').removeClass('hidden');\n\n let fnContinue = _.bind(function () {\n this.projects = new PJQ.collections.timecards.TimeCardContextProjects(null, {\n id: this.context.get('id'),\n startDate: this.startDate,\n endDate: PJQ.helpers.dateHelpers.getNewDateAddDays(this.startDate, 7)\n });\n\n this.projects.fetch({\n success: _.bind(function () {\n this.$('.add-row-options').append(\"\");\n\n if (PJQ.app.session.project) {\n let hasLocation = (_.size(PJQ.app.session.project.get('city')) + _.size(PJQ.app.session.project.get('state')) > 0);\n this.$('.add-row-options').append(\"\" + PJQ.app.session.project.get('projectName') + \"\");\n } else if (_.size(this.projects.models) > 0) {\n _.each(this.projects.models, _.bind(function (project) {\n let hasLocation = (_.size(project.get('city')) + _.size(project.get('state')) > 0);\n this.$('.add-row-options').append(\"\" + project.get('projectName') + \"\");\n }, this));\n } else {\n this.$('.add-row-options .dropdown-item[data-project-id=\"0\"]').removeClass('hidden');\n }\n\n if (_.size(this.categories.models) > 0) {\n this.$('.add-row-options').append(\"\");\n }\n\n _.each(this.categories.models, _.bind(function (category) {\n this.$('.add-row-options').append(\"\" + category.get('name') + \"\");\n }, this));\n\n let dateFormat = \"ddd, \" + PJQ.helpers.dateHelpers.dateFormats.DATE_MONTH_DAY,\n tempDate = new Date(this.startDate.valueOf());\n for (var i = 0; i < 7; i++) {\n this.$('div.timecards-header div[data-day-column=\"' + i + '\"]').text(PJQ.helpers.dateHelpers.getDateString(tempDate, dateFormat));\n tempDate.setDate(tempDate.getDate() + 1);\n }\n\n let idFilter = 0;\n if (this.options.contact)\n idFilter = this.options.contact.get('id');\n else {\n if (!this.options.permissions.hasPermission('contacts.canView') && (PJQ.app.session.project === null || !this.options.permissions.hasPermission('canViewAll')))\n idFilter = -PJQ.app.session.user.id;\n }\n\n let dateNow = new Date(), parameters = {\n searchFor: '',\n startDate: PJQ.helpers.dateHelpers.getDateString(this.startDate, PJQ.helpers.dateHelpers.dateFormats.DATE_YMD),\n endDate: PJQ.helpers.dateHelpers.getDateString(PJQ.helpers.dateHelpers.getNewDateAddDays(this.startDate, 6), PJQ.helpers.dateHelpers.dateFormats.DATE_YMD),\n page: 1,\n pageSize: 2147483646,\n orderBy: 'project.projectId',\n orderDirection: 'asc',\n projectId: PJQ.app.session.project ? PJQ.app.session.project.get('projectId') : 0,\n idFilter: this.context.get('id'),\n timeZoneOffset: dateNow.getTimezoneOffset()\n }, timecards = new PJQ.collections.timecards.TimeCards();\n\n timecards.fetch({\n data: parameters,\n success: _.bind(function () {\n let newRows = [];\n _.each(timecards.models, _.bind(function (timecard) {\n if (_.size(_.filter(newRows, function (row) {\n return row.project.projectId == timecard.get('projectId');\n })) === 0) {\n // iterate through the models in each newRow and add any missing dates for this date range.\n let models = [];\n\n for (let j = 0; j < 7; j++) {\n let date = PJQ.helpers.dateHelpers.getNewDateAddDays(this.startDate, j),\n sourceModels = _.filter(timecards.models, function (timecard2) {\n return timecard2.projectId === timecard.projectId;\n });\n\n let existingModels = _.filter(sourceModels, function (timecard2) {\n return timecard2.get('projectId') === timecard.get('projectId') && timecard2.get('date').getTime() === PJQ.helpers.dateHelpers.parseDateString(PJQ.helpers.dateHelpers.getDateString(date, PJQ.helpers.dateHelpers.dateFormats.DATE, false)).getTime();\n });\n\n if (_.size(existingModels) === 0) {\n models.push(new PJQ.models.timecards.TimeCard({\n projectId: timecard.get('projectId'),\n project: timecard.get('project'),\n contact: timecard.get('contact'),\n id: timecard.get('id'),\n date: PJQ.helpers.dateHelpers.parseDateString(PJQ.helpers.dateHelpers.getDateString(date, PJQ.helpers.dateHelpers.dateFormats.DATE, false)),\n notes: '',\n regularHours: 0,\n overtimeHours: 0,\n doubletimeHours: 0,\n createdBy: -PJQ.app.session.user.id\n }));\n } else {\n models.push(existingModels[0]);\n }\n }\n\n newRows.push({\n project: timecard.get('project'),\n models: models\n });\n }\n }, this));\n\n if (_.size(newRows) > 0) {\n _.each(newRows, _.bind(function (newRow) {\n this.addRow(newRow);\n }, this));\n } else if (PJQ.app.session.project) {\n this.$('.add-row-options .dropdown-item.project[data-project-id=\"' + PJQ.app.session.project.get('projectId') + '\"]').click();\n }\n }, this)\n });\n\n this.recalculateTotals();\n }, this)\n });\n }, this);\n\n // load categories\n if (this.categories == null) {\n this.categories = new PJQ.collections.timecards.TimeCardCategories();\n this.categories.fetch({\n success: _.bind(function () {\n fnContinue();\n }, this)\n });\n } else {\n fnContinue();\n }\n },\n captureSignature: function (callback) {\n if (PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.ENABLE_TIMECARDS_SIGNATURE)) {\n new PJQ.views.signatures.SignatureSubmitModal({\n headerSubText: \"Sign off on your time card changes\",\n onSubmit: _.bind(function (signature, cb) {\n cb();\n callback(signature ? signature : \"\");\n }, this)\n });\n } else {\n callback(null);\n }\n },\n lastWeek: function () {\n let fnContinue = _.bind(function () {\n let date = new Date(this.startDate.valueOf());\n date.setDate(date.getDate() - 7);\n this.datePicker.setValue(date);\n this.renderWeek(date);\n }, this);\n\n if (_.size(this.rows) > 0) {\n\n this.save(_.bind(function () {\n fnContinue();\n }, this));\n\n } else\n fnContinue();\n },\n nextWeek: function () {\n let fnContinue = _.bind(function () {\n let date = new Date(this.startDate.valueOf());\n date.setDate(date.getDate() + 7);\n this.datePicker.setValue(date);\n this.renderWeek(date)\n }, this);\n\n if (_.size(this.rows) > 0) {\n this.save(_.bind(function () {\n fnContinue();\n }, this));\n } else\n fnContinue();\n },\n newRow: function (e) {\n let projectId = $(e.currentTarget).data('projectId'), newRow = {};\n\n if (projectId === 0)\n return;\n\n if (projectId > 0) {\n _.each(this.projects.models, _.bind(function (project) {\n if (project.get('id') == projectId) {\n newRow.project = project.attributes;\n }\n }, this));\n\n if (!newRow.project && PJQ.app.session.project)\n newRow.project = PJQ.app.session.project.attributes;\n } else {\n // find category\n _.each(this.categories.models, _.bind(function (category) {\n if (category.get('timeCardCategoryId') == projectId * -1) {\n newRow.project = {\n projectId: category.get('timeCardCategoryId') * -1,\n projectName: category.get('name')\n };\n }\n }, this));\n }\n\n // add new models for the days of this work week\n newRow.models = [];\n for (let i = 0; i < 7; i++) {\n let date = PJQ.helpers.dateHelpers.getNewDateAddDays(this.startDate, i);\n newRow.models.push(new PJQ.models.timecards.TimeCard({\n projectId: projectId,\n project: newRow.project,\n contact: this.context.attributes,\n id: this.context.get('id'),\n date: PJQ.helpers.dateHelpers.parseDateString(PJQ.helpers.dateHelpers.getDateString(date, PJQ.helpers.dateHelpers.dateFormats.DATE, false)),\n notes: '',\n regularHours: 0,\n overtimeHours: 0,\n doubletimeHours: 0,\n createdBy: -PJQ.app.session.user.id\n }));\n }\n\n this.addRow(newRow);\n },\n addRow: function (row) {\n this.$('.timecards-empty').addClass('hidden');\n this.$('.add-row-options a.dropdown-item[data-project-id=\"' + row.project.projectId + '\"]').addClass('hidden');\n if (_.size(this.$('.add-row-options a.dropdown-item.category:not(.hidden)')) === 0)\n this.$('.add-row-options .dropdown-divider').addClass('hidden');\n\n if (_.size(this.$('.add-row-options a.dropdown-item.project:not(.hidden)')) === 0)\n this.$('.add-row-options .dropdown-item.no-projects').removeClass('hidden');\n\n let self = this;\n this.rows.push(new PJQ.inputs.timecards.TimeCardWeekEditor({\n el: $('
').appendTo(this.$('.timecards-list')),\n settings: this.options.settings,\n project: this.options.project,\n row: row,\n startDate: this.startDate,\n onChange: _.bind(function () {\n setTimeout(function () {\n self.recalculateTotals();\n }, 200);\n }, this),\n onDelete: function () {\n this.el.addClass('hidden');\n self.$('.add-row-options a.dropdown-item[data-project-id=\"' + row.project.projectId + '\"]').removeClass('hidden');\n\n // handle New Row dropdowns depending on if project or category\n if (this.row.project.projectId > 0) {\n // if at least one visible project in the list exists, hide the 'no projects' item\n if (_.size(self.$('.add-row-options a.dropdown-item.project:not(.hidden)')) > 0)\n self.$('.add-row-options .dropdown-item.no-projects').addClass('hidden');\n else\n self.$('.add-row-options .dropdown-item.no-projects').removeClass('hidden');\n } else {\n // at least one category now exists, so show the divider\n self.$('.add-row-options .dropdown-divider').removeClass('hidden');\n }\n\n if (_.size(self.$('.timecards-list .time-card-week:not(\".hidden\")')) == 0)\n self.$('.timecards-empty').removeClass('hidden');\n\n self.recalculateTotals();\n }\n }));\n },\n recalculateTotals: function () {\n let grandTotalMinutes = 0;\n for (let i = 0; i < 7; i++) {\n let totalMinutes = 0;\n\n // loop through each day, and then through each row and get the daytotal\n let date = PJQ.helpers.dateHelpers.getNewDateAddDays(this.startDate, i);\n _.each(this.rows, _.bind(function (row) {\n totalMinutes += row.getTotalTimeForDate(date);\n }, this));\n\n grandTotalMinutes += totalMinutes;\n\n this.$('.timecards-footer .time-card-day-total[data-day-column=\"' + i + '\"]').text(PJQ.helpers.timecards.getFormattedTime(totalMinutes));\n }\n\n this.$('.timecards-footer .time-card-total[data-day-column=\"total\"]').text(PJQ.helpers.timecards.getFormattedTime(grandTotalMinutes));\n },\n save: function (callback) {\n let timecards = [];\n _.each(this.rows, _.bind(function (row) {\n if (row.hasChanges()) {\n timecards.push(..._.filter(row.options.row.models, function (model) {\n return !model.isNew() || !model.get('deletedOn');\n }));\n }\n }, this));\n\n let signTimecards = _.filter(timecards, function (timecard) {\n return timecard.get('id') === -PJQ.app.session.user.id;\n }), fnSave = _.bind(function (signature) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'timecards',\n },\n {\n endpoint: 'batch'\n }\n ]),\n data: {\n signature: signature,\n rows: timecards\n },\n isAPIv2: true\n }).post().success(_.bind(function (data) {\n PJQ.notifications.notify.successNotify({\n message: 'Timecard changes saved sucessfully'\n });\n this.options.onSave();\n callback();\n }, this));\n }, this)\n if (_.size(signTimecards) > 0) {\n this.captureSignature(_.bind(function (signature) {\n fnSave(signature);\n }, this));\n } else if (_.size(timecards) > 0) {\n fnSave();\n } else {\n callback();\n }\n },\n saveClicked: function () {\n this.save(_.bind(function () {\n this.removeModal();\n }, this));\n }\n});","PJQ.views.timecards.BaseDataTable = PJQ.views.dataTables.DataTable.extend({\n defaults: {\n language: {\n zeroRecords: \"No Results Available\"\n },\n isHideSearch: true,\n dom: '<\"top\"p<\"clear\">>rt<\"bottom\"p<\"clear\">>',\n phoneWidth: '125px'\n },\n events: {\n 'click .btn-copy-phone': 'copyPhone',\n 'click .btn-copy-fax': 'copyPhone',\n 'click .btn-copy-cell': 'copyPhone',\n 'click .btn-copy-email': 'copyEmail'\n },\n beforeDataTableRender: function () {\n this.options.rowCallback = function (row, data) {\n };\n\n if (this.options.project != null) {\n this.options.permissions = PJQ.app.session.project.permissions;\n } else {\n this.options.permissions = PJQ.app.session.systemPermissions;\n }\n\n this.options.childDataTables = [];\n\n this.options.contextMenuOptions = {\n actions: this.getContextMenuItems(),\n isHideNoActions: true\n };\n\n this.options.onRowDoubleClick = _.bind(function (row) {\n if (row.data()) {\n this.editRow(row.data());\n }\n }, this);\n\n if (this.options.settings) {\n // enable paging for grids that have a setting for it / are not subgrids\n if (this.options.settings.rowsPerPage !== 0 && this.options.view.indexOf('-') === -1)\n this.options.pageLength = this.options.settings.rowsPerPage;\n else\n this.options.pageLength = 2147483646;\n\n if (this.options.settings.orderBy !== 'sortOrder') {\n if (_.size(this.options.settings.columns) === 0) {\n this.options.settings.orderBy = this.options.settings.columnsDefault[0];\n } else if (this.options.settings.columns.indexOf(this.options.settings.orderBy) === -1) {\n this.options.settings.orderBy = this.options.settings.columns[0];\n }\n }\n _.each(this.getColumns(false, this.options.view), _.bind(function (column, index) {\n if (column.columnData === this.options.settings.orderBy) {\n this.options.order = [[index, this.options.settings.orderAscending ? 'asc' : 'desc']];\n }\n }, this));\n\n }\n\n this.options.createdRow = _.bind(this.createdRow, this);\n\n if (typeof this.options.beforeDataTableRender === 'function') {\n this.options.beforeDataTableRender();\n }\n },\n afterDataTableRender: function () {\n this.$el.on('order.dt', _.bind(function (e, settings, details) {\n if (this.$dataTable[0].id !== settings.oInstance[0].id)\n return;\n\n if (!this.options.settings)\n return;\n\n let oldOrder = 0, columns = this.getColumns(false);\n _.each(columns, _.bind(function (column, index) {\n if (column.columnData === this.options.settings.orderBy)\n oldOrder = index;\n }, this));\n\n if (oldOrder !== details[details.length - 1].src || this.options.settings.orderAscending !== (details[details.length - 1].dir === 'asc')) {\n this.options.settings.orderBy = columns[details[details.length - 1].src].columnData;\n this.options.settings.orderAscending = details[details.length - 1].dir === 'asc';\n this.options.timecardsView.userSettings.save();\n }\n }, this));\n\n this.$el.on('draw.dt', _.bind(function () {\n this.afterDataTableRenderChild();\n }, this));\n\n if (typeof this.options.afterDataTableRender === 'function') {\n this.options.afterDataTableRender(this.dataTable);\n }\n\n this.afterDataTableRenderChild();\n },\n columnOrderChanged: function (columns) {\n if (this.options.userSettings != null) {\n let settings = this.options.userSettings.get('viewSettings');\n for (let i = 0; i < _.size(settings); i++) {\n if (settings[i].view === this.options.view) {\n settings[i].columns = columns;\n }\n }\n\n this.options.userSettings.set('viewSettings', settings);\n this.options.userSettings.save();\n }\n },\n afterDataTableRenderChild: function () {\n },\n getRowChildTable: function (childOpts) {\n },\n getRowChildData: function (row) {\n },\n setRowStyle: function (row, status, isBlacklisted) {\n },\n getContextMenuItems: function () {\n },\n editRow: function (model) {\n },\n statusChanged: function (statuses) {\n },\n childRowToggle: function (sender, rowOverride) {\n let $target = rowOverride ? $(rowOverride.selector.rows).find('.timecard-dataentry-toggle-row') : $(sender.currentTarget),\n id = $target.data('id'),\n tr = $target.closest('tr'),\n row = this.getRow(tr);\n if (row.child.isShown() && rowOverride == null) {\n // This row is already open - close it\n this.options.childDataTables = _.filter(this.options.childDataTables, _.bind(function (childDt) {\n return childDt.options.parentId !== id;\n }, this));\n row.child.hide();\n tr.removeClass('shown');\n $target.removeClass('fa-minus-circle').addClass('fa-plus-circle');\n } else {\n $target.removeClass('fa-plus-circle').addClass('fa-minus-circle');\n\n this.renderChildRow(row, id);\n }\n },\n renderChildRow: function (row, parentId) {\n //row.child.hide();\n let childClass = 'subgrid-' + parentId.toString(),\n $childTable = $('
', {\n class: childClass + ' p-2'\n });\n row.child($childTable).show();\n\n let childData = this.getRowChildData(row);\n if (childData != null) {\n if (this.options.view === PJQ.constants.timecards.view.BY_TIMECARD_DATAENTRY ||\n this.options.view === PJQ.constants.timecards.view.BY_TIMECARD ||\n this.options.view === PJQ.constants.timecards.view.PROJECTWALL_BY_TIMECARD ||\n this.options.view === PJQ.constants.timecards.view.BY_PROJECT_CONTACT_TIMECARD ||\n this.options.view === PJQ.constants.timecards.view.BY_CONTACT_PROJECT_TIMECARD) {\n let childTable = this.getRowChildTable({\n el: $childTable,\n data: childData,\n parentId: parentId,\n onApprove: this.options.onApprove,\n isApproved: row.data().get('approvedOn') ? true : false,\n timecardsView: this.options.timecardsView\n });\n this.options.childDataTables = _.filter(this.options.childDataTables, _.bind(function (childDt) {\n return childDt.options.parentId !== parentId;\n }, this));\n this.options.childDataTables.push(childTable);\n } else {\n let settings = this.getChildTableSettings(),\n dateNow = new Date(),\n parameters = {\n searchFor: this.options.timecardsView.$('.input-search').val(),\n startDate: PJQ.helpers.dateHelpers.getDateString(this.options.timecardsView.startDate, PJQ.helpers.dateHelpers.dateFormats.DATE_YMD),\n endDate: PJQ.helpers.dateHelpers.getDateString(this.options.timecardsView.endDate, PJQ.helpers.dateHelpers.dateFormats.DATE_YMD),\n page: 1,\n pageSize: 2147483646,\n orderBy: settings.orderBy,\n orderDirection: settings.orderAscending ? 'asc' : 'desc',\n timeZoneOffset: dateNow.getTimezoneOffset(),\n projectId: childData.options.projectId,\n idFilter: childData.options.idFilter\n };\n\n let loader = new PJQ.Loader(this.$el.parent());\n childData.fetch({\n type: 'GET',\n data: parameters,\n success: _.bind(function () {\n loader.remove();\n let childTable = this.getRowChildTable({\n el: $childTable,\n data: childData.models,\n parentId: parentId,\n timecardsView: this.options.timecardsView\n });\n this.options.childDataTables = _.filter(this.options.childDataTables, _.bind(function (childDt) {\n return childDt.options.parentId !== parentId;\n }, this));\n this.options.childDataTables.push(childTable);\n //tr.addClass('shown');\n }, this)\n });\n }\n }\n },\n getColumns: function () {\n },\n cleanup: function () {\n this.undelegateEvents();\n $(this.el).empty();\n },\n getIsRootView: function () {\n return (this.options.view.indexOf('-') === -1);\n },\n createdRow: function (row, data, dataIndex) {\n },\n copyPhone: function (e) {\n let inputId = 'h_input_' + _.uniqueId(),\n hiddenInput = $('', {\n value: $(e.currentTarget).data('phone'),\n style: 'position: absolute;left:-2000px;top:-2000px',\n id: inputId\n });\n this.$el.append(hiddenInput);\n hiddenInput[0].select();\n document.execCommand(\"copy\");\n hiddenInput.remove();\n PJQ.notifications.notify.successNotify({\n message: 'Number copied to clipboard.'\n });\n },\n copyEmail: function (e) {\n let inputId = 'h_input_' + _.uniqueId(),\n hiddenInput = $('', {\n value: $(e.currentTarget).data('email'),\n style: 'position: absolute;left:-2000px;top:-2000px',\n id: inputId\n });\n this.$el.append(hiddenInput);\n hiddenInput[0].select();\n document.execCommand(\"copy\");\n hiddenInput.remove();\n PJQ.notifications.notify.successNotify({\n message: 'Email copied to clipboard.'\n });\n },\n fetchTimeCards: async function (data) {\n if (data == null || typeof this.options.onApprove !== 'function') {\n return;\n }\n\n let timeCards;\n if (data.timeCards != null) {\n timeCards = data.timeCards;\n } else if (data.idFilter != null || data.projectId != null) {\n timeCards = new PJQ.collections.timecards.TimeCards(null, {\n projectId: data.projectId,\n idFilter: data.idFilter\n });\n\n let dateNow = new Date(),\n parameters = {\n startDate: PJQ.helpers.dateHelpers.getDateString(this.options.timecardsView.startDate, PJQ.helpers.dateHelpers.dateFormats.DATE_YMD),\n endDate: PJQ.helpers.dateHelpers.getDateString(this.options.timecardsView.endDate, PJQ.helpers.dateHelpers.dateFormats.DATE_YMD),\n page: 1,\n pageSize: 2147483646,\n timeZoneOffset: dateNow.getTimezoneOffset(),\n projectId: timeCards.options.projectId,\n idFilter: timeCards.options.idFilter\n };\n\n await timeCards.fetch({\n type: 'GET',\n data: parameters\n });\n }\n\n return timeCards;\n }\n});\n\nPJQ.views.timecards.ProjectDataTable = PJQ.views.timecards.BaseDataTable.extend({\n events: {\n 'click i.project-toggle-row': 'childRowToggle',\n 'click .approve-project-time-cards': 'approveTimeCardsClicked',\n 'click .unapprove-project-time-cards': 'approveTimeCardsClicked',\n },\n getContextMenuItems: function () {\n return [\n {\n name: 'Approve Time Cards',\n iconClass: 'fal fa-calendar-check',\n onClick: _.bind(function (row) {\n this.approveTimeCards(null, row);\n }, this),\n isShown: _.bind(function (row) {\n return this.options.permissions.hasPermission('timeCards.canApprove');\n }, this)\n }\n ];\n },\n getColumns: function (includeAllColumns = false) {\n let columns = [],\n includeColumns = ['projectId', 'projectName', 'address1', 'address2', 'city', 'state', 'zip', 'country', 'bidsDue', 'startDate', 'endDate', 'regularHours', 'overtimeHours', 'doubletimeHours'];\n\n if (!includeAllColumns) {\n if (_.size(this.options.settings.columns) > 0)\n includeColumns = this.options.settings.columns;\n else\n includeColumns = this.options.settings.columnsDefault;\n\n if (this.options.view === PJQ.constants.timecards.view.BY_PROJECT ||\n this.options.view === PJQ.constants.timecards.view.BY_CONTACT_PROJECT) {\n columns.push({\n \"columnData\": \"childData\",\n \"data\": null,\n \"title\": \"\",\n \"width\": \"20px\",\n \"orderable\": false,\n \"searchable\": false,\n \"defaultContent\": '',\n \"render\": function (data, type, row) {\n return '';\n }\n });\n }\n }\n let maxEmailWidth = $(window).width() > 1200 ? 225 : 100;\n\n _.each(includeColumns, _.bind(function (columnName) {\n switch (columnName) {\n case 'projectId':\n columns.push({\n \"columnData\": \"projectId\",\n \"data\": \"attributes.projectId\",\n \"title\": \"Project Id\"\n });\n break;\n case 'projectName':\n columns.push({\n \"columnData\": \"projectName\",\n \"data\": \"attributes.projectName\",\n \"title\": \"Project\"\n });\n break;\n case 'address1':\n columns.push({\n \"columnData\": \"address1\",\n \"data\": \"attributes.address1\",\n \"title\": \"Address 1\"\n });\n break;\n case 'address2':\n columns.push({\n \"columnData\": \"address2\",\n \"data\": \"attributes.address2\",\n \"title\": \"Address 2\"\n });\n break;\n case 'city':\n columns.push({\n \"columnData\": \"city\",\n \"data\": \"attributes.city\",\n \"title\": \"City\"\n });\n break;\n case 'state':\n columns.push({\n \"columnData\": \"state\",\n \"data\": \"attributes.state\",\n \"title\": \"State\"\n });\n break;\n case 'zip':\n columns.push({\n \"columnData\": \"zip\",\n \"data\": \"attributes.zip\",\n \"title\": \"Zip\"\n });\n break;\n case 'country':\n columns.push({\n \"columnData\": \"country\",\n \"data\": \"attributes.country\",\n \"title\": \"Country\"\n });\n break;\n case 'bidsDue':\n columns.push({\n \"columnData\": \"bidsDue\",\n \"data\": \"attributes.bidsDue\",\n \"title\": 'Bids Due',\n \"width\": '90px',\n \"orderable\": true,\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.dateHelpers.getDateString(new Date(row.get('bidsDue')), PJQ.helpers.dateHelpers.dateFormats.DATE_TIME);\n }, this)\n });\n break;\n case 'startDate':\n columns.push({\n \"columnData\": \"startDate\",\n \"data\": \"attributes.startDate\",\n \"title\": 'Start Date',\n \"width\": '90px',\n \"orderable\": true,\n \"render\": _.bind(function (data, type, row) {\n return (row.get('projectId') > 0) ? PJQ.helpers.dateHelpers.getDateString(new Date(row.get('startDate')), PJQ.helpers.dateHelpers.dateFormats.DATE) : 'N/A';\n }, this)\n });\n break;\n case 'endDate':\n columns.push({\n \"columnData\": \"endDate\",\n \"data\": \"attributes.endDate\",\n \"title\": 'End Date',\n \"width\": '90px',\n \"orderable\": true,\n \"render\": _.bind(function (data, type, row) {\n return (row.get('projectId') > 0) ? PJQ.helpers.dateHelpers.getDateString(new Date(row.get('endDate')), PJQ.helpers.dateHelpers.dateFormats.DATE) : 'N/A';\n }, this)\n });\n break;\n case 'regularHours':\n columns.push({\n \"columnData\": \"regularHours\",\n \"data\": \"attributes.regularHours\",\n \"title\": 'Reg. Hours',\n \"width\": '50px',\n \"orderable\": true,\n \"className\": 'regularHours',\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.timecards.getFormattedTime(row.get('regularHours'));\n }, this)\n });\n break;\n case 'overtimeHours':\n columns.push({\n \"columnData\": \"overtimeHours\",\n \"data\": \"attributes.overtimeHours\",\n \"title\": 'OT Hours',\n \"width\": '50px',\n \"orderable\": true,\n \"className\": 'overtimeHours',\n \"visible\": this.options.timeCardSettings.get('enableOvertime'),\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.timecards.getFormattedTime(row.get('overtimeHours'));\n }, this)\n });\n break;\n case 'doubletimeHours':\n columns.push({\n \"columnData\": \"doubletimeHours\",\n \"data\": \"attributes.doubletimeHours\",\n \"title\": 'DT Hours',\n \"width\": '50px',\n \"orderable\": true,\n \"className\": 'doubletimeHours',\n \"visible\": this.options.timeCardSettings.get('enableDoubletime'),\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.timecards.getFormattedTime(row.get('doubletimeHours'));\n }, this)\n });\n break;\n }\n }, this));\n\n if (!includeAllColumns) {\n columns.push({\n \"title\": '',\n \"render\": _.bind(function (data, type, row) {\n let html = '';\n html += '
';\n\n if (this.options.permissions.hasPermission('timeCards.canApprove')) {\n html += row.get('approvedOn') ? '' : '';\n }\n\n html += '
';\n return html;\n }, this),\n \"orderable\": false,\n \"searchable\": false,\n \"width\": \"50px\",\n \"className\": \"text-center\"\n });\n }\n\n return columns;\n },\n getChildTableType: function () {\n if (this.options.view === PJQ.constants.timecards.view.BY_PROJECT)\n return PJQ.constants.timecards.view.BY_PROJECT_CONTACT;\n if (this.options.view === PJQ.constants.timecards.view.BY_CONTACT_PROJECT)\n return PJQ.constants.timecards.view.BY_CONTACT_PROJECT_TIMECARD;\n },\n getChildTableSettings: function () {\n return this.options.timecardsView.userSettings.getSettings(this.getChildTableType());\n },\n getRowChildTable: function (childOpts) {\n\n let fixedColumnsLeft = 1, fixedColumnsRight = 0;\n if (this.options.view === PJQ.constants.timecards.view.BY_CONTACT_PROJECT) {\n fixedColumnsLeft = 1;\n fixedColumnsRight = 1;\n }\n\n childOpts.view = this.getChildTableType();\n childOpts.settings = this.getChildTableSettings();\n childOpts.userSettings = this.options.timecardsView.userSettings;\n childOpts.colReorder = {\n fixedColumnsLeft: fixedColumnsLeft,\n fixedColumnsRight: fixedColumnsRight,\n realtime: false\n };\n childOpts.timecardsView = this.options.timecardsView;\n childOpts.onApprove = this.options.onApprove;\n childOpts.parentDataTable = this;\n childOpts.dom = 't';\n childOpts.timeCardSettings = this.options.timeCardSettings;\n\n if (this.options.view === PJQ.constants.timecards.view.BY_PROJECT)\n return new PJQ.views.timecards.ContactDataTable(childOpts);\n if (this.options.view === PJQ.constants.timecards.view.BY_CONTACT_PROJECT)\n return new PJQ.views.timecards.TimeCardDataTable(childOpts);\n },\n getRowChildData: function (row) {\n let viewOptions = {\n view: this.getChildTableType(),\n projectId: row.data().get('projectId'),\n };\n\n if (this.options.view === PJQ.constants.timecards.view.BY_PROJECT)\n return new PJQ.collections.timecards.TimeCardContacts(null, viewOptions);\n if (this.options.view === PJQ.constants.timecards.view.BY_CONTACT_PROJECT) {\n viewOptions.idFilter = this.options.parentId;\n return new PJQ.collections.timecards.TimeCards(null, viewOptions);\n }\n },\n approveTimeCardsClicked: async function (e) {\n if (typeof this.options.onApprove !== 'function') {\n return;\n }\n\n let $target = $(e.currentTarget),\n row = this.getRow($target.closest('tr')),\n project = row.data();\n if (project.timeCards == null) {\n let loader = new PJQ.Loader($target);\n project.timeCards = await this.fetchTimeCards({\n projectId: project.get('projectId'),\n idFilter: this.options.parentId\n })\n loader.remove();\n }\n\n if (_.size(project.timeCards.models.filter((c) => {\n return c.get('approvedOn') == null;\n })) === 0) {\n PJQ.notifications.notify.warningNotify({\n message: 'This project has no time cards to approve for the selected dates'\n });\n return;\n }\n\n let approveNote;\n if (project.timeCards.options.idFilter != null) {\n approveNote = \"Are you sure you want to approve this contact's time cards for the selected project?\";\n } else {\n approveNote = \"Are you sure you want to approve this project's time cards for all contacts?\";\n }\n new PJQ.views.modals.YesNo({\n header: \"Approve Time Cards\",\n body: approveNote,\n onYes: _.bind(function () {\n this.options.onApprove(project.timeCards.models, true, () => {\n row.invalidate().draw();\n });\n }, this)\n });\n },\n approveTimeCards: async function (e, row) {\n if (typeof this.options.onApprove !== 'function') {\n return;\n }\n\n let $target = null;\n if (e != null) {\n $target = $(e.currentTarget);\n row = this.getRow($target.closest('tr'));\n }\n\n let project = row.data();\n if (project.timeCards == null) {\n let loader = null;\n if ($target != null) {\n loader = new PJQ.Loader($target);\n }\n\n project.timeCards = await this.fetchTimeCards({\n projectId: project.get('projectId'),\n idFilter: this.options.parentId\n })\n\n if (loader != null) {\n loader.remove();\n }\n }\n\n if (_.size(project.timeCards.models.filter((c) => {\n return c.get('approvedOn') == null;\n })) === 0) {\n PJQ.notifications.notify.warningNotify({\n message: 'This project has no time cards to approve for the selected dates'\n });\n return;\n }\n\n let approveNote;\n if (project.timeCards.options.idFilter != null) {\n approveNote = \"Are you sure you want to approve this contact's time cards for the selected project?\";\n } else {\n approveNote = \"Are you sure you want to approve this project's time cards for all contacts?\";\n }\n new PJQ.views.modals.YesNo({\n header: \"Approve Time Cards\",\n body: approveNote,\n onYes: _.bind(function () {\n this.options.onApprove(project.timeCards.models, true, () => {\n row.invalidate().draw();\n });\n }, this)\n });\n }\n});\n\nPJQ.views.timecards.ContactDataTable = PJQ.views.timecards.BaseDataTable.extend({\n events: {\n 'click i.contact-toggle-row': 'childRowToggle',\n 'click .approve-contact-time-cards': 'approveTimeCardsClicked',\n 'click .unapprove-contact-time-cards': 'approveTimeCardsClicked',\n },\n getContextMenuItems: function () {\n return [\n {\n name: 'Approve Time Cards',\n iconClass: 'fal fa-calendar-check',\n onClick: _.bind(function (row) {\n this.approveTimeCards(null, row);\n }, this),\n isShown: _.bind(function (row) {\n return this.options.permissions.hasPermission('timeCards.canApprove');\n }, this)\n }\n ];\n },\n getColumns: function (includeAllColumns = false) {\n let columns = [],\n includeColumns = ['companyName', 'contactName', 'address1', 'address2', 'city', 'state', 'zip', 'country', 'phone', 'fax', 'cell', 'email', 'userTypeId', 'regularHours', 'overtimeHours', 'doubletimeHours'];\n\n if (!includeAllColumns) {\n if (_.size(this.options.settings.columns) > 0)\n includeColumns = this.options.settings.columns;\n else\n includeColumns = this.options.settings.columnsDefault;\n\n if (this.options.view === PJQ.constants.timecards.view.BY_CONTACT ||\n this.options.view === PJQ.constants.timecards.view.BY_PROJECT_CONTACT) {\n columns.push({\n \"columnData\": \"childData\",\n \"data\": null,\n \"title\": \"\",\n \"width\": \"20px\",\n \"orderable\": false,\n \"searchable\": false,\n \"defaultContent\": '',\n \"render\": function (data, type, row) {\n return '';\n }\n });\n }\n }\n let maxEmailWidth = $(window).width() > 1200 ? 225 : 100;\n\n _.each(includeColumns, _.bind(function (columnName) {\n switch (columnName) {\n case 'companyName':\n columns.push({\n \"columnData\": \"companyName\",\n \"data\": \"attributes.companyName\",\n \"title\": \"Company\"\n });\n break;\n case 'contactName':\n columns.push({\n \"columnData\": \"contactName\",\n \"data\": \"attributes.contactName\",\n \"title\": \"Contact\"\n });\n break;\n case 'address1':\n columns.push({\n \"columnData\": \"address1\",\n \"data\": \"attributes.address1\",\n \"title\": \"Address 1\"\n });\n break;\n case 'address2':\n columns.push({\n \"columnData\": \"address2\",\n \"data\": \"attributes.address2\",\n \"title\": \"Address 2\"\n });\n break;\n case 'city':\n columns.push({\n \"columnData\": \"city\",\n \"data\": \"attributes.city\",\n \"title\": \"City\"\n });\n break;\n case 'state':\n columns.push({\n \"columnData\": \"state\",\n \"data\": \"attributes.state\",\n \"title\": \"State\"\n });\n break;\n case 'zip':\n columns.push({\n \"columnData\": \"zip\",\n \"data\": \"attributes.zip\",\n \"title\": \"Zip\"\n });\n break;\n case 'country':\n columns.push({\n \"columnData\": \"country\",\n \"data\": \"attributes.country\",\n \"title\": \"Country\"\n });\n break;\n case 'phone':\n columns.push({\n \"columnData\": \"phone\",\n \"data\": \"attributes.phone\",\n \"title\": \"Phone\",\n \"width\": this.options.phoneWidth,\n \"render\": _.bind(function (data, type, row) {\n let html = '
',\n phoneFormatted = (row.get('phone') ? PJQ.helpers.formatHelpers.formatPhoneNumber(row.get('phone')) : 'N/A');\n\n if (row.get('phone') !== '')\n html += '';\n\n html += '
' + phoneFormatted + '
';\n html += '
';\n return html;\n }, this)\n });\n break;\n case 'cell':\n columns.push({\n \"columnData\": \"cell\",\n \"data\": \"attributes.cell\",\n \"title\": \"Cell\",\n \"width\": this.options.phoneWidth,\n \"render\": _.bind(function (data, type, row) {\n let html = '
',\n phoneFormatted = (row.get('cell') ? PJQ.helpers.formatHelpers.formatPhoneNumber(row.get('cell')) : 'N/A');\n\n if (row.get('cell') !== '')\n html += '';\n\n html += '
' + phoneFormatted + '
';\n html += '
';\n return html;\n }, this)\n });\n break;\n case 'fax':\n columns.push({\n \"columnData\": \"fax\",\n \"data\": \"attributes.fax\",\n \"title\": \"Fax\",\n \"width\": this.options.phoneWidth,\n \"render\": _.bind(function (data, type, row) {\n let html = '
',\n phoneFormatted = (row.get('fax') ? PJQ.helpers.formatHelpers.formatPhoneNumber(row.get('fax')) : 'N/A');\n\n if (row.get('fax') !== '')\n html += '';\n\n html += '
' + phoneFormatted + '
';\n html += '
';\n return html;\n }, this)\n });\n break;\n case 'email':\n columns.push({\n \"columnData\": \"email\",\n \"data\": \"attributes.email\",\n \"title\": \"Email\",\n \"render\": function (data, type, row) {\n let html = '
',\n emailFormatted = (row.get('email') ? ('' + row.get('email') + '') : '');\n\n if (row.get('email') !== '')\n html += '';\n\n html += '
' + emailFormatted + '
';\n return html;\n }\n });\n break;\n case 'userTypeId':\n columns.push({\n \"columnData\": 'userTypeId',\n \"title\": 'Type',\n \"data\": 'attributes.userTypeId',\n \"render\": function (data, type, row) {\n let userType = _.filter(PJQ.app.session.userTypes.getByIsCompany(null), _.bind(function (userType) {\n return row.get('userTypeId') === userType.get('userTypeId');\n }, this))[0];\n\n return userType != null ? userType.get('name') : 'N/A';\n }\n });\n break;\n case 'regularHours':\n columns.push({\n \"columnData\": \"regularHours\",\n \"data\": \"attributes.regularHours\",\n \"title\": 'Reg. Hours',\n \"width\": '50px',\n \"orderable\": true,\n \"className\": 'regularHours',\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.timecards.getFormattedTime(row.get('regularHours'));\n }, this)\n });\n break;\n case 'overtimeHours':\n columns.push({\n \"columnData\": \"overtimeHours\",\n \"data\": \"attributes.overtimeHours\",\n \"title\": 'OT Hours',\n \"width\": '50px',\n \"orderable\": true,\n \"className\": 'overtimeHours',\n \"visible\": this.options.timeCardSettings.get('enableOvertime'),\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.timecards.getFormattedTime(row.get('overtimeHours'));\n }, this)\n });\n break;\n case 'doubletimeHours':\n columns.push({\n \"columnData\": \"doubletimeHours\",\n \"data\": \"attributes.doubletimeHours\",\n \"title\": 'DT Hours',\n \"width\": '50px',\n \"orderable\": true,\n \"className\": 'doubletimeHours',\n \"visible\": this.options.timeCardSettings.get('enableDoubletime'),\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.timecards.getFormattedTime(row.get('doubletimeHours'));\n }, this)\n });\n break;\n }\n }, this));\n\n if (!includeAllColumns) {\n columns.push({\n \"title\": '',\n \"render\": _.bind(function (data, type, row) {\n let html = '';\n html += '
';\n\n if (this.options.permissions.hasPermission('timeCards.canApprove')) {\n html += row.get('approvedOn') ? '' : '';\n }\n\n html += '
';\n return html;\n }, this),\n \"orderable\": false,\n \"searchable\": false,\n \"width\": \"50px\",\n \"className\": \"text-center\"\n });\n }\n\n return columns;\n },\n getChildTableType: function () {\n if (this.options.view === PJQ.constants.timecards.view.BY_CONTACT)\n return PJQ.constants.timecards.view.BY_CONTACT_PROJECT;\n if (this.options.view === PJQ.constants.timecards.view.BY_PROJECT_CONTACT)\n return PJQ.constants.timecards.view.BY_PROJECT_CONTACT_TIMECARD;\n },\n getChildTableSettings: function () {\n return this.options.timecardsView.userSettings.getSettings(this.getChildTableType());\n },\n getRowChildTable: function (childOpts) {\n\n let fixedColumnsLeft = 1, fixedColumnsRight = 0;\n if (this.options.view === PJQ.constants.timecards.view.BY_PROJECT_CONTACT) {\n fixedColumnsLeft = 1;\n fixedColumnsRight = 1;\n }\n\n childOpts.view = this.getChildTableType();\n childOpts.settings = this.getChildTableSettings();\n childOpts.userSettings = this.options.timecardsView.userSettings;\n childOpts.colReorder = {\n fixedColumnsLeft: fixedColumnsLeft,\n fixedColumnsRight: fixedColumnsRight,\n realtime: false\n };\n childOpts.timecardsView = this.options.timecardsView;\n childOpts.onApprove = this.options.onApprove;\n childOpts.parentDataTable = this;\n childOpts.dom = 't';\n childOpts.timeCardSettings = this.options.timeCardSettings;\n\n if (this.options.view === PJQ.constants.timecards.view.BY_CONTACT)\n return new PJQ.views.timecards.ProjectDataTable(childOpts);\n if (this.options.view === PJQ.constants.timecards.view.BY_PROJECT_CONTACT)\n return new PJQ.views.timecards.TimeCardDataTable(childOpts);\n },\n getRowChildData: function (row) {\n let viewOptions = {\n view: this.getChildTableType(),\n idFilter: row.data().get('id'),\n };\n\n if (this.options.view === PJQ.constants.timecards.view.BY_CONTACT)\n return new PJQ.collections.timecards.TimeCardProjects(null, viewOptions);\n if (this.options.view === PJQ.constants.timecards.view.BY_PROJECT_CONTACT) {\n viewOptions.projectId = this.options.parentId;\n return new PJQ.collections.timecards.TimeCards(null, viewOptions);\n }\n },\n approveTimeCardsClicked: async function (e, row) {\n return await this.approveTimeCards(e);\n },\n approveTimeCards: async function (e, row) {\n if (typeof this.options.onApprove !== 'function') {\n return;\n }\n\n let $target = null;\n if (e != null) {\n $target = $(e.currentTarget);\n row = this.getRow($target.closest('tr'));\n }\n\n let contact = row.data();\n if (contact.timeCards == null) {\n let loader = null;\n if ($target != null) {\n loader = new PJQ.Loader($target);\n }\n\n contact.timeCards = await this.fetchTimeCards({\n projectId: this.options.parentId,\n idFilter: contact.get('id')\n })\n\n if (loader != null) {\n loader.remove();\n }\n }\n\n if (_.size(contact.timeCards.models.filter((c) => {\n return c.get('approvedOn') == null;\n })) === 0) {\n PJQ.notifications.notify.warningNotify({\n message: 'This contact has no time cards to approve for the selected dates'\n });\n return;\n }\n\n new PJQ.views.modals.YesNo({\n header: \"Approve Time Cards\",\n body: \"Are you sure you want to approve this contact's time cards for \" + (contact.timeCards.options.projectId > 0 ? 'the selected project' : 'all projects') + \"?\",\n onYes: () => {\n this.options.onApprove(contact.timeCards.models, true, () => {\n row.invalidate().draw();\n });\n }\n });\n }\n});\n\nPJQ.views.timecards.TimeCardDataTable = PJQ.views.timecards.BaseDataTable.extend({\n events: {\n 'click i.timecard-toggle-row': 'childRowToggle',\n 'click .view-time-card': 'viewTimeCardClicked',\n 'click .delete-time-card': 'deleteTimeCardClicked',\n 'click .approve-time-card': 'approveTimeCardClicked',\n 'click .unapprove-time-card': 'approveTimeCardClicked',\n 'click .select-all-timecards': 'selectAll',\n 'click .select-timecard': 'selectTimeCard'\n },\n onRowDoubleClick: function (row) {\n this.viewTimeCard(row);\n },\n getContextMenuItems: function () {\n return [\n {\n name: 'Approve Time Card',\n iconClass: 'fal fa-calendar-check',\n onClick: _.bind(function (row) {\n this.approveTimeCard(row);\n }, this),\n isShown: _.bind(function (row) {\n return ((PJQ.app.session.contact == null && (this.options.permissions.hasPermission('timeCards.canApprove') || this.options.permissions.hasPermission('timeCards.isAdmin'))) && !row.data().get('approvedOn'));\n }, this)\n },\n {\n name: 'Un-Approve Time Card',\n iconClass: 'fal fa-calendar-times',\n onClick: _.bind(function (row) {\n this.approveTimeCard(row);\n }, this),\n isShown: _.bind(function (row) {\n return ((PJQ.app.session.contact == null && (this.options.permissions.hasPermission('timeCards.canApprove') || this.options.permissions.hasPermission('timeCards.isAdmin'))) && _.size(row.data().get('approvedOn')) > 0);\n }, this)\n },\n {\n name: 'View Time Card',\n iconClass: 'fal fa-arrow-alt-from-left',\n onClick: _.bind(function (row) {\n this.viewTimeCard(row);\n }, this),\n isShown: _.bind(function (row) {\n return true;\n }, this)\n },\n {\n name: 'Delete Time Card',\n iconClass: 'fal fa-trash',\n onClick: _.bind(function (row) {\n this.deleteTimeCard(row);\n }, this),\n isShown: _.bind(function (row) {\n return (!row.data().get('approvedOn') && (this.options.permissions.hasPermission('timeCards.isAdmin')));\n }, this)\n }\n ];\n },\n getColumns: function (includeAllColumns = false) {\n let columns = [], includeColumns = [];\n\n if (this.options.settings.view === PJQ.constants.timecards.view.BY_TIMECARD || this.options.settings.view === PJQ.constants.timecards.view.PROJECTWALL_BY_TIMECARD)\n includeColumns = ['projectId', 'projectName', 'projectAddress1', 'projectAddress2', 'projectCity', 'projectState', 'projectZip', 'projectCountry', 'projectBidsDue', 'projectStartDate', 'projectEndDate', 'companyName', 'contactName', 'contactAddress1', 'contactAddress2', 'contactCity', 'contactState', 'contactZip', 'contactCountry', 'contactPhone', 'contactCell', 'contactFax', 'contactEmail', 'contactUserTypeId'];\n\n includeColumns.push(...['date', 'notes', 'regularHours', 'overtimeHours', 'doubletimeHours', 'approvedOn']);\n\n if (!includeAllColumns) {\n if (_.size(this.options.settings.columns) > 0)\n includeColumns = this.options.settings.columns;\n else\n includeColumns = this.options.settings.columnsDefault;\n\n if (this.options.timecardsView && (this.options.timecardsView.selectionMode !== PJQ.constants.timecards.selectionMode.NONE)) {\n columns.push({\n \"columnData\": '',\n \"title\": '
',\n \"width\": \"20px\",\n \"data\": \"null\",\n \"orderable\": false,\n \"searchable\": false,\n \"render\": _.bind(this.renderTimeCardSelect, this)\n });\n }\n\n columns.push({\n \"columnData\": 'icons',\n \"title\": \"\",\n \"width\": \"20px\",\n \"data\": \"null\",\n \"orderable\": false,\n \"searchable\": false,\n \"render\": _.bind(function (data, type, row) {\n let icons = [];\n\n if (row.get('approvedOn')) {\n icons.push(\"\");\n }\n\n return '
' + icons.join('') + '
';\n }, this)\n });\n\n }\n let maxEmailWidth = $(window).width() > 1200 ? 225 : 100;\n\n _.each(includeColumns, _.bind(function (columnName) {\n switch (columnName) {\n case 'projectId':\n columns.push({\n \"columnData\": \"projectId\",\n \"data\": \"attributes.project.projectId\",\n \"title\": \"Project Id\"\n });\n break;\n case 'projectName':\n columns.push({\n \"columnData\": \"projectName\",\n \"data\": \"attributes.project.projectName\",\n \"title\": \"Project\"\n });\n break;\n case 'projectAddress1':\n columns.push({\n \"columnData\": \"projectAddress1\",\n \"data\": \"attributes.project.address1\",\n \"title\": (includeAllColumns ? 'Project ' : '') + \"Address 1\"\n });\n break;\n case 'projectAddress2':\n columns.push({\n \"columnData\": \"projectAddress2\",\n \"data\": \"attributes.project.address2\",\n \"title\": (includeAllColumns ? 'Project ' : '') + \"Address 2\"\n });\n break;\n case 'projectCity':\n columns.push({\n \"columnData\": \"projectCity\",\n \"data\": \"attributes.project.city\",\n \"title\": (includeAllColumns ? 'Project ' : '') + \"City\"\n });\n break;\n case 'projectState':\n columns.push({\n \"columnData\": \"projectState\",\n \"data\": \"attributes.project.state\",\n \"title\": (includeAllColumns ? 'Project ' : '') + \"State\"\n });\n break;\n case 'projectZip':\n columns.push({\n \"columnData\": \"projectZip\",\n \"data\": \"attributes.project.zip\",\n \"title\": (includeAllColumns ? 'Project ' : '') + \"Zip\"\n });\n break;\n case 'projectCountry':\n columns.push({\n \"columnData\": \"projectCountry\",\n \"data\": \"attributes.project.country\",\n \"title\": (includeAllColumns ? 'Project ' : '') + \"Country\"\n });\n break;\n case 'projectBidsDue':\n columns.push({\n \"columnData\": \"projectBidsDue\",\n \"data\": \"attributes.project.bidsDue\",\n \"title\": 'Bids Due',\n \"width\": '90px',\n \"orderable\": true,\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.dateHelpers.getDateString(new Date(row.get('project').bidsDue), PJQ.helpers.dateHelpers.dateFormats.DATE_TIME);\n }, this)\n });\n break;\n case 'projectStartDate':\n columns.push({\n \"columnData\": \"projectStartDate\",\n \"data\": \"attributes.project.startDate\",\n \"title\": 'Start Date',\n \"width\": '90px',\n \"orderable\": true,\n \"render\": _.bind(function (data, type, row) {\n return (row.get('project').projectId > 0) ? PJQ.helpers.dateHelpers.getDateString(new Date(row.get('project').startDate), PJQ.helpers.dateHelpers.dateFormats.DATE) : 'N/A';\n }, this)\n });\n break;\n case 'projectEndDate':\n columns.push({\n \"columnData\": \"projectEndDate\",\n \"data\": \"attributes.project.endDate\",\n \"title\": 'End Date',\n \"width\": '90px',\n \"orderable\": true,\n \"render\": _.bind(function (data, type, row) {\n return (row.get('project').projectId > 0) ? PJQ.helpers.dateHelpers.getDateString(new Date(row.get('project').endDate), PJQ.helpers.dateHelpers.dateFormats.DATE) : 'N/A';\n }, this)\n });\n break;\n case 'companyName':\n columns.push({\n \"columnData\": \"companyName\",\n \"data\": \"attributes.contact.companyName\",\n \"title\": \"Company\"\n });\n break;\n case 'contactName':\n columns.push({\n \"columnData\": \"contactName\",\n \"data\": \"attributes.contact.contactName\",\n \"title\": \"Contact\"\n });\n break;\n case 'contactAddress1':\n columns.push({\n \"columnData\": \"contactAddress1\",\n \"data\": \"attributes.contact.address1\",\n \"title\": \"Address 1\"\n });\n break;\n case 'contactAddress2':\n columns.push({\n \"columnData\": \"contactAddress2\",\n \"data\": \"attributes.contact.address2\",\n \"title\": \"Address 2\"\n });\n break;\n case 'contactCity':\n columns.push({\n \"columnData\": \"contactCity\",\n \"data\": \"attributes.contact.city\",\n \"title\": \"City\"\n });\n break;\n case 'contactState':\n columns.push({\n \"columnData\": \"contactState\",\n \"data\": \"attributes.contact.state\",\n \"title\": \"State\"\n });\n break;\n case 'contactZip':\n columns.push({\n \"columnData\": \"contactZip\",\n \"data\": \"attributes.contact.zip\",\n \"title\": \"Zip\"\n });\n break;\n case 'contactCountry':\n columns.push({\n \"columnData\": \"contactCountry\",\n \"data\": \"attributes.contact.country\",\n \"title\": \"Country\"\n });\n break;\n case 'contactPhone':\n columns.push({\n \"columnData\": \"contactPhone\",\n \"data\": \"attributes.contact.phone\",\n \"title\": \"Phone\",\n \"width\": this.options.phoneWidth,\n \"render\": _.bind(function (data, type, row) {\n let html = '
',\n phoneFormatted = (row.get('contact').phone ? PJQ.helpers.formatHelpers.formatPhoneNumber(row.get('contact').phone) : 'N/A');\n\n if (row.get('contact').phone !== '')\n html += '';\n\n html += '
' + phoneFormatted + '
';\n html += '
';\n return html;\n }, this)\n });\n break;\n case 'contactCell':\n columns.push({\n \"columnData\": \"contactCell\",\n \"data\": \"attributes.contact.cell\",\n \"title\": \"Cell\",\n \"width\": this.options.phoneWidth,\n \"render\": _.bind(function (data, type, row) {\n let html = '
',\n phoneFormatted = (row.get('contact').cell ? PJQ.helpers.formatHelpers.formatPhoneNumber(row.get('contact').cell) : 'N/A');\n\n if (row.get('contact').cell !== '')\n html += '';\n\n html += '
' + phoneFormatted + '
';\n html += '
';\n return html;\n }, this)\n });\n break;\n case 'contactFax':\n columns.push({\n \"columnData\": \"contactFax\",\n \"data\": \"attributes.contact.fax\",\n \"title\": \"Fax\",\n \"width\": this.options.phoneWidth,\n \"render\": _.bind(function (data, type, row) {\n let html = '
',\n phoneFormatted = (row.get('contact').fax ? PJQ.helpers.formatHelpers.formatPhoneNumber(row.get('contact').fax) : 'N/A');\n\n if (row.get('contact').fax !== '')\n html += '';\n\n html += '
' + phoneFormatted + '
';\n html += '
';\n return html;\n }, this)\n });\n break;\n case 'contactEmail':\n columns.push({\n \"columnData\": \"contactEmail\",\n \"data\": \"attributes.contact.email\",\n \"title\": \"Email\",\n \"render\": function (data, type, row) {\n let html = '
',\n emailFormatted = (row.get('contact').email ? ('' + row.get('contact').email + '') : '');\n\n if (row.get('contact').email !== '')\n html += '';\n\n html += '
' + emailFormatted + '
';\n return html;\n }\n });\n break;\n case 'contactUserTypeId':\n columns.push({\n \"columnData\": 'contactUserTypeId',\n \"title\": 'Type',\n \"data\": 'userTypeId',\n \"orderable\": false,\n \"render\": function (data, type, row) {\n let userType = _.filter(PJQ.app.session.userTypes.getByIsCompany(null), _.bind(function (userType) {\n return row.get('contact').userTypeId === userType.get('userTypeId');\n }, this))[0];\n\n return userType != null ? userType.get('name') : 'N/A';\n }\n });\n break;\n case 'date':\n columns.push({\n \"columnData\": \"date\",\n \"data\": \"attributes.date\",\n \"title\": \"Date\",\n \"orderable\": false,\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.dateHelpers.getDateString(new Date(row.get('date')), PJQ.helpers.dateHelpers.dateFormats.DATE, true);\n }, this)\n });\n break;\n case 'notes':\n columns.push({\n \"columnData\": \"notes\",\n \"data\": \"attributes.notes\",\n \"orderable\": false,\n \"title\": \"Notes\",\n \"width\": \"200px\"\n });\n break;\n case 'regularHours':\n columns.push({\n \"columnData\": \"regularHours\",\n \"data\": \"attributes.regularHours\",\n \"title\": 'Reg. Hours',\n \"width\": '50px',\n \"orderable\": true,\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.timecards.getFormattedTime(row.get('regularHours'));\n }, this)\n });\n break;\n case 'overtimeHours':\n columns.push({\n \"columnData\": \"overtimeHours\",\n \"data\": \"attributes.overtimeHours\",\n \"title\": 'OT Hours',\n \"width\": '50px',\n \"orderable\": true,\n \"visible\": this.options.timeCardSettings.get('enableOvertime'),\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.timecards.getFormattedTime(row.get('overtimeHours'));\n }, this)\n });\n break;\n case 'doubletimeHours':\n columns.push({\n \"columnData\": \"doubletimeHours\",\n \"data\": \"attributes.doubletimeHours\",\n \"title\": 'DT Hours',\n \"width\": '50px',\n \"orderable\": true,\n \"visible\": this.options.timeCardSettings.get('enableDoubletime'),\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.timecards.getFormattedTime(row.get('doubletimeHours'));\n }, this)\n });\n break;\n case 'approvedOn':\n columns.push({\n \"columnData\": \"approvedOn\",\n \"data\": \"attributes.approvedOn\",\n \"title\": \"Approved On\",\n \"orderable\": false,\n \"render\": _.bind(function (data, type, row) {\n return row.get('approvedOn') ? PJQ.helpers.dateHelpers.getDateString(new Date(row.get('approvedOn')), PJQ.helpers.dateHelpers.dateFormats.DATE_TIME, false) : '';\n }, this)\n });\n break;\n }\n }, this));\n\n if (!includeAllColumns) {\n columns.push({\n \"title\": '',\n \"render\": _.bind(function (data, type, row) {\n let html = '';\n html += '
';\n\n if (PJQ.app.session.contact == null && (this.options.permissions.hasPermission('timeCards.canApprove') || this.options.permissions.hasPermission('timeCards.isAdmin')))\n html += row.get('approvedOn') ? '' : '';\n\n html += '';\n\n if (!row.get('approvedOn') && (this.options.permissions.hasPermission('timeCards.isAdmin')))\n html += '';\n\n html += '
';\n return html;\n }, this),\n \"orderable\": false,\n \"searchable\": false,\n \"width\": \"120px\",\n \"className\": \"text-center\"\n });\n }\n\n return columns;\n },\n selectAll: function (e) {\n let isChecked = $(e.currentTarget).prop('checked');\n\n if (this.options.view === PJQ.constants.timecards.view.BY_TIMECARD) {\n if (isChecked) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'timecards'\n },\n {\n endpoint: 'ids'\n }\n ], [\n {\n parameter: 'searchFor',\n value: this.options.timecardsView.$('.input-search').val()\n },\n {\n parameter: 'startDate',\n value: PJQ.helpers.dateHelpers.getDateString(this.options.timecardsView.startDate, PJQ.helpers.dateHelpers.dateFormats.DATE_YMD)\n },\n {\n parameter: 'endDate',\n value: PJQ.helpers.dateHelpers.getDateString(this.options.timecardsView.endDate, PJQ.helpers.dateHelpers.dateFormats.DATE_YMD)\n }\n ]),\n isAPIv2: true\n }).get().done(_.bind(function (response) {\n this.options.timecardsView.addSelectedTimeCards(response.timeCardIds);\n }, this));\n } else {\n this.options.timecardsView.selectedTimeCards = [];\n }\n } else {\n let timeCardIds = [];\n this.dataTable.rows().data().each(_.bind(function (data) {\n timeCardIds.push(data.get('timeCardId'));\n }));\n\n if (isChecked)\n this.options.timecardsView.addSelectedTimeCards(timeCardIds);\n else\n this.options.timecardsView.removeSelectedTimeCards(timeCardIds);\n }\n\n this.dataTable.rows().invalidate().draw(false);\n },\n selectTimeCard: function (e) {\n let isChecked = $(e.currentTarget).prop('checked'), row = this.getRow($(e.currentTarget).closest('tr'));\n\n if (isChecked)\n this.options.timecardsView.addSelectedTimeCards([row.data().get('timeCardId')]);\n else\n this.options.timecardsView.removeSelectedTimeCards([row.data().get('timeCardId')]);\n },\n renderTimeCardSelect: function (data, type, row) {\n let isSelected = (this.options.timecardsView.selectedTimeCards.indexOf(row.get('timeCardId')) !== -1);\n\n let html = '
' +\n '' +\n '
' +\n '
';\n\n return (html);\n },\n captureSignature: function (callback) {\n if (PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.ENABLE_TIMECARDS_SIGNATURE)) {\n new PJQ.views.signatures.SignatureSubmitModal({\n headerSubText: \"Sign off on your time card changes\",\n onSubmit: _.bind(function (signature, cb) {\n cb();\n callback(signature ? signature : \"\");\n }, this)\n });\n } else {\n callback(null);\n }\n },\n viewTimeCard: function (row) {\n let timeCard = new PJQ.models.timecards.TimeCard({timeCardId: row.data().get('timeCardId')}, {\n context: row.data().get('context')\n });\n\n timeCard.fetch({\n success: _.bind(function () {\n this.originalTimeCard = {\n regularHours: timeCard.get('regularHours'),\n overtimeHours: timeCard.get('overtimeHours'),\n doubletimeHours: timeCard.get('doubletimeHours')\n };\n\n let editModal = new PJQ.views.timecards.TimeCardDetailsModal({\n project: this.options.project,\n settings: this.options.timeCardSettings,\n permissions: PJQ.app.session.project ? PJQ.app.session.project.permissions : PJQ.app.session.systemPermissions,\n model: timeCard,\n onSave: _.bind(function () {\n let fnSave = _.bind(function (signature) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'timecards',\n },\n {\n endpoint: 'batch'\n }\n ]),\n data: {\n rows: [timeCard],\n signature: signature\n },\n isAPIv2: true\n }).post().success(_.bind(function (data) {\n row.data().set('notes', timeCard.get('notes'));\n row.data().set('regularHours', timeCard.get('regularHours'));\n row.data().set('overtimeHours', timeCard.get('overtimeHours'));\n row.data().set('doubletimeHours', timeCard.get('doubletimeHours'));\n row.data().set('approvedOn', timeCard.get('approvedOn'));\n\n row.invalidate().draw(false);\n let offsets = {\n regularHours: timeCard.get('regularHours') - this.originalTimeCard.regularHours,\n overtimeHours: timeCard.get('overtimeHours') - this.originalTimeCard.overtimeHours,\n doubletimeHours: timeCard.get('doubletimeHours') - this.originalTimeCard.doubletimeHours\n };\n this.updateParentRows(offsets, row);\n\n PJQ.notifications.notify.successNotify({\n message: 'Time Card saved successfully'\n });\n\n if(typeof this.options.onChange === 'function'){\n this.options.onChange(timeCard);\n }\n }, this));\n }, this);\n\n if (timeCard.get('id') === -PJQ.app.session.user.id) {\n this.captureSignature(_.bind(function (signature) {\n fnSave(signature);\n editModal.removeModal();\n }, this));\n } else {\n fnSave();\n editModal.removeModal();\n }\n return false;\n }, this),\n onDelete: _.bind(function () {\n this.deleteTimeCard(row, true);\n\n if(typeof this.options.onChange === 'function'){\n this.options.onChange(timeCard);\n }\n }, this)\n });\n }, this),\n });\n },\n viewTimeCardClicked: function (e) {\n let row = this.getRow($(e.currentTarget).closest('tr'));\n this.viewTimeCard(row);\n },\n updateParentRows: function (offsets, row) {\n if (this.options.view === PJQ.constants.timecards.view.BY_CONTACT_PROJECT_TIMECARD ||\n this.options.view === PJQ.constants.timecards.view.BY_PROJECT_CONTACT_TIMECARD) {\n let parentTR = this.options.parentDataTable ? $(row.node()).parent().closest('tr').prev() : null,\n parentRow = this.options.parentDataTable ? this.options.parentDataTable.getRow(parentTR) : null;\n\n if (parentRow !== null) {\n parentRow.data().set('regularHours', parentRow.data().get('regularHours') + offsets.regularHours);\n parentRow.data().set('overtimeHours', parentRow.data().get('overtimeHours') + offsets.overtimeHours);\n parentRow.data().set('doubletimeHours', parentRow.data().get('doubletimeHours') + offsets.doubletimeHours);\n parentRow.invalidate().draw(false);\n\n let grandParentTR = $(parentRow.node()).parent().closest('tr').prev(),\n grandParentRow = this.options.parentDataTable.options.parentDataTable.getRow(grandParentTR);\n grandParentRow.data().set('regularHours', grandParentRow.data().get('regularHours') + offsets.regularHours);\n grandParentRow.data().set('overtimeHours', grandParentRow.data().get('overtimeHours') + offsets.overtimeHours);\n grandParentRow.data().set('doubletimeHours', grandParentRow.data().get('doubletimeHours') + offsets.doubletimeHours);\n grandParentTR.find('.regularHours').text(PJQ.helpers.timecards.getFormattedTime(grandParentRow.data().get('regularHours')));\n grandParentTR.find('.overtimeHours').text(PJQ.helpers.timecards.getFormattedTime(grandParentRow.data().get('overtimeHours')));\n grandParentTR.find('.doubletimeHours').text(PJQ.helpers.timecards.getFormattedTime(grandParentRow.data().get('doubletimeHours')));\n }\n }\n },\n deleteTimeCard: function (row, force) {\n let fn = _.bind(function () {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'timecards',\n value: row.data().get('timeCardId')\n }\n ]),\n isAPIv2: true\n }).delete().done(_.bind(function (response) {\n let timeCard = row.data(),\n offsets = {\n regularHours: -timeCard.get('regularHours'),\n overtimeHours: -timeCard.get('overtimeHours'),\n doubletimeHours: -timeCard.get('doubletimeHours'),\n };\n this.updateParentRows(offsets, row);\n row.remove().draw();\n\n if(typeof this.options.onChange === 'function'){\n this.options.onChange(timeCard);\n }\n }, this));\n }, this);\n\n if (force)\n fn();\n else {\n new PJQ.views.modals.DeleteCancel({\n header: \"Delete Time Card\",\n body: \"Do you want to delete this Time Card?\",\n onDelete: _.bind(function () {\n fn();\n }, this)\n });\n }\n },\n deleteTimeCardClicked: function (e) {\n let row = this.getRow($(e.currentTarget).closest('tr'));\n this.deleteTimeCard(row);\n },\n approveTimeCardClicked: function (e) {\n let row = this.getRow($(e.currentTarget).closest('tr'));\n this.approveTimeCard(row);\n },\n approveTimeCard: function (row) {\n let timeCard = row.data(),\n approve = timeCard.get('approvedOn') == null,\n action = (approve ? 'Approve' : 'Un-Approve');\n if (typeof this.options.onApprove === 'function') {\n new PJQ.views.modals.YesNo({\n header: action + \" Time Card\",\n body: \"Are you sure you want to \" + action.toLowerCase() + \" this time card?\",\n onYes: _.bind(function () {\n this.options.onApprove(row.data(), approve, () => {\n row.invalidate().draw();\n });\n }, this)\n });\n }\n }\n});\n\n// Data Entry Datatables\nPJQ.views.timecards.TimeCardDataEntryTable = PJQ.views.timecards.BaseDataTable.extend({\n defaults: {\n isHideSearch: true,\n order: [],\n dom: 't',\n pageLength: 5,\n language: {\n zeroRecords: \"No Time Cards to edit\"\n },\n drawCallback: _.bind(function (settings) {\n PJQ.helpers.inputHelpers.inputMaskDecimal(this.$('.input-regular-hours'), 2);\n PJQ.helpers.inputHelpers.inputMaskDecimal(this.$('.input-overtime-hours'), 2);\n PJQ.helpers.inputHelpers.inputMaskDecimal(this.$('.input-doubletime-hours'), 2);\n }, this),\n },\n events: {\n 'click i.timecard-dataentry-toggle-row': 'childRowToggle',\n 'change .input-notes': 'valueChanged',\n 'change .input-regular-hours': 'valueChanged',\n 'change .input-overtime-hours': 'valueChanged',\n 'change .input-doubletime-hours': 'valueChanged',\n 'click .delete-time-card': 'deleteTimeCard'\n },\n getColumns: function (includeAllColumns = false) {\n let columns = [];\n\n if (this.options.groupByColumn === PJQ.constants.timecards.timeCardGroupBy.DATE) {\n columns.push({\n \"data\": \"attributes.contact.companyName\",\n \"title\": \"Company\",\n \"orderable\": false\n });\n\n columns.push({\n \"data\": \"attributes.contact.contactName\",\n \"title\": \"Contact\",\n \"orderable\": false\n });\n }\n\n if (this.options.groupByColumn === PJQ.constants.timecards.timeCardGroupBy.CONTACT) {\n columns.push({\n \"data\": \"attributes.date\",\n \"title\": \"Date\",\n \"orderable\": false,\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.dateHelpers.getDateString(row.get('date'), PJQ.helpers.dateHelpers.dateFormats.DATE_YMD, false);\n }, this)\n },\n );\n\n }\n\n columns.push({\n \"title\": \"Notes\",\n \"orderable\": false,\n \"width\": '200px',\n \"render\": _.bind(function (data, type, row) {\n if (!row.get('approvedOn')) {\n return '';\n } else {\n return row.get('notes');\n }\n }, this)\n });\n\n columns.push({\n \"title\": \"Reg.\",\n \"width\": '50px',\n \"orderable\": false,\n \"render\": _.bind(function (data, type, row) {\n let value = PJQ.helpers.formatHelpers.formatCurrency(row.get('regularHours'), 2, false);\n if (!row.get('approvedOn')) {\n return '';\n } else {\n return value;\n }\n }, this)\n });\n columns.push({\n \"title\": \"OT\",\n \"width\": '50px',\n \"orderable\": false,\n \"render\": _.bind(function (data, type, row) {\n let value = PJQ.helpers.formatHelpers.formatCurrency(row.get('overtimeHours'), 2, false);\n if (!row.get('approvedOn')) {\n return '';\n } else {\n return value;\n }\n }, this)\n });\n columns.push({\n \"title\": \"DT\",\n \"width\": '50px',\n \"orderable\": false,\n \"render\": _.bind(function (data, type, row) {\n let value = PJQ.helpers.formatHelpers.formatCurrency(row.get('doubletimeHours'), 2, false);\n if (!row.get('approvedOn')) {\n return '';\n } else {\n return value;\n }\n }, this)\n });\n\n columns.push({\n \"title\": '',\n \"render\": _.bind(function (data, type, row) {\n let html = '';\n html += '
';\n\n if (!row.get('approvedOn') &&\n ((PJQ.app.session.contact == null && (this.options.permissions.hasPermission('timeCards.canAdd') || this.options.permissions.hasPermission('timeCards.isAdmin'))) ||\n (PJQ.app.session.contact && this.options.permissions.hasPermission('timeCards.canAdd')))\n ) {\n if (!PJQ.app.session.contact || !row.get('timeCardId'))\n html += '';\n }\n html += '
';\n return html;\n }, this),\n \"orderable\": false,\n \"searchable\": false,\n \"width\": \"80px\",\n \"className\": \"text-center\"\n });\n\n if (!includeAllColumns) {\n\n }\n\n return columns;\n },\n valueChanged: function (e) {\n let row = this.getRow($(e.currentTarget).closest('tr')[0]),\n fieldName = $(e.currentTarget).data('field'),\n value = ($(e.currentTarget).hasClass('input-notes')) ? $(e.currentTarget).val() : parseInt(parseFloat($(e.currentTarget).val()) * 100);\n\n row.data().set(fieldName, value);\n\n if (fieldName !== 'notes')\n $(e.currentTarget).val(PJQ.helpers.formatHelpers.formatCurrency(row.data().get(fieldName), 2, false));\n },\n deleteTimeCard: function (e) {\n let row = this.getRow($(e.currentTarget).closest('tr')[0]);\n new PJQ.views.modals.DeleteCancel({\n header: \"Delete Time Card\",\n body: \"Do you want to delete this Time Card?\" + (this.options.timecardsModal.options.timeCard == null && !row.data().isNew() ? '

Note: You will need to click Save after finishing all editing in order to save your changes.' : ''),\n onDelete: _.bind(function () {\n\n if (this.options.timecardsModal.options.timeCard === null) {\n if (row.data().isNew()) {\n this.options.timecardsModal.model.remove([row.data()]);\n row.remove().draw();\n } else {\n row.data().set('deletedOn', new Date());\n row.remove().draw();\n }\n } else {\n row.data().set('deletedOn', new Date());\n this.options.timecardsModal.saveTimeCards(null, true);\n }\n }, this)\n });\n }\n});","PJQ.views.timecards.TimeCardDetailsModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.TIMECARDS, 'modal-manage-timecard'),\n subTemplates: {\n lineItems: new PJQ.templating.Template(PJQ.constants.modules.TIMECARDS, 'timecard-line-items')\n },\n minWidth: '800px',\n onSave: _.noop(),\n model: null,\n canApprove: false,\n canDelete: false\n },\n events: {\n 'click .timecard-save': 'saveClicked',\n 'click .timecard-delete': 'deleteClicked',\n 'click .timecard-approve': 'approveClicked',\n 'keyup .overtime-hours, .regular-hours, .doubletime-hours': 'hoursChanged',\n 'click .btn-view-locations': 'viewTimecardLocations',\n 'click .btn-manage-production-quantities': 'manageProductionQuantities'\n },\n beforeModalCreated: function () {\n if (this.model != null && (this.options.project == null || this.options.project.id !== this.model.get('project').id)) {\n this.options.project = new PJQ.models.projects.Project(this.model.get('project'));\n }\n\n let fnFetch = _.bind(function () {\n this.isFetched = true;\n this.render();\n }, this)\n\n if(this.options.project.id <= 0) {\n this.options.permissions = PJQ.app.session.systemPermissions;\n fnFetch();\n } else if (!this.options.project.isFetched) {\n this.options.project.fetch({\n success: _.bind(function () {\n this.options.permissions = this.options.project.permissions\n fnFetch();\n }, this)\n })\n } else {\n this.options.permissions = this.options.project.permissions;\n fnFetch();\n }\n },\n beforeRender: function () {\n if (this.isFetched) {\n this.options.canApprove = this.options.permissions.hasPermission('timeCards.canApprove') || this.options.permissions.hasPermission('timeCards.isAdmin');\n this.options.canDelete = this.model.get('approvedOn') == null && this.options.permissions.hasPermission('timeCards.isAdmin');\n this.options.canEdit = this.model.get('approvedOn') == null && this.options.permissions.hasPermission('timeCards.canAdd');\n this.options.canViewQuantities = this.options.permissions.hasPermission('productionQuantities.canView');\n this.options.enableOvertime = this.options.settings.get('enableOvertime');\n this.options.enableDoubletime = this.options.settings.get('enableDoubletime');\n this.options.enableLineItems = this.options.settings.get('enableLineItems');\n this.options.enableClockIn = this.options.settings.get('enableClockIn');\n }\n },\n renderData: function () {\n return {\n model: this.model,\n project: this.options.project,\n settings: this.options.settings,\n canEdit: this.options.canEdit,\n canApprove: this.options.canApprove,\n canDelete: this.options.canDelete,\n canViewQuantities: this.options.canViewQuantities,\n enableOvertime: this.options.enableOvertime,\n enableDoubletime: this.options.enableDoubletime,\n enableLineItems: this.options.enableLineItems,\n enableClockIn: this.options.enableClockIn,\n canViewLocationMap: (this.model.get('latitudeIn') && this.model.get('longitudeIn')) || (this.model.get('latitudeOut') && this.model.get('longitudeOut'))\n };\n },\n afterRender: function () {\n if (!this.isFetched)\n return;\n\n new PJQ.Binder(this.$el, this.model, {\n watchElements: [\n 'textarea'\n ]\n });\n\n if (this.options.enableLineItems) {\n this.renderLineItems();\n } else {\n this.$('.regular-hours').focus().select();\n }\n this.renderInputs();\n this.renderTotals();\n },\n renderLineItems: function () {\n new PJQ.views.timecards.LineItemsView({\n el: this.$('.line-items-outer'),\n model: this.model,\n project: this.options.project,\n settings: this.options.settings,\n onLineItemChanged: () => {\n this.renderTotals();\n }\n });\n },\n renderInputs: function () {\n this.$('.regular-hours').val(PJQ.helpers.formatHelpers.minutesToHHMM(this.model.get('regularHours')));\n this.$('.overtime-hours').val(PJQ.helpers.formatHelpers.minutesToHHMM(this.model.get('overtimeHours')));\n this.$('.doubletime-hours').val(PJQ.helpers.formatHelpers.minutesToHHMM(this.model.get('doubletimeHours')));\n PJQ.helpers.inputHelpers.inputMaskHours(this.$('.input-hours'));\n\n if(this.options.enableClockIn) {\n new PJQ.inputs.Datepicker({\n el: this.$('.time-in'),\n isTimeOnly: true,\n datepickerOptions: {\n format: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE_TIME,\n defaultDate: this.model.get('timeIn')\n },\n onChange: (value) => {\n this.model.set('timeIn', value);\n this.renderTotals();\n }\n });\n\n new PJQ.inputs.Datepicker({\n el: this.$('.time-out'),\n isTimeOnly: true,\n datepickerOptions: {\n format: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE_TIME,\n defaultDate: this.model.get('timeOut')\n },\n onChange: (value) => {\n this.model.set('timeOut', value);\n this.renderTotals();\n }\n });\n }\n },\n renderTotals: function () {\n if(!this.options.enableClockIn) {\n this.$('.total-regular-hours').text(PJQ.helpers.formatHelpers.minutesToHHMM(this.model.get('regularHours')));\n } else {\n let minutes = 0;\n if(this.options.enableLineItems){\n _.each(this.model.lineItems.models, function(lineItem){\n if(lineItem.get('timeIn') != null && lineItem.get('timeOut') != null) {\n minutes += PJQ.helpers.dateHelpers.getDateMinutesDiff(new Date(lineItem.get('timeOut')), new Date(lineItem.get('timeIn')));\n }\n });\n }\n else if(this.model.get('timeIn') != null && this.model.get('timeOut') != null){\n minutes = PJQ.helpers.dateHelpers.getDateMinutesDiff(new Date(this.model.get('timeOut')), new Date(this.model.get('timeIn')));\n }\n this.$('.total-regular-hours').text(minutes > 0 ? PJQ.helpers.formatHelpers.minutesToHHMM(minutes) : '00:00');\n }\n\n this.$('.total-overtime-hours').text(PJQ.helpers.formatHelpers.minutesToHHMM(this.model.get('overtimeHours')));\n this.$('.total-doubletime-hours').text(PJQ.helpers.formatHelpers.minutesToHHMM(this.model.get('doubletimeHours')));\n },\n hoursChanged: function (e) {\n let $target = $(e.currentTarget),\n type = $target.data('type'),\n minutes = PJQ.helpers.formatHelpers.minutesFromHHMM($target.val());\n\n this.model.set(type, minutes);\n this.renderTotals();\n },\n saveClicked: function () {\n this.model.set('lineItems', this.model.lineItems.toJSON());\n\n if (typeof this.options.onSave === 'function') {\n if (this.options.onSave() !== false) {\n this.removeModal();\n }\n } else {\n this.removeModal();\n }\n },\n approveClicked: function () {\n let isApproved = this.model.get('approvedOn') != null;\n new PJQ.views.modals.YesNo({\n header: \"Confirm \" + (isApproved ? 'Un-Approval' : 'Approval'),\n body: \"Are you sure you want to \" + (isApproved ? 'un-approve' : 'approve') + \" this Time Card?\",\n onYes: _.bind(function () {\n if (this.model.get('approvedOn')) {\n this.model.set('approvedOn', null);\n this.$('.timecard-approve').text('Approve');\n this.render();\n } else {\n this.model.set('approvedOn', new Date());\n this.saveClicked();\n }\n }, this)\n });\n },\n deleteClicked: function () {\n new PJQ.views.modals.YesNo({\n header: \"Confirm Deletion\",\n body: \"Are you sure you want to delete this Time Card?\",\n onYes: _.bind(function () {\n if (typeof this.options.onDelete === 'function') {\n this.options.onDelete();\n }\n\n this.removeModal();\n }, this)\n });\n },\n viewTimecardLocations: function () {\n new PJQ.views.timecards.TimeCardLocationMapModal({\n model: this.model\n });\n },\n manageProductionQuantities: function() {\n new PJQ.views.productionQuantities.InstalledQuantitiesAddModal({\n project: this.options.project,\n timeCardId: this.model.id,\n collection: this.model.installedQuantities,\n onSave: (quantities) => {\n this.model.installedQuantities.remove(\n this.model.installedQuantities.filter((model) => model.isNew() || model.get('delete'))\n );\n\n this.model.installedQuantities.add(quantities);\n }\n });\n }\n});","PJQ.inputs.timecards = {}\nPJQ.inputs.timecards.TimeCardEditor = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.TIMECARDS, 'timecard-editor-input'),\n isReadOnly: false,\n onChange: _.noop(),\n onNextField: _.noop(),\n model: null\n },\n events: {\n 'click button.edit': 'showDetails'\n },\n beforeFirstRender: function () {\n this.model = this.options.model;\n\n if (this.model.get('approvedOn') || !(PJQ.app.session.hasPermission('timeCards.canAdd') || (PJQ.app.session.project && PJQ.app.session.project.hasPermission('timeCards.canAdd'))))\n this.options.isReadOnly = true;\n\n },\n renderData: function () {\n return {\n model: this.model,\n isReadOnly: this.options.isReadOnly\n };\n },\n afterRender: function () {\n\n this.$('input.hours').inputmask('99', {\n placeholder: '',\n positionCaretOnClick: 'select'\n }).off(\"keyup.tei\").on(\"keyup.tei\", _.bind(function (e) {\n\n if (e.which !== 9 && e.which !== 16 && _.size(this.$('input.hours').val()) == 2) {\n this.$('input.minutes').focus();\n }\n\n }, this)).off(\"change.tei\").on(\"change.tei\", _.bind(function () {\n this.valueChanged();\n }, this)).off(\"focus.tei\").on(\"focus.tei\", _.bind(function () {\n this.$('input.hours').select();\n }, this));\n\n this.$('input.minutes').inputmask('59', {\n positionCaretOnClick: 'select',\n definitions: {\n \"5\": {\n validator: \"[012345]\"\n }\n },\n placeholder: ''\n }).off(\"keyup.tei\").on(\"keyup.tei\", _.bind(function (e) {\n if (e.which !== 9 && e.which !== 16 && _.size(this.$('input.minutes').val()) == 2) {\n if (typeof this.options.onNextField === 'function') {\n this.options.onNextField(this.model);\n }\n }\n }, this)).off(\"keydown.tei\").on(\"keydown.tei\", _.bind(function (e) {\n if (e.which == 9) {\n if (typeof this.options.onNextField === 'function') {\n this.options.onNextField(this.model);\n }\n\n e.preventDefault();\n }\n }, this)).off(\"change.tei\").on(\"change.tei\", _.bind(function () {\n this.valueChanged();\n }, this)).off(\"focus.tei\").on(\"focus.tei\", _.bind(function () {\n this.$('input.minutes').select();\n }, this));\n\n let totalMinutes = this.model.getTotalTime();\n let hours = parseInt(totalMinutes / 60);\n let minutes = totalMinutes % 60;\n\n this.$('input.hours').val(hours);\n this.$('input.minutes').val(minutes);\n },\n showDetails: function () {\n new PJQ.views.timecards.TimeCardDetailsModal({\n settings: this.options.settings,\n project: this.options.project,\n model: this.model,\n onSave: _.bind(function () {\n let totalMinutes = this.model.getTotalTime();\n let hours = parseInt(totalMinutes / 60);\n let minutes = totalMinutes % 60;\n\n this.$('input.hours').val(hours);\n this.$('input.minutes').val(minutes);\n\n if (typeof this.options.onChange === 'function') {\n this.options.onChange(this.model);\n }\n }, this)\n });\n },\n valueChanged: function (e) {\n let hours = 0, minutes = 0;\n\n if (this.$('input.hours').val())\n hours = parseInt(this.$('input.hours').val());\n\n if (this.$('input.minutes').val())\n minutes = parseInt(this.$('input.minutes').val());\n\n this.model.set('regularHours', (hours * 60) + minutes);\n this.model.set('overtimeHours', 0);\n this.model.set('doubletimeHours', 0);\n\n if (typeof this.options.onChange === 'function') {\n this.options.onChange(this.model);\n }\n },\n});\n\nPJQ.inputs.timecards.TimeCardWeekEditor = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.TIMECARDS, 'timecard-week-input'),\n isReadOnly: false,\n onChange: _.noop(),\n onDelete: _.noop(),\n row: null,\n startDate: null\n },\n events: {\n 'click .delete-time-card-week': 'deleteWeek'\n },\n beforeFirstRender: function () {\n\n },\n renderData: function () {\n return {\n project: this.options.row.project,\n canDelete: _.size(_.filter(this.options.row.models, function (model) {\n return model.get('approvedOn') == null;\n })) > 0 && (PJQ.app.session.hasPermission('timeCards.isAdmin') || (PJQ.app.session.project && PJQ.app.session.project.hasPermission('timeCards.isAdmin')))\n };\n },\n afterRender: function () {\n this.editors = [];\n\n // iterate through the days, find model for that day and create the control\n for (let i = 0; i < 7; i++) {\n let date = PJQ.helpers.dateHelpers.getNewDateAddDays(this.options.startDate, i);\n\n _.each(this.options.row.models, _.bind(function (timecard) {\n if (timecard.get('date').getTime() == PJQ.helpers.dateHelpers.parseDateString(PJQ.helpers.dateHelpers.getDateString(date, PJQ.helpers.dateHelpers.dateFormats.DATE, false)).getTime()) {\n this.editors.push(new PJQ.inputs.timecards.TimeCardEditor({\n el: this.$('div.time-card-day[data-day-column=\"' + i + '\"] div.timecard-editor'),\n settings: this.options.settings,\n model: timecard,\n project: this.options.project,\n onChange: _.bind(function () {\n this.calculateWeekTotal();\n }, this),\n onNextField: _.bind(function () {\n if (i < 6) {\n this.editors[i + 1].$el.find('input.hours').focus();\n }\n }, this)\n }));\n }\n }, this));\n }\n\n this.calculateWeekTotal();\n },\n getTotalTimeForDate: function (date) {\n let totalMinutes = 0;\n _.each(this.options.row.models, _.bind(function (timecard) {\n if (!timecard.get('deletedOn') && timecard.get('date').getTime() == PJQ.helpers.dateHelpers.parseDateString(PJQ.helpers.dateHelpers.getDateString(date, PJQ.helpers.dateHelpers.dateFormats.DATE, false)).getTime())\n totalMinutes += timecard.getTotalTime();\n }, this));\n\n return totalMinutes;\n },\n calculateWeekTotal: function () {\n let totalMinutes = 0;\n _.each(this.options.row.models, _.bind(function (timecard) {\n if (!timecard.get('deletedOn'))\n totalMinutes += timecard.getTotalTime();\n }, this));\n\n this.$('.time-card-total').text(PJQ.helpers.timecards.getFormattedTime(totalMinutes));\n\n if (typeof this.options.onChange === 'function') {\n this.options.onChange();\n }\n },\n hasChanges: function () {\n for (let i = 0; i < _.size(this.options.row.models); i++) {\n let timecard = this.options.row.models[i];\n if (timecard.get('deletedOn') || (!timecard.isNew() && timecard.isDirty)\n || (timecard.isNew() && (_.size(timecard.get('notes')) > 0 || timecard.getTotalTime() > 0))) {\n return true;\n }\n }\n return false;\n },\n isWeekNewAndEmpty: function () {\n let totalMinutes = 0, totalNotes = 0;\n _.each(this.options.row.models, _.bind(function (timecard) {\n if (!timecard.get('deletedOn') && timecard.isNew()) {\n totalMinutes += timecard.getTotalTime();\n totalNotes += _.size(timecard.get('notes'));\n } else {\n // found a not new one\n totalMinutes += 1;\n }\n }, this));\n\n return (totalMinutes + totalNotes === 0);\n },\n deleteWeek: function () {\n new PJQ.views.modals.YesNo({\n header: \"Delete Time Cards\",\n body: \"Do you want delete time cards for this week for \" + this.options.row.project.projectName + \"?\",\n onYes: _.bind(function () {\n _.each(this.options.row.models, _.bind(function (timecard) {\n if (!timecard.get('approvedOn'))\n timecard.set({\n delete: true,\n deletedOn: new Date()\n });\n }, this));\n\n if (typeof this.options.onDelete === 'function') {\n this.options.onDelete();\n }\n }, this)\n });\n }\n});\n\nPJQ.helpers.timecards = {}\nPJQ.helpers.timecards.getFormattedTime = function (input) {\n let totalMinutes = input,\n hours = parseInt(totalMinutes / 60),\n minutes = totalMinutes % 60;\n\n return hours + ':' + ((minutes < 10) ? '0' : '') + minutes;\n};\n\nPJQ.inputs.timecards.TimeCardGroupEditor = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.TIMECARDS, 'timecard-group-editor-input'),\n isReadOnly: false,\n onChange: _.noop(),\n onDelete: _.noop(),\n onNextField: _.noop(),\n model: null\n },\n events: {\n 'click .delete-group': 'deleteGroup'\n },\n beforeFirstRender: function () {\n\n },\n renderData: function () {\n return {\n isReadOnly: this.options.isReadOnly,\n model: this.options.model\n };\n },\n afterRender: function () {\n this.$('input.group-regular-hours').inputmask('99', {\n placeholder: '',\n positionCaretOnClick: 'select'\n }).off(\"keyup.tei\").on(\"keyup.tei\", _.bind(function (e) {\n if (e.which !== 9 && e.which !== 16 && _.size(this.$('input.group-regular-hours').val()) == 2)\n this.$('input.group-regular-minutes').focus();\n }, this)).off(\"change.tei\").on(\"change.tei\", _.bind(function () {\n this.valueChanged();\n }, this)).off(\"focus.tei\").on(\"focus.tei\", _.bind(function () {\n this.$('input.group-regular-hours').select();\n }, this));\n\n this.$('input.group-overtime-hours').inputmask('99', {\n placeholder: '',\n positionCaretOnClick: 'select'\n }).off(\"keyup.tei\").on(\"keyup.tei\", _.bind(function (e) {\n if (e.which !== 9 && e.which !== 16 && _.size(this.$('input.group-overtime-hours').val()) == 2)\n this.$('input.group-overtime-minutes').focus();\n }, this)).off(\"change.tei\").on(\"change.tei\", _.bind(function () {\n this.valueChanged();\n }, this)).off(\"focus.tei\").on(\"focus.tei\", _.bind(function () {\n this.$('input.group-overtime-hours').select();\n }, this));\n\n this.$('input.group-doubletime-hours').inputmask('99', {\n placeholder: '',\n positionCaretOnClick: 'select'\n }).off(\"keyup.tei\").on(\"keyup.tei\", _.bind(function (e) {\n if (e.which !== 9 && e.which !== 16 && _.size(this.$('input.group-doubletime-hours').val()) == 2)\n this.$('input.group-doubletime-minutes').focus();\n }, this)).off(\"change.tei\").on(\"change.tei\", _.bind(function () {\n this.valueChanged();\n }, this)).off(\"focus.tei\").on(\"focus.tei\", _.bind(function () {\n this.$('input.group-doubletime-hours').select();\n }, this));\n\n this.$('input.group-regular-minutes, input.group-overtime-minutes, input.group-doubletime-minutes').inputmask('59', {\n definitions: {\n \"5\": {\n validator: \"[012345]\"\n }\n },\n placeholder: '',\n positionCaretOnClick: 'select'\n }).off(\"change.tei\").on(\"change.tei\", _.bind(function () {\n this.valueChanged();\n }, this)).off(\"focus.tei\").on(\"focus.tei\", function () {\n $(this).select();\n });\n\n this.$('input.group-regular-minutes').off(\"keyup.tei\").on(\"keyup.tei\", _.bind(function (e) {\n if (e.which !== 9 && e.which !== 16 && _.size(this.$('input.group-regular-minutes').val()) == 2)\n this.$('input.group-overtime-hours').focus();\n }, this));\n\n this.$('input.group-overtime-minutes').off(\"keyup.tei\").on(\"keyup.tei\", _.bind(function (e) {\n if (e.which !== 9 && e.which !== 16 && _.size(this.$('input.group-overtime-minutes').val()) == 2)\n this.$('input.group-doubletime-hours').focus();\n }, this));\n\n this.$('input.group-doubletime-minutes').off(\"keyup.tei\").on(\"keyup.tei\", _.bind(function (e) {\n if (e.which !== 9 && e.which !== 16 && _.size(this.$('input.group-doubletime-minutes').val()) == 2) {\n if (typeof this.options.onNextField === 'function') {\n this.options.onNextField(this.options.model);\n }\n }\n }, this)).off(\"keydown.tei\").on(\"keydown.tei\", _.bind(function (e) {\n if (e.which == 9) {\n if (typeof this.options.onNextField === 'function') {\n this.options.onNextField(this.options.model);\n }\n e.preventDefault();\n }\n }, this));\n\n this.$('input.group-regular-hours').val((parseInt(this.options.model.get('regularHours') / 60)).toString().padStart(2, '0'));\n this.$('input.group-regular-minutes').val((parseInt(this.options.model.get('regularHours') % 60)).toString().padStart(2, '0'));\n this.$('input.group-overtime-hours').val((parseInt(this.options.model.get('overtimeHours') / 60)).toString().padStart(2, '0'));\n this.$('input.group-overtime-minutes').val((parseInt(this.options.model.get('overtimeHours') % 60)).toString().padStart(2, '0'));\n this.$('input.group-doubletime-hours').val((parseInt(this.options.model.get('doubletimeHours') / 60)).toString().padStart(2, '0'));\n this.$('input.group-doubletime-minutes').val((parseInt(this.options.model.get('doubletimeHours') % 60)).toString().padStart(2, '0'));\n\n this.$('.group-regular-hours').focus();\n },\n valueChanged: function () {\n if (typeof this.options.onChange == 'function')\n this.options.onChange();\n },\n getValues: function () {\n let regularHours = 0, overtimeHours = 0, doubletimeHours = 0;\n\n let hours = 0, minutes = 0;\n\n if (this.$('input.group-regular-hours').val())\n hours = parseInt(this.$('input.group-regular-hours').val());\n\n if (this.$('input.group-regular-minutes').val())\n minutes = parseInt(this.$('input.group-regular-minutes').val());\n\n regularHours = (hours * 60) + minutes;\n\n hours = 0, minutes = 0;\n\n if (this.$('input.group-overtime-hours').val())\n hours = parseInt(this.$('input.group-overtime-hours').val());\n\n if (this.$('input.group-overtime-minutes').val())\n minutes = parseInt(this.$('input.group-overtime-minutes').val());\n\n overtimeHours = (hours * 60) + minutes;\n\n hours = 0, minutes = 0;\n\n if (this.$('input.group-doubletime-hours').val())\n hours = parseInt(this.$('input.group-doubletime-hours').val());\n\n if (this.$('input.group-doubletime-minutes').val())\n minutes = parseInt(this.$('input.group-doubletime-minutes').val());\n\n doubletimeHours = (hours * 60) + minutes;\n\n return {\n regularHours: regularHours,\n overtimeHours: overtimeHours,\n doubletimeHours: doubletimeHours\n };\n },\n deleteGroup: function () {\n new PJQ.views.modals.YesNo({\n header: \"Delete Trade\",\n body: \"Do you want delete time for \" + this.options.model.get('group').groupName + \"?\",\n onYes: _.bind(function () {\n this.options.model.set('deletedOn', new Date());\n\n if (typeof this.options.onDelete === 'function') {\n this.options.onDelete(this.options.model);\n }\n }, this)\n });\n }\n});","PJQ.models.timecards = {};\n\nPJQ.models.timecards.TimeCard = PJQ.models.BaseModel.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'timeCardId',\n endpoint: function () {\n let params = [];\n if (this.options.context)\n params.push({\n parameter: 'context',\n value: this.options.context\n });\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'timecards',\n value: this.get('timeCardId')\n }\n ], params);\n },\n parse: function(model) {\n if (!model)\n return;\n\n if (model.date)\n model.date = PJQ.helpers.dateHelpers.parseDateString(model.date, false);\n\n if (model.groups)\n model.groups = new PJQ.collections.timecards.TimeCardGroups(model.groups.models ? model.groups.models : model.groups);\n\n this.lineItems = new PJQ.collections.timecards.TimeCardLineItems(model.lineItems);\n this.installedQuantities = new PJQ.collections.productionQuantities.InstalledQuantities(model.installedQuantities);\n\n return model;\n },\n getTotalTime: function() {\n return this.get('regularHours')+this.get('doubletimeHours')+this.get('overtimeHours');\n },\n beforeSave: function () {\n this.set({\n lineItems: this.lineItems.toJSON()\n });\n },\n});\n\nPJQ.models.timecards.TimeCardCategory = PJQ.models.BaseModel.extend({\n defaults: {\n isAPIv2: true\n },\n endpoint: function () {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'timecards',\n },\n {\n endpoint: 'settings'\n },\n {\n endpoint: 'categories',\n value: this.get('timeCardCategoryId')\n }\n ]);\n },\n idAttribute: 'timeCardCategoryId'\n});\n\nPJQ.models.timecards.TimeCardGroup = PJQ.models.BaseModel.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'timeCardGroupId'\n});\n\nPJQ.models.timecards.TimeCardLineItem = PJQ.models.BaseModel.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'id'\n});\n\n// Settings\nPJQ.models.timecards.TimeCardUserSettings = PJQ.models.BaseModel.extend({\n defaults: {\n isAPIv2: true\n },\n endpoint: function () {\n let params = [];\n if (this.options.forCompany) {\n params.push({\n parameter: 'forCompany',\n value: true\n });\n }\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'timecards'\n },\n {\n endpoint: 'settings'\n },\n {\n endpoint: 'user'\n }\n ], params);\n },\n getSettings: function (view) {\n return _.find(this.attributes.viewSettings, _.bind(function (setting) {\n return setting.view === view;\n }, this));\n }\n});\n\nPJQ.models.timecards.TimeCardSettings = PJQ.models.BaseModel.extend({\n defaults: {\n isAPIv2: true\n },\n endpoint: function () {\n let params = [\n {\n parameter: 'contactId',\n value: this.options.contact ? this.options.contact.get('contactId') : 0\n },\n {\n parameter: 'projectId',\n value: this.options.project ? this.options.project.get('projectId') : 0\n }\n ];\n\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: 'timecards'\n },\n {\n endpoint: 'settings'\n }\n ], params);\n }\n else {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'timecards'\n },\n {\n endpoint: 'settings'\n }\n ], params);\n }\n }\n});\n\nPJQ.collections.timecards = {};\n\nPJQ.collections.timecards.TimeCardCategories = PJQ.collections.BaseCollection.extend({\n defaults: {\n isAPIv2: true\n },\n model: PJQ.models.timecards.TimeCardCategory,\n endpoint: function () {\n let params = [];\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'timecards'\n },\n {\n endpoint: 'settings'\n },\n {\n endpoint: 'categories'\n }\n ], params);\n }\n});\n\nPJQ.collections.timecards.TimeCards = PJQ.collections.BaseCollection.extend({\n defaults: {\n isAPIv2: true\n },\n model: PJQ.models.timecards.TimeCard,\n endpoint: function () {\n let params = [];\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'timecards'\n }\n ], params);\n },\n parse: function (data) {\n if (this.options.isExport) {\n this.exportURL = data.url;\n }\n else {\n this.totalRows = 0;\n if (data) {\n this.totalRows = data.totalRows;\n return data.rows;\n }\n }\n return null;\n },\n getTimeCard: function(id, date) {\n let result = null;\n\n _.each(this.models, function(model) {\n if (model.get('id') === id && PJQ.helpers.dateHelpers.getDateString(model.get('date'), PJQ.helpers.dateHelpers.dateFormats.DATE_YMD) === PJQ.helpers.dateHelpers.getDateString(date, PJQ.helpers.dateHelpers.dateFormats.DATE_YMD) && !model.get('deletedOn'))\n result = model;\n });\n\n return result;\n }\n});\n\nPJQ.collections.timecards.TimeCardGroups = PJQ.collections.BaseCollection.extend({\n defaults: {\n isAPIv2: true\n },\n model: PJQ.models.timecards.TimeCardGroup\n});\n\nPJQ.collections.timecards.TimeCardLineItems = PJQ.collections.BaseCollection.extend({\n defaults: {\n isAPIv2: true\n },\n model: PJQ.models.timecards.TimeCardLineItem\n});\n\nPJQ.collections.timecards.TimeCardContextProjects = PJQ.collections.BaseCollection.extend({\n defaults: {\n isAPIv2: true\n },\n endpoint: function () {\n let params = [\n {\n parameter: 'startDate',\n value: this.options.startDate\n },\n {\n parameter: 'endDate',\n value: this.options.endDate\n }\n ];\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'timecards'\n },\n {\n endpoint: 'context',\n value: this.options.id\n },\n {\n endpoint: 'projects'\n }\n ], params);\n }\n});\n\nPJQ.collections.timecards.TimeCardProjects = PJQ.collections.BaseCollection.extend({\n defaults: {\n isAPIv2: true\n },\n endpoint: function () {\n let params = [];\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'timecards'\n },\n {\n endpoint: 'projects'\n }\n ], params);\n },\n parse: function (data) {\n if (this.options.isExport) {\n this.exportURL = data.url;\n }\n else {\n this.totalRows = 0;\n if (data) {\n this.totalRows = data.totalRows;\n return data.rows;\n }\n }\n return null;\n }\n});\n\nPJQ.collections.timecards.TimeCardContacts = PJQ.collections.BaseCollection.extend({\n defaults: {\n isAPIv2: true\n },\n endpoint: function () {\n let params = [];\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'timecards'\n },\n {\n endpoint: 'contacts'\n }\n ], params);\n },\n parse: function (data) {\n if (this.options.isExport) {\n this.exportURL = data.url;\n }\n else {\n this.totalRows = 0;\n if (data) {\n this.totalRows = data.totalRows;\n return data.rows;\n }\n }\n return null;\n }\n});","PJQ.views.timecards.TimeCardSettingsModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.TIMECARDS, 'modal-timecard-settings'),\n width: '400px'\n },\n events: {\n 'change .select-column': 'columnSelected',\n 'click button.settings-save': 'onSave',\n 'click .btn-geofence': 'manageProjectGeofence'\n },\n beforeModalCreated: function () {\n this.model = this.options.timecardsView.userSettings;\n },\n beforeRender: function () {\n // copy settings for our UI; we only update global settings object on save.\n this.options.settings = [];\n this.options.defaultView = this.model.get('defaultView');\n this.options.defaultDateRange = this.model.get('defaultDateRange');\n _.each(this.model.attributes.viewSettings, _.bind(function (setting) {\n if (setting.view === PJQ.constants.timecards.view.BY_CONTACT_PROJECT_TIMECARD ||\n setting.view === PJQ.constants.timecards.view.BY_PROJECT_CONTACT_TIMECARD)\n return;\n\n let columns = this.options.timecardsView.getDataTableInstance({\n view: setting.view,\n timeCardSettings: this.options.timecardsView.settings,\n settings: this.model.getSettings(setting.view)\n }).getColumns(true)\n\n columns = _.filter(columns, (col) => {\n return col.visible !== false;\n })\n\n let selectedColumns = (_.size(setting.columns) > 0) ? setting.columns : setting.columnsDefault;\n _.each(columns, _.bind(function (column) {\n column.visible = selectedColumns.indexOf(column.columnData) !== -1\n }, this));\n\n this.options.settings.push({\n view: setting.view,\n rowsPerPage: setting.rowsPerPage,\n columns: columns\n });\n }, this));\n },\n renderData: function () {\n return {\n model: this.model,\n project: this.options.timecardsView.options.project\n }\n },\n afterRender: function () {\n new PJQ.inputs.Selectpicker({\n el: this.$('select.select-view-default'),\n defaultValue: this.options.defaultView,\n onChange: _.bind(function (value) {\n this.options.defaultView = value;\n }, this)\n\n });\n\n new PJQ.inputs.Selectpicker({\n el: this.$('select.select-date-range-default'),\n defaultValue: this.options.defaultDateRange,\n isIntChoices: true,\n onChange: _.bind(function (value) {\n this.options.defaultDateRange = value;\n }, this)\n\n });\n\n new PJQ.inputs.Selectpicker({\n el: this.$('select.select-view'),\n defaultValue: this.options.timecardsView.dataTable.options.view,\n onChange: _.bind(function (value) {\n this.selectView(value);\n }, this)\n });\n\n this.rowsPerPage = new PJQ.inputs.Selectpicker({\n el: this.$('select.rows-per-page'),\n isIntChoices: true,\n onChange: _.bind(function (value) {\n this.currentView.rowsPerPage = value;\n }, this)\n });\n\n this.selectView(this.options.timecardsView.dataTable.options.view);\n },\n manageProjectGeofence: function () {\n new PJQ.views.timecards.TimeCardGeofenceModal({});\n },\n selectView: function (view) {\n this.currentView = _.find(this.options.settings, _.bind(function (setting) {\n return setting.view === view;\n }, this));\n\n if (view.indexOf('-') === -1) {\n this.$('div.rows-per-page').show();\n this.rowsPerPage.setValue(this.currentView.rowsPerPage);\n } else\n this.$('div.rows-per-page').hide();\n\n if (this.dataTable) {\n this.dataTable.undelegateEvents();\n $(this.dataTable.el).empty();\n }\n\n this.dataTable = new PJQ.views.dataTables.DataTable({\n el: this.$('div.select-columns-datatable'),\n data: this.currentView.columns,\n isHideSearch: true,\n order: [],\n pageLength: 5,\n columns: [\n {\"data\": \"title\", \"title\": \"Column\", \"orderable\": false},\n {\n \"data\": \"visible\",\n \"title\": \"Show\",\n \"orderable\": false,\n \"searchable\": false,\n \"render\": _.bind(function (data) {\n return ('
');\n }, this),\n \"width\": '10%'\n }\n ],\n dom: '<\"top\"<\"clear\">>rt<\"bottom\"p<\"clear\">>'\n });\n },\n columnSelected: function (sender) {\n this.dataTable.dataTable.row($(sender.currentTarget).closest('tr')).data().visible = $(sender.currentTarget).prop('checked');\n },\n onSave: function () {\n let fnOnSave = _.bind(function () {\n if (typeof this.options.onSave === 'function')\n this.options.onSave();\n this.removeModal();\n }, this);\n\n this.model.set('defaultView', this.options.defaultView);\n this.model.set('defaultDateRange', this.options.defaultDateRange);\n\n _.each(this.options.settings, _.bind(function (settingTemp) {\n _.each(this.model.get('viewSettings'), _.bind(function (setting) {\n if (settingTemp.view === setting.view) {\n setting.rowsPerPage = settingTemp.rowsPerPage;\n\n let columns = _.size(setting.columns) > 0 ? setting.columns.slice() : setting.columnsDefault.slice();\n\n // update columns\n _.each(settingTemp.columns, _.bind(function (column) {\n if (column.visible) {\n if (columns.indexOf(column.columnData) === -1)\n columns.push(column.columnData);\n } else {\n if (columns.indexOf(column.columnData) !== -1)\n columns = _.filter(columns, _.bind(function (columnTemp) {\n return columnTemp != column.columnData;\n }, this));\n }\n }, this));\n\n setting.columns = columns;\n }\n }, this));\n }, this));\n\n //save settings to database\n this.model.save(null, {\n success: _.bind(function () {\n this.model.set('defaultView', this.options.defaultView);\n fnOnSave();\n }, this)\n });\n }\n});\n\nPJQ.views.timecards.TimeCardGeofenceModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.TIMECARDS, 'modal-timecard-geofence'),\n minWidth: '700px'\n },\n events: {\n 'keyup .input-longitude, .input-latitude, .input-radius': 'positionChanged',\n 'click .btn-save': 'save',\n 'click .cb-enable-geofence': 'toggleStatus'\n },\n beforeModalCreated: function () {\n this.settings = new PJQ.models.timecards.TimeCardSettings(null, {\n project: PJQ.app.session.project\n });\n\n this.geofenceEnabled = false;\n\n if (!this.settings.isFetched) {\n this.settings.fetch({\n success: _.bind(function () {\n if (this.settings.get('geofence')) {\n this.geofence = this.settings.get('geofence');\n this.geofenceEnabled = this.geofence.latitude && this.geofence.longitude;\n } else {\n let defaultLat = PJQ.app.session.project.get('latitude'),\n defaultLong = PJQ.app.session.project.get('longitude');\n this.geofence = {\n radius: 1000,\n longitude: defaultLong !== 0 ? defaultLong : null,\n latitude: defaultLat !== 0 ? defaultLat : null\n };\n }\n\n this.isFetched = true;\n this.render();\n }, this)\n })\n } else {\n this.isFetched = true;\n this.render();\n }\n },\n renderData: function () {\n return {\n geofence: this.geofence,\n geofenceEnabled: this.geofenceEnabled\n }\n },\n afterRender: function () {\n if (!this.isFetched)\n return;\n\n if (this.settings && this.settings.isFetched) {\n this.renderMap();\n }\n },\n toggleStatus: function () {\n this.geofenceEnabled = !this.geofenceEnabled;\n },\n renderMap: function () {\n this.geofenceMap = new PJQ.maps.GoogleMap(this.$('.geofence-map'));\n if (this.geofence.latitude && this.geofence.longitude) {\n this.refreshMarkers();\n }\n\n // Listen for clicks on the map to set/move the marker and radius circle\n this.geofenceMap.map.addListener('click', _.bind((data) => {\n // Reduce the lat/long to 7 decimal places\n this.geofence.latitude = Math.round(data.latLng.lat() * 10000000) / 10000000;\n this.geofence.longitude = Math.round(data.latLng.lng() * 10000000) / 10000000;\n this.geofenceEnabled = true;\n\n this.$('.cb-enable-geofence').prop('checked', true);\n this.$('.input-latitude').val(this.geofence.latitude);\n this.$('.input-longitude').val(this.geofence.longitude);\n\n this.refreshMarkers();\n }, this));\n },\n positionChanged: function (e) {\n let $target = $(e.currentTarget),\n valueType = $target.data('type'),\n value = $target.val();\n\n // Radius should always have a value\n if (valueType.toLowerCase() === 'radius') {\n value = parseInt(value);\n if (isNaN(value) || value < 0) {\n value = 0;\n }\n this.$('.input-radius').val(value);\n }\n\n this.geofence[valueType] = value;\n\n if (this.geofence.latitude && this.geofence.longitude) {\n this.refreshMarkers();\n }\n },\n refreshMarkers: function () {\n let positionObject = new google.maps.LatLng(this.geofence.latitude, this.geofence.longitude);\n\n if (this.geofence.radius == null) {\n this.geofence.radius = 1000;\n this.$('.input-radius').val(this.geofence.radius);\n }\n\n // if no marker and circle exist, create them\n if (!this.marker && !this.circle) {\n this.circle = new google.maps.Circle({\n map: this.geofenceMap.map,\n radius: this.geofence.radius ? this.geofence.radius : 1000,\n fillColor: '#41c1e1',\n fillOpacity: 0.35,\n strokeColor: '#148fb2',\n strokeOpacity: 0.8,\n strokeWeight: 1,\n center: positionObject,\n clickable: false\n });\n\n this.marker = new google.maps.Marker({\n position: positionObject,\n map: this.geofenceMap.map,\n title: 'Geofence Center',\n animation: google.maps.Animation.DROP\n });\n\n // Zoom and center map on marker when clicked\n this.marker.addListener('click', _.bind(function () {\n this.geofenceMap.setCenter(this.marker.getPosition());\n this.geofenceMap.setZoom(10);\n }, this));\n\n // Zoom and center map on marker on creation\n this.geofenceMap.setCenter(this.marker.getPosition());\n this.geofenceMap.setZoom(10);\n } else {\n this.marker.setPosition(positionObject);\n this.circle.setCenter(positionObject);\n this.circle.setRadius(this.geofence.radius);\n }\n },\n save: function () {\n if (!this.geofenceEnabled) {\n this.geofence.latitude = null;\n this.geofence.longitude = null;\n }\n\n this.settings.set('geofence', this.geofence);\n this.settings.save(null, {\n success: _.bind(function () {\n this.removeModal();\n }, this)\n })\n }\n});\n\nPJQ.views.timecards.TimeCardLocationMapModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.TIMECARDS, 'modal-timecard-location-map'),\n minWidth: '700px',\n coordinatesIn: null,\n coordinatesOut: null\n },\n afterRender: function () {\n this.renderMap();\n },\n renderMap: function () {\n this.map = new PJQ.maps.GoogleMap(this.$('.timecard-location-map'));\n this.renderMarkers();\n },\n renderMarkers: function () {\n let inMarker = null,\n outMarker = null\n if (this.model.get('latitudeIn') && this.model.get('longitudeIn')) {\n inMarker = new google.maps.Marker({\n position: new google.maps.LatLng(this.model.get('latitudeIn'), this.model.get('longitudeIn')),\n map: this.map.map,\n title: 'Clock In Location',\n animation: google.maps.Animation.DROP,\n icon: {\n url: \"http://maps.google.com/mapfiles/ms/icons/green-dot.png\"\n }\n });\n\n // Clock in info window\n let infoWindowContent = \"
Clocked In
\";\n\n if (this.model.get('timeIn')) {\n infoWindowContent += \"
\" + PJQ.helpers.dateHelpers.getDateString(this.model.get('timeIn'), PJQ.helpers.dateHelpers.dateFormats.DATE_TIME) + \"
\";\n }\n infoWindowContent += \"
\"\n\n let infoWindow = new google.maps.InfoWindow({\n content: infoWindowContent\n });\n inMarker.addListener('click', function () {\n infoWindow.open(this.map, inMarker);\n });\n }\n\n if (this.model.get('latitudeOut') && this.model.get('longitudeOut')) {\n outMarker = new google.maps.Marker({\n position: new google.maps.LatLng(this.model.get('latitudeOut'), this.model.get('longitudeOut')),\n map: this.map.map,\n title: 'Clock Out Location',\n animation: google.maps.Animation.DROP,\n icon: {\n url: \"http://maps.google.com/mapfiles/ms/icons/red-dot.png\"\n }\n });\n\n // Clock out info window\n let infoWindowContent = \"
Clocked Out
\";\n\n if (this.model.get('timeOut')) {\n infoWindowContent += \"
\" + PJQ.helpers.dateHelpers.getDateString(this.model.get('timeOut'), PJQ.helpers.dateHelpers.dateFormats.DATE_TIME) + \"
\";\n }\n infoWindowContent += \"
\"\n\n let infoWindow = new google.maps.InfoWindow({\n content: infoWindowContent\n });\n outMarker.addListener('click', function () {\n infoWindow.open(this.map, outMarker);\n });\n }\n\n if (inMarker || outMarker) {\n this.map.setCenter(inMarker ? inMarker.getPosition() : outMarker.getPosition());\n this.map.setZoom(10);\n }\n }\n});","PJQ.views.timecards.TimeCardMain = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.TIMECARDS, 'timecard'),\n isShowHeader: true,\n project: null,\n contact: null,\n useManualDateRange: false\n },\n events: {\n 'click .btn-settings': 'settings',\n 'keyup .input-search': 'searchChanged',\n 'click .search': 'search',\n 'click .clear-search': 'clearFilter',\n 'click .new-timecards': 'addTimeCards',\n 'click .approve-batch': 'approveBatchStart',\n 'click .unapprove-batch': 'approveBatchStart',\n 'click .approval-continue': 'approveBatchContinue',\n 'click .cancel-approval': 'approveBatchCancel',\n 'click .export': 'exportList',\n 'click .export-weekly': 'exportWeekly',\n 'click .btn-manual-range': 'manualDateRange',\n 'click .btn-auto-range': 'autoDateRange',\n 'click .btn-prev-date': 'prevDateRange',\n 'click .btn-next-date': 'nextDateRange'\n },\n beforeFirstRender: function () {\n this.selectedTimeCards = [];\n this.selectionMode = PJQ.constants.timecards.selectionMode.NONE;\n\n if (this.options.project != null) {\n this.options.permissions = PJQ.app.session.project.permissions;\n } else {\n this.options.permissions = PJQ.app.session.systemPermissions;\n }\n\n this.isFetched = false;\n this.userSettings = new PJQ.models.timecards.TimeCardUserSettings();\n this.userSettings.fetch({\n success: _.bind(function () {\n this.settings = new PJQ.models.timecards.TimeCardSettings(null, {\n contact: this.options.contact,\n project: this.options.project\n });\n this.settings.fetch({\n success: _.bind(function () {\n this.isFetched = true;\n this.currentView = this.userSettings.get('defaultView');\n this.render();\n }, this)\n });\n }, this)\n });\n },\n beforeRender: function () {\n if (this.isFetched) {\n this.options.canAdd = this.options.permissions.hasPermission('timeCards.canAdd');\n this.options.canApprove = this.options.permissions.hasPermission('timeCards.canApprove');\n this.options.canViewAll = this.options.permissions.hasPermission('timeCards.canViewAll');\n this.options.isAdmin = this.options.permissions.hasPermission('timeCards.isAdmin');\n }\n },\n renderData: function () {\n return {\n showHeader: this.options.isShowHeader,\n project: this.options.project,\n contact: this.options.contact,\n useManualDateRange: this.options.useManualDateRange,\n canAdd: this.options.canAdd,\n canApprove: this.options.canApprove,\n canViewAll: this.options.canViewAll,\n isAdmin: this.options.isAdmin,\n isFetched: this.options.isFetched\n };\n },\n afterRender: function () {\n if (!this.isFetched)\n return;\n\n this.viewSelectPicker = new PJQ.inputs.Selectpicker({\n el: this.$('.timecards-view'),\n isIntChoices: false,\n isMultiple: false,\n mustSelectValue: true,\n defaultValue: this.options.project ? PJQ.constants.timecards.view.PROJECTWALL_BY_TIMECARD : this.userSettings.get('defaultView'),\n onHide: _.bind(function () {\n if (this.currentView !== this.viewSelectPicker.getValue())\n this.renderView();\n }, this)\n });\n\n this.renderView();\n\n this.renderTotals();\n },\n renderTotals: function () {\n if (this.options.project == null || !this.options.isAdmin) {\n return;\n }\n\n this.options.project.fetchBudgetTimeStats((stats) => {\n let $totals = this.$('.timecard-totals');\n if (!stats) {\n $totals.empty();\n return;\n }\n\n $totals.html(`\n
\n
\n Budgeted Hours\n
\n
\n ${PJQ.helpers.formatHelpers.minutesToHHMM(stats.budgetedHours)}\n
\n
\n
\n
\n Actual Hours\n
\n
\n ${PJQ.helpers.formatHelpers.minutesToHHMM(stats.actualHours)}\n
\n
`\n );\n });\n },\n manualDateRange: function () {\n this.options.useManualDateRange = true;\n this.render();\n },\n autoDateRange: function () {\n this.options.useManualDateRange = false;\n this.render();\n },\n renderDateRange: function () {\n let dateRange = this.userSettings.get('defaultDateRange');\n if (!this.options.useManualDateRange) {\n switch (dateRange) {\n case PJQ.constants.timecards.defaultDateRange.DAYS_30:\n if (this.startDate == null) {\n this.startDate = new Date();\n }\n this.endDate = PJQ.helpers.dateHelpers.getNewDateAddDays(this.startDate, 29);\n break;\n case PJQ.constants.timecards.defaultDateRange.WEEK_TO_DATE:\n if (this.startDate == null) {\n this.startDate = new Date();\n switch (this.settings.get('weekStart')) {\n case 0: // Su\n this.startDate.setDate(this.startDate.getDate() - (this.startDate.getDay()) % 7);\n break;\n default:\n this.startDate.setDate(this.startDate.getDate() - (this.startDate.getDay() + (7 - this.settings.get('weekStart'))) % 7);\n break;\n }\n\n this.endDate = new Date();\n } else {\n this.endDate = PJQ.helpers.dateHelpers.getNewDateAddDays(this.startDate, 6);\n }\n break;\n case PJQ.constants.timecards.defaultDateRange.MONTH_TO_DATE:\n if (this.startDate == null) {\n this.startDate = PJQ.helpers.dateHelpers.parseDateString(PJQ.helpers.dateHelpers.getCurrentYear() + '-' + PJQ.helpers.dateHelpers.getCurrentMonth() + '-01 00:00:00');\n this.endDate = new Date();\n } else {\n this.endDate = PJQ.helpers.dateHelpers.getNewDateAddDays(this.startDate, 29);\n }\n break;\n default:\n if (this.startDate == null) {\n this.startDate = new Date();\n switch (this.settings.get('weekStart')) {\n case 0: // Su\n this.startDate.setDate(this.startDate.getDate() - (this.startDate.getDay()) % 7);\n break;\n default:\n this.startDate.setDate(this.startDate.getDate() - (this.startDate.getDay() + (7 - this.settings.get('weekStart'))) % 7);\n break;\n }\n }\n\n this.endDate = PJQ.helpers.dateHelpers.getNewDateAddDays(this.startDate, dateRange - 1);\n break;\n }\n } else if (this.startDate == null) {\n this.startDate = new Date();\n this.endDate = PJQ.helpers.dateHelpers.getNewDateAddDays(this.startDate, dateRange - 1);\n }\n\n if (this.options.useManualDateRange) {\n if (this.startDatePicker) {\n this.startDatePicker.remove();\n }\n if (this.endDatePicker) {\n this.endDatePicker.remove();\n }\n\n this.startDatePicker = new PJQ.inputs.Datepicker({\n el: this.$('.start-date'),\n datepickerOptions: {\n defaultDate: this.startDate,\n format: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE,\n },\n onChange: _.bind(function (value) {\n this.selectedTimeCards = [];\n this.startDate = value;\n this.renderView();\n }, this)\n });\n\n this.endDatePicker = new PJQ.inputs.Datepicker({\n el: this.$('.end-date'),\n datepickerOptions: {\n defaultDate: this.endDate,\n format: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE,\n },\n onChange: _.bind(function (value) {\n this.selectedTimeCards = [];\n this.endDate = value;\n this.renderView();\n }, this)\n });\n } else {\n let startDateString = PJQ.helpers.dateHelpers.getDateString(this.startDate, PJQ.helpers.dateHelpers.dateFormats.DATE),\n endDateString = PJQ.helpers.dateHelpers.getDateString(this.endDate, PJQ.helpers.dateHelpers.dateFormats.DATE);\n this.$('.date-range-display').text(startDateString + ' - ' + endDateString);\n }\n },\n prevDateRange: function () {\n let dateRange = this.userSettings.get('defaultDateRange');\n switch (dateRange) {\n case PJQ.constants.timecards.defaultDateRange.WEEK_TO_DATE:\n this.startDate = PJQ.helpers.dateHelpers.getNewDateAddDays(this.startDate, -7);\n break;\n case PJQ.constants.timecards.defaultDateRange.MONTH_TO_DATE:\n this.startDate = PJQ.helpers.dateHelpers.getNewDateAddDays(this.startDate, -30);\n break;\n default:\n this.startDate = PJQ.helpers.dateHelpers.getNewDateAddDays(this.startDate, -dateRange);\n break;\n }\n this.renderView();\n },\n nextDateRange: function () {\n let dateRange = this.userSettings.get('defaultDateRange');\n switch (dateRange) {\n case PJQ.constants.timecards.defaultDateRange.WEEK_TO_DATE:\n this.startDate = PJQ.helpers.dateHelpers.getNewDateAddDays(this.startDate, 7);\n break;\n case PJQ.constants.timecards.defaultDateRange.MONTH_TO_DATE:\n this.startDate = PJQ.helpers.dateHelpers.getNewDateAddDays(this.startDate, 30);\n break;\n default:\n this.startDate = PJQ.helpers.dateHelpers.getNewDateAddDays(this.startDate, dateRange);\n break;\n }\n this.renderView();\n },\n renderView: function (view, options = {}) {\n this.currentView = view ? view : this.viewSelectPicker.getValue();\n\n this.renderDateRange();\n\n PJQ.helpers.inputHelpers.setInputError(this.$('.start-date, .end-date'), true);\n if (this.startDate > this.endDate) {\n PJQ.helpers.inputHelpers.setInputError(this.$('.start-date, .end-date'), false);\n return;\n }\n\n let page = null;\n if (options.stayOnPage && this.dataTable != null) {\n page = this.dataTable.dataTable.page();\n }\n\n\n if (this.dataTable) {\n this.dataTable.cleanup();\n this.dataTable.clearServerCache = true;\n this.dataTable.pageCache = [];\n this.dataTable.remove();\n this.dataTable = null;\n this.$('.timecards-data').empty();\n }\n\n let tableSettings = this.userSettings.getSettings(this.currentView),\n dataTableOptions = {\n el: this.$('.timecards-data'),\n language: {\n zeroRecords: 'No Results Available'\n },\n data: null,\n project: this.options.project,\n view: this.currentView,\n timecardsView: this,\n timeCardSettings: this.settings,\n settings: tableSettings,\n userSettings: this.userSettings,\n getPageCallback: _.bind(this.getViewData, this),\n displayStart: page != null ? page * tableSettings.rowsPerPage : null,\n deferRender: true,\n clearServerCache: true,\n showPageSelector: true,\n onChange: () => {\n this.renderTotals();\n },\n onApprove: (timecards, approve, callback) => {\n if (timecards == null) {\n return;\n }\n\n let ids;\n if (PJQ.helpers.objectHelpers.refinedType(timecards) === 'array') {\n ids = _.map(_.filter(timecards, (tc) => {\n return approve ? tc.get('approvedOn') == null : tc.get('approvedOn') != null;\n }), (tc) => {\n return tc.id;\n });\n } else if (timecards.id != null) {\n ids = [timecards.id];\n }\n\n let tcCount = _.size(ids);\n if (tcCount > 0) {\n this.approveTimeCards(ids, approve, (response) => {\n PJQ.notifications.notify.successNotify({\n message: tcCount.toString() + ' Time Cards successfully ' + (approve ? 'approved' : 'unapproved')\n });\n if (typeof callback === 'function') {\n callback(response);\n }\n });\n }\n },\n onTableDraw: (dataTable) => {\n this.$('.timecards-data').css('margin-top', -40);\n },\n colReorder: {\n fixedColumnsLeft: 1,\n fixedColumnsRight: (this.currentView === PJQ.constants.timecards.view.BY_TIMECARD || this.currentView === PJQ.constants.timecards.view.PROJECTWALL_BY_TIMECARD) ? 1 : 0,\n realtime: false\n }\n };\n\n this.dataTable = this.getDataTableInstance(dataTableOptions);\n },\n getViewData: function (pageNumber, pageSize, orderArr, callback) {\n let order = orderArr[0];\n this.data = null;\n\n switch (this.currentView) {\n case PJQ.constants.timecards.view.PROJECTWALL_BY_TIMECARD:\n case PJQ.constants.timecards.view.BY_TIMECARD:\n this.data = new PJQ.collections.timecards.TimeCards();\n break;\n case PJQ.constants.timecards.view.BY_PROJECT:\n this.data = new PJQ.collections.timecards.TimeCardProjects();\n break;\n case PJQ.constants.timecards.view.BY_CONTACT:\n this.data = new PJQ.collections.timecards.TimeCardContacts();\n break;\n }\n\n let idFilter = 0;\n if (this.options.contact)\n idFilter = this.options.contact.id;\n else {\n if ((PJQ.app.session.systemPermissions == null || !PJQ.app.session.systemPermissions.hasPermission('contacts.canView')) && (PJQ.app.session.project === null || this.options.permissions.hasPermission('canViewAll')))\n idFilter = -PJQ.app.session.user.id;\n }\n let dateNow = new Date(),\n parameters = {\n searchFor: this.$('.input-search').val(),\n startDate: PJQ.helpers.dateHelpers.getDateString(this.startDate, PJQ.helpers.dateHelpers.dateFormats.DATE_YMD),\n endDate: PJQ.helpers.dateHelpers.getDateString(this.endDate, PJQ.helpers.dateHelpers.dateFormats.DATE_YMD),\n page: pageNumber,\n pageSize: pageSize,\n orderBy: order.name,\n orderDirection: order.direction,\n timeZoneOffset: dateNow.getTimezoneOffset(),\n projectId: this.options.project ? this.options.project.get('projectId') : 0,\n idFilter: idFilter\n };\n\n this.data.fetch({\n data: parameters,\n success: _.bind(function () {\n callback(this.data.models, this.data.totalRows);\n }, this),\n fail: _.bind(function () {\n callback();\n }, this)\n });\n },\n getDataTableInstance: function (options) {\n let dataTable = null;\n\n switch (options.view) {\n case PJQ.constants.timecards.view.PROJECTWALL_BY_TIMECARD:\n case PJQ.constants.timecards.view.BY_TIMECARD:\n dataTable = new PJQ.views.timecards.TimeCardDataTable(options);\n break;\n case PJQ.constants.timecards.view.BY_PROJECT:\n dataTable = new PJQ.views.timecards.ProjectDataTable(options);\n break;\n case PJQ.constants.timecards.view.BY_PROJECT_CONTACT:\n dataTable = new PJQ.views.timecards.ContactDataTable(options);\n break;\n case PJQ.constants.timecards.view.BY_PROJECT_CONTACT_TIMECARD:\n dataTable = new PJQ.views.timecards.TimeCardDataTable(options);\n break;\n case PJQ.constants.timecards.view.BY_CONTACT:\n dataTable = new PJQ.views.timecards.ContactDataTable(options);\n break;\n case PJQ.constants.timecards.view.BY_CONTACT_PROJECT:\n dataTable = new PJQ.views.timecards.ProjectDataTable(options);\n break;\n case PJQ.constants.timecards.view.BY_CONTACT_PROJECT_TIMECARD:\n dataTable = new PJQ.views.timecards.TimeCardDataTable(options);\n break;\n }\n return dataTable;\n },\n searchChanged: function (e) {\n if (e.keyCode === 13) {\n this.selectedTimeCards = [];\n this.search();\n }\n },\n search: function () {\n this.renderView();\n },\n clearFilter: function () {\n this.$('.input-search').val('');\n this.renderView();\n },\n settings: function () {\n new PJQ.views.timecards.TimeCardSettingsModal({\n timecardsView: this,\n onSave: _.bind(function () {\n this.startDate = null;\n this.endDate = null;\n this.renderView();\n PJQ.notifications.notify.successNotify({\n message: 'Settings updated successfully'\n });\n }, this)\n });\n },\n addTimeCards: function () {\n if (!this.options.canAdd) {\n return;\n }\n\n if (this.settings.get('enableLineItems') || this.settings.get('enableClockIn')) {\n new PJQ.views.timecards.AddTimeCardsModal({\n project: this.options.project,\n settings: this.settings,\n onSave: () => {\n this.renderView(this.currentView, {stayOnPage: true});\n this.renderTotals();\n }\n });\n } else {\n new PJQ.views.timecards.ManageTimeCardsByWeekModal({\n timecardsView: this,\n settings: this.settings,\n project: this.options.project,\n contact: this.options.contact,\n onSave: () => {\n this.renderView(this.currentView, {stayOnPage: true});\n this.renderTotals();\n }\n });\n }\n },\n approveBatchStart: function (e) {\n this.selectionMode = $(e.currentTarget).hasClass('approve-batch') ? PJQ.constants.timecards.selectionMode.APPROVE : PJQ.constants.timecards.selectionMode.UNAPPROVE;\n this.$('.approval-continue').prop('disabled', _.size(this.selectedTimeCards) === 0);\n switch (this.currentView) {\n case PJQ.constants.timecards.view.PROJECTWALL_BY_TIMECARD:\n case PJQ.constants.timecards.view.BY_TIMECARD:\n this.renderView(null, {stayOnPage: true});\n break;\n case PJQ.constants.timecards.view.BY_PROJECT:\n case PJQ.constants.timecards.view.BY_CONTACT:\n _.each(this.dataTable.options.childDataTables, _.bind(function (childDT) {\n _.each(childDT.options.childDataTables, _.bind(function (grandChildDT) {\n childDT.renderChildRow(childDT.getRow(grandChildDT.$el.closest('tr').prev()), grandChildDT.options.parentId);\n }, this));\n }, this));\n break;\n }\n\n this.showNotification('Select 1 or more Time Cards and click \"' + (this.selectionMode === PJQ.constants.timecards.selectionMode.APPROVE ? 'Approve' : 'Un-Approve') + ' Checked\" to continue.', 'info');\n this.$('.approval-continue').text((this.selectionMode === PJQ.constants.timecards.selectionMode.APPROVE ? 'Approve' : 'Un-Approve') + ' Checked');\n this.$('.new-timecards, .other-actions').prop('disabled', true);\n this.$('.approval-continue, .cancel-approval').show();\n },\n approveBatchCancel: function () {\n this.selectionMode = PJQ.constants.timecards.selectionMode.NONE;\n this.selectedTimeCards = [];\n\n switch (this.currentView) {\n case PJQ.constants.timecards.view.PROJECTWALL_BY_TIMECARD:\n case PJQ.constants.timecards.view.BY_TIMECARD:\n this.renderView(null, {stayOnPage: true});\n break;\n case PJQ.constants.timecards.view.BY_PROJECT:\n case PJQ.constants.timecards.view.BY_CONTACT:\n _.each(this.dataTable.options.childDataTables, _.bind(function (childDT) {\n _.each(childDT.options.childDataTables, _.bind(function (grandChildDT) {\n childDT.renderChildRow(childDT.getRow(grandChildDT.$el.closest('tr').prev()), grandChildDT.options.parentId);\n }, this));\n }, this));\n break;\n }\n\n this.$('.new-timecards, .other-actions').prop('disabled', false);\n this.$('.approval-continue, .cancel-approval').hide();\n this.hideNotification();\n },\n approveBatchContinue: function () {\n let isApproved = (this.selectionMode === PJQ.constants.timecards.selectionMode.APPROVE);\n new PJQ.views.modals.YesNo({\n header: \"Confirm \" + (isApproved ? 'Approval' : 'Un-Approval'),\n body: \"Are you sure you want to \" + (isApproved ? 'approve' : 'un-approve') + \" \" + _.size(this.selectedTimeCards) + \" Time Card\" + (_.size(this.selectedTimeCards) > 1 ? \"s\" : \"\") + \"?\",\n onYes: _.bind(function () {\n this.approveTimeCards(this.selectedTimeCards, isApproved, _.bind(function () {\n let plural = _.size(this.selectedTimeCards) > 0 ? 's' : '';\n this.approveBatchCancel();\n PJQ.notifications.notify.successNotify({\n message: 'Time Card' + plural + ' ' + (isApproved ? 'approved' : 'unapproved')\n });\n }, this));\n }, this)\n });\n },\n approveTimeCards: function (timeCardIds, isApproved, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'timecards',\n },\n {\n endpoint: 'batch',\n },\n {\n endpoint: 'approve'\n }\n ]),\n data: {\n timeCardIds: timeCardIds,\n isApproved: isApproved\n },\n isAPIv2: true\n }).post().done(_.bind(function (response) {\n if (typeof callback === 'function') {\n callback(response);\n }\n }, this));\n },\n addSelectedTimeCards: function (timeCardIds) {\n this.selectedTimeCards = _.uniq(_.union(timeCardIds, this.selectedTimeCards));\n\n if (this.selectionMode === PJQ.constants.timecards.selectionMode.APPROVE || this.selectionMode === PJQ.constants.timecards.selectionMode.UNAPPROVE)\n this.$('.approval-continue').prop('disabled', _.size(this.selectedTimeCards) === 0);\n },\n removeSelectedTimeCards: function (timeCardIds) {\n this.selectedTimeCards = _.without(this.selectedTimeCards, ...timeCardIds);\n\n if (this.selectionMode === PJQ.constants.timecards.selectionMode.APPROVE || this.selectionMode === PJQ.constants.timecards.selectionMode.UNAPPROVE)\n this.$('.approval-continue').prop('disabled', _.size(this.selectedTimeCards) === 0);\n },\n hideNotification: function () {\n this.$('.timecard-notifications').hide();\n },\n showNotification: function (content, type) {\n this.$('.timecard-notifications').removeClass('alert-primary').removeClass('alert-secondary').removeClass('alert-info').removeClass('alert-success').removeClass('alert-warning').removeClass('alert-danger');\n this.$('.timecard-notifications').addClass('alert-' + type);\n\n let icon = '';\n switch (type) {\n case 'info':\n icon = '';\n break;\n }\n\n this.$('.timecard-notifications').html(icon + (icon ? ' ' : '') + content);\n this.$('.timecard-notifications').show();\n },\n export: function (view) {\n let parameters = [\n {\n parameter: 'searchFor',\n value: this.$('.input-search').val()\n },\n {\n parameter: 'startDate',\n value: PJQ.helpers.dateHelpers.getDateString(this.startDate, PJQ.helpers.dateHelpers.dateFormats.DATE_YMD)\n },\n {\n parameter: 'endDate',\n value: PJQ.helpers.dateHelpers.getDateString(this.endDate, PJQ.helpers.dateHelpers.dateFormats.DATE_YMD)\n },\n {\n parameter: 'timeZoneOffset',\n value: new Date().getTimezoneOffset()\n },\n {\n parameter: 'projectId',\n value: this.options.project ? this.options.project.get('projectId') : 0\n },\n {\n parameter: 'idFilter',\n value: this.options.contact ? this.options.contact.id : 0\n },\n {\n parameter: 'view',\n value: view\n }\n ];\n\n let downloadEndpoint = [\n {\n endpoint: 'timecards'\n },\n {\n endpoint: 'export'\n }\n ];\n\n PJQ.files.downloadFile(PJQ.helpers.urlHelpers.generateEndpoint(downloadEndpoint, parameters), {isAPIv2: true});\n },\n exportList: function () {\n this.export('timecard-list');\n },\n exportWeekly: function () {\n let template = 'timecard-weekly';\n if (PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.TIMECARD_WEEKLY_EXPORT_TEMPLATE))\n template = PJQ.app.session.preferences.getPref(PJQ.constants.preferenceTypes.TIMECARD_WEEKLY_EXPORT_TEMPLATE);\n this.export(template);\n }\n});"]}