update POST COMMENT
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@@ -24,5 +23,5 @@ return [
|
|||||||
| directory. However, as usual, you are free to change this value.
|
| 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 { menu } from "./Menu";
|
||||||
import { cases, casesHeader } from "./Cases";
|
import { cases, casesHeader } from "./Cases";
|
||||||
|
|
||||||
|
import { caseNotes } from "./CaseNotes";
|
||||||
import { process } from "./Process";
|
import { process } from "./Process";
|
||||||
|
|
||||||
|
|
||||||
@@ -8,5 +10,6 @@ export default {
|
|||||||
menu,
|
menu,
|
||||||
cases,
|
cases,
|
||||||
casesHeader,
|
casesHeader,
|
||||||
process
|
process,
|
||||||
|
caseNotes
|
||||||
};
|
};
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
<textarea
|
<textarea
|
||||||
class="form-control"
|
class="form-control"
|
||||||
name="comments"
|
name="comments"
|
||||||
id="comments"
|
ref="comment"
|
||||||
cols="80"
|
cols="80"
|
||||||
rows="5"
|
rows="5"
|
||||||
></textarea>
|
></textarea>
|
||||||
@@ -38,14 +38,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="comment mb-2 row float-right">
|
<div class="comment mb-2 row float-right">
|
||||||
<div class="form-check v-check-comment">
|
<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">
|
<label class="form-check-label" for="sendEmail">
|
||||||
{{ $t("ID_SEND_EMAIL") }}</label
|
{{ $t("ID_SEND_EMAIL_CASE_PARTICIPANTS") }}</label
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button class="btn btn-secondary btn-sm">
|
<button class="btn btn-secondary btn-sm" @click="onClickComment">
|
||||||
{{ $t("ID_COMMENT") }}
|
{{ $t("ID_SEND") }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -60,6 +60,7 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
data: Object,
|
data: Object,
|
||||||
onClick: Function,
|
onClick: Function,
|
||||||
|
postComment: Function,
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
CaseComment,
|
CaseComment,
|
||||||
@@ -74,6 +75,14 @@ export default {
|
|||||||
classIcon(icon) {
|
classIcon(icon) {
|
||||||
return this.icon[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>
|
</script>
|
||||||
|
|||||||
@@ -59,7 +59,11 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<case-comments :data="dataComments" :onClick="onClickComment" />
|
<case-comments
|
||||||
|
:data="dataComments"
|
||||||
|
:onClick="onClickComment"
|
||||||
|
:postComment="postComment"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm4">
|
<div class="col-sm4">
|
||||||
<attached-documents :data="dataAttachedDocuments"></attached-documents>
|
<attached-documents :data="dataAttachedDocuments"></attached-documents>
|
||||||
@@ -182,6 +186,21 @@ export default {
|
|||||||
this.getCasesNotes();
|
this.getCasesNotes();
|
||||||
},
|
},
|
||||||
methods: {
|
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) {
|
onClickComment(data) {
|
||||||
let att = [];
|
let att = [];
|
||||||
this.dataAttachedDocuments.items = [];
|
this.dataAttachedDocuments.items = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user