PMCORE-3234: The "Case Details" view provides the option of Unpause instead of Continue

This commit is contained in:
Rodrigo Quelca
2021-08-23 15:49:14 +00:00
parent 162dab128e
commit da3dab37f4
2 changed files with 23 additions and 2 deletions

View File

@@ -48,9 +48,15 @@
<b-button
v-if="props.row.STATUS === 'OPEN'"
@click="onClick(props)"
variant="outline-primary"
variant="outline-success"
>{{ $t("ID_CONTINUE") }}</b-button
>
<b-button
v-if="props.row.STATUS === 'PAUSE'"
@click="onClickUnpause(props)"
variant="outline-primary"
>{{ $t("ID_INPAUSE") }}</b-button
>
</div>
</v-server-table>
</div>
@@ -428,6 +434,9 @@ export default {
that.dataComments.noPerms = response.data.noPerms || 0;
})
.catch((err) => {
if (err.response.data) {
that.showAlert(err.response.data.error.message, "danger");
}
throw new Error(err);
});
},
@@ -576,6 +585,18 @@ export default {
this.$emit("onUpdatePage", "XCase");
}
},
/**
* Unpause click handler
*
* @param {object} data
*/
onClickUnpause(data) {
Api.cases.unpause(data).then((response) => {
if (response.statusText === "OK") {
this.$refs["vueTable"].getData();
}
});
},
/**
* Claim case
*