mirror of
https://github.com/nasa/openmct.git
synced 2025-02-02 01:08:13 +00:00
Persists the condition domain object so that we can retrieve it with it's identifier in child components like condition.vue
This commit is contained in:
parent
53e0ed4d4a
commit
dc08877bbb
@ -213,6 +213,7 @@ export default {
|
|||||||
addCondition(event, isDefault) {
|
addCondition(event, isDefault) {
|
||||||
let conditionDomainObject = this.createConditionDomainObject(!!isDefault);
|
let conditionDomainObject = this.createConditionDomainObject(!!isDefault);
|
||||||
//persist the condition domain object so that we can do an openmct.objects.get on it and only persist the identifier in the conditionCollection of conditionSet
|
//persist the condition domain object so that we can do an openmct.objects.get on it and only persist the identifier in the conditionCollection of conditionSet
|
||||||
|
this.openmct.objects.mutate(conditionDomainObject, 'created', conditionDomainObject.created);
|
||||||
this.conditionCollection.unshift(conditionDomainObject.identifier);
|
this.conditionCollection.unshift(conditionDomainObject.identifier);
|
||||||
this.persist();
|
this.persist();
|
||||||
},
|
},
|
||||||
@ -223,6 +224,7 @@ export default {
|
|||||||
createConditionDomainObject(isDefault) {
|
createConditionDomainObject(isDefault) {
|
||||||
let conditionObj = {
|
let conditionObj = {
|
||||||
isDefault: isDefault,
|
isDefault: isDefault,
|
||||||
|
type: 'condition',
|
||||||
name: isDefault ? 'Default' : 'Unnamed Condition',
|
name: isDefault ? 'Default' : 'Unnamed Condition',
|
||||||
identifier: {
|
identifier: {
|
||||||
namespace: this.domainObject.identifier.namespace,
|
namespace: this.domainObject.identifier.namespace,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user