From b071d9e35b992e90dad00528ebcb419780c25ced Mon Sep 17 00:00:00 2001 From: Rodrigo Quelca Date: Mon, 18 Oct 2021 16:02:11 +0000 Subject: [PATCH] PMCORE-3440: Custom Case List > Add a Case Note from ellipse does not work for each view. --- .../js/home/CustomCaseList/CustomCaseList.vue | 31 ++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/resources/assets/js/home/CustomCaseList/CustomCaseList.vue b/resources/assets/js/home/CustomCaseList/CustomCaseList.vue index c88a84b92..14bb0acb6 100644 --- a/resources/assets/js/home/CustomCaseList/CustomCaseList.vue +++ b/resources/assets/js/home/CustomCaseList/CustomCaseList.vue @@ -199,6 +199,10 @@ + @@ -219,6 +223,7 @@ import defaultMixins from "./defaultMixins"; import Ellipsis from "../../components/utils/ellipsis.vue"; import ModalPauseCase from "../modal/ModalPauseCase.vue"; import ModalReassignCase from "../modal/ModalReassignCase.vue"; +import ModalComments from "../modal/ModalComments.vue" import { Event } from "vue-tables-2"; import CurrentUserCell from "../../components/vuetable/CurrentUserCell.vue"; import _ from "lodash"; @@ -241,6 +246,7 @@ export default { ModalPauseCase, ModalReassignCase, CurrentUserCell, + ModalComments }, props: ["defaultOption", "settings", "data"], data() { @@ -1039,6 +1045,23 @@ export default { this.$refs["modal-unpause-case"].data = item; this.$refs["modal-unpause-case"].show(); }, + /** + * Open the case notes modal + * @param {object} data - needed to create the data + */ + openComments(data) { + let that = this; + api.cases.open(_.extend({ ACTION: "todo" }, data)).then(() => { + that.$refs["modal-comments"].dataCase = data; + that.$refs["modal-comments"].show(); + }); + }, + /** + * Post notes event handler + */ + onPostNotes() { + this.$refs["vueTable"].getData(); + }, /** * Json factory for ellipsis control item * @param {object} data @@ -1061,7 +1084,7 @@ export default { name: "case note", icon: "far fa-comments", fn: function() { - that.openCaseDetail(data); + that.openComments(data); }, }, reassign: { @@ -1093,7 +1116,7 @@ export default { name: "case note", icon: "far fa-comments", fn: function() { - that.openCaseDetail(data); + that.openComments(data); } }, } @@ -1104,7 +1127,7 @@ export default { name: "case note", icon: "far fa-comments", fn: function() { - that.openCaseDetail(data); + that.openComments(data); } }, play: { @@ -1129,7 +1152,7 @@ export default { name: "case note", icon: "far fa-comments", fn: function() { - that.openCaseDetail(data); + that.openComments(data); } }, claim: {