From 92a30a34852b97cf211f78d9c1e8eded1e8bffcc Mon Sep 17 00:00:00 2001 From: Shefali Date: Tue, 9 Jan 2024 23:16:12 -0800 Subject: [PATCH] Add activity state inspector option --- src/api/objects/ObjectAPI.js | 8 +- src/plugins/plan/components/PlanView.vue | 1 + .../components/PlanActivitiesView.vue | 114 +++++++++++++----- .../components/PlanActivityPropertiesView.vue | 83 +++++++++++++ .../components/PlanActivityStatusView.vue | 114 ++++++++++++++++++ ...ivityView.vue => PlanActivityTimeView.vue} | 30 ++--- 6 files changed, 305 insertions(+), 45 deletions(-) create mode 100644 src/plugins/plan/inspector/components/PlanActivityPropertiesView.vue create mode 100644 src/plugins/plan/inspector/components/PlanActivityStatusView.vue rename src/plugins/plan/inspector/components/{PlanActivityView.vue => PlanActivityTimeView.vue} (72%) diff --git a/src/api/objects/ObjectAPI.js b/src/api/objects/ObjectAPI.js index e58480efee..fea90b164c 100644 --- a/src/api/objects/ObjectAPI.js +++ b/src/api/objects/ObjectAPI.js @@ -99,7 +99,13 @@ export default class ObjectAPI { this.cache = {}; this.interceptorRegistry = new InterceptorRegistry(); - this.SYNCHRONIZED_OBJECT_TYPES = ['notebook', 'restricted-notebook', 'plan', 'annotation']; + this.SYNCHRONIZED_OBJECT_TYPES = [ + 'notebook', + 'restricted-notebook', + 'plan', + 'annotation', + 'activity-states' + ]; this.errors = { Conflict: ConflictError diff --git a/src/plugins/plan/components/PlanView.vue b/src/plugins/plan/components/PlanView.vue index 2596bcb6bc..a5d3afd073 100644 --- a/src/plugins/plan/components/PlanView.vue +++ b/src/plugins/plan/components/PlanView.vue @@ -488,6 +488,7 @@ export default { }, start: rawActivity.start, end: rawActivity.end, + description: rawActivity.description, row: currentRow, textLines: textLines, textStart: textStart, diff --git a/src/plugins/plan/inspector/components/PlanActivitiesView.vue b/src/plugins/plan/inspector/components/PlanActivitiesView.vue index e2d80be38a..dcc3ba0da2 100644 --- a/src/plugins/plan/inspector/components/PlanActivitiesView.vue +++ b/src/plugins/plan/inspector/components/PlanActivitiesView.vue @@ -20,21 +20,39 @@ at runtime from the About dialog for additional information. --> diff --git a/src/plugins/plan/inspector/components/PlanActivityStatusView.vue b/src/plugins/plan/inspector/components/PlanActivityStatusView.vue new file mode 100644 index 0000000000..b7e4a53420 --- /dev/null +++ b/src/plugins/plan/inspector/components/PlanActivityStatusView.vue @@ -0,0 +1,114 @@ + + + + + diff --git a/src/plugins/plan/inspector/components/PlanActivityView.vue b/src/plugins/plan/inspector/components/PlanActivityTimeView.vue similarity index 72% rename from src/plugins/plan/inspector/components/PlanActivityView.vue rename to src/plugins/plan/inspector/components/PlanActivityTimeView.vue index 4860e1f9e7..89884115e3 100644 --- a/src/plugins/plan/inspector/components/PlanActivityView.vue +++ b/src/plugins/plan/inspector/components/PlanActivityTimeView.vue @@ -21,17 +21,19 @@ --> @@ -64,10 +66,10 @@ export default { }, methods: { setProperties() { - Object.keys(this.activity).forEach((key) => { - if (this.activity[key].label) { - const label = this.activity[key].label; - const value = String(this.activity[key].value); + Object.keys(this.activity.timeProperties).forEach((key) => { + if (this.activity.timeProperties[key].label) { + const label = this.activity.timeProperties[key].label; + const value = String(this.activity.timeProperties[key].value); this.timeProperties[this.timeProperties.length] = { id: uuid(),