PMCORE-2700
updat update update
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<div class="card-text">
|
||||
<div
|
||||
v-for="item in data.items"
|
||||
:key="item.title"
|
||||
:key="item.data.id"
|
||||
class="v-attached-block"
|
||||
>
|
||||
<div class="v-list v-list-row block">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="card-text">
|
||||
<div
|
||||
v-for="item in data.items"
|
||||
:key="item.title"
|
||||
:key="item.data.id"
|
||||
class="v-attached-block"
|
||||
>
|
||||
<span>
|
||||
|
||||
@@ -123,18 +123,22 @@ export default {
|
||||
onDropFile(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if(this.data.noPerms === 1){
|
||||
return;
|
||||
}
|
||||
let that = this,
|
||||
fls = [];
|
||||
_.each(e.dataTransfer.files, (f) => {
|
||||
that.files.push(f);
|
||||
});
|
||||
|
||||
that.files = that.files.slice(0,5);
|
||||
_.each(that.files, (f) => {
|
||||
fls.push({
|
||||
data: f,
|
||||
title: f.name,
|
||||
extension: f.name.split(".").pop(),
|
||||
onClick: () => {},
|
||||
id: _.random(1000000)
|
||||
});
|
||||
});
|
||||
|
||||
@@ -143,6 +147,9 @@ export default {
|
||||
},
|
||||
onDragOver(e) {
|
||||
e.preventDefault();
|
||||
if(this.data.noPerms === 1){
|
||||
return;
|
||||
}
|
||||
if (!this.showMaskDrop) {
|
||||
this.showMaskDrop = true;
|
||||
}
|
||||
|
||||
@@ -387,6 +387,7 @@ export default {
|
||||
let that = this,
|
||||
notesArray = [];
|
||||
_.each(notes, (n) => {
|
||||
n.id = _.random(1000000);
|
||||
notesArray.push({
|
||||
user: that.nameFormatCases(
|
||||
n.USR_FIRSTNAME,
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<template>
|
||||
<div id="v-mycases" ref="v-mycases" class="v-container-mycases">
|
||||
<b-alert
|
||||
:show="dataAlert.dismissCountDown"
|
||||
dismissible
|
||||
:variant="dataAlert.variant"
|
||||
@dismissed="dataAlert.dismissCountDown = 0"
|
||||
@dismiss-count-down="countDownChanged"
|
||||
>
|
||||
{{ dataAlert.message }}
|
||||
</b-alert>
|
||||
<button-fleft :data="newCase"></button-fleft>
|
||||
<MyCasesFilter
|
||||
:filters="filters"
|
||||
@@ -75,6 +84,12 @@ export default {
|
||||
props: ["filters"],
|
||||
data() {
|
||||
return {
|
||||
dataAlert: {
|
||||
dismissSecs: 5,
|
||||
dismissCountDown: 0,
|
||||
message: "",
|
||||
variant: "info"
|
||||
},
|
||||
metrics: [],
|
||||
title: this.$i18n.t('ID_MY_CASES'),
|
||||
filter: "CASES_INBOX",
|
||||
@@ -466,7 +481,25 @@ export default {
|
||||
*/
|
||||
onPostNotes() {
|
||||
this.$refs["vueTable"].getData();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 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>
|
||||
@@ -477,4 +510,4 @@ export default {
|
||||
padding-left: 50px;
|
||||
padding-right: 50px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -52,6 +52,7 @@ export default {
|
||||
mounted() {},
|
||||
data() {
|
||||
return {
|
||||
permission: true,
|
||||
dataAlert: {
|
||||
dismissSecs: 5,
|
||||
dismissCountDown: 0,
|
||||
@@ -114,18 +115,33 @@ export default {
|
||||
return "btn v-btn-request " + cls;
|
||||
},
|
||||
show() {
|
||||
this.getCasesNotes();
|
||||
this.$refs["modal-comments"].show();
|
||||
let that = this;
|
||||
//Clean the data attached documents for ever
|
||||
this.dataAttachedDocuments.items = [];
|
||||
this.getCasesNotes((response) => {
|
||||
if (that.permission) {
|
||||
that.$refs["modal-comments"].show();
|
||||
} else {
|
||||
that.$parent.showAlert(
|
||||
that.$i18n.t("ID_CASES_NOTES_NO_PERMISSIONS"),
|
||||
"danger"
|
||||
);
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
this.$refs["modal-comments"].hide();
|
||||
},
|
||||
getCasesNotes() {
|
||||
getCasesNotes(callback) {
|
||||
let that = this;
|
||||
Api.cases
|
||||
.casenotes(this.dataCase)
|
||||
.then((response) => {
|
||||
that.formatResponseCaseNotes(response.data.notes);
|
||||
that.permission = response.data.noPerms == 1 ? false : true;
|
||||
if (_.isFunction(callback)) {
|
||||
callback(response);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
throw new Error(err);
|
||||
@@ -138,6 +154,7 @@ export default {
|
||||
let that = this,
|
||||
notesArray = [];
|
||||
_.each(notes, (n) => {
|
||||
n.id = _.random(1000000);
|
||||
notesArray.push({
|
||||
user: that.nameFormatCases(
|
||||
n.USR_FIRSTNAME,
|
||||
@@ -154,6 +171,7 @@ export default {
|
||||
},
|
||||
dropFiles(files) {
|
||||
this.attachDocuments = true;
|
||||
this.dataAttachedDocuments.items = [];
|
||||
this.dataAttachedDocuments.items = files;
|
||||
},
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user