PMCORE-2516 COMMENTS AND ATTACHED DOCUMENTS
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@@ -23,5 +24,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' => realpath(PATH_TRUNK . 'bootstrap/cache/views')
|
'compiled' => base_path('bootstrap/cache/views')
|
||||||
];
|
];
|
||||||
@@ -45,6 +45,48 @@ export let cases = {
|
|||||||
keys: {}
|
keys: {}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
inputdocuments(data) {
|
||||||
|
var params = new FormData();
|
||||||
|
params.append('appUid', data.APP_UID);
|
||||||
|
params.append('delIndex', data.DEL_INDEX);
|
||||||
|
params.append('action', "getCasesInputDocuments");
|
||||||
|
|
||||||
|
return axios.post(window.config.SYS_SERVER +
|
||||||
|
window.config.SYS_URI +
|
||||||
|
`cases/cases_Ajax.php?action=getCasesInputDocuments`, params);
|
||||||
|
},
|
||||||
|
outputdocuments(data) {
|
||||||
|
var params = new FormData();
|
||||||
|
params.append('appUid', data.APP_UID);
|
||||||
|
params.append('delIndex', data.DEL_INDEX);
|
||||||
|
params.append('action', "getCasesOutputDocuments");
|
||||||
|
|
||||||
|
return axios.post(window.config.SYS_SERVER +
|
||||||
|
window.config.SYS_URI +
|
||||||
|
`cases/cases_Ajax.php?action=getCasesOutputDocuments`, params);
|
||||||
|
},
|
||||||
|
casesummary(data) {
|
||||||
|
var params = new FormData();
|
||||||
|
params.append('appUid', data.APP_UID);
|
||||||
|
params.append('delIndex', data.DEL_INDEX);
|
||||||
|
params.append('action', "todo");
|
||||||
|
|
||||||
|
return axios.post(window.config.SYS_SERVER +
|
||||||
|
window.config.SYS_URI +
|
||||||
|
`appProxy/getSummary`, params);
|
||||||
|
},
|
||||||
|
casenotes(data) {
|
||||||
|
var params = new FormData();
|
||||||
|
params.append('appUid', data.APP_UID);
|
||||||
|
params.append('delIndex', data.DEL_INDEX);
|
||||||
|
params.append('pro', "6161281705fc91129328391060454559");
|
||||||
|
params.append('tas', "2076843175fc911573db050062710755");
|
||||||
|
params.append('start', "0");
|
||||||
|
params.append('limit', "30");
|
||||||
|
return axios.post(window.config.SYS_SERVER +
|
||||||
|
window.config.SYS_URI +
|
||||||
|
`appProxy/getNotesList`, params);
|
||||||
|
},
|
||||||
start(dt) {
|
start(dt) {
|
||||||
var params = new URLSearchParams();
|
var params = new URLSearchParams();
|
||||||
params.append('action', 'startCase');
|
params.append('action', 'startCase');
|
||||||
|
|||||||
@@ -12,29 +12,27 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { Tabs, Tab } from 'vue-slim-tabs'
|
import { Tabs, Tab } from "vue-slim-tabs";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
data: Object
|
data: Object,
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
Tabs, Tab
|
Tabs,
|
||||||
|
Tab,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
0: function() {
|
0: function () {},
|
||||||
console.log(this.data.items[0].appUid);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
selectedTab(e, index) {
|
selectedTab(e, index) {
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
console.log("fabio")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style src="vue-slim-tabs/themes/default.css"></style>
|
<style src="vue-slim-tabs/themes/default.css"></style>
|
||||||
@@ -37,6 +37,7 @@ export default {
|
|||||||
icon: {
|
icon: {
|
||||||
pdf: "fas fa-file-pdf",
|
pdf: "fas fa-file-pdf",
|
||||||
doc: "fas fa-file-word",
|
doc: "fas fa-file-word",
|
||||||
|
png: "fas fa-image",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
<template>
|
||||||
|
<div class="comment mb-2 row" @click="onClick(data)">
|
||||||
|
<div class="comment-avatar col-md-1 col-sm-2 text-center pr-1">
|
||||||
|
<a href=""
|
||||||
|
><img
|
||||||
|
class="mx-auto rounded-circle v-img-fluid"
|
||||||
|
src="http://demos.themes.guide/bodeo/assets/images/users/m103.jpg"
|
||||||
|
alt="avatar"
|
||||||
|
/></a>
|
||||||
|
</div>
|
||||||
|
<div class="comment-content col-md-11 col-sm-10 v-comment">
|
||||||
|
<div class="comment-meta">
|
||||||
|
<a href="#">{{ data.user }}</a> {{ data.date }}
|
||||||
|
</div>
|
||||||
|
<div class="comment-body">
|
||||||
|
<p>{{ data.comment }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "CaseComment",
|
||||||
|
props: {
|
||||||
|
data: Object,
|
||||||
|
onClick: Function,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
classBtn(cls) {
|
||||||
|
return "btn v-btn-request " + cls;
|
||||||
|
},
|
||||||
|
classIcon(icon) {
|
||||||
|
return this.icon[icon];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.v-img-fluid {
|
||||||
|
max-width: 30px;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
<template>
|
||||||
|
<div class="container py-2">
|
||||||
|
<div class="row"></div>
|
||||||
|
<div class="comments col-md-12" id="comments">
|
||||||
|
<p>
|
||||||
|
<b>{{ data.title }}</b>
|
||||||
|
</p>
|
||||||
|
<div v-for="item in data.items" :key="item.date">
|
||||||
|
<case-comment :data="item" :onClick="onClick" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="comments col-md-12">
|
||||||
|
<div class="comment mb-2 row">
|
||||||
|
<div class="comment-avatar col-md-1 col-sm-2 text-center pr-1">
|
||||||
|
<a href=""
|
||||||
|
><img
|
||||||
|
class="mx-auto rounded-circle v-img-fluid"
|
||||||
|
src="http://demos.themes.guide/bodeo/assets/images/users/m103.jpg"
|
||||||
|
alt="avatar"
|
||||||
|
/></a>
|
||||||
|
</div>
|
||||||
|
<div class="comment-content col-md-11 col-sm-10 v-comment">
|
||||||
|
<div class="comment-meta">
|
||||||
|
<a href="#">{{ data.user }}</a> {{ data.date }}
|
||||||
|
</div>
|
||||||
|
<div class="comment-body">
|
||||||
|
<div class="form-group">
|
||||||
|
<textarea
|
||||||
|
class="form-control"
|
||||||
|
name="comments"
|
||||||
|
id="comments"
|
||||||
|
cols="80"
|
||||||
|
rows="5"
|
||||||
|
></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</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" />
|
||||||
|
<label class="form-check-label" for="sendEmail">
|
||||||
|
{{ $t("ID_SEND_EMAIL") }}</label
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button class="btn btn-secondary btn-sm">
|
||||||
|
{{ $t("ID_COMMENT") }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import CaseComment from "./CaseComment.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "CaseComments",
|
||||||
|
props: {
|
||||||
|
data: Object,
|
||||||
|
onClick: Function,
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
CaseComment,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
classBtn(cls) {
|
||||||
|
return "btn v-btn-request " + cls;
|
||||||
|
},
|
||||||
|
classIcon(icon) {
|
||||||
|
return this.icon[icon];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.v-check-comment {
|
||||||
|
padding-right: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -25,14 +25,13 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
0: function () {
|
0: function () {
|
||||||
console.log(this.data.items[0].appUid);
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
selectedTab(e, index) {
|
selectedTab(e, index) {
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
console.log("fabio");
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="v-mycases3" ref="v-mycases2" class="v-container-mycases">
|
<div id="v-mycases3" ref="v-mycases2" class="v-container-mycases">
|
||||||
<button-fleft :data="newCase"></button-fleft>
|
<button-fleft :data="newCase"></button-fleft>
|
||||||
<GenericFilter/>
|
<GenericFilter />
|
||||||
<modal-new-request ref="newRequest"></modal-new-request>
|
<modal-new-request ref="newRequest"></modal-new-request>
|
||||||
|
|
||||||
<v-server-table
|
<v-server-table
|
||||||
@@ -50,19 +50,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import ButtonFleft from "../components/home/ButtonFleft.vue";
|
import ButtonFleft from "../components/home/ButtonFleft.vue";
|
||||||
import ModalNewRequest from "./ModalNewRequest.vue";
|
import ModalNewRequest from "./ModalNewRequest.vue";
|
||||||
import GenericFilter from "../components/search/GenericFilter"
|
import GenericFilter from "../components/search/GenericFilter";
|
||||||
import api from "./../api/index";
|
import api from "./../api/index";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AdvancedSearch",
|
name: "AdvancedSearch",
|
||||||
components: {
|
components: {
|
||||||
GenericFilter,
|
GenericFilter,
|
||||||
ButtonFleft,
|
ButtonFleft,
|
||||||
ModalNewRequest
|
ModalNewRequest,
|
||||||
},
|
},
|
||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
@@ -107,7 +105,7 @@ export default {
|
|||||||
},
|
},
|
||||||
selectable: {
|
selectable: {
|
||||||
mode: "single",
|
mode: "single",
|
||||||
only: function(row) {
|
only: function (row) {
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
selectAllMode: "page",
|
selectAllMode: "page",
|
||||||
@@ -225,9 +223,7 @@ export default {
|
|||||||
nameFormat = lastName + " " + name;
|
nameFormat = lastName + " " + name;
|
||||||
} else if (this.nameFormat === "@lastName, @firstName") {
|
} else if (this.nameFormat === "@lastName, @firstName") {
|
||||||
nameFormat = lastName + ", " + name;
|
nameFormat = lastName + ", " + name;
|
||||||
} else if (
|
} else if (this.nameFormat === "@lastName, @firstName (@userName)") {
|
||||||
this.nameFormat === "@lastName, @firstName (@userName)"
|
|
||||||
) {
|
|
||||||
nameFormat = lastName + ", " + name + " (" + userName + ")";
|
nameFormat = lastName + ", " + name + " (" + userName + ")";
|
||||||
} else {
|
} else {
|
||||||
nameFormat = name + " " + lastName;
|
nameFormat = name + " " + lastName;
|
||||||
@@ -285,19 +281,13 @@ export default {
|
|||||||
} else if (this.pmDateFormat === "Y/m/d") {
|
} else if (this.pmDateFormat === "Y/m/d") {
|
||||||
dateToConvert = dateFormat(stringToDate, "yyyy/mm/dd");
|
dateToConvert = dateFormat(stringToDate, "yyyy/mm/dd");
|
||||||
} else if (this.pmDateFormat === "F j, Y, g:i a") {
|
} else if (this.pmDateFormat === "F j, Y, g:i a") {
|
||||||
dateToConvert = dateFormat(
|
dateToConvert = dateFormat(stringToDate, "mmmm d, yyyy, h:MM tt");
|
||||||
stringToDate,
|
|
||||||
"mmmm d, yyyy, h:MM tt"
|
|
||||||
);
|
|
||||||
} else if (this.pmDateFormat === "m.d.y") {
|
} else if (this.pmDateFormat === "m.d.y") {
|
||||||
dateToConvert = dateFormat(stringToDate, "mm.dd.yy");
|
dateToConvert = dateFormat(stringToDate, "mm.dd.yy");
|
||||||
} else if (this.pmDateFormat === "j, n, Y") {
|
} else if (this.pmDateFormat === "j, n, Y") {
|
||||||
dateToConvert = dateFormat(stringToDate, "d,m,yyyy");
|
dateToConvert = dateFormat(stringToDate, "d,m,yyyy");
|
||||||
} else if (this.pmDateFormat === "D M j G:i:s T Y") {
|
} else if (this.pmDateFormat === "D M j G:i:s T Y") {
|
||||||
dateToConvert = dateFormat(
|
dateToConvert = dateFormat(stringToDate, "ddd mmm d HH:MM:ss Z yyyy");
|
||||||
stringToDate,
|
|
||||||
"ddd mmm d HH:MM:ss Z yyyy"
|
|
||||||
);
|
|
||||||
} else if (this.pmDateFormat === "M d, Y") {
|
} else if (this.pmDateFormat === "M d, Y") {
|
||||||
dateToConvert = dateFormat(stringToDate, "mmm dd, yyyy");
|
dateToConvert = dateFormat(stringToDate, "mmm dd, yyyy");
|
||||||
} else if (this.pmDateFormat === "m D, Y") {
|
} else if (this.pmDateFormat === "m D, Y") {
|
||||||
@@ -313,10 +303,7 @@ export default {
|
|||||||
} else if (this.pmDateFormat === "d.m.Y") {
|
} else if (this.pmDateFormat === "d.m.Y") {
|
||||||
dateToConvert = dateFormat(stringToDate, "mm.dd.yyyy");
|
dateToConvert = dateFormat(stringToDate, "mm.dd.yyyy");
|
||||||
} else {
|
} else {
|
||||||
dateToConvert = dateFormat(
|
dateToConvert = dateFormat(stringToDate, 'dd "de" mmmm "de" yyyy');
|
||||||
stringToDate,
|
|
||||||
'dd "de" mmmm "de" yyyy'
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
return dateToConvert;
|
return dateToConvert;
|
||||||
},
|
},
|
||||||
@@ -390,12 +377,8 @@ export default {
|
|||||||
* Open case detail
|
* Open case detail
|
||||||
* @param {*} item
|
* @param {*} item
|
||||||
*/
|
*/
|
||||||
caseDetail(item) {
|
caseDetail(item) {},
|
||||||
console.log("CaseDetail");
|
|
||||||
console.log("item");
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="case-detail" ref="case-detail" class="v-container-mycases">
|
<div id="case-detail" ref="case-detail" class="v-container-case-detail">
|
||||||
<div>
|
<div>
|
||||||
<p class="mb-2">
|
<p class="mb-2">
|
||||||
<b-icon icon="arrow-left" @click="backSearch()"></b-icon
|
<b-icon icon="arrow-left" @click="backSearch()"></b-icon
|
||||||
@@ -41,35 +41,27 @@
|
|||||||
</v-server-table>
|
</v-server-table>
|
||||||
</div>
|
</div>
|
||||||
<Tabs :data="dataTabs"></Tabs>
|
<Tabs :data="dataTabs"></Tabs>
|
||||||
<div>
|
|
||||||
<p><b>Comments</b></p>
|
|
||||||
<div class="form-group">
|
|
||||||
<textarea
|
|
||||||
class="form-control"
|
|
||||||
name="comments"
|
|
||||||
id="comments"
|
|
||||||
cols="80"
|
|
||||||
rows="5"
|
|
||||||
></textarea>
|
|
||||||
<div class="form-check">
|
|
||||||
<input type="checkbox" class="form-check-input" id="sendEmail" />
|
|
||||||
<label class="form-check-label" for="sendEmail"
|
|
||||||
>Send email to Participants</label
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
class="btn btn-secondary btn-sm"
|
|
||||||
id="comment"
|
|
||||||
name="comment"
|
|
||||||
>
|
|
||||||
Comment
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm4">
|
<div class="col-sm4">
|
||||||
<case-summary :data="dataCaseSummary"></case-summary>
|
<case-summary
|
||||||
<io-documents :data="dataIoDocuments"></io-documents>
|
v-if="dataCaseSummary"
|
||||||
|
:data="dataCaseSummary"
|
||||||
|
></case-summary>
|
||||||
|
<io-documents
|
||||||
|
v-if="
|
||||||
|
dataIoDocuments.inputDocuments.length > 0 ||
|
||||||
|
dataIoDocuments.outputDocuments.length > 0
|
||||||
|
"
|
||||||
|
:data="dataIoDocuments"
|
||||||
|
></io-documents>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<case-comments :data="dataComments" :onClick="onClickComment" />
|
||||||
|
</div>
|
||||||
|
<div class="col-sm4">
|
||||||
<attached-documents :data="dataAttachedDocuments"></attached-documents>
|
<attached-documents :data="dataAttachedDocuments"></attached-documents>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -81,6 +73,10 @@ import Tabs from "../components/home/caseDetail/Tabs.vue";
|
|||||||
import IoDocuments from "../components/home/caseDetail/IoDocuments.vue";
|
import IoDocuments from "../components/home/caseDetail/IoDocuments.vue";
|
||||||
import CaseSummary from "../components/home/caseDetail/CaseSummary.vue";
|
import CaseSummary from "../components/home/caseDetail/CaseSummary.vue";
|
||||||
import AttachedDocuments from "../components/home/caseDetail/AttachedDocuments.vue";
|
import AttachedDocuments from "../components/home/caseDetail/AttachedDocuments.vue";
|
||||||
|
import CaseComment from "../components/home/caseDetail/CaseComment";
|
||||||
|
import CaseComments from "../components/home/caseDetail/CaseComments";
|
||||||
|
|
||||||
|
import Api from "../api/index";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "CaseDetail",
|
name: "CaseDetail",
|
||||||
@@ -89,10 +85,13 @@ export default {
|
|||||||
IoDocuments,
|
IoDocuments,
|
||||||
CaseSummary,
|
CaseSummary,
|
||||||
AttachedDocuments,
|
AttachedDocuments,
|
||||||
|
CaseComment,
|
||||||
|
CaseComments,
|
||||||
},
|
},
|
||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
dataCase: null,
|
||||||
columns: [
|
columns: [
|
||||||
"task",
|
"task",
|
||||||
"case_title",
|
"case_title",
|
||||||
@@ -129,66 +128,16 @@ export default {
|
|||||||
},
|
},
|
||||||
filterable: false,
|
filterable: false,
|
||||||
},
|
},
|
||||||
dataCaseSummary: {
|
dataCaseSummary: null,
|
||||||
title: "Case Summary",
|
|
||||||
titleActions: "Actions",
|
|
||||||
btnLabel: "Cancel Request",
|
|
||||||
btnType: false,
|
|
||||||
onClick: () => {
|
|
||||||
console.log("acitons");
|
|
||||||
},
|
|
||||||
label: {
|
|
||||||
numberCase: "Case #",
|
|
||||||
process: "Process",
|
|
||||||
status: "Status",
|
|
||||||
caseTitle: "Case title",
|
|
||||||
created: "Created",
|
|
||||||
delegationDate: "Delegation Date",
|
|
||||||
duration: "Duration",
|
|
||||||
},
|
|
||||||
text: {
|
|
||||||
numberCase: "",
|
|
||||||
process: "",
|
|
||||||
status: "",
|
|
||||||
caseTitle: "",
|
|
||||||
created: "",
|
|
||||||
delegationDate: "",
|
|
||||||
duration: "",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
dataIoDocuments: {
|
dataIoDocuments: {
|
||||||
titleInput: "Input Document",
|
titleInput: this.$i18n.t("ID_REQUEST_DOCUMENTS"),
|
||||||
inputDocuments: [
|
titleOutput: this.$i18n.t("ID_OUTPUT_DOCUMENTS"),
|
||||||
{
|
inputDocuments: [],
|
||||||
title: "Invoice January 2018.pdf",
|
outputDocuments: [],
|
||||||
extension: "pdf",
|
|
||||||
onClick: () => {
|
|
||||||
console.log("Attached document");
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
titleOutput: "Output Document",
|
|
||||||
outputDocuments: [
|
|
||||||
{
|
|
||||||
title: "Invoice January 2018.pdf",
|
|
||||||
extension: "pdf",
|
|
||||||
onClick: () => {
|
|
||||||
console.log("Attached document");
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
dataAttachedDocuments: {
|
dataAttachedDocuments: {
|
||||||
title: "Attached Documents",
|
title: "Attached Documents",
|
||||||
items: [
|
items: [],
|
||||||
{
|
|
||||||
title: "Invoice January 2018.pdf",
|
|
||||||
extension: "pdf",
|
|
||||||
onClick: () => {
|
|
||||||
console.log("Attached document");
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
dataTabs: {
|
dataTabs: {
|
||||||
items: [
|
items: [
|
||||||
@@ -216,24 +165,39 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
dataComments: {
|
||||||
|
title: "Comments",
|
||||||
|
items: [],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
this.dataCase = this.$parent.dataCase;
|
||||||
this.$el.getElementsByClassName("VuePagination__count")[0].remove();
|
this.$el.getElementsByClassName("VuePagination__count")[0].remove();
|
||||||
this.getDataCaseSummary();
|
this.getDataCaseSummary();
|
||||||
this.getDataIODocuments();
|
this.getInputDocuments();
|
||||||
|
this.getOutputDocuments();
|
||||||
|
this.getCasesNotes();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onClickComment(data) {
|
||||||
|
let att = [];
|
||||||
|
this.dataAttachedDocuments.items = [];
|
||||||
|
_.each(data.data.attachments, (a) => {
|
||||||
|
att.push({
|
||||||
|
data: a,
|
||||||
|
title: a.APP_DOC_FILENAME,
|
||||||
|
extension: a.APP_DOC_FILENAME.split(".").pop(),
|
||||||
|
onClick: () => {},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.dataAttachedDocuments.items = att;
|
||||||
|
},
|
||||||
getDataCaseSummary() {
|
getDataCaseSummary() {
|
||||||
var data = new FormData();
|
Api.cases
|
||||||
data.append("appUid", APP_UID);
|
.casesummary(this.dataCase)
|
||||||
data.append("delIndex", DEL_INDEX);
|
|
||||||
data.append("action", "todo");
|
|
||||||
|
|
||||||
ProcessMaker.apiClient
|
|
||||||
.post("../../../appProxy/getSummary", data)
|
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
var data = response.data;
|
var data = response.data;
|
||||||
this.dataCaseSummary = {
|
this.dataCaseSummary = {
|
||||||
@@ -241,9 +205,7 @@ export default {
|
|||||||
titleActions: "Actions",
|
titleActions: "Actions",
|
||||||
btnLabel: "Cancel Request",
|
btnLabel: "Cancel Request",
|
||||||
btnType: false,
|
btnType: false,
|
||||||
onClick: () => {
|
onClick: () => {},
|
||||||
console.log("acitons");
|
|
||||||
},
|
|
||||||
label: {
|
label: {
|
||||||
numberCase: data[2].label,
|
numberCase: data[2].label,
|
||||||
process: data[0].label,
|
process: data[0].label,
|
||||||
@@ -268,21 +230,11 @@ export default {
|
|||||||
throw new Error(err);
|
throw new Error(err);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getDataIODocuments() {
|
|
||||||
this.getInputDocuments();
|
|
||||||
this.getOutputDocuments();
|
|
||||||
},
|
|
||||||
getInputDocuments() {
|
getInputDocuments() {
|
||||||
var data = new FormData();
|
Api.cases
|
||||||
data.append("appUid", APP_UID);
|
.inputdocuments(this.dataCase)
|
||||||
data.append("delIndex", DEL_INDEX);
|
|
||||||
ProcessMaker.apiClient
|
|
||||||
.post(
|
|
||||||
"../../../cases/cases_Ajax.php?action=getCasesInputDocuments",
|
|
||||||
data
|
|
||||||
)
|
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
var data = response.data,
|
let data = response.data,
|
||||||
document = data.data,
|
document = data.data,
|
||||||
i,
|
i,
|
||||||
info;
|
info;
|
||||||
@@ -304,14 +256,8 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
getOutputDocuments() {
|
getOutputDocuments() {
|
||||||
var data = new FormData();
|
Api.cases
|
||||||
data.append("appUid", APP_UID);
|
.outputdocuments(this.dataCase)
|
||||||
data.append("delIndex", DEL_INDEX);
|
|
||||||
ProcessMaker.apiClient
|
|
||||||
.post(
|
|
||||||
"../../../cases/cases_Ajax.php?action=getCasesOutputDocuments",
|
|
||||||
data
|
|
||||||
)
|
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
var data = response.data,
|
var data = response.data,
|
||||||
document = data.data,
|
document = data.data,
|
||||||
@@ -334,6 +280,76 @@ export default {
|
|||||||
throw new Error(err);
|
throw new Error(err);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Get for user format name configured in Processmaker Environment Settings
|
||||||
|
*
|
||||||
|
* @param {string} name
|
||||||
|
* @param {string} lastName
|
||||||
|
* @param {string} userName
|
||||||
|
* @return {string} nameFormat
|
||||||
|
*/
|
||||||
|
nameFormatCases(name, lastName, userName) {
|
||||||
|
let nameFormat = "";
|
||||||
|
if (/^\s*$/.test(name) && /^\s*$/.test(lastName)) {
|
||||||
|
return nameFormat;
|
||||||
|
}
|
||||||
|
if (this.nameFormat === "@firstName @lastName") {
|
||||||
|
nameFormat = name + " " + lastName;
|
||||||
|
} else if (this.nameFormat === "@firstName @lastName (@userName)") {
|
||||||
|
nameFormat = name + " " + lastName + " (" + userName + ")";
|
||||||
|
} else if (this.nameFormat === "@userName") {
|
||||||
|
nameFormat = userName;
|
||||||
|
} else if (this.nameFormat === "@userName (@firstName @lastName)") {
|
||||||
|
nameFormat = userName + " (" + name + " " + lastName + ")";
|
||||||
|
} else if (this.nameFormat === "@lastName @firstName") {
|
||||||
|
nameFormat = lastName + " " + name;
|
||||||
|
} else if (this.nameFormat === "@lastName, @firstName") {
|
||||||
|
nameFormat = lastName + ", " + name;
|
||||||
|
} else if (this.nameFormat === "@lastName, @firstName (@userName)") {
|
||||||
|
nameFormat = lastName + ", " + name + " (" + userName + ")";
|
||||||
|
} else {
|
||||||
|
nameFormat = name + " " + lastName;
|
||||||
|
}
|
||||||
|
return nameFormat;
|
||||||
|
},
|
||||||
|
|
||||||
|
getCasesNotes() {
|
||||||
|
let that = this;
|
||||||
|
Api.cases
|
||||||
|
.casenotes(this.dataCase)
|
||||||
|
.then((response) => {
|
||||||
|
that.formatResponseCaseNotes(response.data.notes);
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
throw new Error(err);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
formatResponseCaseNotes(notes) {
|
||||||
|
let that = this,
|
||||||
|
notesArray = [];
|
||||||
|
_.each(notes, (n) => {
|
||||||
|
notesArray.push({
|
||||||
|
user: that.nameFormatCases(
|
||||||
|
n.USR_FIRSTNAME,
|
||||||
|
n.USR_LASTNAME,
|
||||||
|
n.USR_USERNAME
|
||||||
|
),
|
||||||
|
date: n.NOTE_DATE,
|
||||||
|
comment: n.NOTE_CONTENT,
|
||||||
|
data: n,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
this.dataComments.items = notesArray;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style>
|
||||||
|
.v-container-case-detail {
|
||||||
|
padding-top: 20px;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
padding-left: 50px;
|
||||||
|
padding-right: 0px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
ref="vueTable"
|
ref="vueTable"
|
||||||
>
|
>
|
||||||
<div slot="detail" slot-scope="props">
|
<div slot="detail" slot-scope="props">
|
||||||
<div class="btn-default" @click="openCaseDetail(props)">
|
<div class="btn-default" @click="openCaseDetail(props.row)">
|
||||||
<i class="fas fa-info-circle"></i>
|
<i class="fas fa-info-circle"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -173,6 +173,8 @@ export default {
|
|||||||
DUE_DATE: v.DEL_TASK_DUE_DATE,
|
DUE_DATE: v.DEL_TASK_DUE_DATE,
|
||||||
DELEGATION_DATE: v.DEL_DELEGATE_DATE,
|
DELEGATION_DATE: v.DEL_DELEGATE_DATE,
|
||||||
PRIORITY: v.DEL_PRIORITY_LABEL,
|
PRIORITY: v.DEL_PRIORITY_LABEL,
|
||||||
|
DEL_INDEX: v.DEL_INDEX,
|
||||||
|
APP_UID: v.APP_UID,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return data;
|
return data;
|
||||||
@@ -231,7 +233,6 @@ export default {
|
|||||||
this.$parent.dataCase = {
|
this.$parent.dataCase = {
|
||||||
APP_UID: item.APP_UID,
|
APP_UID: item.APP_UID,
|
||||||
DEL_INDEX: item.DEL_INDEX,
|
DEL_INDEX: item.DEL_INDEX,
|
||||||
ACTION: "todo",
|
|
||||||
};
|
};
|
||||||
this.$parent.page = "case-detail";
|
this.$parent.page = "case-detail";
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -550,6 +550,7 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
|
|||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
$fields = $oCase->loadCase($_POST['appUid']);
|
$fields = $oCase->loadCase($_POST['appUid']);
|
||||||
$sProcessUID = $fields['PRO_UID'];
|
$sProcessUID = $fields['PRO_UID'];
|
||||||
|
$aProcesses = [];
|
||||||
$criteria = $oCase->getAllUploadedDocumentsCriteria(
|
$criteria = $oCase->getAllUploadedDocumentsCriteria(
|
||||||
$sProcessUID,
|
$sProcessUID,
|
||||||
$_POST['appUid'],
|
$_POST['appUid'],
|
||||||
@@ -834,8 +835,7 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
|
|||||||
|
|
||||||
global $G_PUBLISH;
|
global $G_PUBLISH;
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'processes/processes_viewreassignCase', $oCriteria, array('THETYPE' => 'ADHOC'
|
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'processes/processes_viewreassignCase', $oCriteria, array('THETYPE' => 'ADHOC'));
|
||||||
));
|
|
||||||
G::RenderPage('publish', 'raw');
|
G::RenderPage('publish', 'raw');
|
||||||
break;
|
break;
|
||||||
case 'showHistoryMessages':
|
case 'showHistoryMessages':
|
||||||
@@ -909,8 +909,7 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
|
|||||||
'OAUTH_REFRESH_TOKEN' => $aSetup['OAUTH_REFRESH_TOKEN']
|
'OAUTH_REFRESH_TOKEN' => $aSetup['OAUTH_REFRESH_TOKEN']
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$oSpool->create(array('msg_uid' => $data['MSG_UID'], 'app_uid' => $data['APP_UID'], 'del_index' => $data['DEL_INDEX'], 'app_msg_type' => $data['APP_MSG_TYPE'], 'app_msg_subject' => $data['APP_MSG_SUBJECT'], 'app_msg_from' => $data['APP_MSG_FROM'], 'app_msg_to' => $data['APP_MSG_TO'], 'app_msg_body' => $data['APP_MSG_BODY'], 'app_msg_cc' => $data['APP_MSG_CC'], 'app_msg_bcc' => $data['APP_MSG_BCC'], 'app_msg_attach' => $data['APP_MSG_ATTACH'], 'app_msg_template' => $data['APP_MSG_TEMPLATE'], 'app_msg_status' => 'pending'
|
$oSpool->create(array('msg_uid' => $data['MSG_UID'], 'app_uid' => $data['APP_UID'], 'del_index' => $data['DEL_INDEX'], 'app_msg_type' => $data['APP_MSG_TYPE'], 'app_msg_subject' => $data['APP_MSG_SUBJECT'], 'app_msg_from' => $data['APP_MSG_FROM'], 'app_msg_to' => $data['APP_MSG_TO'], 'app_msg_body' => $data['APP_MSG_BODY'], 'app_msg_cc' => $data['APP_MSG_CC'], 'app_msg_bcc' => $data['APP_MSG_BCC'], 'app_msg_attach' => $data['APP_MSG_ATTACH'], 'app_msg_template' => $data['APP_MSG_TEMPLATE'], 'app_msg_status' => 'pending'));
|
||||||
));
|
|
||||||
$oSpool->sendMail();
|
$oSpool->sendMail();
|
||||||
break;
|
break;
|
||||||
/* @Author Erik Amaru Ortiz <erik@colosa.com> */
|
/* @Author Erik Amaru Ortiz <erik@colosa.com> */
|
||||||
@@ -963,11 +962,9 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
|
|||||||
array_push($aCasesList, $aCase);
|
array_push($aCasesList, $aCase);
|
||||||
}
|
}
|
||||||
|
|
||||||
$filedNames = array("APP_UID", "APP_NUMBER", "APP_UPDATE_DATE", "DEL_PRIORITY", "DEL_INDEX", "TAS_UID", "DEL_INIT_DATE", "DEL_FINISH_DATE", "USR_UID", "APP_STATUS", "DEL_TASK_DUE_DATE", "APP_CURRENT_USER", "APP_TITLE", "APP_PRO_TITLE", "APP_TAS_TITLE", "APP_DEL_PREVIOUS_USER", "USERS"
|
$filedNames = array("APP_UID", "APP_NUMBER", "APP_UPDATE_DATE", "DEL_PRIORITY", "DEL_INDEX", "TAS_UID", "DEL_INIT_DATE", "DEL_FINISH_DATE", "USR_UID", "APP_STATUS", "DEL_TASK_DUE_DATE", "APP_CURRENT_USER", "APP_TITLE", "APP_PRO_TITLE", "APP_TAS_TITLE", "APP_DEL_PREVIOUS_USER", "USERS");
|
||||||
);
|
|
||||||
|
|
||||||
$aCasesList = array_merge(array($filedNames
|
$aCasesList = array_merge(array($filedNames), $aCasesList);
|
||||||
), $aCasesList);
|
|
||||||
|
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
$_DBArray['reassign_byuser'] = $aCasesList;
|
$_DBArray['reassign_byuser'] = $aCasesList;
|
||||||
@@ -1079,7 +1076,7 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
|
|||||||
$response['exists'] = false;
|
$response['exists'] = false;
|
||||||
$response['message'] = G::LoadTranslation('ID_NO_PERMISSION_NO_PARTICIPATED');
|
$response['message'] = G::LoadTranslation('ID_NO_PERMISSION_NO_PARTICIPATED');
|
||||||
}
|
}
|
||||||
} else {//Check if the user participated in this case
|
} else { //Check if the user participated in this case
|
||||||
if (!$aUserCanAccess['participated'] && !$aUserCanAccess['rolesPermissions']['PM_ALLCASES'] && !$aUserCanAccess['objectPermissions']['SUMMARY_FORM']) {
|
if (!$aUserCanAccess['participated'] && !$aUserCanAccess['rolesPermissions']['PM_ALLCASES'] && !$aUserCanAccess['objectPermissions']['SUMMARY_FORM']) {
|
||||||
$response['exists'] = false;
|
$response['exists'] = false;
|
||||||
$response['message'] = G::LoadTranslation('ID_NO_PERMISSION_NO_PARTICIPATED');
|
$response['message'] = G::LoadTranslation('ID_NO_PERMISSION_NO_PARTICIPATED');
|
||||||
|
|||||||
Reference in New Issue
Block a user