fix: now will get all workflow as option

This commit is contained in:
Methapon Metanipat 2024-11-11 13:31:36 +07:00
parent 2bfb90beab
commit bff0318840

View file

@ -12,6 +12,7 @@ import { WorkflowTemplate } from 'src/stores/workflow-template/types';
import SelectInput from '../shared/SelectInput.vue';
import NoData from '../NoData.vue';
import { computed } from 'vue';
const { t } = useI18n();
const workflowStore = useWorkflowTemplate();
@ -258,7 +259,7 @@ async function filter(val: string, update: (...args: unknown[]) => void) {
async function fetchWorkflowOption(val?: string) {
const res = await workflowStore.getWorkflowTemplateList({
query: val,
pageSize: 30,
pageSize: 9999,
});
if (res) workflowData.value = res.result;
}
@ -276,6 +277,12 @@ onMounted(async () => {
await fetchWorkflowOption();
});
const currentFlow = computed(() => {
return workflowData.value.find(
(v) => v.id === formServiceProperties.value.workflowId,
);
});
watch(
() => formServiceProperties.value.workflowId,
() => {