File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
app/src/views/AccountDetails Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " go-web-app " : patch
3+ ---
4+
5+ Show Organization Type properly in Account Details page
Original file line number Diff line number Diff line change @@ -17,9 +17,11 @@ import {
1717 isDefined ,
1818 isNotDefined ,
1919 isTruthyString ,
20+ listToMap ,
2021} from '@togglecorp/fujs' ;
2122
2223import Link from '#components/Link' ;
24+ import useGlobalEnums from '#hooks/domain/useGlobalEnums' ;
2325import useUserMe from '#hooks/domain/useUserMe' ;
2426import useFilterState from '#hooks/useFilterState' ;
2527import { useRequest } from '#utils/restRequest' ;
@@ -49,6 +51,11 @@ export function Component() {
4951 ] = useBooleanState ( false ) ;
5052
5153 const meResponse = useUserMe ( ) ;
54+ const { api_profile_org_types } = useGlobalEnums ( ) ;
55+ const orgTypeMap = listToMap (
56+ api_profile_org_types ,
57+ ( { key } ) => key ,
58+ ) ;
5259
5360 const onEditProfileCancel = useCallback ( ( ) => {
5461 setShowEditProfileModal ( false ) ;
@@ -146,7 +153,11 @@ export function Component() {
146153 />
147154 < TextOutput
148155 label = { strings . organizationTypeLabel }
149- value = { meResponse ?. profile ?. org_type }
156+ value = {
157+ isDefined ( meResponse ?. profile . org_type )
158+ ? orgTypeMap ?. [ meResponse ?. profile ?. org_type ] ?. value
159+ : undefined
160+ }
150161 strongLabel
151162 />
152163 < TextOutput
You can’t perform that action at this time.
0 commit comments