diff --git a/config/view.php b/config/view.php index 0b15354d0..e5823f73b 100644 --- a/config/view.php +++ b/config/view.php @@ -1,5 +1,4 @@ base_path('bootstrap/cache/views') -]; + 'compiled' => realpath(PATH_TRUNK . 'bootstrap/cache/views') +]; \ No newline at end of file diff --git a/resources/assets/js/api/CaseNotes.js b/resources/assets/js/api/CaseNotes.js new file mode 100644 index 000000000..071edc35e --- /dev/null +++ b/resources/assets/js/api/CaseNotes.js @@ -0,0 +1,13 @@ +import axios from "axios"; + +export let caseNotes = { + post(data) { + var params = new FormData(); + params.append('appUid', data.APP_UID); + params.append('noteText', data.COMMENT); + params.append('swSendMail', data.SEND_MAIL ? 1 : 0); + return axios.post(window.config.SYS_SERVER + + window.config.SYS_URI + + `appProxy/postNote`, params); + } +}; diff --git a/resources/assets/js/api/index.js b/resources/assets/js/api/index.js index 02a2b417f..096b8f419 100644 --- a/resources/assets/js/api/index.js +++ b/resources/assets/js/api/index.js @@ -1,6 +1,8 @@ import { menu } from "./Menu"; import { cases, casesHeader } from "./Cases"; + +import { caseNotes } from "./CaseNotes"; import { process } from "./Process"; @@ -8,5 +10,6 @@ export default { menu, cases, casesHeader, - process + process, + caseNotes }; \ No newline at end of file diff --git a/resources/assets/js/components/home/caseDetail/CaseComments.vue b/resources/assets/js/components/home/caseDetail/CaseComments.vue index 8daa8f8e4..5be75cc69 100644 --- a/resources/assets/js/components/home/caseDetail/CaseComments.vue +++ b/resources/assets/js/components/home/caseDetail/CaseComments.vue @@ -28,7 +28,7 @@ @@ -38,14 +38,14 @@
- +
-
@@ -60,6 +60,7 @@ export default { props: { data: Object, onClick: Function, + postComment: Function, }, components: { CaseComment, @@ -74,6 +75,14 @@ export default { classIcon(icon) { return this.icon[icon]; }, + onClickComment() { + this.postComment(this.$refs["comment"].value, this.$refs["send"].checked); + this.resetComment(); + }, + resetComment() { + this.$refs["comment"].value = ""; + this.$refs["send"].checked = false; + }, }, }; diff --git a/resources/assets/js/home/CaseDetail.vue b/resources/assets/js/home/CaseDetail.vue index 2ca1e10d3..994465c5f 100644 --- a/resources/assets/js/home/CaseDetail.vue +++ b/resources/assets/js/home/CaseDetail.vue @@ -59,7 +59,11 @@
- +
@@ -182,6 +186,21 @@ export default { this.getCasesNotes(); }, methods: { + postComment(comment, send) { + let that = this; + Api.caseNotes + .post( + _.extend({}, this.dataCase, { + COMMENT: comment, + SEND_MAIL: send, + }) + ) + .then((response) => { + if (response.data.success === "success") { + that.getCasesNotes(); + } + }); + }, onClickComment(data) { let att = []; this.dataAttachedDocuments.items = [];