Merge branch 'release/3.7.0' of https://bitbucket.org/colosa/processmaker into bugfix/PMCORE-3328

This commit is contained in:
Henry Jordan
2021-09-22 14:54:20 +00:00
18 changed files with 357 additions and 69 deletions

View File

@@ -4,6 +4,15 @@
<modal-new-request ref="newRequest"></modal-new-request>
<ModalPauseCase ref="modal-pause-case"></ModalPauseCase>
<ModalReassignCase ref="modal-reassign-case"></ModalReassignCase>
<b-alert
:show="dataAlert.dismissCountDown"
dismissible
:variant="dataAlert.variant"
@dismissed="dataAlert.dismissCountDown = 0"
@dismiss-count-down="countDownChanged"
>
{{ dataAlert.message }}
</b-alert>
<CasesFilter
:filters="filters"
:title="$t('ID_INBOX')"
@@ -209,6 +218,10 @@
</span>
</div>
</VueListView>
<ModalComments
ref="modal-comments"
@postNotes="onPostNotes"
></ModalComments>
</div>
</template>
@@ -227,6 +240,7 @@ import defaultMixins from "./defaultMixins";
import Ellipsis from '../../components/utils/ellipsis.vue';
import ModalPauseCase from '../modal/ModalPauseCase.vue';
import ModalReassignCase from '../modal/ModalReassignCase.vue';
import ModalComments from "../modal/ModalComments.vue";
import { Event } from 'vue-tables-2';
import CurrentUserCell from "../../components/vuetable/CurrentUserCell.vue";
@@ -246,11 +260,18 @@ export default {
ModalPauseCase,
ModalReassignCase,
CurrentUserCell,
ModalComments
},
props: ["defaultOption", "settings"],
data() {
let that = this;
return {
dataAlert: {
dismissSecs: 5,
dismissCountDown: 0,
message: "",
variant: "info",
},
columMap: {
case_number: "APP_NUMBER",
case_title: "DEL_TITLE",
@@ -361,7 +382,7 @@ export default {
that.$emit("updateSettings", {
data: data,
key: "orderBy",
parent: this.page,
page: "inbox",
type: "normal",
id: this.id
});
@@ -375,7 +396,7 @@ export default {
this.$emit("updateSettings", {
data: val,
key: "columns",
parent: this.page,
page: "inbox",
type: "normal",
id: this.id
});
@@ -637,7 +658,7 @@ export default {
this.$emit("updateSettings", {
data: newFilters,
key: "filters",
parent: this.page,
page: "inbox",
type: "normal",
id: this.id
});
@@ -716,7 +737,7 @@ export default {
name: "case note",
icon: "far fa-comments",
fn: function() {
that.openCaseDetail(data);
that.openComments(data);
}
},
reassign: {
@@ -737,6 +758,41 @@ export default {
}
}
},
/**
* 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;
},
/**
* Open the case notes modal
* @param {object} data - needed to create the data
*/
openComments(data) {
let that = this;
api.cases.open(_.extend({ ACTION: "todo" }, data)).then(() => {
that.$refs["modal-comments"].dataCase = data;
that.$refs["modal-comments"].show();
});
},
/**
* Post notes event handler
*/
onPostNotes() {
this.$refs["vueTable"].getData();
},
},
};
</script>