diff --git a/packages/client/hmi-client/src/components/models/tera-model-configuration.vue b/packages/client/hmi-client/src/components/models/tera-model-configuration.vue index 85ce27e1bb..a9f12b6ccc 100644 --- a/packages/client/hmi-client/src/components/models/tera-model-configuration.vue +++ b/packages/client/hmi-client/src/components/models/tera-model-configuration.vue @@ -282,6 +282,8 @@ const props = defineProps<{ calibrationConfig?: boolean; }>(); +const emit = defineEmits(['new-model-configuration', 'update-model-configuration']); + const modelConfigInputValue = ref(''); const modelConfigurations = ref([]); const cellEditStates = ref([]); @@ -332,6 +334,7 @@ async function addModelConfiguration(config: ModelConfiguration) { config.configuration ); setTimeout(() => { + emit('new-model-configuration'); initializeConfigSpace(); }, 800); } @@ -482,6 +485,9 @@ function updateModelConfig(configIndex: number = modalVal.value.configIndex) { const configToUpdate = modelConfigurations.value[configIndex]; updateModelConfiguration(configToUpdate); openValueConfig.value = false; + setTimeout(() => { + emit('update-model-configuration'); + }, 800); } function getParameterValue(parameter, valueName, timeseries) { diff --git a/packages/client/hmi-client/src/components/models/tera-model.vue b/packages/client/hmi-client/src/components/models/tera-model.vue index 936d7d5f34..7948a1dfcb 100644 --- a/packages/client/hmi-client/src/components/models/tera-model.vue +++ b/packages/client/hmi-client/src/components/models/tera-model.vue @@ -477,8 +477,14 @@ v-if="model.semantics?.span" :model="model" :feature-config="featureConfig" + @new-model-configuration="emit('new-model-configuration')" + /> + - @@ -596,7 +602,12 @@ enum ModelView { } // TODO - Get rid of these emits -const emit = defineEmits(['close-preview', 'asset-loaded', 'close-current-tab']); +const emit = defineEmits([ + 'close-preview', + 'asset-loaded', + 'close-current-tab', + 'new-model-configuration' +]); const props = defineProps({ project: { diff --git a/packages/client/hmi-client/src/components/models/tera-stratified-model-configuration.vue b/packages/client/hmi-client/src/components/models/tera-stratified-model-configuration.vue index 4f45dce701..10a34a6048 100644 --- a/packages/client/hmi-client/src/components/models/tera-stratified-model-configuration.vue +++ b/packages/client/hmi-client/src/components/models/tera-stratified-model-configuration.vue @@ -149,6 +149,8 @@ const props = defineProps<{ calibrationConfig?: boolean; }>(); +const emit = defineEmits(['new-model-configuration', 'update-model-configuration']); + const modelConfigInputValue = ref(''); const modelConfigurations = ref([]); const cellEditStates = ref([]); @@ -186,6 +188,9 @@ const vFocus = { function updateModelConfigName(configIndex: number) { modelConfigurations.value[configIndex].name = modelConfigInputValue.value; updateModelConfiguration(modelConfigurations.value[configIndex]); + setTimeout(() => { + emit('update-model-configuration'); + }, 800); } async function addModelConfiguration(config: ModelConfiguration) { @@ -196,6 +201,7 @@ async function addModelConfiguration(config: ModelConfiguration) { config.configuration ); setTimeout(() => { + emit('new-model-configuration'); initializeConfigSpace(); }, 800); } diff --git a/packages/client/hmi-client/src/components/workflow/tera-model-workflow-wrapper.vue b/packages/client/hmi-client/src/components/workflow/tera-model-workflow-wrapper.vue index 9452c72ab5..5d5b35a1c9 100644 --- a/packages/client/hmi-client/src/components/workflow/tera-model-workflow-wrapper.vue +++ b/packages/client/hmi-client/src/components/workflow/tera-model-workflow-wrapper.vue @@ -1,5 +1,10 @@ diff --git a/packages/client/hmi-client/src/components/workflow/tera-simulation-workflow.vue b/packages/client/hmi-client/src/components/workflow/tera-simulation-workflow.vue index 5d12da72a7..5d1f9351f9 100644 --- a/packages/client/hmi-client/src/components/workflow/tera-simulation-workflow.vue +++ b/packages/client/hmi-client/src/components/workflow/tera-simulation-workflow.vue @@ -205,7 +205,6 @@