From 9ad2ea955213420eaa67c342028c6db2f94d09bc Mon Sep 17 00:00:00 2001 From: daeyeon ko Date: Fri, 3 Jan 2025 15:38:34 +0900 Subject: [PATCH] refactor: createAccount logic for better pure function (#5339) (#5399) * refactor: split createAccount logic for better modularity * refactor: error handling --------- Signed-off-by: daeyeon ko --- .../ServiceAccountBaseInformationForm.vue | 3 +- .../pages/ServiceAccountAddPage.vue | 135 +++++++++++------- 2 files changed, 83 insertions(+), 55 deletions(-) diff --git a/apps/web/src/services/asset-inventory/components/ServiceAccountBaseInformationForm.vue b/apps/web/src/services/asset-inventory/components/ServiceAccountBaseInformationForm.vue index cc06969f0b..ab29c7ff21 100644 --- a/apps/web/src/services/asset-inventory/components/ServiceAccountBaseInformationForm.vue +++ b/apps/web/src/services/asset-inventory/components/ServiceAccountBaseInformationForm.vue @@ -7,6 +7,7 @@ import { SpaceConnector } from '@cloudforet/core-lib/space-connector'; import { PFieldGroup, PJsonSchemaForm, PTextInput, } from '@cloudforet/mirinae'; +import type { JsonSchema } from '@cloudforet/mirinae/types/controls/forms/json-schema-form/type'; import type { ListResponse } from '@/schema/_common/api-verbs/list'; import type { ServiceAccountListParameters } from '@/schema/identity/service-account/api-verbs/list'; @@ -27,7 +28,7 @@ import type { BaseInformationForm, ProjectForm } from '@/services/asset-inventor interface Props { - schema: any; + schema: JsonSchema; mode: 'CREATE' | 'UPDATE'; } diff --git a/apps/web/src/services/asset-inventory/pages/ServiceAccountAddPage.vue b/apps/web/src/services/asset-inventory/pages/ServiceAccountAddPage.vue index 4a756d2006..b102019dec 100644 --- a/apps/web/src/services/asset-inventory/pages/ServiceAccountAddPage.vue +++ b/apps/web/src/services/asset-inventory/pages/ServiceAccountAddPage.vue @@ -1,5 +1,5 @@