From a540f1586fc42446c57c40cdbdcc4a99546f194c Mon Sep 17 00:00:00 2001 From: Adrian <95376249+asylves1@users.noreply.github.com> Date: Fri, 20 Dec 2024 14:34:50 -0500 Subject: [PATCH] change switch button to toggle (#5912) --- .../tera-model-from-equations-drilldown.vue | 51 ++++++++++++------- 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/packages/client/hmi-client/src/components/workflow/ops/model-from-equations/tera-model-from-equations-drilldown.vue b/packages/client/hmi-client/src/components/workflow/ops/model-from-equations/tera-model-from-equations-drilldown.vue index b2770312d9..3b8ed9e0bf 100644 --- a/packages/client/hmi-client/src/components/workflow/ops/model-from-equations/tera-model-from-equations-drilldown.vue +++ b/packages/client/hmi-client/src/components/workflow/ops/model-from-equations/tera-model-from-equations-drilldown.vue @@ -26,14 +26,28 @@
@@ -184,7 +198,7 @@ import TeraDrilldownPreview from '@/components/drilldown/tera-drilldown-preview. import TeraAssetBlock from '@/components/widgets/tera-asset-block.vue'; import { computed, onMounted, onBeforeUnmount, ref, watch } from 'vue'; import type { Card, DocumentAsset, Model } from '@/types/Types'; -import { cloneDeep, isEmpty } from 'lodash'; +import { cloneDeep, isEmpty, uniqueId } from 'lodash'; import { equationsToAMR, getCleanedEquations, type EquationsToAMRRequest } from '@/services/knowledge'; import { downloadDocumentAsset, getDocumentAsset, getDocumentFileAsText } from '@/services/document-assets'; import { equationsFromImage } from '@/services/goLLM'; @@ -198,7 +212,7 @@ import TeraDrilldownSection from '@/components/drilldown/tera-drilldown-section. import TeraPdfEmbed from '@/components/widgets/tera-pdf-embed.vue'; import TeraTextEditor from '@/components/documents/tera-text-editor.vue'; import { logger } from '@/utils/logger'; -import SplitButton from 'primevue/splitbutton'; +import RadioButton from 'primevue/radiobutton'; import { ModelFromEquationsState, EquationBlock } from './model-from-equations-operation'; const emit = defineEmits(['close', 'update-state', 'append-output', 'update-output', 'select-output']); @@ -208,16 +222,15 @@ const props = defineProps<{ const selectedOutputId = ref(''); -const runItems = [ - { - label: 'SKEMA', - command: () => onRun('skema') - }, - { - label: 'Mira', - command: () => onRun('mira') - } -]; +enum RunType { + mira = 'mira', + skema = 'skema' +} + +const runType = ref(RunType.mira); +function switchRunType(type: RunType) { + runType.value = type; +} const clonedState = ref({ equations: [],