From 7097101c96c306cb2d9a3265fe4581f81e799988 Mon Sep 17 00:00:00 2001 From: "Mazzella, Jesse D. (ARC-TI)[KBR Wyle Services, LLC]" Date: Mon, 29 Jan 2024 09:23:07 -0800 Subject: [PATCH] feat: set/unset mission status for role --- src/api/user/StatusAPI.js | 20 ++++++++ .../components/MissionStatusPopup.vue | 47 +++++++++++++++++-- .../components/UserIndicator.vue | 2 +- 3 files changed, 64 insertions(+), 5 deletions(-) diff --git a/src/api/user/StatusAPI.js b/src/api/user/StatusAPI.js index 7170ff984e..372907300b 100644 --- a/src/api/user/StatusAPI.js +++ b/src/api/user/StatusAPI.js @@ -114,6 +114,26 @@ export default class StatusAPI extends EventEmitter { } } + setMissionStatusForRole(role, status) { + const provider = this.#userAPI.getProvider(); + + if (provider.setMissionStatusForRole) { + return provider.setMissionStatusForRole(role, status); + } else { + this.#userAPI.error('User provider does not support setting mission status'); + } + } + + getMissionStatusForRole(role) { + const provider = this.#userAPI.getProvider(); + + if (provider.getMissionStatusForRole) { + return provider.getMissionStatusForRole(role); + } else { + this.#userAPI.error('User provider does not support getting mission status'); + } + } + /** * Fetch the list of possible mission status options * @returns {Promise} the current mission status diff --git a/src/plugins/userIndicator/components/MissionStatusPopup.vue b/src/plugins/userIndicator/components/MissionStatusPopup.vue index 1e7200e3a3..2d0daca34a 100644 --- a/src/plugins/userIndicator/components/MissionStatusPopup.vue +++ b/src/plugins/userIndicator/components/MissionStatusPopup.vue @@ -11,10 +11,16 @@