From 5e209bc1474eb61d2dedd1b87e2a23f97eb91b39 Mon Sep 17 00:00:00 2001 From: Wanjin Noh Date: Fri, 20 Dec 2024 17:27:39 +0900 Subject: [PATCH] fix: update error handling for task type selection and remove unused metadata Signed-off-by: Wanjin Noh --- .../src/services/ops-flow/components/TaskContentBaseForm.vue | 4 ++-- .../stores/use-task-field-metadata-store.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/web/src/services/ops-flow/components/TaskContentBaseForm.vue b/apps/web/src/services/ops-flow/components/TaskContentBaseForm.vue index 0f73b78816..3f06e53150 100644 --- a/apps/web/src/services/ops-flow/components/TaskContentBaseForm.vue +++ b/apps/web/src/services/ops-flow/components/TaskContentBaseForm.vue @@ -78,8 +78,8 @@ const handleUpdateSelectedTaskType = async (items: SelectDropdownMenuItem[]) => await taskContentFormStore.setCurrentTaskType(items[0].name); // set current task type to store for other fields const taskType = taskContentFormState.currentTaskType; const category = taskContentFormGetters.currentCategory; - if (items.length > 0 && (!category || !taskType)) { - ErrorHandler.handleError(new Error('Failed to get category or task type')); + if (items.length > 0 && !category) { + ErrorHandler.handleError(new Error('Failed to get category')); return; } if (category && taskType) { diff --git a/apps/web/src/services/ops-flow/task-fields-configuration/stores/use-task-field-metadata-store.ts b/apps/web/src/services/ops-flow/task-fields-configuration/stores/use-task-field-metadata-store.ts index 58b38b408e..8eb1e937ef 100644 --- a/apps/web/src/services/ops-flow/task-fields-configuration/stores/use-task-field-metadata-store.ts +++ b/apps/web/src/services/ops-flow/task-fields-configuration/stores/use-task-field-metadata-store.ts @@ -33,7 +33,6 @@ export const useTaskFieldMetadataStore = defineStore('task-field-metadata', () = getters.taskFieldTypeMetadataMap.LABELS, getters.taskFieldTypeMetadataMap.DROPDOWN, getters.taskFieldTypeMetadataMap.DATE, - getters.taskFieldTypeMetadataMap.ASSET, getters.taskFieldTypeMetadataMap.PROJECT, ]), defaultFields: computed(() => [