mirror of
https://github.com/nasa/openmct.git
synced 2024-12-27 00:31:06 +00:00
Update statusRole parameter name
This commit is contained in:
parent
71d8ffdd80
commit
76faabf471
@ -114,7 +114,7 @@ export default class ExampleUserProvider extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getStatusRoleForCurrentUser(role) {
|
getStatusRoleForCurrentUser(role) {
|
||||||
const matchedRole = this.statusRoleValues.find(x => x.role === role);
|
const matchedRole = this.statusRoleValues.find(statusRole => statusRole.role === role);
|
||||||
|
|
||||||
return Promise.resolve(matchedRole?.status);
|
return Promise.resolve(matchedRole?.status);
|
||||||
}
|
}
|
||||||
@ -124,7 +124,7 @@ export default class ExampleUserProvider extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getStatusForRole(role) {
|
getStatusForRole(role) {
|
||||||
const statusForRole = this.statusRoleValues.find(x => x.role === role);
|
const statusForRole = this.statusRoleValues.find(statusRole => statusRole.role === role);
|
||||||
|
|
||||||
return Promise.resolve(statusForRole?.status);
|
return Promise.resolve(statusForRole?.status);
|
||||||
}
|
}
|
||||||
@ -137,7 +137,7 @@ export default class ExampleUserProvider extends EventEmitter {
|
|||||||
|
|
||||||
setStatusForRole(role, status) {
|
setStatusForRole(role, status) {
|
||||||
status.timestamp = Date.now();
|
status.timestamp = Date.now();
|
||||||
const matchingIndex = this.statusRoleValues.findIndex(x => x.role === role);
|
const matchingIndex = this.statusRoleValues.findIndex(statusRole => statusRole.role === role);
|
||||||
this.statusRoleValues[matchingIndex].status = status;
|
this.statusRoleValues[matchingIndex].status = status;
|
||||||
this.emit('statusChange', {
|
this.emit('statusChange', {
|
||||||
role,
|
role,
|
||||||
|
Loading…
Reference in New Issue
Block a user