PMCORE-3109: UI- Create avatar user info component
This commit is contained in:
@@ -13,6 +13,9 @@
|
||||
<ellipsis v-if="dataEllipsis" :data="dataEllipsis"> </ellipsis>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="owner" slot-scope="props">
|
||||
<OwnerCell :data="props.row.owner" />
|
||||
</div>
|
||||
</v-server-table>
|
||||
</div>
|
||||
|
||||
@@ -21,13 +24,16 @@
|
||||
<script>
|
||||
import Api from "./Api/CaseList";
|
||||
import ButtonFleft from "../../../components/home/ButtonFleft.vue";
|
||||
import Ellipsis from '../../../components/utils/ellipsis.vue';
|
||||
import Ellipsis from "../../../components/utils/ellipsis.vue";
|
||||
import utils from "../../../utils/utils";
|
||||
import OwnerCell from "../../../components/vuetable/OwnerCell";
|
||||
export default {
|
||||
name: "Tables",
|
||||
props: ["module"],
|
||||
components: {
|
||||
ButtonFleft,
|
||||
Ellipsis
|
||||
Ellipsis,
|
||||
OwnerCell
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -126,8 +132,9 @@ export default {
|
||||
return new Promise((resolutionFunc, rejectionFunc) => {
|
||||
Api.getCaseList(filters, that.module)
|
||||
.then((response) => {
|
||||
dt = that.formatDataResponse(response.data.data);
|
||||
resolutionFunc({
|
||||
data: response.data.data,
|
||||
data: dt,
|
||||
count: response.data.total
|
||||
});
|
||||
})
|
||||
@@ -135,6 +142,32 @@ export default {
|
||||
rejectionFunc(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
formatDataResponse(response){
|
||||
let that = this,
|
||||
data = [],
|
||||
userDataFormat;
|
||||
debugger;
|
||||
_.forEach(response, (v) => {
|
||||
|
||||
userDataFormat = utils.userNameDisplayFormat({
|
||||
userName: v.userName || "",
|
||||
firstName: v.userFirstname || "",
|
||||
lastName: v.userLastname || "",
|
||||
format: window.config.FORMATS.format || null
|
||||
});
|
||||
v["owner"] = {
|
||||
userAvatar: userDataFormat !== "" ? window.config.SYS_SERVER_AJAX +
|
||||
window.config.SYS_URI +
|
||||
`users/users_ViewPhotoGrid?pUID=${v.userId}` : "",
|
||||
userInfo: userDataFormat || "",
|
||||
userEmail: v.userEmail,
|
||||
userId: v.userId,
|
||||
userPosition: v.userPosition || ""
|
||||
}
|
||||
data.push(v);
|
||||
});
|
||||
return data;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -6,6 +6,8 @@ use ProcessMaker\Core\System;
|
||||
global $translation;
|
||||
global $RBAC;
|
||||
|
||||
$conf = new Configurations();
|
||||
|
||||
if ($RBAC->userCanAccess("PM_SETUP") != 1 || $RBAC->userCanAccess("PM_SETUP_ADVANCE") != 1) {
|
||||
G::SendTemporalMessage("ID_USER_HAVENT_RIGHTS_PAGE", "error", "labels");
|
||||
exit(0);
|
||||
@@ -30,4 +32,5 @@ ScriptVariables::add('SYS_WORKSPACE', config("system.workspace"));
|
||||
ScriptVariables::add('SYS_URI', SYS_URI);
|
||||
ScriptVariables::add('SYS_LANG', SYS_LANG);
|
||||
ScriptVariables::add('TRANSLATIONS', $translation);
|
||||
ScriptVariables::add('FORMATS', $conf->getFormats());
|
||||
echo View::make('Views::admin.settings.customCasesList', compact("userCanAccess"))->render();
|
||||
Reference in New Issue
Block a user