PMCORE-3109: UI- Create avatar user info component
This commit is contained in:
@@ -8,11 +8,14 @@
|
|||||||
:options="options"
|
:options="options"
|
||||||
ref="table"
|
ref="table"
|
||||||
>
|
>
|
||||||
<div slot="actions" slot-scope="props">
|
<div slot="actions" slot-scope="props">
|
||||||
<div>
|
<div>
|
||||||
<ellipsis v-if="dataEllipsis" :data="dataEllipsis"> </ellipsis>
|
<ellipsis v-if="dataEllipsis" :data="dataEllipsis"> </ellipsis>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div slot="owner" slot-scope="props">
|
||||||
|
<OwnerCell :data="props.row.owner" />
|
||||||
|
</div>
|
||||||
</v-server-table>
|
</v-server-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -21,13 +24,16 @@
|
|||||||
<script>
|
<script>
|
||||||
import Api from "./Api/CaseList";
|
import Api from "./Api/CaseList";
|
||||||
import ButtonFleft from "../../../components/home/ButtonFleft.vue";
|
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 {
|
export default {
|
||||||
name: "Tables",
|
name: "Tables",
|
||||||
props: ["module"],
|
props: ["module"],
|
||||||
components: {
|
components: {
|
||||||
ButtonFleft,
|
ButtonFleft,
|
||||||
Ellipsis
|
Ellipsis,
|
||||||
|
OwnerCell
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -125,9 +131,10 @@ export default {
|
|||||||
});
|
});
|
||||||
return new Promise((resolutionFunc, rejectionFunc) => {
|
return new Promise((resolutionFunc, rejectionFunc) => {
|
||||||
Api.getCaseList(filters, that.module)
|
Api.getCaseList(filters, that.module)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
|
dt = that.formatDataResponse(response.data.data);
|
||||||
resolutionFunc({
|
resolutionFunc({
|
||||||
data: response.data.data,
|
data: dt,
|
||||||
count: response.data.total
|
count: response.data.total
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
@@ -135,6 +142,32 @@ export default {
|
|||||||
rejectionFunc(e);
|
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 $translation;
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
|
|
||||||
|
$conf = new Configurations();
|
||||||
|
|
||||||
if ($RBAC->userCanAccess("PM_SETUP") != 1 || $RBAC->userCanAccess("PM_SETUP_ADVANCE") != 1) {
|
if ($RBAC->userCanAccess("PM_SETUP") != 1 || $RBAC->userCanAccess("PM_SETUP_ADVANCE") != 1) {
|
||||||
G::SendTemporalMessage("ID_USER_HAVENT_RIGHTS_PAGE", "error", "labels");
|
G::SendTemporalMessage("ID_USER_HAVENT_RIGHTS_PAGE", "error", "labels");
|
||||||
exit(0);
|
exit(0);
|
||||||
@@ -30,4 +32,5 @@ ScriptVariables::add('SYS_WORKSPACE', config("system.workspace"));
|
|||||||
ScriptVariables::add('SYS_URI', SYS_URI);
|
ScriptVariables::add('SYS_URI', SYS_URI);
|
||||||
ScriptVariables::add('SYS_LANG', SYS_LANG);
|
ScriptVariables::add('SYS_LANG', SYS_LANG);
|
||||||
ScriptVariables::add('TRANSLATIONS', $translation);
|
ScriptVariables::add('TRANSLATIONS', $translation);
|
||||||
|
ScriptVariables::add('FORMATS', $conf->getFormats());
|
||||||
echo View::make('Views::admin.settings.customCasesList', compact("userCanAccess"))->render();
|
echo View::make('Views::admin.settings.customCasesList', compact("userCanAccess"))->render();
|
||||||
Reference in New Issue
Block a user