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",
|
||||
USER_DATA: "/light/user/data",
|
||||
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_LIST_UNASSIGNED: "/light/unassigned{suffix}",
|
||||
GET_LISTS_PARTICIPATED: "/light/participated{suffix}",
|
||||
@@ -22,15 +22,15 @@ const services = {
|
||||
UPLOAD_FILE: "/light/case/{app_uid}/upload/{app_doc_uid}",
|
||||
GET_CASE_INFO: "/light/{type}/case/{app_uid}",
|
||||
REQUEST_PAUSE_CASE: "/light/cases/{app_uid}/pause",
|
||||
REQUEST_UNPAUSE_CASE: "/light/cases/{app_uid}/unpause",
|
||||
REQUEST_CANCEL_CASE: "/light/cases/{app_uid}/cancel",
|
||||
UNPAUSE_CASE: "/cases/{app_uid}/unpause",
|
||||
CANCEL_CASE: "/cases/{app_uid}/cancel",
|
||||
REQUEST_SYS_CONFIG: "/light/config",
|
||||
REQUEST_SYS_CONFIG_V2: "/light/config?fileLimit=true",
|
||||
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",
|
||||
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}",
|
||||
REGISTER_WITH_GOOGLE_FAKE_URL: "fakeurl",
|
||||
SIGN_IN_TO_PM_WITH_GOOGLE: "/authentication/gmail",
|
||||
@@ -153,6 +153,7 @@ export default {
|
||||
params = options.params || {},
|
||||
data = options.data || {},
|
||||
keys = options.keys || {},
|
||||
headers = options.headers || {},
|
||||
url,
|
||||
credentials = window.config.SYS_CREDENTIALS,
|
||||
workspace = window.config.SYS_WORKSPACE,
|
||||
@@ -165,15 +166,39 @@ export default {
|
||||
url: url,
|
||||
params,
|
||||
data,
|
||||
headers: {
|
||||
headers: _.extend({
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": `Bearer ` + credentials.accessToken,
|
||||
"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) {
|
||||
let service = options.service || "",
|
||||
id = options.id || {},
|
||||
@@ -211,7 +236,35 @@ export default {
|
||||
|
||||
return axios({
|
||||
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,
|
||||
data,
|
||||
headers: {
|
||||
|
||||
@@ -1,21 +1,47 @@
|
||||
import axios from "axios";
|
||||
import Api from "./Api.js";
|
||||
|
||||
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);
|
||||
params.append('note_content', data.COMMENT);
|
||||
params.append('send_mail', data.SEND_MAIL ? 1 : 0);
|
||||
|
||||
_.each(data.FILES, (f) => {
|
||||
params.append("filesToUpload[]", f);
|
||||
})
|
||||
return axios.post(window.config.SYS_SERVER_AJAX +
|
||||
window.config.SYS_URI +
|
||||
`appProxy/postNote`, params, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
|
||||
return Api.postFiles({
|
||||
service: "POST_NOTE",
|
||||
data: params,
|
||||
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}`);
|
||||
},
|
||||
cancel(data) {
|
||||
var params = new URLSearchParams();
|
||||
params.append('action', 'cancelCase');
|
||||
params.append('NOTE_REASON', data.COMMENT);
|
||||
params.append('NOTIFY_CANCEL', data.SEND);
|
||||
return axios.post(window.config.SYS_SERVER_AJAX +
|
||||
window.config.SYS_URI +
|
||||
`cases/ajaxListener`, params);
|
||||
return Api.update({
|
||||
service: "CANCEL_CASE",
|
||||
data: {
|
||||
reason: data.COMMENT,
|
||||
sendMail: data.SEND
|
||||
},
|
||||
keys: {
|
||||
app_uid: data.APP_UID
|
||||
}
|
||||
});
|
||||
},
|
||||
actions(data) {
|
||||
var params = new URLSearchParams();
|
||||
@@ -148,20 +151,35 @@ export let cases = {
|
||||
window.config.SYS_URI +
|
||||
`cases/ajaxListener`, params);
|
||||
},
|
||||
/**
|
||||
* Unpause case with endpoint
|
||||
* @param {*} data
|
||||
* @returns
|
||||
*/
|
||||
unpause(data) {
|
||||
var params = new URLSearchParams();
|
||||
params.append('action', 'unpauseCase');
|
||||
params.append('sApplicationUID', data.APP_UID);
|
||||
params.append('iIndex', data.DEL_INDEX);
|
||||
return axios.post(window.config.SYS_SERVER_AJAX +
|
||||
window.config.SYS_URI +
|
||||
`cases/cases_Ajax`, params);
|
||||
return Api.update({
|
||||
service: "UNPAUSE_CASE",
|
||||
data: {},
|
||||
keys: {
|
||||
app_uid: data.APP_UID
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Claim case with endpoint
|
||||
* @param {*} data
|
||||
* @returns
|
||||
*/
|
||||
claim(data) {
|
||||
var params = new URLSearchParams();
|
||||
return axios.post(window.config.SYS_SERVER_AJAX +
|
||||
window.config.SYS_URI +
|
||||
`cases/cases_CatchExecute`, params);
|
||||
return Api.update({
|
||||
service: "CLAIM_CASE",
|
||||
data: {
|
||||
index: data.DEL_INDEX
|
||||
},
|
||||
keys: {
|
||||
app_uid: data.APP_UID
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Service to jump a case by it's number
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
:dataCaseStatus="dataCaseStatusTab"
|
||||
:dataCase="dataCase"
|
||||
></TabsCaseDetail>
|
||||
<ModalCancelCase ref="modal-cancel-case"></ModalCancelCase>
|
||||
<ModalCancelCase ref="modal-cancel-case" :dataCase="dataCase"></ModalCancelCase>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<case-summary
|
||||
@@ -233,10 +233,7 @@ export default {
|
||||
})
|
||||
)
|
||||
.then((response) => {
|
||||
if (
|
||||
response.data.success === "success" &&
|
||||
response.data.message == ""
|
||||
) {
|
||||
if (response.status === 200 ) {
|
||||
that.attachDocuments = false;
|
||||
that.dataAttachedDocuments.items = [];
|
||||
that.getCasesNotes();
|
||||
@@ -422,10 +419,10 @@ export default {
|
||||
|
||||
getCasesNotes() {
|
||||
let that = this;
|
||||
Api.cases
|
||||
.casenotes(this.dataCase)
|
||||
Api.caseNotes
|
||||
.get(this.dataCase)
|
||||
.then((response) => {
|
||||
that.formatResponseCaseNotes(response.data.notes);
|
||||
that.formatResponseCaseNotes(response.data.data);
|
||||
that.dataComments.noPerms = response.data.noPerms || 0;
|
||||
})
|
||||
.catch((err) => {
|
||||
@@ -439,12 +436,12 @@ export default {
|
||||
n.id = _.random(1000000);
|
||||
notesArray.push({
|
||||
user: that.nameFormatCases(
|
||||
n.USR_FIRSTNAME,
|
||||
n.USR_LASTNAME,
|
||||
n.USR_USERNAME
|
||||
n.usr_firstname,
|
||||
n.usr_lastname,
|
||||
n.usr_username
|
||||
),
|
||||
date: n.NOTE_DATE,
|
||||
comment: n.NOTE_CONTENT,
|
||||
date: n.note_date,
|
||||
comment: n.note_content,
|
||||
data: n
|
||||
});
|
||||
});
|
||||
|
||||
@@ -51,7 +51,7 @@ export default {
|
||||
name: "ModalCancelCase",
|
||||
components: {},
|
||||
props: {
|
||||
data: Object,
|
||||
dataCase: Object,
|
||||
},
|
||||
mounted() {},
|
||||
data() {
|
||||
@@ -75,12 +75,12 @@ export default {
|
||||
cancelCase() {
|
||||
let that = this;
|
||||
api.cases
|
||||
.cancel({
|
||||
.cancel(_.extend({}, this.dataCase, {
|
||||
COMMENT: this.$refs["comment"].value,
|
||||
SEND: this.$refs["send"].checked ? 1 : 0,
|
||||
})
|
||||
}))
|
||||
.then((response) => {
|
||||
if (response.data && response.data.status) {
|
||||
if (response.status === 200) {
|
||||
that.$refs["modal-cancel-case"].hide();
|
||||
that.$parent.$parent.page = "todo";
|
||||
}
|
||||
|
||||
@@ -33,7 +33,9 @@ import api from "./../../api/index";
|
||||
export default {
|
||||
name: "ModalClaimCase",
|
||||
components: {},
|
||||
props: {},
|
||||
props: {
|
||||
dataCase: Object,
|
||||
},
|
||||
mounted() {},
|
||||
data() {
|
||||
return {
|
||||
@@ -53,7 +55,7 @@ export default {
|
||||
claimCase() {
|
||||
let that = this;
|
||||
api.cases.claim(this.data).then((response) => {
|
||||
if (response.statusText == "OK") {
|
||||
if (response.status === 200) {
|
||||
that.$refs["modal-claim-case"].hide();
|
||||
that.$parent.$emit("onUpdateDataCase", {
|
||||
APP_UID: this.data.APP_UID,
|
||||
|
||||
Reference in New Issue
Block a user