mirror of
https://github.com/nasa/openmct.git
synced 2024-12-28 08:58:52 +00:00
Add check for activeRole
This commit is contained in:
parent
46202b4f3a
commit
9ebe21eb5b
@ -116,8 +116,6 @@ export default {
|
|||||||
this.indicator.text(pollQuestion?.question || '');
|
this.indicator.text(pollQuestion?.question || '');
|
||||||
},
|
},
|
||||||
async fetchMyStatus() {
|
async fetchMyStatus() {
|
||||||
const activeRole = await this.openmct.user.getActiveRole();
|
|
||||||
this.role = activeRole;
|
|
||||||
// hide indicator for observer
|
// hide indicator for observer
|
||||||
if (!this.openmct.user.canProvideStatusForRole()) {
|
if (!this.openmct.user.canProvideStatusForRole()) {
|
||||||
this.indicator.text('');
|
this.indicator.text('');
|
||||||
@ -126,7 +124,12 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(activeRole);
|
const activeRole = await this.openmct.user.getActiveRole();
|
||||||
|
if (!activeRole) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.role = activeRole;
|
||||||
const status = await this.openmct.user.status.getStatusForRole(activeRole);
|
const status = await this.openmct.user.status.getStatusForRole(activeRole);
|
||||||
if (status !== undefined) {
|
if (status !== undefined) {
|
||||||
this.setStatus({ status });
|
this.setStatus({ status });
|
||||||
|
Loading…
Reference in New Issue
Block a user