{"version":3,"sources":["webpack:///./src/components/site-monitor/event-records/EventRecordsCCureTasks.vue?fe70","webpack:///./src/components/site-monitor/event-records/EventRecordsMixin.ts","webpack:///./src/components/site-monitor/event-records/EventRecordsCCureTasks.vue?2a9b","webpack:///./src/components/site-monitor/event-records/EventRecordsCCureTasks.vue?607c","webpack:///./src/components/site-monitor/event-records/EventRecordsCCureTasks.vue","webpack:///./src/components/site-monitor/event-records/EventRecordsCCureTasks.vue?e9db","webpack:///./src/components/site-monitor/event-records/EventRecordsCCure.vue?7c28","webpack:///./src/components/site-monitor/event-records/EventRecordsCCure.vue?f556","webpack:///./src/components/site-monitor/event-records/EventRecordsCCure.vue?0ee4","webpack:///./src/components/site-monitor/event-records/EventRecordsCCure.vue","webpack:///./src/components/site-monitor/event-records/EventRecordsCCure.vue?4983"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","eventid","scopedSlots","_u","key","fn","ref","eventRecord","canRecordHaveMetadata","staticClass","class","hasMetadataForResponse","objectID","getTaskIconTitle","on","$event","openTaskModal","details","_e","taskModalState","metadata","_v","_s","responseTitle","proxy","closeTaskModal","model","value","callback","$$v","$set","expression","_l","$idx","getTaskUrl","data","taskId","deleteTaskLink","newTaskIdString","trim","formattedNewTaskUrl","addNewTaskLink","staticRenderFns","SiteMonitorStore","selectedEventRecord","eventRecordID","type","Number","Getter","EventRecordsMixin","formatString","MetadataStore","metadataRefreshTimeout","responseId","visible","Object","keys","activeResponses","activeResponseIds","reduce","obj","id","getMetadataForObject","objectId","parseInt","objectType","metadataType","Array","isArray","getFeature","dynamicLinkConfig","created","loadMetadataTypes","updateMetadata","setTimeout","destroyed","clearTimeout","onActiveResponsesChanged","responseIds","loadMetadata","objects","map","responsesMetadata","length","responseLinkedRecordTypes","includes","eventRecordTypeID","metadataForResponse","getMetadataTaskTitles","linkFormatter","taskIdMatch","match","testPattern","taskIds","taskItem","prev","curr","createMetadata","responseDetails","createAuditRecord","eventId","eventRecordTypeId","deleteMetadata","State","Action","immediate","EventRecordsCCureTasks","components","EventRecordsCCure","component","$route","params","slotProps","_t","logSingleEnabled","isFullUser","isCCure","serverTypeID","expanded","staticStyle","stopPropagation","toggleExpandRecord","slot","anyCCure","showCCureBar","selectedCCureAlarm","logTypes","logTypeSelected","logTypeAll","directives","name","rawName","modifiers","domProps","postLogMessageAll","target","composing","logMessageAll","$forceUpdate","canPostMessage","postingMessageAll","resetActions","clearSelectedCCureAlarm","dismissCountDown","countDownChanged","postingMessageError","logMessage","postingMessage","logTypeID","title","logType","filterIndex","eventRecords","index","findIndex","record","$store","watch","state","siteMonitor","oldValue","featuresList","onSelectedEventRecordIdChange","newValue","$refs","nextTick","$el","focus","postLogMessage","then","response","error","message","undefined","resetAllActions","$config","ANIMATION_DURATION","selectedType","EventRecords","multiselect"],"mappings":"0IAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,OAAO,CAACA,EAAG,sBAAsB,CAACE,MAAM,CAAC,QAAUN,EAAIO,SAASC,YAAYR,EAAIS,GAAG,CAAET,EAAgB,aAAE,CAACU,IAAI,OAAOC,GAAG,SAASC,GAClO,IAAIC,EAAcD,EAAIC,YACtB,MAAO,CAAEb,EAAIc,sBAAsBD,GAAcT,EAAG,OAAO,CAACA,EAAG,IAAI,CAACW,YAAY,4CAA4CC,MAAMhB,EAAIiB,uBAAuBJ,EAAYK,UAAY,mBAAoB,MAAMZ,MAAM,CAAC,MAAQN,EAAImB,iBAAiBN,EAAYK,UAAU,UAAW,cAAiBL,EAAyB,eAAIO,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOrB,EAAIsB,cAAcT,EAAYK,SAAUL,EAAYU,eAAevB,EAAIwB,QAAQ,MAAM,MAAK,KAAQpB,EAAG,UAAU,CAACI,YAAYR,EAAIS,GAAG,CAAC,CAACC,IAAI,eAAeC,GAAG,WAAW,MAAO,CAACP,EAAG,KAAK,C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AoB,EACzB,EAAKK,oBAAsB0B,EAAMC,QACjC,EAAK7B,iBAAmB,OAMrB,YAAAF,aAAP,SAAoBtI,GACC,OAAhBA,QAAwCsK,IAAhBtK,EAC3B,OAAIuK,gBAAgBnL,KAAKM,SAEzB,OAAI4I,aAAatI,EAAYsC,gBAIvB,YAAAkF,gBAAR,SAAwBxH,EAAkB+I,GAA1C,WACgB,MAAXA,IACH3J,KAAK2J,QAAUA,GAGhB5E,YAAW,WACS,MAAfnE,EACF,EAAK6J,MAAM,eAAuBG,QAElC,EAAKH,MAAM,aAAe7J,EAAYsC,eAAuB0H,UAE7D,GAAM5K,KAAKoL,QAAQC,qBAGf,YAAAvD,mBAAR,SAA2BlH,GAC1BZ,KAAKkI,mBAAqBtH,EACzBZ,KAAKyK,MAAM,cAAsBE,IAAIC,SAG/B,YAAA5B,eAAR,SAAuBsC,EAAc/B,GACpC,OAAoB,MAAhB+B,QAAkDJ,GAA1BI,EAAa7B,YAIrC6B,EAAa7B,UAAY,IAIE,GAA3B6B,EAAa7B,WACTF,EAAW/D,OAAS,IAMrB,YAAA6D,iBAAR,SAAyBD,GACxBpJ,KAAKoJ,iBAAmBA,GAGjB,YAAAD,wBAAR,WACCnJ,KAAKkI,mBAAqB,MA9I3B,gBADC,mBAAM,0B,4CAWN,MApFmBjB,EAAiB,gBANrC,uBAAU,CACVD,WAAY,CACX,gBAAiBuE,EAAA,WACjBC,YAAa,QAGMvE,GA0NrB,EA1NA,CAA+C,oBAAO,UAAjC,ICrB2Z,I,wBCQ5aC,EAAY,eACd,EACApH,EACAiD,GACA,EACA,KACA,WACA,MAIa,aAAAmE,E,2CCnBf,yBAAqlB,EAAG,G","file":"js/chunk-6d4fe15c.adb96929.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',[_c('event-records-ccure',{attrs:{\"eventid\":_vm.eventid},scopedSlots:_vm._u([(_vm.tasksEnabled)?{key:\"icon\",fn:function(ref){\nvar eventRecord = ref.eventRecord;\nreturn [(_vm.canRecordHaveMetadata(eventRecord))?_c('span',[_c('i',{staticClass:\"fa-check-square tasks-icon clickable-icon\",class:_vm.hasMetadataForResponse(eventRecord.objectID) ? 'fas text-success': 'fal',attrs:{\"title\":_vm.getTaskIconTitle(eventRecord.objectID),\"data-cy\":(\"tasks-icon-\" + (eventRecord.eventRecordID))},on:{\"click\":function($event){return _vm.openTaskModal(eventRecord.objectID, eventRecord.details)}}})]):_vm._e()]}}:null],null,true)}),_c('b-modal',{scopedSlots:_vm._u([{key:\"modal-header\",fn:function(){return [_c('h5',[(!_vm.taskModalState.metadata)?_c('span',[_vm._v(\"Link task to alarm\")]):_c('span',[_vm._v(\"Linked tasks for alarm '\"+_vm._s(_vm.taskModalState.responseTitle)+\"'\")])])]},proxy:true},{key:\"modal-footer\",fn:function(){return [_c('b-button',{attrs:{\"type\":\"button\"},on:{\"click\":function($event){return _vm.closeTaskModal()}}},[_vm._v(\"Cancel\")])]},proxy:true}]),model:{value:(_vm.taskModalState.visible),callback:function ($$v) {_vm.$set(_vm.taskModalState, \"visible\", $$v)},expression:\"taskModalState.visible\"}},[_c('div',[(_vm.taskModalState.metadata != null)?_c('span',[_vm._v(\"This alarm is linked to the following tasks:\")]):_c('span',[_vm._v(\"This alarm has no linked tasks.\")])]),_c('b-list-group',{staticClass:\"pt-2\"},[_vm._l((_vm.taskModalState.metadata),function(metadata,$idx){return _c('b-list-group-item',{key:$idx,staticClass:\"p-0 shadow-sm\"},[_c('div',{staticClass:\"d-flex flex-row align-items-center\"},[_c('div',{staticClass:\"col-10 p-2 linked-task border-right\"},[_c('span',[_c('a',{attrs:{\"data-cy\":\"linked-task-url\",\"href\":_vm.getTaskUrl(metadata.data.taskId) || ''}},[_vm._v(_vm._s(metadata.data.taskId))])])]),_c('div',{staticClass:\"col-2\"},[_c('a',{staticClass:\"text-danger float-right remove-task-icon\",attrs:{\"data-cy\":\"delete-linked-task-btn\",\"title\":\"Delete task link\"},on:{\"click\":function($event){return _vm.deleteTaskLink(metadata)}}},[_c('i',{staticClass:\"fa fa-times\"})])])])])}),_c('b-list-group-item',{staticClass:\"p-0 shadow-sm\"},[_c('div',{staticClass:\"d-flex flex-row align-items-center\"},[_c('div',{staticClass:\"col-10 p-2 linked-task border-right\"},[_c('b-input',{staticClass:\"font-size-inherit\",attrs:{\"data-cy\":\"new-task-id-input\",\"placeholder\":\"Add new linked task\",\"size\":\"sm\"},model:{value:(_vm.newTaskIdString),callback:function ($$v) {_vm.newTaskIdString=(typeof $$v === 'string'? $$v.trim(): $$v)},expression:\"newTaskIdString\"}}),(_vm.formattedNewTaskUrl)?_c('div',{staticClass:\"card card-body code-box p-1 mt-2\"},[_c('code',[_vm._v(_vm._s(_vm.formattedNewTaskUrl))])]):_vm._e()],1),_c('div',{staticClass:\"col-2\"},[_c('a',{staticClass:\"float-right\",class:_vm.formattedNewTaskUrl ? 'text-primary' : 'text-gray',attrs:{\"data-cy\":\"add-linked-task-btn\",\"title\":_vm.formattedNewTaskUrl ? 'Add linked task' : 'Enter a task ID to link'},on:{\"click\":function($event){_vm.formattedNewTaskUrl ? _vm.addNewTaskLink() : function () {}}}},[_c('i',{staticClass:\"fa fa-plus\"})])])])])],2)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { Vue, Component, Prop } from \"vue-property-decorator\";\r\nimport { namespace, Getter } from \"vuex-class\";\r\nimport { EventRecord } from \"@/store/site-monitor/types\";\r\nimport { FeaturesList } from \"@/store/types\";\r\n\r\nconst SiteMonitorStore = namespace(\"siteMonitor\");\r\n\r\n/**\r\n * Mixin class for event record components which contains\r\n * shared logic, vuex store mappings, and component props.\r\n */\r\n@Component({})\r\nexport default class EventRecordsMixin extends Vue {\r\n\t@Prop({ type: Number }) public eventid: number;\r\n\r\n\t@Getter protected isFullUser: boolean;\r\n\t@Getter(\"getFeaturesList\") protected featuresList: FeaturesList;\r\n\r\n\t@SiteMonitorStore.Getter protected filterIndex: number;\r\n\t@SiteMonitorStore.Getter(\"getEventRecords\") protected eventRecords: EventRecord[];\r\n\t@SiteMonitorStore.Getter(\"getSelectedEventRecord\") protected selectedEventRecord: EventRecord;\r\n\r\n\tprotected get selectedEventRecordId() {\r\n\t\tif (!this.selectedEventRecord) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\treturn this.selectedEventRecord.eventRecordID;\r\n\t}\r\n}\r\n","\nimport { Mixins, Component, Watch } from \"vue-property-decorator\";\nimport { namespace, Getter } from \"vuex-class\";\n\nimport EventRecordsMixin from \"./EventRecordsMixin\";\nimport EventRecordsCCure from \"./EventRecordsCCure.vue\";\n\nimport { EventRecord } from \"@/store/site-monitor/types\";\nimport { MetadataRequest, MetadataLookup, Metadata, NewMetadataItem } from \"@/store/metadata/types\";\nimport { DynamicLinkConfig } from \"@/store/types\";\n\nimport { stringMixin } from \"@/mixins\";\nconst { formatString } = stringMixin.methods;\n\nconst SiteMonitorStore = namespace(\"siteMonitor\");\nconst MetadataStore = namespace(\"metadata\");\n\ninterface ActiveResponses {\n\t[responseId: number]: any;\n}\n\ninterface TaskModalState {\n\tmetadata: Metadata[] | null;\n\tresponseId: number | null;\n\tresponseTitle: string;\n\tvisible: boolean;\n}\n\n@Component({\n\tcomponents: {\n\t\t\"event-records-ccure\": EventRecordsCCure,\n\t},\n})\nexport default class EventRecordsCCureTasks extends Mixins(EventRecordsMixin) {\n\t@Getter private getFeature: (featureNames: string[]) => boolean;\n\t@Getter(\"getDynamicLinkConfig\") private dynamicLinkConfig: DynamicLinkConfig;\n\n\t@SiteMonitorStore.State(\"ActiveResponseIDs\") private activeResponses: ActiveResponses;\n\t@SiteMonitorStore.Action private createAuditRecord: ({\n\t\teventId,\n\t\teventRecordTypeId,\n\t\tdetails,\n\t\tobjectId,\n\t}) => Promise;\n\n\t@MetadataStore.Action private loadMetadataTypes: () => Promise;\n\t@MetadataStore.Action private loadMetadata: (metadataRequest: MetadataRequest) => Promise;\n\t@MetadataStore.Action private createMetadata: (newMetadata: NewMetadataItem) => Promise;\n\t@MetadataStore.Action private deleteMetadata: (metadataToDelete: Metadata) => Promise;\n\t@MetadataStore.Getter private getMetadataForObject: (lookup: MetadataLookup) => Metadata | Metadata[];\n\n\tprivate metadataRefreshTimeout: any = null;\n\tprivate newTaskIdString: string = \"\";\n\tprivate taskModalState: TaskModalState = {\n\t\tmetadata: null,\n\t\tresponseId: null,\n\t\tresponseTitle: \"\",\n\t\tvisible: false,\n\t};\n\n\t/**\n\t * Getter to retrieve just the Ids of our active\n\t */\n\tprivate get activeResponseIds() {\n\t\treturn Object.keys(this.activeResponses);\n\t}\n\n\t/**\n\t * Returns an object with key/value pairs for each response id/metadata.\n\t */\n\tprivate get responsesMetadata(): { [responseId: string]: Metadata[] } {\n\t\t// Build our key/value object by reducing our array of response id's\n\t\treturn this.activeResponseIds.reduce((obj, id) => {\n\t\t\tlet metadata = this.getMetadataForObject({\n\t\t\t\tobjectId: parseInt(id),\n\t\t\t\tobjectType: \"Responses\",\n\t\t\t\tmetadataType: \"ThirdPartyTaskSystem\",\n\t\t\t});\n\n\t\t\tif (metadata) {\n\t\t\t\tobj[id] = Array.isArray(metadata) ? metadata : [metadata];\n\t\t\t}\n\n\t\t\treturn obj;\n\t\t}, {});\n\t}\n\n\t/**\n\t * Returns the formatted new task link. If the user has just entered a number, or a task number,\n\t * such as 12345 or T12345, we return the full formatted task URL. If the user has entered the full URL,\n\t * we validate it and return it. Otherwise we return an empty string.\n\t */\n\tprivate get formattedNewTaskUrl() {\n\t\treturn this.getTaskUrl(this.newTaskIdString);\n\t}\n\n\t/**\n\t * Returns true if the feature flags necessary for the third party tasks integration are enabled, and\n\t * link config is setup.\n\t */\n\tprivate get tasksEnabled() {\n\t\treturn (\n\t\t\tthis.getFeature([\"Integration\", \"Tasks\"]) &&\n\t\t\tthis.getFeature([\"Integration\", \"DynamicLink\"]) &&\n\t\t\tthis.dynamicLinkConfig != null\n\t\t);\n\t}\n\n\t/**\n\t * Loads metadata info from the api, starts up our metadata refresh timeout.\n\t */\n\tprivate async created() {\n\t\t// Load metadata types\n\t\tawait this.loadMetadataTypes();\n\n\t\tconst refreshMetadata = async () => {\n\t\t\tawait this.updateMetadata();\n\t\t\tthis.metadataRefreshTimeout = setTimeout(refreshMetadata, 5000);\n\t\t};\n\n\t\tawait refreshMetadata();\n\t}\n\n\t/**\n\t * Ensures the metadata refresh timeout is cleaned up before the component is destroyed.\n\t */\n\tprivate destroyed() {\n\t\tclearTimeout(this.metadataRefreshTimeout);\n\t}\n\n\t/**\n\t * Watches for when our set of response Id's changes. When it does, we'll refresh our metadata\n\t */\n\t@Watch(\"activeResponseIds\", { immediate: true })\n\tprivate async onActiveResponsesChanged(activeResponses: ActiveResponses) {\n\t\tawait this.updateMetadata();\n\t}\n\n\t/**\n\t * Triggers an update of metadata for the currently active responses.\n\t */\n\tprivate async updateMetadata() {\n\t\tconst responseIds = Object.keys(this.activeResponses);\n\n\t\tawait this.loadMetadata({\n\t\t\tmetadataType: \"ThirdPartyTaskSystem\",\n\t\t\tobjects: responseIds.map((id) => ({\n\t\t\t\tobjectId: parseInt(id),\n\t\t\t\tobjectType: \"Responses\",\n\t\t\t})),\n\t\t});\n\t}\n\n\t/**\n\t * Returns true if we have an item of metadata for a given response.\n\t */\n\tprivate hasMetadataForResponse(responseId: number) {\n\t\tif (\n\t\t\tresponseId == null ||\n\t\t\tthis.responsesMetadata[responseId] == null ||\n\t\t\tthis.responsesMetadata[responseId].length == 0\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Returns true if the given event record has a type which supports linking to\n\t * the responses table (and therefore can have Tasks metadata associated with it).\n\t */\n\tprivate canRecordHaveMetadata(eventRecord: EventRecord) {\n\t\tif (eventRecord == null || !eventRecord.objectID) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// EventRecordTypes that support linking to Respo nses\n\t\tconst responseLinkedRecordTypes = [1 /*, 27, 40*/];\n\t\treturn responseLinkedRecordTypes.includes(eventRecord.eventRecordTypeID);\n\t}\n\n\t/**\n\t * Returns the title to use for the task icon on an event record row.\n\t */\n\tprivate getTaskIconTitle(responseId: number) {\n\t\tconst metadataForResponse = this.responsesMetadata[responseId];\n\n\t\tif (metadataForResponse == null) {\n\t\t\treturn \"No task assigned to this alarm, click to add one\";\n\t\t} else {\n\t\t\treturn `Tasks are assigned to this alarm: ${this.getMetadataTaskTitles(metadataForResponse)}`;\n\t\t}\n\t}\n\n\t/**\n\t * Returns the URL for a given task ID, using the regex and format string provided\n\t * via the Dynamic Link config.\n\t */\n\tprivate getTaskUrl(taskId: string) {\n\t\tif (!this.dynamicLinkConfig || !this.dynamicLinkConfig.linkFormatter) {\n\t\t\treturn null;\n\t\t}\n\n\t\tlet taskIdMatch = taskId.match(this.dynamicLinkConfig.testPattern);\n\t\tif (!taskIdMatch) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn formatString(this.dynamicLinkConfig.linkFormatter, ...taskIdMatch);\n\t}\n\n\t/**\n\t * Formats the task ids for a set of metadata into a comma seperated list.\n\t */\n\tprivate getMetadataTaskTitles(metadata: Metadata[]) {\n\t\tif (!metadata) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tconst taskIds: string[] = metadata.map((taskItem) => taskItem.data.taskId);\n\t\treturn taskIds.reduce((prev, curr) => {\n\t\t\treturn (prev == \"\" ? \"\" : prev + \", \") + curr;\n\t\t}, \"\");\n\t}\n\n\t/** Task Modal Methods */\n\n\t/**\n\t * Opens the task modal for a specific response. If the response already has\n\t * an assigned metadata item, then we attach it to our modal state so we can\n\t * display it. Otherwise, the user will be prompted to enter a new task id/url.\n\t */\n\tprivate openTaskModal(responseId: number, responseTitle: string) {\n\t\tconst metadata = this.responsesMetadata[responseId] || null;\n\n\t\tthis.newTaskIdString = \"\";\n\t\tthis.taskModalState = {\n\t\t\tresponseId,\n\t\t\tresponseTitle,\n\t\t\tvisible: true,\n\t\t\tmetadata,\n\t\t};\n\t}\n\n\t/**\n\t * Closes the task modal.\n\t */\n\tprivate closeTaskModal() {\n\t\tthis.taskModalState.visible = false;\n\t}\n\n\t/**\n\t * Creates a new task metadata item linked to the response currently\n\t * open in the task modal. Extracts the task id (number) from the newTaskIdString,\n\t * creates a new metadata item, and sends it to the api.\n\t */\n\tprivate async addNewTaskLink() {\n\t\tconst objectId = this.taskModalState.responseId;\n\t\tconst taskId = this.newTaskIdString;\n\n\t\t// Create the metadata item and save it to the DB\n\t\tawait this.createMetadata({\n\t\t\tmetadataType: \"ThirdPartyTaskSystem\",\n\t\t\tobjectId,\n\t\t\tobjectType: \"Responses\",\n\t\t\tdata: {\n\t\t\t\ttaskId: taskId,\n\t\t\t},\n\t\t});\n\n\t\t// Create an audit record\n\t\tconst responseDetails = this.activeResponses[objectId].details;\n\t\tawait this.createAuditRecord({\n\t\t\teventId: this.eventid,\n\t\t\teventRecordTypeId: 136,\n\t\t\tobjectId,\n\t\t\tdetails: `Linked task ${taskId} to response: ${responseDetails}`,\n\t\t});\n\n\t\tthis.closeTaskModal();\n\t}\n\n\t/**\n\t * Deletes a pre-existing task metadata item linked to the current response\n\t * open in the task modal.\n\t */\n\tprivate async deleteTaskLink(metadata: Metadata) {\n\t\tconst responseMetadata = this.responsesMetadata[this.taskModalState.responseId];\n\t\tawait this.deleteMetadata(metadata);\n\n\t\t// Create an audit record\n\t\tconst taskId = metadata.data.taskId;\n\t\tconst responseId = this.taskModalState.responseId;\n\t\tconst responseDetails = this.activeResponses[responseId].details;\n\t\tawait this.createAuditRecord({\n\t\t\teventId: this.eventid,\n\t\t\teventRecordTypeId: 137,\n\t\t\tobjectId: responseId,\n\t\t\tdetails: `Removed linked task ${taskId} from response: ${responseDetails}`,\n\t\t});\n\n\t\tthis.closeTaskModal();\n\t}\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--13-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EventRecordsCCureTasks.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--13-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EventRecordsCCureTasks.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./EventRecordsCCureTasks.vue?vue&type=template&id=51b4f214&scoped=true&\"\nimport script from \"./EventRecordsCCureTasks.vue?vue&type=script&lang=ts&\"\nexport * from \"./EventRecordsCCureTasks.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./EventRecordsCCureTasks.vue?vue&type=style&index=0&id=51b4f214&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"51b4f214\",\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EventRecordsCCureTasks.vue?vue&type=style&index=0&id=51b4f214&lang=scss&scoped=true&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EventRecordsCCureTasks.vue?vue&type=style&index=0&id=51b4f214&lang=scss&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('event-records',{attrs:{\"eventid\":parseInt(_vm.$route.params.eventId)},scopedSlots:_vm._u([{key:\"icon\",fn:function(slotProps){return [_vm._t(\"icon\",null,{\"eventRecord\":slotProps.eventRecord}),(_vm.logSingleEnabled && _vm.isFullUser && slotProps.eventRecord.eventRecordTypeID == 1 && _vm.isCCure(slotProps.eventRecord.serverTypeID))?_c('i',{staticClass:\"fas click-span\",class:{'fa-chevron-down': !slotProps.eventRecord.expanded, 'fa-chevron-up': slotProps.eventRecord.expanded},staticStyle:{\"margin-left\":\"5px\"},attrs:{\"data-cy\":\"ccure-log-single-enabled\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.toggleExpandRecord(slotProps.eventRecord)}}}):_vm._e()]}}],null,true)},[_c('template',{slot:\"header\"},[(_vm.isFullUser && _vm.anyCCure && _vm.showCCureBar)?_c('div',[(_vm.selectedCCureAlarm)?_c('div',{staticClass:\"card-header\"},[_vm._v(_vm._s(_vm.selectedCCureAlarm.details))]):_vm._e(),_c('div',{staticClass:\"d-flex align-items-center ccure-event-bar\"},[(_vm.logAllEnabled)?_c('div',{staticClass:\"ccure-event-bar-message multiselect-float\",attrs:{\"data-cy\":\"ccure-log-all-enabled\"}},[_c('multiselect',{ref:'logSelect0',staticClass:\"multiselect-small-options\",attrs:{\"selectLabel\":\"\",\"deselectLabel\":\"\",\"track-by\":\"logTypeID\",\"label\":\"title\",\"placeholder\":\"Select log type\",\"options\":_vm.logTypes,\"allow-empty\":false,\"showNoResults\":false,\"clear-on-select\":true,\"data-cy\":\"multiselect\"},on:{\"select\":function($event){return _vm.logTypeSelected()}},model:{value:(_vm.logTypeAll),callback:function ($$v) {_vm.logTypeAll=$$v},expression:\"logTypeAll\"}}),_c('div',{staticClass:\"form-group flex-grow-1 log-message-input\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model.trim\",value:(_vm.logMessageAll),expression:\"logMessageAll\",modifiers:{\"trim\":true}},{name:\"shortkey\",rawName:\"v-shortkey.once\",value:(['enter']),expression:\"['enter']\",modifiers:{\"once\":true}}],ref:'logMessage0',staticClass:\"form-control\",attrs:{\"type\":\"text\",\"placeholder\":\"Enter log message\"},domProps:{\"value\":(_vm.logMessageAll)},on:{\"shortkey\":_vm.postLogMessageAll,\"input\":function($event){if($event.target.composing){ return; }_vm.logMessageAll=$event.target.value.trim()},\"blur\":function($event){return _vm.$forceUpdate()}}})]),_c('a',{staticClass:\"btn btn-secondary flex-shrink-0 post-log-msg-btn\",class:{'disabled': !_vm.canPostMessage(_vm.logTypeAll, _vm.logMessageAll)},attrs:{\"title\":\"Post log message\",\"disabled\":!_vm.canPostMessage(_vm.logTypeAll, _vm.logMessageAll)},on:{\"click\":function($event){return _vm.postLogMessageAll()}}},[(!_vm.postingMessageAll)?_c('span',{staticClass:\"fas fa-plus\"}):_vm._e(),(_vm.postingMessageAll)?_c('span',{staticClass:\"fas fa-circle-notch fa-spin\"}):_vm._e()])],1):_vm._e(),(_vm.ccureUIEnabled)?_c('div',{attrs:{\"data-cy\":\"ccure-ui-enabled\"}},[(!_vm.selectedCCureAlarm)?_c('a',{staticClass:\"btn btn-secondary\",on:{\"click\":function($event){return _vm.resetActions()}}},[_vm._v(\"Reset all actions\")]):_vm._e(),(_vm.selectedCCureAlarm)?_c('a',{staticClass:\"btn btn-secondary\",on:{\"click\":function($event){return _vm.resetActions(_vm.selectedCCureAlarm)}}},[_vm._v(\"Reset actions\")]):_vm._e()]):_vm._e(),(_vm.selectedCCureAlarm)?_c('a',{staticClass:\"btn btn-secondary m-l-10\",attrs:{\"data-cy\":\"clear-selected-ccure-alarm\"},on:{\"click\":function($event){return _vm.clearSelectedCCureAlarm()}}},[_vm._v(\"Done\")]):_vm._e()]),_c('b-alert',{staticClass:\"failed-msg\",attrs:{\"variant\":\"danger\",\"show\":_vm.dismissCountDown,\"dismissible\":\"\",\"fade\":\"\"},on:{\"dismissed\":function($event){_vm.dismissCountDown=0},\"dismiss-count-down\":_vm.countDownChanged}},[(_vm.postingMessageError)?_c('span',[_vm._v(\"Failed to post log message - \"+_vm._s(_vm.postingMessageError))]):_vm._e()])],1):_vm._e()])],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\nimport { Component, Vue, Prop, Watch, Mixins } from \"vue-property-decorator\";\nimport { namespace, Getter } from \"vuex-class\";\nimport { retry } from \"rxjs/operators\";\nimport { get } from \"lodash\";\nimport { UserPermissions, FeaturesList } from \"@/store/types\";\n\nimport EventRecordsMixin from \"./eventRecords.mixin\";\nimport EventRecords from \"./EventRecords.vue\";\nimport Multiselect from \"vue-multiselect\";\nimport api from \"@/services/api.ccure.service\";\n\nconst SiteMonitor = namespace(\"siteMonitor\");\nconst Root = namespace(\"\");\n\n@Component({\n\tcomponents: {\n\t\t\"event-records\": EventRecords,\n\t\tmultiselect: Multiselect\n\t}\n})\nexport default class EventRecordsCCure extends Mixins(EventRecordsMixin) {\n\tprivate logMessage: string = \"\";\n\tprivate postingMessage: boolean = false;\n\n\tprivate logMessageAll: string = \"\";\n\tprivate postingMessageAll: boolean = false;\n\n\tprivate postingMessageError: string | null = null;\n\tprivate dismissCountDown: number = 0;\n\n\tprivate selectedCCureAlarm: any = null;\n\tprivate anyCCure: boolean = false;\n\n\tprivate logTypes: any[] = [\n\t\t{ logTypeID: -1, title: \"[Custom Message]\" },\n\t\t{ logTypeID: 3, title: \"1-Dispatch FC/PD\" },\n\t\t{ logTypeID: 4, title: \"1-Dispatch Facilities\" },\n\t\t{ logTypeID: 5, title: \"1-Contact Responsible Party\" },\n\t\t{ logTypeID: 6, title: \"2-Review Recorded Video\" },\n\t\t{ logTypeID: 7, title: \"2-Arrived / Investigating Locally\" },\n\t\t{ logTypeID: 8, title: \"6-Disposition: Area Secure / Situation Normal\" },\n\t\t{ logTypeID: 9, title: \"6-Disposition: Situation in progress\" },\n\t\t{ logTypeID: 10, title: \"8-Action: Incident Report Filed\" },\n\t\t{ logTypeID: 11, title: \"8-Action: Task Created\" }\n\t];\n\n\tprivate logType: any = this.logTypes[0];\n\tprivate logTypeAll: any = this.logTypes[0];\n\n\tprivate get showCCureBar() {\n\t\treturn this.filterIndex <= 0;\n\t}\n\n\tprivate created() {\n\t\tif (this.eventRecords != null) {\n\t\t\tlet index = this.eventRecords.findIndex((record: any) => this.isCCure(record.serverTypeID));\n\t\t\t\n\t\t\tif (index > -1) {\n\t\t\t\tthis.anyCCure = true;\n\t\t\t} else {\n\t\t\t\tlet unwatch = this.$store.watch(\n\t\t\t\t\tstate => state.siteMonitor.EventRecords,\n\t\t\t\t\t(value: any[], oldValue: any[]) => {\n\t\t\t\t\t\tif (value != null) {\n\t\t\t\t\t\t\tlet index = value.findIndex(record => this.isCCure(record.serverTypeID));\n\n\t\t\t\t\t\t\tif (index > -1) {\n\t\t\t\t\t\t\t\tthis.anyCCure = true;\n\t\t\t\t\t\t\t\tunwatch();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate isCCure(serverTypeID: number) {\n\t\treturn serverTypeID == 427 || serverTypeID == 1234;\n\t}\n\n\tprivate get ccureUIEnabled() {\n\t\treturn get(this.featuresList, [\"Integration\", \"CCure\", \"UI\"]);\n\t}\n\n\tprivate get logAllEnabled() {\n\t\treturn get(this.featuresList, [\"Integration\", \"CCure\", \"UI\", \"LogAll\"]);\n\t}\n\n\tprivate get logSingleEnabled() {\n\t\treturn get(this.featuresList, [\"Integration\", \"CCure\", \"UI\", \"LogSingle\"]);\n\t}\n\n\t@Watch(\"selectedEventRecordId\")\n\tprivate onSelectedEventRecordIdChange(value: any, newValue: any) {\n\t\tif (value != null) {\n\t\t\tlet refs = this.$refs;\n\n\t\t\tVue.nextTick(() => {\n\t\t\t\tif (this.$refs[\"logSelect\" + value] != null) {\n\t\t\t\t\t(this.$refs[\"logSelect\" + value] as any).$el.focus();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate postLogMessage(eventRecord: any) {\n\t\tif (this.postingMessage) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this.canPostMessage(this.logType, this.logMessage)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.postingMessage = true;\n\n\t\tapi.postLogMessage(\n\t\t\teventRecord.eventRecordID,\n\t\t\tthis.logType.logTypeID == -1 ? \"\" : this.logType.title,\n\t\t\tthis.logMessage,\n\t\t\tthis.eventid\n\t\t).then(\n\t\t\tresponse => {\n\t\t\t\tthis.logMessage = \"\";\n\t\t\t\tthis.logType = {};\n\n\t\t\t\tthis.postingMessage = false;\n\t\t\t},\n\t\t\terror => {\n\t\t\t\tthis.postingMessage = false;\n\t\t\t\tthis.postingMessageError = error.message;\n\t\t\t\tthis.dismissCountDown = 5;\n\t\t\t}\n\t\t);\n\t}\n\n\tprivate postLogMessageAll() {\n\t\tif (this.postingMessageAll) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this.canPostMessage(this.logTypeAll, this.logMessageAll)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.postingMessageAll = true;\n\n\t\tif (this.selectedCCureAlarm) {\n\t\t\tapi.postLogMessage(\n\t\t\t\tthis.selectedCCureAlarm.eventRecordID,\n\t\t\t\tthis.logTypeAll.logTypeID == -1 ? \"\" : this.logTypeAll.title,\n\t\t\t\tthis.logMessageAll,\n\t\t\t\tthis.eventid\n\t\t\t).then(\n\t\t\t\tresponse => {\n\t\t\t\t\tthis.logMessageAll = \"\";\n\t\t\t\t\tthis.logTypeAll = {};\n\n\t\t\t\t\tthis.postingMessageAll = false;\n\t\t\t\t},\n\t\t\t\terror => {\n\t\t\t\t\tthis.postingMessageAll = false;\n\t\t\t\t\tthis.postingMessageError = error.message;\n\t\t\t\t\tthis.dismissCountDown = 5;\n\t\t\t\t}\n\t\t\t);\n\t\t} else {\n\t\t\tapi.postLogMessageAll(\n\t\t\t\tthis.logTypeAll.logTypeID == -1 ? \"\" : this.logTypeAll.title,\n\t\t\t\tthis.logMessageAll,\n\t\t\t\tthis.eventid\n\t\t\t).then(\n\t\t\t\tresponse => {\n\t\t\t\t\tthis.logMessageAll = \"\";\n\t\t\t\t\tthis.logTypeAll = {};\n\n\t\t\t\t\tthis.postingMessageAll = false;\n\t\t\t\t},\n\t\t\t\terror => {\n\t\t\t\t\tthis.postingMessageAll = false;\n\t\t\t\t\tthis.postingMessageError = error.message;\n\t\t\t\t\tthis.dismissCountDown = 5;\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}\n\n\tpublic resetActions(eventRecord: any) {\n\t\tif (eventRecord === null || eventRecord === undefined) {\n\t\t\tapi.resetAllActions(this.eventid);\n\t\t} else {\n\t\t\tapi.resetActions(eventRecord.eventRecordID);\n\t\t}\n\t}\n\n\tprivate logTypeSelected(eventRecord: any, logType: any) {\n\t\tif (logType != null) {\n\t\t\tthis.logType = logType;\n\t\t}\n\n\t\tsetTimeout(() => {\n\t\t\tif (eventRecord == null) {\n\t\t\t\t(this.$refs[\"logMessage0\"] as any).focus();\n\t\t\t} else {\n\t\t\t\t(this.$refs[\"logMessage\" + eventRecord.eventRecordID] as any).focus();\n\t\t\t}\n\t\t}, 0.5 * this.$config.ANIMATION_DURATION);\n\t}\n\n\tprivate toggleExpandRecord(eventRecord: any) {\n\t\tthis.selectedCCureAlarm = eventRecord;\n\t\t(this.$refs[\"logSelect0\"] as any).$el.focus();\n\t}\n\n\tprivate canPostMessage(selectedType, logMessage) {\n\t\tif (selectedType == null || selectedType.logTypeID == undefined) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (selectedType.logTypeID > 0) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (selectedType.logTypeID == -1) {\n\t\t\treturn logMessage.length > 0;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tprivate countDownChanged(dismissCountDown) {\n\t\tthis.dismissCountDown = dismissCountDown;\n\t}\n\n\tprivate clearSelectedCCureAlarm() {\n\t\tthis.selectedCCureAlarm = null;\n\t}\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--13-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EventRecordsCCure.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--13-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EventRecordsCCure.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./EventRecordsCCure.vue?vue&type=template&id=83f7cd6e&scoped=true&\"\nimport script from \"./EventRecordsCCure.vue?vue&type=script&lang=ts&\"\nexport * from \"./EventRecordsCCure.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./EventRecordsCCure.vue?vue&type=style&index=0&id=83f7cd6e&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"83f7cd6e\",\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EventRecordsCCure.vue?vue&type=style&index=0&id=83f7cd6e&scoped=true&lang=scss&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EventRecordsCCure.vue?vue&type=style&index=0&id=83f7cd6e&scoped=true&lang=scss&\""],"sourceRoot":""}