Merged in bugfix/PMCORE-3356 (pull request #8152)
PMCORE-3356 Approved-by: Henry Jonathan Quispe Quispe
This commit is contained in:
committed by
Julio Cesar Laura Avendaño
commit
47ab57a346
@@ -43,6 +43,24 @@ export let menu = {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Get the counter of a specific custom case list
|
||||||
|
* @param {Object} data
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
getTooltipCaseList(data) {
|
||||||
|
return axios.get(
|
||||||
|
window.config.SYS_SERVER_API +
|
||||||
|
'/api/1.0/' +
|
||||||
|
window.config.SYS_WORKSPACE +
|
||||||
|
'/home/' + data.page + '/counter/caseList/' + data.id, {
|
||||||
|
headers: {
|
||||||
|
'Authorization': 'Bearer ' + window.config.SYS_CREDENTIALS.accessToken,
|
||||||
|
"Accept-Language": window.config.SYS_LANG
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* Get the highlight
|
* Get the highlight
|
||||||
* @returns
|
* @returns
|
||||||
|
|||||||
@@ -39,15 +39,10 @@
|
|||||||
"
|
"
|
||||||
>
|
>
|
||||||
<span :class="item.specialType != 'header'?'vsm--title': 'vsm--header vsm--title--header'">
|
<span :class="item.specialType != 'header'?'vsm--title': 'vsm--header vsm--title--header'">
|
||||||
<template v-if="itemTaskList">
|
|
||||||
<custom-tooltip
|
<custom-tooltip
|
||||||
:data="item"
|
:data="item"
|
||||||
ref="tooltip"
|
ref="tooltip"
|
||||||
></custom-tooltip>
|
></custom-tooltip>
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<span> {{ item.title }} </span>
|
|
||||||
</template>
|
|
||||||
<b-icon
|
<b-icon
|
||||||
v-if="item.sortable"
|
v-if="item.sortable"
|
||||||
:icon="item.sortIcon"
|
:icon="item.sortIcon"
|
||||||
|
|||||||
@@ -12,6 +12,9 @@
|
|||||||
v-if="showTooltip"
|
v-if="showTooltip"
|
||||||
>
|
>
|
||||||
{{ labelTooltip }}
|
{{ labelTooltip }}
|
||||||
|
<p v-if="labelDescription !== ''">
|
||||||
|
{{ labelDescription }}
|
||||||
|
</p>
|
||||||
</b-tooltip>
|
</b-tooltip>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -27,6 +30,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
labelTooltip: "",
|
labelTooltip: "",
|
||||||
|
labelDescription: "",
|
||||||
hovering: "",
|
hovering: "",
|
||||||
show: false,
|
show: false,
|
||||||
menuMap: {
|
menuMap: {
|
||||||
@@ -54,6 +58,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
unhoverHandler() {
|
unhoverHandler() {
|
||||||
this.labelTooltip = "";
|
this.labelTooltip = "";
|
||||||
|
this.labelDescription = "";
|
||||||
this.showTooltip = false;
|
this.showTooltip = false;
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
clearTimeout(this.hovering);
|
clearTimeout(this.hovering);
|
||||||
@@ -63,11 +68,21 @@ export default {
|
|||||||
*/
|
*/
|
||||||
setTooltip() {
|
setTooltip() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
if (this.menuMap[this.data.id]) {
|
||||||
api.menu.getTooltip(that.data.page).then((response) => {
|
api.menu.getTooltip(that.data.page).then((response) => {
|
||||||
that.showTooltip = true;
|
that.showTooltip = true;
|
||||||
that.isLoading = false;
|
that.isLoading = false;
|
||||||
that.labelTooltip = response.data.label;
|
that.labelTooltip = response.data.label;
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
api.menu.getTooltipCaseList(that.data)
|
||||||
|
.then((response) => {
|
||||||
|
that.showTooltip = true;
|
||||||
|
that.isLoading = false;
|
||||||
|
that.labelTooltip = response.data.label;
|
||||||
|
that.labelDescription = response.data.description;
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Set bold the label
|
* Set bold the label
|
||||||
|
|||||||
Reference in New Issue
Block a user