Skip to content

Commit

Permalink
remove warnings created from scenario templates (#5720)
Browse files Browse the repository at this point in the history
Co-authored-by: Cole Blanchard <[email protected]>
Co-authored-by: Yohann Paris <[email protected]>
  • Loading branch information
3 people authored Dec 3, 2024
1 parent 7c17247 commit 8868c15
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ref="blankTemplate"
:header="header"
:scenario-instance="scenario"
@save-workflow="$emit('save-workflow')"
@save-workflow="emit('save-workflow')"
/>
<img :src="blankCanvas" alt="Blank canvas template" />
</template>
Expand All @@ -20,4 +20,5 @@ const header: ScenarioHeader = Object.freeze({
defineProps<{
scenario: BlankCanvasScenario;
}>();
const emit = defineEmits(['save-workflow']);
</script>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<tera-scenario-template :header="header" :scenario-instance="scenario" @save-workflow="$emit('save-workflow')">
<tera-scenario-template :header="header" :scenario-instance="scenario" @save-workflow="emit('save-workflow')">
<template #inputs>
<label>Select a model</label>
<Dropdown
Expand Down Expand Up @@ -110,6 +110,8 @@ const props = defineProps<{
scenario: DecisionMakingScenario;
}>();
const emit = defineEmits(['save-workflow']);
watch(
() => props.scenario.modelSpec.id,
async (modelId) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<tera-scenario-template :header="header" :scenario-instance="scenario" @save-workflow="$emit('save-workflow')">
<tera-scenario-template :header="header" :scenario-instance="scenario" @save-workflow="emit('save-workflow')">
<template #inputs>
<label>Select a model</label>
<Dropdown
Expand Down Expand Up @@ -71,6 +71,8 @@ const props = defineProps<{
scenario: SensitivityAnalysisScenario;
}>();
const emit = defineEmits(['save-workflow']);
watch(
() => props.scenario.modelSpec.id,
async (modelId) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<tera-scenario-template :header="header" :scenario-instance="scenario" @save-workflow="$emit('save-workflow')">
<tera-scenario-template :header="header" :scenario-instance="scenario" @save-workflow="emit('save-workflow')">
<template #inputs>
<label>Select a model</label>
<Dropdown
Expand Down Expand Up @@ -108,6 +108,8 @@ const props = defineProps<{
scenario: SituationalAwarenessScenario;
}>();
const emit = defineEmits(['save-workflow']);
watch(
() => props.scenario.modelSpec.id,
async (modelId) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
:model-value="scenarioInstance.workflowName"
@update:model-value="scenarioInstance.setWorkflowName($event)"
auto-focus
@keydown.enter.stop.prevent="$emit('save-workflow')"
@keydown.enter.stop.prevent="emit('save-workflow')"
/>

<section class="grid" v-if="slots.inputs || slots.outputs">
Expand Down Expand Up @@ -49,6 +49,8 @@ defineProps<{
header: ScenarioHeader;
scenarioInstance: BaseScenario;
}>();
const emit = defineEmits(['save-workflow']);
</script>

<style scoped>
Expand Down

0 comments on commit 8868c15

Please sign in to comment.