{"version":3,"sources":["1initializers.js","meetingeditviews.js","meetingmodels.js","meetingsdatatables.js","meetingsviews.js","templateviews.js"],"names":["PJQ","collections","meetings","models","views","modules","routes","route","name","callback","projectId","projectWall","initProjectNavigator","parseInt","meetingId","app","addRoutes","MeetingEditModal","BaseModal","extend","defaults","template","templating","Template","constants","MEETINGS","subTemplates","agendaItems","agendaItem","width","maxWidth","minWidth","model","isShowCloseButton","onSave","_","noop","onDelete","events","click .btn-save","click .btn-delete","click .btn-close","click .nav-link","click .btn-add-agenda-item","click .btn-close-agenda-item","click .btn-open-agenda-item","click .btn-edit-agenda-item","click .btn-delete-agenda-item","click .btn-add-category","click .btn-edit-category","click .btn-delete-category","click .btn-edit-minutes","click .btn-save-minutes","click .category-dropdown","click .btn-view-transcription","click .btn-export","click .btn-cancel-minutes","keydown .meeting-number","click .btn-distribute","click .btn-view-previous-minutes","click .toggle-attendance","input .meeting-description","beforeModalCreated","_beforeModalCreated","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_this$options$project","wrap","_context","prev","next","this","isFetched","options","project","session","Meeting","id","templateId","statusId","number","fetchMeetingCustomFields","customFields","sent","fetchMeetingSettings","settings","isNew","fetch","set","get","size","Date","toLocaleTimeString","timeZoneName","split","render","stop","apply","arguments","beforeRender","status","canEdit","hasPermission","isAdmin","canDelete","canSave","meetingStatus","CONCLUDED","CANCELLED","canUploadRecording","canEditMinutes","IN_PROGRESS","DRAFT","renderData","activeView","canTranscribe","filter","meetingRecordings","recording","preferences","hasPref","preferenceTypes","ENABLE_MEETING_TRANSCRIPTIONS","afterRender","renderGeneral","renderAgendaItems","descriptionChanged","e","$input","$","currentTarget","val","length","slice","viewPreviousMinutes","$container","closest","$minutes","find","off","on","hasClass","html","collapse","changeActiveView","view","tab","target","hash","toUpperCase","_this","fnSaveAttachment","bind","attachment","save","success","setTimeout","listenTo","Binder","$el","useDecimalPercentFields","watchElements","defaultDate","helpers","dateHelpers","getDateString","dateFormats","DATE_TIME","datePicker","inputs","Datepicker","el","timezone","datepickerOptions","format","DATE","onChange","newDate","currentDate","getDateDaysDiff","meetingCustomFieldsForm","CustomFieldsForm","isEdit","collection","fieldValues","isDirty","startTimeString","_ref2","_slicedToArray","startHours","startMinutes","startSeconds","startDate","setHours","setMinutes","setSeconds","startTimePicker","isTimeOnly","isShowTimezone","isEditTimezone","onTimezoneChange","tz","endTimePicker","setTimezone","time","getTimeString","durationInMinutes","startTime","getDateAndTime","setValue","endTimeString","_ref4","endHours","endMinutes","endSeconds","endDate","endTime","statusPicker","Selectpicker","defaultValue","isMultiple","isIntChoices","value","newStatus","dirtyAttributes","notifications","notify","successNotify","message","SCHEDULED","attendeePicker","contacts","ContactsSelectInput","selectedContact","attendees","getAttendeeContacts","isReadOnly","displayContactsBlock","context","contexts","PROJECTCONTACTS","USERS","isSingleChoice","selectedContacts","arr","map","contact","MeetingAttendees","MeetingAttendee","attendee","renderAttendanceDatatable","fileUploader","files","FileUploaderGrid","attachments","canUpload","useApiV2","canView","previewImageDimension","onSuccess","file","destroy","recordingUploader","allowedExtensions","maxFiles","_this2","attendanceTable","dataTables","DataTable","isHideSearch","data","rowId","order","pageLength","language","zeroRecords","columns","title","type","row","result","getContactAnchor","cid","toggleAttendance","attribute","getRow","isPresent","isAbsent","isDistribution","viewTranscription","ViewMeetingTranscriptionModal","meeting","numbersOnly","inputHelpers","_this3","categories","sortBy","c","categoryIds","hasUncategorizedItems","findWhere","categoryId","each","push","renderSubTemplate","items","agendaNumber","category","renderAgendaItem","categorySortable","Sortable","multiple","tolerance","handle","onStart","hide","refreshPositions","onStop","ui","setCategorySort","item","agendaSortable","setAgendaItemSort","sortedEl","sortOrder","collapseEl","sortedCid","sortedItem","updateSort","element","itemCid","sortedCategory","$item","$agendaItemEl","minutesEditor","HTMLEditor","editorHeight","isHideTokens","addClass","categoryClicked","dropdown","caret","removeClass","editMeetingMinutes","exportMeeting","downloadFile","urlHelpers","generateEndpoint","endpoint","isAPIv2","distributeAgendaItems","isMinutes","modals","YesNo","header","body","onYes","ajax","Request","post","done","response","fail","xhr","err","errorNotify","saveMeetingMinutesClicked","saveMeetingMinutes","minutes","getValue","isEditing","saveOpenMinutes","_this4","cancelMeetingMinutes","addCategoryClicked","MeetingCategory","editCategory","editCategoryClicked","stopPropagation","deleteCategoryClicked","deleteCategory","CategoryEditModal","remove","add","DeleteCancel","addAgendaItemClicked","categoryAgendaItems","where","AgendaItem","priorityId","editAgendaItem","closeAgendaItemClicked","meetingAgendaStatus","CLOSED","openAgendaItemClicked","OPEN","editAgendaItemClicked","AgendaItemEditModal","deleteAgendaItemClicked","deleteAgendaItem","validate","isValid","$meetingName","setInputError","$meetingNumber","$meetingDate","$meetingStartTime","$meetingEndTime","saveMeeting","removeModal","isUploading","getChanged","error","deleteMeeting","close","editPerms","hasChanged","getChangedModels","SaveDontSave","onDontSave","input .agenda-item-description","_beforeModalCreated2","_callee2","_context2","priorityPicker","newPriority","categoryPicker","newCategory","assigneePicker","assignedTo","$agendaTitle","saveAgendaItem","$categoryName","saveCategory","click .btn-transcribe","transcribeMeeting","loader","Loader","BaseModel","idAttribute","parse","Attachments","meetingRecordingAttachments","AgendaItems","MeetingCategories","noCategory","beforeSave","validateHyperlink","hyperlink","test","startsWith","isToday","replace","mTime","dataProp","undefined","meetingDate","parseDateString","timeSplit","hours","isNaN","isOverdue","startDateTime","endDateTime","getDateDiff","CustomField","CustomFieldChoice","Settings","UserSettings","getSettings","attributes","viewSettings","setting","Contact","toJSON","put","res","notifyName","parameter","Meetings","Attachment","File","BaseCollection","getOriginMeetings","originMeetings","self","nonExistentOriginMeetings","meetingIds","originMeetingId","includes","followUpMeetings","sort","a","b","groupedNonExistentOriginMeetings","groupBy","group","originMeeting","followUpMeeting","getMeetingCount","getMeetingsFromOrigin","_toConsumableArray","Files","CustomFields","params","CustomFieldChoices","Templates","MeetingListDatatable","emptyTable","paging","getColumns","_this6","includeAllColumns","includeColumns","columnsDefault","columnName","_this5","columnData","_row$get","parseTimeString","meetingStatusNames","customField","fieldValue","getCustomFieldValue","commitments","customFieldType","BOOLEAN","CHOICE","choices","choice","join","DATETIME","INTEGER","toLocaleString","MONEY","parseFloat","formatHelpers","formatCurrency","PERCENT","toFixed","targetMeeting","mostRecentMeeting","max","canViewMeetings","canDeleteMeetings","orderable","searchable","className","visible","timeString","timeArray","hour","minute","hour12","getFilterData","statusFilter","getFilter","contains","MeetingsList","BaseView","comments","ACTIONITEMS","contactBadge","GLOBAL","shown.bs.collapse .meeting-collapse","hidden.bs.collapse .meeting-collapse","click .btn-settings","keyup .meeting-search","click .clear-filters","click .btn-add-meeting","click .btn-delete-meeting","click .btn-view-meeting","click .meeting-dropdown","click .btn-follow-up","click .btn-import-template","click .btn-save-a-template","beforeFirstRender","_beforeFirstRender","_callee3","_context3","expandedMeetings","canAdd","noneSelectedText","renderMeetings","initMeeting","viewMeeting","meetingCollapsed","originId","without","meetingExpanded","indexOf","searchChanged","search","clearFilters","$meetings","empty","filteredMeetings","toLowerCase","filteredOriginMeetingIds","uniq","append","dataTable","onPageSizeChange","headerData","onRowDoubleClick","contextMenuOptions","actions","onClick","isDanger","isShown","setFilter","meetingClicked","saveTemplate","MeetingTemplateCreatorModal","importTemplate","ImportTemplateModal","onImport","followUpMeetingClicked","previousMeeting","description","attendeeIds","addMeetingClicked","editSettings","viewMeetingClicked","isMostRecentMeeting","deleteMeetingClicked","TemplateManagement","templates","addTemplate","NewTemplateModal","editTemplate","EditTemplateModal","onClose","refresh","removeRow","fitHeight","TextEditorInput","label","patch","deleteTemplate","click .btn-import","fetchMeetingTemplates","tmp","templatePicker","selectedTemplate","showError","hideError","prop","AutocompleteInput","source","$name","trim","existingTemplate","overwriteExisting","fnSave","copyAttachments","copyAttendees","copyCategories","copyAgendaItems"],"mappings":"ilRAAAA,IAAAC,YAAAC,SAAA,GAEAF,IAAAG,OAAAD,SAAA,GAEAF,IAAAI,MAAAF,SAAA,GAEAF,IAAAK,QAAAH,SAAA,CACAI,OAAA,CACA,CACAC,MAAA,+BACA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AC,QAAA,8BAEA7J,SAEAA,MACA,MAAAqkB,EACA,IAAA9oB,IAAAI,MAAA8V,OAAAC,MAAA,CACAC,OAAA,mBACAC,KAAA0S,EAAA,gGAAA,yFACAzS,MAAAnU,EAAAuH,KAAA,WACAjF,KAAAzC,MAAA0D,IAAA,KAAAojB,EAAA/jB,IACAikB,KACAvkB,QAIAukB,SAtCAhpB,IAAAqK,QAAAkI,aAAA8G,cAAAuP","file":"app.js","sourcesContent":["PJQ.collections.meetings = {};\n\nPJQ.models.meetings = {};\n\nPJQ.views.meetings = {};\n\nPJQ.modules.meetings = {\n routes: [\n {\n route: 'projects/:projectId/meetings',\n name: 'meetings',\n callback: function (projectId) {\n PJQ.modules.projectWall.initProjectNavigator(parseInt(projectId), \"meetings\");\n }\n },\n {\n route: 'projects/:projectId/meetings/:meetingId',\n name: 'meeting',\n callback: function (projectId, meetingId) {\n PJQ.modules.projectWall.initProjectNavigator(parseInt(projectId), \"meetings\", {\n meetingId: parseInt(meetingId)\n });\n }\n }\n ]\n};\n\nPJQ.app.addRoutes(PJQ.modules.meetings.routes);\n","PJQ.views.meetings.MeetingEditModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.MEETINGS, 'modal-meeting-edit'),\n subTemplates: {\n agendaItems: new PJQ.templating.Template(PJQ.constants.modules.MEETINGS, 'agenda-items'),\n agendaItem: new PJQ.templating.Template(PJQ.constants.modules.MEETINGS, 'agenda-item')\n },\n width: '95%',\n maxWidth: 1200,\n minWidth: 700,\n model: null,\n isShowCloseButton: true,\n onSave: _.noop(),\n onDelete: _.noop()\n },\n events: {\n 'click .btn-save': 'saveMeeting',\n 'click .btn-delete': 'deleteMeeting',\n 'click .btn-close': 'close',\n 'click .nav-link': 'changeActiveView',\n 'click .btn-add-agenda-item': 'addAgendaItemClicked',\n 'click .btn-close-agenda-item': 'closeAgendaItemClicked',\n 'click .btn-open-agenda-item': 'openAgendaItemClicked',\n 'click .btn-edit-agenda-item': 'editAgendaItemClicked',\n 'click .btn-delete-agenda-item': 'deleteAgendaItemClicked',\n 'click .btn-add-category': 'addCategoryClicked',\n 'click .btn-edit-category': 'editCategoryClicked',\n 'click .btn-delete-category': 'deleteCategoryClicked',\n 'click .btn-edit-minutes': 'editMeetingMinutes',\n 'click .btn-save-minutes': 'saveMeetingMinutesClicked',\n 'click .category-dropdown': 'categoryClicked',\n 'click .btn-view-transcription': 'viewTranscription',\n 'click .btn-export': 'exportMeeting',\n 'click .btn-cancel-minutes': 'cancelMeetingMinutes',\n 'keydown .meeting-number': 'numbersOnly',\n 'click .btn-distribute': 'distributeAgendaItems',\n 'click .btn-view-previous-minutes': 'viewPreviousMinutes',\n 'click .toggle-attendance': 'toggleAttendance',\n 'input .meeting-description': 'descriptionChanged'\n },\n beforeModalCreated: async function () {\n this.isFetched = false;\n this.options.project = this.options.project ? this.options.project : PJQ.app.session.project;\n\n if (this.model == null) {\n this.model = new PJQ.models.meetings.Meeting({\n projectId: this.options.project?.id,\n templateId: this.options.templateId,\n statusId: 1,\n number: 1\n });\n }\n\n if (this.options.project) {\n this.customFields = await this.options.project.fetchMeetingCustomFields();\n } else {\n this.customFields = await PJQ.app.session.fetchMeetingCustomFields();\n }\n\n if (this.options.project) {\n this.settings = await this.options.project.fetchMeetingSettings();\n } else {\n this.settings = await PJQ.app.session.fetchMeetingSettings();\n }\n\n if (!this.model.isNew()) {\n await this.model.fetch();\n } else {\n this.model.set('isPublic', this.settings.get('isPublicDefault'));\n }\n\n if (_.size(this.model.get('timezone')) === 0) {\n this.model.set('timezone', new Date().toLocaleTimeString('en-us', {timeZoneName: 'short'}).split(' ')[2]);\n }\n\n this.isFetched = true;\n this.render();\n },\n beforeRender: function () {\n if (!this.isFetched) {\n return;\n }\n\n let status = this.model.get('statusId');\n if (this.options.project) {\n this.options.canEdit = PJQ.app.session.project.hasPermission('meetings.canEdit');\n this.options.isAdmin = PJQ.app.session.project.hasPermission('meetings.isAdmin');\n this.options.canDelete = this.options.isAdmin;\n this.options.canSave = this.options.canEdit && status !== PJQ.constants.meetings.meetingStatus.CONCLUDED && status !== PJQ.constants.meetings.meetingStatus.CANCELLED;\n this.options.canUploadRecording = PJQ.app.session.project.hasPermission('meetings.canEdit')\n && status !== PJQ.constants.meetings.meetingStatus.CONCLUDED\n && status !== PJQ.constants.meetings.meetingStatus.CANCELLED;\n } else {\n this.options.canEdit = true;\n this.options.isAdmin = true;\n this.options.canDelete = this.options.isAdmin;\n this.options.canSave = this.options.canEdit && status !== PJQ.constants.meetings.meetingStatus.CONCLUDED && status !== PJQ.constants.meetings.meetingStatus.CANCELLED;\n this.options.canUploadRecording = status !== PJQ.constants.meetings.meetingStatus.CONCLUDED\n && status !== PJQ.constants.meetings.meetingStatus.CANCELLED;\n }\n\n this.options.canEditMinutes = (!PJQ.app.session.project || PJQ.app.session.project.hasPermission('meetings.canEdit')) &&\n status !== PJQ.constants.meetings.meetingStatus.CONCLUDED &&\n status !== PJQ.constants.meetings.meetingStatus.CANCELLED;\n\n if (status === PJQ.constants.meetings.meetingStatus.IN_PROGRESS || status === PJQ.constants.meetings.meetingStatus.CONCLUDED || status === PJQ.constants.meetings.meetingStatus.CANCELLED) {\n this.options.canEdit = false;\n this.options.canDelete = false;\n this.options.canUploadRecording = status === PJQ.constants.meetings.meetingStatus.IN_PROGRESS && (!PJQ.app.session.project || PJQ.app.session.project.hasPermission('meetings.canEdit'));\n } else if (status === PJQ.constants.meetings.meetingStatus.DRAFT) {\n this.options.canEdit = true;\n this.options.canUploadRecording = true;\n } else {\n if (PJQ.app.session.project) {\n this.options.canEdit = PJQ.app.session.project.hasPermission('meetings.canEdit');\n this.options.canDelete = PJQ.app.session.project.hasPermission('meetings.isAdmin');\n this.options.canUploadRecording = PJQ.app.session.project.hasPermission('meetings.canEdit');\n } else {\n this.options.canEdit = true;\n this.options.canDelete = true;\n this.options.canUploadRecording = true;\n }\n }\n },\n renderData: function () {\n return {\n model: this.model,\n canEdit: this.options.canEdit,\n canDelete: this.options.canDelete,\n isAdmin: this.options.isAdmin,\n isFetched: this.isFetched,\n activeView: this.options.activeView,\n canSave: this.options.canSave,\n settings: this.settings,\n canTranscribe: _.size(_.filter(this.model.meetingRecordings.models, function (recording) {\n return !recording.get('delete')\n }, this)) > 0 && PJQ.app.session.preferences.hasPref(PJQ.constants.preferenceTypes.ENABLE_MEETING_TRANSCRIPTIONS)\n }\n },\n afterRender: function () {\n if (!this.isFetched)\n return;\n\n this.renderGeneral();\n if (!this.model.isNew()) {\n this.renderAgendaItems();\n }\n },\n descriptionChanged: function(e) {\n let $input = $(e.currentTarget),\n val = $input.val();\n\n if (typeof val === 'string' && val.length > 4000) {\n val = val.slice(0, 4000);\n $input.val(val);\n }\n\n this.model.set('description', val);\n },\n viewPreviousMinutes: function (e) {\n let $target = $(e.currentTarget),\n $container = $target.closest('.agenda-item-container'),\n $minutes = $container.find('.previous-minutes-display');\n\n $minutes.off('shown.bs.collapse hidden.bs.collapse').on('shown.bs.collapse hidden.bs.collapse', function () {\n if ($minutes.hasClass('show')) {\n $container.find('.btn-view-previous-minutes').html('');\n } else {\n $container.find('.btn-view-previous-minutes').html('');\n }\n });\n\n $minutes.collapse('toggle');\n },\n changeActiveView: function (e, view) {\n let tab = e && e.target.hash ? e.target.hash.toUpperCase() : null;\n\n if (view) {\n tab = view;\n }\n\n switch (tab) {\n case '#M_AGENDA':\n this.options.activeView = 'agenda';\n break;\n default:\n this.options.activeView = 'general';\n }\n },\n renderGeneral: function () {\n let fnSaveAttachment = _.bind(function (attachment) {\n // If the attachment doesn't have an uploadId, recursively call this function every 2 seconds\n if (attachment.get('uploadId')) {\n let isNew = this.model.isNew();\n this.model.save(null, {\n success: _.bind(function (model) {\n if (isNew && typeof this.options.onSave === 'function') {\n this.options.onSave(model, true);\n }\n this.render();\n }, this)\n });\n } else {\n setTimeout(_.bind(function () {\n fnSaveAttachment(attachment)\n }, this), 2000);\n }\n }, this);\n\n this.listenTo(this.model.meetingRecordings, 'add', _.bind(function (attachment) {\n // The attachment has been uploaded, but probably doesn't have an uploadId yet. Call fnSaveAttachment to make sure it saves\n if (attachment.get('uploadId')) {\n model.save();\n } else {\n fnSaveAttachment(attachment);\n }\n }, this));\n new PJQ.Binder(this.$el, this.model, {\n canEdit: !this.options.canEdit ? false : null,\n useDecimalPercentFields: true,\n watchElements: [\n 'input',\n 'textarea'\n ]\n });\n let defaultDate = PJQ.helpers.dateHelpers.getDateString(this.model.get('date'), PJQ.helpers.dateHelpers.dateFormats.DATE_TIME, true);\n this.datePicker = new PJQ.inputs.Datepicker({\n el: this.$('.meeting-date'),\n canEdit: this.options.canEdit,\n timezone: 'UTC',\n datepickerOptions: {\n format: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE,\n defaultDate: defaultDate\n },\n onChange: _.bind(function (newDate) {\n let currentDate = this.model.get('date');\n if (currentDate == null || PJQ.helpers.dateHelpers.getDateDaysDiff(newDate, new Date(currentDate)) !== 0) {\n this.model.set('date', newDate);\n }\n }, this)\n });\n\n if (_.size(this.customFields) > 0) {\n this.meetingCustomFieldsForm = new PJQ.views.customFields.CustomFieldsForm({\n el: this.$('.meeting-custom-fields'),\n isAdmin: true,\n isEdit: this.options.canEdit,\n collection: this.customFields,\n fieldValues: this.model.get('customFieldValues'),\n onChange: () => {\n this.model.isDirty = true;\n }\n });\n }\n\n // Convert startTime to date for datepicker\n let startTimeString = this.model.get('startTime'),\n [startHours, startMinutes, startSeconds] = startTimeString ? startTimeString.split(':') : [0, 0, 0],\n startDate = new Date();\n startDate.setHours(startHours);\n startDate.setMinutes(startMinutes);\n startDate.setSeconds(startSeconds);\n\n this.startTimePicker = new PJQ.inputs.Datepicker({\n el: this.$('.meeting-start-time'),\n canEdit: this.options.canEdit,\n isTimeOnly: true,\n timezone: this.model.get('timezone'),\n isShowTimezone: true,\n isEditTimezone: true,\n datepickerOptions: {\n format: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE_TIME,\n defaultDate: startDate\n },\n onTimezoneChange: (tz) => {\n this.model.set('timezone', tz);\n this.endTimePicker.setTimezone(tz);\n },\n onChange: (newDate) => {\n let time = PJQ.helpers.dateHelpers.getTimeString(new Date(newDate));\n if (this.model.get('startTime') === time) {\n return;\n }\n\n this.model.set('startTime', time)\n\n let dMinutes = this.model.durationInMinutes();\n if (dMinutes < 0) {\n let startTime = this.model.getDateAndTime('start');\n this.model.set('endTime', PJQ.helpers.dateHelpers.getTimeString(startTime));\n\n if (this.endTimePicker) {\n this.endTimePicker.setValue(startTime)\n }\n }\n }\n });\n\n // Convert endTime to date for datepicker\n let endTimeString = this.model.get('endTime'),\n [endHours, endMinutes, endSeconds] = endTimeString ? endTimeString.split(':') : [0, 0, 0],\n endDate = new Date();\n endDate.setHours(endHours);\n endDate.setMinutes(endMinutes);\n endDate.setSeconds(endSeconds);\n\n this.endTimePicker = new PJQ.inputs.Datepicker({\n el: this.$('.meeting-end-time'),\n canEdit: this.options.canEdit,\n isTimeOnly: true,\n timezone: this.model.get('timezone'),\n isShowTimezone: true,\n isEditTimezone: true,\n datepickerOptions: {\n format: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE_TIME,\n defaultDate: endDate\n },\n onTimezoneChange: (tz) => {\n this.model.set('timezone', tz);\n this.startTimePicker.setTimezone(tz);\n },\n onChange: (newDate) => {\n let time = PJQ.helpers.dateHelpers.getTimeString(new Date(newDate));\n if (this.model.get('endTime') === time) {\n return;\n }\n\n this.model.set('endTime', time)\n\n let dMinutes = this.model.durationInMinutes();\n if (dMinutes < 0) {\n let endTime = this.model.getDateAndTime('end');\n this.model.set('startTime', PJQ.helpers.dateHelpers.getTimeString(endTime));\n\n if (this.startTimePicker) {\n this.startTimePicker.setValue(endTime)\n }\n }\n }\n });\n\n this.statusPicker = new PJQ.inputs.Selectpicker({\n el: this.$('.select-status'),\n defaultValue: this.model.get('statusId') != null ? this.model.get('statusId') : 1,\n canEdit: ((!PJQ.app.session.project || PJQ.app.session.project.hasPermission('meetings.canEdit')) || this.options.canEdit),\n isMultiple: false,\n isIntChoices: true,\n onChange: _.bind(function (value) {\n let newStatus = value,\n oldStatus = this.model.get('statusId');\n this.model.set('statusId', newStatus);\n if (!this.model.isNew()) {\n this.model.save(null, {\n success: _.bind(function () {\n this.model.dirtyAttributes = {};\n if (typeof this.options.onSave === 'function')\n this.options.onSave(this.model);\n this.render();\n PJQ.notifications.notify.successNotify({\n message: 'Meeting saved successfully'\n });\n }, this)\n })\n }\n }, this)\n });\n\n if (this.model.get('statusId') === PJQ.constants.meetings.meetingStatus.DRAFT || this.model.get('statusId') === PJQ.constants.meetings.meetingStatus.SCHEDULED) {\n this.attendeePicker = new PJQ.views.contacts.ContactsSelectInput({\n el: this.$('.meeting-attendees'),\n selectedContact: this.model.attendees.getAttendeeContacts(),\n isReadOnly: !this.options.canEdit,\n displayContactsBlock: true,\n context: PJQ.app.session.project ? PJQ.constants.contacts.contexts.PROJECTCONTACTS : PJQ.constants.contacts.contexts.USERS,\n isSingleChoice: false,\n onChange: _.bind(function (selectedContacts) {\n let arr = _.map(selectedContacts, function (contact) {\n return contact.get('id') ? contact.get('id') : contact.id;\n });\n this.model.set('attendeeIds', arr);\n this.model.attendees = new PJQ.collections.meetings.MeetingAttendees(_.map(selectedContacts, function (contact) {\n return new PJQ.models.meetings.MeetingAttendee({\n id: contact.id,\n attendee: contact\n });\n }, this));\n\n this.model.isDirty = true;\n }, this)\n });\n } else {\n this.renderAttendanceDatatable();\n }\n\n this.fileUploader = new PJQ.views.files.FileUploaderGrid({\n el: this.$('.meeting-file-uploader'),\n collection: this.model.attachments,\n canUpload: this.options.canEdit,\n useApiV2: true,\n canView: false,\n canDelete: this.options.isAdmin && this.model.get('statusId') !== PJQ.constants.meetings.meetingStatus.CONCLUDED && this.model.get('statusId') !== PJQ.constants.meetings.meetingStatus.CANCELLED,\n previewImageDimension: 150,\n onSuccess: _.bind(function (file) {\n this.model.isDirty = true;\n }, this),\n onDelete: _.bind(function (attachment, callback) {\n if (attachment.get('id') > 0) {\n attachment.set('delete', true);\n } else {\n attachment.destroy();\n }\n\n this.model.isDirty = true;\n callback();\n }, this)\n })\n\n this.recordingUploader = new PJQ.views.files.FileUploaderGrid({\n el: this.$('.meeting-recording-uploader'),\n allowedExtensions: ['wav', 'mpeg', 'mp3', 'webm'],\n collection: this.model.meetingRecordings,\n maxFiles: 1,\n canUpload: this.options.canUploadRecording && _.size(this.model.meetingRecordings) === 0,\n useApiV2: true,\n canDelete: this.options.isAdmin && this.model.get('statusId') !== PJQ.constants.meetings.meetingStatus.CONCLUDED && this.model.get('statusId') !== PJQ.constants.meetings.meetingStatus.CANCELLED,\n previewImageDimension: 150,\n onSuccess: _.bind(function (file) {\n this.model.isDirty = true;\n }, this),\n onDelete: _.bind(function (attachment, callback) {\n if (attachment.get('id') > 0) {\n attachment.set('delete', true);\n this.model.save(null, {\n success: _.bind(function (model) {\n this.options.canUploadRecording = false;\n this.render();\n }, this)\n });\n } else {\n attachment.destroy();\n this.options.canUploadRecording = false;\n this.render();\n }\n\n this.model.isDirty = true;\n callback();\n }, this)\n })\n },\n renderAttendanceDatatable: function () {\n this.attendanceTable = new PJQ.views.dataTables.DataTable({\n el: this.$('.meeting-attendees'),\n isHideSearch: true,\n data: this.model.attendees.models,\n rowId: \"cid\",\n order: [0, 'asc'],\n pageLength: 10,\n language: {\n zeroRecords: 'No Scheduled Attendees'\n },\n columns: [\n {\n \"data\": \"attributes.attendee\",\n \"title\": \"Name\",\n \"render\": (data, type, row) => {\n let result = '';\n if (row.attendee != null) {\n result = PJQ.helpers.contacts.getContactAnchor({\n id: row.attendee.id,\n name: row.attendee.get('contactName')\n });\n }\n return result;\n }\n },\n {\n \"data\": \"attributes.attendee\",\n \"title\": \"Company\",\n \"render\": (data, type, row) => {\n let result = '';\n if (row.attendee != null) {\n return row.attendee.get('companyName');\n }\n return result;\n }\n },\n {\n \"data\": \"attributes.isPresent\",\n \"title\": \"Present\",\n \"width\": \"7%\",\n \"render\": (data, type, row) => {\n let html = ''\n if (this.model.get('statusId') === PJQ.constants.meetings.meetingStatus.IN_PROGRESS && (!PJQ.app.session.project || PJQ.app.session.project.hasPermission('meetings.canEdit'))) {\n html = '
';\n } else {\n html = data ? '' : '';\n }\n\n return '
' + (html) + '
'\n }\n },\n {\n \"data\": \"attributes.isAbsent\",\n \"title\": \"Absent\",\n \"width\": \"7%\",\n \"render\": (data, type, row) => {\n let html = ''\n if (this.model.get('statusId') === PJQ.constants.meetings.meetingStatus.IN_PROGRESS && (!PJQ.app.session.project || PJQ.app.session.project.hasPermission('meetings.canEdit'))) {\n html = '
';\n } else {\n html = data ? '' : '';\n }\n\n return '
' + (html) + '
'\n }\n },\n {\n \"data\": \"attributes.isDistribution\",\n \"title\": \"For Distribution Only\",\n \"width\": \"18%\",\n \"render\": (data, type, row) => {\n let html = ''\n if (this.model.get('statusId') === PJQ.constants.meetings.meetingStatus.IN_PROGRESS && (!PJQ.app.session.project || PJQ.app.session.project.hasPermission('meetings.canEdit'))) {\n html = '
';\n } else {\n html = data ? '' : '';\n }\n\n return '
' + (html) + '
'\n }\n },\n ]\n });\n },\n toggleAttendance: function (e) {\n let target = $(e.currentTarget),\n attribute = target.data('attribute'),\n attendee = this.attendanceTable.getRow(target.closest('tr')).data();\n\n attendee.set({\n isPresent: attribute === 'isPresent',\n isAbsent: attribute === 'isAbsent',\n isDistribution: attribute === 'isDistribution'\n });\n },\n viewTranscription: function () {\n let recordings = _.filter(this.model.meetingRecordings.models, function (recording) {\n return !recording.get('delete')\n }, this),\n recording = recordings[0];\n\n new PJQ.views.meetings.ViewMeetingTranscriptionModal({\n model: recording,\n meeting: this.model\n });\n },\n numbersOnly: function (e) {\n return PJQ.helpers.inputHelpers.numbersOnly(e, false, false);\n },\n renderAgendaItems: function () {\n let categories = _.sortBy(this.model.categories.models, function (c) {\n return c.id == null ? -1 : c.id;\n }),\n categoryIds = [],\n hasUncategorizedItems = this.model.agendaItems.findWhere({categoryId: null}) != null;\n _.each(categories, _.bind(function (c) {\n if (c.id > 0 || null != this.model.agendaItems.findWhere({categoryId: c.id})) {\n categoryIds.push(c.id);\n }\n }, this));\n\n this.renderSubTemplate(false, this.options.subTemplates.agendaItems, this.$('.meeting-agenda'), {\n subTemplates: this.options.subTemplates,\n items: this.model.agendaItems.models,\n meetings: this.options.meetings,\n categories: categories,\n settings: this.settings,\n meeting: this.model,\n canEdit: this.options.canEdit,\n canDelete: this.options.canDelete,\n canEditMinutes: this.options.canEditMinutes,\n }, _.bind(function (el) {\n _.each(this.model.agendaItems.models, function (model) {\n let category = this.model.categories.get(model.get('categoryId')),\n agendaNumber;\n\n if (category) {\n let sortNumber = hasUncategorizedItems ? category.get('sortOrder') + 1 : category.get('sortOrder');\n agendaNumber = sortNumber + \".\" + model.get('sortOrder');\n } else {\n agendaNumber = \"1.\" + model.get('sortOrder');\n }\n\n this.renderAgendaItem(model, agendaNumber);\n }, this);\n }, this));\n\n\n if (this.options.canEdit) {\n let categorySortable = new PJQ.Sortable(this.$('.agenda-items-container'), {\n items: '.category-dropdown',\n multiple: false,\n tolerance: 'pointer',\n handle: '.category-sort',\n onStart: () => {\n this.$('.collapse').hide();\n categorySortable.refreshPositions();\n },\n onStop: (e, ui) => {\n this.setCategorySort(ui.item);\n }\n });\n\n let agendaSortable = new PJQ.Sortable(this.$('.collapse'), {\n items: '.agenda-item-outer',\n multiple: false,\n tolerance: 'pointer',\n handle: '.agenda-item-sort',\n onStart: () => {\n agendaSortable.refreshPositions();\n },\n onStop: (e, ui) => {\n this.setAgendaItemSort(ui.item);\n }\n });\n }\n },\n setAgendaItemSort: function (sortedEl) {\n let sortOrder = 1,\n collapseEl = this.$(sortedEl).closest('.collapse'),\n sortedCid = this.$(sortedEl).data('cid'),\n sortedItem = this.model.agendaItems.get(sortedCid),\n updateSort = false;\n\n _.each(collapseEl.find('.agenda-item-outer'), function (element) {\n let itemCid = this.$(element).data('cid');\n let agendaItem = this.model.agendaItems.get(itemCid);\n\n if (agendaItem) {\n if (agendaItem === sortedItem && sortedItem.get('sortOrder') !== sortOrder) {\n updateSort = true;\n }\n\n agendaItem.set('sortOrder', sortOrder);\n sortOrder++;\n }\n }, this);\n\n if (updateSort) {\n sortedItem.updateSort();\n }\n\n this.renderAgendaItems();\n },\n setCategorySort: function (sortedEl) {\n let categories = this.model.categories.models,\n sortOrder = 1,\n sortedCid = this.$(sortedEl).data('cid'),\n sortedCategory = this.model.categories.get(sortedCid),\n updateSort = false;\n\n _.each(this.$('.category-dropdown'), function (category) {\n let cid = this.$(category).data('cid'),\n model = _.find(categories, function (c) {\n return c.cid === cid;\n });\n\n if (model) {\n if (model === sortedCategory && model.get('sortOrder') !== sortOrder) {\n updateSort = true;\n }\n\n model.set('sortOrder', sortOrder);\n sortOrder++;\n }\n });\n\n if (updateSort) {\n sortedCategory.updateSort();\n }\n this.renderAgendaItems();\n },\n renderAgendaItem: function (agendaItem, agendaNumber) {\n if (!agendaNumber && agendaItem.agendaNumber != null) {\n agendaNumber = agendaItem.agendaNumber;\n }\n agendaItem.agendaNumber = agendaNumber;\n\n let $item = this.$('.agenda-item-outer[data-cid=\"' + agendaItem.cid + '\"]');\n this.renderSubTemplate(false, this.options.subTemplates.agendaItem, $item, {\n model: agendaItem,\n canEdit: this.options.canEdit,\n settings: this.settings,\n canEditMinutes: this.options.canEditMinutes,\n canDelete: this.options.canDelete,\n agendaNumber: agendaItem.agendaNumber,\n meetings: this.options.meetings,\n }, _.bind(function (el) {\n let $agendaItemEl = el.find('.agenda-item-container[data-cid=\"' + (agendaItem.cid) + '\"]');\n\n if (agendaItem.get('isEditing')) {\n agendaItem.minutesEditor = new PJQ.inputs.HTMLEditor({\n el: $agendaItemEl.find('.meeting-minutes-edit'),\n defaultValue: agendaItem.get('minutes'),\n editorHeight: 100,\n isHideTokens: true,\n onChange: (val) => {\n agendaItem.set('minutes', val);\n }\n });\n\n el.find('.note-editor').addClass('wd-100');\n }\n\n\n agendaItem.fileUploader = new PJQ.views.files.FileUploaderGrid({\n el: $agendaItemEl.find('.agenda-item-attachments'),\n collection: agendaItem.attachments,\n canUpload: this.options.canEditMinutes,\n useApiV2: true,\n canView: false,\n canDelete: this.options.isAdmin,\n previewImageDimension: 150,\n onSuccess: _.bind(function (file) {\n agendaItem.isDirty = true;\n }, this),\n onDelete: (attachment, callback) => {\n if (attachment.get('id') > 0) {\n attachment.set('delete', true);\n } else {\n attachment.destroy();\n }\n\n agendaItem.isDirty = true;\n callback();\n }\n })\n }, this));\n },\n categoryClicked: function (e) {\n let dropdown = $(e.currentTarget),\n cid = dropdown.data('cid'),\n category = this.model.categories.get(cid),\n collapse = dropdown.next('.collapse'),\n caret = dropdown.find('.category-caret')\n\n if (!collapse.hasClass('show')) {\n caret.find('i').removeClass('fa-caret-right').addClass('fa-caret-down')\n category.set('isExpanded', true);\n } else {\n caret.find('i').removeClass('fa-caret-down').addClass('fa-caret-right')\n category.set('isExpanded', false);\n }\n },\n editMeetingMinutes: function (e) {\n let $agendaItemContainer = $(e.currentTarget).closest('.agenda-item-container'),\n cid = $agendaItemContainer.data('cid'),\n agendaItem = this.model.agendaItems.get(cid);\n\n agendaItem.set('isEditing', true);\n this.renderAgendaItems();\n },\n exportMeeting: function () {\n let callback = _.bind(function () {\n PJQ.files.downloadFile(PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'meetings',\n value: this.model.get('id')\n },\n {\n endpoint: 'export',\n }\n ]), {isAPIv2: true});\n\n this.renderAgendaItems();\n }, this);\n\n if (this.options.canEdit) {\n this.save(callback);\n } else {\n callback();\n }\n },\n distributeAgendaItems: function () {\n let isMinutes = this.model.get('statusId') === PJQ.constants.meetings.meetingStatus.CONCLUDED || this.model.get('statusId') === PJQ.constants.meetings.meetingStatus.IN_PROGRESS;\n new PJQ.views.modals.YesNo({\n header: \"Distribute \" + (isMinutes ? \"Meeting Minutes?\" : \"Meeting Agenda?\"),\n body: \"This will email all attendees the \" + (isMinutes ? \"meeting minutes\" : \"agenda\") + \" for this meeting. Would you like to continue?\",\n onYes: _.bind(function () {\n this.model.save(null, {\n success: _.bind(function () {\n new PJQ.ajax.Request({\n isAPIv2: true,\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'meetings',\n value: this.model.get('id')\n },\n {\n endpoint: 'email'\n }\n ]),\n }).post().done(_.bind(function (response) {\n PJQ.notifications.notify.successNotify({\n message: 'Successfully distributed'\n });\n }, this)).fail(_.bind(function (xhr, err, result) {\n PJQ.notifications.notify.errorNotify({\n message: \"Encountered an error while distributing this meeting. Please contact customer service.\"\n });\n }, this));\n }, this)\n }, this)\n }, this)\n });\n },\n saveMeetingMinutesClicked: function (e) {\n let $agendaItemContainer = $(e.currentTarget).closest('.agenda-item-container'),\n cid = $agendaItemContainer.data('cid'),\n agendaItem = this.model.agendaItems.get(cid);\n this.saveMeetingMinutes(agendaItem);\n this.renderAgendaItems();\n },\n saveMeetingMinutes: function (agendaItem) {\n if (agendaItem == null || agendaItem.minutesEditor == null) {\n return;\n }\n\n agendaItem.save({\n minutes: agendaItem.minutesEditor.getValue(),\n isEditing: false\n });\n },\n saveOpenMinutes: function () {\n _.each(this.model.agendaItems.models, (agendaItem) => {\n if (agendaItem.get('isEditing') !== true) {\n return;\n }\n\n this.saveMeetingMinutes(agendaItem);\n });\n this.renderAgendaItems();\n },\n cancelMeetingMinutes: function (e) {\n let $agendaItemContainer = $(e.currentTarget).closest('.agenda-item-container'),\n cid = $agendaItemContainer.data('cid'),\n agendaItem = this.model.agendaItems.get(cid);\n\n agendaItem.set('isEditing', false);\n this.renderAgendaItems();\n },\n addCategoryClicked: function (e) {\n let category = new PJQ.models.meetings.MeetingCategory({\n meetingId: this.model.id\n })\n\n this.editCategory(category);\n },\n editCategoryClicked: function (e) {\n e.stopPropagation();\n\n let target = $(e.currentTarget),\n dropdown = target.closest('.category-dropdown'),\n cid = dropdown.data('cid'),\n category = this.model.categories.get(cid);\n\n this.editCategory(category);\n },\n deleteCategoryClicked: function (e) {\n e.stopPropagation();\n\n let target = $(e.currentTarget),\n dropdown = target.closest('.category-dropdown'),\n cid = dropdown.data('cid'),\n category = this.model.categories.get(cid);\n\n this.deleteCategory(category);\n },\n editCategory: function (category) {\n new PJQ.views.meetings.CategoryEditModal({\n meeting: this.model,\n model: category,\n onDelete: _.bind(function (category) {\n this.model.categories.remove(category);\n this.renderAgendaItems();\n }, this),\n onSave: _.bind(function (category, isNew) {\n if (isNew) {\n this.model.categories.add(category);\n }\n this.renderAgendaItems();\n }, this)\n });\n },\n deleteCategory: function (category) {\n new PJQ.views.modals.DeleteCancel({\n header: \"Confirm Delete\",\n body: \"Are you sure you want to delete this category? This will also delete any items in the category.\",\n onDelete: _.bind(function () {\n category.destroy({\n success: _.bind(function () {\n this.model.agendaItems.remove(_.filter(this.model.agendaItems.models, function (model) {\n return model.get('categoryId') === category.id;\n }, this));\n this.model.categories.remove(category);\n this.renderAgendaItems();\n }, this)\n })\n }, this)\n });\n },\n addAgendaItemClicked: function (e) {\n e.stopPropagation();\n let categoryId = $(e.currentTarget).data('category-id'),\n categoryAgendaItems = this.model.agendaItems.where({categoryId: categoryId == null ? null : categoryId});\n\n let agendaItem = new PJQ.models.meetings.AgendaItem({\n meetingId: this.model.id,\n priorityId: 1,\n statusId: 1,\n categoryId: categoryId && categoryId !== '' ? parseInt(categoryId) : null,\n sortOrder: _.size(categoryAgendaItems) + 1\n });\n\n this.editAgendaItem(agendaItem);\n },\n closeAgendaItemClicked: function (e) {\n let $agendaItemContainer = $(e.currentTarget).closest('.agenda-item-container'),\n cid = $agendaItemContainer.data('cid'),\n agendaItem = this.model.agendaItems.get(cid);\n agendaItem.set('statusId', PJQ.constants.meetings.meetingAgendaStatus.CLOSED);\n agendaItem.save();\n this.renderAgendaItem(agendaItem);\n },\n openAgendaItemClicked: function (e) {\n let $agendaItemContainer = $(e.currentTarget).closest('.agenda-item-container'),\n cid = $agendaItemContainer.data('cid'),\n agendaItem = this.model.agendaItems.get(cid);\n agendaItem.set('statusId', PJQ.constants.meetings.meetingAgendaStatus.OPEN);\n agendaItem.save();\n this.renderAgendaItem(agendaItem);\n },\n editAgendaItemClicked: function (e) {\n let $agendaItemContainer = $(e.currentTarget).closest('.agenda-item-container'),\n cid = $agendaItemContainer.data('cid'),\n agendaItem = this.model.agendaItems.get(cid);\n this.editAgendaItem(agendaItem);\n },\n editAgendaItem: function (agendaItem) {\n new PJQ.views.meetings.AgendaItemEditModal({\n meeting: this.model,\n model: agendaItem,\n onDelete: _.bind(function (agendaItem) {\n this.model.agendaItems.remove(agendaItem);\n this.renderAgendaItems();\n }, this),\n onSave: _.bind(function (agendaItem, isNew) {\n if (isNew) {\n this.model.agendaItems.add(agendaItem);\n this.renderAgendaItems();\n } else {\n this.renderAgendaItems();\n }\n }, this)\n });\n },\n deleteAgendaItemClicked: function (e) {\n let $agendaItemContainer = $(e.currentTarget).closest('.agenda-item-container'),\n cid = $agendaItemContainer.data('cid'),\n agendaItem = this.model.agendaItems.get(cid);\n this.deleteAgendaItem(agendaItem);\n },\n deleteAgendaItem: function (agendaItem) {\n new PJQ.views.modals.DeleteCancel({\n header: \"Confirm Delete\",\n body: \"Are you sure you want to delete this agenda item?\",\n onDelete: _.bind(function () {\n this.model.agendaItems.remove(agendaItem);\n agendaItem.destroy();\n this.renderAgendaItems();\n }, this)\n });\n },\n validate: function () {\n let isValid = true;\n\n if (this.meetingCustomFieldsForm != null && !this.meetingCustomFieldsForm.validate()) {\n isValid = false;\n }\n\n let $meetingName = this.$('.meeting-name');\n PJQ.helpers.inputHelpers.setInputError($meetingName, true);\n if (this.model.get('name') == null || this.model.get('name').length === 0) {\n PJQ.helpers.inputHelpers.setInputError($meetingName, false);\n isValid = false;\n }\n\n let $meetingNumber = this.$('.meeting-number');\n PJQ.helpers.inputHelpers.setInputError($meetingNumber, true);\n if (this.model.get('number') == null || this.model.get('number').length === 0) {\n PJQ.helpers.inputHelpers.setInputError($meetingNumber, false);\n isValid = false;\n }\n\n let $meetingDate = this.$('.meeting-date');\n PJQ.helpers.inputHelpers.setInputError($meetingDate, true);\n if (PJQ.app.session.project && (this.model.get('date') == null || this.model.get('date').length === 0)) {\n PJQ.helpers.inputHelpers.setInputError($meetingDate, false);\n isValid = false;\n }\n\n let $meetingStartTime = this.$('.meeting-start-time');\n PJQ.helpers.inputHelpers.setInputError($meetingStartTime, true);\n if (this.model.get('startTime') == null || this.model.get('startTime').length === 0) {\n PJQ.helpers.inputHelpers.setInputError($meetingStartTime, false);\n isValid = false;\n }\n\n let $meetingEndTime = this.$('.meeting-end-time');\n PJQ.helpers.inputHelpers.setInputError($meetingEndTime, true);\n if (this.model.get('endTime') == null || this.model.get('endTime').length === 0) {\n PJQ.helpers.inputHelpers.setInputError($meetingEndTime, false);\n isValid = false;\n }\n return isValid;\n },\n saveMeeting: function () {\n let isNew = this.model.isNew(),\n callback = _.bind(function () {\n PJQ.notifications.notify.successNotify({\n message: 'Meeting saved successfully'\n });\n\n if (typeof this.options.onSave === 'function')\n this.options.onSave(this.model, isNew);\n\n if (!isNew) {\n this.removeModal();\n } else {\n this.render();\n }\n }, this);\n\n this.saveOpenMinutes();\n this.save(callback, isNew);\n },\n save: function (callback, isNew) {\n if (!this.validate()) {\n return;\n }\n\n if (this.fileUploader.isUploading() || this.recordingUploader.isUploading()) {\n new PJQ.views.BaseModal({\n header: \"Files Uploading\",\n body: \"You can't save while files are uploading\"\n });\n return;\n }\n\n if (!this.model.get('attendeeIds')) {\n this.model.set('attendeeIds', []);\n }\n\n this.model.set('customFieldValues', this.meetingCustomFieldsForm != null ? this.meetingCustomFieldsForm.getChanged() : null);\n\n this.model.save(null, {\n success: _.bind(function () {\n if (typeof callback === 'function') {\n callback();\n }\n }, this),\n error: _.bind(function () {\n PJQ.notifications.notify.errorNotify({\n message: \"Encountered an error while saving this Meeting. Please contact customer service.\"\n });\n }, this)\n })\n },\n deleteMeeting: function () {\n let meetingId = this.model.id;\n new PJQ.views.modals.DeleteCancel({\n header: \"Confirm Delete\",\n body: \"Are you sure you want to delete this meeting?\",\n onDelete: _.bind(function () {\n this.model.destroy();\n if (typeof this.options.onDelete === 'function') {\n this.options.onDelete();\n this.removeModal();\n }\n }, this)\n });\n },\n close: function () {\n let editPerms = PJQ.app.session.project.hasPermission('meetings.canEdit');\n if ((this.model.hasChanged() || 0 < _.size(this.model.agendaItems.getChangedModels())) && editPerms) {\n new PJQ.views.modals.SaveDontSave({\n header: \"Unsaved Changes\",\n body: \"Do you want to save changes?\",\n onSave: _.bind(function () {\n this.saveMeeting();\n this.removeModal();\n }, this),\n onDontSave: _.bind(function () {\n this.removeModal();\n }, this)\n });\n } else {\n this.removeModal();\n }\n }\n});\n\nPJQ.views.meetings.AgendaItemEditModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.MEETINGS, 'modal-agenda-item-edit'),\n width: '65%',\n maxWidth: 800,\n model: null,\n isShowCloseButton: true,\n onSave: _.noop(),\n onDelete: _.noop()\n },\n events: {\n 'click .btn-save': 'saveAgendaItem',\n 'click .btn-delete': 'deleteAgendaItem',\n 'click .btn-close': 'close',\n 'input .agenda-item-description': 'descriptionChanged'\n },\n beforeModalCreated: async function () {\n this.isFetched = false;\n if (PJQ.app.session.project) {\n this.options.canEdit = PJQ.app.session.project.hasPermission('meetings.canEdit');\n this.options.isAdmin = PJQ.app.session.project.hasPermission('meetings.isAdmin');\n this.options.canDelete = this.options.isAdmin;\n } else {\n this.options.canEdit = true;\n this.options.isAdmin = true;\n this.options.canDelete = true;\n }\n\n if (!this.model) {\n this.model = new PJQ.models.meetings.AgendaItem();\n }\n\n if (this.options.project) {\n this.settings = await this.options.project.fetchMeetingSettings();\n } else {\n this.settings = await PJQ.app.session.fetchMeetingSettings();\n }\n this.isFetched = true;\n\n this.render();\n },\n beforeRender: function () {\n },\n renderData: function () {\n return {\n model: this.model,\n settings: this.settings,\n meeting: this.options.meeting,\n canEdit: this.options.canEdit,\n canDelete: this.options.canDelete,\n isAdmin: this.options.isAdmin,\n isFetched: this.isFetched,\n }\n },\n afterRender: function () {\n if (!this.isFetched)\n return;\n\n this.renderGeneral();\n },\n renderGeneral: function () {\n new PJQ.Binder(this.$el, this.model, {\n canEdit: !this.options.canEdit ? false : null,\n useDecimalPercentFields: true,\n watchElements: [\n 'input',\n 'textarea'\n ]\n });\n let defaultDate = PJQ.helpers.dateHelpers.getDateString(this.model.get('dueDate'), PJQ.helpers.dateHelpers.dateFormats.DATE_TIME, true);\n new PJQ.inputs.Datepicker({\n el: this.$('.due-date'),\n canEdit: this.options.canEdit,\n timezone: 'UTC',\n datepickerOptions: {\n format: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE,\n defaultDate: defaultDate\n },\n onChange: _.bind(function (newDate) {\n let currentDate = this.model.get('date');\n if (currentDate == null || PJQ.helpers.dateHelpers.getDateDaysDiff(newDate, new Date(currentDate)) !== 0) {\n this.model.set('dueDate', newDate);\n }\n }, this)\n });\n\n this.statusPicker = new PJQ.inputs.Selectpicker({\n el: this.$('.select-status'),\n defaultValue: this.model.get('statusId') != null ? this.model.get('statusId') : 1,\n canEdit: true,\n isMultiple: false,\n isIntChoices: true,\n onChange: _.bind(function (value) {\n let newStatus = value;\n this.model.set('statusId', newStatus);\n }, this)\n });\n\n if (!this.settings.get('disableAgendaItemPriority')) {\n this.priorityPicker = new PJQ.inputs.Selectpicker({\n el: this.$('.select-priority'),\n defaultValue: this.model.get('priorityId') != null ? this.model.get('priorityId') : 1,\n canEdit: true,\n isMultiple: false,\n isIntChoices: true,\n onChange: _.bind(function (value) {\n let newPriority = value;\n this.model.set('priorityId', newPriority);\n }, this)\n });\n }\n\n this.categoryPicker = new PJQ.inputs.Selectpicker({\n el: this.$('.select-category'),\n defaultValue: this.model.get('categoryId'),\n canEdit: true,\n isMultiple: false,\n isIntChoices: true,\n onChange: _.bind(function (value) {\n let newCategory = value;\n this.model.set('categoryId', newCategory);\n }, this)\n });\n\n this.assigneePicker = new PJQ.views.contacts.ContactsSelectInput({\n el: this.$('.agenda-assigned-to'),\n selectedContact: this.model.assignedTo,\n isReadOnly: !this.options.canEdit,\n displayContactsBlock: true,\n context: PJQ.app.session.project ? PJQ.constants.contacts.contexts.PROJECTCONTACTS : PJQ.constants.contacts.contexts.USERS,\n isSingleChoice: true,\n onChange: _.bind(function (selectedContact) {\n this.model.isDirty = true;\n this.model.assignedTo = selectedContact;\n this.model.set('assignedToId', selectedContact ? selectedContact.get('id') : null);\n }, this)\n });\n\n this.fileUploader = new PJQ.views.files.FileUploaderGrid({\n el: this.$('.agenda-item-file-uploader'),\n collection: this.model.attachments,\n canUpload: this.options.canEdit,\n useApiV2: true,\n canView: false,\n canDelete: this.options.isAdmin,\n previewImageDimension: 150,\n onSuccess: _.bind(function (file) {\n this.model.isDirty = true;\n }, this),\n onDelete: _.bind(function (attachment, callback) {\n if (attachment.get('id') > 0) {\n attachment.set('delete', true);\n } else {\n attachment.destroy();\n }\n\n this.model.isDirty = true;\n callback();\n }, this)\n })\n },\n descriptionChanged: function(e) {\n let $input = $(e.currentTarget),\n val = $input.val();\n\n if (typeof val === 'string' && val.length > 4000) {\n val = val.slice(0, 4000);\n $input.val(val);\n }\n\n this.model.set('description', val);\n },\n validate: function () {\n let isValid = true;\n\n let $agendaTitle = this.$('.agenda-item-title');\n PJQ.helpers.inputHelpers.setInputError($agendaTitle, true);\n if (this.model.get('title') == null || this.model.get('title').length === 0) {\n PJQ.helpers.inputHelpers.setInputError($agendaTitle, false);\n isValid = false;\n }\n\n return isValid;\n },\n saveAgendaItem: function () {\n if (!this.validate()) {\n return;\n }\n let isNew = this.model.isNew();\n let callback = _.bind(function () {\n if (typeof this.options.onSave === 'function')\n this.options.onSave(this.model, isNew);\n\n this.removeModal();\n }, this);\n\n this.save(callback);\n },\n save: function (callback) {\n if (this.fileUploader.isUploading()) {\n new PJQ.views.BaseModal({\n header: \"Files Uploading\",\n body: \"You can't save while files are uploading\"\n });\n return;\n }\n\n if (!this.model.get('assignedToId')) {\n this.model.set('assignedToId', 0);\n }\n\n this.model.save(null, {\n success: _.bind(function () {\n if (typeof callback === 'function') {\n callback();\n }\n }, this),\n error: _.bind(function () {\n PJQ.notifications.notify.errorNotify({\n message: \"Encountered an error while saving this category. Please contact customer service.\"\n });\n }, this)\n })\n },\n deleteAgendaItem: function () {\n let agendaItemId = this.model.id;\n new PJQ.views.modals.DeleteCancel({\n header: \"Confirm Delete\",\n body: \"Are you sure you want to delete this agenda item?\",\n onDelete: _.bind(function () {\n this.model.destroy();\n if (typeof this.options.onDelete === 'function')\n this.options.onDelete(this.model);\n\n this.removeModal();\n }, this)\n });\n },\n close: function () {\n this.removeModal();\n }\n});\n\nPJQ.views.meetings.CategoryEditModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.MEETINGS, 'modal-category-edit'),\n width: '40%',\n maxWidth: 600,\n model: null,\n isShowCloseButton: true,\n onSave: _.noop(),\n onDelete: _.noop()\n },\n events: {\n 'click .btn-save': 'saveCategory',\n 'click .btn-delete': 'deleteCategory',\n 'click .btn-close': 'close',\n },\n beforeModalCreated: function () {\n if (PJQ.app.session.project) {\n this.options.canEdit = PJQ.app.session.project.hasPermission('meetings.canEdit');\n this.options.isAdmin = PJQ.app.session.project.hasPermission('meetings.isAdmin');\n this.options.canDelete = this.options.isAdmin;\n } else {\n this.options.canEdit = true;\n this.options.isAdmin = true;\n this.options.canDelete = true;\n }\n\n this.isFetched = false;\n\n if (!this.model) {\n this.model = new PJQ.models.meetings.MeetingCategory();\n }\n\n if (!this.model.isNew() && !this.model.isFetched) {\n this.model.fetch({\n success: _.bind(function () {\n this.isFetched = true;\n this.render();\n }, this)\n });\n } else {\n this.isFetched = true;\n this.render();\n }\n },\n beforeRender: function () {\n },\n renderData: function () {\n return {\n model: this.model,\n meeting: this.options.meeting,\n canEdit: this.options.canEdit,\n canDelete: this.options.canDelete,\n isAdmin: this.options.isAdmin,\n isFetched: this.isFetched,\n }\n },\n afterRender: function () {\n if (!this.isFetched)\n return;\n\n new PJQ.Binder(this.$el, this.model, {\n canEdit: !this.options.canEdit ? false : null,\n watchElements: [\n 'input',\n ]\n });\n },\n validate: function () {\n let isValid = true;\n\n let $categoryName = this.$('.category-name');\n PJQ.helpers.inputHelpers.setInputError($categoryName, true);\n if (this.model.get('name') == null || this.model.get('name').length === 0) {\n PJQ.helpers.inputHelpers.setInputError($categoryName, false);\n isValid = false;\n }\n\n return isValid;\n },\n saveCategory: function () {\n if (!this.validate()) {\n return;\n }\n let isNew = this.model.isNew();\n let callback = _.bind(function () {\n PJQ.notifications.notify.successNotify({\n message: 'Category saved successfully'\n });\n\n if (typeof this.options.onSave === 'function')\n this.options.onSave(this.model, isNew);\n\n this.removeModal();\n }, this);\n\n this.save(callback);\n },\n save: function (callback) {\n this.model.save(null, {\n success: _.bind(function () {\n if (typeof callback === 'function') {\n callback();\n }\n }, this),\n error: _.bind(function () {\n PJQ.notifications.notify.errorNotify({\n message: \"Encountered an error while saving this category. Please contact customer service.\"\n });\n }, this)\n })\n },\n deleteCategory: function () {\n new PJQ.views.modals.DeleteCancel({\n header: \"Confirm Delete\",\n body: \"Are you sure you want to delete this category? This will also delete any items in the category.\",\n onDelete: _.bind(function () {\n this.model.destroy({\n success: _.bind(function () {\n if (typeof this.options.onDelete === 'function')\n this.options.onDelete(this.model);\n\n this.removeModal();\n }, this),\n error: _.bind(function () {\n PJQ.notifications.notify.errorNotify({\n message: 'Something went wrong!'\n });\n this.removeModal();\n }, this)\n });\n }, this)\n });\n },\n close: function () {\n if (this.model.hasChanged() && this.options.canEdit) {\n new PJQ.views.modals.SaveDontSave({\n header: \"Unsaved Changes\",\n body: \"Do you want to save changes?\",\n onSave: _.bind(function () {\n this.saveCategory();\n this.removeModal();\n }, this),\n onDontSave: _.bind(function () {\n this.removeModal();\n }, this)\n });\n } else {\n this.removeModal();\n }\n }\n});\n\nPJQ.views.meetings.ViewMeetingTranscriptionModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.MEETINGS, 'modal-view-transcription'),\n width: '50%',\n maxWidth: 800,\n model: null,\n isShowCloseButton: true,\n },\n events: {\n 'click .btn-close': 'close',\n 'click .btn-transcribe': 'transcribeMeeting'\n },\n beforeRender: function () {\n\n },\n renderData: function () {\n return {\n recording: this.model,\n meeting: this.options.meeting\n }\n },\n afterRender: function () {\n\n },\n transcribeMeeting: function () {\n this.loader = new PJQ.Loader(this.$('.generate-transcription-div'));\n new PJQ.ajax.Request({\n isAPIv2: true,\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'meetings',\n value: this.options.meeting.id\n },\n {\n endpoint: 'transcribe'\n }\n ]),\n }).get().done(_.bind(function (response) {\n this.model.set('transcriptions', [response]);\n this.loader.remove()\n PJQ.notifications.notify.successNotify({\n message: 'Recording successfully transcribed'\n });\n this.render();\n }, this)).fail(_.bind(function (xhr, err, result) {//todo: error\n }, this));\n },\n close: function () {\n this.removeModal();\n }\n});","// Models\nPJQ.models.meetings.Meeting = PJQ.models.BaseModel.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'id',\n endpoint: function () {\n if (this.isNew() && this.get('projectId')) {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'projects',\n value: this.get('projectId')\n },\n {\n endpoint: 'meetings',\n value: this.id\n }\n ]);\n } else if (this.isNew() && this.get('templateId')) {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'meetings'\n },\n {\n endpoint: 'templates',\n value: this.get('templateId')\n },\n {\n endpoint: 'meeting'\n }\n ]);\n } else {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'meetings',\n value: this.id\n }\n ]);\n }\n },\n parse: function (model) {\n if (!model)\n return model;\n\n this.attachments = new PJQ.collections.meetings.Attachments(model.attachments);\n this.meetingRecordings = new PJQ.collections.meetings.Attachments(model.meetingRecordingAttachments);\n this.agendaItems = new PJQ.collections.meetings.AgendaItems(model.agendaItems);\n this.categories = new PJQ.collections.meetings.MeetingCategories(model.categories);\n this.attendees = new PJQ.collections.meetings.MeetingAttendees(model.attendees);\n\n let noCategory = new PJQ.models.meetings.MeetingCategory({\n meetingId: this.id,\n id: null,\n name: 'No Category'\n });\n\n this.categories.add(noCategory);\n\n return model;\n },\n beforeSave: function () {\n let agendaItems = this.agendaItems.getChangedModels();\n _.each(agendaItems, function (agendaItem) {\n agendaItem.beforeSave();\n }, this);\n\n this.set({\n attachments: this.attachments,\n meetingRecordingAttachments: this.meetingRecordings,\n attendees: this.attendees,\n agendaItems: agendaItems,\n categories: this.categories.filter(function (category) {\n return category.id !== null;\n })\n });\n },\n validateHyperlink: function () {\n let hyperlink = this.get('meetingLink'),\n urlPattern = /^(https?:\\/\\/)?([^\\s/$.?#].[^\\s]*)\\.[^\\s]+$/;\n\n if (!urlPattern.test(hyperlink)) {\n return false;\n }\n\n if (!hyperlink.startsWith(\"https://\")) {\n hyperlink = \"https://\" + hyperlink;\n }\n\n return hyperlink;\n },\n isToday: function () {\n if (this.get('date')) {\n return (new Date(this.get('date').replace('Z', ''))).setHours(0, 0, 0, 0) === (new Date()).setHours(0, 0, 0, 0);\n } else {\n return false;\n }\n },\n getDateAndTime: function (dataProp = 'start') {\n let meetingDate = PJQ.helpers.dateHelpers.parseDateString(this.get('date'), false);\n if (meetingDate == null) {\n return null;\n }\n\n let mTime;\n if (dataProp === 'end') {\n mTime = this.get('endTime')\n } else {\n mTime = this.get('startTime')\n }\n\n if (_.size(mTime) === 0) {\n return null;\n }\n\n\n let timeSplit = mTime.split(':');\n if (timeSplit.length < 2) {\n return null;\n }\n\n let hours = parseInt(timeSplit[0]),\n minutes = parseInt(timeSplit[1]);\n if (isNaN(hours) || isNaN(minutes)) {\n return null;\n }\n\n meetingDate.setHours(hours, minutes);\n return meetingDate;\n },\n isOverdue: function () {\n let mDateTime = this.getDateAndTime();\n if (mDateTime == null) {\n return false;\n }\n\n return this.get('statusId') === PJQ.constants.meetings.meetingStatus.SCHEDULED && this.getDateAndTime() < new Date();\n },\n durationInMinutes: function () {\n let startDateTime = this.getDateAndTime(),\n endDateTime = this.getDateAndTime('end');\n\n if (startDateTime == null || endDateTime == null) {\n return null;\n }\n\n return PJQ.helpers.dateHelpers.getDateDiff(endDateTime, startDateTime, 'minutes');\n }\n});\n\nPJQ.models.meetings.CustomField = PJQ.models.customFields.CustomField.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'id',\n endpoint: function () {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'meetings'\n },\n {\n endpoint: 'customfields',\n value: this.get('id')\n }\n ]);\n }\n});\n\nPJQ.models.meetings.CustomFieldChoice = PJQ.models.BaseModel.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'id',\n endpoint: function () {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'meetings'\n },\n {\n endpoint: 'customfields',\n value: this.get('customFieldId')\n },\n {\n endpoint: 'choices',\n value: this.get('id')\n }\n ]);\n }\n});\n\nPJQ.models.meetings.Settings = PJQ.models.BaseModel.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'settingId',\n endpoint: function () {\n if (this.options.projectId) {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'projects',\n value: this.options.projectId\n },\n {\n endpoint: 'meetings'\n },\n {\n endpoint: 'settings'\n }\n ]);\n } else {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'meetings'\n },\n {\n endpoint: 'settings'\n }\n ]);\n }\n }\n});\n\nPJQ.models.meetings.UserSettings = PJQ.models.BaseModel.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'settingId',\n endpoint: function () {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'meetings'\n },\n {\n endpoint: 'settings'\n },\n {\n endpoint: 'user'\n }\n ]);\n },\n getSettings: function (view) {\n return _.find(this.attributes.viewSettings, _.bind(function (setting) {\n return setting.view === view;\n }, this));\n }\n});\n\nPJQ.models.meetings.AgendaItem = PJQ.models.BaseModel.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'id',\n endpoint: function () {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'meetings',\n value: this.get('meetingId') ? this.get('meetingId') : this.options.meetingId\n },\n {\n endpoint: 'agendaitems',\n value: this.id\n }\n ]);\n },\n parse: function (model) {\n if (!model)\n return model;\n\n this.attachments = new PJQ.collections.meetings.Attachments(model.attachments);\n\n if (model && model.assignedTo) {\n if (model.assignedTo instanceof PJQ.models.BaseModel) {\n this.assignedTo = model.assignedTo;\n } else {\n this.assignedTo = new PJQ.models.contacts.Contact(model.assignedTo);\n }\n } else {\n this.assignedTo = null;\n }\n\n return model;\n },\n beforeSave: function () {\n this.set({\n attachments: this.attachments,\n assignedTo: this.assignedTo\n });\n },\n updateSort: function () {\n new PJQ.ajax.Request({\n endpoint: this.endpoint() + '/updatesort',\n isAPIv2: true,\n data: this.toJSON()\n }).put().done(_.bind(function (res) {\n\n }, this)).fail(_.bind(function (xhr, err, result) {\n\n }, this));\n }\n});\n\nPJQ.models.meetings.MeetingAttendee = PJQ.models.BaseModel.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'id',\n parse: function (model) {\n if (!model)\n return model;\n\n this.attendee = new PJQ.models.contacts.Contact(model.attendee);\n\n return model;\n },\n})\n\nPJQ.models.meetings.MeetingCategory = PJQ.models.BaseModel.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'id',\n endpoint: function () {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'meetings',\n value: this.get('meetingId') ? this.get('meetingId') : this.options.meetingId\n },\n {\n endpoint: 'categories',\n value: this.id\n }\n ]);\n },\n updateSort: function () {\n new PJQ.ajax.Request({\n endpoint: this.endpoint() + '/updatesort',\n isAPIv2: true,\n data: this.toJSON()\n }).put().done(_.bind(function (res) {\n\n }, this)).fail(_.bind(function (xhr, err, result) {\n\n }, this));\n }\n});\n\nPJQ.models.meetings.Template = PJQ.models.BaseModel.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'id',\n notifyName: 'Template',\n endpoint: function () {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'meetings'\n },\n {\n endpoint: 'templates',\n value: !this.get('projectId') ? this.id : null\n }\n ], this.get('projectId') > 0 ? [\n {\n parameter: 'projectId',\n value: this.get('projectId')\n },\n {\n parameter: 'copyAttendees',\n value: this.get('copyAttendees')\n },\n {\n parameter: 'copyAgendaItems',\n value: this.get('copyAgendaItems')\n },\n {\n parameter: 'copyCategories',\n value: this.get('copyCategories')\n },\n {\n parameter: 'copyAttachments',\n value: this.get('copyAttachments')\n },\n {\n parameter: 'overwriteExisting',\n value: this.get('overwriteExisting')\n }\n ] : null);\n },\n parse: function (model) {\n if (!model)\n return model;\n\n if (model.meetings) {\n this.meetings = new PJQ.collections.meetings.Meetings(model.meetings);\n } else {\n this.meetings = new PJQ.collections.meetings.Meetings();\n }\n\n return model;\n }\n});\n\nPJQ.models.meetings.Attachment = PJQ.models.files.File.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'id'\n});\n//Collections\n\nPJQ.collections.meetings.Meetings = PJQ.collections.BaseCollection.extend({\n defaults: {\n isAPIv2: true\n },\n model: PJQ.models.meetings.Meeting,\n endpoint: function () {\n let params = [];\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'projects',\n value: this.options.projectId\n },\n {\n endpoint: 'meetings'\n }\n ], params);\n },\n getOriginMeetings: function () {\n let originMeetings = new PJQ.collections.meetings.Meetings(),\n self = this,\n nonExistentOriginMeetings = [];\n\n // Create a map of all meeting ids for fast existence check\n let meetingIds = this.models.map(function (model) {\n return model.id;\n });\n\n _.each(this.models, function (model) {\n let originMeetingId = model.get('originMeetingId');\n\n // Add to originMeetings if originMeetingId is null\n if (!originMeetingId) {\n originMeetings.add(model);\n model.followUpMeetings = new PJQ.collections.meetings.Meetings();\n model.followUpMeetings.add(model);\n } else if (!meetingIds.includes(originMeetingId)) {\n // If origin meeting does not exist, add it to a separate list\n nonExistentOriginMeetings.push(model);\n }\n }, this);\n\n // Sort the nonExistentOriginMeetings by id\n nonExistentOriginMeetings.sort(function (a, b) {\n return a.id - b.id;\n });\n\n // Take the first (lowest id) of each originMeetingId group as originMeeting and the rest as followUpMeetings\n let groupedNonExistentOriginMeetings = _.groupBy(nonExistentOriginMeetings, function (model) {\n return model.get('originMeetingId');\n });\n _.each(groupedNonExistentOriginMeetings, function (group) {\n let originMeeting = group[0];\n originMeetings.add(originMeeting);\n originMeeting.followUpMeetings = new PJQ.collections.meetings.Meetings();\n\n _.each(group, function (followUpMeeting) {\n originMeeting.followUpMeetings.add(followUpMeeting);\n });\n });\n\n // For each originMeeting, find and add to its followUpMeetings the meetings whose originMeetingId is its id\n _.each(originMeetings.models, function (originMeeting) {\n _.each(self.models, function (model) {\n if (model.get('originMeetingId') === originMeeting.id) {\n originMeeting.followUpMeetings.add(model);\n }\n });\n });\n\n return originMeetings;\n },\n getMeetingCount: function (meetingId) {\n return _.size(this.get(meetingId).followUpMeetings);\n },\n getMeetingsFromOrigin: function (meeting) {\n let result = [],\n originMeetingId = meeting.get('originMeetingId');\n if (originMeetingId > 0) {\n result.push(...this.where({originMeetingId: originMeetingId}))\n } else {\n result.push(meeting);\n result.push(...this.where({originMeetingId: meeting.id}))\n }\n return result;\n }\n});\n\nPJQ.collections.meetings.Attachments = PJQ.collections.files.Files.extend({\n defaults: {\n isAPIv2: true\n },\n model: PJQ.models.meetings.Attachment,\n endpoint: function () {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'meetings',\n value: this.options.meetingId\n },\n {\n endpoint: 'attachments'\n }\n ]);\n }\n});\n\nPJQ.collections.meetings.MeetingCategories = PJQ.collections.BaseCollection.extend({\n defaults: {\n isAPIv2: true\n },\n model: PJQ.models.meetings.MeetingCategory,\n endpoint: function () {\n let params = [];\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'meetings',\n value: this.options.meetingId\n },\n {\n endpoint: 'categories'\n }\n ], params);\n }\n});\n\nPJQ.collections.meetings.AgendaItems = PJQ.collections.BaseCollection.extend({\n defaults: {\n isAPIv2: true\n },\n model: PJQ.models.meetings.AgendaItem,\n endpoint: function () {\n let params = [];\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'meetings',\n value: this.options.meetingId\n },\n {\n endpoint: 'agendaitems'\n }\n ], params);\n }\n});\n\nPJQ.collections.meetings.MeetingAttendees = PJQ.collections.BaseCollection.extend({\n defaults: {\n isAPIv2: true\n },\n model: PJQ.models.meetings.MeetingAttendee,\n getAttendeeContacts: function () {\n return _.map(this.models, function (model) {\n return model.attendee;\n });\n }\n});\n\nPJQ.collections.meetings.CustomFields = PJQ.collections.BaseCollection.extend({\n defaults: {\n isAPIv2: true\n },\n model: PJQ.models.meetings.CustomField,\n endpoint: function () {\n let params = [];\n if (this.options.projectId) {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'projects',\n value: this.options.projectId\n },\n {\n endpoint: 'meetings'\n },\n {\n endpoint: 'customfields'\n }\n ], params);\n } else {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'meetings'\n },\n {\n endpoint: 'customfields'\n }\n ], params);\n }\n }\n});\n\nPJQ.collections.meetings.CustomFieldChoices = PJQ.collections.BaseCollection.extend({\n defaults: {\n isAPIv2: true\n },\n model: PJQ.models.meetings.CustomFieldChoice\n});\n\nPJQ.collections.meetings.Templates = PJQ.collections.BaseCollection.extend({\n defaults: {\n isAPIv2: true\n },\n model: PJQ.models.meetings.Template,\n endpoint: function () {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'meetings'\n },\n {\n endpoint: 'templates'\n }\n ]);\n }\n});","PJQ.views.meetings.MeetingListDatatable = PJQ.views.dataTables.DataTable.extend({\n defaults: {\n language: {\n emptyTable: 'No Meetings'\n },\n subTemplates: {\n header: new PJQ.templating.Template(PJQ.constants.modules.MEETINGS, 'data-table-header-meetings')\n },\n paging: false\n },\n events: {},\n getColumns: function (includeAllColumns = false) {\n let columns = [],\n includeColumns = ['number', 'name', 'description', 'date', 'meetingTime', 'location', 'status'];\n\n this.options.order = [0, 'desc'];\n\n if (!includeAllColumns) {\n if (this.options.settings && _.size(this.options.settings.columns) > 0)\n includeColumns = this.options.settings.columns;\n else\n includeColumns = this.options.settings && this.options.settings.columnsDefault ? this.options.settings.columnsDefault : includeColumns;\n\n }\n\n _.each(includeColumns, _.bind(function (columnName) {\n switch (columnName) {\n case 'number':\n columns.push({\n \"columnData\": \"number\",\n \"data\": \"attributes.number\",\n \"title\": \"Number\",\n \"width\": \"20px\",\n \"render\": (data, type, row) => {\n if (type === 'sort' || type === 'type') {\n return data;\n }\n\n return '' + data + '';\n },\n });\n break;\n case 'name':\n columns.push({\n \"columnData\": \"name\",\n \"data\": \"attributes.name\",\n \"title\": \"Name\"\n });\n break;\n case 'description':\n columns.push({\n \"columnData\": \"description\",\n \"data\": \"attributes.description\",\n \"title\": \"Description\"\n });\n break;\n case 'date':\n columns.push({\n \"columnData\": \"date\",\n \"data\": \"attributes.date\",\n \"title\": 'Meeting Date',\n \"width\": '150px',\n \"render\": (data, type, row) => {\n if (_.size(data) === 0) {\n return '';\n }\n return PJQ.helpers.dateHelpers.getDateString(data, PJQ.helpers.dateHelpers.dateFormats.DATE, true)\n }\n });\n break;\n case 'meetingTime':\n columns.push({\n \"columnData\": \"meetingTime\",\n \"data\": \"\",\n \"title\": 'Meeting Time',\n \"width\": '150px',\n \"render\": (data, type, row) => {\n return this.parseTimeString(row.get('startTime')) + ' - ' + this.parseTimeString(row.get('endTime')) + ' ' + (row.get('timezone') ?? 'CDT');\n }\n });\n break;\n case 'status':\n columns.push({\n \"columnData\": \"status\",\n \"data\": \"attributes.statusId\",\n \"title\": \"Status\",\n \"width\": \"100px\",\n \"render\": (data, type, row) => {\n return PJQ.constants.meetings.meetingStatusNames[row.get('statusId')]\n }\n });\n break;\n default:\n if (columnName.startsWith('fieldValue') && this.customFields) {\n _.each(this.customFields.models, function (customField) {\n if (columnName === 'fieldValue' + customField.get('fieldNumber')) {\n columns.push({\n \"columnData\": 'fieldValue' + customField.get('fieldNumber'),\n \"title\": customField.get('name'),\n \"render\": function (data, type, row) {\n let fieldValue = row.getCustomFieldValue(customField.get('id'));\n fieldValue = (fieldValue !== null) ? fieldValue : '';\n switch (customField.get('fieldTypeId')) {\n case PJQ.constants.commitments.customFieldType.BOOLEAN:\n if (fieldValue != null)\n fieldValue = fieldValue ? 'Yes' : 'No';\n break;\n case PJQ.constants.commitments.customFieldType.CHOICE:\n let choices = [];\n // convert single choice value into array so that the logic below can work for both types.\n if (typeof fieldValue === 'number')\n fieldValue = [fieldValue];\n\n _.each(customField.choices.models, _.bind(function (choice) {\n if (_.find(fieldValue, function (value) {\n return value === choice.get('id');\n }))\n choices.push(choice.get('name'));\n }, this));\n\n fieldValue = choices.join((', '));\n break;\n case PJQ.constants.commitments.customFieldType.DATE:\n if (fieldValue) {\n if (type !== 'sort' && type !== 'type')\n fieldValue = PJQ.helpers.dateHelpers.getDateString(new Date(fieldValue), PJQ.helpers.dateHelpers.dateFormats.DATE, true);\n }\n if (fieldValue === undefined)\n fieldValue = '';\n\n break;\n case PJQ.constants.commitments.customFieldType.DATETIME:\n if (fieldValue) {\n if (type !== 'sort' && type !== 'type')\n fieldValue = PJQ.helpers.dateHelpers.getDateString(new Date(fieldValue), PJQ.helpers.dateHelpers.dateFormats.DATE_TIME, true);\n }\n if (fieldValue === undefined)\n fieldValue = '';\n\n break;\n case PJQ.constants.commitments.customFieldType.INTEGER:\n if (type !== 'sort' && type !== 'type' && fieldValue) {\n fieldValue = parseInt(fieldValue).toLocaleString();\n }\n break;\n case PJQ.constants.commitments.customFieldType.MONEY:\n if (type === 'sort' || type === 'type') {\n if (fieldValue && fieldValue !== '$')\n fieldValue = parseFloat(PJQ.helpers.formatHelpers.numbersOnly(fieldValue, true));\n else\n fieldValue = 0;\n } else {\n fieldValue = PJQ.helpers.formatHelpers.formatCurrency(parseInt(PJQ.helpers.formatHelpers.numbersOnly(fieldValue)));\n }\n break;\n case PJQ.constants.commitments.customFieldType.PERCENT:\n if (type === 'sort' || type === 'type') {\n if (fieldValue && fieldValue !== '$')\n fieldValue = parseFloat(PJQ.helpers.formatHelpers.numbersOnly(fieldValue / 100, true)).toFixed(2)\n else\n fieldValue = 0;\n } else {\n fieldValue = fieldValue ? parseFloat(PJQ.helpers.formatHelpers.numbersOnly(fieldValue / 100, true)).toFixed(2) + '%' : '';\n }\n\n break;\n }\n return fieldValue;\n }\n });\n }\n });\n }\n break;\n }\n }, this));\n\n if (!includeAllColumns) {\n columns.push({\n \"title\": '',\n \"render\": (data, type, row) => {\n let html = '
',\n status = row.get('statusId'),\n targetMeeting = row,\n originMeetingId = targetMeeting.get('originMeetingId'),\n originMeeting = originMeetingId ? targetMeeting.collection.get(originMeetingId) : targetMeeting,\n mostRecentMeeting = originMeeting ? _.max(originMeeting.followUpMeetings.models, function (model) {\n return model.id;\n }) : null;\n if (this.options.canViewMeetings) {\n html += '';\n }\n if (this.options.canDeleteMeetings && mostRecentMeeting === targetMeeting) {\n html += '';\n }\n html += '
'\n return html\n },\n \"orderable\": false,\n \"searchable\": false,\n \"width\": \"90px\",\n \"className\": \"text-center\",\n \"visible\": true\n });\n }\n\n return columns;\n },\n parseTimeString: function (timeString) {\n let timeArray = timeString.split(\":\"), // split the time string into an array\n time = new Date(),\n options = {hour: \"numeric\", minute: \"numeric\", hour12: true};\n time.setHours(timeArray[0]); // set the hours\n time.setMinutes(timeArray[1]); // set the minutes\n time.setSeconds(0); // set the seconds\n return time.toLocaleTimeString(\"en-US\", options);\n },\n getFilterData: function () {\n let result = this.options.data,\n statusFilter = this.getFilter('status');\n if (_.size(statusFilter) === 0) {\n return result;\n }\n\n return _.filter(result, function (row) {\n return _.contains(statusFilter, row.get('statusId'));\n });\n },\n});","PJQ.views.meetings.MeetingsList = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.MEETINGS, 'meetings-list'),\n subTemplates: {\n comments: new PJQ.templating.Template(PJQ.constants.modules.ACTIONITEMS, 'Action-Item-Comments'),\n contactBadge: new PJQ.templating.Template(PJQ.constants.modules.GLOBAL, 'Contacts-Select-Input-Contacts'),\n meeting: new PJQ.templating.Template(PJQ.constants.modules.MEETINGS, 'meeting'),\n },\n meetingId: null\n },\n events: {\n 'shown.bs.collapse .meeting-collapse': 'meetingExpanded',\n 'hidden.bs.collapse .meeting-collapse': 'meetingCollapsed',\n 'click .btn-settings': 'editSettings',\n 'keyup .meeting-search': 'searchChanged',\n 'click .clear-filters': 'clearFilters',\n 'click .btn-add-meeting': 'addMeetingClicked',\n 'click .btn-delete-meeting': 'deleteMeetingClicked',\n 'click .btn-view-meeting': 'viewMeetingClicked',\n 'click .meeting-dropdown': 'meetingClicked',\n 'click .btn-follow-up': 'followUpMeetingClicked',\n 'click .btn-import-template': 'importTemplate',\n 'click .btn-save-a-template': 'saveTemplate'\n },\n beforeFirstRender: async function () {\n this.isFetched = false;\n this.options.project = this.options.project ? this.options.project : PJQ.app.session.project;\n\n this.expandedMeetings = [];\n if (this.collection == null && PJQ.app.session.project) {\n this.collection = new PJQ.collections.meetings.Meetings(null, {\n projectId: PJQ.app.session.project.id\n });\n }\n this.isFetched = false;\n\n if (!this.collection.isFetched && this.options.project) {\n await this.collection.fetch();\n }\n this.originMeetings = this.collection.getOriginMeetings();\n\n this.isFetched = true;\n this.render();\n },\n beforeRender: function () {\n if (!this.isFetched)\n return;\n\n if (this.options.project) {\n this.options.canEdit = PJQ.app.session.project.hasPermission('meetings.isAdmin');\n this.options.canAdd = PJQ.app.session.project.hasPermission('meetings.canAdd');\n this.options.isAdmin = PJQ.app.session.project.hasPermission('meetings.isAdmin');\n this.options.canDelete = this.options.isAdmin;\n } else {\n this.options.canEdit = true;\n this.options.canAdd = true;\n this.options.isAdmin = true;\n this.options.canDelete = true;\n }\n },\n renderData: function () {\n return {\n isFetched: this.isFetched,\n meetings: this.collection,\n originMeetings: this.originMeetings,\n canEdit: this.options.canEdit,\n canAdd: this.options.canAdd,\n isAdmin: this.options.isAdmin,\n project: PJQ.app.session.project\n };\n },\n afterRender: function () {\n if (!this.isFetched)\n return;\n\n new PJQ.inputs.Selectpicker({\n el: this.$('.meeting-status-filter'),\n defaultValue: null,\n isIntChoices: true,\n isMultiple: true,\n noneSelectedText: 'No Filters',\n onChange: _.bind(function (value) {\n this.statusFilter = value;\n this.renderMeetings();\n }, this)\n });\n\n if (this.options.meetingId > 0) {\n let initMeeting = this.collection.get(this.options.meetingId);\n if (initMeeting != null) {\n this.viewMeeting(initMeeting);\n this.options.meetingId = null;\n }\n }\n\n this.renderMeetings();\n },\n meetingCollapsed: function (e) {\n let $target = $(e.currentTarget),\n cid = $target.data('cid'),\n meeting = this.collection.get(cid),\n originId = meeting.get('originMeetingId') > 0 ? meeting.get('originMeetingId') : meeting.id;\n this.expandedMeetings = _.without(this.expandedMeetings, originId);\n },\n meetingExpanded: function (e) {\n let $target = $(e.currentTarget),\n cid = $target.data('cid'),\n meeting = this.collection.get(cid),\n originId = meeting.get('originMeetingId') > 0 ? meeting.get('originMeetingId') : meeting.id;\n if (this.expandedMeetings.indexOf(originId) === -1) {\n this.expandedMeetings.push(originId);\n }\n },\n searchChanged: function (e) {\n this.search = $(e.currentTarget).val();\n this.renderMeetings();\n },\n clearFilters: function () {\n this.search = '';\n this.statusFilter = null;\n this.render();\n },\n renderMeetings: function () {\n let $meetings = this.$('.meetings-container');\n $meetings.empty();\n\n let meetings = this.originMeetings.models;\n if (_.size(this.search) > 0 || _.size(this.statusFilter) > 0) {\n let filteredMeetings = this.collection.models;\n if (_.size(this.search) > 0) {\n filteredMeetings = _.filter(filteredMeetings, _.bind(function (meeting) {\n if ((meeting.get('number') + ' ' + meeting.get('name') + ' ' + meeting.get('description')).toLowerCase().indexOf(this.search.toLowerCase()) !== -1) {\n return true;\n }\n }, this));\n }\n\n if (_.size(this.statusFilter) > 0) {\n filteredMeetings = _.filter(filteredMeetings, _.bind(function (meeting) {\n if (this.statusFilter.indexOf(meeting.get('statusId')) !== -1) {\n return true;\n }\n }, this));\n }\n\n let filteredOriginMeetingIds = _.uniq(_.map(filteredMeetings, function (meeting) {\n return meeting.get('originMeetingId') > 0 ? meeting.get('originMeetingId') : meeting.id;\n }));\n meetings = _.filter(meetings, function (meeting) {\n return filteredOriginMeetingIds.indexOf(meeting.id) !== -1;\n })\n }\n\n if (_.size(meetings) === 0) {\n $meetings.append(`
\n
\n
\n No meetings found matching your search\n
\n
\n
`)\n }\n\n _.each(meetings, _.bind(function (meeting) {\n this.renderSubTemplate(true, this.options.subTemplates.meeting, $meetings, {\n expandedMeetings: this.expandedMeetings,\n meetings: this.collection,\n originMeetings: this.originMeetings,\n meeting: meeting,\n canEdit: this.options.canEdit,\n canAdd: this.options.canAdd,\n isAdmin: this.options.isAdmin,\n project: PJQ.app.session.project\n }, _.bind(function (el) {\n meeting.dataTable = new PJQ.views.meetings.MeetingListDatatable({\n el: el.find(\".meeting-\" + meeting.cid + \"-table\"),\n rowId: \"cid\",\n data: meeting.followUpMeetings.models,\n canViewMeetings: true,\n canDeleteMeetings: this.options.isAdmin,\n onPageSizeChange: function (value) {\n\n },\n isAdmin: true,\n headerData: _.bind(function () {\n return {\n project: this.options.project,\n canAdd: this.options.canEdit,\n isAdmin: this.options.isAdmin\n };\n }, this),\n onRowDoubleClick: _.bind(function (row) {\n this.viewMeeting(row.data());\n }, this),\n contextMenuOptions: {\n actions: [\n {\n name: 'View',\n onClick: _.bind(function (row) {\n this.viewMeeting(row.data());\n }, this)\n },\n {\n name: 'Delete',\n isDanger: true,\n onClick: _.bind(function (row) {\n this.deleteMeeting(row);\n }, this),\n isShown: _.bind(function (row) {\n let targetMeeting = row.data(),\n originMeetingId = targetMeeting.get('originMeetingId'),\n originMeeting = originMeetingId ? this.collection.get(originMeetingId) : targetMeeting,\n mostRecentMeeting = originMeeting ? _.max(originMeeting.followUpMeetings.models, function (model) {\n return model.id;\n }) : null;\n\n return mostRecentMeeting === targetMeeting && this.options.isAdmin;\n }, this)\n }\n ]\n }\n });\n\n\n meeting.dataTable.setFilter('status', this.statusFilter);\n if (_.size(this.search) > 0) {\n meeting.dataTable.search(this.search.toLowerCase());\n }\n }, this));\n }, this));\n },\n meetingClicked: function (e) {\n let dropdown = $(e.currentTarget),\n collapse = dropdown.next('.collapse'),\n caret = dropdown.find('.meeting-caret')\n if (!collapse.hasClass('show')) {\n caret.find('i').removeClass('fa-caret-right').addClass('fa-caret-down')\n } else {\n caret.find('i').removeClass('fa-caret-down').addClass('fa-caret-right')\n }\n },\n saveTemplate: function () {\n new PJQ.views.meetings.MeetingTemplateCreatorModal({\n collection: this.collection,\n project: PJQ.app.session.project\n });\n },\n importTemplate: function () {\n new PJQ.views.meetings.ImportTemplateModal({\n project: PJQ.app.session.project,\n onImport: _.bind(function (meetings) {\n this.collection = meetings;\n this.originMeetings = this.collection.getOriginMeetings();\n this.render();\n }, this)\n });\n },\n followUpMeetingClicked: function (e) {\n e.stopPropagation();\n let target = $(e.currentTarget),\n dropdown = target.closest('.meeting-dropdown'),\n cid = dropdown.data('cid'),\n originMeeting = this.collection.get(cid),\n previousMeeting = _.max(originMeeting.followUpMeetings.models, function (model) {\n return model.id;\n });\n\n // We want to carry over the attendees from the previous meeting, so we have to fetch the previous meeting.\n previousMeeting.fetch({\n success: _.bind(function (previousMeeting) {\n // Need to reset the attendance from previous meeting\n if (previousMeeting.get('attendees') != null) {\n _.each(previousMeeting.get('attendees'), (attendee) => {\n attendee.isPresent = false;\n attendee.isAbsent = false;\n attendee.isDistribution = false;\n });\n }\n\n followUpMeeting = new PJQ.models.meetings.Meeting({\n originMeetingId: originMeeting.get('id'),\n number: _.size(originMeeting.followUpMeetings) + 1,\n startTime: previousMeeting.get('startTime'),\n endTime: previousMeeting.get('endTime'),\n name: previousMeeting.get('name'),\n description: previousMeeting.get('description'),\n attendeeIds: previousMeeting.get('attendeeIds'),\n attendees: previousMeeting.get('attendees'),\n projectId: PJQ.app.session.project ? PJQ.app.session.project.id : null,\n templateId: previousMeeting.get('templateId'),\n statusId: PJQ.constants.meetings.meetingStatus.DRAFT\n })\n this.viewMeeting(followUpMeeting);\n }, this)\n })\n },\n addMeetingClicked: function (e) {\n let meeting = new PJQ.models.meetings.Meeting({\n projectId: PJQ.app.session.project ? PJQ.app.session.project.id : null,\n templateId: this.options.templateId,\n statusId: PJQ.constants.meetings.meetingStatus.DRAFT,\n number: 1\n })\n\n this.viewMeeting(meeting);\n },\n editSettings: function () {\n },\n viewMeetingClicked: function (e) {\n // let row = this.dataTable.getRow((e.currentTarget).closest('tr'));\n // this.viewMeeting(row.data());\n let cid = $(e.currentTarget).data('cid'),\n meeting = this.collection.get(cid);\n if (meeting) {\n this.viewMeeting(meeting);\n }\n },\n viewMeeting: function (meeting) {\n let originMeeting = meeting.get('originMeetingId') ? this.collection.get(meeting.get('originMeetingId')) : meeting,\n mostRecentMeeting = originMeeting && originMeeting.followUpMeetings ? _.max(originMeeting.followUpMeetings.models, function (model) {\n return model.id;\n }) : meeting;\n new PJQ.views.meetings.MeetingEditModal({\n model: meeting,\n meetings: this.collection,\n isMostRecentMeeting: mostRecentMeeting === meeting || meeting.isNew(),\n onDelete: _.bind(function () {\n this.renderMeetings();\n }, this),\n onSave: _.bind(function (model, isNew) {\n let originMeeting = model.get('originMeetingId') ? this.originMeetings.get(model.get('originMeetingId')) : model;\n if (isNew) {\n this.collection.add(model);\n if (originMeeting !== model) {\n originMeeting.followUpMeetings.add(model);\n } else {\n model.followUpMeetings = new PJQ.collections.meetings.Meetings(model);\n this.originMeetings.add(model);\n }\n }\n if (_.size(this.collection) <= 1) {\n this.render();\n } else {\n this.renderMeetings();\n }\n }, this)\n });\n },\n deleteMeetingClicked: function (e) {\n let target = $(e.currentTarget),\n cid = target.data('cid'),\n meeting = this.collection.get(cid),\n originMeeting = meeting.get('originMeetingId') ? this.collection.get(meeting.get('originMeetingId')) : meeting,\n row = originMeeting.dataTable.getRow(cid);\n\n this.deleteMeeting(row);\n },\n deleteMeeting: function (row) {\n if (row != null) {\n let meeting = row.data();\n if (meeting != null) {\n let originMeeting = this.collection.get(meeting.get('originMeetingId')),\n dataTable = originMeeting ? originMeeting.dataTable : meeting.dataTable;\n\n new PJQ.views.modals.DeleteCancel({\n header: \"Delete Meeting\",\n body: \"Are you sure you want to delete this Meeting?\",\n onDelete: _.bind(function () {\n meeting.destroy({\n success: _.bind(function () {\n this.renderMeetings();\n if (typeof this.options.onDelete === 'function') {\n this.options.onDelete(meeting);\n }\n }, this)\n });\n }, this)\n });\n }\n }\n }\n});","PJQ.views.meetings.TemplateManagement = PJQ.views.templates.TemplateManagement.extend({\n beforeFirstRender: function () {\n this.collection = new PJQ.collections.meetings.Templates();\n this.listenTo(this.collection, 'fetch', this.render);\n this.collection.fetch();\n },\n addTemplate: function () {\n new PJQ.views.templates.NewTemplateModal({\n model: new PJQ.models.meetings.Template(),\n onSave: _.bind(function (template) {\n this.collection.add(template);\n this.editTemplate(template);\n }, this)\n });\n },\n editTemplate: function (template) {\n new PJQ.views.meetings.EditTemplateModal({\n model: template,\n onClose: _.bind(function () {\n this.dataTable.refresh();\n }, this),\n onDelete: _.bind(function (template) {\n if (template.id > 0) {\n let row = this.dataTable.getRow(template.cid);\n this.collection.remove(template);\n template.destroy();\n this.dataTable.removeRow(row);\n }\n }, this)\n });\n }\n});\n\nPJQ.views.meetings.EditTemplateModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.MEETINGS, 'Modal-Edit-Template'),\n maxWidth: '90%',\n fitHeight: true,\n onClose: null\n },\n events: {\n 'click .btn-close': 'close',\n 'click .btn-delete': 'deleteTemplate'\n },\n beforeModalCreated: function () {\n this.listenTo(this.model, 'fetch', this.render);\n this.model.fetch();\n },\n renderData: function () {\n return {\n model: this.model\n };\n },\n afterRender: function () {\n if (this.model.isFetched) {\n\n new PJQ.inputs.TextEditorInput({\n el: this.$('.edit-template-name'),\n label: 'Name',\n value: this.model.get('name'),\n onSave: _.bind(function (value) {\n this.model.patch({\n name: value\n });\n }, this)\n });\n\n new PJQ.views.meetings.MeetingsList({\n el: this.$('.manage-template'),\n templateId: this.model.id,\n model: this.model,\n collection: this.model.meetings\n });\n }\n },\n close: function () {\n if (typeof this.options.onClose === 'function') {\n this.options.onClose(this.model);\n }\n },\n deleteTemplate: function () {\n new PJQ.views.modals.DeleteCancel({\n header: \"Confirm Deletion\",\n body: \"Are you sure you want to delete this template?\",\n onDelete: _.bind(function () {\n if (typeof this.options.onDelete === 'function') {\n this.options.onDelete(this.model);\n }\n this.removeModal();\n }, this)\n });\n }\n});\n\nPJQ.views.meetings.ImportTemplateModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.MEETINGS, 'modal-import-template'),\n maxWidth: 500,\n onImport: null\n },\n events: {\n 'click .btn-import': 'save'\n },\n beforeModalCreated: function () {\n this.options.project.fetchMeetingTemplates(_.bind(function (tmp) {\n this.templates = tmp;\n this.render();\n }, this));\n },\n renderData: function () {\n return {\n templates: this.templates\n };\n },\n afterRender: function () {\n if (this.templates != null && this.templates.isFetched) {\n this.templatePicker = new PJQ.inputs.Selectpicker({\n el: this.$('.select-template'),\n onChange: _.bind(function (value) {\n this.selectedTemplate = this.templates.get(value);\n }, this),\n isIntChoices: true,\n noneSelectedText: 'Select Template'\n });\n\n }\n },\n save: function () {\n let isValid = true;\n if (this.selectedTemplate == null) {\n this.templatePicker.showError();\n isValid = false;\n }\n else {\n this.templatePicker.hideError();\n }\n\n\n if (!isValid) {\n return;\n }\n\n new PJQ.ajax.Request({\n isAPIv2: true,\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'projects',\n value: this.options.project.id\n },\n {\n endpoint: 'meetings'\n },\n {\n endpoint: 'import',\n value: this.selectedTemplate.id\n }\n ], [\n {\n parameter: 'importAttendees',\n value: this.$('.input-import-attendees').prop('checked')\n },\n {\n parameter: 'importAgendaItems',\n value: this.$('.input-import-agenda-items').prop('checked')\n },\n {\n parameter: 'importCategories',\n value: this.$('.input-import-categories').prop('checked')\n },\n {\n parameter: 'importAttachments',\n value: this.$('.input-import-attachments').prop('checked')\n }\n ])\n }).put().done(_.bind(function (response) {\n if (typeof this.options.onImport === 'function') {\n let result = new PJQ.collections.meetings.Meetings(response);\n result.isFetched = true;\n this.options.onImport(result);\n }\n this.removeModal();\n PJQ.notifications.notify.successNotify({\n message: 'Meeting Template Imported'\n });\n }, this));\n }\n});\n\nPJQ.views.meetings.MeetingTemplateCreatorModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.MEETINGS, 'modal-create-template'),\n width: '30%'\n },\n events: {\n 'click .btn-save' : 'save'\n },\n beforeModalCreated: function () {\n this.model = new PJQ.models.meetings.Template({\n projectId: this.options.project.id\n });\n\n this.options.project.fetchMeetingTemplates(_.bind(function (tmp) {\n this.templates = tmp;\n this.render();\n }, this));\n },\n renderData: function () {\n return {\n templates: this.templates,\n meetings: this.collection\n };\n },\n afterRender: function () {\n if (this.templates != null && this.templates.isFetched) {\n new PJQ.inputs.Selectpicker({\n el: this.$('.select-meeting'),\n isMultiple: true,\n noneSelectedText: 'Select Meeting #',\n onChange: _.bind(function (value) {\n\n }, this)\n });\n\n new PJQ.inputs.AutocompleteInput({\n el: this.$('.input-template-name'),\n source: _.map(this.templates.models, function (template) {\n return template.get('name')\n })\n });\n }\n },\n save: function () {\n let $name = this.$('.input-template-name'),\n name = $name.val();\n if (_.size(name.trim()) === 0) {\n PJQ.helpers.inputHelpers.setInputError($name);\n return;\n }\n else {\n PJQ.helpers.inputHelpers.setInputError($name, true);\n }\n\n let existingTemplate = this.templates.findWhere({name: name}),\n overwriteExisting = this.$('.input-overwrite-existing').prop('checked'),\n fnSave = _.bind(function () {\n this.model.set({\n name: name,\n copyAttachments: this.$('.input-copy-attachments').prop('checked'),\n copyAttendees: this.$('.input-copy-attendees').prop('checked'),\n copyCategories: this.$('.input-copy-categories').prop('checked'),\n copyAgendaItems: this.$('.input-copy-agenda-items').prop('checked'),\n overwriteExisting: overwriteExisting\n });\n this.model.save(null, {\n success: _.bind(function () {\n this.removeModal();\n PJQ.notifications.notify.successNotify({\n message: 'Meeting Template Created'\n });\n }, this)\n });\n }, this);\n if (existingTemplate != null) {\n new PJQ.views.modals.YesNo({\n header: \"Add to Template?\",\n body: !overwriteExisting ? \"A template already exists with this name. Would you like to add these meetings to it?\" : \"A template already exists with this name. Are you sure you'd like to overwrite this template?\",\n onYes: _.bind(function () {\n this.model.set('id', existingTemplate.id);\n fnSave();\n }, this)\n });\n }\n else {\n fnSave();\n }\n }\n});"]}