Merged in bugfix/PMCORE-2697 (pull request #7729)
PMCORE-2697 Approved-by: Rodrigo Quelca <rockoinfo@yahoo.com>
This commit is contained in:
committed by
Julio Cesar Laura Avendaño
commit
18b4a68298
@@ -241,7 +241,9 @@ export default {
|
||||
this.dataAttachedDocuments.items = att;
|
||||
},
|
||||
getDataCaseSummary() {
|
||||
let that = this;
|
||||
let action,
|
||||
option,
|
||||
that = this;
|
||||
Api.cases
|
||||
.casesummary(this.dataCase)
|
||||
.then((response) => {
|
||||
@@ -252,9 +254,7 @@ export default {
|
||||
titleActions: this.$i18n.t("ID_ACTIONS"),
|
||||
btnLabel: this.$i18n.t("ID_CANCEL_CASE"),
|
||||
btnType: false,
|
||||
onClick: () => {
|
||||
that.$refs["modal-cancel-case"].show();
|
||||
},
|
||||
onClick: null,
|
||||
label: {
|
||||
numberCase: data[2].label,
|
||||
process: data[0].label,
|
||||
@@ -274,6 +274,19 @@ export default {
|
||||
duration: response.data[11].value.split(" ")[1],
|
||||
},
|
||||
};
|
||||
// Hack for identify the cancel case button
|
||||
Api.cases
|
||||
.actions(this.dataCase).then((response)=>{
|
||||
action = _.find(response.data, function(o) { return o.id == "ACTIONS"; });
|
||||
if(action){
|
||||
option = _.find(action.options, function(o) { return o.fn == "cancelCase"; });
|
||||
if(!option.hide){
|
||||
that.dataCaseSummary.onClick = () => {
|
||||
that.$refs["modal-cancel-case"].show();
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
throw new Error(err);
|
||||
|
||||
Reference in New Issue
Block a user