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:
Joshi 2020-02-18 15:35:03 -08:00
parent 53e0ed4d4a
commit dc08877bbb

View File

@ -213,6 +213,7 @@ export default {
addCondition(event, 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
this.openmct.objects.mutate(conditionDomainObject, 'created', conditionDomainObject.created);
this.conditionCollection.unshift(conditionDomainObject.identifier);
this.persist();
},
@ -223,6 +224,7 @@ export default {
createConditionDomainObject(isDefault) {
let conditionObj = {
isDefault: isDefault,
type: 'condition',
name: isDefault ? 'Default' : 'Unnamed Condition',
identifier: {
namespace: this.domainObject.identifier.namespace,