update POST COMMENT
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -24,5 +23,5 @@ return [
|
||||
| directory. However, as usual, you are free to change this value.
|
||||
|
|
||||
*/
|
||||
'compiled' => base_path('bootstrap/cache/views')
|
||||
];
|
||||
'compiled' => realpath(PATH_TRUNK . 'bootstrap/cache/views')
|
||||
];
|
||||
13
resources/assets/js/api/CaseNotes.js
Normal file
13
resources/assets/js/api/CaseNotes.js
Normal file
@@ -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);
|
||||
}
|
||||
};
|
||||
@@ -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
|
||||
};
|
||||
@@ -28,7 +28,7 @@
|
||||
<textarea
|
||||
class="form-control"
|
||||
name="comments"
|
||||
id="comments"
|
||||
ref="comment"
|
||||
cols="80"
|
||||
rows="5"
|
||||
></textarea>
|
||||
@@ -38,14 +38,14 @@
|
||||
</div>
|
||||
<div class="comment mb-2 row float-right">
|
||||
<div class="form-check v-check-comment">
|
||||
<input type="checkbox" class="form-check-input" id="sendEmail" />
|
||||
<input type="checkbox" class="form-check-input" ref="send" />
|
||||
<label class="form-check-label" for="sendEmail">
|
||||
{{ $t("ID_SEND_EMAIL") }}</label
|
||||
{{ $t("ID_SEND_EMAIL_CASE_PARTICIPANTS") }}</label
|
||||
>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-secondary btn-sm">
|
||||
{{ $t("ID_COMMENT") }}
|
||||
<button class="btn btn-secondary btn-sm" @click="onClickComment">
|
||||
{{ $t("ID_SEND") }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -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;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -59,7 +59,11 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<case-comments :data="dataComments" :onClick="onClickComment" />
|
||||
<case-comments
|
||||
:data="dataComments"
|
||||
:onClick="onClickComment"
|
||||
:postComment="postComment"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-sm4">
|
||||
<attached-documents :data="dataAttachedDocuments"></attached-documents>
|
||||
@@ -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 = [];
|
||||
|
||||
Reference in New Issue
Block a user