Merge branch 'activity-state-display' of https://github.com/nasa/openmct into timelist-expanded-view

This commit is contained in:
Shefali 2024-01-25 12:57:42 -08:00
commit e5fd2d7440
3 changed files with 22 additions and 28 deletions

View File

@ -20,28 +20,26 @@
at runtime from the About dialog for additional information.
-->
<template>
<div>
<plan-activity-time-view
v-for="activity in activities"
:key="activity.key"
:activity="activity"
:heading="heading"
/>
<plan-activity-properties-view
v-for="activity in activities"
:key="activity.key"
heading="Properties"
:activity="activity"
/>
<plan-activity-status-view
v-if="canPersistState"
:key="activities[0].key"
:activity="activities[0]"
:execution-state="activityExecutionState"
:heading="Activity Status"
@update-activity-state="persistActivityState"
/>
</div>
<plan-activity-time-view
v-for="activity in activities"
:key="activity.key"
:activity="activity"
:heading="heading"
/>
<plan-activity-properties-view
v-for="activity in activities"
:key="activity.key"
heading="Properties"
:activity="activity"
/>
<plan-activity-status-view
v-if="canPersistState"
:key="activities[0].key"
:activity="activities[0]"
:execution-state="activityExecutionState"
heading="Activity Status"
@update-activity-state="persistActivityState"
/>
</template>
<script>

View File

@ -110,9 +110,7 @@ export default {
},
methods: {
setActivityStatus() {
let statusKeyIndex = Object.keys(activityStates).findIndex(
(key) => key === this.executionState
);
let statusKeyIndex = activityStates.findIndex((state) => state.key === this.executionState);
if (statusKeyIndex < 0) {
statusKeyIndex = 0;
}

View File

@ -490,9 +490,7 @@ export default {
this.pastActivitiesCount = this.pastActivitiesCount + 1;
}
if (activity.id) {
activity.key = activity.id;
} else if (!activity.key) {
if (!activity.key) {
activity.key = uuid();
}