PMCORE-2558
update
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="v-inline v-process-card" @click="data.onClick(data)">
|
<div :class="classCard()" @click="clickCard(data)">
|
||||||
<b-card
|
<b-card
|
||||||
:sub-title="data.title"
|
:sub-title="data.title"
|
||||||
class="overflow-hidden"
|
class="overflow-hidden"
|
||||||
@@ -18,13 +18,22 @@ export default {
|
|||||||
name: "ProcessCard",
|
name: "ProcessCard",
|
||||||
props: {
|
props: {
|
||||||
data: Object,
|
data: Object,
|
||||||
|
disable: Boolean,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
classBtn(cls) {
|
classCard() {
|
||||||
return "btn v-btn-request " + cls;
|
if (this.disable) {
|
||||||
|
return "v-inline v-process-card v-disable";
|
||||||
|
}
|
||||||
|
return "v-inline v-process-card";
|
||||||
|
},
|
||||||
|
clickCard(data) {
|
||||||
|
if (!this.disable) {
|
||||||
|
this.data.onClick(data);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -35,6 +44,10 @@ export default {
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.v-disable {
|
||||||
|
opacity: 0.2;
|
||||||
|
}
|
||||||
|
|
||||||
.v-process-card {
|
.v-process-card {
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<h5>{{ data.title }}</h5>
|
<h5>{{ data.title }}</h5>
|
||||||
<div v-for="item in data.items" :key="item.title" class="v-inline">
|
<div v-for="item in data.items" :key="item.title" class="v-inline">
|
||||||
<process-card :data="item" />
|
<process-card :data="item" :disable="disable" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -16,6 +16,7 @@ export default {
|
|||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
data: Object,
|
data: Object,
|
||||||
|
disable: Boolean,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
|
|||||||
@@ -1,6 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="case-detail" ref="case-detail" class="v-container-case-detail">
|
<div id="case-detail" ref="case-detail" class="v-container-case-detail">
|
||||||
<div>
|
<div>
|
||||||
|
<b-alert
|
||||||
|
:show="dataAlert.dismissCountDown"
|
||||||
|
dismissible
|
||||||
|
:variant="dataAlert.variant"
|
||||||
|
@dismissed="dataAlert.dismissCountDown = 0"
|
||||||
|
@dismiss-count-down="countDownChanged"
|
||||||
|
>
|
||||||
|
{{ dataAlert.message }}
|
||||||
|
</b-alert>
|
||||||
<p class="">
|
<p class="">
|
||||||
<b-icon icon="arrow-left"></b-icon>
|
<b-icon icon="arrow-left"></b-icon>
|
||||||
<button type="button" class="btn btn-link" @click="$emit('onLastPage')">
|
<button type="button" class="btn btn-link" @click="$emit('onLastPage')">
|
||||||
@@ -121,6 +130,12 @@ export default {
|
|||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
dataAlert: {
|
||||||
|
dismissSecs: 5,
|
||||||
|
dismissCountDown: 0,
|
||||||
|
message: "",
|
||||||
|
variant: "info",
|
||||||
|
},
|
||||||
dataCase: null,
|
dataCase: null,
|
||||||
newCase: {
|
newCase: {
|
||||||
title: this.$i18n.t("ID_NEW_CASE"),
|
title: this.$i18n.t("ID_NEW_CASE"),
|
||||||
@@ -202,10 +217,16 @@ export default {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
if (response.data.success === "success") {
|
if (
|
||||||
|
response.data.success === "success" &&
|
||||||
|
response.data.message == ""
|
||||||
|
) {
|
||||||
that.attachDocuments = false;
|
that.attachDocuments = false;
|
||||||
this.dataAttachedDocuments.items = [];
|
that.dataAttachedDocuments.items = [];
|
||||||
that.getCasesNotes();
|
that.getCasesNotes();
|
||||||
|
} else {
|
||||||
|
that.showAlert(response.data.message, "danger");
|
||||||
|
that.dataAttachedDocuments.items = [];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -440,6 +461,24 @@ export default {
|
|||||||
});
|
});
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Show the alert message
|
||||||
|
* @param {string} message - message to be displayen in the body
|
||||||
|
* @param {string} type - alert type
|
||||||
|
*/
|
||||||
|
showAlert(message, type) {
|
||||||
|
this.dataAlert.message = message;
|
||||||
|
this.dataAlert.variant = type || "info";
|
||||||
|
this.dataAlert.dismissCountDown = this.dataAlert.dismissSecs;
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Updates the alert dismiss value to update
|
||||||
|
* dismissCountDown and decrease
|
||||||
|
* @param {mumber}
|
||||||
|
*/
|
||||||
|
countDownChanged(dismissCountDown) {
|
||||||
|
this.dataAlert.dismissCountDown = dismissCountDown;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -85,8 +85,24 @@ export default {
|
|||||||
this.onResize();
|
this.onResize();
|
||||||
window.addEventListener("resize", this.onResize);
|
window.addEventListener("resize", this.onResize);
|
||||||
this.getMenu();
|
this.getMenu();
|
||||||
|
this.listenerIframe();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/**
|
||||||
|
* Listener for iframes childs
|
||||||
|
*/
|
||||||
|
listenerIframe(){
|
||||||
|
let that = this,
|
||||||
|
eventMethod = window.addEventListener? "addEventListener": "attachEvent",
|
||||||
|
eventer = window[eventMethod],
|
||||||
|
messageEvent = eventMethod === "attachEvent"? "onmessage": "message";
|
||||||
|
|
||||||
|
eventer(messageEvent, function (e) {
|
||||||
|
if (e.data === "redirect=todo" || e.message === "redirect=todo"){
|
||||||
|
that.page = "todo";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* Gets the menu from the server
|
* Gets the menu from the server
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div v-for="item in categoriesFiltered" :key="item.title">
|
<div v-for="item in categoriesFiltered" :key="item.title">
|
||||||
<process-category :data="item" />
|
<process-category :data="item" :disable="disable" />
|
||||||
</div>
|
</div>
|
||||||
</b-modal>
|
</b-modal>
|
||||||
</div>
|
</div>
|
||||||
@@ -44,6 +44,7 @@ export default {
|
|||||||
mounted() {},
|
mounted() {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
disable: false,
|
||||||
filter: "",
|
filter: "",
|
||||||
categories: [],
|
categories: [],
|
||||||
categoriesFiltered: [],
|
categoriesFiltered: [],
|
||||||
@@ -152,6 +153,7 @@ export default {
|
|||||||
},
|
},
|
||||||
startNewCase(dt) {
|
startNewCase(dt) {
|
||||||
let self = this;
|
let self = this;
|
||||||
|
this.disable = true;
|
||||||
api.cases
|
api.cases
|
||||||
.start(dt)
|
.start(dt)
|
||||||
.then(function (data) {
|
.then(function (data) {
|
||||||
@@ -161,9 +163,11 @@ export default {
|
|||||||
DEL_INDEX: 1,
|
DEL_INDEX: 1,
|
||||||
ACTION: "draft",
|
ACTION: "draft",
|
||||||
};
|
};
|
||||||
|
self.disable = false;
|
||||||
self.$parent.$parent.page = "XCase";
|
self.$parent.$parent.page = "XCase";
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
self.disable = false;
|
||||||
throw new Error(err);
|
throw new Error(err);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -18,10 +18,6 @@ Vue.use(BootstrapVue);
|
|||||||
Vue.use(BootstrapVueIcons);
|
Vue.use(BootstrapVueIcons);
|
||||||
Vue.use(VueI18n);
|
Vue.use(VueI18n);
|
||||||
Vue.use(ServerTable, {}, false, 'bootstrap3', {});
|
Vue.use(ServerTable, {}, false, 'bootstrap3', {});
|
||||||
//TODO REMOVE THIS SECTION
|
|
||||||
window.PMAPI2 = {
|
|
||||||
apiClient: require('axios')
|
|
||||||
};
|
|
||||||
window.ProcessMaker = {
|
window.ProcessMaker = {
|
||||||
apiClient: require('axios')
|
apiClient: require('axios')
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<b-modal ref="modal-comments" hide-footer size="xl">
|
<b-modal ref="modal-comments" hide-footer size="xl">
|
||||||
|
<b-alert
|
||||||
|
:show="dataAlert.dismissCountDown"
|
||||||
|
dismissible
|
||||||
|
:variant="dataAlert.variant"
|
||||||
|
@dismissed="dataAlert.dismissCountDown = 0"
|
||||||
|
@dismiss-count-down="countDownChanged"
|
||||||
|
>
|
||||||
|
{{ dataAlert.message }}
|
||||||
|
</b-alert>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<case-comments
|
<case-comments
|
||||||
@@ -43,6 +52,12 @@ export default {
|
|||||||
mounted() {},
|
mounted() {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
dataAlert: {
|
||||||
|
dismissSecs: 5,
|
||||||
|
dismissCountDown: 0,
|
||||||
|
message: "",
|
||||||
|
variant: "info",
|
||||||
|
},
|
||||||
dataCase: null,
|
dataCase: null,
|
||||||
attachDocuments: false,
|
attachDocuments: false,
|
||||||
dataComments: {
|
dataComments: {
|
||||||
@@ -77,10 +92,16 @@ export default {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
if (response.data.success === "success") {
|
if (
|
||||||
|
response.data.success === "success" &&
|
||||||
|
response.data.message == ""
|
||||||
|
) {
|
||||||
that.attachDocuments = false;
|
that.attachDocuments = false;
|
||||||
this.dataAttachedDocuments.items = [];
|
that.dataAttachedDocuments.items = [];
|
||||||
that.getCasesNotes();
|
that.getCasesNotes();
|
||||||
|
} else {
|
||||||
|
that.showAlert(response.data.message, "danger");
|
||||||
|
that.dataAttachedDocuments.items = [];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -165,6 +186,24 @@ export default {
|
|||||||
}
|
}
|
||||||
return nameFormat;
|
return nameFormat;
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Show the alert message
|
||||||
|
* @param {string} message - message to be displayen in the body
|
||||||
|
* @param {string} type - alert type
|
||||||
|
*/
|
||||||
|
showAlert(message, type) {
|
||||||
|
this.dataAlert.message = message;
|
||||||
|
this.dataAlert.variant = type || "info";
|
||||||
|
this.dataAlert.dismissCountDown = this.dataAlert.dismissSecs;
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Updates the alert dismiss value to update
|
||||||
|
* dismissCountDown and decrease
|
||||||
|
* @param {mumber}
|
||||||
|
*/
|
||||||
|
countDownChanged(dismissCountDown) {
|
||||||
|
this.dataAlert.dismissCountDown = dismissCountDown;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ if (isset($_GET['ux'])) {
|
|||||||
if (isset($_GET['ux'])) {
|
if (isset($_GET['ux'])) {
|
||||||
echo 'if (typeof window.parent.ux_env != \'undefined\') {';
|
echo 'if (typeof window.parent.ux_env != \'undefined\') {';
|
||||||
}
|
}
|
||||||
echo " window.parent.location.href = '$url';";
|
echo ' parent.parent.postMessage("redirect=todo","*");';
|
||||||
if (isset($_GET['ux'])) {
|
if (isset($_GET['ux'])) {
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
if (PMLicensedFeatures::getSingleton()->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09') && $statusPMGmail) {
|
if (PMLicensedFeatures::getSingleton()->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09') && $statusPMGmail) {
|
||||||
|
|||||||
Reference in New Issue
Block a user