From fdbb35d7a1b254aa6c7c09d93e7a9938c3628691 Mon Sep 17 00:00:00 2001 From: Jia Xu Date: Thu, 23 May 2024 09:08:05 -0700 Subject: [PATCH] code review fix and version update --- auth-web/package-lock.json | 4 ++-- auth-web/package.json | 2 +- .../components/auth/common/AccountBusinessType.vue | 13 ++++++++----- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/auth-web/package-lock.json b/auth-web/package-lock.json index a6fb1dc8f3..5de569ad74 100644 --- a/auth-web/package-lock.json +++ b/auth-web/package-lock.json @@ -1,12 +1,12 @@ { "name": "auth-web", - "version": "2.6.13", + "version": "2.6.14", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "auth-web", - "version": "2.6.13", + "version": "2.6.14", "dependencies": { "@bcrs-shared-components/base-address": "2.0.3", "@bcrs-shared-components/bread-crumb": "1.0.8", diff --git a/auth-web/package.json b/auth-web/package.json index 723d4d3544..154711ba94 100644 --- a/auth-web/package.json +++ b/auth-web/package.json @@ -1,6 +1,6 @@ { "name": "auth-web", - "version": "2.6.13", + "version": "2.6.14", "appName": "Auth Web", "sbcName": "SBC Common Components", "private": true, diff --git a/auth-web/src/components/auth/common/AccountBusinessType.vue b/auth-web/src/components/auth/common/AccountBusinessType.vue index 74acff4409..5b27a0cc6c 100644 --- a/auth-web/src/components/auth/common/AccountBusinessType.vue +++ b/auth-web/src/components/auth/common/AccountBusinessType.vue @@ -187,6 +187,7 @@ import { computed, defineComponent, nextTick, onMounted, reactive, toRefs, watch import ConfigHelper from '@/util/config-helper' import { OrgBusinessType } from '@/models/Organization' import OrgNameAutoComplete from '@/views/auth/OrgNameAutoComplete.vue' +import { storeToRefs } from 'pinia' import { useCodesStore } from '@/stores/codes' import { useOrgStore } from '@/stores/org' @@ -229,9 +230,12 @@ export default defineComponent({ const codesStore = useCodesStore() const orgStore = useOrgStore() + const { + businessSizeCodes, + businessTypeCodes + } = storeToRefs(codesStore) + const currentOrganization = computed(() => orgStore.currentOrganization) - const businessSizeCodes = computed(() => codesStore.businessSizeCodes) - const businessTypeCodes = computed(() => codesStore.businessTypeCodes) const isCurrentGovnOrg = currentOrganization.value?.accessType === AccessType.GOVN const state = reactive({ @@ -246,7 +250,7 @@ export default defineComponent({ businessSize: '', governmentSize: '', branchName: '', - isIndividualAccount: false, + isIndividualAccount: true, isGovnAccount: false, orgNameRules: [], orgBusinessTypeRules: [], @@ -339,7 +343,7 @@ export default defineComponent({ await codesStore.getGovernmentTypeCodes() await codesStore.getBusinessSizeCodes() await codesStore.getBusinessTypeCodes() - if (currentOrganization.value.name) { + if (currentOrganization.value?.name) { state.name = currentOrganization.value.name state.isBusinessAccount = currentOrganization.value.isBusinessAccount state.businessType = currentOrganization.value.businessType @@ -392,7 +396,6 @@ export default defineComponent({ return { ...toRefs(state), - name, getOrgNameLabel, setAutoCompleteSearchValue, onOrgNameChange,