Merged in bugfix/PMCORE-3324 (pull request #8133)

PMCORE-3324

Approved-by: Henry Jonathan Quispe Quispe
This commit is contained in:
Rodrigo Quelca
2021-09-20 14:23:42 +00:00
committed by Julio Cesar Laura Avendaño
5 changed files with 43 additions and 31 deletions

View File

@@ -1,24 +1,29 @@
<template> <template>
<div class="float-right"> <div>
<transition name="fade"> <div class="float-right" v-show="showActions">
<div <transition name="fade">
class="v-inline" <div
v-show="showActions" class="v-inline"
ref="ellipsis" v-show="showActions"
> ref="ellipsis"
<div class="buttonGroup"> >
<b-button <div class="buttonGroup">
v-for="item in data.buttons" <b-button
:key="item.name" v-for="item in data.buttons"
variant="outline-info" :key="item.name"
@click="executeFunction(item.fn)" variant="outline-info"
> @click="executeFunction(item.fn)"
<i class="custom-icon" :class="item.icon" v-bind:style="{color: item.color}"></i> >
</b-button> <i class="custom-icon" :class="item.icon" v-bind:style="{color: item.color}"></i>
</b-button>
</div>
</div> </div>
</div> </transition>
</transition> </div>
<div class="ellipsis-button"> <div
class="ellipsis-button align-middle"
v-show="!showActions"
>
<div @click="showActionButtons()"> <div @click="showActionButtons()">
<i class="fas fa-ellipsis-v"></i> <i class="fas fa-ellipsis-v"></i>
</div> </div>
@@ -116,10 +121,7 @@ export default {
} }
.ellipsis-button { .ellipsis-button {
font-size: 22px; font-size: 22px;
width: 15px;
text-align: center; text-align: center;
float: inherit;
margin-top: 9px;
} }
.buttonGroup { .buttonGroup {
position: relative; position: relative;

View File

@@ -1,5 +1,7 @@
<template> <template>
<span v-if="settings()" :class="classObject" :id="id"> </span> <div class="align-middle table-settings">
<span v-if="settings()" :class="classObject" :id="id"> </span>
</div>
</template> </template>
<script> <script>
export default { export default {
@@ -27,3 +29,8 @@ export default {
}, },
}; };
</script> </script>
<style>
.table-settings {
text-align: center;
}
</style>

View File

@@ -836,12 +836,12 @@ export default {
columns.push(item.field); columns.push(item.field);
}); });
that.filterItems = newItems; that.filterItems = newItems;
that.settingOptions = that.formatColumnSettings(columns);
dt = that.formatDataResponse(response.data.data); dt = that.formatDataResponse(response.data.data);
that.cardColumns = columns; that.cardColumns = columns;
if (that.isFistTime) { if (that.isFistTime) {
that.filters = that.settings && that.settings.filters ? that.settings.filters : {}; that.filters = that.data.settings && that.data.settings.filters ? that.data.settings.filters : {};
that.columns = that.settings && that.settings.columns ? that.settings.columns : that.getTableColumns(columns); that.columns = that.data.settings && that.data.settings.columns ? that.data.settings.columns : that.getTableColumns(columns);
that.settingOptions = that.formatColumnSettings(columns);
} }
resolutionFunc({ resolutionFunc({
data: dt, data: dt,

View File

@@ -207,8 +207,11 @@ export default {
* @returns * @returns
*/ */
formatColumnSettings(columns) { formatColumnSettings(columns) {
return _.map(_.pick(this.headings, columns), (value, key) => { return _.map(columns, (value, key) => {
return { value, key } if (this.headings[value]) {
return { value: this.headings[value], key: value };
}
return { value, key: value }
}); });
} }
} }

View File

@@ -407,9 +407,9 @@ export default {
if (!this.menuMap[item.item.id] && item.item.page !== "LegacyFrame" && item.item.page !== "advanced-search" ) { if (!this.menuMap[item.item.id] && item.item.page !== "LegacyFrame" && item.item.page !== "advanced-search" ) {
this.page = "custom-case-list"; this.page = "custom-case-list";
if (this.config.setting[item.item.page] && this.config.setting[item.item.page]["customCaseList"]) { if (this.config.setting[item.item.page] && this.config.setting[item.item.page]["customCaseList"]) {
this.settings = this.config.setting[item.item.page]["customCaseList"][item.item.id]; this.pageData.settings = this.config.setting[item.item.page]["customCaseList"][item.item.id];
} else { } else {
this.settings = {}; this.pageData.settings = {};
} }
} }
if (this.page === this.lastPage if (this.page === this.lastPage