From 8dc95de9bf9236de0be762e99e49a3d55ea10654 Mon Sep 17 00:00:00 2001 From: Wanjin Noh Date: Fri, 20 Dec 2024 16:59:37 +0900 Subject: [PATCH 1/2] fix(task-management): remove unnecessary scope from sharedConfigStore call Signed-off-by: Wanjin Noh --- .../stores/use-task-management-template-store.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/services/ops-flow/task-management-templates/stores/use-task-management-template-store.ts b/apps/web/src/services/ops-flow/task-management-templates/stores/use-task-management-template-store.ts index 7eeae668be..fc4367dcb8 100644 --- a/apps/web/src/services/ops-flow/task-management-templates/stores/use-task-management-template-store.ts +++ b/apps/web/src/services/ops-flow/task-management-templates/stores/use-task-management-template-store.ts @@ -86,7 +86,7 @@ export const useTaskManagementTemplateStore = defineStore('task-management-templ const prev = state.templateId; state.templateId = templateId; try { - await sharedConfigStore.set('TASK_TEMPLATE', { template_id: templateId }, 'DOMAIN'); + await sharedConfigStore.set('TASK_TEMPLATE', { template_id: templateId }); showSuccessMessage(i18n.t('OPSFLOW.ALT_S_EDIT_TARGET', { target: i18n.t('OPSFLOW.TASK_MANAGEMENT.TEMPLATE_TYPE') }), ''); } catch (e) { ErrorHandler.handleRequestError(e, i18n.t('OPSFLOW.ALT_E_EDIT_TARGET', { target: i18n.t('OPSFLOW.TASK_MANAGEMENT.TEMPLATE_TYPE') })); From 5e209bc1474eb61d2dedd1b87e2a23f97eb91b39 Mon Sep 17 00:00:00 2001 From: Wanjin Noh Date: Fri, 20 Dec 2024 17:27:39 +0900 Subject: [PATCH 2/2] 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(() => [