Skip to content

Commit 9fcc173

Browse files
committed
Cleanup tech debt after API changes.
1 parent a1c040b commit 9fcc173

File tree

7 files changed

+7
-57
lines changed

7 files changed

+7
-57
lines changed

strr-web/components/bcros/form-section/property/SummaryView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const propertyAddressDetails = computed((): UnitAddressAPII => {
6262
</div>
6363
<BcrosFormSectionReviewItem
6464
:title="tReview('isUnitOnPrincipalResidenceProperty')"
65-
:content="propertyDetails.isUnitOnPrincipalResidenceProperty !== null
65+
:content="propertyDetails.isUnitOnPrincipalResidenceProperty !== undefined
6666
? tReview(String(propertyDetails.isUnitOnPrincipalResidenceProperty)) : '-'
6767
"
6868
/>

strr-web/interfaces/account-i.ts

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -81,33 +81,8 @@ export interface ContactI {
8181
}
8282
}
8383

84-
interface UserTermsI {
85-
isTermsOfUseAccepted: boolean
86-
termsOfUseAcceptedVersion: string
87-
}
88-
89-
export interface ProfileI {
90-
contacts: ContactI[]
91-
created: string
92-
firstname: string
93-
id: number
94-
idpUserid: string
95-
keycloakGuid: string
96-
lastname: string
97-
loginSource: string
98-
loginTime: string
99-
modified: string
100-
modifiedBy: string
101-
type: string
102-
userStatus: number
103-
userTerms: UserTermsI
104-
username: string
105-
verified: boolean
106-
}
107-
10884
export interface MeI {
10985
orgs: OrgI[]
110-
profile: ProfileI
11186
settings: UserSettingsI[]
11287
}
11388

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
export interface TermsOfServiceI {
22
isTermsOfUseAccepted: boolean
33
termsOfUseAcceptedVersion: string
4-
termsOfUseCurrentVersion?: string
5-
termsOfUse?: string
64
}

strr-web/pages/account-select.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const existingAccountsTitle = `${t('account.existingAccountSection.title')} (${u
4242
4343
onMounted(() => {
4444
// if no sbc accounts navigate to sbc account creation
45-
if (!me?.settings.length) {
45+
if (!me?.orgs.length) {
4646
goToCreateSbcAccount()
4747
}
4848
})

strr-web/pages/create-account.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ const { createApplication } = useApplications()
132132
const submitInProgress = ref(false)
133133
onMounted(() => {
134134
// if no SBC accounts exist redirect to SBC account creation
135-
if (!me?.settings.length) {
135+
if (!me?.orgs.length) {
136136
goToCreateSbcAccount()
137137
}
138138
updateFees()

strr-web/stores/account.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ export const useBcrosAccount = defineStore('bcros/account', () => {
7878
if (!data) {
7979
throw new Error('Invalid STRR API response')
8080
}
81-
me.value = data as MeI
82-
return data as MeI
81+
me.value = data
82+
return data
8383
})
8484
.catch((error) => {
8585
console.warn('Error fetching me object.')

strr-web/tests/mocks/mockData.ts

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import type { ProfileI } from '~/interfaces/account-i'
2-
31
export const testParsedToken = {
42
firstname: 'First',
53
lastname: 'Last',
@@ -207,33 +205,12 @@ export const mockContact: ContactI = {
207205
firstName: 'John',
208206
lastName: 'Doe',
209207
middleName: 'Michael'
210-
}
211-
}
212-
213-
export const mockProfile: ProfileI = {
214-
contacts: [mockContact],
215-
created: '',
216-
firstname: '',
217-
id: 0,
218-
idpUserid: '',
219-
keycloakGuid: '',
220-
lastname: '',
221-
loginSource: '',
222-
loginTime: '',
223-
modified: '',
224-
modifiedBy: '',
225-
type: '',
226-
userStatus: 0,
227-
userTerms: {
228-
isTermsOfUseAccepted: true,
229-
termsOfUseAcceptedVersion: ''
230208
},
231-
username: '',
232-
verified: true
209+
businessLegalName: '',
210+
contactType: HostContactTypeE.INDIVIDUAL
233211
}
234212

235213
export const testMe: MeI = {
236214
orgs: [testDetailsForDev1],
237-
profile: mockProfile,
238215
settings: mockUserSettings
239216
}

0 commit comments

Comments
 (0)