Skip to content

Commit

Permalink
fix issue with equations to model operator (#2849)
Browse files Browse the repository at this point in the history
  • Loading branch information
YohannParis authored Feb 28, 2024
1 parent aacebc0 commit 41d3312
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ const graphLegendLabels = ref<string[]>([]);
const graphLegendColors = ref<string[]>([]);
const openValueConfig = ref(false);
const selectedTransitionId = ref('');
const modelType = computed(() => props.model?.header?.schema_name ?? AMRSchemaNames.PETRINET);
const modelType = computed(
() => props.model?.header?.schema_name?.toLowerCase() ?? AMRSchemaNames.PETRINET
);
const templatePreview = ref('');
const isGeneratingModelPreview = ref(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,12 @@ const handleChange = (event) => {
const model = ref(null as Model | null);
// Update the model preview when the active output changes
const activeOutputId = ref(props.node?.active ?? props.node?.outputs?.[0].id);
// TODO - Make this into a utility to fetch the active output or the first one.
const activeOutputId = ref(props.node?.active ?? props.node?.outputs?.[0]?.id ?? null);
const activeModelId = ref(
props.node?.outputs?.find((output) => output.id === activeOutputId.value)?.state?.modelId
activeOutputId.value
? props.node?.outputs?.find((output) => output.id === activeOutputId.value)?.state?.modelId
: null
);
const updateModel = async () => {
if (activeModelId.value) {
Expand Down

0 comments on commit 41d3312

Please sign in to comment.