{"version":3,"sources":["1initializers.js","account-settings.js","addressbook.js","changerequests.js","commitments.js","customfields.js","dailyreports.js","directcosts.js","financecorefieldsettings.js","groups.js","invoicing.js","meetings.js","nav.js","numberformat.js","orderingsettings.js","primecontracts.js","projectsettings.js","regions.js","settingsmodels.js","signature.js","sso.js","terms.js","timecards.js","usermanagement.js","usertypesettings.js"],"names":["PJQ","views","settings","models","collections","modules","oldRoutes","routes","route","name","callback","procore","code","ajax","Request","endpoint","helpers","urlHelpers","generateEndpoint","parameter","value","post","done","app","initNavigator","activeItem","viewOptions","procoreCode","initView","preventTour","subscriptionId","parseInt","module","integrationName","authorized","addOldRoutes","addRoutes","CompanyInfo","BaseView","extend","defaults","template","templating","Template","constants","SETTINGS","subTemplates","subscription","onChange","events","mouseup .btn-password-reset-modal","change .cb-directory-status","keyup input[type='text']","change .user-procore-link","click .btn-join-directory","click .btn-enable-auto-renew","click .btn-disable-auto-renew","click .btn-edit-card","beforeFirstRender","this","options","session","preferences","setPref","preferenceTypes","PROCORE_ACCESS_REFRESH_TOKEN","model","user","isFetched","fetch","success","_","bind","render","listenTo","beforeRender","renderData","afterRender","inputHelpers","inputMaskPhone","$","get","panteraPortalId","inputs","Selectpicker","el","hideDisabled","defaultValue","set","statePicker","size","toLowerCase","toUpperCase","countryChanged","noneSelectedText","tooltip","Binder","$el","afterChange","notifications","notify","successNotify","message","renderSubscriptionInfo","renderDirectoryStatus","directoryStatusChanged","e","currentTarget","prop","joinDirectory","leaveDirectory","remove","isActive","contact","html","css","colors","GREEN","RED","listenSubscriptionChanged","fetchBillingInfo","billingInfo","renderSubTemplate","enableAutoRenew","updateAutoRenew","errorNotify","disableAutoRenew","subscriptions","DisableAutoRenewModal","onYes","changeCard","payment","PaySimplePaymentModal","onSave","onError","resetPasswordModal","ResetPasswordModal","country","each","states","state","abbreviation","refresh","setValue","inputMaskZip","validate","errors","isValid","isCompanyValid","trim","setInputError","procoreLink","hasPref","modals","YesNo","header","body","data","deletePref","onNo","redirect","window","location","origin","id","toString","url","getPref","PROCORE_URL_AUTH","PROCORE_CLIENT_ID","encodeURIComponent","document","BaseModal","baseOptions","isVerticalCenter","isShowResetButton","resetButtonText","resetButtonColorClass","isShowCancelButton","cancelButtonText","onReset","noop","width","minWidth","maxWidth","height","minHeight","maxHeight","fitHeight","defaultEvents","hidden.bs.modal","click .modal-reset","click .show-hide","click .show-hide-confirm","uuid","uniqueId","createModal","afterModalCreated","errorAlert","destroy","isConfirmValid","isConfirmLength","error","newPass","val","Alert","type","text","length","password","request","hide","fail","showHide","target","attr","showHideConfirm","context","removeClass","addClass","AddressBookGeneralSettings","showLaborStatus","IS_HIDE_UNION_STATUS","groupLabel","GROUP_LABEL","newAddressBook","ENABLE_NEW_ADDRESSBOOK","defaultFilters","map","userTypes","getByIsCompany","userType","merge","addressBook","directoryFilter","PRIVATE_ONLY","contactStatusFilter","ACTIVE","INACTIVE","laborStatusFilter","UNION","NON_UNION","PREV_WAGE","NOT_AVAILABLE","filterSelectPicker","isIntChoices","isMultiple","exclusiveChoices","isGroup","mustSelectValuePerOptGroup","split","join","locationTypeSelectPicker","mustSelectValue","locationTypeFilter","WORK_AREA","OFFICE_LOCATION","setDefaultValues","watchElements","ContactFieldSettings","click .cb-visible-contact","click .cb-visible-admin","click .cb-required-contact","click .cb-required-admin","fetchContactFieldSettings","fields","collection","fillFields","fieldName","canContactEdit","isVisibleContact","isRequiredContact","isRequiredAdmin","canBeRequired","field","index","matchField","findWhere","add","isVisibleAdmin","sortOrder","dataTable","dataTables","DataTable","isHideSearch","paging","rowId","order","columns","title","visible","orderable","row","contactEdit","contactVisibleChanged","$target","$row","closest","setting","getRow","enabled","queueSave","adminVisibleChanged","contactRequiredChanged","adminRequiredChanged","ChangeRequestSettings","customFields","_this","NumberFormatInput","CommitmentSettings","click .btn-manage-signature","keydown .input-percent","change .input-percent","_this2","useDecimalPercentFields","attribute","budget","accountingMethod","UNIT_QUANTITY","commitmentType","commitments","PURCHASE_ORDER","SUBCONTRACT","SignatureEditInput","signature","headerSubText","formatPercent","formatHelpers","CommitmentChangeOrderSettings","_this3","CustomFieldSettings","fieldModel","CustomField","click .add-field","click .edit-field","click .delete-field","click .btn-sort-alpha","contacts","ContactCustomField","fieldModelName","CompanyCustomField","projects","ProjectCustomField","actionItems","ActionItemCustomField","punchlists","PunchlistCustomField","ChangeOrderCustomField","primeContracts","directcosts","invoicing","PayableInvoiceCustomField","ReceivableInvoiceCustomField","schedule","ScheduleCustomField","submittals","SubmittalCustomField","users","UserCustomField","language","zeroRecords","sortableOptions","containment","bSort","onRowDoubleClick","editField","contextMenuOptions","actions","onClick","isDanger","deleteField","searchable","content","addClicked","newField","fieldType","fieldTypes","TEXT","isRequired","description","names","push","editClicked","EditCustomFieldModal","newSort","addRow","hasChanged","isNew","save","onClose","onDelete","cid","removeRow","deleteClicked","sortNumber","attributes","newNumber","DeleteCancel","fetchCollection","sortFieldsAlpha","put","choice","click .btn-delete-choice","click .btn-add-choice","click .field-save","click .field-close","click .field-delete","keydown .input-default-integer","change .input-multiple-choice","click .btn-is-required","colorpickerChange","keyup .colorpicker-input-box","change .cb-read-only","renderColorPicker","DATE","DATETIME","Datepicker","isShowTimezone","datepickerOptions","defaultDate","format","dateHelpers","dateFormats","datePicker","DATE_TIME","MONEY","inputMaskCurrency","PERCENT","inputMaskDecimal","BOOL","CHOICE","defaultId","defaultChoice","choices","choicePicker","updateChoicePicker","renderChoices","updateChoices","$choices","empty","sortBy","filter","renderChoice","append","class","find","$choice","isDirty","self","fieldSortable","Sortable","items","connectWith","onStop","colorPicker","ColorPicker","color","autoInputFallback","setBGColor","keyCode","blur","setColor","getColor","isDuplicate","addChoice","newChoice","CustomFieldChoice","choiceName","last","focus","deleteChoice","checkAllSub","isChecked","checked","$visible","$editable","removeModal","close","SaveDontSave","onDontSave","numbersOnly","delete","fetchModel","sortChoicesAlpha","newModel","DailyReportSettings","DirectCostSettings","FinanceCoreFieldSettings","click .cb-visible","click .cb-required","fnRender","isVisible","canEdit","fetchPrimeContractFieldSettings","financeCoreFields","primeContacts","primeContract","fetchCommitmentFieldSettings","commitment","fetchCommitmentChangeOrderFieldSettings","changeOrder","fetchPrimeContractChangeOrderFieldSettings","fetchReceivableInvoiceFieldSettings","invoices","receivableInvoice","fetchPayableInvoiceFieldSettings","payableInvoice","fetchDirectCostFieldSettings","directCosts","directCost","isVisibleChanged","isRequiredChanged","GroupSettings","click .add-group","click .edit-group","click .delete-group","click tr","click .merge-groups","click .link-groups","linkStatus","HAS_GROUPS_LINKED","ENABLE_DIRECTORY","groupLevels","GROUP_LEVELS","pageLength","groupArr","groups","groupName","editGroup","deleteGroup","defaultContent","includes","replace","date","parseDateString","getDateString","groupLevelSelect","deleteButtonText","deleteButtonColorClass","declineButtonText","declineButtonColorClass","onCancel","newGroup","groupModel","groupDescription","createdOn","Date","group","changeLinked","isLinked","GroupLinkModal","onSuccess","extra","EditGroupModal","_this4","sortGroupsAlpha","getValue","selectGroup","ctrlKey","toggleClass","checkMergeButton","rows","mergeGroups","groupArray","MergeGroupsModal","page","draw","click .merge-save","click .merge-close","mergePicker","splitGroups","mergeInto","loader","Loader","click .group-save","click .group-close","click .group-delete","focusout .group-desc","focusout .group-desc-sub","click .btn-new-parent","click .btn-existing-parent","click .btn-new-sub-parent","click .btn-existing-sub-parent","click .change-to-existing","click .change-to-existing-sub","groupTwoPicker","updateTotal","liveSearch","groupThreePicker","showExistButtons","show","subShow","groupTwoNew","groupTwoExisting","_toConsumableArray","Set","item","arr","groupThreeNew","groupThreeExisting","match","errorMsg","groupId","renderError","fileUploader","files","FileUploaderGrid","canUpload","dictDefaultMessage","canDelete","isRemoveOnComplete","result","PayableInvoiceSettings","_this5","ReceivableInvoiceSettings","_this6","meetings","MeetingSettings","SettingsNav","click .settings-nav-item","click .cb-enable-contact-core-field-settings","renderAccountSettings","saveToolbar","toolbars","SettingsSaveToolbar","companyInfoSettings","activateNavItem","navItemClicked","tab","tabUpper","router","navigate","trigger","renderAddressBookSettings","renderOrderingSettings","renderProjectSettings","renderBidFormSettings","renderScheduleSettings","renderRFISettings","renderDailyReportSettings","renderPunchListSettings","renderActionItemSettings","renderCostCodeSettings","renderTaxCodeSettings","renderTimeCardSettings","renderPrimeContractSettings","renderGroupSettings","renderRegionSettings","renderCommitmentSettings","renderInvoicingSettings","renderDirectCostSettings","renderMeetingSettings","renderUserTypeSettings","renderUsers","renderSSO","renderSubmittalSettings","renderIntegrations","renderChangeRequestSettings","renderFeatureSettings","bidFormSettings","bidForms","Settings","addSaveModel","isDefaultSettings","TemplateManagement","integrationSettings","integrations","IntegrationsList","initOptions","featureSettings","FeatureSettings","FeatureSetting","scheduleSettings","TaskStatuses","orderingSettings","fetchOrderingSettings","PlanRoomOrderingSettings","addressBookSettings","fetchAddressBookSettings","fetchCompanyCustomFields","companyFieldSettings","fetchContactCustomFields","contactFieldSettings","renderContactCoreFieldSettings","$fields","ENABLE_CONTACT_FIELD_SETTINGS","contactCoreFieldSettings","enableContactCoreFieldSettings","enable","planroomSettings","fetchPlanRoomSettings","PlanRoomGeneralSettings","fetchProjectCustomFields","customFieldSettings","ProjectStatuses","MessageStatuses","ENABLE_PROJECT_STATUS_ID","fetchProjectStatuses","ProjectStatusList","ProjectNDAs","rfiCustomFieldSettings","fetchRFICustomFields","rfi","rfiSettings","fetchRFISettings","RFISettings","dailyReportSettings","punchListSettings","fetchPunchListCustomFields","punchlistTemplates","actionItemSettings","fetchActionItemCustomFields","actionItemTemplates","costCodeSettings","CostCodeSettings","costTypeSettings","CostTypeSettings","taxCodeSettings","TaxCodeSettings","timeCardSettingsView","timeCardSettings","timecards","TimeCardSettings","timeCardCategories","TimeCardCategories","categories","groupSettings","fetchUserGroups","Group","bidPackages","templateType","regionSettings","RegionSettings","changeRequestSettings","changeRequestCustomFields","changeRequests","CustomFields","changeRequestCustomFieldSettings","primeContractSettings","primeContractCustomFields","PrimeContractSettings","TermsList","primeContractCustomFieldSettings","primeContractCOSettings","primeContractCOCustomFields","ChangeOrderCustomFields","ChangeOrderSettings","PrimeContractChangeOrderSettings","primeContractCOCustomFieldSettings","commitmentSettings","commitmentCustomFields","_this7","commitmentCustomFieldSettings","commitmentCOSettings","commitmentCOCustomFields","commitmentCOCustomFieldSettings","payableInvoiceSettings","payableInvoiceCustomFields","PayableInvoiceCustomFields","payableInvoiceCustomFieldSettings","receivableInvoiceSettings","receivableInvoiceCustomFields","ReceivableInvoiceCustomFields","receivableInvoiceCustomFieldSettings","meetingCustomFields","meetingSettings","meetingCustomFieldSettings","meetingTemplates","directCostCustomFields","directCostSettings","directCostCustomFieldSettings","userTypeSettings","fetchUserTypes","types","UserTypeSettings","UserType","userManagement","fetchUsers","UserSettings","fetchUserCustomFields","userCustomFieldSettings","ssoSettings","fetchSSOProviders","providers","SSOSettings","submittalSettings","submittalTemplates","submittalStatuses","SubmittalStatusSettings","fetchSubmittalCustomFields","submittalFieldSettings","numberFormatHelpers","createFormatStringPreview","numberFormat","token","isText","label","numberFormatProperty","editButton","on","edit","renderFormatString","NumberFormatEditModal","parentView","click a.new-token","click .edit-token","change .input-ct-min-len","click .cancel-edit-token","click .delete-token","click .save-token","click .save","beforeModalCreated","_beforeModalCreated","_asyncToGenerator","_regeneratorRuntime","mark","_callee","numFmt","wrap","_context","prev","next","tokens","category","isDate","dateFormatId","fetchERPIntegration","erpIntegration","sent","project","customField","INT","stop","apply","arguments","_this8","editRow","dateFormatSelectPicker","datatable","a","b","onTableDraw","inputmask","regex","commitmentNumberTokenDateFormatNames","_row$minLength","minLength","className","dom","counterMinLengthChanged","minLen","isNaN","addToken","tokenIndex","newToken","clone","isAdding","editToken","invalidate","cancelEdit","deleteToken","saveToken","saveFormat","i","click .btn-ordering-save","click .btn-payment-info","HIDE_SAVE_PAYMENT_INFO","changePaymentInfo","PaymentInfoModal","saveSettings","patch","click .btn-save","click .btn-cancel","keyup .input-card-number","click .btn-edit","click .btn-copy-profile","Contact","PaymentInfo","today","isEdit","inputMaskCreditCard","monthPicker","yearPicker","setCardBrand","copyProfile","cardBrand","paymentHelpers","getCardIssuer","icon","getCardIssuerIconFAClass","$prepend","emailValid","validators","validateEmail","isContactValid","isAddressValid","isStateValid","isCityValid","isZipValid","isPhoneValid","isCardValid","validateCreditCard","isYearValid","isMonthValid","cardNumber","cancel","_this9","_this10","keydown .input-default-bid-due-time","contextmenu .input-default-bid-due-time","click .input-project-user-2-show","enableFax","ENABLE_FAX","showGroupCompanyView","PROJECT_WALL_ADMIN_VIEW_GROUP_COMPANY","showGroupContactView","PROJECT_WALL_ADMIN_VIEW_GROUP_CONTACT","showCompanyView","PROJECT_WALL_ADMIN_VIEW_COMPANY","showContactView","PROJECT_WALL_ADMIN_VIEW_CONTACT","createDefaultItbMethodArray","isTimeOnly","dateVal","time","amPm","changed","itbPicker","defaultArray","newValue","showUser2Changed","click .add-message-status","click .edit-message-status","click .delete-message-status","click .save-message-status","click .cancel-edit-message-status","keydown .input-message-status","planRoomSettings","messageStatuses","targets","display","messageStatusContext","disabledAttr","disableCommasAndPipes","preventDefault","addStatusClicked","PlanRoomSettings","canParticipantSet","editStatusClicked","deleteStatus","toArray","messageStatusConstructor","_ref","statusSave","status","$name","isNameValid","indexOf","cancelEditStatus","click .add-project-status","click .edit-project-status","click .delete-project-status","click .save-project-status","click .cancel-edit-project-status","keydown .input-project-status","keydown .input-activity-rank","projectStatuses","filteredData","sNameLower","startReorder","projectStatusContext","disableNumbers","backgroundColor","foregroundColor","activityRank","editStatus","newArray","saveReorder","array","isNull","node","undefined","projectStatusConstructor","_ref2","isColorValid","$rank","isRankValid","colorHelpers","idealLinkColorForBackground","errorText","click .btn-edit-project-status","click .btn-delete-project-status","click .btn-save-project-status","click .btn-cancel-edit-project-status","rowCallback","isShown","deleteProjectStatus","buttons","editProjectStatusClicked","projectStatus","fnEdit","eps","defaultColor","substring","changeDefaultAlert","newProjectStatus","returnCopy","copyProjectStatuses","resetData","copy","newPs","returnName","u","fnAdd","ProjectStatus","isDefault","projectStatusColor","projectStatusSave","deleteProjectStatusClicked","fnDelete","dps","cancelEditProjectStatus","click .btn-add-nda","click .btn-edit-nda","click .btn-delete-nda","fetchNDAs","ndas","editNDA","deleteNDA","addNDAClicked","newNda","ProjectNDA","editNDAClicked","nda","EditProjectNDAModal","deleteNDAClicked","Region","BaseModel","idAttribute","notifyName","Regions","BaseCollection","click .add-region","click .btn-edit-region","click .btn-delete-region","click .btn-save-region","click .btn-cancel-edit-region","onFetch","regionContext","_defineProperty","newRegion","regionDescription","editRegion","deleteRegion","region","regionSave","cancelEditRegion","afterInit","companyName","cardholderName","address1","address2","city","zip","phone","phoneExt","email","expMonth","expYear","parse","OrderingSettings","AddressBookSettings","manageSignature","signatures","SignatureSubmitModal","fetchSignature","onSubmit","cb","sso","providerNames","AZURE_AD","OKTA","ONELOGIN","OTHER","Provider","params","getProviderName","refreshProvisioningToken","toJSON","response","provisioningToken","guid","afterSave","Providers","click .btn-add-provider","click .btn-edit-provider","click .btn-delete-provider","enablePermissions","editProvider","deleteProvider","note","provider","EditSSOProviderModal","isUpdatingCertificate","change .cb-enable-provisioning","click .btn-refresh-provisioning-token","click .btn-update-certificate","click .btn-delete","provisioningChanged","provisioningEnabled","updateCertificate","isSignOnUrlValid","isIssuerValid","isCertificateValid","restore","click .edit-terms","click .delete-terms","click .add-terms","fetchCommitmentTerms","termsCollection","fetchPrimeContractTerms","editTerms","addTermsClicked","newTerm","terms","editTermsClicked","EditTermsModal","term","deleteTermsClicked","deleteTerms","click .btn-close","termsEditor","HTMLEditor","editorHeight","isHideTokens","contents","change .cb-enable-line-items","change .cb-enable-clock-in","click .add-timecard-category","click .btn-save-category","click .btn-edit-category","click .btn-cancel-edit-category","click .btn-delete-category","_this11","fetchCostTypes","costTypes","renderCategoryTable","costType","categoryContext","categoryDataTable","enableClockInChanged","enableOvertime","enableDoubletime","addCategory","newCategory","TimeCardCategory","editCategory","saveCategory","cancelEditCategory","deleteCategory","userSeats","userLimits","change .cb-enable-permissions","click .btn-add-user","click .btn-edit-user-perms","click .btn-edit-user","click .btn-delete-user","click .btn-edit-notification-settings","click .btn-change-seats","click .btn-change-limits","ENABLE_PERMISSIONS","IS_DOCUMENT_CLERK","columnData","createdDate","notificationButton","hasPermission","renderUserSeats","editUser","column","notificationSettings","editPermissions","deleteUser","$userSeats","fetchUserLimits","showButtons","FREE","manageUserSeats","UserSeatsManagementModal","manageUserLimits","UserLimitsManagementModal","fnNew","newUser","User","contactName","username","pmUser","itbUser","userTypeId","getDefault","notificationSettingsClicked","NotificationSettingsEditorModal","editPermissionsClicked","permissions","PermissionsEditorModal","BaseEditContactModal","isShowCloseButton","selectedSubscriptionId","click .btn-add-seat","click .btn-remove-seat","keyup .input-user-seats","getCostsPerUser","costs","changeCosts","activeUsers","where","select","userSeatAdded","userSeatsChanged","userSeatRemoved","userSeatsInputChanged","$err","$btnSave","$payment","renderTotal","cost","BASIC","basic","PRO","pro","ENTERPRISE","enterprise","$pOuter","newUserSeats","formatCurrency","err","changeUserSeats","click .btn-add-itb-seat","click .btn-add-pm-seat","click .btn-remove-pm-seat","click .btn-remove-itb-seat","keyup .input-itb-user-seats","keyup .input-pm-user-seats","fnFetchUsers","itbUsers","pmUsers","renderHeader","pmUserSeatAdded","pmUserSeatRemoved","seats","pmUserSeatsInputChanged","itbUserSeatAdded","itbUserSeatRemoved","itbUserSeatsInputChanged","click .add-user-type","click .btn-edit-ut-perms","click .btn-edit-user-type","click .btn-delete-user-type","click .btn-save-user-type","click .btn-cancel-edit-user-type","click .add-company-user-type","click .btn-edit-company-ut-perms","click .btn-edit-company-user-type","click .btn-delete-company-user-type","click .btn-save-company-user-type","click .btn-cancel-edit-company-user-type","click .btn-edit-company-user-type-notification-settings","colorpickerCreate","Users","companyDataTable","deleteUserType","userTypeContext","deleteCompanyUserType","createColorPickerBind","io","string","colorpicker","setColorPickerValue","refreshDataTables","changeDefaultTypeAlert","copyUserTypes","newUserType","newUt","isCompanyUser","userTypeColor","addCompanyClicked","companyNotificationSettingsClicked","newUserTypes","editCompanyPermissionsClicked","editUserTypeClicked","editUserType","eut","editCompanyUserTypeClicked","editCompanyUserType","deleteUserTypeClicked","dut","userHasType","ChangeUserTypeModal","deleteCompanyUserTypeClicked","userTypeSave","companyUserTypeSave","cancelEditUserType","cancelEditCompanyUserType","subtitle","click .user-type-change-done","paginate","getByUserType","checkUsersLength","checkDone"],"mappings":"4gQAAAA,IAAAC,MAAAC,SAAA,GACAF,IAAAG,OAAAD,SAAA,GACAF,IAAAI,YAAAF,SAAA,GAEAF,IAAAK,QAAAH,SAAA,CACAI,UAAA,GACAC,OAAA,CACA,CACAC,MAAA,+BACAC,KAAA,eACAC,SAAA,SAAAC,EAAAC,GACA,IAAAZ,IAAAa,KAAAC,QAAA,CACAC,SAAAf,IAAAgB,QAAAC,WAAAC,iBAAA,CACA,CACAH,SAAA,eAEA,CACAA,SAAA,WAEA,CACAA,SAAA,SAEA,CACA,CACAI,UAAA,SACAC,MAAAT,GAEA,CACAQ,UAAA,OACAC,MAAAR,OAGAS,OAAAC,KAAA,WACAtB,IAAAuB,IAAAC,cAAA,CACAC,WAAA,WACAC,YAAA,CACAC,YAAAf,SAMA,CACAJ,MAAA,WACAC,KAAA,WACAC,SAAA,WACAV,IAAAuB,IAAAC,cAAA,CACAC,WAAA,eAIA,CACAjB,MAAA,mBACAC,KAAA,cACAC,SAAA,WACAV,IAAAuB,IAAAC,cAAA,CACAC,WAAA,WACAC,YAAA,CACAE,SAAA,WAEAC,aAAA,MAIA,CACArB,MAAA,uBACAC,KAAA,sBACAC,SAAA,WACAV,IAAAuB,IAAAC,cAAA,CACAC,WAAA,eAIA,CACAjB,MAAA,mCACAC,KAAA,WACAC,SAAA,SAAAoB,GACA9B,IAAAuB,IAAAC,cAAA,CACAC,WAAA,WACAC,YAAA,CACAI,eAAAC,SAAAD,QAKA,CACAtB,MAAA,oBACAC,KAAA,kBACAC,SAAA,WACAV,IAAAuB,IAAAC,cAAA,CACAC,WAAA,eAIA,CACAjB,MAAA,mBACAC,KAAA,kBACAC,SAAA,SAAAsB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SAAApR,GACA,IAAA4G,EAAAtI,EAAA0B,EAAAC,eAEAxC,EADAR,KAAA8N,UAAAkB,OAAArF,EAAAmF,QAAA,OACA5I,OAEAlG,KAAA8lC,SAAAtlC,IAEAslC,SAAA,SAAAtlC,GACA,IAAAnE,IAAAC,MAAAgV,SAAAm2B,qBAAA,CACAlnC,MAAAC,EACAkE,OAAA9D,EAAAC,KAAA,SAAAL,GACAA,EAAA+T,cACA/T,EAAAiU,KAAA,KAAA,CACAhS,QAAA,IAGAzC,KAAA8N,UAAA3I,UACAnF,KAAA+tC,oBACA/tC,MACA0U,QAAA9T,EAAAC,KAAA,SAAAL,GACAA,EAAA+T,eACA/T,EAAAE,MAAA,CACAC,QAAAC,EAAAC,KAAA,WACAb,KAAA8N,UAAA3I,WACAnF,QAEAA,KAAA+tC,qBAEA/tC,MACA2U,SAAA/T,EAAAC,KAAA,SAAAL,GACA,IAAAiO,EAAAzO,KAAA8N,UAAAkB,OAAAxO,EAAAoU,KACA5U,KAAA0S,MAAAtP,OAAA5C,GACA,MAAAiO,GACAzO,KAAA8N,UAAA+G,UAAApG,GAEAzO,KAAA+tC,oBACA/tC,SAGA+tC,iBAAA,WACA,IAAA/tC,KAAA0S,MAAAo7B,cAAA9tC,KAAAC,QAAAinC,YAAA79B,QACArJ,KAAAqB,EAAA,0BAAAuI,KAAA,YAAA,IAGAokC,UAAA,WACA,IAAAhuC,KAAA0S,MAAAo7B,cAAA9tC,KAAAC,QAAAinC,YAAA79B,SACArJ,KAAAC,QAAA0U,SACA3U,KAAAia","file":"app.js","sourcesContent":["PJQ.views.settings = {};\nPJQ.models.settings = {};\nPJQ.collections.settings = {};\n\nPJQ.modules.settings = {\n oldRoutes: [],\n routes: [\n {\n route: '?procore=:procore&code=:code',\n name: 'procoreRefer',\n callback: function (procore, code) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'integration'\n },\n {\n endpoint: 'procore'\n },\n {\n endpoint: 'link'\n }\n ], [\n {\n parameter: 'userId',\n value: procore\n },\n {\n parameter: 'code',\n value: code\n }\n ])\n }).post().done(function () {\n PJQ.app.initNavigator({\n activeItem: 'settings',\n viewOptions: {\n procoreCode: code\n }\n });\n });\n }\n },\n {\n route: \"settings\",\n name: 'settings',\n callback: function () {\n PJQ.app.initNavigator({\n activeItem: \"settings\"\n });\n }\n },\n {\n route: \"settings/billing\",\n name: 'billingInfo',\n callback: function () {\n PJQ.app.initNavigator({\n activeItem: \"settings\",\n viewOptions: {\n initView: \"billing\"\n },\n preventTour: true\n });\n }\n },\n {\n route: 'settings/addressbook',\n name: 'addressBookSettings',\n callback: function () {\n PJQ.app.initNavigator({\n activeItem: \"settings\"\n });\n }\n },\n {\n route: 'settings/account/:subscriptionId',\n name: 'settings',\n callback: function (subscriptionId) {\n PJQ.app.initNavigator({\n activeItem: \"settings\",\n viewOptions: {\n subscriptionId: parseInt(subscriptionId)\n }\n });\n }\n },\n {\n route: 'settings/projects',\n name: 'projectSettings',\n callback: function () {\n PJQ.app.initNavigator({\n activeItem: \"settings\"\n });\n }\n },\n {\n route: 'settings/:module',\n name: 'projectSettings',\n callback: function (module) {\n PJQ.app.initNavigator({\n activeItem: \"settings\",\n viewOptions: {\n initView: module\n }\n });\n }\n },\n {\n route: \"settings/integrations/:name\",\n name: 'integration',\n callback: function (name) {\n PJQ.app.initNavigator({\n activeItem: \"settings\",\n viewOptions: {\n initView: \"integrations\",\n integrationName: name\n },\n preventTour: true\n });\n }\n },\n {\n route: \"settings/integrations/:name?authorized=:authorized\",\n name: 'integrationAuth',\n callback: function (name, authorized) {\n PJQ.app.initNavigator({\n activeItem: \"settings\",\n viewOptions: {\n initView: \"integrations\",\n integrationName: name,\n authorized: authorized === 'true'\n },\n preventTour: true\n });\n }\n },\n ]\n};\n\nPJQ.app.addOldRoutes(PJQ.modules.settings.oldRoutes);\nPJQ.app.addRoutes(PJQ.modules.settings.routes);\n","PJQ.views.settings.CompanyInfo = PJQ.views.BaseView.extend({\n\tdefaults: {\n\t\ttemplate: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'Company-Info'),\n\t\tsubTemplates: {\n\t\t\tsubscription: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'subscription-info'),\n\t\t},\n\t\tonChange: null\n\t},\n\tevents: {\n\t\t\"mouseup .btn-password-reset-modal\": \"resetPasswordModal\",\n\t\t'change .cb-directory-status': 'directoryStatusChanged',\n\t\t\"keyup input[type='text']\": \"onChange\",\n\t\t'change .user-procore-link': 'procoreLink',\n\t\t'click .btn-join-directory': 'joinDirectory',\n\t\t'click .btn-enable-auto-renew': 'enableAutoRenew',\n\t\t'click .btn-disable-auto-renew': 'disableAutoRenew',\n\t\t'click .btn-edit-card': 'changeCard'\n\t},\n\tbeforeFirstRender: function () {\n\t\tif (this.options.procoreCode)\n\t\t\tPJQ.app.session.preferences.setPref(PJQ.constants.preferenceTypes.PROCORE_ACCESS_REFRESH_TOKEN, 'code:' + this.options.procoreCode);\n\n\t\tthis.model = PJQ.app.session.user;\n\t\tif (!this.model.isFetched) {\n\t\t\tthis.model.fetch({\n\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\tthis.render();\n\t\t\t\t\tthis.listenTo(this.model, 'fetch', this.render);\n\t\t\t\t}, this)\n\t\t\t});\n\t\t}\n\t},\n\tbeforeRender: function () {\n\t\tthis.renderData = {\n\t\t\tmodel: this.model\n\t\t}\n\t},\n\tafterRender: function () {\n\t\tif (this.model == null || !this.model.isFetched) {\n\t\t\treturn;\n\t\t}\n\n\t\tPJQ.helpers.inputHelpers.inputMaskPhone(this.$('.input-user-phone'));\n\t\tPJQ.helpers.inputHelpers.inputMaskPhone(this.$('.input-user-cell'));\n\t\tPJQ.helpers.inputHelpers.inputMaskPhone(this.$('.input-user-fax'));\n\n\t\tif (PJQ.app.session.get('portalId') === PJQ.constants.panteraPortalId) {\n\t\t\tnew PJQ.inputs.Selectpicker({\n\t\t\t\tel: this.$('.select-company-type'),\n\t\t\t\thideDisabled: true,\n\t\t\t\tdefaultValue: this.model.get('companyType'),\n\t\t\t\tonChange: _.bind(function (value) {\n\t\t\t\t\tthis.model.set('companyType', value);\n\t\t\t\t\tthis.onChange();\n\t\t\t\t}, this)\n\t\t\t});\n\t\t}\n\n\t\tthis.statePicker = new PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('.user-edit-state'),\n\t\t\tdefaultValue: _.size(this.model.get('state')) > 0 ? this.model.get('state').toLowerCase() : null,\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tthis.model.set('state', value.toUpperCase());\n\t\t\t\tthis.onChange();\n\t\t\t}, this)\n\t\t});\n\t\tthis.countryChanged();\n\n\t\tnew PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('.user-edit-country'),\n\t\t\tnoneSelectedText: 'Select Value',\n\t\t\tdefaultValue: _.size(this.model.get('country')) > 0 ? this.model.get('country').toLowerCase() : null,\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tthis.model.set('country', value.toUpperCase());\n\t\t\t\tthis.model.set('zip', '');\n\t\t\t\tthis.model.set('state', '');\n\t\t\t\tthis.countryChanged();\n\t\t\t\tthis.onChange();\n\t\t\t}, this)\n\t\t});\n\n\t\t$(function () {\n\t\t\t$('[data-toggle=\"tooltip\"]').tooltip()\n\t\t});\n\t\tnew PJQ.Binder(this.$el, this.model, {\n\t\t\tafterChange: _.bind(function () {\n\t\t\t\tthis.onChange();\n\t\t\t}, this)\n\t\t});\n\n\t\tif (this.options.procoreCode) {\n\t\t\tPJQ.notifications.notify.successNotify({\n\t\t\t\tmessage: 'Your Procore login has been linked to your Pantera account.'\n\t\t\t});\n\t\t\tthis.options.procoreCode = null;\n\t\t}\n\n\t\tif (PJQ.app.session.get('portalId') === PJQ.constants.panteraPortalId) {\n\t\t\tthis.renderSubscriptionInfo();\n\t\t\tthis.renderDirectoryStatus();\n\t\t}\n\t},\n\tdirectoryStatusChanged: function (e) {\n\t\tlet isActive = $(e.currentTarget).prop('checked');\n\t\tif (isActive) {\n\t\t\tthis.joinDirectory();\n\t\t}\n\t\telse {\n\t\t\tthis.leaveDirectory();\n\t\t}\n\t},\n\tjoinDirectory: function () {\n\t\tPJQ.app.session.joinDirectory(_.bind(function () {\n\t\t\tthis.$(\".directory-alert\").remove();\n\t\t\tthis.renderDirectoryStatus();\n\t\t}, this));\n\t},\n\tleaveDirectory: function () {\n\t\tPJQ.app.session.leaveDirectory(_.bind(function () {\n\t\t\tthis.renderDirectoryStatus();\n\t\t}, this));\n\t},\n\trenderDirectoryStatus: function () {\n\t\tlet isActive = PJQ.app.session.contact != null && !PJQ.app.session.contact.get('isBlacklisted');\n\t\tthis.$('.directory-status-label').html(isActive ? 'Active' : 'Inactive').css('color', isActive ? PJQ.constants.colors.GREEN : PJQ.constants.colors.RED);\n\t\tthis.$('.cb-directory-status').prop('checked', isActive);\n\t},\n\tonChange: function () {\n\t\tif (typeof this.options.onChange === 'function') {\n\t\t\tthis.options.onChange(this.model);\n\t\t}\n\t},\n\trenderSubscriptionInfo: function () {\n\t\tif (!PJQ.app.session.get('onAccount') && PJQ.app.session.get('portalId') === PJQ.constants.panteraPortalId) {\n\t\t\tPJQ.app.session.listenSubscriptionChanged(\"accountSettings\", _.bind(function () {\n\t\t\t\tthis.renderSubscriptionInfo();\n\t\t\t}, this));\n\t\t\tPJQ.app.session.fetchBillingInfo(_.bind(function (billingInfo) {\n\t\t\t\tthis.renderSubTemplate(false, this.options.subTemplates.subscription, this.$('.subscription-info'), {\n\t\t\t\t\tsubscription: PJQ.app.session.subscription,\n\t\t\t\t\tbillingInfo: billingInfo\n\t\t\t\t});\n\t\t\t}, this));\n\t\t}\n\t},\n\tenableAutoRenew: function () {\n\t\tPJQ.app.session.updateAutoRenew(true, _.bind(function () {\n\t\t\tthis.renderSubscriptionInfo();\n\t\t\tPJQ.notifications.notify.successNotify({\n\t\t\t\tmessage: \"Auto renew successfully enabled\"\n\t\t\t});\n\t\t}, this), _.bind(function () {\n\t\t\tPJQ.notifications.notify.errorNotify({\n\t\t\t\tmessage: \"Encountered an error enabling auto renew. Please contact customer service,\"\n\t\t\t});\n\t\t}, this));\n\t},\n\tdisableAutoRenew: function () {\n\t\tnew PJQ.views.subscriptions.DisableAutoRenewModal({\n\t\t\tsubscription: PJQ.app.session.subscription,\n\t\t\tonYes: _.bind(function () {\n\t\t\t\tPJQ.app.session.updateAutoRenew(false, _.bind(function () {\n\t\t\t\t\tthis.renderSubscriptionInfo();\n\t\t\t\t\tPJQ.notifications.notify.successNotify({\n\t\t\t\t\t\tmessage: \"Auto renew successfully disabled\"\n\t\t\t\t\t});\n\t\t\t\t}, this), _.bind(function () {\n\t\t\t\t\tPJQ.notifications.notify.errorNotify({\n\t\t\t\t\t\tmessage: \"Encountered an error disabling auto renew. Please contact customer service,\"\n\t\t\t\t\t});\n\t\t\t\t}, this));\n\t\t\t}, this)\n\t\t});\n\t},\n\tchangeCard: function () {\n\t\tPJQ.app.session.fetchBillingInfo(_.bind(function (billingInfo) {\n\t\t\tnew PJQ.views.payment.PaySimplePaymentModal({\n\t\t\t\tmodel: billingInfo,\n\t\t\t\tonSave: _.bind(function () {\n\t\t\t\t\tthis.renderSubscriptionInfo();\n\t\t\t\t\tPJQ.notifications.notify.successNotify({\n\t\t\t\t\t\tmessage: \"You have successfully updated your card on file.\"\n\t\t\t\t\t});\n\t\t\t\t}, this),\n\t\t\t\tonError: function () {\n\t\t\t\t\tPJQ.notifications.notify.errorNotify({\n\t\t\t\t\t\tmessage: \"Encountered an error updating your card. Please contact customer service.\"\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}, this));\n\t},\n\tresetPasswordModal: function () {\n\t\tnew PJQ.views.settings.ResetPasswordModal();\n\t},\n\tcountryChanged: function () {\n\t\tlet country = _.size(this.model.get('country')) > 0 ? this.model.get('country').toLowerCase() : 'us',\n\t\t\toptions = '';\n\t\t_.each(PJQ.constants.states[country], function (state) {\n\t\t\toptions += '';\n\t\t});\n\t\tthis.statePicker.$el.html(options);\n\t\tthis.statePicker.refresh();\n\t\tif (_.size(this.model.get('state')) > 0)\n\t\t\tthis.statePicker.setValue(this.model.get('state').toLowerCase());\n\n\t\tPJQ.helpers.inputHelpers.inputMaskZip(this.$('.user-edit-zip'), country);\n\t},\n\tvalidate: function () {\n\t\tlet errors = 0;\n\t\tlet isValid = true;\n\n\t\tlet isCompanyValid = _.size(this.model.get('companyName').trim()) > 0;\n\t\tPJQ.helpers.inputHelpers.setInputError(this.$('.input-user-company-name'), isCompanyValid);\n\t\tisValid = isCompanyValid && isValid;\n\t\tif (!isValid) {\n\t\t\terrors += 1\n\t\t}\n\n\t\treturn !!(isValid && errors === 0);\n\t},\n\tprocoreLink: function () {\n\t\tlet isLinked = PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.PROCORE_ACCESS_REFRESH_TOKEN);\n\t\tif (isLinked) {\n\t\t\tnew PJQ.views.modals.YesNo({\n\t\t\t\theader: \"Remove Procore User Link?\",\n\t\t\t\tbody: \"Are you sure you would like to remove your link between Pantera and Procore? \",\n\t\t\t\tonYes: _.bind(function () {\n\n\t\t\t\t\tnew PJQ.ajax.Request({\n\t\t\t\t\t\tendpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tendpoint: 'integration'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tendpoint: 'procore'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tendpoint: 'unlink'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t])\n\t\t\t\t\t}).post().done(_.bind(function (data) {\n\t\t\t\t\t\tPJQ.app.session.preferences.deletePref(PJQ.constants.preferenceTypes.PROCORE_ACCESS_REFRESH_TOKEN);\n\t\t\t\t\t\tPJQ.notifications.notify.successNotify({\n\t\t\t\t\t\t\tmessage: 'Your Procore login has been unlinked from your Pantera account.'\n\t\t\t\t\t\t});\n\t\t\t\t\t}, this));\n\n\t\t\t\t}, this),\n\t\t\t\tonNo: _.bind(function () {\n\t\t\t\t\tthis.$('.user-procore-link').prop('checked', true);\n\t\t\t\t}, this)\n\t\t\t});\n\n\t\t}\n\t\telse {\n\t\t\tnew PJQ.views.modals.YesNo({\n\t\t\t\theader: \"Link Procore Account\",\n\t\t\t\tbody: \"Are you sure you want to link your Procore account? Please note this will redirect you to Procore to sign in and authorize the link.\",\n\t\t\t\tonYes: _.bind(function () {\n\t\t\t\t\tlet redirect = window.location.origin + '?procore=' + PJQ.app.session.user.id.toString(),\n\t\t\t\t\t\turl = PJQ.app.session.preferences.getPref(PJQ.constants.preferenceTypes.PROCORE_URL_AUTH) + '/oauth/authorize?response_type=code&client_id=' + PJQ.app.session.preferences.getPref(PJQ.constants.preferenceTypes.PROCORE_CLIENT_ID) + '&redirect_uri=' + encodeURIComponent(redirect);\n\t\t\t\t\tdocument.location = url;\n\t\t\t\t}, this),\n\t\t\t\tonNo: _.bind(function () {\n\t\t\t\t\tthis.$('.user-procore-link').prop('checked', false);\n\t\t\t\t}, this)\n\t\t\t});\n\n\t\t}\n\t}\n});\n\nPJQ.views.settings.ResetPasswordModal = PJQ.views.BaseModal.extend({\n\tbaseOptions: {\n\t\ttemplate: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'Modal-Reset-Password'),\n\t\tisVerticalCenter: false,\n\t\tisShowResetButton: true,\n\t\tresetButtonText: \"Reset Password\",\n\t\tresetButtonColorClass: 'primary',\n\t\tisShowCancelButton: true,\n\t\tcancelButtonText: \"Close\",\n\t\tonReset: _.noop,\n\t\twidth: null,\n\t\tminWidth: null,\n\t\tmaxWidth: null,\n\t\theight: null,\n\t\tminHeight: null,\n\t\tmaxHeight: null,\n\t\tfitHeight: false\n\t},\n\tdefaults: {},\n\toptions: {},\n\tdefaultEvents: {\n\t\t'hidden.bs.modal': 'removeModal',\n\t\t'click .modal-reset': 'onReset',\n\t\t'click .show-hide': 'showHide',\n\t\t'click .show-hide-confirm': 'showHide'\n\t},\n\tevents: {},\n\tbeforeFirstRender: function () {\n\t\tthis.options = _.defaults(this.options, {\n\t\t\tuuid: \"modal-\" + _.uniqueId()\n\t\t});\n\t\t//force element to null in case one was passed in\n\t\t//this view uses modals only so it creates its own container to insert into in the \n\t\tthis.createModal();\n\t\tthis.afterModalCreated();\n\t},\n\tonReset: function () {\n\t\tif (this.errorAlert) {\n\t\t\tthis.errorAlert.destroy();\n\t\t}\n\t\tlet isConfirmValid = true,\n\t\t\tisConfirmLength = true,\n\t\t\terror = \"\",\n\t\t\tnewPass = this.$('.new-pass').val(),\n\t\t\tnewPassConfirm = this.$('.new-pass-confirm').val();\n\n\t\tif (newPass !== newPassConfirm) {\n\t\t\tisConfirmValid = false;\n\t\t\terror += \"Passwords do not match. \";\n\t\t\tthis.errorAlert = new PJQ.Alert(this.$('.error'), {\n\t\t\t\ttype: 'danger',\n\t\t\t\ttext: error\n\t\t\t});\n\t\t}\n\n\t\tif (newPass.trim().length < 7) {\n\t\t\tisConfirmLength = false;\n\t\t\terror += \"Password is too short.\";\n\t\t\tthis.errorAlert = new PJQ.Alert(this.$('.error'), {\n\t\t\t\ttype: 'danger',\n\t\t\t\ttext: error\n\t\t\t});\n\t\t}\n\t\tPJQ.helpers.inputHelpers.setInputError(this.$('.new-pass-confirm'), isConfirmValid);\n\t\tPJQ.helpers.inputHelpers.setInputError(this.$('.new-pass'), isConfirmLength);\n\t\tif ((isConfirmValid && isConfirmLength)) {\n\t\t\tnew PJQ.ajax.Request({\n\t\t\t\tendpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t\t\t{\n\t\t\t\t\t\tendpoint: 'users'\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tendpoint: 'resetpassword'\n\t\t\t\t\t},\n\t\t\t\t]),\n\t\t\t\tdata: {\n\t\t\t\t\tpassword: newPass\n\t\t\t\t}\n\t\t\t}).post().success(_.bind(function (data) {\n\t\t\t\tif (data.success) {\n\t\t\t\t\tthis.options.success = true;\n\t\t\t\t\tthis.options.request = null;\n\t\t\t\t\tthis.$('.password-group').hide();\n\t\t\t\t\tthis.$('.modal-reset').hide();\n\n\t\t\t\t\tthis.errorAlert = new PJQ.Alert(this.$('.error'), {\n\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\ttext: \"Password successfully changed!\"\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (data.error === \"CURRENT_PASSWORD\") {\n\t\t\t\t\t\tthis.errorAlert = new PJQ.Alert(this.$('.error'), {\n\t\t\t\t\t\t\ttype: 'danger',\n\t\t\t\t\t\t\ttext: \"New password matches current password\"\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, this)).fail(_.bind(function () {\n\t\t\t\tthis.options.success = false;\n\t\t\t\tthis.render();\n\t\t\t}, this));\n\t\t}\n\t},\n\tshowHide: function (e) {\n\t\tlet target = $(e.currentTarget),\n\t\t\tshowHide = this.$('.new-pass').attr('type'),\n\t\t\tshowHideConfirm = this.$('.new-pass-confirm').attr('type');\n\t\tif (target.context.id === \"btn-show-hide\") {\n\t\t\tif (showHide === \"password\") {\n\t\t\t\tthis.$('.new-pass').attr('type', \"text\");\n\t\t\t\tthis.$('.show-hide span').removeClass('fa-eye-slash');\n\t\t\t\tthis.$('.show-hide span').addClass('fa-eye')\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.$('.new-pass').attr('type', \"password\");\n\t\t\t\tthis.$('.show-hide span').addClass('fa-eye-slash');\n\t\t\t\tthis.$('.show-hide span').removeClass('fa-eye')\n\t\t\t}\n\t\t}\n\t\tif (target.context.id === \"btn-show-hide-confirm\") {\n\t\t\tif (showHideConfirm === \"password\") {\n\t\t\t\tthis.$('.new-pass-confirm').attr('type', \"text\");\n\t\t\t\tthis.$('.show-hide-confirm span').removeClass('fa-eye-slash');\n\t\t\t\tthis.$('.show-hide-confirm span').addClass('fa-eye')\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.$('.new-pass-confirm').attr('type', \"password\");\n\t\t\t\tthis.$('.show-hide-confirm span').addClass('fa-eye-slash');\n\t\t\t\tthis.$('.show-hide-confirm span').removeClass('fa-eye')\n\t\t\t}\n\t\t}\n\t}\n});\n","PJQ.views.settings.AddressBookGeneralSettings = PJQ.views.BaseView.extend({\n\tdefaults: {\n\t\ttemplate: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'Address-Book-General'),\n\t\tonChange: null\n\t},\n\tbeforeFirstRender: function () {\n\t\tthis.listenTo(this.model, 'fetch', this.render);\n\t},\n\tbeforeRender: function () {\n\t\tthis.showLaborStatus = PJQ.app.session.preferences.getPref(PJQ.constants.preferenceTypes.IS_HIDE_UNION_STATUS) !== true;\n\t\tthis.groupLabel = PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.GROUP_LABEL) ? PJQ.app.session.preferences.getPref(PJQ.constants.preferenceTypes.GROUP_LABEL) : \"Trades\";\n\t\tthis.renderData = {\n\t\t\tmodel: this.model,\n\t\t\tgroupLabel: this.groupLabel,\n\t\t\tnewAddressBook: PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.ENABLE_NEW_ADDRESSBOOK),\n\t\t\tshowLaborStatus: this.showLaborStatus\n\t\t};\n\t},\n\tafterRender: function () {\n\t\tif (!PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.ENABLE_NEW_ADDRESSBOOK)) {\n\t\t\tnew PJQ.inputs.Selectpicker({\n\t\t\t\tel: this.$('.select-company-default-view'),\n\t\t\t\tdefaultValue: (_.size(this.model.get('companyDefaultView')) > 0) ? this.model.get('companyDefaultView') : \"view_group\",\n\t\t\t\tonChange: _.bind(function (value) {\n\t\t\t\t\tthis.model.set('companyDefaultView', value);\n\t\t\t\t\tthis.onChange();\n\t\t\t\t}, this)\n\t\t\t});\n\n\t\t\tnew PJQ.inputs.Selectpicker({\n\t\t\t\tel: this.$('.select-default-view'),\n\t\t\t\tdefaultValue: (_.size(this.model.get('defaultView')) > 0) ? this.model.get('defaultView') : \"view_group\",\n\t\t\t\tonChange: _.bind(function (value) {\n\t\t\t\t\tthis.model.set('defaultView', value);\n\t\t\t\t\tthis.onChange();\n\t\t\t\t}, this)\n\t\t\t});\n\t\t}\n\n\t\tlet defaultFilters = _.map(PJQ.app.session.userTypes.getByIsCompany(false), function (userType) {\n\t\t\treturn userType.get('userTypeId');\n\t\t});\n\t\t$.merge(defaultFilters, [PJQ.constants.addressBook.directoryFilter.PRIVATE_ONLY, PJQ.constants.addressBook.contactStatusFilter.ACTIVE, PJQ.constants.addressBook.contactStatusFilter.INACTIVE]);\n\t\tif (this.showLaborStatus)\n\t\t\t$.merge(defaultFilters, [PJQ.constants.addressBook.laborStatusFilter.UNION, PJQ.constants.addressBook.laborStatusFilter.NON_UNION, PJQ.constants.addressBook.laborStatusFilter.PREV_WAGE, PJQ.constants.addressBook.laborStatusFilter.NOT_AVAILABLE]);\n\t\tthis.filterSelectPicker = new PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('.select-default-filter'),\n\t\t\tisIntChoices: true,\n\t\t\tisMultiple: true,\n\t\t\texclusiveChoices: [-3, -4],\n\t\t\tisGroup: true,\n\t\t\tmustSelectValuePerOptGroup: true,\n\t\t\tdefaultValue: this.model.get('defaultFilters').length > 0 ? this.model.get('defaultFilters').split(',') : defaultFilters,\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tthis.model.set('defaultFilters', value.join())\n\t\t\t\tthis.onChange();\n\t\t\t}, this)\n\t\t});\n\n\t\tthis.locationTypeSelectPicker = new PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('.select-default-location-type'),\n\t\t\tisIntChoices: true,\n\t\t\tisMultiple: true,\n\t\t\tmustSelectValue: true,\n\t\t\tdefaultValue: this.model.get('defaultLocationFilters').length > 0 ? this.model.get('defaultLocationFilters').split(',') : [PJQ.constants.addressBook.locationTypeFilter.WORK_AREA, PJQ.constants.addressBook.locationTypeFilter.OFFICE_LOCATION],\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tthis.model.set('defaultLocationFilters', value.join())\n\t\t\t\tthis.onChange();\n\t\t\t}, this)\n\t\t});\n\n\t\tnew PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('.select-rows-per-page'),\n\t\t\tdefaultValue: this.model.get('rowsPerPage'),\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tthis.model.set('rowsPerPage', value);\n\t\t\t\tthis.onChange();\n\t\t\t}, this)\n\t\t});\n\n\t\t$(function () {\n\t\t\t$('[data-toggle=\"tooltip\"]').tooltip()\n\t\t});\n\t\tnew PJQ.Binder(this.$el, this.model, {\n\t\t\tsetDefaultValues: true,\n\t\t\twatchElements: [\n\t\t\t\t'input'\n\t\t\t],\n\t\t\tafterChange: _.bind(function () {\n\t\t\t\tthis.onChange();\n\t\t\t}, this)\n\t\t});\n\t},\n\tonChange: function () {\n\t\tif (typeof this.options.onChange === 'function') {\n\t\t\tthis.options.onChange(this.model);\n\t\t}\n\t}\n});\n\nPJQ.views.settings.ContactFieldSettings = PJQ.views.BaseView.extend({\n\tdefaults: {\n\t\ttemplate: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'Contact-Core-Fields')\n\t},\n\tevents: {\n\t\t'click .cb-visible-contact': 'contactVisibleChanged',\n\t\t'click .cb-visible-admin': 'adminVisibleChanged',\n\t\t'click .cb-required-contact': 'contactRequiredChanged',\n\t\t'click .cb-required-admin': 'adminRequiredChanged'\n\t},\n\tbeforeFirstRender: function () {\n\t\tPJQ.app.session.fetchContactFieldSettings(null, _.bind(function (fields) {\n\t\t\tthis.collection = fields;\n\n\t\t\tlet fillFields = [\n\t\t\t\t{\n\t\t\t\t\tfieldName: \"active\",\n\t\t\t\t\tname: \"Active\",\n\t\t\t\t\tcanContactEdit: false,\n\t\t\t\t\tisVisibleContact: false,\n\t\t\t\t\tisRequiredContact: false,\n\t\t\t\t\tisRequiredAdmin: false,\n\t\t\t\t\tcanBeRequired: false\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tfieldName: \"companyName\",\n\t\t\t\t\tname: \"Company Name\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tfieldName: \"laborStatus\",\n\t\t\t\t\tname: \"Labor Status\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tfieldName: \"classifications\",\n\t\t\t\t\tname: \"Certifications\",\n\t\t\t\t\tisRequiredContact: false,\n\t\t\t\t\tisRequiredAdmin: false\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tfieldName: \"sector\",\n\t\t\t\t\tname: \"Sector\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tfieldName: \"companyNotes\",\n\t\t\t\t\tname: \"Company Notes\",\n\t\t\t\t\tcanContactEdit: false,\n\t\t\t\t\tisVisibleContact: false,\n\t\t\t\t\tisRequiredContact: false\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tfieldName: \"contactName\",\n\t\t\t\t\tname: \"Contact Name\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tfieldName: \"title\",\n\t\t\t\t\tname: \"Title\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tfieldName: \"address1\",\n\t\t\t\t\tname: \"Address 1\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tfieldName: \"address2\",\n\t\t\t\t\tname: \"Address 2\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tfieldName: \"city\",\n\t\t\t\t\tname: \"City\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tfieldName: \"state\",\n\t\t\t\t\tname: \"State\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tfieldName: \"zip\",\n\t\t\t\t\tname: \"Postal Code\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tfieldName: \"country\",\n\t\t\t\t\tname: \"Country\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tfieldName: \"phone\",\n\t\t\t\t\tname: \"Phone\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tfieldName: \"cell\",\n\t\t\t\t\tname: \"Cell\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tfieldName: \"fax\",\n\t\t\t\t\tname: \"Fax\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tfieldName: \"email\",\n\t\t\t\t\tname: \"Email\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tfieldName: \"contactNotes\",\n\t\t\t\t\tname: \"Contact Notes\",\n\t\t\t\t\tcanContactEdit: false,\n\t\t\t\t\tisVisibleContact: false,\n\t\t\t\t\tisRequiredContact: false\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tfieldName: \"groups\",\n\t\t\t\t\tname: PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.GROUP_LABEL) ? PJQ.app.session.preferences.getPref(PJQ.constants.preferenceTypes.GROUP_LABEL) : \"Groups\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tfieldName: \"workAreas\",\n\t\t\t\t\tname: \"Work Areas\"\n\t\t\t\t}\n\t\t\t];\n\n\t\t\t_.each(fillFields, _.bind(function (field, index) {\n\t\t\t\tlet matchField = this.collection.findWhere({fieldName: field.fieldName});\n\t\t\t\tif (matchField == null) {\n\t\t\t\t\tthis.collection.add(_.defaults(field, {\n\t\t\t\t\t\tisVisibleContact: true,\n\t\t\t\t\t\tisVisibleAdmin: true,\n\t\t\t\t\t\tisRequiredContact: false,\n\t\t\t\t\t\tisRequiredAdmin: false,\n\t\t\t\t\t\tsortOrder: index,\n\t\t\t\t\t\tcanContactEdit: field.canContactEdit !== false\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmatchField.set({\n\t\t\t\t\t\tname: field.name,\n\t\t\t\t\t\tsortOrder: index,\n\t\t\t\t\t\tcanContactEdit: field.canContactEdit !== false\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}, this));\n\n\t\t\tthis.render();\n\t\t}, this));\n\t},\n\tafterRender: function () {\n\t\tif (this.collection == null || !this.collection.isFetched) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.dataTable = new PJQ.views.dataTables.DataTable({\n\t\t\tel: this.$(\".field-table\"),\n\t\t\tdata: this.collection.models,\n\t\t\tisHideSearch: true,\n\t\t\tpaging: false,\n\t\t\trowId: \"cid\",\n\t\t\torder: [0, 'asc'],\n\t\t\tcolumns: [\n\t\t\t\t{\n\t\t\t\t\t\"title\": \"\",\n\t\t\t\t\t\"data\": \"attributes.sortOrder\",\n\t\t\t\t\t\"visible\": false\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"title\": \"Name\",\n\t\t\t\t\t\"data\": \"attributes.name\",\n\t\t\t\t\t\"orderable\": false\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"title\": \"Visible To Contact\",\n\t\t\t\t\t\"data\": \"attributes.isVisibleContact\",\n\t\t\t\t\t\"orderable\": false,\n\t\t\t\t\t\"render\": function (data, type, row) {\n\t\t\t\t\t\tlet contactEdit = row.get('canContactEdit') !== false;\n\t\t\t\t\t\treturn '
';\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"title\": \"Required for Contact\",\n\t\t\t\t\t\"data\": \"attributes.isRequiredContact\",\n\t\t\t\t\t\"orderable\": false,\n\t\t\t\t\t\"render\": function (data, type, row) {\n\t\t\t\t\t\tif (row.get('canBeRequired') === false) {\n\t\t\t\t\t\t\treturn '
';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlet contactEdit = row.get('canContactEdit') !== false;\n\t\t\t\t\t\treturn '
';\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"title\": \"Visible To Admin\",\n\t\t\t\t\t\"data\": \"attributes.isVisibleAdmin\",\n\t\t\t\t\t\"orderable\": false,\n\t\t\t\t\t\"render\": function (data) {\n\t\t\t\t\t\treturn '
'\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"title\": \"Required for Admin\",\n\t\t\t\t\t\"data\": \"attributes.isRequiredAdmin\",\n\t\t\t\t\t\"orderable\": false,\n\t\t\t\t\t\"render\": function (data, type, row) {\n\t\t\t\t\t\tif (row.get('canBeRequired') === false) {\n\t\t\t\t\t\t\treturn '
';\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn '
'\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t});\n\t},\n\tcontactVisibleChanged: function (e) {\n\t\tlet $target = $(e.currentTarget),\n\t\t\t$row = $target.closest('tr'),\n\t\t\trow = this.dataTable.getRow($row),\n\t\t\tsetting = row.data(),\n\t\t\tenabled = $target.prop('checked');\n\t\tsetting.set('isVisibleContact', enabled);\n\n\t\tif (enabled) {\n\t\t\t// if the field is made visible to contacts, it must be visible to admins too\n\t\t\tsetting.set('isVisibleAdmin', true);\n\t\t}\n\t\telse {\n\t\t\t// if the field is made invisible to contacts\n\t\t\t// it must be made not required for contacts\n\t\t\tsetting.set('isRequiredContact', false);\n\t\t\tsetting.set({\n\t\t\t\tisRequiredContact: false\n\t\t\t});\n\t\t}\n\n\t\tsetting.queueSave();\n\t\tthis.dataTable.refresh();\n\t},\n\tadminVisibleChanged: function (e) {\n\t\tlet $target = $(e.currentTarget),\n\t\t\t$row = $target.closest('tr'),\n\t\t\trow = this.dataTable.getRow($row),\n\t\t\tsetting = row.data(),\n\t\t\tenabled = $target.prop('checked');\n\t\tsetting.set('isVisibleAdmin', enabled);\n\n\t\tif (!enabled) {\n\t\t\t// if the field is made invisible to admins\n\t\t\t// it must be made not required for admins\n\t\t\t// it must also be made not visible and not required for contacts\n\t\t\tsetting.set({\n\t\t\t\tisVisibleContact: false,\n\t\t\t\tisRequiredContact: false,\n\t\t\t\tisRequiredAdmin: false\n\t\t\t});\n\t\t\tthis.dataTable.refresh();\n\t\t}\n\n\t\tsetting.queueSave();\n\t},\n\tcontactRequiredChanged: function (e) {\n\t\tlet $target = $(e.currentTarget),\n\t\t\t$row = $target.closest('tr'),\n\t\t\trow = this.dataTable.getRow($row),\n\t\t\tsetting = row.data();\n\t\tsetting.set('isRequiredContact', $target.prop('checked'));\n\t\tsetting.queueSave();\n\t},\n\tadminRequiredChanged: function (e) {\n\t\tlet $target = $(e.currentTarget),\n\t\t\t$row = $target.closest('tr'),\n\t\t\trow = this.dataTable.getRow($row),\n\t\t\tsetting = row.data();\n\t\tsetting.set('isRequiredAdmin', $target.prop('checked'));\n\t\tsetting.queueSave();\n\t}\n});\n","PJQ.views.settings.ChangeRequestSettings = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'change-requests'),\n model: null,\n customFields: null\n },\n events: {},\n beforeFirstRender: function () {\n this.listenTo(this.model, 'fetch', this.render);\n },\n afterRender: function () {\n new PJQ.views.settings.NumberFormatInput({\n el: this.$('.number-format'),\n settings: this.model,\n customFields: this.options.customFields,\n onSave: (value) => {\n this.model.set('numberFormat', value);\n this.onChange();\n }\n });\n\n new PJQ.inputs.Selectpicker({\n el: this.$('.select-line-item-order-by'),\n defaultValue: this.model.get('lineItemOrderBy'),\n onChange: _.bind(function (value) {\n this.model.set('lineItemOrderBy', value);\n this.onChange();\n }, this)\n });\n },\n onChange: function (model) {\n if (typeof this.options.onChange === 'function') {\n this.options.onChange(model ? model : this.model);\n }\n }\n});","PJQ.views.settings.CommitmentSettings = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'commitments'),\n model: null,\n customFields: null\n },\n events: {\n 'click .btn-manage-signature': 'manageSignature',\n 'keydown .input-percent': 'numbersOnly',\n 'change .input-percent': 'formatPercent',\n },\n renderData: function () {\n return {\n model: this.model\n }\n },\n afterRender: function () {\n new PJQ.Binder(this.$el, this.model, {\n setDefaultValues: true,\n useDecimalPercentFields: true,\n watchElements: [\n 'input'\n ],\n afterChange: ($el, attribute) => {\n if (attribute === 'disableSubcontracts' || attribute === 'disablePO') {\n this.render();\n }\n\n this.onChange();\n }\n });\n\n new PJQ.inputs.Selectpicker({\n el: this.$('.select-default-accounting-method'),\n isIntChoices: true,\n isMultiple: false,\n defaultValue: this.model.get('defaultAccountingMethod') != null ? this.model.get('defaultAccountingMethod') : PJQ.constants.budget.accountingMethod.UNIT_QUANTITY,\n onChange: _.bind(function (value) {\n this.model.set('defaultAccountingMethod', value);\n this.onChange();\n }, this)\n });\n\n new PJQ.views.settings.NumberFormatInput({\n el: this.$('.number-format-po'),\n commitmentType: PJQ.constants.commitments.commitmentType.PURCHASE_ORDER,\n settings: this.model,\n customFields: this.options.customFields,\n onSave: (value) => {\n this.model.set('purchaseOrderNumberFormat', value);\n this.onChange();\n }\n });\n\n new PJQ.views.settings.NumberFormatInput({\n el: this.$('.number-format-subcontract'),\n commitmentType: PJQ.constants.commitments.commitmentType.SUBCONTRACT,\n settings: this.model,\n customFields: this.options.customFields,\n onSave: (value) => {\n this.model.set('subcontractNumberFormat', value);\n this.onChange();\n }\n });\n\n new PJQ.views.settings.SignatureEditInput({\n el: this.$('.manage-signature-input'),\n signature: this.model.get('defaultSignature'),\n headerSubText: \"Manage your company's default signature for Commitments\",\n onSave: _.bind(function (signature) {\n this.model.set('defaultSignature', signature);\n this.onChange();\n }, this)\n });\n\n new PJQ.inputs.Selectpicker({\n el: this.$('.select-line-item-order-by'),\n defaultValue: this.model.get('lineItemOrderBy'),\n onChange: _.bind(function (value) {\n this.model.set('lineItemOrderBy', value);\n this.onChange();\n }, this)\n });\n },\n formatPercent: function (e) {\n $(e.currentTarget).val(PJQ.helpers.formatHelpers.formatPercent($(e.currentTarget).val()));\n },\n onChange: function (model) {\n if (typeof this.options.onChange === 'function') {\n this.options.onChange(model ? model : this.model);\n }\n }\n});\n\nPJQ.views.settings.CommitmentChangeOrderSettings = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'commitment-change-orders'),\n model: null,\n customFields: null\n },\n events: {},\n afterRender: function () {\n new PJQ.Binder(this.$el, this.model, {\n watchElements: [\n 'input'\n ],\n afterChange: ($el, attribute) => {\n this.onChange();\n }\n });\n\n new PJQ.views.settings.NumberFormatInput({\n el: this.$('.number-format'),\n settings: this.model,\n customFields: this.options.customFields,\n onSave: (value) => {\n this.model.set('numberFormat', value);\n this.onChange();\n }\n });\n\n new PJQ.views.settings.SignatureEditInput({\n el: this.$('.manage-signature-input'),\n signature: this.model.get('defaultSignature'),\n headerSubText: \"Manage your company's default signature for Commitment Change Orders\",\n onSave: _.bind(function (signature) {\n this.model.set('defaultSignature', signature);\n this.onChange();\n }, this)\n });\n\n new PJQ.inputs.Selectpicker({\n el: this.$('.select-line-item-order-by'),\n defaultValue: this.model.get('lineItemOrderBy'),\n onChange: _.bind(function (value) {\n this.model.set('lineItemOrderBy', value);\n this.onChange();\n }, this)\n });\n },\n onChange: function (model) {\n if (typeof this.options.onChange === 'function') {\n this.options.onChange(model ? model : this.model);\n }\n }\n});","PJQ.views.settings.CustomFieldSettings = PJQ.views.BaseView.extend({\n\tdefaults: {\n\t\ttemplate: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'Custom-Fields'),\n\t\tfieldModel: PJQ.models.customFields.CustomField\n\t},\n\tevents: {\n\t\t'click .add-field': 'addClicked',\n\t\t'click .edit-field': 'editClicked',\n\t\t'click .delete-field': 'deleteClicked',\n\t\t'click .btn-sort-alpha': 'sortFieldsAlpha'\n\t},\n\tafterRender: function () {\n\t\tthis.fieldModel = new this.options.fieldModel();\n\t\tif (this.fieldModel instanceof PJQ.models.contacts.ContactCustomField) {\n\t\t\tthis.fieldModelName = 'contact';\n\t\t}\n\t\telse if (this.fieldModel instanceof PJQ.models.contacts.CompanyCustomField) {\n\t\t\tthis.fieldModelName = 'company';\n\t\t}\n\t\telse if (this.fieldModel instanceof PJQ.models.projects.ProjectCustomField) {\n\t\t\tthis.fieldModelName = 'project';\n\t\t}\n\t\telse if (this.fieldModel instanceof PJQ.models.actionItems.ActionItemCustomField) {\n\t\t\tthis.fieldModelName = 'actionItems';\n\t\t}\n\t\telse if (this.fieldModel instanceof PJQ.models.punchlists.PunchlistCustomField) {\n\t\t\tthis.fieldModelName = 'punchList';\n\t\t}\n\t\telse if (this.fieldModel instanceof PJQ.models.commitments.CustomField) {\n\t\t\tthis.fieldModelName = 'commitment';\n\t\t}\n\t\telse if (this.fieldModel instanceof PJQ.models.commitments.ChangeOrderCustomField) {\n\t\t\tthis.fieldModelName = 'commitmentChangeOrder';\n\t\t}\n\t\telse if (this.fieldModel instanceof PJQ.models.primeContracts.CustomField) {\n\t\t\tthis.fieldModelName = 'primeContract';\n\t\t}\n\t\telse if (this.fieldModel instanceof PJQ.models.primeContracts.ChangeOrderCustomField) {\n\t\t\tthis.fieldModelName = 'primeContractChangeOrder';\n\t\t}\n\t\telse if (this.fieldModel instanceof PJQ.models.directcosts.CustomField) {\n\t\t\tthis.fieldModelName = 'directCost';\n\t\t}\n\t\telse if (this.fieldModel instanceof PJQ.models.invoicing.PayableInvoiceCustomField) {\n\t\t\tthis.fieldModelName = 'payableInvoice';\n\t\t}\n\t\telse if (this.fieldModel instanceof PJQ.models.invoicing.ReceivableInvoiceCustomField) {\n\t\t\tthis.fieldModelName = 'receivableInvoice';\n\t\t}\n\t\telse if (this.fieldModel instanceof PJQ.models.schedule.ScheduleCustomField) {\n\t\t\tthis.fieldModelName = 'schedule';\n\t\t}\n\t\telse if (this.fieldModel instanceof PJQ.models.submittals.SubmittalCustomField) {\n\t\t\tthis.fieldModelName = 'submittals';\n\t\t}\n\t\telse if (this.fieldModel instanceof PJQ.models.users.UserCustomField) {\n\t\t\tthis.fieldModelName = 'user';\n\t\t}\n\n\t\tthis.$(\".custom-field-table\").addClass('custom-field-table-' + this.fieldModelName);\n\n\t\tthis.dataTable = new PJQ.views.dataTables.DataTable({\n\t\t\tel: this.$(\".custom-field-table\"),\n\t\t\tdata: this.collection.models,\n\t\t\tisHideSearch: true,\n\t\t\trowId: \"cid\",\n\t\t\tlanguage: {\n\t\t\t\tzeroRecords: 'Click \"Add New Field\" to create a new custom field'\n\t\t\t},\n\t\t\torder: [0, 'asc'],\n\t\t\tsortableOptions: {\n\t\t\t\tdata: this.collection,\n\t\t\t\tcontainment: \".custom-field-table-\" + this.fieldModelName,\n\t\t\t},\n\t\t\tbSort: false,\n\t\t\tonRowDoubleClick: _.bind(function (row) {\n\t\t\t\tthis.editField(row.data());\n\t\t\t}, this),\n\t\t\tcontextMenuOptions: {\n\t\t\t\tactions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Edit',\n\t\t\t\t\t\tonClick: _.bind(function (row) {\n\t\t\t\t\t\t\tthis.editField(row.data());\n\t\t\t\t\t\t}, this)\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Delete',\n\t\t\t\t\t\tisDanger: true,\n\t\t\t\t\t\tonClick: _.bind(function (row) {\n\t\t\t\t\t\t\tthis.deleteField(row);\n\t\t\t\t\t\t}, this)\n\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\tcolumns: [\n\t\t\t\t{\n\t\t\t\t\t\"data\": \"attributes.sortOrder\",\n\t\t\t\t\t\"title\": \"\",\n\t\t\t\t\t\"searchable\": false,\n\t\t\t\t\t\"orderable\": false,\n\t\t\t\t\t\"visible\": false,\n\t\t\t\t\t\"render\": _.bind(function (data, type, row) {\n\t\t\t\t\t\tlet content = '';\n\t\t\t\t\t\tif (data != null) {\n\t\t\t\t\t\t\tcontent = '
'\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn content\n\t\t\t\t\t}, this)\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"title\": \"Name\",\n\t\t\t\t\t\"data\": \"attributes.fieldName\",\n\t\t\t\t\t\"orderable\": false\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"title\": \"Type\",\n\t\t\t\t\t\"data\": \"attributes.fieldType\",\n\t\t\t\t\t\"orderable\": false\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"title\": \"Required\",\n\t\t\t\t\t\"data\": \"attributes.isRequired\",\n\t\t\t\t\t\"orderable\": false,\n\t\t\t\t\t\"render\": function (data) {\n\t\t\t\t\t\treturn '
' + (data ? 'Yes' : 'No') + '
';\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"data\": \"\",\n\t\t\t\t\t\"title\": \"\",\n\t\t\t\t\t\"orderable\": false,\n\t\t\t\t\t\"searchable\": false,\n\t\t\t\t\t\"width\": \"85px\",\n\t\t\t\t\t\"render\": function () {\n\t\t\t\t\t\treturn '
';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t});\n\t},\n\taddClicked: function () {\n\t\tlet newField = new this.options.fieldModel({\n\t\t\tfieldName: \"\",\n\t\t\tfieldType: PJQ.constants.customFields.fieldTypes.TEXT,\n\t\t\tisRequired: false,\n\t\t\tdefaultValue: \"\",\n\t\t\tdescription: \"\",\n\t\t\tsortOrder: this.collection.length + 1\n\t\t});\n\t\tlet names = [];\n\t\t_.each(this.collection.models, function (model) {\n\t\t\tnames.push(model.get('fieldName'))\n\t\t});\n\t\tthis.editField(newField, names);\n\t},\n\teditClicked: function (e) {\n\t\tlet target = $(e.currentTarget),\n\t\t\trow = this.dataTable.getRow(target.closest('tr')),\n\t\t\tfield = row.data(),\n\t\t\tnames = [];\n\t\t_.each(this.collection.models, function (model) {\n\t\t\tif (field.get('fieldName') !== model.get('fieldName')) {\n\t\t\t\tnames.push(model.get('fieldName'))\n\t\t\t}\n\t\t});\n\t\tthis.editField(field, names);\n\t},\n\teditField: function (field, names) {\n\t\tnew PJQ.views.settings.EditCustomFieldModal({\n\t\t\tmodel: field,\n\t\t\tnames: names,\n\t\t\tnewSort: _.bind(function (field) {\n\t\t\t\tthis.collection.add(field);\n\t\t\t\tthis.dataTable.addRow(field);\n\t\t\t\tthis.dataTable.refresh();\n\t\t\t}, this),\n\t\t\tonSave: _.bind(function (field) {\n\t\t\t\tif (field.hasChanged() || field.isNew()) {\n\t\t\t\t\tif (field.isNew()) {\n\t\t\t\t\t\tthis.collection.add(field);\n\t\t\t\t\t\tthis.dataTable.addRow(field);\n\t\t\t\t\t\tthis.dataTable.refresh()\n\t\t\t\t\t}\n\t\t\t\t\tfield.save(null, {\n\t\t\t\t\t\tnotify: true,\n\t\t\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\t\t\tfield.fetch({\n\t\t\t\t\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\t\t\t\t\tthis.dataTable.refresh();\n\n\t\t\t\t\t\t\t\t\tPJQ.notifications.notify.successNotify({\n\t\t\t\t\t\t\t\t\t\tmessage: 'Custom field saved successfully'\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}, this)\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}, this)\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}, this),\n\t\t\tonClose: _.bind(function (field) {\n\t\t\t\tif (field ? field.hasChanged() : field) {\n\t\t\t\t\tfield.fetch({\n\t\t\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\t\t\tthis.dataTable.refresh();\n\t\t\t\t\t\t}, this)\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}, this),\n\t\t\tonDelete: _.bind(function (field) {\n\t\t\t\tif (field.id > 0) {\n\t\t\t\t\tlet row = this.dataTable.getRow(field.cid);\n\t\t\t\t\tthis.collection.remove(field);\n\t\t\t\t\tfield.destroy();\n\t\t\t\t\tif (row != null) {\n\t\t\t\t\t\tthis.dataTable.removeRow(row);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, this)\n\t\t});\n\t},\n\tdeleteClicked: function (e) {\n\t\tlet target = $(e.currentTarget),\n\t\t\trow = this.dataTable.getRow(target.closest('tr'));\n\t\tthis.deleteField(row);\n\t},\n\tdeleteField: function (row) {\n\t\tlet field = row.data();\n\t\tlet sortNumber = field.attributes.sortOrder;\n\t\t_.each(this.collection.models, function (model) {\n\t\t\tif (model.get('sortOrder') > sortNumber) {\n\t\t\t\tlet newNumber = (model.get('sortOrder') - 1);\n\t\t\t\tmodel.set('sortOrder', newNumber);\n\t\t\t}\n\t\t});\n\t\tnew PJQ.views.modals.DeleteCancel({\n\t\t\theader: \"Confirm Deletion\",\n\t\t\tbody: \"Are you sure you want to delete this field?\",\n\t\t\tonDelete: _.bind(function () {\n\t\t\t\tthis.collection.remove(field);\n\t\t\t\tfield.destroy();\n\t\t\t\tthis.dataTable.removeRow(row);\n\t\t\t}, this)\n\t\t});\n\t},\n\tfetchCollection: function () {\n\t\tthis.collection.fetch();\n\t},\n\tsortFieldsAlpha: function () {\n\t\tif (this.fieldModelName === 'project') {\n\t\t\tnew PJQ.ajax.Request({\n\t\t\t\tendpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t\t\t{\n\t\t\t\t\t\tendpoint: 'settings',\n\t\t\t\t\t\tvalue: 'sortprojectfieldsalpha'\n\t\t\t\t\t},\n\t\t\t\t])\n\t\t\t}).put().done(_.bind(function () {\n\t\t\t\tthis.collection.fetch({\n\t\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\t\tthis.dataTable.render();\n\t\t\t\t\t}, this)\n\t\t\t\t})\n\t\t\t}, this));\n\t\t}\n\t\telse if (this.fieldModelName === 'contact') {\n\t\t\tnew PJQ.ajax.Request({\n\t\t\t\tendpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t\t\t{\n\t\t\t\t\t\tendpoint: 'settings',\n\t\t\t\t\t\tvalue: 'sortcontactfieldsalpha'\n\t\t\t\t\t},\n\t\t\t\t])\n\t\t\t}).put().done(_.bind(function () {\n\t\t\t\tthis.collection.fetch({\n\t\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\t\tthis.dataTable.render();\n\t\t\t\t\t}, this)\n\t\t\t\t})\n\t\t\t}, this));\n\n\t\t}\n\t\telse if (this.fieldModelName === 'company') {\n\t\t\tnew PJQ.ajax.Request({\n\t\t\t\tendpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t\t\t{\n\t\t\t\t\t\tendpoint: 'settings',\n\t\t\t\t\t\tvalue: 'sortcontactcompanyfieldsalpha'\n\t\t\t\t\t},\n\t\t\t\t])\n\t\t\t}).put().done(_.bind(function () {\n\t\t\t\tthis.collection.fetch({\n\t\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\t\tthis.dataTable.render();\n\t\t\t\t\t}, this)\n\t\t\t\t})\n\t\t\t}, this));\n\n\t\t}\n\t\telse if (this.fieldModelName === 'submittals') {\n\t\t\tnew PJQ.ajax.Request({\n\t\t\t\tendpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t\t\t{\n\t\t\t\t\t\tendpoint: 'settings',\n\t\t\t\t\t\tvalue: 'sortsubmittalfieldsalpha'\n\t\t\t\t\t},\n\t\t\t\t])\n\t\t\t}).put().done(_.bind(function () {\n\t\t\t\tthis.collection.fetch({\n\t\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\t\tthis.dataTable.render();\n\t\t\t\t\t}, this)\n\t\t\t\t})\n\t\t\t}, this));\n\t\t}\n\t\telse if (this.fieldModelName === 'user') {\n\t\t\tnew PJQ.ajax.Request({\n\t\t\t\tendpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t\t\t{\n\t\t\t\t\t\tendpoint: 'settings',\n\t\t\t\t\t\tvalue: 'sortuserfieldsalpha'\n\t\t\t\t\t},\n\t\t\t\t])\n\t\t\t}).put().done(_.bind(function () {\n\t\t\t\tthis.collection.fetch({\n\t\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\t\tthis.dataTable.render();\n\t\t\t\t\t}, this)\n\t\t\t\t})\n\t\t\t}, this));\n\t\t}\n\t\telse {\n\t\t\tnew PJQ.ajax.Request({\n\t\t\t\tendpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t\t\t{\n\t\t\t\t\t\tendpoint: 'settings',\n\t\t\t\t\t\tvalue: 'sortpunchlistfieldsalpha'\n\t\t\t\t\t},\n\t\t\t\t])\n\t\t\t}).put().done(_.bind(function () {\n\t\t\t\tthis.collection.fetch({\n\t\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\t\tthis.dataTable.render();\n\t\t\t\t\t}, this)\n\t\t\t\t})\n\t\t\t}, this));\n\t\t}\n\t}\n});\n\nPJQ.views.settings.EditCustomFieldModal = PJQ.views.BaseModal.extend({\n\tdefaults: {\n\t\ttemplate: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'Modal-Edit-Custom-Field'),\n\t\tsubTemplates: {\n\t\t\tchoice: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'Custom-Field-Choice')\n\t\t},\n\t\tmaxWidth: 600\n\t},\n\tevents: {\n\t\t'click .btn-delete-choice': 'deleteChoice',\n\t\t'click .btn-add-choice': 'addChoice',\n\t\t'click .field-save': 'save',\n\t\t'click .field-close': 'close',\n\t\t'click .field-delete': 'delete',\n\t\t'keydown .input-default-integer': 'numbersOnly',\n\t\t'change .input-multiple-choice': 'render',\n\t\t'click .btn-sort-alpha': 'sortChoicesAlpha',\n\t\t'click .btn-is-required': 'checkAllSub',\n\t\t'colorpickerChange': 'setBGColor',\n\t\t'keyup .colorpicker-input-box': 'setBGColor',\n\t\t'change .cb-read-only': 'render'\n\t},\n\tbeforeRender: function () {\n\t\tif (this.model instanceof PJQ.models.contacts.ContactCustomField) {\n\t\t\tthis.fieldModel = 'contact';\n\t\t}\n\t\telse if (this.model instanceof PJQ.models.contacts.CompanyCustomField) {\n\t\t\tthis.fieldModel = 'company';\n\t\t}\n\t\telse if (this.model instanceof PJQ.models.projects.ProjectCustomField) {\n\t\t\tthis.fieldModel = 'project';\n\t\t}\n\t\telse if (this.model instanceof PJQ.models.actionItems.ActionItemCustomField) {\n\t\t\tthis.fieldModel = 'actionItems';\n\t\t}\n\t\telse if (this.model instanceof PJQ.models.punchlists.PunchlistCustomField) {\n\t\t\tthis.fieldModel = 'punchList';\n\t\t}\n\t\telse if (this.fieldModel instanceof PJQ.models.commitments.CustomField) {\n\t\t\tthis.fieldModelName = 'commitment';\n\t\t}\n\t\telse if (this.fieldModel instanceof PJQ.models.commitments.ChangeOrderCustomField) {\n\t\t\tthis.fieldModelName = 'commitmentChangeOrder';\n\t\t}\n\t\telse if (this.fieldModel instanceof PJQ.models.primeContracts.CustomField) {\n\t\t\tthis.fieldModelName = 'primeContract';\n\t\t}\n\t\telse if (this.fieldModel instanceof PJQ.models.primeContracts.ChangeOrderCustomField) {\n\t\t\tthis.fieldModelName = 'primeContractChangeOrder';\n\t\t}\n\t\telse if (this.fieldModel instanceof PJQ.models.directcosts.CustomField) {\n\t\t\tthis.fieldModelName = 'directCost';\n\t\t}\n\t\telse if (this.fieldModel instanceof PJQ.models.invoicing.PayableInvoiceCustomField) {\n\t\t\tthis.fieldModelName = 'payableInvoice';\n\t\t}\n\t\telse if (this.fieldModel instanceof PJQ.models.invoicing.ReceivableInvoiceCustomField) {\n\t\t\tthis.fieldModelName = 'receivableInvoice';\n\t\t}\n\t\telse if (this.model instanceof PJQ.models.schedule.ScheduleCustomField) {\n\t\t\tthis.fieldModel = 'schedule';\n\t\t}\n\t\telse if (this.model instanceof PJQ.models.submittals.SubmittalCustomField) {\n\t\t\tthis.fieldModel = 'submittals';\n\t\t}\n\t\telse if (this.model instanceof PJQ.models.users.UserCustomField) {\n\t\t\tthis.fieldModel = 'user';\n\t\t}\n\t},\n\trenderData: function () {\n\t\treturn {\n\t\t\tmodel: this.model,\n\t\t\tfieldModel: this.fieldModel\n\t\t};\n\t},\n\tafterRender: function () {\n\t\tnew PJQ.Binder(this.$el, this.model, {\n\t\t\tsetDefaultValues: true,\n\t\t\twatchElements: [\n\t\t\t\t'input',\n\t\t\t\t'textarea'\n\t\t\t]\n\t\t});\n\n\t\tnew PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('.select-field-type'),\n\t\t\tnoneSelectedText: 'Select Field Type',\n\t\t\tdefaultValue: this.model.get('fieldType'),\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tthis.model.set({\n\t\t\t\t\tfieldType: value.toUpperCase(),\n\t\t\t\t\tdefaultValue: \"\"\n\t\t\t\t});\n\t\t\t\tthis.render();\n\t\t\t}, this),\n\t\t});\n\t\tif(this.fieldModel === \"project\"){\n\t\t\tthis.renderColorPicker();\n\t\t}\n\n\t\tif (this.model.get('fieldType') === PJQ.constants.customFields.fieldTypes.DATE || this.model.get('fieldType') === PJQ.constants.customFields.fieldTypes.DATETIME) {\n\t\t\tnew PJQ.inputs.Datepicker({\n\t\t\t\tel: this.$('.input-default-date'),\n\t\t\t\tisShowTimezone: false,\n\t\t\t\tdatepickerOptions: {\n\t\t\t\t\tdefaultDate: this.model.get('defaultValue'),\n\t\t\t\t\tformat: this.model.get('fieldType') === PJQ.constants.customFields.fieldTypes.DATE ? PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE : PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE_TIME\n\t\t\t\t},\n\t\t\t\tonChange: _.bind(function (value) {\n\t\t\t\t\tthis.model.set('defaultValue', value);\n\t\t\t\t}, this),\n\t\t\t});\n\t\t}\n\t\telse if (this.model.get('fieldType') === PJQ.constants.customFields.fieldTypes.MONEY) {\n\t\t\tPJQ.helpers.inputHelpers.inputMaskCurrency(this.$('.input-dollars-full'), 2);\n\t\t}\n\t\telse if (this.model.get('fieldType') === PJQ.constants.customFields.fieldTypes.PERCENT) {\n\t\t\tPJQ.helpers.inputHelpers.inputMaskDecimal(this.$('.input-decimal'), 2);\n\t\t}\n\t\telse if (this.model.get('fieldType') === PJQ.constants.customFields.fieldTypes.BOOL) {\n\t\t\tnew PJQ.inputs.Selectpicker({\n\t\t\t\tel: this.$('.select-default-bool'),\n\t\t\t\tdefaultValue: this.model.get('defaultValue'),\n\t\t\t\tonChange: _.bind(function (value) {\n\t\t\t\t\tif (value === \"true\") {\n\t\t\t\t\t\tthis.model.set('defaultValue', true)\n\t\t\t\t\t}\n\t\t\t\t\telse if (value === \"false\") {\n\t\t\t\t\t\tthis.model.set('defaultValue', false)\n\t\t\t\t\t}\n\t\t\t\t}, this),\n\t\t\t});\n\t\t}\n\t\telse if (this.model.get('fieldType') === PJQ.constants.customFields.fieldTypes.CHOICE) {\n\t\t\tlet defaultId = null;\n\t\t\tif (_.size(this.model.get('defaultValue')) > 0) {\n\t\t\t\tlet defaultChoice = \"\";\n\t\t\t\t_.each(this.model.choices.models, function (choice) {\n\t\t\t\t\tif (choice.get('id') == this.model.get('defaultValue')) {\n\t\t\t\t\t\tdefaultChoice += choice.cid\n\t\t\t\t\t}\n\t\t\t\t}, this);\n\t\t\t\tif (defaultChoice != null) {\n\t\t\t\t\tdefaultId = defaultChoice\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.choicePicker = new PJQ.inputs.Selectpicker({\n\t\t\t\tel: this.$('.select-default-choice'),\n\t\t\t\tdefaultValue: defaultId,\n\t\t\t\tonChange: _.bind(function (value) {\n\t\t\t\t\tlet choice = this.model.choices.get(value);\n\t\t\t\t\tif(choice == null){\n\t\t\t\t\t\tthis.model.set('defaultValue', null);\n\t\t\t\t\t}\n\t\t\t\t\telse if(choice.get('id') > 0) {\n\t\t\t\t\t\tthis.model.set('defaultValue', choice.get('id'));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tchoice.set('isDefault', true);\n\t\t\t\t\t}\n\t\t\t\t}, this),\n\t\t\t});\n\t\t\tthis.updateChoicePicker();\n\t\t\tthis.renderChoices();\n\t\t}\n\t},\n\tupdateChoicePicker: function () {\n\t\tthis.choicePicker.updateChoices(_.map(this.model.choices.models, function (choice) {\n\t\t\treturn {\n\t\t\t\tid: choice.cid,\n\t\t\t\tname: choice.get('choiceName')\n\t\t\t};\n\t\t}));\n\t},\n\trenderChoices: function () {\n\t\tlet $choices = this.$('.custom-field-choices');\n\t\t$choices.empty();\n\t\tif (_.size(this.model.choices.models) > 0) {\n\t\t\t_.each(_.sortBy(_.filter(this.model.choices.models, function (model) {\n\t\t\t\treturn !model.get('isDeleted');\n\t\t\t}), function (model) {\n\t\t\t\treturn model.get('sortOrder');\n\t\t\t}), _.bind(function (choice) {\n\t\t\t\tthis.renderChoice(choice);\n\t\t\t}, this));\n\t\t}\n\t\telse {\n\t\t\t$choices.append($('
', {\n\t\t\t\tclass: 'no-choices-text fs-16 font-weight-light text-muted text-align-center mt-2 mb-2',\n\t\t\t\ttext: 'No choices added yet'\n\t\t\t}));\n\t\t}\n\t},\n\trenderChoice: function (choice) {\n\t\tlet $choices = this.$('.custom-field-choices');\n\t\t$choices.find('.no-choices-text').remove();\n\t\tthis.renderSubTemplate(true, this.options.subTemplates.choice, $choices, {\n\t\t\tmodel: choice\n\t\t}, _.bind(function ($choice) {\n\t\t\tnew PJQ.Binder($choice, choice, {\n\t\t\t\tsetDefaultValues: true,\n\t\t\t\twatchElements: [\n\t\t\t\t\t'input'\n\t\t\t\t],\n\t\t\t\tafterChange: _.bind(function () {\n\t\t\t\t\tthis.model.isDirty = true;\n\t\t\t\t\tthis.updateChoicePicker();\n\t\t\t\t}, this)\n\t\t\t});\n\t\t}, this));\n\t\tlet self = this;\n\t\tself.fieldSortable = new PJQ.Sortable(self.$('.custom-field-choices'), {\n\t\t\tcontainment: \"parent\",\n\t\t\titems: '.custom-field-choice',\n\t\t\tconnectWith: '.custom-field-choice',\n\t\t\tonStop: function () {\n\t\t\t\tself.$('.custom-field-choice').each(function (index) {\n\t\t\t\t\tlet name = $(this).data('name'),\n\t\t\t\t\t\tsortItem = _.find(self.model.choices.models, function (choice) {\n\t\t\t\t\t\t\treturn choice.get('choiceName') === name\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tsortOrder = index + 1;\n\t\t\t\t\tsortItem.set('sortOrder', sortOrder);\n\t\t\t\t});\n\t\t\t\tself.model.save();\n\t\t\t}\n\t\t});\n\t},\n\trenderColorPicker: function (e) {\n\t\tthis.colorPicker = new PJQ.colors.ColorPicker(this.$('.color-picker'), {\n\t\t\tformat: 'hex',\n\t\t\tcolor: _.size(this.model.get('color')) > 0 ? this.model.get('color') : '#000000',\n\t\t\tautoInputFallback: false\n\t\t});\n\t\tthis.$('.colorpicker-input-box').val(_.size(this.model.get('color')) > 0 ? this.model.get('color') : '#000000');\n\t},\n\tsetBGColor: function (e) {\n\t\tif (e.type === 'keyup') {\n\t\t\tif (e.keyCode === 13) {\n\t\t\t\t$(e.currentTarget).blur()\n\t\t\t}\n\t\t\tlet color = this.$('.colorpicker-input-box').val();\n\t\t\tif (color.split('')[0] === '#' && color.trim().length === 7) {\n\t\t\t\tthis.colorPicker.setColor(color);\n\t\t\t\tthis.model.set('color', color.toUpperCase());\n\t\t\t\tPJQ.helpers.inputHelpers.setInputError(this.$('.colorpicker-input-box'), true);\n\t\t\t}\n\t\t}\n\n\t\telse {\n\t\t\tlet color = this.colorPicker.getColor();\n\t\t\tif (color.split('')[0] === '#' && color.trim().length === 7) {\n\t\t\t\tthis.$('.colorpicker-input-box').val(color);\n\t\t\t\tthis.model.set('color', color);\n\t\t\t\tPJQ.helpers.inputHelpers.setInputError(this.$('.colorpicker-input-box'), true);\n\t\t\t}\n\t\t}\n\t},\n\tvalidate: function () {\n\t\tlet isValid = true,\n\t\t\tisDuplicate = false;\n\n\t\tPJQ.helpers.inputHelpers.setInputError(this.$('.input-field-name'), true);\n\t\t_.each(this.options.names, function (name) {\n\t\t\tif (this.$('.input-field-name').val().trim() === name) {\n\t\t\t\tisValid = false;\n\t\t\t\tisDuplicate = true;\n\t\t\t\tPJQ.helpers.inputHelpers.setInputError(this.$('.input-field-name'), false)\n\t\t\t}\n\t\t}, this);\n\n\t\tif (this.$('.input-field-name').val().trim().length === 0) {\n\t\t\tisValid = false;\n\t\t\tPJQ.helpers.inputHelpers.setInputError(this.$('.input-field-name'), false);\n\t\t}\n\n\t\tif (this.model.get('fieldType') === PJQ.constants.customFields.fieldTypes.CHOICE) {\n\t\t\t$('.input-custom-field-choice-name').each(function () {\n\t\t\t\tlet $choice = $(this);\n\t\t\t\tif ($choice.val().trim().length === 0) {\n\t\t\t\t\tisValid = false;\n\t\t\t\t\tPJQ.helpers.inputHelpers.setInputError($choice, false);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tPJQ.helpers.inputHelpers.setInputError($choice, true);\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tif (!isValid && isDuplicate) {\n\t\t\tnew PJQ.Alert(this.$('.validation-error'), {\n\t\t\t\ttype: 'danger',\n\t\t\t\ttext: 'Field name already exists!'\n\t\t\t})\n\t\t}\n\t\telse if (!isValid) {\n\t\t\tnew PJQ.Alert(this.$('.validation-error'), {\n\t\t\t\ttype: 'danger',\n\t\t\t\ttext: 'Required fields are empty'\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tthis.$('.validation-error').empty();\n\t\t}\n\t\treturn isValid;\n\t},\n\taddChoice: function () {\n\t\tlet newChoice = new PJQ.models.customFields.CustomFieldChoice({\n\t\t\tchoiceName: \"\",\n\t\t\tsortOrder: _.size(this.model.choices.models) + 1\n\t\t});\n\t\tthis.model.choices.add(newChoice);\n\t\tthis.renderChoice(newChoice);\n\t\tthis.$('.input-custom-field-choice-name').last().focus();\n\t\tthis.updateChoicePicker();\n\t},\n\tdeleteChoice: function (e) {\n\t\tlet $choice = $(e.currentTarget).closest('.custom-field-choice'),\n\t\t\tcid = $choice.data('cid'),\n\t\t\tchoice = this.model.choices.get(cid);\n\n\t\tif (choice.id > 0) {\n\t\t\tchoice.set('isDeleted', true);\n\t\t\tthis.model.isDirty = true;\n\t\t}\n\t\telse {\n\t\t\tthis.model.choices.remove(cid);\n\t\t}\n\t\t$choice.remove();\n\n\t\tif (this.model.get('defaultValue') === choice.id)\n\t\t\tthis.model.set('defaultValue', null);\n\n\t\tthis.updateChoicePicker();\n\t},\n\tcheckAllSub: function(e) {\n\t\tlet isChecked = e.target.checked;\n\t\tlet $visible = this.$('.btn-is-visible'),\n\t\t\t$editable = this.$('.btn-is-editable')\n\t\tif(this.fieldModel === 'contact' || this.fieldModel === 'company') {\n\t\t\t$visible.attr('disabled', isChecked);\n\t\t\t$editable.attr('disabled', isChecked);\n\t\t\tif (isChecked) {\n\t\t\t\tthis.model.set('isVisibleInRSVP', true)\n\t\t\t\tthis.model.set('isChangeableInRSVP', true)\n\t\t\t\t$visible[0].checked = true;\n\t\t\t\t$editable[0].checked = true;\n\t\t\t}\n\t\t}\n\t},\n\tsave: function () {\n\t\tif (!this.validate())\n\t\t\treturn;\n\n\t\tif (this.options.onSave) {\n\t\t\tthis.options.onSave(this.model);\n\t\t\tthis.removeModal();\n\t\t}\n\t},\n\tclose: function () {\n\t\tif (this.model.hasChanged()) {\n\t\t\tnew PJQ.views.modals.SaveDontSave({\n\t\t\t\theader: \"Unsaved Changes\",\n\t\t\t\tbody: \"Do you want to save changes?\",\n\t\t\t\tonSave: _.bind(function () {\n\t\t\t\t\tthis.save();\n\t\t\t\t}, this),\n\t\t\t\tonDontSave: _.bind(function () {\n\t\t\t\t\tif (this.options.onClose) {\n\t\t\t\t\t\tthis.options.onClose(this.model);\n\t\t\t\t\t}\n\t\t\t\t\tthis.removeModal();\n\t\t\t\t}, this)\n\t\t\t});\n\t\t}\n\t\telse if (this.options.onClose) {\n\t\t\tthis.options.onClose(this.model);\n\t\t\tthis.removeModal();\n\t\t}\n\t},\n\tnumbersOnly: function (e) {\n\t\treturn PJQ.helpers.inputHelpers.numbersOnly(e);\n\t},\n\tdelete: function () {\n\t\tnew PJQ.views.modals.DeleteCancel({\n\t\t\theader: \"Confirm Deletion\",\n\t\t\tbody: \"Are you sure you want to delete this field?\",\n\t\t\tonDelete: _.bind(function () {\n\t\t\t\tif (this.options.onDelete) {\n\t\t\t\t\tthis.options.onDelete(this.model);\n\t\t\t\t}\n\t\t\t\tthis.removeModal();\n\t\t\t}, this)\n\t\t});\n\t},\n\tfetchModel: function () {\n\t\tthis.model.fetch();\n\t},\n\tsortChoicesAlpha: function () {\n\t\tlet newModel;\n\t\tif (this.model.isNew()) {\n\t\t\tnewModel = true;\n\t\t}\n\t\tthis.model.save(null, {\n\t\t\tsuccess: _.bind(function () {\n\t\t\t\tif (this.fieldModel === 'project') {\n\t\t\t\t\tnew PJQ.ajax.Request({\n\t\t\t\t\t\tendpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tendpoint: 'settings'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tendpoint: 'sortprojectchoicesalpha',\n\t\t\t\t\t\t\t\tvalue: this.model.get('id')\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t])\n\t\t\t\t\t}).put().done(_.bind(function () {\n\t\t\t\t\t\tthis.model.fetch({\n\t\t\t\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\t\t\t\tthis.render();\n\t\t\t\t\t\t\t\tif (newModel) {\n\t\t\t\t\t\t\t\t\tthis.options.newSort(this.model);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, this)\n\t\t\t\t\t\t})\n\t\t\t\t\t}, this));\n\t\t\t\t}\n\t\t\t\telse if (this.fieldModel === 'contact') {\n\t\t\t\t\tnew PJQ.ajax.Request({\n\t\t\t\t\t\tendpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tendpoint: 'settings'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tendpoint: 'sortcontactchoicesalpha',\n\t\t\t\t\t\t\t\tvalue: this.model.get('id')\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t])\n\t\t\t\t\t}).put().done(_.bind(function () {\n\t\t\t\t\t\tthis.model.fetch({\n\t\t\t\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\t\t\t\tthis.render();\n\t\t\t\t\t\t\t\tif (newModel) {\n\t\t\t\t\t\t\t\t\tthis.options.newSort(this.model);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, this)\n\t\t\t\t\t\t})\n\t\t\t\t\t}, this));\n\t\t\t\t}\n\t\t\t\telse if (this.fieldModel === 'company') {\n\t\t\t\t\tnew PJQ.ajax.Request({\n\t\t\t\t\t\tendpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tendpoint: 'settings'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tendpoint: 'sortcontactcompanychoicesalpha',\n\t\t\t\t\t\t\t\tvalue: this.model.get('id')\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t])\n\t\t\t\t\t}).put().done(_.bind(function () {\n\t\t\t\t\t\tthis.model.fetch({\n\t\t\t\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\t\t\t\tthis.render();\n\t\t\t\t\t\t\t\tif (newModel) {\n\t\t\t\t\t\t\t\t\tthis.options.newSort(this.model);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, this)\n\t\t\t\t\t\t})\n\t\t\t\t\t}, this));\n\t\t\t\t}\n\t\t\t\telse if (this.fieldModel === 'submittals') {\n\t\t\t\t\tnew PJQ.ajax.Request({\n\t\t\t\t\t\tendpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tendpoint: 'settings'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tendpoint: 'sortsubmittalchoicesalpha',\n\t\t\t\t\t\t\t\tvalue: this.model.get('id')\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t])\n\t\t\t\t\t}).put().done(_.bind(function () {\n\t\t\t\t\t\tthis.model.fetch({\n\t\t\t\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\t\t\t\tthis.render();\n\t\t\t\t\t\t\t\tif (newModel) {\n\t\t\t\t\t\t\t\t\tthis.options.newSort(this.model);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, this)\n\t\t\t\t\t\t})\n\t\t\t\t\t}, this));\n\t\t\t\t}\n\t\t\t\telse if (this.fieldModel === 'user') {\n\t\t\t\t\tnew PJQ.ajax.Request({\n\t\t\t\t\t\tendpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tendpoint: 'settings'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tendpoint: 'sortuserchoicesalpha',\n\t\t\t\t\t\t\t\tvalue: this.model.get('id')\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t])\n\t\t\t\t\t}).put().done(_.bind(function () {\n\t\t\t\t\t\tthis.model.fetch({\n\t\t\t\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\t\t\t\tthis.render();\n\t\t\t\t\t\t\t\tif (newModel) {\n\t\t\t\t\t\t\t\t\tthis.options.newSort(this.model);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, this)\n\t\t\t\t\t\t})\n\t\t\t\t\t}, this));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnew PJQ.ajax.Request({\n\t\t\t\t\t\tendpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tendpoint: 'settings'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tendpoint: 'sortpunchlistchoicesalpha',\n\t\t\t\t\t\t\t\tvalue: this.model.get('id')\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t])\n\t\t\t\t\t}).put().done(_.bind(function () {\n\t\t\t\t\t\tthis.model.fetch({\n\t\t\t\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\t\t\t\tthis.render();\n\t\t\t\t\t\t\t\tif (newModel) {\n\t\t\t\t\t\t\t\t\tthis.options.newSort(this.model);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, this)\n\t\t\t\t\t\t})\n\t\t\t\t\t}, this));\n\t\t\t\t}\n\t\t\t}, this)\n\t\t});\n\t}\n});\n","PJQ.views.settings.DailyReportSettings = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'Daily-Reports')\n },\n events: {},\n beforeFirstRender: function () {\n },\n beforeRender: function () {\n },\n afterRender: function () {\n\n }\n});\n","PJQ.views.directcosts = PJQ.views.directcosts ? PJQ.views.directcosts : {};\nPJQ.views.directcosts.DirectCostSettings = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'direct-costs'),\n model: null,\n customFields: null\n },\n events: {\n\n },\n afterRender: function() {\n new PJQ.inputs.Selectpicker({\n el: this.$('.select-default-accounting-method'),\n isIntChoices: true,\n isMultiple: false,\n defaultValue: this.model.get('defaultAccountingMethod') != null ? this.model.get('defaultAccountingMethod') : PJQ.constants.budget.accountingMethod.UNIT_QUANTITY,\n onChange: _.bind(function (value) {\n this.model.set('defaultAccountingMethod', value);\n this.onChange();\n }, this)\n });\n },\n onChange: function (model) {\n if (typeof this.options.onChange === 'function') {\n this.options.onChange(model ? model : this.model);\n }\n }\n});\n","PJQ.views.settings.FinanceCoreFieldSettings = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'Finance-Core-Fields')\n },\n events: {\n 'click .cb-visible': 'isVisibleChanged',\n 'click .cb-required': 'isRequiredChanged',\n },\n beforeFirstRender: function () {\n let fnRender = _.bind(function(fillFields){\n _.each(fillFields, _.bind(function (field, index) {\n let matchField = this.collection.findWhere({fieldName: field.fieldName});\n if (matchField == null) {\n this.collection.add(_.defaults(field, {\n isVisible: true,\n isRequired: false,\n sortOrder: index,\n canContactEdit: field.canEdit !== false\n }));\n }\n else {\n matchField.set({\n name: field.name,\n sortOrder: index,\n canContactEdit: field.canEdit !== false\n });\n }\n }, this));\n\n this.render();\n }, this);\n if(this.options.context){\n switch (this.options.context){\n case 'primecontracts':\n PJQ.app.session.fetchPrimeContractFieldSettings(_.bind(function(fields) {\n this.collection = fields;\n fnRender(PJQ.constants.financeCoreFields.primeContacts.primeContract);\n }, this));\n break;\n case 'commitments':\n PJQ.app.session.fetchCommitmentFieldSettings(_.bind(function(fields) {\n this.collection = fields;\n fnRender(PJQ.constants.financeCoreFields.commitments.commitment);\n }, this));\n break;\n case 'commitmentchangeorders':\n PJQ.app.session.fetchCommitmentChangeOrderFieldSettings(_.bind(function(fields) {\n this.collection = fields;\n fnRender(PJQ.constants.financeCoreFields.commitments.changeOrder);\n }, this));\n break;\n case 'primecontractchangeorders':\n PJQ.app.session.fetchPrimeContractChangeOrderFieldSettings(_.bind(function(fields) {\n this.collection = fields;\n fnRender(PJQ.constants.financeCoreFields.primeContacts.changeOrder);\n }, this));\n break;\n case 'receivableinvoices':\n PJQ.app.session.fetchReceivableInvoiceFieldSettings(_.bind(function(fields) {\n this.collection = fields;\n fnRender(PJQ.constants.financeCoreFields.invoices.receivableInvoice);\n }, this));\n break;\n case 'payableinvoices':\n PJQ.app.session.fetchPayableInvoiceFieldSettings(_.bind(function(fields) {\n this.collection = fields;\n fnRender(PJQ.constants.financeCoreFields.invoices.payableInvoice);\n }, this));\n break;\n case 'directcosts':\n PJQ.app.session.fetchDirectCostFieldSettings(_.bind(function(fields) {\n this.collection = fields;\n fnRender(PJQ.constants.financeCoreFields.directCosts.directCost);\n }, this));\n break;\n }\n }\n },\n afterRender: function () {\n if (this.collection == null || !this.collection.isFetched) {\n return;\n }\n\n this.dataTable = new PJQ.views.dataTables.DataTable({\n el: this.$(\".field-table\"),\n data: this.collection.models,\n isHideSearch: true,\n paging: false,\n rowId: \"cid\",\n order: [0, 'asc'],\n columns: [\n {\n \"title\": \"\",\n \"data\": \"attributes.sortOrder\",\n \"visible\": false\n },\n {\n \"title\": \"Name\",\n \"data\": \"attributes.name\",\n \"orderable\": false\n },\n {\n \"title\": \"Visible\",\n \"data\": \"attributes.isVisible\",\n \"orderable\": false,\n \"render\": function (data, type, row) {\n let contactEdit = row.get('canContactEdit') !== false;\n return '
';\n }\n },\n {\n \"title\": \"Required\",\n \"data\": \"attributes.isRequired\",\n \"orderable\": false,\n \"render\": function (data, type, row) {\n let contactEdit = row.get('canContactEdit') !== false;\n return '
';\n }\n }\n ]\n });\n },\n isVisibleChanged: function (e) {\n let $target = $(e.currentTarget),\n $row = $target.closest('tr'),\n row = this.dataTable.getRow($row),\n setting = row.data(),\n enabled = $target.prop('checked');\n setting.set('isVisible', enabled);\n\n if (!enabled) {\n // if the field is made invisible to contacts\n // it must be made not required for contacts\n setting.set('isRequired', false);\n }\n\n setting.queueSave();\n this.dataTable.refresh();\n },\n isRequiredChanged: function (e) {\n let $target = $(e.currentTarget),\n $row = $target.closest('tr'),\n row = this.dataTable.getRow($row),\n setting = row.data();\n setting.set('isRequired', $target.prop('checked'));\n if(!setting.get('isVisible') && $target.prop('checked')){\n setting.set('isVisible', true);\n }\n\n setting.queueSave();\n this.dataTable.refresh();\n }\n});","PJQ.views.settings.GroupSettings = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'Groups')\n },\n events: {\n 'click .add-group': 'addClicked',\n 'click .edit-group': 'editClicked',\n 'click .delete-group': 'deleteClicked',\n 'click tr': 'selectGroup',\n 'click .merge-groups': 'mergeGroups',\n 'click .link-groups': 'changeLinked',\n 'click .btn-sort-alpha': 'sortGroupsAlpha'\n },\n beforeRender: function () {\n this.renderData = {\n model: this.model,\n linkStatus: (PJQ.app.session.preferences.getPref(PJQ.constants.preferenceTypes.HAS_GROUPS_LINKED))\n };\n },\n afterRender: function () {\n $('.link-groups').prop('hidden', !PJQ.app.session.preferences.getPref(PJQ.constants.preferenceTypes.ENABLE_DIRECTORY));\n $('.current-status').prop('hidden', !PJQ.app.session.preferences.getPref(PJQ.constants.preferenceTypes.ENABLE_DIRECTORY));\n if (PJQ.app.session.preferences.getPref(PJQ.constants.preferenceTypes.HAS_GROUPS_LINKED)) {\n let $button = $('.link-groups');\n $button.append(\"Unlink All Groups\");\n } else {\n $('.link-groups').append(\"Link Groups\");\n }\n\n this.groupLevels = parseInt(PJQ.app.session.preferences.getPref(PJQ.constants.preferenceTypes.GROUP_LEVELS));\n this.groupLevels = this.groupLevels ? this.groupLevels : 1;\n this.dataTable = new PJQ.views.dataTables.DataTable({\n el: this.$(\".group-table\"),\n data: this.collection.models,\n rowId: \"cid\",\n order: [0, 'asc'],\n language: {\n zeroRecords: 'Click \"Add\" to create a new group'\n },\n sortableOptions: {\n data: this.collection,\n containment: \".group-table\"\n },\n pageLength: 50,\n bSort: false,\n onRowDoubleClick: _.bind(function (row) {\n let groupArr = _.each(this.collection.models, function (model) {\n let groups = [];\n groups.push(model.attributes.groupName);\n return groups\n }, this);\n this.editGroup(row.data(), groupArr);\n }, this),\n contextMenuOptions: {\n actions: [\n {\n name: 'Edit',\n onClick: _.bind(function (row) {\n let groupArr = _.each(this.collection.models, function (model) {\n let groups = [];\n groups.push(model.attributes.groupName);\n return groups\n }, this);\n this.editGroup(row.data(), groupArr);\n }, this)\n },\n {\n name: 'Delete',\n isDanger: true,\n onClick: _.bind(function (row) {\n this.deleteGroup(row);\n }, this)\n\n }\n ]\n },\n columns: [\n {\n \"data\": \"attributes.sortOrder\",\n \"title\": \"\",\n \"searchable\": false,\n \"orderable\": false,\n \"visible\": false,\n \"render\": _.bind(function (data, type, row) {\n let content = '';\n if (data != null) {\n content = '
'\n }\n\n return content\n }, this)\n },\n {\n \"title\": \"Name\",\n \"data\": \"attributes.groupName\",\n \"orderable\": true\n },\n {\n \"title\": \"Parent Group\",\n \"defaultContent\": \"\",\n \"data\": \"attributes.groupDescription\",\n \"orderable\": true,\n \"render\": _.bind(function (data) {\n if (data.includes(\"|\")) {\n return data.replace(/\\|/g, \" / \")\n } else {\n return data\n }\n })\n },\n {\n \"title\": \"Created On\",\n \"data\": \"attributes.createdOn\",\n \"orderable\": true,\n \"render\": _.bind(function (data) {\n if (data) {\n let date = PJQ.helpers.dateHelpers.parseDateString(data);\n return PJQ.helpers.dateHelpers.getDateString(date, \"MM/dd/yyyy\")\n }\n })\n },\n {\n \"data\": \"\",\n \"title\": \"\",\n \"orderable\": false,\n \"searchable\": false,\n \"width\": \"80px\",\n \"render\": _.bind(function (data, type, row) {\n return '
';\n }, this)\n }\n ]\n });\n\n this.groupLevelSelect = new PJQ.inputs.Selectpicker({\n el: this.$('.input-group-levels'),\n defaultValue: this.groupLevels,\n onChange: _.bind(function (value) {\n new PJQ.views.modals.DeleteCancel({\n header: \"Change Group Levels?\",\n body: 'Changing group levels will delete all existing parent groups. Do you still want to change group levels?',\n deleteButtonText: \"Confirm\",\n deleteButtonColorClass: 'success',\n declineButtonText: \"Decline\",\n declineButtonColorClass: \"danger\",\n onDelete: _.bind(function () {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'groups',\n value: 'level'\n }\n ], [\n {\n parameter: 'level',\n value: value\n }\n ])\n }).post().done(_.bind(function () {\n PJQ.app.session.fetch({\n success: _.bind(function () {\n PJQ.app.session.preferences.setPref(PJQ.constants.preferenceTypes.GROUP_LEVELS, value);\n this.collection.fetch({\n success: _.bind(function () {\n PJQ.notifications.notify.successNotify({\n message: 'Group Level Successfully Changed'\n });\n this.render()\n }, this)\n });\n }, this)\n });\n }, this));\n }, this),\n onCancel: _.bind(function () {\n this.render()\n }, this)\n });\n }, this)\n });\n },\n addClicked: function () {\n let newGroup = new this.options.groupModel({\n groupName: \"\",\n groupDescription: \"\",\n sortOrder: this.collection.length + 1,\n createdOn: PJQ.helpers.dateHelpers.getDateString(new Date(), \"MM/dd/yyyy\")\n });\n let groupArr = _.each(this.collection.models, function (model) {\n let groups = [];\n groups.push(model.attributes.groupName);\n return groups\n }, this);\n this.editGroup(newGroup, groupArr);\n },\n editClicked: function (e) {\n let target = $(e.currentTarget),\n row = this.dataTable.getRow(target.closest('tr')),\n group = row.data(),\n groupArr = _.each(this.collection.models, function (model) {\n let groups = [];\n groups.push(model.attributes.groupName);\n return groups\n }, this);\n\n this.editGroup(group, groupArr);\n },\n changeLinked: function () {\n let isLinked = PJQ.app.session.preferences.getPref(PJQ.constants.preferenceTypes.HAS_GROUPS_LINKED);\n if (!isLinked) {\n new PJQ.views.settings.GroupLinkModal({\n onSuccess: _.bind(function () {\n PJQ.app.session.preferences.setPref(PJQ.constants.preferenceTypes.HAS_GROUPS_LINKED, !isLinked);\n PJQ.notifications.notify.successNotify({\n message: 'Groups successfully Linked'\n });\n this.render();\n }, this),\n onError: _.bind(function () {\n PJQ.notifications.notify.errorNotify({\n message: 'An error has occurred. Please check and make sure you have selected an excel file, and that it is correctly formatted.'\n });\n }, this)\n })\n } else {\n new PJQ.views.modals.YesNo({\n header: \"Unlink Groups\",\n body: 'Are you sure you would like to unlink groups?',\n onYes: _.bind(function () {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'groups',\n value: 'unlink'\n }\n ])\n }).post().done(_.bind(function () {\n PJQ.app.session.fetch({\n success: _.bind(function () {\n PJQ.app.session.preferences.setPref(PJQ.constants.preferenceTypes.HAS_GROUPS_LINKED, !isLinked);\n PJQ.notifications.notify.successNotify({\n message: 'Groups successfully Unlinked'\n });\n this.render();\n }, this)\n });\n }, this));\n }, this)\n });\n }\n },\n editGroup: function (group, extra) {\n new PJQ.views.settings.EditGroupModal({\n model: group,\n groupArr: extra,\n groupLevels: this.groupLevels,\n onSave: _.bind(function (group) {\n let isNew = group.isNew();\n if (group.hasChanged() || isNew) {\n group.save(null, {\n notify: true,\n success: () => {\n if (isNew) {\n this.collection.add(group);\n this.dataTable.addRow(group);\n }\n this.dataTable.refresh();\n }\n });\n }\n }, this),\n onClose: _.bind(function (group) {\n if (group ? group.hasChanged() : group) {\n group.fetch({\n success: _.bind(function () {\n this.dataTable.refresh();\n }, this)\n });\n }\n }, this),\n onDelete: _.bind(function (group) {\n if (group.id > 0) {\n let row = this.dataTable.getRow(group.cid);\n this.collection.remove(group);\n group.destroy();\n if (row != null) {\n this.dataTable.removeRow(row);\n }\n }\n }, this)\n });\n },\n sortGroupsAlpha: function () {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'groups',\n value: 'sortalpha'\n },\n ]), data: {\n groupLevels: this.groupLevels\n }\n }).put().done(_.bind(function () {\n this.collection.fetch({\n success: _.bind(function () {\n PJQ.app.session.preferences.setPref(PJQ.constants.preferenceTypes.GROUP_LEVELS, parseInt(this.groupLevelSelect.getValue()));\n this.dataTable.render();\n }, this)\n });\n }, this));\n },\n selectGroup: function (e) {\n if (e.ctrlKey === true) {\n let target = $(e.currentTarget);\n target.toggleClass('selected');\n this.checkMergeButton()\n }\n },\n checkMergeButton: function () {\n if (this.dataTable.dataTable.rows('.selected').data().length >= 2) {\n $('.merge-groups').attr('disabled', false);\n } else {\n $('.merge-groups').attr('disabled', true);\n }\n },\n mergeGroups: function () {\n let groupArray = [];\n _.each(this.dataTable.dataTable.rows('.selected').data(), function (group) {\n groupArray.push(group)\n });\n new PJQ.views.settings.MergeGroupsModal({\n groups: groupArray,\n onSave: _.bind(function () {\n this.collection.fetch({\n success: _.bind(function () {\n let page = this.dataTable.dataTable.page();\n this.$('.merge-groups').attr('disabled', true);\n this.dataTable.render();\n this.dataTable.dataTable.page(page).draw('page');\n }, this)\n });\n\n }, this)\n })\n },\n deleteClicked: function (e) {\n let target = $(e.currentTarget),\n row = this.dataTable.getRow(target.closest('tr'));\n this.deleteGroup(row);\n },\n deleteGroup: function (row) {\n let group = row.data();\n\n new PJQ.views.modals.DeleteCancel({\n header: \"Confirm Deletion\",\n body: \"Are you sure you want to delete this field?\",\n onDelete: _.bind(function () {\n this.collection.remove(group);\n group.destroy();\n this.dataTable.removeRow(row);\n }, this)\n });\n }\n});\n\nPJQ.views.settings.MergeGroupsModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'Modal-Merge-Groups'),\n maxWidth: 250\n },\n events: {\n 'click .merge-save': 'splitGroups',\n 'click .merge-close': 'onClose'\n },\n beforeRender: function () {\n this.renderData = {\n groups: this.options.groups\n }\n },\n afterRender: function () {\n new PJQ.Binder(this.$el, this.model, {\n watchElements: [\n 'input'\n ]\n });\n\n this.mergePicker = new PJQ.inputs.Selectpicker({\n el: this.$('.merge-groups'),\n onChange: _.bind(function (value) {\n\n }, this)\n });\n },\n onClose: function () {\n this.removeModal()\n },\n splitGroups: function () {\n let mergeInto = parseInt(this.mergePicker.getValue()),\n mergeGroups = [];\n _.each(this.options.groups, function (group) {\n if (group.get('groupId') !== mergeInto) {\n mergeGroups.push(group.get('groupId'))\n }\n });\n mergeGroups = mergeGroups.join('|');\n this.onSave(mergeInto, mergeGroups)\n },\n onSave: function (group, mergeGroups) {\n let loader = new PJQ.Loader(this.$('.modal-body'));\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'groups',\n value: 'merge'\n },\n ], [\n {\n parameter: 'groupId',\n value: group\n },\n {\n parameter: 'groupIdToMerge',\n value: mergeGroups\n }\n ])\n }).put().done(_.bind(function () {\n loader.remove();\n this.options.onSave();\n this.removeModal();\n }, this));\n }\n});\n\nPJQ.views.settings.EditGroupModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'Modal-Edit-Groups'),\n maxWidth: 600\n },\n events: {\n 'click .group-save': 'validate',\n 'click .group-close': 'close',\n 'click .group-delete': 'delete',\n 'focusout .group-desc': 'updateTotal',\n 'focusout .group-desc-sub': 'updateTotal',\n \"click .btn-new-parent\": \"groupTwoNew\",\n 'click .btn-existing-parent': \"groupTwoExisting\",\n \"click .btn-new-sub-parent\": \"groupThreeNew\",\n 'click .btn-existing-sub-parent': \"groupThreeExisting\",\n 'click .change-to-existing': \"groupTwoExisting\",\n 'click .change-to-existing-sub': \"groupThreeExisting\"\n },\n beforeRender: function () {\n this.renderData = {\n model: this.model,\n options: this.options,\n groupArr: this.options.groupArr\n };\n },\n afterRender: function () {\n new PJQ.Binder(this.$el, this.model, {\n setDefaultValues: true,\n watchElements: [\n 'input'\n ]\n });\n this.groupTwoPicker = new PJQ.inputs.Selectpicker({\n el: this.$('.select-parent-group'),\n noneSelectedText: 'Select Parent Group',\n defaultValue: this.model.get('groupDescription').split('|')[0],\n onChange: _.bind(function (value) {\n if (this.options.groupLevels === 2) {\n this.model.set('groupDescription', value);\n }\n if (this.options.groupLevels === 3) {\n this.$('.group-desc').val(value);\n this.updateTotal();\n }\n }, this),\n liveSearch: true\n });\n\n this.groupThreePicker = new PJQ.inputs.Selectpicker({\n el: this.$('.select-sub-parent-group'),\n noneSelectedText: 'Select Sub-Parent Group',\n defaultValue: this.model.get('groupDescription').split('|')[1],\n onChange: _.bind(function (value) {\n if (this.options.groupLevels === 3) {\n this.$('.group-desc-sub').val(value);\n this.updateTotal();\n }\n }, this),\n liveSearch: true\n });\n this.showExistButtons()\n },\n showExistButtons: function () {\n let show = [],\n subShow = [];\n _.each(this.options.groupArr, function (model) {\n if (_.size(model.get('groupDescription')) > 0) {\n show.push(model);\n if (model.get('groupDescription').includes('|')) {\n subShow.push(model);\n }\n }\n });\n if (_.size(show) > 0) {\n $('.btn-existing-parent').attr('hidden', false);\n }\n if (_.size(subShow) > 0) {\n $('.btn-existing-sub-parent').attr('hidden', false);\n }\n },\n updateTotal: function () {\n if (this.options.groupLevels === 3 && this.$('.group-desc-sub').val().length > 0) {\n this.$('.group-desc-total').val(this.$('.group-desc').val() + \"|\" + this.$('.group-desc-sub').val())\n } else {\n this.$('.group-desc-total').val(this.$('.group-desc').val())\n }\n },\n groupTwoNew: function () {\n $('.new-or-existing-parent').hide();\n $('.new-parent-group').attr('hidden', false);\n },\n groupTwoExisting: function () {\n this.model.get('groupDescription').length > 0 ? $('.parent-group').hide() : $('.new-or-existing-parent').hide();\n $('.existing-parent-group').attr('hidden', false);\n this.groupTwoPicker.updateChoices(_.each([...new Set(_.map(_.filter(this.options.groupArr, _.bind(function (item) {\n return (_.size(item.attributes.groupDescription) > 0);\n }, this)), function (item) {\n return item.attributes.groupDescription.split(/\\|/)[0]\n }))], function (arr) {\n return arr;\n }))\n },\n groupThreeNew: function () {\n $('.new-or-existing-sub-parent').hide();\n $('.new-sub-parent-group').attr('hidden', false);\n },\n groupThreeExisting: function () {\n this.model.get('groupDescription').length > 0 ? $('.sub-parent-group').hide() : $('.new-or-existing-sub-parent').hide();\n $('.existing-sub-parent-group').attr('hidden', false);\n this.groupThreePicker.updateChoices(_.each([...new Set(_.map(_.filter(this.options.groupArr, _.bind(function (item) {\n return item.attributes.groupDescription.includes(\"|\")\n\n }, this)), function (item) {\n return item.attributes.groupDescription.split(/\\|/)[1]\n }))], function (set) {\n return set\n }))\n },\n close: function () {\n if (this.model.hasChanged()) {\n new PJQ.views.modals.SaveDontSave({\n header: \"Unsaved Changes\",\n body: \"Do you want to save changes?\",\n onSave: _.bind(function () {\n this.save();\n }, this),\n onDontSave: _.bind(function () {\n if (this.options.onClose) {\n this.options.onClose(this.model);\n }\n this.removeModal();\n }, this)\n });\n } else if (this.options.onClose) {\n this.options.onClose(this.model);\n this.removeModal();\n }\n },\n validate: function () {\n if (this.errorAlert) {\n this.errorAlert.destroy();\n }\n let match = 0,\n errors = 0,\n errorMsg = \"\",\n id = this.model.get('groupId');\n if (this.$('.input-group-name').val().length <= 0) {\n errorMsg += \"Name must be included\";\n errors++\n }\n _.each(this.options.groupArr, function (model) {\n if (model.attributes.groupId !== id)\n if (model.attributes.groupName === this.$('.input-group-name').val()) {\n match++\n }\n\n }, this);\n if (match > 0) {\n errors++;\n errorMsg += \"Group name already exists\"\n\n }\n if (errors === 0) {\n this.save();\n } else {\n this.renderError(errorMsg)\n }\n },\n renderError: function (text) {\n this.$('.group-save').prop('disabled', false);\n this.errorAlert = new PJQ.Alert(this.$('.error'), {\n type: 'danger',\n text: text\n });\n },\n save: function () {\n if (this.errorAlert) {\n this.errorAlert.destroy();\n }\n if (this.options.onSave) {\n if (this.options.groupLevels === 3 && this.$('.group-desc-total').val().length > 0) {\n this.model.set('groupDescription', this.$('.group-desc-total').val());\n }\n this.options.onSave(this.model);\n this.removeModal();\n }\n },\n delete: function () {\n new PJQ.views.modals.DeleteCancel({\n header: \"Confirm Deletion\",\n body: \"Are you sure you want to delete this field?\",\n onDelete: _.bind(function () {\n if (this.options.onDelete) {\n this.options.onDelete(this.model);\n }\n this.removeModal();\n }, this)\n });\n }\n});\n\nPJQ.views.settings.GroupLinkModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'Modal-Link-Groups'),\n maxWidth: 600\n },\n afterRender: function () {\n let isLinked = PJQ.app.session.preferences.getPref(PJQ.constants.preferenceTypes.HAS_GROUPS_LINKED);\n this.fileUploader = new PJQ.views.files.FileUploaderGrid({\n el: this.$('.group-map-file-uploader'),\n canUpload: true,\n dictDefaultMessage: \"Drop Trade Mapping file here or click to upload\",\n canDelete: false,\n isRemoveOnComplete: true,\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'groups',\n value: 'link'\n }\n ]),\n onSuccess: _.bind(function () {\n this.removeModal();\n this.options.onSuccess();\n }, this),\n onError: _.bind(function (result) {\n this.removeModal();\n this.options.onError()\n }, this)\n });\n }\n});\n","PJQ.views.settings.PayableInvoiceSettings = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'payable-invoices'),\n model: null,\n customFields: null\n },\n events: {},\n beforeFirstRender: function () {\n this.listenTo(this.model, 'fetch', this.render);\n },\n renderData: function () {\n return {\n model: this.model\n };\n },\n afterRender: function () {\n new PJQ.Binder(this.$el, this.model, {\n setDefaultValues: true,\n watchElements: [\n 'input'\n ],\n afterChange: _.bind(this.onChange, this)\n });\n\n new PJQ.views.settings.NumberFormatInput({\n el: this.$('.number-format'),\n settings: this.model,\n customFields: this.options.customFields,\n onSave: (value) => {\n this.model.set('numberFormat', value);\n this.onChange();\n }\n });\n\n new PJQ.inputs.Selectpicker({\n el: this.$('.select-line-item-order-by'),\n defaultValue: this.model.get('lineItemOrderBy'),\n onChange: _.bind(function (value) {\n this.model.set('lineItemOrderBy', value);\n this.onChange();\n }, this)\n });\n },\n onChange: function () {\n if (typeof this.options.onChange === 'function') {\n this.options.onChange(this.model);\n }\n }\n});\n\nPJQ.views.settings.ReceivableInvoiceSettings = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'receivable-invoices'),\n model: null,\n customFields: null\n },\n events: {},\n beforeFirstRender: function () {\n this.listenTo(this.model, 'fetch', this.render);\n },\n renderData: function () {\n return {\n model: this.model\n };\n },\n afterRender: function () {\n new PJQ.Binder(this.$el, this.model, {\n setDefaultValues: true,\n watchElements: [\n 'input'\n ],\n afterChange: _.bind(this.onChange, this)\n });\n\n new PJQ.views.settings.NumberFormatInput({\n el: this.$('.number-format'),\n settings: this.model,\n customFields: this.options.customFields,\n onSave: (value) => {\n this.model.set('numberFormat', value);\n this.onChange();\n }\n });\n\n new PJQ.inputs.Selectpicker({\n el: this.$('.select-line-item-order-by'),\n defaultValue: this.model.get('lineItemOrderBy'),\n onChange: _.bind(function (value) {\n this.model.set('lineItemOrderBy', value);\n this.onChange();\n }, this)\n });\n },\n onChange: function () {\n if (typeof this.options.onChange === 'function') {\n this.options.onChange(this.model);\n }\n }\n});","PJQ.views.meetings = PJQ.views.meetings ? PJQ.views.meetings : {};\nPJQ.views.meetings.MeetingSettings = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'meetings'),\n model: null,\n customFields: null\n },\n events: {\n\n },\n afterRender: function() {\n new PJQ.Binder(this.$el, this.model, {\n setDefaultValues: true,\n watchElements: [\n 'input'\n ],\n afterChange: _.bind(function () {\n this.onChange(this.model);\n }, this)\n });\n },\n onChange: function (model) {\n if (typeof this.options.onChange === 'function') {\n this.options.onChange(model ? model : this.model);\n }\n }\n});\n","PJQ.views.settings.SettingsNav = PJQ.views.BaseView.extend({\r\n defaults: {\r\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'Settings-Nav'),\r\n initView: null\r\n },\r\n events: {\r\n 'click .settings-nav-item': 'navItemClicked',\r\n 'click .cb-enable-contact-core-field-settings': 'enableContactCoreFieldSettings'\r\n },\r\n beforeFirstRender: function () {\r\n\r\n },\r\n beforeRender: function () {\r\n\r\n },\r\n afterRender: function () {\r\n if (this.options.subscriptionId != null && this.options.subscriptionId > 0) {\r\n this.renderAccountSettings(this.options.subscriptionId)\r\n } else {\r\n this.renderAccountSettings();\r\n }\r\n\r\n $(function () {\r\n $('[data-toggle=\"tooltip\"]').tooltip();\r\n });\r\n this.saveToolbar = new PJQ.views.toolbars.SettingsSaveToolbar({\r\n el: this.$('.save-toolbar-outer'),\r\n validate: _.bind(function () {\r\n if (!this.companyInfoSettings.validate()) {\r\n this.$('.settings-nav-item').removeClass('active');\r\n this.$('.settings-nav-content').addClass('hidden');\r\n this.$('.account-item').addClass('active');\r\n this.$('.settings-nav-content[data-nav=\"ACCOUNT\"]').removeClass('hidden');\r\n } else {\r\n return true;\r\n }\r\n }, this)\r\n });\r\n\r\n if (this.options.initView != null) {\r\n switch (this.options.initView) {\r\n case \"billing\":\r\n if (this.companyInfoSettings != null) {\r\n this.companyInfoSettings.changeCard();\r\n }\r\n break;\r\n default:\r\n this.activateNavItem(this.options.initView);\r\n }\r\n }\r\n },\r\n navItemClicked: function (e) {\r\n let $target = $(e.currentTarget),\r\n tab = $target.data('nav');\r\n this.activateNavItem(tab);\r\n },\r\n activateNavItem: function (tab) {\r\n let tabUpper = tab.toUpperCase();\r\n this.$('.settings-nav-item').removeClass('active');\r\n this.$('.settings-nav-content').addClass('hidden');\r\n this.$('.settings-nav-item[data-nav=\"' + tabUpper + '\"]').addClass('active');\r\n this.$('.settings-nav-content[data-nav=\"' + tabUpper + '\"]').removeClass('hidden');\r\n\r\n PJQ.app.router.navigate('settings/' + tab.toLowerCase(), {\r\n trigger: false\r\n });\r\n\r\n switch (tabUpper) {\r\n case 'ACCOUNT':\r\n this.renderAccountSettings();\r\n break;\r\n case 'ADDRESSBOOK':\r\n this.renderAddressBookSettings();\r\n break;\r\n case 'ORDERING':\r\n this.renderOrderingSettings();\r\n break;\r\n case 'PROJECTS':\r\n this.renderProjectSettings();\r\n break;\r\n case 'BIDFORMS':\r\n this.renderBidFormSettings();\r\n break;\r\n case 'SCHEDULE':\r\n this.renderScheduleSettings();\r\n break;\r\n case 'RFI':\r\n this.renderRFISettings();\r\n break;\r\n case 'DAILYREPORTS':\r\n this.renderDailyReportSettings();\r\n break;\r\n case 'PUNCHLIST':\r\n this.renderPunchListSettings();\r\n break;\r\n case 'ACTIONITEMS':\r\n this.renderActionItemSettings();\r\n break;\r\n case 'COSTCODES':\r\n this.renderCostCodeSettings();\r\n break;\r\n case 'TAXCODES':\r\n this.renderTaxCodeSettings();\r\n break;\r\n case 'TIMECARD':\r\n this.renderTimeCardSettings();\r\n break;\r\n case 'PRIMECONTRACTS':\r\n this.renderPrimeContractSettings();\r\n break;\r\n case 'GROUPS':\r\n this.renderGroupSettings();\r\n break;\r\n case 'REGIONS':\r\n this.renderRegionSettings();\r\n break;\r\n case 'COMMITMENTS':\r\n this.renderCommitmentSettings();\r\n break;\r\n case 'INVOICING':\r\n this.renderInvoicingSettings();\r\n break;\r\n case 'DIRECTCOSTS':\r\n this.renderDirectCostSettings();\r\n break;\r\n case 'MEETINGS':\r\n this.renderMeetingSettings();\r\n break;\r\n case 'USERTYPES':\r\n this.renderUserTypeSettings();\r\n break;\r\n case 'USERS':\r\n this.renderUsers();\r\n break;\r\n case 'SSO':\r\n this.renderSSO();\r\n break;\r\n case 'SUBMITTALS':\r\n this.renderSubmittalSettings();\r\n break;\r\n case 'INTEGRATIONS':\r\n this.renderIntegrations();\r\n case 'CHANGEREQUESTS':\r\n this.renderChangeRequestSettings();\r\n break;\r\n case 'FEATURES':\r\n this.renderFeatureSettings();\r\n break;\r\n }\r\n },\r\n renderBidFormSettings: function () {\r\n this.bidFormSettings = new PJQ.views.bidForms.Settings({\r\n el: this.$('.bid-form-settings'),\r\n onChange: _.bind(function (model) {\r\n this.saveToolbar.addSaveModel(model);\r\n }, this),\r\n isDefaultSettings: true\r\n });\r\n\r\n new PJQ.views.bidForms.TemplateManagement({\r\n el: this.$('.bid-form-templates')\r\n });\r\n },\r\n renderIntegrations: function () {\r\n this.integrationSettings = new PJQ.integrations.views.IntegrationsList({\r\n el: this.$('.integrations'),\r\n initOptions: this.options.initOptions\r\n });\r\n },\r\n renderFeatureSettings: function() {\r\n if(!this.featureSettings) {\r\n this.featureSettings = new PJQ.views.featureSettings.FeatureSettings({\r\n el: this.$('.features-settings'),\r\n model: new PJQ.models.featureSettings.FeatureSetting(),\r\n onChange: _.bind(function (model) {\r\n this.saveToolbar.addSaveModel(model);\r\n }, this)\r\n })\r\n }\r\n },\r\n renderScheduleSettings: function () {\r\n if (this.scheduleSettings == null) {\r\n this.scheduleSettings = new PJQ.views.schedule.Settings({\r\n el: this.$('.schedule-settings'),\r\n onChange: _.bind(function (model) {\r\n this.saveToolbar.addSaveModel(model);\r\n }, this)\r\n });\r\n\r\n // PJQ.app.session.fetchScheduleCustomFields(null, _.bind(function (fields) {\r\n // \tif (!this.scheduleFieldSettings) {\r\n // \t\tthis.scheduleFieldSettings = new PJQ.views.settings.CustomFieldSettings({\r\n // \t\t\tel: this.$('.schedule-custom-fields'),\r\n // \t\t\tcollection: fields,\r\n // \t\t\tfieldModel: PJQ.models.schedule.ScheduleCustomField\r\n // \t\t});\r\n // \t}\r\n // }, this));\r\n\r\n new PJQ.views.schedule.TaskStatuses({\r\n el: this.$('.schedule-statuses')\r\n });\r\n\r\n new PJQ.views.schedule.TemplateManagement({\r\n el: this.$('.template-management')\r\n });\r\n }\r\n },\r\n renderAccountSettings: function (subscriptionId) {\r\n if (this.companyInfoSettings == null) {\r\n this.companyInfoSettings = new PJQ.views.settings.CompanyInfo({\r\n el: this.$('.company-info'),\r\n procoreCode: this.options.procoreCode,\r\n subscriptionId: subscriptionId != null ? subscriptionId : 0,\r\n onChange: _.bind(function (model) {\r\n this.saveToolbar.addSaveModel(model);\r\n }, this)\r\n });\r\n }\r\n },\r\n renderOrderingSettings: function () {\r\n if (this.orderingSettings == null) {\r\n PJQ.app.session.fetchOrderingSettings(_.bind(function (settings) {\r\n this.orderingSettings = new PJQ.views.settings.PlanRoomOrderingSettings({\r\n el: this.$('.ordering'),\r\n model: settings,\r\n onChange: _.bind(function (model) {\r\n this.saveToolbar.addSaveModel(model);\r\n }, this)\r\n });\r\n }, this));\r\n }\r\n },\r\n renderAddressBookSettings: function () {\r\n if (this.addressBookSettings == null) {\r\n PJQ.app.session.fetchAddressBookSettings(_.bind(function (settings) {\r\n this.addressBookSettings = new PJQ.views.settings.AddressBookGeneralSettings({\r\n el: this.$('.address-book-general'),\r\n model: settings,\r\n onChange: _.bind(function (model) {\r\n this.saveToolbar.addSaveModel(model);\r\n }, this)\r\n });\r\n }, this));\r\n\r\n PJQ.app.session.fetchCompanyCustomFields(null, _.bind(function (fields) {\r\n if (!this.companyFieldSettings) {\r\n this.companyFieldSettings = new PJQ.views.settings.CustomFieldSettings({\r\n el: this.$('.company-custom-fields'),\r\n collection: fields,\r\n fieldModel: PJQ.models.contacts.CompanyCustomField\r\n });\r\n }\r\n }, this));\r\n\r\n PJQ.app.session.fetchContactCustomFields(null, _.bind(function (fields) {\r\n if (!this.contactFieldSettings) {\r\n this.contactFieldSettings = new PJQ.views.settings.CustomFieldSettings({\r\n el: this.$('.contact-custom-fields'),\r\n collection: fields,\r\n fieldModel: PJQ.models.contacts.ContactCustomField\r\n });\r\n }\r\n }, this));\r\n\r\n this.renderContactCoreFieldSettings();\r\n }\r\n },\r\n renderContactCoreFieldSettings: function () {\r\n let $fields = this.$('.contact-core-fields');\r\n $fields.empty();\r\n if (PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.ENABLE_CONTACT_FIELD_SETTINGS)) {\r\n this.contactCoreFieldSettings = new PJQ.views.settings.ContactFieldSettings({\r\n el: $fields\r\n });\r\n } else {\r\n new PJQ.Alert($fields, {\r\n type: 'primary',\r\n text: 'Enable advanced settings to show this feature'\r\n });\r\n }\r\n },\r\n enableContactCoreFieldSettings: function (e) {\r\n let enable = $(e.currentTarget).prop('checked');\r\n new PJQ.ajax.Request({\r\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'contacts'\r\n },\r\n {\r\n endpoint: 'fields'\r\n }\r\n ], [\r\n {\r\n parameter: 'enable',\r\n value: enable\r\n }\r\n ])\r\n }).put().done(_.bind(function () {\r\n if (enable) {\r\n PJQ.app.session.preferences.setPref(PJQ.constants.preferenceTypes.ENABLE_CONTACT_FIELD_SETTINGS, enable);\r\n } else {\r\n PJQ.app.session.preferences.deletePref(PJQ.constants.preferenceTypes.ENABLE_CONTACT_FIELD_SETTINGS);\r\n }\r\n this.renderContactCoreFieldSettings();\r\n if (this.addressBookSettings != null) {\r\n this.addressBookSettings.render();\r\n }\r\n }, this));\r\n },\r\n renderProjectSettings: function () {\r\n if (this.planroomSettings == null) {\r\n PJQ.app.session.fetchPlanRoomSettings(_.bind(function (settings) {\r\n this.planroomSettings = new PJQ.views.settings.PlanRoomGeneralSettings({\r\n el: this.$('.general'),\r\n model: settings,\r\n onChange: _.bind(function (model) {\r\n this.saveToolbar.addSaveModel(model);\r\n }, this)\r\n });\r\n }, this));\r\n\r\n PJQ.app.session.fetchProjectCustomFields(null, _.bind(function (fields) {\r\n if (!this.customFieldSettings) {\r\n this.customFieldSettings = new PJQ.views.settings.CustomFieldSettings({\r\n el: this.$('.project-custom-fields'),\r\n collection: fields,\r\n fieldModel: PJQ.models.projects.ProjectCustomField\r\n });\r\n }\r\n }, this));\r\n\r\n new PJQ.views.settings.ProjectStatuses({\r\n el: this.$('.project-statuses')\r\n });\r\n\r\n new PJQ.views.settings.MessageStatuses({\r\n el: this.$('.message-statuses')\r\n });\r\n\r\n if (PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.ENABLE_PROJECT_STATUS_ID)) {\r\n PJQ.app.session.fetchProjectStatuses(_.bind(function () {\r\n new PJQ.views.settings.ProjectStatusList({\r\n el: this.$('.project-status-list')\r\n });\r\n }, this));\r\n }\r\n\r\n new PJQ.views.settings.ProjectNDAs({\r\n el: this.$('.project-nda-outer')\r\n });\r\n }\r\n },\r\n renderRFISettings: function () {\r\n if (this.rfiCustomFieldSettings == null) {\r\n PJQ.app.session.fetchRFICustomFields(null, _.bind(function (fields) {\r\n this.rfiCustomFieldSettings = new PJQ.views.settings.CustomFieldSettings({\r\n el: this.$('.rfi-custom-fields'),\r\n collection: fields,\r\n fieldModel: PJQ.models.rfi.CustomField\r\n });\r\n }, this));\r\n }\r\n\r\n if (this.rfiSettings == null) {\r\n PJQ.app.session.fetchRFISettings(_.bind(function (settings) {\r\n this.rfiSettings = new PJQ.views.rfi.RFISettings({\r\n el: this.$('.rfi-settings'),\r\n model: settings,\r\n onChange: _.bind(function (model) {\r\n this.saveToolbar.addSaveModel(model);\r\n }, this)\r\n });\r\n }, this));\r\n }\r\n },\r\n renderDailyReportSettings: function () {\r\n if (this.dailyReportSettings == null) {\r\n this.dailyReportSettings = new PJQ.views.settings.DailyReportSettings({\r\n el: this.$('.daily-reports')\r\n });\r\n }\r\n },\r\n renderPunchListSettings: function () {\r\n if (this.punchListSettings == null) {\r\n PJQ.app.session.fetchPunchListCustomFields(null, _.bind(function (fields) {\r\n this.punchListSettings = new PJQ.views.settings.CustomFieldSettings({\r\n el: this.$('.punch-list-custom-fields'),\r\n collection: fields,\r\n fieldModel: PJQ.models.punchlists.PunchlistCustomField\r\n });\r\n }, this));\r\n }\r\n\r\n if (!this.punchlistTemplates) {\r\n this.punchlistTemplates = new PJQ.views.punchlists.TemplateManagement({\r\n el: this.$('.punchlists-template-management')\r\n });\r\n }\r\n },\r\n renderActionItemSettings: function () {\r\n if (this.actionItemSettings == null) {\r\n PJQ.app.session.fetchActionItemCustomFields(null, _.bind(function (fields) {\r\n this.actionItemSettings = new PJQ.views.settings.CustomFieldSettings({\r\n el: this.$('.action-items'),\r\n collection: fields,\r\n fieldModel: PJQ.models.actionItems.ActionItemCustomField\r\n });\r\n }, this));\r\n }\r\n\r\n if (!this.actionItemTemplates) {\r\n this.actionItemTemplates = new PJQ.views.actionItems.TemplateManagement({\r\n el: this.$('.actionitems-template-management')\r\n });\r\n }\r\n\r\n },\r\n renderCostCodeSettings: function () {\r\n if (this.costCodeSettings == null) {\r\n this.costCodeSettings = new PJQ.views.budget.CostCodeSettings({\r\n el: this.$('.cost-code-settings')\r\n });\r\n }\r\n if(this.costTypeSettings == null) {\r\n this.costTypeSettings = new PJQ.views.budget.CostTypeSettings({\r\n el: this.$('.cost-type-settings')\r\n });\r\n }\r\n },\r\n renderTaxCodeSettings: function () {\r\n if(this.taxCodeSettings == null) {\r\n this.taxCodeSettings = new PJQ.views.budget.TaxCodeSettings({\r\n el: this.$('.tax-code-settings')\r\n });\r\n }\r\n },\r\n renderTimeCardSettings: function () {\r\n if (this.timeCardSettingsView == null) {\r\n this.timeCardSettings = new PJQ.models.timecards.TimeCardSettings();\r\n this.timeCardSettings.fetch({\r\n success: _.bind(function () {\r\n this.timeCardCategories = new PJQ.collections.timecards.TimeCardCategories();\r\n this.timeCardCategories.fetch({\r\n success: _.bind(function () {\r\n this.timeCardSettingsView = new PJQ.views.settings.TimeCardSettings({\r\n el: this.$('.timecard-settings'),\r\n model: this.timeCardSettings,\r\n categories: this.timeCardCategories,\r\n saveToolbar: this.saveToolbar,\r\n onChange: _.bind(function (model) {\r\n this.saveToolbar.addSaveModel(model);\r\n }, this)\r\n });\r\n }, this)\r\n });\r\n }, this)\r\n });\r\n }\r\n },\r\n renderGroupSettings: function () {\r\n if (this.groupSettings == null) {\r\n PJQ.app.session.fetchUserGroups(null, _.bind(function (groups) {\r\n this.groupSettings = new PJQ.views.settings.GroupSettings({\r\n el: this.$('.groups'),\r\n collection: groups,\r\n groupModel: PJQ.models.groups.Group\r\n });\r\n }, this));\r\n\r\n new PJQ.views.bidPackages.TemplateManagement({\r\n el: this.$('.bid-package-template-management'),\r\n templateType: \"Bid Package\"\r\n });\r\n }\r\n },\r\n renderRegionSettings: function () {\r\n if (this.regionSettings == null) {\r\n this.regionSettings = new PJQ.views.settings.RegionSettings({\r\n el: this.$('.regions')\r\n });\r\n }\r\n },\r\n renderChangeRequestSettings: function () {\r\n if (!this.changeRequestSettings) {\r\n this.changeRequestCustomFields = new PJQ.collections.changeRequests.CustomFields();\r\n this.changeRequestCustomFields.fetch({\r\n success: _.bind(function () {\r\n this.changeRequestSettings = new PJQ.models.changeRequests.Settings();\r\n this.changeRequestSettings.fetch({\r\n success: _.bind(function () {\r\n PJQ.app.session.fetchProjectCustomFields(PJQ.app.session.get('masterUserId'), _.bind(function () {\r\n new PJQ.views.settings.ChangeRequestSettings({\r\n el: this.$('.change-request-settings'),\r\n model: this.changeRequestSettings,\r\n customFields: this.changeRequestCustomFields,\r\n onChange: _.bind(function (model) {\r\n this.saveToolbar.addSaveModel(model);\r\n }, this)\r\n });\r\n\r\n this.changeRequestCustomFieldSettings = new PJQ.views.settings.CustomFieldSettings({\r\n el: this.$('.change-request-custom-fields'),\r\n collection: this.changeRequestCustomFields,\r\n fieldModel: PJQ.models.changeRequests.CustomField\r\n });\r\n }, this));\r\n }, this)\r\n });\r\n }, this)\r\n });\r\n }\r\n },\r\n renderPrimeContractSettings: function () {\r\n if (!this.primeContractSettings) {\r\n this.primeContractCustomFields = new PJQ.collections.primeContracts.CustomFields();\r\n this.primeContractCustomFields.fetch({\r\n success: _.bind(function () {\r\n this.primeContractSettings = new PJQ.models.primeContracts.Settings();\r\n this.primeContractSettings.fetch({\r\n success: _.bind(function () {\r\n PJQ.app.session.fetchProjectCustomFields(PJQ.app.session.get('masterUserId'), _.bind(function () {\r\n new PJQ.views.settings.PrimeContractSettings({\r\n el: this.$('.prime-contract-settings'),\r\n model: this.primeContractSettings,\r\n customFields: this.primeContractCustomFields,\r\n onChange: _.bind(function (model) {\r\n this.saveToolbar.addSaveModel(model);\r\n }, this)\r\n });\r\n\r\n new PJQ.views.settings.TermsList({\r\n el: this.$('.contract-terms'),\r\n context: 'contracts'\r\n })\r\n\r\n new PJQ.views.settings.FinanceCoreFieldSettings({\r\n el: this.$('.prime-contract-field-settings'),\r\n context: 'primecontracts'\r\n });\r\n\r\n new PJQ.views.settings.FinanceCoreFieldSettings({\r\n el: this.$('.prime-contract-change-order-field-settings'),\r\n context: 'primecontractchangeorders'\r\n });\r\n\r\n this.primeContractCustomFieldSettings = new PJQ.views.settings.CustomFieldSettings({\r\n el: this.$('.prime-contract-custom-fields'),\r\n collection: this.primeContractCustomFields,\r\n fieldModel: PJQ.models.primeContracts.CustomField\r\n });\r\n }, this));\r\n }, this)\r\n });\r\n }, this)\r\n });\r\n }\r\n if (!this.primeContractCOSettings) {\r\n this.primeContractCOCustomFields = new PJQ.collections.primeContracts.ChangeOrderCustomFields();\r\n this.primeContractCOCustomFields.fetch({\r\n success: _.bind(function () {\r\n this.primeContractCOSettings = new PJQ.models.primeContracts.ChangeOrderSettings();\r\n this.primeContractCOSettings.fetch({\r\n success: _.bind(function () {\r\n PJQ.app.session.fetchProjectCustomFields(PJQ.app.session.get('masterUserId'), _.bind(function () {\r\n new PJQ.views.settings.PrimeContractChangeOrderSettings({\r\n el: this.$('.prime-contract-change-order-settings'),\r\n model: this.primeContractCOSettings,\r\n customFields: this.primeContractCOCustomFields,\r\n onChange: _.bind(function (model) {\r\n this.saveToolbar.addSaveModel(model);\r\n }, this)\r\n });\r\n\r\n this.primeContractCOCustomFieldSettings = new PJQ.views.settings.CustomFieldSettings({\r\n el: this.$('.prime-contract-change-order-custom-fields'),\r\n collection: this.primeContractCOCustomFields,\r\n fieldModel: PJQ.models.primeContracts.ChangeOrderCustomField\r\n });\r\n }, this));\r\n }, this)\r\n });\r\n }, this)\r\n });\r\n }\r\n },\r\n renderCommitmentSettings: function () {\r\n if (!this.commitmentSettings) {\r\n this.commitmentCustomFields = new PJQ.collections.commitments.CustomFields();\r\n this.commitmentCustomFields.fetch({\r\n success: _.bind(function () {\r\n this.commitmentSettings = new PJQ.models.commitments.Settings();\r\n this.commitmentSettings.fetch({\r\n success: () => {\r\n PJQ.app.session.fetchProjectCustomFields(PJQ.app.session.get('masterUserId'), _.bind(function () {\r\n new PJQ.views.settings.CommitmentSettings({\r\n el: this.$('.commitment-settings'),\r\n model: this.commitmentSettings,\r\n customFields: this.commitmentCustomFields,\r\n onChange: _.bind(function (model) {\r\n this.saveToolbar.addSaveModel(model);\r\n }, this)\r\n });\r\n\r\n new PJQ.views.settings.TermsList({\r\n el: this.$('.commitment-terms'),\r\n context: 'commitments'\r\n });\r\n\r\n new PJQ.views.settings.FinanceCoreFieldSettings({\r\n el: this.$('.commitment-field-settings'),\r\n context: 'commitments'\r\n });\r\n\r\n this.commitmentCustomFieldSettings = new PJQ.views.settings.CustomFieldSettings({\r\n el: this.$('.commitment-custom-fields'),\r\n collection: this.commitmentCustomFields,\r\n fieldModel: PJQ.models.commitments.CustomField\r\n });\r\n }, this));\r\n }\r\n });\r\n }, this)\r\n });\r\n }\r\n if (!this.commitmentCOSettings) {\r\n this.commitmentCOCustomFields = new PJQ.collections.commitments.ChangeOrderCustomFields();\r\n this.commitmentCOCustomFields.fetch({\r\n success: _.bind(function () {\r\n this.commitmentCOSettings = new PJQ.models.commitments.ChangeOrderSettings();\r\n this.commitmentCOSettings.fetch({\r\n success: _.bind(function () {\r\n PJQ.app.session.fetchProjectCustomFields(PJQ.app.session.get('masterUserId'), _.bind(function () {\r\n new PJQ.views.settings.CommitmentChangeOrderSettings({\r\n el: this.$('.commitment-change-order-settings'),\r\n model: this.commitmentCOSettings,\r\n customFields: this.commitmentCOCustomFields,\r\n onChange: _.bind(function (model) {\r\n this.saveToolbar.addSaveModel(model);\r\n }, this)\r\n });\r\n\r\n new PJQ.views.settings.FinanceCoreFieldSettings({\r\n el: this.$('.commitment-change-order-field-settings'),\r\n context: 'commitmentchangeorders'\r\n });\r\n\r\n this.commitmentCOCustomFieldSettings = new PJQ.views.settings.CustomFieldSettings({\r\n el: this.$('.commitment-change-order-custom-fields'),\r\n collection: this.commitmentCOCustomFields,\r\n fieldModel: PJQ.models.commitments.ChangeOrderCustomField\r\n });\r\n }, this));\r\n }, this)\r\n });\r\n }, this)\r\n });\r\n }\r\n },\r\n renderInvoicingSettings: function () {\r\n if (!this.payableInvoiceSettings) {\r\n this.payableInvoiceCustomFields = new PJQ.collections.invoicing.PayableInvoiceCustomFields();\r\n this.payableInvoiceCustomFields.fetch({\r\n success: _.bind(function () {\r\n this.payableInvoiceSettings = new PJQ.models.invoicing.PayableInvoiceSettings();\r\n this.payableInvoiceSettings.fetch({\r\n success: _.bind(function () {\r\n PJQ.app.session.fetchProjectCustomFields(PJQ.app.session.get('masterUserId'), _.bind(function () {\r\n new PJQ.views.settings.PayableInvoiceSettings({\r\n el: this.$('.payable-invoice-settings'),\r\n model: this.payableInvoiceSettings,\r\n customFields: this.payableInvoiceCustomFields,\r\n onChange: _.bind(function (model) {\r\n this.saveToolbar.addSaveModel(model);\r\n }, this)\r\n });\r\n\r\n new PJQ.views.settings.FinanceCoreFieldSettings({\r\n el: this.$('.payable-invoice-field-settings'),\r\n context: 'payableinvoices'\r\n });\r\n\r\n this.payableInvoiceCustomFieldSettings = new PJQ.views.settings.CustomFieldSettings({\r\n el: this.$('.payable-invoice-custom-fields'),\r\n collection: this.payableInvoiceCustomFields,\r\n fieldModel: PJQ.models.invoicing.PayableInvoiceCustomField\r\n });\r\n }, this));\r\n }, this)\r\n });\r\n }, this)\r\n });\r\n }\r\n if (!this.receivableInvoiceSettings) {\r\n this.receivableInvoiceCustomFields = new PJQ.collections.invoicing.ReceivableInvoiceCustomFields();\r\n this.receivableInvoiceCustomFields.fetch({\r\n success: _.bind(function () {\r\n this.receivableInvoiceSettings = new PJQ.models.invoicing.ReceivableInvoiceSettings();\r\n this.receivableInvoiceSettings.fetch({\r\n success: _.bind(function () {\r\n PJQ.app.session.fetchProjectCustomFields(PJQ.app.session.get('masterUserId'), _.bind(function () {\r\n new PJQ.views.settings.ReceivableInvoiceSettings({\r\n el: this.$('.receivable-invoice-settings'),\r\n model: this.receivableInvoiceSettings,\r\n customFields: this.receivableInvoiceCustomFields,\r\n onChange: _.bind(function (model) {\r\n this.saveToolbar.addSaveModel(model);\r\n }, this)\r\n });\r\n\r\n new PJQ.views.settings.FinanceCoreFieldSettings({\r\n el: this.$('.receivable-invoice-field-settings'),\r\n context: 'receivableinvoices'\r\n });\r\n\r\n this.receivableInvoiceCustomFieldSettings = new PJQ.views.settings.CustomFieldSettings({\r\n el: this.$('.receivable-invoice-custom-fields'),\r\n collection: this.receivableInvoiceCustomFields,\r\n fieldModel: PJQ.models.invoicing.ReceivableInvoiceCustomField\r\n });\r\n }, this));\r\n }, this)\r\n });\r\n }, this)\r\n });\r\n }\r\n },\r\n renderMeetingSettings: function () {\r\n if (!this.meetingCustomFields) {\r\n this.meetingCustomFields = new PJQ.collections.meetings.CustomFields();\r\n this.meetingCustomFields.fetch({\r\n success: _.bind(function () {\r\n this.meetingSettings = new PJQ.models.meetings.Settings();\r\n this.meetingSettings.fetch({\r\n success: _.bind(function () {\r\n new PJQ.views.meetings.MeetingSettings({\r\n el: this.$('.meeting-settings'),\r\n model: this.meetingSettings,\r\n onChange: _.bind(function (model) {\r\n this.saveToolbar.addSaveModel(model);\r\n }, this)\r\n });\r\n\r\n this.meetingCustomFieldSettings = new PJQ.views.settings.CustomFieldSettings({\r\n el: this.$('.meeting-custom-fields'),\r\n collection: this.meetingCustomFields,\r\n fieldModel: PJQ.models.meetings.CustomField\r\n });\r\n\r\n if (!this.meetingTemplates) {\r\n this.meetingTemplates = new PJQ.views.meetings.TemplateManagement({\r\n el: this.$('.meetings-template-management')\r\n });\r\n }\r\n }, this)\r\n });\r\n }, this)\r\n });\r\n }\r\n },\r\n renderDirectCostSettings: function () {\r\n if (!this.directCostCustomFields) {\r\n this.directCostCustomFields = new PJQ.collections.directcosts.CustomFields();\r\n this.directCostCustomFields.fetch({\r\n success: _.bind(function () {\r\n this.directCostSettings = new PJQ.models.directcosts.Settings();\r\n this.directCostSettings.fetch({\r\n success: _.bind(function () {\r\n new PJQ.views.directcosts.DirectCostSettings({\r\n el: this.$('.direct-cost-settings'),\r\n model: this.directCostSettings,\r\n onChange: _.bind(function (model) {\r\n this.saveToolbar.addSaveModel(model);\r\n }, this)\r\n });\r\n\r\n this.directCostCustomFieldSettings = new PJQ.views.settings.CustomFieldSettings({\r\n el: this.$('.direct-cost-custom-fields'),\r\n collection: this.directCostCustomFields,\r\n fieldModel: PJQ.models.directcosts.CustomField\r\n });\r\n\r\n new PJQ.views.settings.FinanceCoreFieldSettings({\r\n el: this.$('.direct-cost-field-settings'),\r\n context: 'directcosts'\r\n });\r\n }, this)\r\n });\r\n }, this)\r\n });\r\n }\r\n },\r\n renderUserTypeSettings: function () {\r\n if (this.userTypeSettings == null) {\r\n PJQ.app.session.fetchUserTypes(_.bind(function (types) {\r\n this.userTypeSettings = new PJQ.views.settings.UserTypeSettings({\r\n el: this.$('.user-types'),\r\n collection: types,\r\n model: PJQ.models.userTypes.UserType\r\n });\r\n }, this));\r\n }\r\n },\r\n renderUsers: function () {\r\n if (this.userManagement == null) {\r\n PJQ.app.session.fetchUsers(_.bind(function (users) {\r\n this.userManagement = new PJQ.views.settings.UserSettings({\r\n el: this.$('.user-management'),\r\n collection: users\r\n });\r\n }, this));\r\n\r\n PJQ.app.session.fetchUserCustomFields(null, _.bind(function (fields) {\r\n if (!this.userCustomFieldSettings) {\r\n this.userCustomFieldSettings = new PJQ.views.settings.CustomFieldSettings({\r\n el: this.$('.user-custom-fields'),\r\n collection: fields,\r\n fieldModel: PJQ.models.users.UserCustomField\r\n });\r\n }\r\n }, this));\r\n }\r\n },\r\n renderSSO: function () {\r\n if (this.ssoSettings == null) {\r\n PJQ.app.session.fetchSSOProviders(_.bind(function (providers) {\r\n this.ssoSettings = new PJQ.views.settings.SSOSettings({\r\n el: this.$('.sso-settings'),\r\n collection: providers\r\n });\r\n }, this));\r\n }\r\n },\r\n renderSubmittalSettings: function () {\r\n if (this.submittalSettings == null) {\r\n this.submittalSettings = new PJQ.views.submittals.Settings({\r\n el: this.$('.submittal-settings'),\r\n onChange: _.bind(function (model) {\r\n this.saveToolbar.addSaveModel(model);\r\n }, this)\r\n });\r\n if (!this.submittalTemplates) {\r\n this.submittalTemplates = new PJQ.views.submittals.TemplateManagement({\r\n el: this.$('.submittal-template-management')\r\n });\r\n }\r\n if(!this.submittalStatuses){\r\n this.submittalStatuses = new PJQ.views.submittals.SubmittalStatusSettings({\r\n el: this.$('.submittal-status-settings')\r\n })\r\n }\r\n // if(!this.submittalItemTypes){\r\n // \tthis.submittalItemTypes = new PJQ.views.submittals.ItemTypeSettings({\r\n // \t\tel: this.$('.submittal-item-type-settings')\r\n // \t})\r\n // }\r\n PJQ.app.session.fetchSubmittalCustomFields(null, _.bind(function (fields) {\r\n if (!this.submittalFieldSettings) {\r\n this.submittalFieldSettings = new PJQ.views.settings.CustomFieldSettings({\r\n el: this.$('.submittal-custom-fields'),\r\n collection: fields,\r\n fieldModel: PJQ.models.submittals.SubmittalCustomField\r\n });\r\n }\r\n }, this));\r\n }\r\n }\r\n});\r\n","PJQ.helpers.numberFormatHelpers = {\n createFormatStringPreview(numberFormat) {\n let result = '';\n _.each(numberFormat, function (token) {\n if (token.isText)\n result += token.label;\n else\n result += '[' + token.label + ']';\n });\n return result;\n }\n};\n\nPJQ.views.settings.NumberFormatInput = PJQ.views.BaseView.extend({\n defaults: {\n commitmentType: null,\n settings: null,\n customFields: null,\n numberFormatProperty: 'numberFormat',\n onSave: _.noop()\n },\n afterRender: function () {\n if (this.options.commitmentType === PJQ.constants.commitments.commitmentType.SUBCONTRACT) {\n this.options.numberFormatProperty = 'subcontractNumberFormat';\n } else if (this.options.commitmentType === PJQ.constants.commitments.commitmentType.PURCHASE_ORDER) {\n this.options.numberFormatProperty = 'purchaseOrderNumberFormat';\n }\n\n this.numberFormat = this.options.settings.get(this.options.numberFormatProperty);\n let editButton = $('');\n this.$el.closest('.form-group').find('label').append(editButton);\n editButton.on('click', _.bind(this.edit, this));\n\n this.renderFormatString();\n },\n edit: function () {\n new PJQ.views.settings.NumberFormatEditModal({\n settings: this.options.settings,\n numberFormatProperty: this.options.numberFormatProperty,\n onSave: _.bind(function (value) {\n this.numberFormat = value;\n this.options.settings.set(this.options.numberFormatProperty, value);\n this.renderFormatString();\n if (typeof this.options.onSave === 'function') {\n this.options.onSave(value);\n }\n }, this)\n });\n },\n renderFormatString: function () {\n this.$el.html('
' + PJQ.helpers.numberFormatHelpers.createFormatStringPreview(this.numberFormat) + '
');\n }\n});\n\nPJQ.views.settings.NumberFormatEditModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'modal-number-format-edit'),\n minWidth: 800,\n numberFormatProperty: 'numberFormat',\n onSave: _.noop(),\n parentView: null\n },\n events: {\n 'click a.new-token': 'addToken',\n 'click .edit-token': 'editToken',\n 'change .input-ct-min-len': 'counterMinLengthChanged',\n 'click .cancel-edit-token': 'cancelEdit',\n 'click .delete-token': 'deleteToken',\n 'click .save-token': 'saveToken',\n 'click .save': 'saveFormat'\n },\n beforeModalCreated: async function () {\n let numFmt = this.options.settings.get(this.options.numberFormatProperty);\n if (numFmt != null) {\n this.numberFormat = [...numFmt];\n } else {\n this.numberFormat = [];\n }\n\n this.tokens = [\n {\n token: '',\n label: 'Enter Text',\n isText: true\n },\n {\n token: 'project.projectId',\n label: 'Project Id',\n category: 'Project Details'\n },\n {\n token: 'project.startDate',\n label: 'Project Start',\n isDate: true,\n dateFormatId: 0,\n category: 'Project Details'\n },\n {\n token: 'today',\n label: 'Current Date',\n isDate: true,\n dateFormatId: 0\n }];\n\n this.erpIntegration = await PJQ.app.session.fetchERPIntegration();\n if (this.erpIntegration != null) {\n this.tokens.push({\n token: 'externalProjectNumber',\n label: 'ERP Project Id',\n category: 'Project Details'\n });\n }\n\n // add the custom fields\n _.each(PJQ.app.session.customFields.project[PJQ.app.session.get('masterUserId')].models, _.bind(function (customField) {\n switch (customField.get('fieldType')) {\n case PJQ.constants.customFields.fieldTypes.DATE:\n case PJQ.constants.customFields.fieldTypes.DATETIME:\n this.tokens.push(\n {\n token: 'fieldValue' + customField.get('fieldNumber'),\n label: customField.get('fieldName'),\n isDate: true,\n dateFormatId: 0,\n category: 'Project Details'\n });\n break;\n case PJQ.constants.customFields.fieldTypes.INT:\n case PJQ.constants.customFields.fieldTypes.TEXT:\n this.tokens.push(\n {\n token: 'fieldValue' + customField.get('fieldNumber'),\n label: customField.get('fieldName'),\n category: 'Project Details'\n });\n break;\n // case PJQ.constants.customFields.fieldTypes.CHOICE:\n // if (!customField.get('isMultipleChoice')) {\n // this.tokens.push(\n // {\n // token: 'fieldValue' + customField.get('fieldNumber'),\n // label: customField.get('fieldName')\n // });\n // break;\n // }\n // break;\n }\n }, this));\n\n this.tokens.push({\n token: 'counter',\n label: 'Counter'\n });\n\n this.render();\n },\n renderData: function () {\n return {\n tokens: this.tokens\n };\n },\n afterRender: function () {\n this.$('.number-format-preview').html(PJQ.helpers.numberFormatHelpers.createFormatStringPreview(this.numberFormat));\n\n this.editRow = null;\n this.dateFormatSelectPicker = null;\n this.datatable = new PJQ.views.dataTables.DataTable({\n el: this.$('.token-datatable'),\n data: this.numberFormat,\n isHideSearch: true,\n order: [],\n pageLength: 99999,\n sortableOptions: {\n data: this.numberFormat,\n containment: \".token-datatable\",\n stop: _.bind(function () {\n let self = this, rows = [];\n this.$('.token-datatable tbody tr').each(function (a, b) {\n rows.push(self.datatable.getRow(b).data());\n });\n\n this.numberFormat = rows;\n this.render();\n }, this)\n },\n bSort: false,\n onTableDraw: _.bind(function (dataTable) {\n if (this.$('.token-text').length) {\n this.$('.token-text').inputmask('', {\n regex: '^[0-9A-Z-a-z\\.\\-]*$'\n })\n this.$('.token-text').focus();\n } else if (this.$('.date-format').length) {\n this.dateFormatSelectPicker = new PJQ.inputs.Selectpicker({\n el: this.$('.date-format'),\n isIntChoices: true,\n isMultiple: false,\n defaultValue: parseInt(this.$('.date-format').data('default'))\n });\n this.$('.date-format').focus();\n }\n\n }, this),\n columns: [\n {\n \"title\": \"Element\",\n \"orderable\": false,\n \"searchable\": false,\n \"render\": (data, type, row) => {\n if (this.editRow === row) {\n if (row.isText) {\n return '';\n } else if (row.isDate) {\n return '
' + '[' + row.label + ']' + '
';\n }\n\n return '';\n } else {\n if (row.token === 'counter') {\n return '
' + '[' + row.label + ']' + '
Min. Length:
';\n } else if (row.isText) {\n return row.label;\n } else {\n return '[' + row.label + ']' + (row.isDate ? ' (' + PJQ.constants.commitments.commitmentNumberTokenDateFormatNames[row.dateFormatId] + ')' : '');\n }\n }\n }\n },\n {\n \"title\": '',\n \"render\": _.bind(function (data, type, row) {\n let html = '
';\n if (this.editRow === row) {\n html += '';\n html += '';\n } else {\n if (row.isText || row.isDate)\n html += '';\n\n html += '';\n }\n html += '
';\n return html;\n }, this),\n \"orderable\": false,\n \"searchable\": false,\n \"width\": \"75px\",\n \"className\": \"text-right\",\n \"visible\": true\n }\n ],\n dom: 't'\n });\n // '<\"top\"<\"clear\">>rt<\"bottom\"p<\"clear\">>'\n },\n counterMinLengthChanged: function (e) {\n let $target = $(e.currentTarget),\n $row = $target.closest('tr')[0],\n row = this.datatable.getRow($row),\n token = row.data();\n\n if (token == null) {\n return;\n }\n\n let minLen = parseInt($target.val());\n if (!isNaN(minLen) && minLen >= 1 && minLen <= 5) {\n token.minLength = minLen;\n }\n },\n addToken: function (e) {\n let tokenIndex = $(e.currentTarget).data('tokenIndex'),\n newToken = _.clone(this.tokens[tokenIndex]);\n this.editRow = null;\n if (newToken.isText) {\n newToken.label = '';\n this.editRow = newToken;\n } else if (newToken.isDate) {\n this.editRow = newToken;\n }\n\n if (this.editRow)\n this.$('.save').prop('disabled', true);\n\n this.datatable.addRow(newToken);\n\n this.isAdding = true;\n\n\n this.$('.number-format-preview').html(PJQ.helpers.numberFormatHelpers.createFormatStringPreview(this.datatable.dataTable.data()));\n },\n editToken: function (e) {\n let row = this.datatable.getRow($(e.currentTarget).closest('tr')[0]);\n this.editRow = row.data();\n this.$('.save').prop('disabled', true);\n row.invalidate().draw();\n },\n cancelEdit: function (e) {\n let row = this.datatable.getRow($(e.currentTarget).closest('tr')[0]);\n this.editRow = null;\n this.dateFormatSelectPicker = null;\n this.$('.save').prop('disabled', false);\n if (this.isAdding) {\n this.datatable.removeRow(row);\n } else {\n row.invalidate().draw();\n }\n this.isAdding = false;\n },\n deleteToken: function (e) {\n let row = this.datatable.getRow($(e.currentTarget).closest('tr')[0]);\n if (row == null) {\n return;\n }\n\n this.datatable.removeRow(row);\n this.$('.number-format-preview').html(PJQ.helpers.numberFormatHelpers.createFormatStringPreview(this.datatable.dataTable.data()));\n },\n saveToken: function (e) {\n let row = this.datatable.getRow($(e.currentTarget).closest('tr')[0]),\n data = row.data();\n if (data.isText) {\n PJQ.helpers.inputHelpers.setInputError(this.$('.token-text'), true);\n let value = this.$('.token-text').val().trim();\n if (_.size(value) === 0) {\n PJQ.helpers.inputHelpers.setInputError(this.$('.token-text'), false);\n return;\n }\n\n data.label = value;\n } else if (data.isDate) {\n data.dateFormatId = this.dateFormatSelectPicker.getValue();\n this.dateFormatSelectPicker = null;\n }\n\n this.editRow = null;\n this.isAdding = false;\n this.$('.save').prop('disabled', false);\n row.invalidate().draw();\n this.$('.number-format-preview').html(PJQ.helpers.numberFormatHelpers.createFormatStringPreview(this.datatable.dataTable.data()));\n },\n saveFormat: function () {\n if (typeof this.options.onSave === 'function') {\n let tokens = [];\n for (let i = 0; i < this.datatable.dataTable.data().length; i++)\n tokens.push(this.datatable.dataTable.data()[i]);\n\n this.options.onSave(tokens);\n }\n\n this.removeModal();\n }\n});","PJQ.views.settings.PlanRoomOrderingSettings = PJQ.views.BaseView.extend({\n\tdefaults: {\n\t\ttemplate: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'Planroom-Ordering')\n\t},\n\tevents: {\n\t\t'click .btn-ordering-save': 'saveSettings',\n\t\t'click .btn-payment-info': 'changePaymentInfo'\n\t},\n\tbeforeRender: function () {\n\t\tthis.renderData = {\n\t\t\tmodel: this.model\n\t\t}\n\t},\n\tafterRender: function () {\n\n\t\tif (PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.HIDE_SAVE_PAYMENT_INFO))\n\t\t\tthis.$('.btn-payment-info').hide();\n\n\t\tnew PJQ.Binder(this.$el, this.model, {\n\t\t\tsetDefaultValues: true,\n\t\t\tafterChange: _.bind(function () {\n\t\t\t\tthis.onChange();\n\t\t\t}, this)\n\t\t});\n\n\t\t$(function () {\n\t\t\t$('[data-toggle=\"tooltip\"]').tooltip()\n\t\t});\n\n\n\t\tnew PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('.select-delivery-options'),\n\t\t\tdefaultValue: (this.model.get('deliverBy').length > 0) ? this.model.get('deliverBy') : \"Next Day (Morning)\",\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tthis.model.set('deliverBy', value);\n\t\t\t\tthis.onChange();\n\t\t\t}, this)\n\t\t});\n\n\t\tnew PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('.select-large-copies'),\n\t\t\tdefaultValue: this.model.get('largeFormatCopyCount'),\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tthis.model.set('largeFormatCopyCount', value);\n\t\t\t\tthis.onChange();\n\t\t\t}, this)\n\t\t});\n\n\t\tnew PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('.select-large-print-size'),\n\t\t\tdefaultValue: (this.model.get('largeFormatPrintSize').length > 0) ? this.model.get('largeFormatPrintSize') : \"FULL SIZE\",\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tthis.model.set('largeFormatPrintSize', value);\n\t\t\t\tthis.onChange();\n\t\t\t}, this)\n\t\t});\n\n\t\tnew PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('.select-large-paper'),\n\t\t\tdefaultValue: (this.model.get('largeFormatPaper').length > 0) ? this.model.get('largeFormatPaper') : \"WHITE BOND\",\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tthis.model.set('largeFormatPaper', value);\n\t\t\t\tthis.onChange();\n\t\t\t}, this)\n\t\t});\n\n\t\tnew PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('.select-large-binding'),\n\t\t\tdefaultValue: (this.model.get('largeFormatBinding').length > 0) ? this.model.get('largeFormatBinding') : \"LOOSE\",\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tthis.model.set('largeFormatBinding', value);\n\t\t\t\tthis.onChange();\n\t\t\t}, this)\n\t\t});\n\n\t\tnew PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('.select-small-copies'),\n\t\t\tdefaultValue: this.model.get('smallformatCopyCount'),\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tthis.model.set('smallFormatCopyCount', value);\n\t\t\t\tthis.onChange();\n\t\t\t}, this)\n\t\t});\n\n\t\tnew PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('.select-small-paper'),\n\t\t\tdefaultValue: (this.model.get('smallFormatPaper').length > 0) ? this.model.get('smallFormatPaper') : \"WHITE BOND\",\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tthis.model.set('smallFormatPaper', value);\n\t\t\t\tthis.onChange();\n\t\t\t}, this)\n\t\t});\n\n\t\tnew PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('.select-small-binding'),\n\t\t\tdefaultValue: (this.model.get('smallFormatBinding').length > 0) ? this.model.get('smallFormatBinding') : \"LOOSE\",\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tthis.model.set('smallFormatBinding', value);\n\t\t\t\tthis.onChange();\n\t\t\t}, this)\n\t\t});\n\t},\n\tchangePaymentInfo: function () {\n\t\tnew PJQ.views.settings.PaymentInfoModal();\n\t},\n\tonChange: function () {\n\t\tif (typeof this.options.onChange === 'function') {\n\t\t\tthis.options.onChange(this.model);\n\t\t}\n\t},\n\tcancelEdit: function () {\n\t\tthis.model.fetch({\n\t\t\tsuccess: _.bind(function () {\n\t\t\t\tthis.render();\n\t\t\t}, this)\n\t\t});\n\t\tthis.render();\n\t},\n\tsaveSettings: function () {\n\t\tif (this.model.hasChanged()) {\n\t\t\tthis.model.patch(null, {\n\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\tthis.render();\n\t\t\t\t\tPJQ.notifications.notify.successNotify({\n\t\t\t\t\t\tmessage: 'Address book settings saved'\n\t\t\t\t\t});\n\t\t\t\t}, this)\n\t\t\t});\n\t\t}\n\t}\n});\n\nPJQ.views.settings.PaymentInfoModal = PJQ.views.BaseModal.extend({\n\tdefaults: {\n\t\ttemplate: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'Modal-Payment-Settings'),\n\t\tminWidth: 700\n\t},\n\tdefaultEvents: {\n\t\t'click .btn-save': 'save',\n\t\t'click .btn-cancel': 'cancel',\n\t\t'keyup .input-card-number': 'setCardBrand',\n\t\t'click .btn-edit': 'edit',\n\t\t'click .btn-copy-profile': 'copyProfile'\n\t},\n\tbeforeModalCreated: function () {\n\t\tthis.user = new PJQ.models.contacts.Contact({\n\t\t\tid: -PJQ.app.session.user.id\n\t\t});\n\n\t\tif (!this.user.isFetched) {\n\t\t\tthis.user.fetch();\n\t\t}\n\n\t\tif (this.model == null) {\n\t\t\tthis.model = new PJQ.models.settings.PaymentInfo();\n\t\t}\n\n\t\tif (!this.model.isFetched) {\n\t\t\tthis.model.fetch({\n\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\tthis.render();\n\t\t\t\t}, this)\n\t\t\t});\n\t\t}\n\t},\n\trenderData: function () {\n\t\treturn {\n\t\t\tmodel: this.model,\n\t\t\ttoday: new Date()\n\t\t};\n\t},\n\tafterRender: function () {\n\t\tthis.isEdit = false;\n\t\tnew PJQ.Binder(this.$el, this.model);\n\n\t\tPJQ.helpers.inputHelpers.inputMaskPhone(this.$('.input-user-phone'));\n\t\tPJQ.helpers.inputHelpers.inputMaskCreditCard(this.$('.input-card-number'));\n\n\t\tthis.statePicker = new PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('.user-edit-state'),\n\t\t\tdefaultValue: _.size(this.model.get('state')) > 0 ? this.model.get('state').toLowerCase() : null,\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tthis.model.set('state', value.toUpperCase());\n\t\t\t}, this)\n\t\t});\n\t\tthis.countryChanged();\n\n\t\tnew PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('.user-edit-country'),\n\t\t\tnoneSelectedText: 'Select Value',\n\t\t\tdefaultValue: _.size(this.model.get('country')) > 0 ? this.model.get('country').toLowerCase() : null,\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tthis.model.set('country', value.toUpperCase());\n\t\t\t\tthis.model.set('zip', '');\n\t\t\t\tthis.model.set('state', '');\n\t\t\t\tthis.countryChanged();\n\t\t\t}, this)\n\t\t});\n\n\t\tthis.monthPicker = new PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('.select-expiration-month'),\n\t\t\tnoneSelectedText: '',\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tthis.model.set('expMonth', value);\n\t\t\t}, this)\n\t\t});\n\n\t\tthis.yearPicker = new PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('.select-expiration-year'),\n\t\t\tnoneSelectedText: '',\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tthis.model.set('expYear', value);\n\t\t\t}, this)\n\t\t});\n\n\t\tnew PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('.select-expiration-month-disabled'),\n\t\t\tnoneSelectedText: '',\n\t\t\tdefaultValue: this.model.get('expMonth'),\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tthis.model.set('expMonth', value);\n\t\t\t}, this)\n\t\t});\n\n\t\tnew PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('.select-expiration-year-disabled'),\n\t\t\tnoneSelectedText: '',\n\t\t\tdefaultValue: this.model.get('expYear'),\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tthis.model.set('expYear', value);\n\t\t\t}, this)\n\t\t});\n\t\tthis.setCardBrand();\n\t},\n\tcopyProfile: function () {\n\t\tthis.model.set('companyName', this.user.get('companyName'));\n\t\tthis.model.set('cardholderName', this.user.get('contactName'));\n\t\tthis.model.set('address1', this.user.get('address1'));\n\t\tthis.model.set('address2', this.user.get('address2'));\n\t\tthis.model.set('city', this.user.get('city'));\n\t\tthis.model.set('zip', this.user.get('zip'));\n\t\tthis.model.set('state', this.user.get('state'));\n\t\tthis.model.set('country', this.user.get('country'));\n\t\tthis.model.set('phone', this.user.get('phone'));\n\t\tthis.model.set('phoneExt', this.user.get('phoneExtension'));\n\t\tthis.model.set('email', this.user.get('email'));\n\t\tthis.render()\n\t},\n\tsetCardBrand: function () {\n\t\tlet cardBrand = PJQ.helpers.paymentHelpers.getCardIssuer(this.model.get('cardNumber')),\n\t\t\ticon = PJQ.helpers.paymentHelpers.getCardIssuerIconFAClass(cardBrand);\n\t\tthis.$('.card-brand').addClass('fs-30 ' + icon);\n\t},\n\tcountryChanged: function () {\n\t\tlet country = _.size(this.model.get('country')) > 0 ? this.model.get('country').toLowerCase() : 'us',\n\t\t\toptions = '';\n\t\t_.each(PJQ.constants.states[country], function (state) {\n\t\t\toptions += '';\n\t\t});\n\t\tthis.statePicker.$el.html(options);\n\t\tthis.statePicker.refresh();\n\t\tif (_.size(this.model.get('state')) > 0)\n\t\t\tthis.statePicker.setValue(this.model.get('state').toLowerCase());\n\n\t\tPJQ.helpers.inputHelpers.inputMaskZip(this.$('.user-edit-zip'), country);\n\t},\n\tedit: function () {\n\t\tthis.isEdit = true;\n\t\tlet $prepend = this.$('.card-type-prepend');\n\t\tthis.$('.card-hidden').hide();\n\t\tthis.$('.card-shown').attr('hidden', false);\n\t\tthis.$('.select-expiration-year').attr('disabled', false);\n\t\tthis.$('.select-expiration-month').attr('disabled', false);\n\t\t$prepend.removeClass();\n\t\t$prepend.addClass('card-type-prepend fal fa-question fs-30')\n\t},\n\tvalidate: function () {\n\t\tlet isValid = true;\n\n\t\tlet isCompanyValid = _.size(this.model.get('companyName').trim()) > 0;\n\t\tPJQ.helpers.inputHelpers.setInputError(this.$('.input-user-company-name'), isCompanyValid);\n\t\tisValid = isCompanyValid && isValid;\n\n\t\tlet emailValid = PJQ.helpers.validators.validateEmail(this.$('.input-user-email').val());\n\t\tPJQ.helpers.inputHelpers.setInputError(this.$('.input-user-email'), (emailValid.success));\n\t\tisValid = emailValid.success && isValid;\n\n\t\tlet isContactValid = _.size(this.model.get('cardholderName').trim()) > 0;\n\t\tPJQ.helpers.inputHelpers.setInputError(this.$('.input-user-cardholder-name'), isContactValid);\n\t\tisValid = isContactValid && isValid;\n\n\t\tlet isAddressValid = _.size(this.model.get('address1').trim()) > 0;\n\t\tPJQ.helpers.inputHelpers.setInputError(this.$('.input-user-address-1'), isAddressValid);\n\t\tisValid = isAddressValid && isValid;\n\n\t\tlet isStateValid = _.size(this.model.get('state').trim()) > 0;\n\t\tisValid = isStateValid && isValid;\n\t\tthis.$('.user-edit-state').removeClass('p-field-error');\n\t\tif (!isStateValid) {\n\t\t\tthis.$('.user-edit-state').addClass('p-field-error');\n\t\t}\n\n\t\tlet isCityValid = _.size(this.model.get('city').trim()) > 0;\n\t\tPJQ.helpers.inputHelpers.setInputError(this.$('.user-edit-city'), isCityValid);\n\t\tisValid = isCityValid && isValid;\n\n\t\tlet isZipValid = _.size(this.model.get('zip').trim()) > 4;\n\t\tPJQ.helpers.inputHelpers.setInputError(this.$('.user-edit-zip'), isZipValid);\n\t\tisValid = isZipValid && isValid;\n\n\t\tlet isPhoneValid = _.size(this.model.get('phone')) >= 10;\n\t\tPJQ.helpers.inputHelpers.setInputError(this.$('.input-user-phone'), isPhoneValid);\n\t\tisValid = isPhoneValid && isValid;\n\n\t\tlet isCardValid = PJQ.helpers.paymentHelpers.validateCreditCard(this.model.get('cardNumber'));\n\t\tPJQ.helpers.inputHelpers.setInputError(this.$('.input-card-number'), isCardValid);\n\t\tisValid = isCardValid && isValid;\n\n\t\tlet isYearValid = (this.yearPicker.getValue() != null);\n\t\tisValid = isYearValid && isValid;\n\t\tthis.$('.select-expiration-year').removeClass('p-field-error');\n\t\tif (!isYearValid) {\n\t\t\tthis.$('.select-expiration-year').addClass('p-field-error');\n\t\t}\n\n\t\tlet isMonthValid = (this.monthPicker.getValue() != null);\n\t\tisValid = isMonthValid && isValid;\n\t\tthis.$('.select-expiration-month').removeClass('p-field-error');\n\t\tif (!isMonthValid) {\n\t\t\tthis.$('.select-expiration-month').addClass('p-field-error');\n\t\t}\n\n\t\treturn isValid;\n\t},\n\tsave: function () {\n\t\tif (this.isEdit) {\n\t\t\tlet cardNumber = this.$('.input-card-number').val();\n\t\t\tthis.model.set('cardNumber', cardNumber.replace(/\\D/g, ''));\n\t\t}\n\t\tif (this.validate()) {\n\t\t\tthis.model.save();\n\t\t\tthis.isEdit = false;\n\t\t\tthis.removeModal();\n\t\t}\n\t},\n\tcancel: function () {\n\t\tthis.isEdit = false;\n\t\tthis.removeModal();\n\t}\n});\n","PJQ.views.settings.PrimeContractSettings = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'prime-contracts'),\n model: null,\n customFields: null\n },\n events: {},\n beforeFirstRender: function () {\n this.listenTo(this.model, 'fetch', this.render);\n },\n afterRender: function () {\n new PJQ.Binder(this.$el, this.model, {\n watchElements: [\n 'input'\n ],\n afterChange: _.bind(function () {\n this.onChange();\n }, this)\n });\n\n new PJQ.inputs.Selectpicker({\n el: this.$('.select-default-accounting-method'),\n isIntChoices: true,\n isMultiple: false,\n defaultValue: this.model.get('defaultAccountingMethod') != null ? this.model.get('defaultAccountingMethod') : PJQ.constants.budget.accountingMethod.UNIT_QUANTITY,\n onChange: _.bind(function (value) {\n this.model.set('defaultAccountingMethod', value);\n this.onChange();\n }, this)\n });\n\n new PJQ.views.settings.NumberFormatInput({\n el: this.$('.number-format'),\n settings: this.model,\n customFields: this.options.customFields,\n onSave: (value) => {\n this.model.set('numberFormat', value);\n this.onChange();\n }\n });\n\n new PJQ.views.settings.SignatureEditInput({\n el: this.$('.manage-signature-input'),\n signature: this.model.get('defaultSignature'),\n headerSubText: \"Manage your company's default signature for Contracts\",\n onSave: _.bind(function(signature) {\n this.model.set('defaultSignature', signature);\n this.onChange();\n }, this)\n });\n\n new PJQ.inputs.Selectpicker({\n el: this.$('.select-line-item-order-by'),\n defaultValue: this.model.get('lineItemOrderBy'),\n onChange: _.bind(function (value) {\n this.model.set('lineItemOrderBy', value);\n this.onChange();\n }, this)\n });\n },\n onChange: function (model) {\n if (typeof this.options.onChange === 'function') {\n this.options.onChange(model ? model : this.model);\n }\n }\n});\n\nPJQ.views.settings.PrimeContractChangeOrderSettings = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'prime-contract-change-orders'),\n model: null,\n customFields: null\n },\n events: {},\n beforeFirstRender: function () {\n this.listenTo(this.model, 'fetch', this.render);\n },\n afterRender: function () {\n new PJQ.Binder(this.$el, this.model, {\n watchElements: [\n 'input'\n ],\n afterChange: _.bind(function () {\n this.onChange();\n }, this)\n });\n\n new PJQ.views.settings.NumberFormatInput({\n el: this.$('.number-format'),\n settings: this.model,\n customFields: this.options.customFields,\n onSave: (value) => {\n this.model.set('numberFormat', value);\n this.onChange();\n }\n });\n\n new PJQ.views.settings.SignatureEditInput({\n el: this.$('.manage-signature-input'),\n signature: this.model.get('defaultSignature'),\n headerSubText: \"Manage your company's default signature for Contract Change Orders\",\n onSave: _.bind(function(signature) {\n this.model.set('defaultSignature', signature);\n this.onChange();\n }, this)\n });\n\n new PJQ.inputs.Selectpicker({\n el: this.$('.select-line-item-order-by'),\n defaultValue: this.model.get('lineItemOrderBy'),\n onChange: _.bind(function (value) {\n this.model.set('lineItemOrderBy', value);\n this.onChange();\n }, this)\n });\n },\n onChange: function (model) {\n if (typeof this.options.onChange === 'function') {\n this.options.onChange(model ? model : this.model);\n }\n }\n});","PJQ.views.settings.PlanRoomGeneralSettings = PJQ.views.BaseView.extend({\n\tdefaults: {\n\t\ttemplate: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'Planroom-General')\n\t},\n\tevents: {\n\t\t'keydown .input-default-bid-due-time': function () {\n\t\t\treturn false;\n\t\t},\n\t\t'contextmenu .input-default-bid-due-time': function () {\n\t\t\treturn false;\n\t\t},\n\t\t'click .input-project-user-2-show': 'showUser2Changed'\n\t},\n\tbeforeFirstRender: function () {\n\t\tthis.listenTo(this.model, 'fetch', this.render);\n\t},\n\tbeforeRender: function () {\n\t\tthis.enableFax = PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.ENABLE_FAX) ? PJQ.app.session.preferences.getPref(PJQ.constants.preferenceTypes.ENABLE_FAX) : false;\n\t\tthis.renderData = {\n\t\t\tmodel: this.model,\n\t\t\tenableFax: this.enableFax,\n\t\t\tshowGroupCompanyView: !PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.PROJECT_WALL_ADMIN_VIEW_GROUP_COMPANY) || PJQ.app.session.preferences.getPref(PJQ.constants.preferenceTypes.PROJECT_WALL_ADMIN_VIEW_GROUP_COMPANY),\n\t\t\tshowGroupContactView: !PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.PROJECT_WALL_ADMIN_VIEW_GROUP_CONTACT) || PJQ.app.session.preferences.getPref(PJQ.constants.preferenceTypes.PROJECT_WALL_ADMIN_VIEW_GROUP_CONTACT),\n\t\t\tshowCompanyView: !PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.PROJECT_WALL_ADMIN_VIEW_COMPANY) || PJQ.app.session.preferences.getPref(PJQ.constants.preferenceTypes.PROJECT_WALL_ADMIN_VIEW_COMPANY),\n\t\t\tshowContactView: !PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.PROJECT_WALL_ADMIN_VIEW_CONTACT) || PJQ.app.session.preferences.getPref(PJQ.constants.preferenceTypes.PROJECT_WALL_ADMIN_VIEW_CONTACT)\n\t\t};\n\t},\n\tafterRender: function () {\n\t\tthis.createDefaultItbMethodArray();\n\n\t\tnew PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('.input-default-part-view'),\n\t\t\tdefaultValue: (this.model.get('itbDefaultView').length > 0) ? this.model.get('itbDefaultView') : \"view_default\",\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tthis.model.set('itbDefaultView', value);\n\t\t\t\tthis.onChange();\n\t\t\t}, this)\n\t\t});\n\n\t\tnew PJQ.inputs.Datepicker({\n\t\t\tel: this.$('.input-default-bid-due-time'),\n\t\t\tdatepickerOptions: {\n\t\t\t\tformat: 'LT',\n\t\t\t\tdefaultDate: 4\n\t\t\t},\n\t\t\tisTimeOnly: true,\n\t\t\tonChange: _.bind(function () {\n\t\t\t\tlet dateVal = this.$('.input-default-bid-due-time').val(),\n\t\t\t\t\ttime = dateVal.split(\" \")[0],\n\t\t\t\t\tamPm = dateVal.split(\" \")[1],\n\t\t\t\t\tchanged = false;\n\t\t\t\tif (this.model.get('defaultBidDueTime') !== time) {\n\t\t\t\t\tthis.model.set('defaultBidDueTime', time);\n\t\t\t\t\tchanged = true;\n\t\t\t\t}\n\t\t\t\tif (this.model.get('defaultBidDueTimeAMPM') !== amPm) {\n\t\t\t\t\tthis.model.set('defaultBidDueTimeAMPM', amPm);\n\t\t\t\t\tchanged = true;\n\t\t\t\t}\n\t\t\t\tif (changed) {\n\t\t\t\t\tthis.onChange();\n\t\t\t\t}\n\t\t\t}, this),\n\t\t});\n\n\t\tnew PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('.input-participants-per-page'),\n\t\t\tdefaultValue: this.model.get('itbRowsPerPage'),\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tthis.model.set('itbRowsPerPage', value);\n\t\t\t\tthis.onChange();\n\t\t\t}, this)\n\t\t});\n\n\t\tnew PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('.input-default-time-zone'),\n\t\t\tdefaultValue: (this.model.get('itbDefaultTimeZone').length > 0) ? this.model.get('itbDefaultTimeZone') : \"Central\",\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tthis.model.set('itbDefaultTimeZone', value);\n\t\t\t\tthis.onChange();\n\t\t\t}, this)\n\t\t});\n\n\t\tthis.itbPicker = new PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('.input-itb-method'),\n\t\t\tdefaultValue: this.defaultArray,\n\t\t\texclusiveChoices: [\"itb-fax\", \"itb-no-email\", \"itb-email-fail\"],\n\t\t\tisMultiple: true,\n\t\t\thideDisabled: false,\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tlet newValue = [value[0], \"itb-email\"];\n\t\t\t\tthis.itbPicker.setValue(newValue);\n\t\t\t\tthis.model.set('isITBSendEmail', true);\n\t\t\t\tif (value.includes('itb-no-email')) {\n\t\t\t\t\tthis.model.set('isITBSendFaxIfNoEmail', true);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.model.set('isITBSendFaxIfNoEmail', false);\n\t\t\t\t}\n\t\t\t\tif (value.includes('itb-email-fail')) {\n\t\t\t\t\tthis.model.set('isITBSendFaxIfEmailFails', true);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.model.set('isITBSendFaxIfEmailFails', false);\n\t\t\t\t}\n\t\t\t\tif (value.includes('itb-fax')) {\n\t\t\t\t\tthis.model.set('isITBSendFax', true);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.model.set('isITBSendFax', false);\n\t\t\t\t}\n\n\t\t\t\tthis.onChange();\n\t\t\t}, this)\n\t\t});\n\n\t\t$(function () {\n\t\t\t$('[data-toggle=\"tooltip\"]').tooltip()\n\t\t});\n\n\t\tnew PJQ.Binder(this.$el, this.model, {\n\t\t\tsetDefaultValues: true,\n\t\t\twatchElements: [\n\t\t\t\t'input'\n\t\t\t],\n\t\t\tafterChange: _.bind(function () {\n\t\t\t\tthis.onChange();\n\t\t\t}, this)\n\t\t});\n\t},\n\tcreateDefaultItbMethodArray: function () {\n\t\tthis.defaultArray = [];\n\t\tif (this.model.get('isITBSendEmail') === true) {\n\t\t\tthis.defaultArray.push('itb-email')\n\t\t}\n\t\tif (this.model.get('isITBSendFaxIfNoEmail') === true) {\n\t\t\tthis.defaultArray.push('itb-no-email')\n\t\t}\n\t\tif (this.model.get('isITBSendFaxIfEmailFails') === true) {\n\t\t\tthis.defaultArray.push('itb-email-fail')\n\t\t}\n\t\tif (this.model.get('isITBSendFax') === true) {\n\t\t\tthis.defaultArray.push('itb-fax')\n\t\t}\n\t},\n\tshowUser2Changed: function () {\n\t\tif (this.model.get('isShowProjectUser2')) {\n\t\t\tthis.$('.project-user-2-outer').removeClass('hidden');\n\t\t}\n\t\telse {\n\t\t\tthis.$('.project-user-2-outer').addClass('hidden');\n\t\t}\n\t},\n\tonChange: function () {\n\t\tif (typeof this.options.onChange === 'function') {\n\t\t\tthis.options.onChange(this.model);\n\t\t}\n\t}\n});\n\nPJQ.views.settings.MessageStatuses = PJQ.views.BaseView.extend({\n\tdefaults: {\n\t\ttemplate: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'Message-Statuses')\n\t},\n\tevents: {\n\t\t'click .add-message-status': 'addStatusClicked',\n\t\t'click .edit-message-status': 'editStatusClicked',\n\t\t'click .delete-message-status': 'deleteStatus',\n\t\t'click .save-message-status': 'statusSave',\n\t\t'click .cancel-edit-message-status': 'cancelEditStatus',\n\t\t'keydown .input-message-status': 'disableCommasAndPipes'\n\t},\n\tbeforeRender: function () {\n\t\tthis.model = PJQ.app.session.planRoomSettings;\n\t\tif (!this.model.isFetched) {\n\t\t\tthis.model.fetch({\n\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\tthis.render();\n\t\t\t\t}, this)\n\t\t\t});\n\t\t}\n\t\tthis.renderData = {\n\t\t\tmodel: this.model,\n\t\t\toptions: this.options,\n\t\t\tcollection: this.collection\n\t\t};\n\t},\n\tafterRender: function () {\n\t\t$(function () {\n\t\t\t$('[data-toggle=\"tooltip\"]').tooltip()\n\t\t});\n\t\tif (this.model.messageStatuses) {\n\t\t\tthis.dataTable = new PJQ.views.dataTables.DataTable({\n\t\t\t\tel: this.$(\".message-status-table\"),\n\t\t\t\tisHideSearch: true,\n\t\t\t\tdata: this.model.messageStatuses.models,\n\t\t\t\trowId: \"cid\",\n\t\t\t\torder: [0, 'asc'],\n\t\t\t\ttargets: 'no-sort',\n\t\t\t\tbSort: false,\n\t\t\t\tlanguage: {\n\t\t\t\t\tzeroRecords: 'Click \"Add\" to create a new Message Status'\n\t\t\t\t},\n\t\t\t\tcolumns: [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"data\": \"attributes.sortOrder\",\n\t\t\t\t\t\t\"title\": \"\",\n\t\t\t\t\t\t\"searchable\": false,\n\t\t\t\t\t\t\"visible\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"data\": {\n\t\t\t\t\t\t\t\"display\": _.bind(function (row) {\n\t\t\t\t\t\t\t\tif (this.messageStatusContext != null && this.messageStatusContext.get('name') === row.get('name') && row.get('name') !== \"YES\" && row.get('name') !== \"NO\") {\n\t\t\t\t\t\t\t\t\treturn '';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\treturn row.get('name');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, this)\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"title\": \"Status\",\n\t\t\t\t\t\t\"width\": \"25%\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"data\": \"\",\n\t\t\t\t\t\t\"title\": \"RSVP\",\n\t\t\t\t\t\t\"width\": \"25%\",\n\t\t\t\t\t\t\"orderable\": false,\n\t\t\t\t\t\t\"searchable\": false,\n\t\t\t\t\t\t\"render\": _.bind(function (data, type, row) {\n\t\t\t\t\t\t\tlet content = row.get('canParticipantSet') === true ? \"Yes\" : \"No\";\n\t\t\t\t\t\t\tif (this.messageStatusContext != null && this.messageStatusContext.get('name') === row.get('name') && this.messageStatusContext.get('sortOrder') === row.get('sortOrder')) {\n\t\t\t\t\t\t\t\tcontent = '
\\n' +\n\t\t\t\t\t\t\t\t\t' \\n' +\n\t\t\t\t\t\t\t\t\t'
\\n' +\n\t\t\t\t\t\t\t\t\t' \\n' +\n\t\t\t\t\t\t\t\t\t'
\\n' +\n\t\t\t\t\t\t\t\t\t'
'\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (this.messageStatusContext != null && this.messageStatusContext.get('canParticipantSet') === true) {\n\t\t\t\t\t\t\t\tthis.$('.input-participant-can-set').prop('checked', true)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tthis.$('.input-participant-can-set').prop('checked', false)\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\treturn '
' + content + '
'\n\t\t\t\t\t\t}, this)\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"data\": \"\",\n\t\t\t\t\t\t\"title\": \"\",\n\t\t\t\t\t\t\"orderable\": false,\n\t\t\t\t\t\t\"searchable\": false,\n\t\t\t\t\t\t\"render\": _.bind(function (data, type, row) {\n\t\t\t\t\t\t\tlet content = '';\n\t\t\t\t\t\t\tif (this.messageStatusContext != null && this.messageStatusContext.get('name') === row.get('name') && this.messageStatusContext.get('sortOrder') === row.get('sortOrder')) {\n\t\t\t\t\t\t\t\tcontent = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (row.get('name') !== \"YES\" && row.get('name') !== \"NO\") {\n\t\t\t\t\t\t\t\tlet disabledAttr = this.messageStatusContext != null ? ' disabled ' : '';\n\t\t\t\t\t\t\t\tcontent = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn '
' + content + '
'\n\t\t\t\t\t\t}, this),\n\t\t\t\t\t\t\"width\": \"80px\"\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t})\n\t\t}\n\t},\n\tdisableCommasAndPipes: function (e) {\n\t\tif (e.keyCode === 188 || e.keyCode === 220) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\taddStatusClicked: function () {\n\t\tthis.messageStatusContext = new PJQ.models.settings.PlanRoomSettings({\n\t\t\tname: \"\",\n\t\t\tcanParticipantSet: false,\n\t\t\tsortOrder: this.model.get('messageStatuses').length + 1\n\t\t});\n\t\tthis.dataTable.addRow(this.messageStatusContext);\n\t\tthis.dataTable.refresh()\n\t},\n\teditStatusClicked: function (e) {\n\t\tthis.messageStatusContext = this.dataTable.getRow($(e.currentTarget).closest('tr')).data();\n\t\tthis.dataTable.refresh();\n\t},\n\tdeleteStatus: function (e) {\n\t\tlet $row = $(e.currentTarget).closest('tr'),\n\t\t\trow = this.dataTable.getRow($row);\n\t\tnew PJQ.views.modals.DeleteCancel({\n\t\t\theader: \"Delete Status\",\n\t\t\tbody: \"Are you sure you want to delete this status?\",\n\t\t\tonDelete: _.bind(function () {\n\t\t\t\tthis.dataTable.removeRow(row);\n\t\t\t\tthis.dataTable.refresh;\n\t\t\t\tthis.model.set('messageStatuses', this.dataTable.dataTable.rows().data().toArray());\n\t\t\t\tthis.model.patch(null, {\n\t\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\t\tthis.messageStatusContext = null;\n\t\t\t\t\t\tthis.dataTable.refresh();\n\t\t\t\t\t}, this)\n\t\t\t\t});\n\t\t\t}, this)\n\t\t});\n\t},\n\tmessageStatusConstructor: function ({name, canParticipantSet, sortOrder}) {\n\t\tthis.name = name;\n\t\tthis.canParticipantSet = canParticipantSet;\n\t\tthis.sortOrder = sortOrder\n\t},\n\tstatusSave: function (e) {\n\t\tif (this.errorAlert) {\n\t\t\tthis.errorAlert.destroy();\n\t\t}\n\t\tlet $row = $(e.currentTarget).closest('tr'),\n\t\t\tstatus = this.dataTable.getRow($row).data(),\n\t\t\t$name = $row.find('.input-message-status'),\n\t\t\tisNameValid = _.size($name.val().trim()) > 0;\n\n\t\tif ($name.val().indexOf(',') > -1 || $name.val().indexOf('|') > -1) {\n\t\t\tisNameValid = false;\n\t\t\tthis.errorAlert = new PJQ.Alert(this.$('.error'), {\n\t\t\t\ttype: 'danger',\n\t\t\t\ttext: \"Password cannot contain commas or pipe characters.\"\n\t\t\t});\n\t\t}\n\t\tif (isNameValid) {\n\t\t\tstatus.set('name', $name.val().trim())\n\t\t}\n\t\tstatus.set('canParticipantSet', this.$('.input-participant-can-set').prop('checked'));\n\n\t\tPJQ.helpers.inputHelpers.setInputError($name, isNameValid);\n\t\tif (isNameValid) {\n\t\t\tthis.model.set('messageStatuses', this.dataTable.dataTable.rows().data().toArray());\n\t\t\tthis.model.patch(null, {\n\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\tthis.messageStatusContext = null;\n\t\t\t\t\tthis.dataTable.refresh();\n\t\t\t\t}, this)\n\t\t\t});\n\t\t}\n\t},\n\tcancelEditStatus: function (e) {\n\t\tlet $row = $(e.currentTarget).closest('tr'),\n\t\t\trow = this.dataTable.getRow($row);\n\t\tif (this.messageStatusContext.name.length === 0) {\n\t\t\tthis.dataTable.removeRow(row);\n\t\t}\n\t\tthis.messageStatusContext = null;\n\t\tthis.dataTable.refresh();\n\t},\n});\n\n// Project status of a Project Contact\nPJQ.views.settings.ProjectStatuses = PJQ.views.BaseView.extend({\n\tdefaults: {\n\t\ttemplate: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'Project-Statuses')\n\t},\n\tevents: {\n\t\t'click .add-project-status': 'addStatusClicked',\n\t\t'click .edit-project-status': 'editStatusClicked',\n\t\t'click .delete-project-status': 'deleteStatus',\n\t\t'click .save-project-status': 'statusSave',\n\t\t'click .cancel-edit-project-status': 'cancelEditStatus',\n\t\t'colorpickerChange': 'setBGColor',\n\t\t'keyup .colorpicker-input-box': 'setBGColor',\n\t\t'keydown .input-project-status': 'disableCommasAndPipes',\n\t\t'keydown .input-activity-rank': 'disableNumbers'\n\t},\n\tbeforeRender: function () {\n\t\tthis.model = PJQ.app.session.planRoomSettings;\n\t\tif (!this.model.isFetched) {\n\t\t\tthis.model.fetch({\n\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\tthis.render();\n\t\t\t\t}, this)\n\t\t\t});\n\t\t}\n\t\tthis.renderData = {\n\t\t\tmodel: this.model,\n\t\t\toptions: this.options,\n\t\t\tcollection: this.collection\n\t\t};\n\t},\n\tafterRender: function () {\n\t\tif (this.model.projectStatuses == null) {\n\t\t\treturn;\n\t\t}\n\n\t\t$(function () {\n\t\t\t$('[data-toggle=\"tooltip\"]').tooltip()\n\t\t});\n\t\tlet self = this;\n\t\tthis.filteredData = new PJQ.collections.settings.ProjectStatuses(_.filter(this.model.projectStatuses.models, function (status) {\n\t\t\tlet sNameLower = status.get('name').toLowerCase();\n\t\t\treturn sNameLower !== \"pending\" && sNameLower !== \"unsent\";\n\t\t}));\n\t\t// this.listenTo(this.model.projectStatuses, 'change', _.bind(this.startReorder, this));\n\t\tthis.dataTable = new PJQ.views.dataTables.DataTable({\n\t\t\tel: this.$(\".project-status-table\"),\n\t\t\tisHideSearch: true,\n\t\t\tdata: this.filteredData.models,\n\t\t\trowId: \"cid\",\n\t\t\torder: [0, 'asc'],\n\t\t\ttargets: 'no-sort',\n\t\t\tpageLength: 50,\n\t\t\tbSort: false,\n\t\t\tlanguage: {\n\t\t\t\tzeroRecords: 'Click \"Add\" to create a new Project Status'\n\t\t\t},\n\t\t\tsortableOptions: {\n\t\t\t\tdata: this.filteredData,\n\t\t\t\tstop: _.bind(function (a, b) {\n\t\t\t\t\tself.$('tr').filter('.odd, .even').each(function (index, html) {\n\t\t\t\t\t\tlet row = $(html).context.id,\n\t\t\t\t\t\t\trowData = self.filteredData.get(row);\n\t\t\t\t\t\trowData.set('sortOrder', index + 1);\n\t\t\t\t\t});\n\t\t\t\t\tthis.startReorder();\n\t\t\t\t}, this)\n\t\t\t},\n\t\t\tcolumns: [\n\t\t\t\t{\n\t\t\t\t\t\"data\": \"attributes.sortOrder\",\n\t\t\t\t\t\"title\": \"\",\n\t\t\t\t\t\"searchable\": false,\n\t\t\t\t\t\"orderable\": false,\n\t\t\t\t\t\"visible\": false,\n\t\t\t\t\t\"render\": _.bind(function (data, type, row) {\n\t\t\t\t\t\tlet content = '';\n\t\t\t\t\t\tif (row.get('sortOrder') > 2) {\n\t\t\t\t\t\t\tcontent = '
'\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn content\n\t\t\t\t\t}, this)\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"data\": {\n\t\t\t\t\t\t\"display\": _.bind(function (row) {\n\t\t\t\t\t\t\tif (this.projectStatusContext != null && this.projectStatusContext.get('name') === row.get('name') && this.projectStatusContext.get('sortOrder') === row.get('sortOrder') && row.get('name') !== \"PENDING\" && row.get('name') !== \"UNSENT\" && row.get('name') !== \"DOWNLOADED\" && row.get('name') !== \"VIEWED\") {\n\t\t\t\t\t\t\t\treturn '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\treturn '' + row.get('name') + '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, this)\n\t\t\t\t\t},\n\t\t\t\t\t\"title\": \"Status\",\n\t\t\t\t\t\"width\": \"200px\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"data\": \"\",\n\t\t\t\t\t\"title\": \"RSVP\",\n\t\t\t\t\t\"width\": \"50px\",\n\t\t\t\t\t\"orderable\": false,\n\t\t\t\t\t\"searchable\": false,\n\t\t\t\t\t\"render\": _.bind(function (data, type, row) {\n\t\t\t\t\t\tlet content = row.get('canParticipantSet') === true ? \"Yes\" : \"No\";\n\t\t\t\t\t\tif (this.projectStatusContext != null && this.projectStatusContext.get('name') === row.get('name') && this.projectStatusContext.get('sortOrder') === row.get('sortOrder') && row.get('name') !== \"PENDING\" && row.get('name') !== \"UNSENT\" && row.get('name') !== \"DOWNLOADED\" && row.get('name') !== \"VIEWED\") {\n\t\t\t\t\t\t\tcontent = '
\\n' +\n\t\t\t\t\t\t\t\t' \\n' +\n\t\t\t\t\t\t\t\t'
\\n' +\n\t\t\t\t\t\t\t\t' \\n' +\n\t\t\t\t\t\t\t\t'
\\n' +\n\t\t\t\t\t\t\t\t'
'\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (this.projectStatusContext != null && this.projectStatusContext.get('canParticipantSet') === true) {\n\t\t\t\t\t\t\tthis.$('.input-participant-can-set').prop('checked', true)\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthis.$('.input-participant-can-set').prop('checked', false)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn '
' + content + '
'\n\t\t\t\t\t}, this)\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"data\": \"\",\n\t\t\t\t\t\"title\": \"\",\n\t\t\t\t\t\"orderable\": false,\n\t\t\t\t\t\"searchable\": false,\n\t\t\t\t\t\"width\": \"200px\",\n\t\t\t\t\t\"render\": _.bind(function (data, type, row) {\n\t\t\t\t\t\tlet content = '';\n\t\t\t\t\t\tif (this.projectStatusContext != null && this.projectStatusContext.get('name') === row.get('name') && row.get('name') !== \"DOWNLOADED\" && row.get('name') !== \"VIEWED\") {\n\t\t\t\t\t\t\treturn '
'\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn '
' + content + '
'\n\t\t\t\t\t}, this)\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"data\": {\n\t\t\t\t\t\t\"display\": _.bind(function (row) {\n\t\t\t\t\t\t\tif (this.projectStatusContext != null && this.projectStatusContext.get('name') === row.get('name') && this.projectStatusContext.get('sortOrder') === row.get('sortOrder') && row.get('name') !== \"PENDING\" && row.get('name') !== \"UNSENT\") {\n\t\t\t\t\t\t\t\treturn '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\treturn '' + row.get('activityRank') + '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, this)\n\t\t\t\t\t},\n\t\t\t\t\t\"title\": \"Activity Score\",\n\t\t\t\t\t\"width\": \"100px\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"data\": \"\",\n\t\t\t\t\t\"title\": \"\",\n\t\t\t\t\t\"orderable\": false,\n\t\t\t\t\t\"searchable\": false,\n\t\t\t\t\t\"render\": _.bind(function (data, type, row) {\n\t\t\t\t\t\tlet content = '';\n\t\t\t\t\t\tif (this.projectStatusContext != null && this.projectStatusContext.get('name') === row.get('name')) {\n\t\t\t\t\t\t\tcontent = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif (row.get('name') === \"UNSENT\" || row.get('name') === \"PENDING\" || row.get('name') === \"VIEWED\" || row.get('name') === \"DOWNLOADED\" || row.get('sortOrder') === 1 || row.get('sortOrder') === 2) {\n\t\t\t\t\t\t\t\tlet disabledAttr = this.projectStatusContext != null ? ' disabled ' : '';\n\t\t\t\t\t\t\t\tcontent = ''\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tlet disabledAttr = this.projectStatusContext != null ? ' disabled ' : '';\n\t\t\t\t\t\t\t\tcontent = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn '
' + content + '
'\n\t\t\t\t\t}, this),\n\t\t\t\t\t\"width\": \"80px\",\n\t\t\t\t}\n\t\t\t],\n\t\t});\n\t},\n\tdisableCommasAndPipes: function (e) {\n\t\tif (e.keyCode === 188 || e.keyCode === 220) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tdisableNumbers: function (e) {\n\t\tPJQ.helpers.inputHelpers.numbersOnly(e, true, true);\n\t},\n\taddStatusClicked: function () {\n\t\tthis.projectStatusContext = new PJQ.models.settings.PlanRoomSettings({\n\t\t\tname: \"\",\n\t\t\tbackgroundColor: \"#000000\",\n\t\t\tforegroundColor: \"#000000\",\n\t\t\tcanParticipantSet: false,\n\t\t\tactivityRank: 0,\n\t\t\tsortOrder: this.model.get('projectStatuses').length + 1,\n\t\t});\n\t\tthis.dataTable.addRow(this.projectStatusContext);\n\t\tthis.editStatus();\n\t},\n\teditStatusClicked: function (e) {\n\t\tthis.projectStatusContext = this.dataTable.getRow($(e.currentTarget).closest('tr')).data();\n\t\tthis.editStatus();\n\t},\n\teditStatus: function (e) {\n\t\tthis.dataTable.refresh();\n\t\tthis.colorPicker = new PJQ.colors.ColorPicker(this.$('.color-picker'), {\n\t\t\tformat: 'hex',\n\t\t\tcolor: this.projectStatusContext.get('backgroundColor'),\n\t\t\tautoInputFallback: false\n\t\t});\n\t\tthis.$('.colorpicker-input-box').val(this.projectStatusContext.get('backgroundColor'));\n\t\tthis.$('.input-project-status').css('color', this.projectStatusContext.get('backgroundColor'));\n\t},\n\tsetBGColor: function (e) {\n\t\tif (e.type === 'keyup') {\n\t\t\tif (e.keyCode === 13) {\n\t\t\t\t$(e.currentTarget).blur()\n\t\t\t}\n\t\t\tlet color = this.$('.colorpicker-input-box').val();\n\t\t\tif (color.split('')[0] === '#' && color.trim().length === 7) {\n\t\t\t\tthis.colorPicker.setColor(color);\n\t\t\t\tthis.projectStatusContext.set('backgroundColor', color.toUpperCase());\n\t\t\t\tthis.$('.input-project-status').css('color', color.toUpperCase());\n\t\t\t\tPJQ.helpers.inputHelpers.setInputError(this.$('.colorpicker-input-box'), true);\n\t\t\t}\n\t\t}\n\n\t\telse {\n\t\t\tlet color = this.colorPicker.getColor();\n\t\t\tif (color.split('')[0] === '#' && color.trim().length === 7) {\n\t\t\t\tthis.$('.colorpicker-input-box').val(color);\n\t\t\t\tthis.projectStatusContext.set('backgroundColor', color);\n\t\t\t\tthis.$('.input-project-status').css('color', color);\n\t\t\t\tPJQ.helpers.inputHelpers.setInputError(this.$('.colorpicker-input-box'), true);\n\t\t\t}\n\t\t}\n\t},\n\tstartReorder: function () {\n\t\tlet newArray = [];\n\t\t_.each(this.dataTable.dataTable.rows().data().toArray(), function (status) {\n\t\t\tnewArray[status.attributes.sortOrder - 1] = status;\n\t\t});\n\t\tthis.saveReorder(newArray)\n\t},\n\tsaveReorder: function (array) {\n\t\tlet isNull = false;\n\t\tif (array.length !== this.dataTable.dataTable.rows().data().toArray().length) {\n\t\t\tisNull = true;\n\t\t}\n\n\t\t_.each(array, function (node, index) {\n\t\t\tif (node !== undefined) {\n\t\t\t\t// Don't allow Accept or Decline to be reordered\n\t\t\t\tif (index === 0) {\n\t\t\t\t\tif (node.get('name') !== 'ACCEPT') {\n\t\t\t\t\t\tisNull = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (index === 1) {\n\t\t\t\t\tif (node.get('name') !== 'DECLINE') {\n\t\t\t\t\t\tisNull = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tisNull = true\n\t\t\t}\n\t\t});\n\t\tif (!isNull && this.projectStatusContext == null) {\n\t\t\tthis.loader = new PJQ.Loader(this.$('.project-status-table'));\n\t\t\tthis.model.set('projectStatuses', array);\n\t\t\tthis.model.patch(null, {\n\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\tif (this.loader) {\n\t\t\t\t\t\tthis.loader.remove();\n\t\t\t\t\t}\n\t\t\t\t\tthis.render();\n\t\t\t\t}, this)\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tthis.dataTable.render()\n\t\t}\n\t},\n\tdeleteStatus: function (e) {\n\t\tlet $row = $(e.currentTarget).closest('tr'),\n\t\t\trow = this.dataTable.getRow($row),\n\t\t\tstatus = row.data();\n\t\tnew PJQ.views.modals.DeleteCancel({\n\t\t\theader: \"Delete Status\",\n\t\t\tbody: \"Are you sure you want to delete this status?\",\n\t\t\tonDelete: _.bind(function () {\n\t\t\t\tthis.dataTable.removeRow(row);\n\t\t\t\tthis.dataTable.refresh;\n\t\t\t\tthis.model.set('projectStatuses', this.dataTable.dataTable.rows().data().toArray());\n\t\t\t\tthis.model.patch(null, {\n\t\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\t\tthis.projectStatusContext = null;\n\t\t\t\t\t\tthis.dataTable.refresh();\n\t\t\t\t\t}, this)\n\t\t\t\t});\n\t\t\t}, this)\n\t\t});\n\t},\n\tprojectStatusConstructor: function ({name, canParticipantSet, color, sortOrder}) {\n\t\tthis.name = name;\n\t\tthis.color = color;\n\t\tthis.canParticipantSet = canParticipantSet;\n\t\tthis.sortOrder = sortOrder\n\t},\n\tstatusSave: function (e) {\n\t\tif (this.errorAlert) {\n\t\t\tthis.errorAlert.destroy();\n\t\t}\n\t\tlet $row = $(e.currentTarget).closest('tr'),\n\t\t\tstatus = this.dataTable.getRow($row).data(),\n\t\t\t$name = $row.find('.input-project-status'),\n\t\t\tname = $row.find('.input-project-status').length > 0 ? $row.find('.input-project-status').val() : status.get('name'),\n\t\t\t$rank = $row.find('.input-activity-rank'),\n\t\t\tisNameValid = _.size(name.trim()) > 0,\n\t\t\tisRankValid = _.size($rank.val().trim()) > 0 && !isNaN(parseInt($rank.val().trim()));\n\n\t\tlet color = '#555',\n\t\t\tisColorValid;\n\t\tif (name.toLowerCase() !== \"downloaded\" && name.toLowerCase() !== \"viewed\") {\n\t\t\tcolor = this.$('.colorpicker-input-box').val();\n\t\t\tisColorValid = color.split('')[0] === '#' && color.trim().length === 7;\n\t\t}\n\t\telse {\n\t\t\tisColorValid = true;\n\t\t}\n\n\t\tif (name.indexOf(',') > -1 || name.indexOf('|') > -1) {\n\t\t\tisNameValid = false;\n\t\t\tthis.errorAlert = new PJQ.Alert(this.$('.error'), {\n\t\t\t\ttype: 'danger',\n\t\t\t\ttext: \"Name cannot contain commas or pipe characters.\"\n\t\t\t});\n\t\t}\n\t\tif (isNameValid) {\n\t\t\tstatus.set('name', name);\n\t\t}\n\t\tif (isRankValid) {\n\t\t\tstatus.set('activityRank', parseInt($rank.val().trim()));\n\t\t}\n\t\tstatus.set('canParticipantSet', (this.$('.input-participant-can-set').prop('checked')));\n\t\tstatus.set('foregroundColor', PJQ.helpers.colorHelpers.idealLinkColorForBackground(color));\n\n\n\t\tPJQ.helpers.inputHelpers.setInputError($name, isNameValid);\n\t\tPJQ.helpers.inputHelpers.setInputError(this.$('.colorpicker-input-box'), isColorValid, {\n\t\t\terrorText: isColorValid ? \"\" : \"Hex must begin with a # followed by 6 letters and/or numbers!\"\n\t\t});\n\t\tPJQ.helpers.inputHelpers.setInputError($rank, isRankValid, {\n\t\t\terrorText: isRankValid ? \"\" : \"Rank can not be empty and must be a number!\"\n\t\t});\n\n\t\tif (isNameValid && isColorValid && isRankValid) {\n\t\t\tthis.model.set('projectStatuses', this.dataTable.dataTable.rows().data().toArray());\n\t\t\tthis.model.patch(null, {\n\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\tthis.projectStatusContext = null;\n\t\t\t\t\tthis.render()\n\t\t\t\t}, this)\n\t\t\t});\n\t\t}\n\t},\n\tcancelEditStatus: function (e) {\n\t\tlet $row = $(e.currentTarget).closest('tr'),\n\t\t\trow = this.dataTable.getRow($row);\n\t\tif (this.projectStatusContext.get('name').length === 0) {\n\t\t\tthis.dataTable.removeRow(row);\n\t\t}\n\t\tthis.projectStatusContext = null;\n\t\tthis.dataTable.refresh();\n\t},\n});\n\n// ProjectStatusId of a Project\nPJQ.views.settings.ProjectStatusList = PJQ.views.BaseView.extend({\n\tdefaults: {\n\t\ttemplate: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'Project-Status-List')\n\t},\n\tevents: {\n\t\t'click .add-project-status': 'addClicked',\n\t\t'click .btn-edit-project-status': 'editProjectStatusClicked',\n\t\t'click .btn-delete-project-status': 'deleteProjectStatusClicked',\n\t\t'click .btn-save-project-status': 'projectStatusSave',\n\t\t'click .btn-cancel-edit-project-status': 'cancelEditProjectStatus'\n\t},\n\tbeforeFirstRender: function () {\n\n\t},\n\tafterRender: function () {\n\t\tthis.collection = PJQ.app.session.projectStatuses;\n\t\tthis.dataTable = new PJQ.views.dataTables.DataTable({\n\t\t\tel: this.$(\".project-status-list-table\"),\n\t\t\tisHideSearch: true,\n\t\t\tdata: PJQ.app.session.projectStatuses.models,\n\t\t\trowId: \"cid\",\n\t\t\ttargets: 'no-sort',\n\t\t\torder: [2, 'asc'],\n\t\t\tlanguage: {\n\t\t\t\tzeroRecords: 'Click \"Add\" to create a new Project Status'\n\t\t\t},\n\t\t\tbSort: false,\n\t\t\tsortableOptions: {\n\t\t\t\tdata: PJQ.app.session.projectStatuses,\n\t\t\t},\n\t\t\trowCallback: function (row, data, index) {\n\t\t\t\t$(row).find('td:eq(0)').css('color', '#'+data.get('color'));\n\t\t\t},\n\t\t\tcontextMenuOptions: {\n\t\t\t\tactions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Delete',\n\t\t\t\t\t\tisDanger: true,\n\t\t\t\t\t\tisShown: _.bind(function (row) {\n\t\t\t\t\t\t\treturn row.data().get('masterUserId') !== -1;\n\t\t\t\t\t\t}, this),\n\t\t\t\t\t\tonClick: _.bind(function (row) {\n\t\t\t\t\t\t\tthis.deleteProjectStatus(row);\n\t\t\t\t\t\t}, this)\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\tcolumns: [\n\t\t\t\t{\n\t\t\t\t\t\"data\": {\n\t\t\t\t\t\t\"display\": _.bind(function (row) {\n\t\t\t\t\t\t\tif (this.projectStatusContext != null && this.projectStatusContext.id === row.id) {\n\t\t\t\t\t\t\t\treturn '';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treturn row.get('name');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, this)\n\t\t\t\t\t},\n\t\t\t\t\t\"title\": \"Status\",\n\t\t\t\t\t\"orderable\": false\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"data\": \"\",\n\t\t\t\t\t\"title\": \"\",\n\t\t\t\t\t\"width\": this.projectStatusContext != null ? \"200px\" : '0px',\n\t\t\t\t\t\"orderable\": false,\n\t\t\t\t\t\"searchable\": false,\n\t\t\t\t\t\"render\": _.bind(function (data, type, row) {\n\t\t\t\t\t\tlet content = '';\n\t\t\t\t\t\tif (this.projectStatusContext != null && this.projectStatusContext.id === row.id) {\n\t\t\t\t\t\t\tcontent = '
'\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn '
' + content + '
'\n\t\t\t\t\t}, this)\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"data\": \"attributes.sortOrder\",\n\t\t\t\t\t\"title\": \"\",\n\t\t\t\t\t\"searchable\": false,\n\t\t\t\t\t\"visible\": false\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"data\": \"\",\n\t\t\t\t\t\"title\": \"\",\n\t\t\t\t\t\"orderable\": false,\n\t\t\t\t\t\"searchable\": false,\n\t\t\t\t\t\"width\": '120px',\n\t\t\t\t\t\"render\": _.bind(function (data, type, row) {\n\t\t\t\t\t\tlet buttons = '';\n\t\t\t\t\t\tif (this.projectStatusContext != null && this.projectStatusContext.id === row.id) {\n\t\t\t\t\t\t\tbuttons = '';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tbuttons += '';\n\t\t\t\t\t\t\tif (row.get('masterUserId') !== -1) {\n\t\t\t\t\t\t\t\tbuttons += '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn '
' + buttons + '
'\n\t\t\t\t\t}, this)\n\t\t\t\t},\n\t\t\t],\n\t\t});\n\t},\n\teditProjectStatusClicked: function (e) {\n\t\tlet $row = $(e.currentTarget).closest('tr'),\n\t\t\trow = this.dataTable.getRow($row),\n\t\t\tprojectStatus = row.data(),\n\t\t\tfnEdit = _.bind(function (eps) {\n\t\t\tthis.projectStatusContext = eps;\n\t\t\tthis.defaultColor = '#' + eps.get('color');\n\t\t\tthis.dataTable.refresh();\n\t\t\tnew PJQ.colors.ColorPicker(this.$('.project-status-color-input'), {\n\t\t\t\tformat: 'hex',\n\t\t\t\tcolor: '#' + eps.get('color'),\n\t\t\t\tonChange: _.bind(function (value) {\n\t\t\t\t\tthis.projectStatusContext.set('color', value.substring(1));\n\t\t\t\t\tthis.$('.input-project-status-name').css('color', value);\n\t\t\t\t}, this)\n\t\t\t});\n\t\t\tthis.$('.input-project-status-name').css('color', '#'+eps.get('color'));\n\t\t}, this);\n\t\tif (projectStatus.get('masterUserId') === -1) {\n\t\t\tthis.changeDefaultAlert(projectStatus, function (projectStatuses, newProjectStatus) {\n\t\t\t\tfnEdit(newProjectStatus);\n\t\t\t});\n\t\t} else {\n\t\t\tfnEdit(projectStatus);\n\t\t}\n\n\t},\n\tchangeDefaultAlert(returnCopy, callback) {\n\t\tthis.dataTable.refresh();\n\t\tnew PJQ.views.modals.YesNo({\n\t\t\theader: \"Change Project Statuses?\",\n\t\t\tbody: 'You are currently using the system default project statuses. To edit a project status, we will need to create custom project statuses for your company. This may take a minute, would you like to continue?',\n\t\t\tonYes: _.bind(function () {\n\t\t\t\tthis.copyProjectStatuses(returnCopy, _.bind(function (projectStatuses, newProjectStatus) {\n\t\t\t\t\tthis.dataTable.resetData(PJQ.app.session.projectStatuses.models);\n\t\t\t\t\tcallback(projectStatuses, newProjectStatus);\n\t\t\t\t}, this));\n\t\t\t}, this)\n\t\t});\n\t},\n\tcopyProjectStatuses: function (returnCopy, callback) {\n\t\tthis.collection.copy(_.bind(function () {\n\t\t\tlet newPs = null;\n\t\t\tif (returnCopy != null) {\n\t\t\t\tlet returnName = returnCopy.get('name');\n\t\t\t\tnewPs = _.find(this.collection.models, function (u) {\n\t\t\t\t\treturn u.get('name') === returnName;\n\t\t\t\t});\n\t\t\t}\n\t\t\tcallback(this.collection.models, newPs);\n\t\t}, this));\n\t},\n\taddClicked: function () {\n\t\tlet fnAdd = _.bind(function () {\n\t\t\tlet newProjectStatus = new PJQ.models.projectStatuses.ProjectStatus({\n\t\t\t\tname: \"\",\n\t\t\t\tcolor: '000000',\n\t\t\t\tsortOrder: this.collection.length + 1,\n\t\t\t\tisDefault: this.collection.length === 0\n\t\t\t});\n\t\t\tthis.collection.add(newProjectStatus);\n\t\t\tthis.dataTable.addRow(newProjectStatus);\n\t\t\tthis.projectStatusContext = newProjectStatus;\n\t\t\tthis.defaultColor = this.projectStatusContext.get('color');\n\t\t\tthis.projectStatusColor = this.projectStatusContext.attributes.color;\n\t\t\tthis.dataTable.refresh();\n\t\t\tnew PJQ.colors.ColorPicker(this.$('.project-status-color-input'), {\n\t\t\t\tformat: 'hex',\n\t\t\t\tcolor: '#' + this.projectStatusColor,\n\t\t\t\tonChange: _.bind(function (value) {\n\t\t\t\t\tthis.projectStatusContext.set('color', value.substring(1));\n\t\t\t\t\tthis.$('.input-project-status-name').css('color', value);\n\t\t\t\t}, this)\n\t\t\t});\n\t\t\tthis.$('.input-user-type-name').css('color', this.projectStatusContext.get('color'));\n\t\t}, this);\n\t\tif (this.collection.length > 0 && this.collection.models[0].get('masterUserId') === -1) {\n\t\t\tthis.changeDefaultAlert(null, function () {\n\t\t\t\tfnAdd();\n\t\t\t});\n\t\t} else {\n\t\t\tfnAdd();\n\t\t}\n\t},\n\tprojectStatusSave: function (e) {\n\t\tlet $row = $(e.currentTarget).closest('tr'),\n\t\t\tprojectStatus = this.dataTable.getRow($row).data(),\n\t\t\t$name = $row.find('.input-project-status-name');\n\n\t\tlet isNameValid = _.size($name.val()) > 0;\n\t\tPJQ.helpers.inputHelpers.setInputError($name, isNameValid);\n\n\t\tif (!isNameValid)\n\t\t\treturn;\n``\n\t\tprojectStatus.set('name', $name.val());\n\t\tprojectStatus.set('sortOrder', projectStatus.attributes.sortOrder);\n\n\t\tprojectStatus.save(null, {\n\t\t\tsuccess: _.bind(function () {\n\t\t\t\tthis.projectStatusContext = null;\n\t\t\t\tthis.dataTable.refresh();\n\t\t\t}, this)\n\t\t});\n\t},\n\tdeleteProjectStatusClicked(e) {\n\t\tlet $row = $(e.currentTarget).closest('tr'),\n\t\t\trow = this.dataTable.getRow($row);\n\n\t\tthis.deleteProjectStatus(row);\n\t},\n\tdeleteProjectStatus: function(row) {\n\t\tlet projectStatus = row.data(),\n\t\t\tfnDelete = _.bind(function (dps) {\n\t\t\t\tnew PJQ.views.modals.DeleteCancel({\n\t\t\t\t\theader: \"Delete Project Status\",\n\t\t\t\t\tbody: \"Are you sure you want to delete this Project Status? Any Project that currently has this Status will be set to the Default Status.\",\n\t\t\t\t\tonDelete: _.bind(function () {\n\t\t\t\t\t\tprojectStatus.destroy({\n\t\t\t\t\t\t\tsuccess: _.bind(function () {\n\t\t\t\t\t\t\t\tthis.collection.remove(dps);\n\t\t\t\t\t\t\t\tthis.dataTable.removeRow(row);\n\t\t\t\t\t\t\t\tthis.dataTable.refresh();\n\t\t\t\t\t\t\t}, this)\n\t\t\t\t\t\t});\n\t\t\t\t\t}, this)\n\t\t\t\t});\n\t\t\t}, this);\n\t\tif (projectStatus.get('masterUserId') === -1) {\n\t\t\tthis.changeDefaultAlert(projectStatus, function (projectStatuses, newProjectStatus) {\n\t\t\t\tfnDelete(newProjectStatus);\n\t\t\t});\n\t\t} else {\n\t\t\tfnDelete(projectStatus);\n\t\t}\n\n\t},\n\tcancelEditProjectStatus: function (e) {\n\t\tlet $row = $(e.currentTarget).closest('tr'),\n\t\t\trow = this.dataTable.getRow($row),\n\t\t\tstatus = row.data();\n\t\tstatus.set('color', this.defaultColor);\n\t\tthis.projectStatusContext = null;\n\t\tthis.projectStatusColor = null;\n\t\tif (status.get('name').length === 0) {\n\t\t\tthis.dataTable.removeRow(row);\n\t\t}\n\t\tthis.dataTable.refresh();\n\t},\n});\n\n\nPJQ.views.settings.ProjectNDAs = PJQ.views.BaseView.extend({\n\tdefaults: {\n\t\ttemplate: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'project-ndas')\n\t},\n\tevents: {\n\t\t'click .btn-add-nda': 'addNDAClicked',\n\t\t'click .btn-edit-nda': 'editNDAClicked',\n\t\t'click .btn-delete-nda': 'deleteNDAClicked'\n\t},\n\tbeforeFirstRender: function () {\n\t\tPJQ.app.session.fetchNDAs(_.bind(function (ndas) {\n\t\t\tthis.collection = ndas;\n\t\t\tthis.render();\n\t\t}, this));\n\t},\n\tafterRender: function () {\n\t\tif (this.collection == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.dataTable = new PJQ.views.dataTables.DataTable({\n\t\t\tel: this.$(\".project-ndas\"),\n\t\t\tisHideSearch: true,\n\t\t\tdata: this.collection.models,\n\t\t\trowId: \"cid\",\n\t\t\torder: [0, 'asc'],\n\t\t\tlanguage: {\n\t\t\t\tzeroRecords: 'Click \"Add\" to create a new Project NDA'\n\t\t\t},\n\t\t\tonRowDoubleClick: _.bind(function (row) {\n\t\t\t\tthis.editNDA(row.data());\n\t\t\t}, this),\n\t\t\tcontextMenuOptions: {\n\t\t\t\tactions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Edit',\n\t\t\t\t\t\tonClick: _.bind(function (row) {\n\t\t\t\t\t\t\tthis.editNDA(row.data());\n\t\t\t\t\t\t}, this)\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Delete',\n\t\t\t\t\t\tisDanger: true,\n\t\t\t\t\t\tonClick: _.bind(function (row) {\n\t\t\t\t\t\t\tthis.deleteNDA(row);\n\t\t\t\t\t\t}, this)\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\tcolumns: [\n\t\t\t\t{\n\t\t\t\t\t\"data\": \"attributes.isDefault\",\n\t\t\t\t\t\"title\": \"\",\n\t\t\t\t\t\"width\": \"40px\",\n\t\t\t\t\t\"render\": _.bind(function (data) {\n\t\t\t\t\t\tif (data) {\n\t\t\t\t\t\t\treturn '';\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn '';\n\t\t\t\t\t}, this)\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"data\": \"attributes.name\",\n\t\t\t\t\t\"title\": \"Name\",\n\t\t\t\t\t// \"render\": _.bind(function (data, type, row) {\n\t\t\t\t\t//\n\t\t\t\t\t// }, this)\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"data\": \"\",\n\t\t\t\t\t\"title\": \"\",\n\t\t\t\t\t\"width\": \"80px\",\n\t\t\t\t\t\"render\": _.bind(function (data, type, row) {\n\t\t\t\t\t\treturn '
';\n\t\t\t\t\t}, this)\n\t\t\t\t}\n\t\t\t],\n\t\t});\n\t},\n\taddNDAClicked: function () {\n\t\tlet newNda = new PJQ.models.projects.ProjectNDA();\n\t\tif (_.size(this.collection.models) === 0) {\n\t\t\tnewNda.set('isDefault', true);\n\t\t}\n\t\tthis.editNDA(newNda);\n\t},\n\teditNDAClicked: function (e) {\n\t\tlet $row = $(e.currentTarget).closest('tr'),\n\t\t\trow = this.dataTable.getRow($row),\n\t\t\tnda = row.data();\n\t\tthis.editNDA(nda);\n\t},\n\teditNDA: function (nda) {\n\t\tlet isNew = nda.isNew();\n\t\tnew PJQ.views.projects.EditProjectNDAModal({\n\t\t\tmodel: nda,\n\t\t\tonSave: _.bind(function () {\n\t\t\t\tif (isNew) {\n\t\t\t\t\tthis.collection.add(nda);\n\t\t\t\t\tthis.dataTable.addRow(nda);\n\t\t\t\t}\n\t\t\t\tthis.dataTable.refresh();\n\t\t\t}, this),\n\t\t\tonDelete: _.bind(function (nda) {\n\t\t\t\tif (nda.id > 0) {\n\t\t\t\t\tlet row = this.dataTable.getRow(nda.cid);\n\t\t\t\t\tif (row != null) {\n\t\t\t\t\t\tthis.dataTable.removeRow(row);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, this)\n\t\t});\n\t},\n\tdeleteNDAClicked: function (e) {\n\t\tlet $row = $(e.currentTarget).closest('tr'),\n\t\t\trow = this.dataTable.getRow($row);\n\t\tthis.deleteNDA(row);\n\t},\n\tdeleteNDA: function (row) {\n\t\tlet nda = row.data();\n\t\tnew PJQ.views.modals.DeleteCancel({\n\t\t\theader: \"Delete NDA\",\n\t\t\tbody: \"Are you sure you want to delete this project NDA?\",\n\t\t\tonDelete: _.bind(function () {\n\t\t\t\tthis.dataTable.removeRow(row);\n\t\t\t\tthis.dataTable.refresh;\n\t\t\t\tthis.collection.remove(nda);\n\t\t\t\tnda.destroy();\n\t\t\t}, this)\n\t\t});\n\t}\n});\n","//Model\nPJQ.models.settings.Region = PJQ.models.BaseModel.extend({\n idAttribute: 'regionId',\n notifyName: 'Region',\n endpoint: function () {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'regions',\n value: this.id\n }\n ])\n }\n});\n//Collection\nPJQ.collections.settings.Regions = PJQ.collections.BaseCollection.extend({\n model: PJQ.models.settings.Region,\n endpoint: function () {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'regions'\n }\n ])\n }\n});\n\nPJQ.views.settings.RegionSettings = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'Regions')\n },\n events: {\n 'click .add-region': 'addClicked',\n 'click .btn-edit-region': 'editRegion',\n 'click .btn-delete-region': 'deleteRegion',\n 'click .btn-save-region': 'regionSave',\n 'click .btn-cancel-edit-region': 'cancelEditRegion'\n },\n beforeFirstRender() {\n if (this.collection == null) {\n this.collection = new PJQ.collections.settings.Regions();\n }\n if (!this.options.isFetched) {\n this.collection.fetch({\n success: _.bind(function () {\n this.options.isFetched = true;\n this.render();\n\n if (typeof this.options.onFetch === 'function') {\n this.options.onFetch();\n }\n }, this)\n });\n }\n else {\n this.render();\n }\n },\n beforeRender: function(){\n this.renderData = {\n options: this.options,\n collection: this.collection\n };\n },\n afterRender: function () {\n this.dataTable = new PJQ.views.dataTables.DataTable({\n el: this.$(\".region-table\"),\n isHideSearch: true,\n data: this.collection.models,\n rowId: \"cid\",\n order: [0, 'asc'],\n language: {\n zeroRecords: 'Click \"Add\" to create a new Region'\n },\n columns: [\n {\n \"data\": {\n \"display\": _.bind(function (row) {\n if (this.regionContext != null && this.regionContext.id === row.id) {\n return '';\n } else {\n return row.get('name');\n }\n }, this)\n },\n \"title\": \"Region\"\n },\n {\n \"data\": \"\",\n \"title\": \"\",\n \"orderable\": false,\n \"searchable\": false,\n \"width\": \"80px\",\n \"render\": _.bind(function (data, type, row) {\n let content = '';\n if (this.regionContext != null && this.regionContext.id === row.id) {\n content = '';\n } else {\n let disabledAttr = this.regionContext != null ? ' disabled ' : '';\n content = '';\n }\n return '
' + content + '
'\n }, this),\n \"width\": \"160px\"\n }\n ],\n })\n },\n addClicked: function () {\n let newRegion = new PJQ.models.settings.Region({\n name: \"\",\n regionDescription: \"\",\n sortOrder: this.collection.length + 1,\n });\n this.dataTable.addRow(newRegion);\n this.regionContext = newRegion;\n this.dataTable.refresh()\n },\n editRegion: function (e) {\n this.regionContext = this.dataTable.getRow($(e.currentTarget).closest('tr')).data();\n this.dataTable.refresh();\n },\n deleteRegion: function (e) {\n let $row = $(e.currentTarget).closest('tr'),\n row = this.dataTable.getRow($row),\n region = row.data();\n new PJQ.views.modals.DeleteCancel({\n header: \"Delete Region\",\n body: \"Are you sure you want to delete this region?\",\n onDelete: _.bind(function () {\n region.destroy({\n success: _.bind(function () {\n // this.collection.remove(region);\n this.dataTable.removeRow(row);\n }, this)\n });\n }, this)\n });\n },\n regionSave: function (e) {\n let $row = $(e.currentTarget).closest('tr'),\n region = this.dataTable.getRow($row).data(),\n $name = $row.find('.input-region-name');\n region.set('name', $name.val());\n\n let isNameValid = _.size(region.get('name')) > 0;\n PJQ.helpers.inputHelpers.setInputError($name, isNameValid);\n\n if (isNameValid) {\n region.save(null, {\n success: _.bind(function () {\n this.regionContext = null;\n this.dataTable.refresh();\n }, this)\n });\n }\n },\n cancelEditRegion: function (e) {\n let $row = $(e.currentTarget).closest('tr'),\n row = this.dataTable.getRow($row);\n if (this.regionContext.get('name').length === 0){\n this.dataTable.removeRow(row);\n } this.regionContext = null;\n this.dataTable.refresh();\n },\n});\n","PJQ.models.settings.PaymentInfo = PJQ.models.BaseModel.extend({\n\tidAttribute: \"paymentInfoId\",\n\tendpoint: function () {\n\t\treturn PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t{\n\t\t\t\tendpoint: 'settings'\n\t\t\t},\n\t\t\t{\n\t\t\t\tendpoint: 'ordering'\n\t\t\t},\n\t\t\t{\n\t\t\t\tendpoint: 'paymentinfo'\n\t\t\t}\n\t\t])\n\t},\n\tafterInit: function () {\n\t\tthis.set({\n\t\t\tcompanyName: '',\n\t\t\tcardholderName: '',\n\t\t\taddress1: '',\n\t\t\taddress2: '',\n\t\t\tcity: '',\n\t\t\tstate: '',\n\t\t\tzip: '',\n\t\t\tcountry: '',\n\t\t\tphone: '',\n\t\t\tphoneExt: '',\n\t\t\temail: '',\n\t\t\tcardNumber: '',\n\t\t\texpMonth: '',\n\t\t\texpYear: ''\n\t\t});\n\t},\n});\n\nPJQ.models.settings.PlanRoomSettings = PJQ.models.BaseModel.extend({\n\tdefaults: {\n\t\ttype: 'planroom'\n\t},\n\tendpoint: function () {\n\t\treturn PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t{\n\t\t\t\tendpoint: 'settings'\n\t\t\t},\n\t\t\t{\n\t\t\t\tendpoint: 'planroom'\n\t\t\t}\n\t\t])\n\t},\n\tparse: function (model) {\n\t\tif (!model)\n\t\t\treturn model;\n\t\tthis.projectStatuses = new PJQ.collections.settings.ProjectStatuses(model.projectStatuses);\n\t\tthis.messageStatuses = new PJQ.collections.settings.MessageStatuses(model.messageStatuses);\n\t\treturn model\n\t}\n});\n\nPJQ.models.settings.OrderingSettings = PJQ.models.BaseModel.extend({\n\tdefaults: {\n\t\ttype: 'ordering'\n\t},\n\tendpoint: function () {\n\t\treturn PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t{\n\t\t\t\tendpoint: 'settings'\n\t\t\t},\n\t\t\t{\n\t\t\t\tendpoint: 'ordering'\n\t\t\t}\n\t\t])\n\t}\n});\n\nPJQ.models.settings.AddressBookSettings = PJQ.models.BaseModel.extend({\n\tdefaults: {\n\t\ttype: 'address-book'\n\t},\n\tendpoint: function () {\n\t\treturn PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t{\n\t\t\t\tendpoint: 'settings'\n\t\t\t},\n\t\t\t{\n\t\t\t\tendpoint: 'addressbook'\n\t\t\t}\n\t\t])\n\t}\n});\n\nPJQ.collections.settings.ProjectStatuses = PJQ.collections.BaseCollection.extend({\n\tmodel: PJQ.models.settings.PlanRoomSettings\n});\n\nPJQ.collections.settings.MessageStatuses = PJQ.collections.BaseCollection.extend({\n\tmodel: PJQ.models.settings.PlanRoomSettings\n});\n","PJQ.views.settings.SignatureEditInput = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'signature-edit-input'),\n model: null,\n signature: null\n },\n events: {\n 'click .btn-manage-signature': 'manageSignature'\n },\n beforeFirstRender: function () {\n this.signature = this.options.signature;\n },\n renderData: function() {\n return {\n signature: this.signature\n }\n },\n manageSignature: function() {\n new PJQ.views.signatures.SignatureSubmitModal({\n headerSubText: this.options.headerSubText,\n fetchSignature: false,\n signature: this.signature,\n onSubmit: _.bind(function (signature, cb) {\n if(typeof this.options.onSave === 'function'){\n this.options.onSave(signature);\n }\n this.signature = signature;\n this.render();\n cb();\n }, this)\n });\n }\n});","PJQ.constants.sso = {\n providerNames: {\n AZURE_AD: \"Azure Active Directory\",\n OKTA: \"Okta\",\n ONELOGIN: \"OneLogin\",\n OTHER: \"Other\"\n },\n providers: {\n AZURE_AD: \"AZURE_AD\",\n OKTA: \"OKTA\",\n ONELOGIN: \"ONELOGIN\",\n OTHER: \"OTHER\"\n }\n};\n\nPJQ.models.sso = {};\n\nPJQ.models.sso.Provider = PJQ.models.BaseModel.extend({\n idAttribute: 'id',\n endpoint: function () {\n let params = [];\n if (this.get('disableProvisioning')) {\n params.push({\n parameter: 'disableProvisioning',\n value: true\n });\n }\n\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'settings'\n },\n {\n endpoint: 'saml',\n value: this.id\n }\n ], params)\n },\n getProviderName: function () {\n return PJQ.constants.sso.providerNames[this.get('provider')];\n },\n refreshProvisioningToken: function (callback) {\n if (this.id > 0) {\n new PJQ.ajax.Request({\n endpoint: this.endpoint() + \"/refreshprovisioningtoken\",\n type: 'POST',\n data: this.toJSON()\n }).post().done(_.bind(function (response) {\n if (typeof callback === 'function') {\n let token = null;\n if (_.size(response.provisioningToken) > 0) {\n token = response.provisioningToken;\n this.set('provisioningToken', token);\n }\n callback(token);\n }\n }, this)).fail(function () {\n if (typeof callback === 'function') {\n callback(null);\n }\n });\n } else {\n let token = PJQ.helpers.guid();\n this.set('provisioningToken', token);\n callback(token);\n }\n },\n afterSave: function () {\n this.set('disableProvisioning', null);\n }\n});\n\n//Collections\nPJQ.collections.sso = {};\n\nPJQ.collections.sso.Providers = PJQ.collections.BaseCollection.extend({\n model: PJQ.models.sso.Provider,\n endpoint: function () {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'settings'\n },\n {\n endpoint: 'saml'\n }\n ]);\n }\n});\n\nPJQ.views.settings.SSOSettings = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'sso-settings')\n },\n events: {\n 'click .btn-add-provider': 'addClicked',\n 'click .btn-edit-provider': 'editClicked',\n 'click .btn-delete-provider': 'deleteClicked'\n },\n beforeRender: function () {\n },\n renderData: function () {\n return {\n enablePermissions: this.options.enablePermissions\n };\n },\n afterRender: function () {\n this.dataTable = new PJQ.views.dataTables.DataTable({\n el: this.$(\".sso-table\"),\n data: this.collection.models,\n rowId: \"id\",\n order: [0, 'asc'],\n paging: false,\n language: {\n zeroRecords: \"You haven't added any SSO providers yet\"\n },\n onRowDoubleClick: _.bind(function (row) {\n this.editProvider(row.data());\n }, this),\n contextMenuOptions: {\n actions: [\n {\n name: 'Edit',\n onClick: _.bind(function (row) {\n this.editProvider(row.data());\n }, this)\n },\n {\n name: 'Delete',\n isDanger: true,\n onClick: _.bind(function (row) {\n this.deleteProvider(row);\n }, this)\n }\n ]\n },\n columns: [\n {\n \"title\": \"Default\",\n \"width\": \"100px\",\n \"render\": _.bind(function (data, type, row) {\n let content = '';\n if (row.get('isDefault')) {\n content = ''\n }\n return content;\n })\n },\n {\n 'title': \"Provider\",\n \"data\": \"attributes.provider\",\n \"render\": _.bind(function (data, type, row) {\n return row.getProviderName();\n })\n },\n {\n \"data\": \"\",\n \"title\": \"\",\n \"orderable\": false,\n \"searchable\": false,\n \"width\": this.options.enablePermissions ? '160px' : '120px',\n \"render\": _.bind(function (data, type, row) {\n let buttons = '';\n buttons += '';\n buttons += '';\n return '
' + buttons + '
';\n }, this)\n }\n ]\n });\n },\n addClicked: function () {\n this.editProvider(new PJQ.models.sso.Provider({\n isDefault: _.size(this.collection.models) === 0\n }));\n },\n editClicked: function (e) {\n let target = $(e.currentTarget),\n row = this.dataTable.getRow(target.closest('tr')),\n note = row.data();\n this.editProvider(note);\n },\n deleteClicked: function (e) {\n let target = $(e.currentTarget),\n row = this.dataTable.getRow(target.closest('tr'));\n this.deleteProvider(row);\n },\n editProvider: function (provider) {\n let isNew = provider.isNew();\n new PJQ.views.settings.EditSSOProviderModal({\n model: provider,\n onSave: _.bind(function () {\n if (isNew) {\n this.collection.add(provider);\n }\n this.render();\n }, this),\n onDelete: _.bind(function (provider) {\n if (!isNew) {\n this.collection.remove(provider);\n this.render();\n }\n }, this)\n });\n },\n deleteProvider: function (row) {\n let provider = row.data();\n new PJQ.views.modals.DeleteCancel({\n header: \"Confirm Deletion\",\n body: \"Are you sure you want to delete this provider?\",\n onDelete: _.bind(function () {\n this.collection.remove(provider);\n provider.destroy();\n this.dataTable.removeRow(row);\n }, this)\n });\n }\n});\n\nPJQ.views.settings.EditSSOProviderModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'modal-sso'),\n minWidth: 600,\n onSave: null,\n isUpdatingCertificate: false\n },\n defaultEvents: {\n 'change .cb-enable-provisioning': 'provisioningChanged',\n 'click .btn-refresh-provisioning-token': 'refreshProvisioningToken',\n 'click .btn-update-certificate': 'updateCertificate',\n 'click .btn-save': 'save',\n 'click .btn-cancel': 'cancel',\n 'click .btn-delete': 'delete'\n },\n beforeModalCreated: function () {\n if (this.model == null) {\n this.model = new PJQ.models.sso.Provider({\n isDefault: false,\n provider: PJQ.constants.sso.providers.AZURE_AD\n });\n }\n\n if (_.size(this.model.get('provider')) === 0) {\n this.model.set('provider', PJQ.constants.sso.providers.AZURE_AD);\n }\n },\n renderData: function () {\n return {\n model: this.model,\n options: this.options\n };\n },\n afterRender: function () {\n new PJQ.Binder(this.$el, this.model, {\n watchElements: [\n 'input',\n 'textarea'\n ]\n });\n\n new PJQ.inputs.Selectpicker({\n el: this.$('.select-provider'),\n hideDisabled: true,\n defaultValue: this.model.get('provider'),\n onChange: _.bind(function (value) {\n this.model.set('provider', value);\n this.render();\n }, this)\n });\n },\n provisioningChanged: function (e) {\n let provisioningEnabled = $(e.currentTarget).prop('checked');\n this.model.set('disableProvisioning', !provisioningEnabled);\n if (provisioningEnabled && _.size(this.model.get('provisioningToken')) === 0) {\n this.model.refreshProvisioningToken(_.bind(function () {\n this.render();\n }, this));\n } else {\n this.render();\n }\n },\n refreshProvisioningToken: function () {\n new PJQ.views.modals.YesNo({\n header: \"Confirm Authentication Token Refresh\",\n body: 'Are you sure you want to generate a new authentication token? This action cannot be reversed.',\n onYes: _.bind(function () {\n new PJQ.Loader(this.$('.provisioning-token-outer'));\n this.model.refreshProvisioningToken(_.bind(function () {\n PJQ.notifications.notify.successNotify({\n message: 'Provisioning token successfully refreshed'\n });\n this.render();\n }, this));\n }, this)\n });\n },\n updateCertificate: function () {\n this.options.isUpdatingCertificate = true;\n this.render();\n },\n validate: function(){\n let isValid = true;\n\n let isSignOnUrlValid =_.size(this.model.get('issuer')) > 0;\n PJQ.helpers.inputHelpers.setInputError(this.$('.input-sign-on-url'), isSignOnUrlValid);\n isValid = isValid && isSignOnUrlValid;\n\n let isIssuerValid =_.size(this.model.get('issuer')) > 0;\n PJQ.helpers.inputHelpers.setInputError(this.$('.input-issuer'), isIssuerValid);\n isValid = isValid && isIssuerValid;\n\n if(this.options.isUpdatingCertificate || this.model.isNew()){\n let isCertificateValid =_.size(this.model.get('certificate')) > 0;\n PJQ.helpers.inputHelpers.setInputError(this.$('.input-certificate'), isCertificateValid);\n isValid = isValid && isCertificateValid;\n }\n\n if(!isValid) {\n if (this.errorAlert != null) {\n this.errorAlert.destroy();\n }\n this.errorAlert = new PJQ.Alert(this.$('.error-container'), {\n type: 'danger',\n text: 'Required fields missing data'\n });\n }\n\n return isValid;\n },\n save: function () {\n if(!this.validate()){\n return;\n }\n\n this.model.save(null, {\n success: _.bind(function () {\n PJQ.notifications.notify.successNotify({\n message: 'SSO provider successfully created'\n });\n this.removeModal();\n if (typeof this.options.onSave === 'function') {\n this.options.onSave(this.model);\n }\n }, this)\n })\n },\n cancel: function () {\n this.model.restore();\n this.removeModal();\n },\n delete: function () {\n new PJQ.views.modals.DeleteCancel({\n header: \"Confirm Deletion\",\n body: \"Are you sure you want to delete this provider?\",\n onDelete: _.bind(function () {\n this.model.destroy();\n this.removeModal();\n if (typeof this.options.onDelete === 'function') {\n this.options.onDelete(this.model);\n }\n }, this)\n });\n }\n});","PJQ.views.settings.TermsList = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'Terms')\n },\n events: {\n 'click .edit-terms': 'editTermsClicked',\n 'click .delete-terms': 'deleteTermsClicked',\n 'click .add-terms': 'addTermsClicked'\n },\n beforeFirstRender: function () {\n this.context = this.options.context.toLowerCase();\n if(this.context && !this.collection){\n switch(this.context) {\n case 'commitments':\n PJQ.app.session.fetchCommitmentTerms(_.bind(function(termsCollection){\n this.collection = termsCollection;\n this.render();\n }, this));\n break;\n case 'contracts':\n PJQ.app.session.fetchPrimeContractTerms(_.bind(function(termsCollection){\n this.collection = termsCollection;\n this.render();\n }, this));\n }\n }\n },\n renderData: function () {\n return {\n\n };\n },\n afterRender: function () {\n if(this.collection) {\n this.dataTable = new PJQ.views.dataTables.DataTable({\n el: this.$(\".terms-table\"),\n data: this.collection.models,\n rowId: \"cid\",\n order: [0, 'asc'],\n language: {\n zeroRecords: 'Click \"Add Terms\" to create new terms'\n },\n pageLength: 50,\n isHideSearch: true,\n bSort: false,\n onRowDoubleClick: _.bind(function (row) {\n this.editTerms(row.data());\n }, this),\n contextMenuOptions: {\n actions: [\n {\n name: 'Edit',\n onClick: _.bind(function (row) {\n this.editTerms(row.data());\n }, this)\n },\n {\n name: 'Delete',\n isDanger: true,\n onClick: _.bind(function (row) {\n this.deleteGroup(row);\n }, this)\n\n }\n ]\n },\n columns: [\n {\n \"title\": \"Name\",\n \"data\": \"attributes.name\",\n \"orderable\": true\n },\n {\n \"data\": \"\",\n \"title\": \"\",\n \"orderable\": false,\n \"searchable\": false,\n \"width\": \"80px\",\n \"render\": _.bind(function (data, type, row) {\n return '
';\n }, this)\n }\n ]\n });\n }\n },\n addTermsClicked: function(e){\n let newTerm = new this.collection.model({\n name: '',\n type: this.context,\n terms: '',\n isDefault: false\n });\n\n this.editTerms(newTerm);\n },\n editTermsClicked: function(e){\n let target = $(e.currentTarget),\n row = this.dataTable.getRow(target.closest('tr'));\n this.editTerms(row.data());\n },\n editTerms: function (terms) {\n new PJQ.views.settings.EditTermsModal({\n model: terms,\n onSave: _.bind(function (model) {\n if (model.hasChanged() || model.isNew()) {\n if (model.isNew()) {\n this.collection.add(model);\n this.dataTable.addRow(model);\n }\n model.save(null, {\n notify: true,\n success: _.bind(function(){\n if(model.get('isDefault')){\n _.each(this.collection.models, function(term){\n if(term !== model){\n term.set('isDefault', false);\n }\n }, this)\n }\n }, this)\n });\n this.dataTable.refresh();\n }\n }, this),\n onDelete: _.bind(function(model){\n if (model.id > 0) {\n let row = this.dataTable.getRow(model.cid);\n this.collection.remove(model);\n model.destroy();\n if (row != null) {\n this.dataTable.removeRow(row);\n }\n }\n }, this)\n })\n },\n deleteTermsClicked: function(e){\n let target = $(e.currentTarget),\n row = this.dataTable.getRow(target.closest('tr'));\n this.deleteTerms(row);\n },\n deleteTerms: function(row){\n let terms = row.data();\n new PJQ.views.modals.DeleteCancel({\n header: \"Confirm Deletion\",\n body: \"Are you sure you want to delete these terms?\",\n onDelete: _.bind(function () {\n this.collection.remove(terms);\n terms.destroy();\n this.dataTable.removeRow(row);\n }, this)\n });\n }\n});\n\nPJQ.views.settings.EditTermsModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'Modal-Edit-Terms'),\n maxWidth: 650\n },\n events: {\n 'click .btn-close': 'close',\n 'click .btn-delete': 'delete',\n 'click .btn-save': 'save'\n },\n beforeRender: function () {\n this.renderData = {\n model: this.model\n }\n },\n afterRender: function () {\n new PJQ.Binder(this.$el, this.model, {\n watchElements: [\n 'input'\n ]\n });\n\n this.termsEditor = new PJQ.inputs.HTMLEditor({\n el: this.$('.terms-editor'),\n editorHeight: 150,\n isHideTokens: true,\n defaultValue: this.model.get('terms'),\n onChange: _.bind(function (contents) {\n this.model.set('terms', contents);\n }, this)\n });\n },\n close: function () {\n this.removeModal()\n },\n save: function () {\n if(typeof this.options.onSave === \"function\"){\n this.options.onSave(this.model);\n }\n this.removeModal();\n },\n delete: function(){\n if(typeof this.options.onDelete === 'function'){\n this.options.onDelete(this.model);\n }\n this.removeModal();\n }\n});","PJQ.views.settings.TimeCardSettings = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'Time-Card-Settings')\n },\n events: {\n 'change .cb-enable-line-items': 'render',\n 'change .cb-enable-clock-in': 'enableClockInChanged',\n 'click .add-timecard-category': 'addCategory',\n 'click .btn-save-category': 'saveCategory',\n 'click .btn-edit-category': 'editCategory',\n 'click .btn-cancel-edit-category': 'cancelEditCategory',\n 'click .btn-delete-category': 'deleteCategory'\n },\n beforeFirstRender: function () {\n if (typeof this.options.onChange === 'function') {\n this.listenTo(this.model, 'change', function () {\n this.options.onChange(this.model);\n });\n }\n\n this.isFetched = false;\n PJQ.app.session.fetchCostTypes((costTypes) => {\n this.costTypes = costTypes;\n this.isFetched = true;\n this.render();\n })\n },\n renderData: function () {\n return {\n model: this.model,\n isFetched: this.isFetched\n }\n },\n afterRender: function () {\n if (!this.isFetched) {\n return;\n }\n\n new PJQ.Binder(this.$el, this.model, {\n watchElements: [\n 'input'\n ]\n });\n\n this.renderCategoryTable();\n\n new PJQ.inputs.Selectpicker({\n el: this.$('.week-start'),\n isIntChoices: true,\n defaultValue: this.model.get('weekStart'),\n onChange: _.bind(function (value) {\n this.model.set('weekStart', value);\n }, this)\n });\n\n new PJQ.inputs.Selectpicker({\n el: this.$('.select-default-cost-type'),\n isIntChoices: true,\n defaultValue: this.model.get('defaultCostTypeId'),\n choices: _.map(this.costTypes.models, function (costType) {\n return {\n id: costType.id,\n name: costType.get('name')\n }\n }),\n onChange: _.bind(function (value) {\n this.model.set('defaultCostTypeId', value);\n }, this)\n });\n },\n renderCategoryTable: function () {\n this.categoryContext = null;\n if (this.model.get('enableLineItems')) {\n return\n }\n\n this.categoryDataTable = new PJQ.views.dataTables.DataTable({\n el: this.$(\".time-card-categories\"),\n data: this.options.categories.models,\n isHideSearch: true,\n targets: 'no-sort',\n order: [0, 'asc'],\n language: {\n zeroRecords: 'Click \"Add Category\" to create a new Category'\n },\n bSort: false,\n columns: [\n {\n \"data\": {\n \"display\": _.bind(function (row) {\n if (this.categoryContext != null && this.categoryContext.id === row.id) {\n return '';\n } else {\n return row.get('name');\n }\n }, this)\n },\n \"title\": \"Category\",\n \"orderable\": false\n },\n {\n \"data\": \"attributes.sortOrder\",\n \"title\": \"\",\n \"searchable\": false,\n \"visible\": false\n },\n {\n \"data\": \"\",\n \"title\": \"\",\n \"orderable\": false,\n \"searchable\": false,\n \"width\": '70px',\n \"render\": _.bind(function (data, type, row) {\n let buttons = '';\n if (this.categoryContext != null && this.categoryContext.id === row.id) {\n buttons = '';\n } else {\n buttons += '';\n buttons += '';\n }\n return '
' + buttons + '
'\n }, this)\n }\n ],\n });\n },\n enableClockInChanged: function (e) {\n let enabled = $(e.currentTarget).prop('checked');\n if (enabled) {\n this.model.set({\n enableOvertime: false,\n enableDoubletime: false\n });\n }\n this.render();\n },\n addCategory: function () {\n let newCategory = new PJQ.models.timecards.TimeCardCategory({\n name: \"\",\n sortOrder: this.options.categories.length + 1\n });\n this.options.categories.add(newCategory);\n this.categoryContext = newCategory;\n this.categoryDataTable.addRow(newCategory);\n },\n editCategory: function (e) {\n let $row = $(e.currentTarget).closest('tr'),\n category = this.categoryDataTable.getRow($row).data();\n this.categoryContext = category;\n this.categoryDataTable.render();\n },\n saveCategory: function (e) {\n let $row = $(e.currentTarget).closest('tr'),\n category = this.categoryDataTable.getRow($row).data(),\n $name = $row.find('.input-name');\n category.set('name', $name.val());\n category.set('sortOrder', category.attributes.sortOrder);\n\n let isNameValid = _.size(category.get('name')) > 0;\n PJQ.helpers.inputHelpers.setInputError($name, isNameValid);\n if (isNameValid) {\n category.save(null, {\n success: _.bind(function () {\n this.categoryContext = null;\n this.categoryDataTable.render();\n }, this)\n });\n }\n },\n cancelEditCategory: function (e) {\n let $row = $(e.currentTarget).closest('tr'),\n category = this.categoryDataTable.getRow($row).data();\n\n new PJQ.views.modals.YesNo({\n header: \"Cancel \" + (category.isNew() ? \"Add\" : \"Edit\"),\n body: \"Do you want to cancel \" + (category.isNew() ? 'adding' : 'editing') + \" this Category?\",\n onYes: _.bind(function () {\n if (category.isNew()) {\n this.options.categories.remove([category]);\n }\n\n this.categoryContext = null;\n this.categoryDataTable.render();\n }, this)\n });\n },\n deleteCategory: function (e) {\n let $row = $(e.currentTarget).closest('tr'),\n category = this.categoryDataTable.getRow($row).data();\n\n new PJQ.views.modals.YesNo({\n header: \"Delete Category\",\n body: \"Do you want to delete this Category?\",\n onYes: _.bind(function () {\n category.destroy({\n success: _.bind(function () {\n this.options.categories.remove([category]);\n this.categoryDataTable.render();\n }, this)\n });\n }, this)\n });\n }\n});\n","PJQ.views.settings.UserSettings = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'user-management'),\n subTemplates: {\n userSeats: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'user-management-user-seats-header'),\n userLimits: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'user-management-user-limits-header')\n }\n },\n events: {\n 'change .cb-enable-permissions': 'enablePermissions',\n 'click .btn-add-user': 'addClicked',\n 'click .btn-edit-user-perms': 'editPermissionsClicked',\n 'click .btn-edit-user': 'editClicked',\n 'click .btn-delete-user': 'deleteClicked',\n 'click .btn-edit-notification-settings': 'notificationSettingsClicked',\n 'click .btn-change-seats': 'manageUserSeats',\n 'click .btn-change-limits': 'manageUserLimits'\n },\n beforeRender: function () {\n this.options.enablePermissions = PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.ENABLE_PERMISSIONS);\n },\n renderData: function () {\n return {\n enablePermissions: this.options.enablePermissions\n };\n },\n afterRender: function () {\n\n let columns = [\n {\n 'title': \"hidden_search\",\n \"data\": \"\",\n 'width': '0px',\n 'visible': false,\n \"render\": _.bind(function (data, type, row) {\n return row.get('phone') + ' ' + row.get('address1') + ' ' + row.get('address2') + ' ' + row.get('city') + ' ' + row.get('state') + ' ' + row.get('zip');\n })\n },\n {\n 'title': \"Active\",\n \"data\": \"attributes.isActive\",\n 'width': '40px',\n \"render\": _.bind(function (data, type, row) {\n let content = '';\n if (data === true) {\n content = ''\n } else {\n content = ''\n }\n return content\n })\n },\n {\n \"title\": \"User Type\",\n \"data\": \"userType\",\n \"render\": _.bind(function (data, type, row) {\n if (type === 'sort' && row.userType !== undefined) {\n return row.userType.get('sortOrder');\n }\n return '' + (row.userType !== undefined ? row.userType.get('name') : \"\") + '';\n }, this)\n },\n {\n \"title\": \"Username\",\n \"data\": \"attributes.username\",\n },\n {\n \"title\": \"Name\",\n \"data\": \"attributes.contactName\",\n },\n {\n \"title\": \"Email\",\n \"data\": \"attributes.email\",\n },\n {\n 'title': \"ITB User\",\n \"data\": \"attributes.itbUser\",\n 'width': '40px',\n \"render\": _.bind(function (data, type, row) {\n let content = '';\n if (data === true) {\n content = ''\n }\n return content\n })\n },\n {\n 'title': \"PM User\",\n \"data\": \"attributes.pmUser\",\n 'width': '40px',\n \"render\": _.bind(function (data, type, row) {\n let content = '';\n if (data === true) {\n content = ''\n }\n return content\n })\n }\n ];\n\n // for Document Clerk add the CreatedOn column to assist with billing\n if (PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.IS_DOCUMENT_CLERK)) {\n columns.push({\n \"columnData\": \"createdDate\",\n \"data\": {\n \"_\": function (row) {\n return new Date(row.attributes.createdDate);\n },\n \"filter\": \"attributes.createdDate\",\n \"display\": function (row) {\n return PJQ.helpers.dateHelpers.getDateString(new Date(row.attributes.createdDate), PJQ.helpers.dateHelpers.dateFormats.DATE, true);\n }\n },\n \"title\": \"Created\"\n });\n }\n\n columns.push({\n \"data\": \"\",\n \"title\": \"\",\n \"orderable\": false,\n \"searchable\": false,\n \"width\": this.options.enablePermissions ? '160px' : '120px',\n \"render\": _.bind(function (data, type, row) {\n let buttons = '',\n notificationButton = '';\n if (this.options.enablePermissions) {\n buttons += '';\n buttons += (row.get('userId') === PJQ.app.session.user.get('userId') || PJQ.app.session.hasPermission('users.canModifyNotifications')) ? notificationButton : ``\n } else {\n buttons += notificationButton;\n }\n\n buttons += ''\n\n if (row.get('userId') !== PJQ.app.session.user.id) {\n buttons += '';\n }\n\n return '
' + buttons + '
';\n }, this)\n });\n\n this.renderUserSeats();\n this.dataTable = new PJQ.views.dataTables.DataTable({\n el: this.$(\".users-table\"),\n data: this.collection.models,\n rowId: \"cid\",\n order: [1, 'asc'],\n language: {\n zeroRecords: \"You don't have any users\"\n },\n rowCallback: function (row, data) {\n if (data.userType) {\n $(row).find('td:eq(7)').css('color', data.userType.get('color'));\n }\n },\n onRowDoubleClick: _.bind(function (row) {\n this.editUser(row.data());\n }, this),\n onTableDraw: _.bind(function () {\n this.$(\".users-table\").find('th').each(function (index, column) {\n if (index === 0) {\n $(column).removeClass('sorting')\n }\n });\n }, this),\n contextMenuOptions: {\n actions: [\n {\n name: 'Edit',\n onClick: _.bind(function (row) {\n this.editUser(row.data());\n }, this)\n },\n {\n name: 'Notifications',\n onClick: _.bind(function (row) {\n this.notificationSettings(row.data());\n }, this)\n },\n {\n name: 'Permissions',\n isShown: _.bind(function () {\n return this.options.enablePermissions;\n }, this),\n onClick: _.bind(function (row) {\n this.editPermissions(row.data());\n }, this)\n },\n {\n name: 'Delete',\n isDanger: true,\n onClick: _.bind(function (row) {\n this.deleteUser(row);\n }, this)\n }\n ]\n },\n columns: columns\n });\n },\n renderUserSeats: function () {\n let $userSeats = this.$('.user-seats');\n if (!PJQ.app.session.get('onAccount') && PJQ.app.session.get('portalId') === PJQ.constants.panteraPortalId) {\n let subscription = PJQ.app.session.subscription;\n if (subscription.id === PJQ.constants.subscriptions.types.FREE || subscription.get('isFreeTrial')) {\n $userSeats.empty();\n } else {\n this.renderSubTemplate(false, this.options.subTemplates.userSeats, $userSeats, {\n subscription: subscription,\n users: this.collection\n }, _.bind(function () {\n PJQ.app.session.listenSubscriptionChanged(\"accountSettings\", _.bind(function () {\n this.renderUserSeats();\n }, this));\n }, this));\n }\n } else if (PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.IS_DOCUMENT_CLERK)) {\n PJQ.app.session.fetchUserLimits(_.bind(function (userLimits) {\n this.userLimits = userLimits;\n this.renderSubTemplate(false, this.options.subTemplates.userLimits, $userSeats, {\n userLimits: userLimits,\n users: this.collection,\n showButtons: true\n });\n }, this))\n }\n },\n manageUserSeats: function () {\n new PJQ.views.settings.UserSeatsManagementModal();\n },\n manageUserLimits: function () {\n new PJQ.views.settings.UserLimitsManagementModal({\n model: this.userLimits,\n onSave: _.bind(function () {\n this.render();\n }, this)\n });\n },\n enablePermissions: function () {\n let enable = !this.options.enablePermissions;\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'permissions'\n },\n {\n endpoint: 'enable'\n }\n ], [\n {\n parameter: 'enable',\n value: enable\n }\n ])\n }).put().done(_.bind(function () {\n if (enable) {\n PJQ.app.session.preferences.setPref(PJQ.constants.preferenceTypes.ENABLE_PERMISSIONS, true);\n } else {\n PJQ.app.session.preferences.deletePref(PJQ.constants.preferenceTypes.ENABLE_PERMISSIONS);\n }\n this.render();\n }, this));\n },\n addClicked: function () {\n let fnNew = _.bind(function () {\n let newUser = new PJQ.models.users.User({\n companyName: PJQ.app.session.user.get('companyName'),\n contactName: \"\",\n username: \"\",\n email: \"\",\n phone: \"\",\n address1: PJQ.app.session.user.get('address1'),\n address2: PJQ.app.session.user.get('address2'),\n city: PJQ.app.session.user.get('city'),\n state: PJQ.app.session.user.get('state'),\n zip: PJQ.app.session.user.get('zip'),\n country: PJQ.app.session.user.get('country'),\n sortOrder: this.collection.length + 1,\n pmUser: true,\n itbUser: true,\n isActive: true,\n userTypeId: PJQ.app.session.userTypes.getDefault(true).get('userTypeId')\n });\n this.editUser(newUser);\n }, this);\n\n if (PJQ.app.session.user.isFetched) {\n fnNew();\n } else {\n PJQ.app.session.user.fetch({\n success: fnNew\n })\n }\n },\n notificationSettingsClicked: function (e) {\n let target = $(e.currentTarget),\n user = this.dataTable.getRow(target.closest('tr')).data();\n this.notificationSettings(user);\n },\n notificationSettings: function (user) {\n new PJQ.views.notificationSettings.NotificationSettingsEditorModal({\n model: user\n });\n },\n editPermissionsClicked: function (e) {\n let target = $(e.currentTarget),\n row = this.dataTable.getRow(target.closest('tr')),\n user = row.data();\n\n this.editPermissions(user);\n },\n editPermissions: function (user) {\n new PJQ.views.permissions.PermissionsEditorModal({\n model: user\n });\n },\n editClicked: function (e) {\n let target = $(e.currentTarget),\n row = this.dataTable.getRow(target.closest('tr')),\n user = row.data();\n\n this.editUser(user);\n },\n editUser: function (user) {\n let isNew = user.isNew();\n // force the modal to re-fetch\n user.isFetched = false;\n new PJQ.views.contacts.BaseEditContactModal({\n model: user,\n onSave: _.bind(function (user) {\n if (isNew) {\n user.set('createdDate', new Date());\n this.collection.add(user);\n this.dataTable.addRow(user);\n }\n this.renderUserSeats();\n this.dataTable.refresh();\n }, this),\n onClose: _.bind(function (user) {\n if (user.hasChanged()) {\n user.fetch({\n success: _.bind(function () {\n this.dataTable.refresh();\n }, this)\n });\n }\n }, this),\n onDelete: _.bind(function (user) {\n if (!user.isNew()) {\n let row = this.dataTable.getRow(user.cid);\n this.collection.remove(user);\n if (row != null) {\n this.dataTable.removeRow(row);\n }\n this.renderUserSeats();\n }\n }, this)\n });\n },\n deleteClicked: function (e) {\n let target = $(e.currentTarget),\n row = this.dataTable.getRow(target.closest('tr'));\n this.deleteUser(row);\n },\n deleteUser: function (row) {\n let user = row.data();\n new PJQ.views.modals.DeleteCancel({\n header: \"Confirm Deletion\",\n body: \"Are you sure you want to delete this user?\",\n onDelete: _.bind(function () {\n this.collection.remove(user);\n user.destroy();\n this.dataTable.removeRow(row);\n }, this)\n });\n }\n});\n\nPJQ.views.settings.UserSeatsManagementModal = PJQ.views.payment.PaySimplePaymentModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'modal-user-seats-management'),\n minWidth: 500,\n onSave: null,\n onError: null,\n isVerticalCenter: true,\n isShowCloseButton: true,\n selectedSubscriptionId: null\n },\n defaultEvents: {\n 'click .btn-add-seat': 'userSeatAdded',\n 'click .btn-remove-seat': 'userSeatRemoved',\n 'keyup .input-user-seats': 'userSeatsInputChanged',\n 'click .btn-save': 'save'\n },\n beforeModalCreated: function () {\n this.userSeats = PJQ.app.session.subscription.get('userSeats');\n PJQ.app.session.subscription.getCostsPerUser(_.bind(function (costs) {\n this.changeCosts = costs;\n PJQ.app.session.fetchUsers(_.bind(function (users) {\n this.activeUsers = _.size(users.where({isActive: true}));\n this.render();\n }, this));\n }, this));\n },\n renderData: function () {\n return {\n subscription: PJQ.app.session.subscription,\n userSeats: this.userSeats,\n activeUsers: this.activeUsers\n };\n },\n afterRender: function () {\n if (this.activeUsers == null) {\n new PJQ.Loader(this.$('.modal-content'));\n return;\n }\n this.$('.input-user-seats').focus().select();\n },\n userSeatAdded: function () {\n this.userSeats += 1;\n this.userSeatsChanged();\n },\n userSeatRemoved: function () {\n this.userSeats -= 1;\n this.userSeatsChanged();\n },\n userSeatsInputChanged: function () {\n this.userSeats = parseInt(this.$('.input-user-seats').val());\n this.userSeatsChanged();\n },\n userSeatsChanged: function () {\n this.$('.input-user-seats').val(this.userSeats);\n this.$('.btn-remove-seat').prop('disabled', this.userSeats === 0);\n\n let $err = this.$('.error-container'),\n $btnSave = this.$('.btn-save');\n if (this.userSeats < this.activeUsers) {\n // cant have less seats than active users\n $err.html(\"You can't select less seats than you have active users\");\n $btnSave.prop('disabled', true);\n } else {\n let $payment = this.$('.payment-outer');\n if (this.userSeats > PJQ.app.session.subscription.get('userSeats')) {\n this.renderTotal();\n $payment.removeClass('hidden');\n } else {\n $payment.addClass('hidden');\n }\n\n $err.empty();\n $btnSave.prop('disabled', false);\n }\n },\n renderTotal: function () {\n let subscription = PJQ.app.session.subscription,\n cost;\n switch (subscription.id) {\n case PJQ.constants.subscriptions.types.BASIC:\n cost = this.changeCosts.basic;\n break;\n case PJQ.constants.subscriptions.types.PRO:\n cost = this.changeCosts.pro;\n break;\n case PJQ.constants.subscriptions.types.ENTERPRISE:\n cost = this.changeCosts.enterprise;\n break;\n default:\n cost = 0;\n break;\n }\n\n let $pOuter = this.$('.payment-outer'),\n newUserSeats = this.userSeats - subscription.get('userSeats');\n if (newUserSeats > 0) {\n this.$('.payment-total').html(PJQ.helpers.formatHelpers.formatCurrency(cost * newUserSeats, 2, true));\n this.$('.new-seats-count').html(newUserSeats);\n $pOuter.removeClass('hidden');\n } else {\n $pOuter.addClass('hidden');\n }\n },\n save: function () {\n if (this.userSeats !== PJQ.app.session.subscription.get('userSeats')) {\n let loader = new PJQ.Loader(this.$('.modal-content')),\n err = function () {\n loader.remove();\n PJQ.notifications.notify.errorNotify({\n message: 'Encountered an error upgrading your subscription. Please contact customer service.'\n });\n };\n PJQ.app.session.changeUserSeats(this.userSeats, _.bind(function (data) {\n if (data == null || data.subscription == null) {\n err();\n } else {\n PJQ.notifications.notify.successNotify({\n message: 'Users seats successfully updated'\n });\n this.removeModal();\n }\n }, this), _.bind(function () {\n err();\n }, this));\n } else {\n this.removeModal();\n }\n }\n});\n\nPJQ.views.settings.UserLimitsManagementModal = PJQ.views.payment.PaySimplePaymentModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'modal-user-limits-management'),\n subTemplates: {\n userLimits: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'user-management-user-limits-header')\n },\n minWidth: 500,\n onSave: null,\n onError: null,\n isVerticalCenter: true,\n isShowCloseButton: true\n },\n defaultEvents: {\n 'click .btn-add-itb-seat': 'itbUserSeatAdded',\n 'click .btn-add-pm-seat': 'pmUserSeatAdded',\n 'click .btn-remove-pm-seat': 'itbUserSeatRemoved',\n 'click .btn-remove-itb-seat': 'pmUserSeatRemoved',\n 'keyup .input-itb-user-seats': 'itbUserSeatsInputChanged',\n 'keyup .input-pm-user-seats': 'pmUserSeatsInputChanged',\n 'click .btn-cancel': 'cancel',\n 'click .btn-save': 'save'\n },\n beforeModalCreated: function () {\n this.isFetched = false;\n let fnFetchUsers = _.bind(function () {\n PJQ.app.session.fetchUsers(_.bind(function (users) {\n this.users = users;\n this.isFetched = true;\n this.render();\n }, this))\n }, this);\n\n if (this.model == null) {\n PJQ.app.session.fetchUserLimits(_.bind(function (userLimits) {\n fnFetchUsers();\n }, this))\n } else {\n fnFetchUsers();\n }\n },\n renderData: function () {\n return {\n model: this.model,\n itbUsers: this.itbUsers,\n pmUsers: this.pmUsers\n };\n },\n afterRender: function () {\n if (!this.isFetched) {\n new PJQ.Loader(this.$('.modal-content'));\n return;\n }\n this.$('.input-itb-user-seats').focus().select();\n\n this.renderHeader();\n },\n renderHeader: function(){\n this.renderSubTemplate(false, this.options.subTemplates.userLimits, this.$('.limits-header'), {\n userLimits: this.model,\n users: this.users\n });\n },\n pmUserSeatAdded: function () {\n this.model.set('pmUserLimit', this.model.get('pmUserLimit') + 1);\n this.userSeatsChanged();\n },\n pmUserSeatRemoved: function () {\n let seats = this.model.get('pmUserLimit');\n this.model.set('pmUserLimit', seats > 0 ? seats - 1 : 0);\n this.userSeatsChanged();\n },\n pmUserSeatsInputChanged: function () {\n let seats = parseInt(this.$('.input-pm-user-seats').val());\n if(isNaN(seats) || seats < 0){\n seats = 0;\n }\n this.model.set('pmUserLimit', seats);\n this.userSeatsChanged();\n },\n itbUserSeatAdded: function () {\n this.model.set('itbUserLimit', this.model.get('itbUserLimit') + 1);\n this.userSeatsChanged();\n },\n itbUserSeatRemoved: function () {\n let seats = this.model.get('itbUserLimit');\n this.model.set('itbUserLimit', seats > 0 ? seats - 1 : 0);\n this.userSeatsChanged();\n },\n itbUserSeatsInputChanged: function () {\n let seats = parseInt(this.$('.input-itb-user-seats').val());\n if(isNaN(seats) || seats < 0){\n seats = 0;\n }\n this.model.set('itbUserLimit', seats);\n this.userSeatsChanged();\n },\n userSeatsChanged: function () {\n this.renderHeader();\n },\n cancel: function () {\n this.model.restore();\n this.removeModal();\n },\n save: function () {\n let loader = new PJQ.Loader(this.$('.modal-content')),\n err = function () {\n loader.remove();\n PJQ.notifications.notify.errorNotify({\n message: 'Encountered an error update user seats'\n });\n };\n this.model.save(null, {\n success: _.bind(function () {\n PJQ.notifications.notify.successNotify({\n message: 'User seats updated'\n });\n\n if (typeof this.options.onSave === 'function') {\n this.options.onSave();\n }\n\n this.removeModal();\n }, this),\n error: _.bind(err, this)\n })\n }\n});\n","PJQ.views.settings.UserTypeSettings = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'User-Type-Settings')\n },\n events: {\n 'click .add-user-type': 'addClicked',\n 'click .btn-edit-ut-perms': 'editPermissionsClicked',\n 'click .btn-edit-user-type': 'editUserTypeClicked',\n 'click .btn-delete-user-type': 'deleteUserTypeClicked',\n 'click .btn-save-user-type': 'userTypeSave',\n 'click .btn-cancel-edit-user-type': 'cancelEditUserType',\n 'click .add-company-user-type': 'addCompanyClicked',\n 'click .btn-edit-company-ut-perms': 'editCompanyPermissionsClicked',\n 'click .btn-edit-company-user-type': 'editCompanyUserTypeClicked',\n 'click .btn-delete-company-user-type': 'deleteCompanyUserTypeClicked',\n 'click .btn-save-company-user-type': 'companyUserTypeSave',\n 'click .btn-cancel-edit-company-user-type': 'cancelEditCompanyUserType',\n 'click .btn-edit-company-user-type-notification-settings': 'companyNotificationSettingsClicked',\n 'click .btn-edit-notification-settings': 'notificationSettingsClicked',\n 'colorpickerCreate': 'createColorPickerBind',\n 'colorpickerChange': 'setColorPickerValue',\n },\n beforeFirstRender: function () {\n this.options.enablePermissions = !PJQ.app.session.get('onAccount') || PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.ENABLE_PERMISSIONS);\n this.users = new PJQ.collections.users.Users();\n this.listenTo(this.users, 'sync', this.render);\n this.users.fetch();\n },\n afterRender: function () {\n this.companyDataTable = new PJQ.views.dataTables.DataTable({\n el: this.$(\".company-user-type-table\"),\n isHideSearch: true,\n data: this.collection.getByIsCompany(true),\n rowId: \"cid\",\n targets: 'no-sort',\n order: [2, 'asc'],\n language: {\n zeroRecords: 'Click \"Add\" to create a new User Type'\n },\n bSort: false,\n rowCallback: function (row, data) {\n $(row).find('td:eq(0)').css('color', data.get('color'));\n },\n contextMenuOptions: {\n actions: [\n {\n name: 'Notifications',\n onClick: _.bind(function (row) {\n this.notificationSettings(row.data());\n }, this)\n },\n {\n name: 'Permissions',\n isShown: _.bind(function () {\n return this.options.enablePermissions;\n }, this),\n onClick: _.bind(function (row) {\n this.editPermissions(row.data());\n }, this)\n },\n {\n name: 'Delete',\n isDanger: true,\n isShown: _.bind(function (row) {\n return row.data().get('masterUserId') !== -1;\n }, this),\n onClick: _.bind(function (row) {\n this.deleteUserType(row);\n }, this)\n }\n ]\n },\n columns: [\n {\n \"data\": {\n \"display\": _.bind(function (row) {\n if (this.userTypeContext != null && this.userTypeContext.id === row.id) {\n return '';\n } else {\n return row.get('name');\n }\n }, this)\n },\n \"title\": \"Company User Types\",\n \"orderable\": false\n },\n {\n \"data\": \"\",\n \"title\": \"\",\n \"width\": \"120px\",\n \"orderable\": false,\n \"searchable\": false,\n \"render\": _.bind(function (data, type, row) {\n let content = '';\n if (this.userTypeContext != null && this.userTypeContext.id === row.id) {\n content = '
'\n }\n return '
' + content + '
'\n }, this)\n },\n {\n \"data\": \"attributes.sortOrder\",\n \"title\": \"\",\n \"searchable\": false,\n \"visible\": false\n },\n {\n \"data\": \"\",\n \"title\": \"\",\n \"orderable\": false,\n \"searchable\": false,\n \"width\": this.options.enablePermissions ? '160px' : '120px',\n \"render\": _.bind(function (data, type, row) {\n let buttons = '',\n notificationButton = '';\n if (this.userTypeContext != null && this.userTypeContext.id === row.id) {\n buttons = '';\n } else {\n if (this.options.enablePermissions) {\n buttons += '';\n buttons += PJQ.app.session.hasPermission('users.canModifyNotifications') ? notificationButton : ``;\n }\n else{\n buttons += notificationButton;\n }\n buttons += '';\n if (row.get('masterUserId') !== -1) {\n buttons += '';\n }\n }\n return '
' + buttons + '
'\n }, this)\n }\n ],\n });\n\n this.dataTable = new PJQ.views.dataTables.DataTable({\n el: this.$(\".user-type-table\"),\n isHideSearch: true,\n data: this.collection.getByIsCompany(false),\n rowId: \"cid\",\n targets: 'no-sort',\n order: [2, 'asc'],\n language: {\n zeroRecords: 'Click \"Add\" to create a new User Type'\n },\n bSort: false,\n rowCallback: function (row, data, index) {\n $(row).find('td:eq(0)').css('color', data.get('color'));\n },\n contextMenuOptions: {\n actions: [\n {\n name: 'Notifications',\n onClick: _.bind(function (row) {\n this.notificationSettings(row.data());\n }, this)\n },\n {\n name: 'Permissions',\n isShown: _.bind(function () {\n return this.options.enablePermissions;\n }, this),\n onClick: _.bind(function (row) {\n this.editPermissions(row.data());\n }, this)\n },\n {\n name: 'Delete',\n isDanger: true,\n isShown: _.bind(function (row) {\n return row.data().get('masterUserId') !== -1;\n }, this),\n onClick: _.bind(function (row) {\n this.deleteCompanyUserType(row);\n }, this)\n }\n ]\n },\n columns: [\n {\n \"data\": {\n \"display\": _.bind(function (row) {\n if (this.userTypeContext != null && this.userTypeContext.id === row.id) {\n return '';\n } else {\n return row.get('name');\n }\n }, this)\n },\n \"title\": \"User Types\",\n \"orderable\": false\n },\n {\n \"data\": \"\",\n \"title\": \"\",\n \"width\": \"120px\",\n \"orderable\": false,\n \"searchable\": false,\n \"render\": _.bind(function (data, type, row) {\n let content = '';\n if (this.userTypeContext != null && this.userTypeContext.id === row.id) {\n content = '
'\n }\n return '
' + content + '
'\n }, this)\n },\n {\n \"data\": \"attributes.sortOrder\",\n \"title\": \"\",\n \"searchable\": false,\n \"visible\": false\n },\n {\n \"data\": \"\",\n \"title\": \"\",\n \"orderable\": false,\n \"searchable\": false,\n \"width\": this.options.enablePermissions ? '160px' : '120px',\n \"render\": _.bind(function (data, type, row) {\n let buttons = '',\n notificationButton = ''\n if (this.userTypeContext != null && this.userTypeContext.id === row.id) {\n buttons = '';\n } else {\n if (this.options.enablePermissions) {\n buttons += '';\n buttons += PJQ.app.session.hasPermission('users.canModifyNotifications') ? notificationButton : ``\n }\n else{\n buttons += notificationButton\n }\n buttons += '';\n if (row.get('masterUserId') !== -1) {\n buttons += '';\n }\n }\n return '
' + buttons + '
'\n }, this)\n },\n ],\n });\n },\n createColorPickerBind: function(e) {\n let io = this.$('.color-io');\n\n io.val(e.color.string());\n\n io.on('change keyup', function () {\n e.colorpicker.setValue(io.val());\n });\n },\n setColorPickerValue: function(e) {\n let io = this.$('.color-io');\n\n if (e.value === io.val() || !e.color || !e.color.isValid()) {\n return;\n }\n\n io.val(e.color.string());\n },\n refreshDataTables: function () {\n this.dataTable.refresh();\n this.companyDataTable.refresh();\n },\n changeDefaultTypeAlert(returnCopy, callback) {\n this.dataTable.refresh();\n new PJQ.views.modals.YesNo({\n header: \"Change User Types?\",\n body: 'You are currently using the system default user types. To edit a user type, we will need to create custom user types for your company. This may take a minute, would you like to continue?',\n onYes: _.bind(function () {\n this.copyUserTypes(returnCopy, _.bind(function (userTypes, newUserType) {\n callback(userTypes, newUserType);\n this.refreshDataTables();\n }, this));\n }, this)\n });\n },\n copyUserTypes: function (returnCopy, callback) {\n this.collection.copy(_.bind(function () {\n let newUt = null;\n if (returnCopy != null) {\n let returnName = returnCopy.get('name');\n newUt = _.find(this.collection.models, function (u) {\n return u.get('name') === returnName;\n });\n }\n callback(this.collection.models, newUt);\n }, this));\n },\n addClicked: function () {\n let fnAdd = _.bind(function () {\n let newUserType = new PJQ.models.userTypes.UserType({\n name: \"\",\n color: '#000000',\n sortOrder: this.collection.length + 1,\n isCompanyUser: false\n });\n this.collection.add(newUserType);\n this.dataTable.addRow(newUserType);\n this.userTypeContext = newUserType;\n this.defaultColor = this.userTypeContext.get('color');\n this.userTypeColor = this.userTypeContext.attributes.color;\n this.dataTable.refresh();\n this.colorPicker = new PJQ.colors.ColorPicker(this.$('.colorpicker-element'), {\n format: 'hex',\n color: this.userTypeColor,\n onChange: _.bind(function (value) {\n this.userTypeContext.set('color', value);\n this.$('.input-user-type-name').css('color', value);\n }, this)\n });\n this.$('.input-user-type-name').css('color', this.userTypeContext.get('color'));\n }, this);\n if (this.collection.length > 0 && this.collection.models[0].get('masterUserId') === -1) {\n this.changeDefaultTypeAlert(null, function () {\n fnAdd();\n });\n } else {\n fnAdd();\n }\n },\n addCompanyClicked: function () {\n let fnAdd = _.bind(function () {\n let newUserType = new PJQ.models.userTypes.UserType({\n name: \"\",\n color: '#000000',\n sortOrder: this.collection.length + 1,\n isCompanyUser: true\n });\n this.collection.add(newUserType);\n this.companyDataTable.addRow(newUserType);\n this.userTypeContext = newUserType;\n this.defaultColor = this.userTypeContext.get('color');\n this.userTypeColor = this.userTypeContext.attributes.color;\n this.companyDataTable.refresh();\n this.colorPicker = new PJQ.colors.ColorPicker(this.$('.colorpicker-element'), {\n format: 'hex',\n color: this.userTypeColor,\n onChange: _.bind(function (value) {\n this.userTypeContext.set('color', value);\n this.$('.input-user-type-name').css('color', value);\n }, this)\n });\n this.$('.input-user-type-name').css('color', this.userTypeContext.get('color'));\n }, this);\n if (this.collection.length > 0 && this.collection.models[0].get('masterUserId') === -1) {\n this.changeDefaultTypeAlert(null, function () {\n fnAdd();\n });\n } else {\n fnAdd();\n }\n },\n companyNotificationSettingsClicked: function (e) {\n let target = $(e.currentTarget),\n userType = this.companyDataTable.getRow(target.closest('tr')).data();\n if (userType.get('masterUserId') === -1) {\n this.changeDefaultTypeAlert(userType, function (newUserTypes, newUserType) {\n this.notificationSettings(newUserType);\n });\n } else {\n this.notificationSettings(userType);\n }\n },\n notificationSettingsClicked: function (e) {\n let target = $(e.currentTarget),\n userType = this.dataTable.getRow(target.closest('tr')).data();\n if (userType.get('masterUserId') === -1) {\n this.changeDefaultTypeAlert(userType, function (newUserTypes, newUserType) {\n this.notificationSettings(newUserType);\n });\n } else {\n this.notificationSettings(userType);\n }\n },\n notificationSettings: function (userType) {\n new PJQ.views.notificationSettings.NotificationSettingsEditorModal({\n model: userType\n });\n },\n editCompanyPermissionsClicked: function (e) {\n let target = $(e.currentTarget),\n row = this.companyDataTable.getRow(target.closest('tr')),\n userType = row.data();\n if (userType.get('masterUserId') === -1) {\n this.changeDefaultTypeAlert(userType, function (newUserTypes, newUserType) {\n this.editPermissions(newUserType);\n });\n } else {\n this.editPermissions(userType);\n }\n },\n editPermissionsClicked: function (e) {\n let target = $(e.currentTarget),\n row = this.dataTable.getRow(target.closest('tr')),\n userType = row.data();\n if (userType.get('masterUserId') === -1) {\n this.changeDefaultTypeAlert(userType, function (newUserTypes, newUserType) {\n this.editPermissions(newUserType);\n });\n } else {\n this.editPermissions(userType);\n }\n },\n editPermissions: function (userType) {\n new PJQ.views.permissions.PermissionsEditorModal({\n model: userType\n });\n },\n editUserTypeClicked: function (e) {\n let $row = $(e.currentTarget).closest('tr'),\n row = this.dataTable.getRow($row),\n userType = row.data();\n this.editUserType(userType);\n },\n editUserType: function (userType) {\n let fnEdit = _.bind(function (eut) {\n this.userTypeContext = eut;\n this.defaultColor = eut.get('color');\n this.dataTable.refresh();\n this.colorPicker = new PJQ.colors.ColorPicker(this.$('.colorpicker-element'), {\n format: 'hex',\n color: eut.get('color'),\n onChange: _.bind(function (value) {\n this.userTypeContext.set('color', value);\n this.$('.input-user-type-name').css('color', value);\n }, this)\n });\n this.$('.input-user-type-name').css('color', eut.get('color'));\n }, this);\n if (userType.get('masterUserId') === -1) {\n this.changeDefaultTypeAlert(userType, function (userTypes, newUserType) {\n fnEdit(newUserType);\n });\n } else {\n fnEdit(userType);\n }\n },\n editCompanyUserTypeClicked: function (e) {\n let $row = $(e.currentTarget).closest('tr'),\n row = this.companyDataTable.getRow($row),\n userType = row.data();\n this.editCompanyUserType(userType);\n },\n editCompanyUserType: function (userType) {\n let fnEdit = _.bind(function (eut) {\n this.userTypeContext = eut;\n this.defaultColor = eut.get('color');\n this.companyDataTable.refresh();\n this.colorPicker = new PJQ.colors.ColorPicker(this.$('.colorpicker-element'), {\n format: 'hex',\n color: eut.get('color'),\n onChange: _.bind(function (value) {\n this.userTypeContext.set('color', value);\n this.$('.input-user-type-name').css('color', value);\n }, this)\n });\n this.$('.input-user-type-name').css('color', eut.get('color'));\n }, this);\n if (userType.get('masterUserId') === -1) {\n this.changeDefaultTypeAlert(userType, function (userTypes, newUserType) {\n fnEdit(newUserType);\n });\n } else {\n fnEdit(userType);\n }\n },\n deleteUserTypeClicked(e) {\n let $row = $(e.currentTarget).closest('tr'),\n row = this.dataTable.getRow($row);\n this.deleteUserType(row);\n },\n deleteUserType: function (row) {\n let userType = row.data(),\n fnDelete = _.bind(function (dut) {\n new PJQ.views.modals.DeleteCancel({\n header: \"Delete User Type\",\n body: \"Are you sure you want to delete this user type? Any user who currently has this role will have to be changed to a new user type.\",\n onDelete: _.bind(function () {\n let userHasType = false;\n _.each(this.users.models, function (user) {\n if (user.get('userTypeId') === userType.get('userTypeId')) {\n userHasType = true;\n }\n });\n if (userHasType) {\n new PJQ.views.settings.ChangeUserTypeModal({\n userTypeId: userType.get('userTypeId'),\n title: userType.get('name') + \" Users\",\n users: this.users,\n onDelete: _.bind(function () {\n userType.destroy({\n success: _.bind(function () {\n this.collection.remove(dut);\n this.dataTable.removeRow(row);\n this.dataTable.refresh();\n }, this)\n });\n }, this)\n });\n } else {\n userType.destroy({\n success: _.bind(function () {\n this.collection.remove(dut);\n this.dataTable.removeRow(row);\n this.dataTable.refresh();\n }, this)\n });\n }\n }, this)\n });\n }, this);\n if (userType.get('masterUserId') === -1) {\n this.changeDefaultTypeAlert(userType, function (userTypes, newUserType) {\n fnDelete(newUserType);\n });\n } else {\n fnDelete(userType);\n }\n },\n deleteCompanyUserTypeClicked(e) {\n let $row = $(e.currentTarget).closest('tr'),\n row = this.companyDataTable.getRow($row);\n this.deleteCompanyUserType(row);\n },\n deleteCompanyUserType: function (row) {\n let userType = row.data(),\n fnDelete = _.bind(function (dut) {\n new PJQ.views.modals.DeleteCancel({\n header: \"Delete User Type\",\n body: \"Are you sure you want to delete this user type? Any user who currently has this role will have to be changed to a new user type.\",\n onDelete: _.bind(function () {\n let userHasType = false;\n _.each(this.users.models, function (user) {\n if (user.get('userTypeId') === userType.get('userTypeId')) {\n userHasType = true;\n }\n });\n if (userHasType) {\n new PJQ.views.settings.ChangeUserTypeModal({\n userTypeId: userType.get('userTypeId'),\n title: userType.get('name') + \" Users\",\n users: this.users,\n onDelete: _.bind(function () {\n userType.destroy({\n success: _.bind(function () {\n this.collection.remove(dut);\n this.companyDataTable.removeRow(row);\n this.companyDataTable.refresh();\n }, this)\n });\n }, this)\n });\n } else {\n userType.destroy({\n success: _.bind(function () {\n this.collection.remove(dut);\n this.companyDataTable.removeRow(row);\n this.companyDataTable.refresh();\n }, this)\n });\n }\n }, this)\n });\n }, this);\n if (userType.get('masterUserId') === -1) {\n this.changeDefaultTypeAlert(userType, function (userTypes, newUserType) {\n fnDelete(newUserType);\n });\n } else {\n fnDelete(userType);\n }\n },\n userTypeSave: function (e) {\n let $row = $(e.currentTarget).closest('tr'),\n userType = this.dataTable.getRow($row).data(),\n $name = $row.find('.input-user-type-name');\n userType.set('name', $name.val());\n userType.set('sortOrder', userType.attributes.sortOrder);\n\n let isNameValid = _.size(userType.get('name')) > 0;\n PJQ.helpers.inputHelpers.setInputError($name, isNameValid);\n\n if (isNameValid) {\n userType.save(null, {\n success: _.bind(function () {\n this.userTypeContext = null;\n this.dataTable.refresh();\n }, this)\n });\n }\n },\n companyUserTypeSave: function (e) {\n let $row = $(e.currentTarget).closest('tr'),\n userType = this.companyDataTable.getRow($row).data(),\n $name = $row.find('.input-user-type-name');\n userType.set('name', $name.val());\n userType.set('sortOrder', userType.attributes.sortOrder);\n\n let isNameValid = _.size(userType.get('name')) > 0;\n PJQ.helpers.inputHelpers.setInputError($name, isNameValid);\n\n if (isNameValid) {\n userType.save(null, {\n success: _.bind(function () {\n this.userTypeContext = null;\n this.companyDataTable.refresh();\n }, this)\n });\n }\n },\n cancelEditUserType: function (e) {\n let $row = $(e.currentTarget).closest('tr'),\n row = this.dataTable.getRow($row),\n user = row.data();\n user.set('color', this.defaultColor);\n this.userTypeContext = null;\n this.userTypeColor = null;\n if (user.get('name').length === 0) {\n this.dataTable.removeRow(row);\n }\n this.dataTable.refresh();\n },\n cancelEditCompanyUserType: function (e) {\n let $row = $(e.currentTarget).closest('tr'),\n row = this.companyDataTable.getRow($row),\n user = row.data();\n user.set('color', this.defaultColor);\n this.userTypeContext = null;\n this.userTypeColor = null;\n if (user.get('name').length === 0) {\n this.companyDataTable.removeRow(row);\n }\n this.companyDataTable.refresh();\n },\n});\n\nPJQ.views.settings.ChangeUserTypeModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.SETTINGS, 'Modal-Change-User-Type'),\n title: \"Change User Types\",\n subtitle: \"These Users Type must be changed before deleting.\"\n },\n events: {\n 'click .btn-edit-user': 'editClicked',\n 'click .user-type-change-done': 'checkDone'\n },\n beforeModalCreated: function () {\n this.users = this.options.users;\n },\n beforeRender: function () {\n this.renderData = {\n options: this.options\n };\n },\n afterRender: function () {\n this.dataTable = new PJQ.views.dataTables.DataTable({\n el: this.$(\".user-table\"),\n isHideSearch: true,\n paginate: false,\n data: this.users.getByUserType(this.options.userTypeId),\n rowId: \"cid\",\n targets: 'no-sort',\n order: [2, 'asc'],\n bSort: false,\n language: {\n zeroRecords: 'No more users have this type. Hit done to complete deleting.'\n },\n rowCallback: function (row, data) {\n $(row).find('td:eq(0)').css('color', data.get('color'));\n },\n contextMenuOptions: {\n actions: [\n {\n name: 'Edit',\n onClick: _.bind(function (row) {\n this.editUser(row.data());\n }, this)\n }\n ]\n },\n columns: [\n {\n \"title\": \"User Type\",\n \"data\": \"userType\",\n \"render\": _.bind(function (data, type, row) {\n if (type === 'sort' && row.userType !== undefined) {\n return row.userType.get('sortOrder');\n }\n return '' + (row.userType !== undefined ? row.userType.get('name') : \"\") + '';\n }, this)\n },\n {\n \"title\": \"Username\",\n \"data\": \"attributes.username\",\n },\n {\n \"title\": \"Name\",\n \"data\": \"attributes.contactName\",\n },\n {\n \"title\": \"Email\",\n \"data\": \"attributes.email\",\n },\n {\n \"data\": \"\",\n \"title\": \"\",\n \"orderable\": false,\n \"searchable\": false,\n \"width\": '40px',\n \"render\": _.bind(function (data, type, row) {\n let button = '';\n button += '';\n return '
' + button + '
'\n }, this)\n }\n ],\n });\n this.checkUsersLength()\n },\n editClicked: function (e) {\n let target = $(e.currentTarget),\n row = this.dataTable.getRow(target.closest('tr')),\n user = row.data();\n\n this.editUser(user);\n },\n editUser: function (user) {\n new PJQ.views.contacts.BaseEditContactModal({\n model: user,\n onSave: _.bind(function (user) {\n if (user.hasChanged()) {\n user.save(null, {\n notify: true\n });\n }\n this.dataTable.refresh();\n this.checkUsersLength()\n }, this),\n onClose: _.bind(function (user) {\n if (user.hasChanged()) {\n user.fetch({\n success: _.bind(function () {\n this.dataTable.refresh();\n }, this)\n });\n this.checkUsersLength()\n }\n }, this),\n onDelete: _.bind(function (user) {\n let row = this.dataTable.getRow(user.cid);\n this.users.remove(user);\n if (row != null) {\n this.dataTable.removeRow(row);\n }\n this.checkUsersLength()\n }, this)\n });\n },\n checkUsersLength: function () {\n if (this.users.getByUserType(this.options.userTypeId).length === 0) {\n this.$('.user-type-change-done').attr('disabled', false)\n }\n },\n checkDone: function () {\n if (this.users.getByUserType(this.options.userTypeId).length === 0) {\n this.options.onDelete;\n this.removeModal();\n }\n }\n});\n\n"]}