Merge branch 'develop' of bitbucket.org:colosa/processmaker into develop
This commit is contained in:
@@ -5,7 +5,7 @@ const services = {
|
|||||||
AUTHENTICATE_USER: "/oauth2/token",
|
AUTHENTICATE_USER: "/oauth2/token",
|
||||||
USER_DATA: "/light/user/data",
|
USER_DATA: "/light/user/data",
|
||||||
GET_MAIN_MENU_COUNTERS: "/light/counters",
|
GET_MAIN_MENU_COUNTERS: "/light/counters",
|
||||||
GET_CASE_NOTES_LIST: "/light/case/{app_uid}/notes",
|
GET_NOTES: "/cases/{app_uid}/notes/paged?files={files}",
|
||||||
GET_PROCESS_MAP: "/light/project/{prj_uid}/case/{app_uid}",
|
GET_PROCESS_MAP: "/light/project/{prj_uid}/case/{app_uid}",
|
||||||
GET_LIST_UNASSIGNED: "/light/unassigned{suffix}",
|
GET_LIST_UNASSIGNED: "/light/unassigned{suffix}",
|
||||||
GET_LISTS_PARTICIPATED: "/light/participated{suffix}",
|
GET_LISTS_PARTICIPATED: "/light/participated{suffix}",
|
||||||
@@ -22,15 +22,15 @@ const services = {
|
|||||||
UPLOAD_FILE: "/light/case/{app_uid}/upload/{app_doc_uid}",
|
UPLOAD_FILE: "/light/case/{app_uid}/upload/{app_doc_uid}",
|
||||||
GET_CASE_INFO: "/light/{type}/case/{app_uid}",
|
GET_CASE_INFO: "/light/{type}/case/{app_uid}",
|
||||||
REQUEST_PAUSE_CASE: "/light/cases/{app_uid}/pause",
|
REQUEST_PAUSE_CASE: "/light/cases/{app_uid}/pause",
|
||||||
REQUEST_UNPAUSE_CASE: "/light/cases/{app_uid}/unpause",
|
UNPAUSE_CASE: "/cases/{app_uid}/unpause",
|
||||||
REQUEST_CANCEL_CASE: "/light/cases/{app_uid}/cancel",
|
CANCEL_CASE: "/cases/{app_uid}/cancel",
|
||||||
REQUEST_SYS_CONFIG: "/light/config",
|
REQUEST_SYS_CONFIG: "/light/config",
|
||||||
REQUEST_SYS_CONFIG_V2: "/light/config?fileLimit=true",
|
REQUEST_SYS_CONFIG_V2: "/light/config?fileLimit=true",
|
||||||
ROUTE_CASE: "/light/cases/{app_uid}/route-case",
|
ROUTE_CASE: "/light/cases/{app_uid}/route-case",
|
||||||
CLAIM_CASE: "/light/case/{app_uid}/claim",
|
CLAIM_CASE: "/case/{app_uid}/claim",
|
||||||
GET_FILE_VERSIONS: "/cases/{app_uid}/input-document/{app_doc_uid}/versions",
|
GET_FILE_VERSIONS: "/cases/{app_uid}/input-document/{app_doc_uid}/versions",
|
||||||
REGISTER: "https:trial32.processmaker.com/syscolosa/en/neoclassic_pro/9893000714bdb2d52ecc317052629917/Trial_RequestPostMobile.php",
|
REGISTER: "https:trial32.processmaker.com/syscolosa/en/neoclassic_pro/9893000714bdb2d52ecc317052629917/Trial_RequestPostMobile.php",
|
||||||
ADD_NOTE: "/light/case/{app_uid}/note",
|
POST_NOTE: "/case/{app_uid}/note",
|
||||||
LAST_OPEN_INDEX: "/light/lastopenindex/case/{app_uid}",
|
LAST_OPEN_INDEX: "/light/lastopenindex/case/{app_uid}",
|
||||||
REGISTER_WITH_GOOGLE_FAKE_URL: "fakeurl",
|
REGISTER_WITH_GOOGLE_FAKE_URL: "fakeurl",
|
||||||
SIGN_IN_TO_PM_WITH_GOOGLE: "/authentication/gmail",
|
SIGN_IN_TO_PM_WITH_GOOGLE: "/authentication/gmail",
|
||||||
@@ -153,6 +153,7 @@ export default {
|
|||||||
params = options.params || {},
|
params = options.params || {},
|
||||||
data = options.data || {},
|
data = options.data || {},
|
||||||
keys = options.keys || {},
|
keys = options.keys || {},
|
||||||
|
headers = options.headers || {},
|
||||||
url,
|
url,
|
||||||
credentials = window.config.SYS_CREDENTIALS,
|
credentials = window.config.SYS_CREDENTIALS,
|
||||||
workspace = window.config.SYS_WORKSPACE,
|
workspace = window.config.SYS_WORKSPACE,
|
||||||
@@ -165,15 +166,39 @@ export default {
|
|||||||
url: url,
|
url: url,
|
||||||
params,
|
params,
|
||||||
data,
|
data,
|
||||||
headers: {
|
headers: _.extend({
|
||||||
"Accept": "application/json",
|
"Accept": "application/json",
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"Authorization": `Bearer ` + credentials.accessToken,
|
"Authorization": `Bearer ` + credentials.accessToken,
|
||||||
"Accept-Language": lang
|
"Accept-Language": lang
|
||||||
}
|
}, headers)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
postFiles(options) {
|
||||||
|
let service = options.service || "",
|
||||||
|
params = options.params || {},
|
||||||
|
data = options.data || {},
|
||||||
|
keys = options.keys || {},
|
||||||
|
headers = options.headers || {},
|
||||||
|
url,
|
||||||
|
credentials = window.config.SYS_CREDENTIALS,
|
||||||
|
workspace = window.config.SYS_WORKSPACE,
|
||||||
|
server = window.config.SYS_SERVER_API;
|
||||||
|
url = this.getUrl(_.extend(keys, credentials, { server }, { workspace }), service);
|
||||||
|
|
||||||
|
return axios({
|
||||||
|
method: "post",
|
||||||
|
url: url,
|
||||||
|
params,
|
||||||
|
data,
|
||||||
|
headers: _.extend({
|
||||||
|
"Accept": "application/json",
|
||||||
|
"Authorization": `Bearer ` + credentials.accessToken
|
||||||
|
}, headers)
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
delete(options) {
|
delete(options) {
|
||||||
let service = options.service || "",
|
let service = options.service || "",
|
||||||
id = options.id || {},
|
id = options.id || {},
|
||||||
@@ -211,7 +236,35 @@ export default {
|
|||||||
|
|
||||||
return axios({
|
return axios({
|
||||||
method: "put",
|
method: "put",
|
||||||
url: url + id,
|
url: url,
|
||||||
|
params,
|
||||||
|
data,
|
||||||
|
headers: {
|
||||||
|
"Accept": "application/json",
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
"Authorization": `Bearer ` + credentials.accessToken
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Put action in AXIOS
|
||||||
|
* @param {*} options
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
update(options) {
|
||||||
|
let service = options.service || "",
|
||||||
|
params = options.params || {},
|
||||||
|
data = options.data || {},
|
||||||
|
keys = options.keys || {},
|
||||||
|
url,
|
||||||
|
credentials = window.config.SYS_CREDENTIALS,
|
||||||
|
workspace = window.config.SYS_WORKSPACE,
|
||||||
|
server = window.config.SYS_SERVER_API;
|
||||||
|
url = this.getUrl(_.extend(keys, credentials, { server }, { workspace }), service);
|
||||||
|
|
||||||
|
return axios({
|
||||||
|
method: "put",
|
||||||
|
url: url,
|
||||||
params,
|
params,
|
||||||
data,
|
data,
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -1,21 +1,47 @@
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
import Api from "./Api.js";
|
||||||
|
|
||||||
export let caseNotes = {
|
export let caseNotes = {
|
||||||
post(data) {
|
post(data) {
|
||||||
var params = new FormData();
|
var params = new FormData();
|
||||||
params.append('appUid', data.APP_UID);
|
params.append('appUid', data.APP_UID);
|
||||||
params.append('noteText', data.COMMENT);
|
params.append('note_content', data.COMMENT);
|
||||||
params.append('swSendMail', data.SEND_MAIL ? 1 : 0);
|
params.append('send_mail', data.SEND_MAIL ? 1 : 0);
|
||||||
|
|
||||||
_.each(data.FILES, (f) => {
|
_.each(data.FILES, (f) => {
|
||||||
params.append("filesToUpload[]", f);
|
params.append("filesToUpload[]", f);
|
||||||
})
|
})
|
||||||
return axios.post(window.config.SYS_SERVER_AJAX +
|
|
||||||
window.config.SYS_URI +
|
return Api.postFiles({
|
||||||
`appProxy/postNote`, params, {
|
service: "POST_NOTE",
|
||||||
headers: {
|
data: params,
|
||||||
"Content-Type": "multipart/form-data",
|
headers:{
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
},
|
},
|
||||||
|
keys: {
|
||||||
|
app_uid: data.APP_UID
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
get(data) {
|
||||||
|
var params = new FormData();
|
||||||
|
params.append('appUid', data.APP_UID);
|
||||||
|
params.append('delIndex', data.DEL_INDEX);
|
||||||
|
params.append('pro', data.PRO_UID);
|
||||||
|
params.append('tas', data.TAS_UID);
|
||||||
|
params.append('start', "0");
|
||||||
|
params.append('limit', "30");
|
||||||
|
|
||||||
|
return Api.get({
|
||||||
|
service: "GET_NOTES",
|
||||||
|
params:{
|
||||||
|
start: "0",
|
||||||
|
limit: "30",
|
||||||
|
files: true
|
||||||
|
},
|
||||||
|
keys: {
|
||||||
|
app_uid: data.APP_UID
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -132,13 +132,16 @@ export let cases = {
|
|||||||
`cases/cases_Open?APP_UID=${data.APP_UID}&DEL_INDEX=${data.DEL_INDEX}&action=${data.ACTION}`);
|
`cases/cases_Open?APP_UID=${data.APP_UID}&DEL_INDEX=${data.DEL_INDEX}&action=${data.ACTION}`);
|
||||||
},
|
},
|
||||||
cancel(data) {
|
cancel(data) {
|
||||||
var params = new URLSearchParams();
|
return Api.update({
|
||||||
params.append('action', 'cancelCase');
|
service: "CANCEL_CASE",
|
||||||
params.append('NOTE_REASON', data.COMMENT);
|
data: {
|
||||||
params.append('NOTIFY_CANCEL', data.SEND);
|
reason: data.COMMENT,
|
||||||
return axios.post(window.config.SYS_SERVER_AJAX +
|
sendMail: data.SEND
|
||||||
window.config.SYS_URI +
|
},
|
||||||
`cases/ajaxListener`, params);
|
keys: {
|
||||||
|
app_uid: data.APP_UID
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
actions(data) {
|
actions(data) {
|
||||||
var params = new URLSearchParams();
|
var params = new URLSearchParams();
|
||||||
@@ -148,20 +151,35 @@ export let cases = {
|
|||||||
window.config.SYS_URI +
|
window.config.SYS_URI +
|
||||||
`cases/ajaxListener`, params);
|
`cases/ajaxListener`, params);
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Unpause case with endpoint
|
||||||
|
* @param {*} data
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
unpause(data) {
|
unpause(data) {
|
||||||
var params = new URLSearchParams();
|
return Api.update({
|
||||||
params.append('action', 'unpauseCase');
|
service: "UNPAUSE_CASE",
|
||||||
params.append('sApplicationUID', data.APP_UID);
|
data: {},
|
||||||
params.append('iIndex', data.DEL_INDEX);
|
keys: {
|
||||||
return axios.post(window.config.SYS_SERVER_AJAX +
|
app_uid: data.APP_UID
|
||||||
window.config.SYS_URI +
|
}
|
||||||
`cases/cases_Ajax`, params);
|
});
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Claim case with endpoint
|
||||||
|
* @param {*} data
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
claim(data) {
|
claim(data) {
|
||||||
var params = new URLSearchParams();
|
return Api.update({
|
||||||
return axios.post(window.config.SYS_SERVER_AJAX +
|
service: "CLAIM_CASE",
|
||||||
window.config.SYS_URI +
|
data: {
|
||||||
`cases/cases_CatchExecute`, params);
|
index: data.DEL_INDEX
|
||||||
|
},
|
||||||
|
keys: {
|
||||||
|
app_uid: data.APP_UID
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Service to jump a case by it's number
|
* Service to jump a case by it's number
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
:dataCaseStatus="dataCaseStatusTab"
|
:dataCaseStatus="dataCaseStatusTab"
|
||||||
:dataCase="dataCase"
|
:dataCase="dataCase"
|
||||||
></TabsCaseDetail>
|
></TabsCaseDetail>
|
||||||
<ModalCancelCase ref="modal-cancel-case"></ModalCancelCase>
|
<ModalCancelCase ref="modal-cancel-case" :dataCase="dataCase"></ModalCancelCase>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-3">
|
<div class="col-sm-3">
|
||||||
<case-summary
|
<case-summary
|
||||||
@@ -233,10 +233,7 @@ export default {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
if (
|
if (response.status === 200 ) {
|
||||||
response.data.success === "success" &&
|
|
||||||
response.data.message == ""
|
|
||||||
) {
|
|
||||||
that.attachDocuments = false;
|
that.attachDocuments = false;
|
||||||
that.dataAttachedDocuments.items = [];
|
that.dataAttachedDocuments.items = [];
|
||||||
that.getCasesNotes();
|
that.getCasesNotes();
|
||||||
@@ -422,10 +419,10 @@ export default {
|
|||||||
|
|
||||||
getCasesNotes() {
|
getCasesNotes() {
|
||||||
let that = this;
|
let that = this;
|
||||||
Api.cases
|
Api.caseNotes
|
||||||
.casenotes(this.dataCase)
|
.get(this.dataCase)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
that.formatResponseCaseNotes(response.data.notes);
|
that.formatResponseCaseNotes(response.data.data);
|
||||||
that.dataComments.noPerms = response.data.noPerms || 0;
|
that.dataComments.noPerms = response.data.noPerms || 0;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
@@ -439,12 +436,12 @@ export default {
|
|||||||
n.id = _.random(1000000);
|
n.id = _.random(1000000);
|
||||||
notesArray.push({
|
notesArray.push({
|
||||||
user: that.nameFormatCases(
|
user: that.nameFormatCases(
|
||||||
n.USR_FIRSTNAME,
|
n.usr_firstname,
|
||||||
n.USR_LASTNAME,
|
n.usr_lastname,
|
||||||
n.USR_USERNAME
|
n.usr_username
|
||||||
),
|
),
|
||||||
date: n.NOTE_DATE,
|
date: n.note_date,
|
||||||
comment: n.NOTE_CONTENT,
|
comment: n.note_content,
|
||||||
data: n
|
data: n
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export default {
|
|||||||
name: "ModalCancelCase",
|
name: "ModalCancelCase",
|
||||||
components: {},
|
components: {},
|
||||||
props: {
|
props: {
|
||||||
data: Object,
|
dataCase: Object,
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
data() {
|
data() {
|
||||||
@@ -75,12 +75,12 @@ export default {
|
|||||||
cancelCase() {
|
cancelCase() {
|
||||||
let that = this;
|
let that = this;
|
||||||
api.cases
|
api.cases
|
||||||
.cancel({
|
.cancel(_.extend({}, this.dataCase, {
|
||||||
COMMENT: this.$refs["comment"].value,
|
COMMENT: this.$refs["comment"].value,
|
||||||
SEND: this.$refs["send"].checked ? 1 : 0,
|
SEND: this.$refs["send"].checked ? 1 : 0,
|
||||||
})
|
}))
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
if (response.data && response.data.status) {
|
if (response.status === 200) {
|
||||||
that.$refs["modal-cancel-case"].hide();
|
that.$refs["modal-cancel-case"].hide();
|
||||||
that.$parent.$parent.page = "todo";
|
that.$parent.$parent.page = "todo";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,9 @@ import api from "./../../api/index";
|
|||||||
export default {
|
export default {
|
||||||
name: "ModalClaimCase",
|
name: "ModalClaimCase",
|
||||||
components: {},
|
components: {},
|
||||||
props: {},
|
props: {
|
||||||
|
dataCase: Object,
|
||||||
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -53,7 +55,7 @@ export default {
|
|||||||
claimCase() {
|
claimCase() {
|
||||||
let that = this;
|
let that = this;
|
||||||
api.cases.claim(this.data).then((response) => {
|
api.cases.claim(this.data).then((response) => {
|
||||||
if (response.statusText == "OK") {
|
if (response.status === 200) {
|
||||||
that.$refs["modal-claim-case"].hide();
|
that.$refs["modal-claim-case"].hide();
|
||||||
that.$parent.$emit("onUpdateDataCase", {
|
that.$parent.$emit("onUpdateDataCase", {
|
||||||
APP_UID: this.data.APP_UID,
|
APP_UID: this.data.APP_UID,
|
||||||
|
|||||||
Reference in New Issue
Block a user