PMCORE-2734: Icon of Current User is not displayed as on the PRD
remove console.log
This commit is contained in:
81
resources/assets/js/components/vuetable/CurrentUserCell.vue
Normal file
81
resources/assets/js/components/vuetable/CurrentUserCell.vue
Normal file
@@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<div v-if="data.length" class="grouped-cell">
|
||||
<div v-for="(item, index) in data" v-bind:key="item.TITLE" class="d-flex mb-3">
|
||||
<div class="avatar" :id="id + index">
|
||||
<b-avatar
|
||||
variant="info"
|
||||
:src="item.AVATAR"
|
||||
size="2em"
|
||||
></b-avatar>
|
||||
</div>
|
||||
<b-popover
|
||||
:target="id + index"
|
||||
placement="top"
|
||||
ref="popover"
|
||||
triggers="hover"
|
||||
>
|
||||
<b-row >
|
||||
<b-col md="3">
|
||||
<b-avatar
|
||||
variant="info"
|
||||
:src="item.AVATAR"
|
||||
size="4em"
|
||||
></b-avatar>
|
||||
</b-col>
|
||||
<b-col md="9">
|
||||
<div class="font-weight-bold">{{item.USERNAME_DISPLAY_FORMAT}}</div>
|
||||
<div v-if="item.POSITION !== ''">{{item.POSITION}}</div>
|
||||
<b-link :href="mailto(item.EMAIL)" >{{item.EMAIL}}</b-link>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</b-popover>
|
||||
<div class="col ellipsis">
|
||||
{{ item.USERNAME_DISPLAY_FORMAT }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "CurrentUserCell",
|
||||
props: ["data"],
|
||||
data() {
|
||||
return {
|
||||
id: "avatar-" + _.random(1000000)
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* Generates the mail link
|
||||
*/
|
||||
mailto: function(email) {
|
||||
return "mailto:" + email;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.popover {
|
||||
max-width: 600px !important;
|
||||
min-width: 200px !important;
|
||||
}
|
||||
.grouped-cell {
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.ellipsis {
|
||||
white-space: nowrap;
|
||||
width: 140px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.color {
|
||||
color: red;
|
||||
}
|
||||
.avatar {
|
||||
color: "red";
|
||||
width: "1.3em";
|
||||
}
|
||||
</style>
|
||||
@@ -55,11 +55,7 @@
|
||||
{{ props.row.STATUS }}
|
||||
</div>
|
||||
<div slot="current_user" slot-scope="props">
|
||||
<div class="v-user-cell" v-for="item in props.row.USER">
|
||||
<div class="col .v-user-cell-ellipsis">
|
||||
{{ item.USER_DATA }}
|
||||
</div>
|
||||
</div>
|
||||
<CurrentUserCell :data="props.row.USER_DATA" />
|
||||
</div>
|
||||
<div slot="start_date" slot-scope="props">
|
||||
{{ props.row.START_DATE }}
|
||||
@@ -87,6 +83,7 @@ import ButtonFleft from "../components/home/ButtonFleft.vue";
|
||||
import ModalNewRequest from "./ModalNewRequest.vue";
|
||||
import AdvancedFilter from "../components/search/AdvancedFilter";
|
||||
import TaskCell from "../components/vuetable/TaskCell.vue";
|
||||
import CurrentUserCell from "../components/vuetable/CurrentUserCell.vue";
|
||||
import ModalComments from "./modal/ModalComments.vue";
|
||||
import api from "./../api/index";
|
||||
import utils from "./../utils/utils";
|
||||
@@ -98,6 +95,7 @@ export default {
|
||||
ButtonFleft,
|
||||
ModalNewRequest,
|
||||
TaskCell,
|
||||
CurrentUserCell,
|
||||
ModalComments
|
||||
},
|
||||
props: ["id", "name", "filters"],
|
||||
@@ -231,7 +229,7 @@ export default {
|
||||
CASE_TITLE: v.DEL_TITLE,
|
||||
PROCESS_NAME: v.PRO_TITLE,
|
||||
TASK: this.formatTasks(v.THREAD_TASKS),
|
||||
USER: this.formatUser(v.THREAD_USERS),
|
||||
USER_DATA: this.formatUser(v.THREAD_USERS),
|
||||
START_DATE: v.APP_CREATE_DATE_LABEL,
|
||||
FINISH_DATE: v.APP_FINISH_DATE_LABEL,
|
||||
DURATION: v.DURATION,
|
||||
@@ -263,12 +261,17 @@ export default {
|
||||
dataFormat = [];
|
||||
for (i = 0; i < data.length; i += 1) {
|
||||
dataFormat.push({
|
||||
USER_DATA: utils.userNameDisplayFormat({
|
||||
USERNAME_DISPLAY_FORMAT: utils.userNameDisplayFormat({
|
||||
userName: data[i].usr_firstname,
|
||||
firstName: data[i].usr_lastname,
|
||||
lastName: data[i].usr_username,
|
||||
format: window.config.FORMATS.format || null
|
||||
}),
|
||||
EMAIL: data[i].usr_email,
|
||||
POSITION: data[i].usr_position,
|
||||
AVATAR: window.config.SYS_SERVER +
|
||||
window.config.SYS_URI +
|
||||
`users/users_ViewPhotoGrid?pUID=${data[i].user_id}`
|
||||
});
|
||||
}
|
||||
return dataFormat;
|
||||
|
||||
@@ -92,7 +92,6 @@ export default {
|
||||
"case_title",
|
||||
"process_name",
|
||||
"task",
|
||||
"current_user",
|
||||
"due_date",
|
||||
"delegation_date",
|
||||
"priority",
|
||||
|
||||
@@ -85,7 +85,6 @@ export default {
|
||||
"case_title",
|
||||
"process_name",
|
||||
"task",
|
||||
"current_user",
|
||||
"due_date",
|
||||
"delegation_date",
|
||||
"priority",
|
||||
|
||||
Reference in New Issue
Block a user