File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
src/apps/copilots/src/pages/copilot-opportunity-details Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ import {
3535} from '../../services/copilot-opportunities'
3636import { FormattedMembers , useMembers } from '../../services/members'
3737import { copilotRoutesMap } from '../../copilots.routes'
38+ import { ProjectType } from '../../constants'
3839
3940import { ApplyOpportunityModal } from './apply-opportunity-modal'
4041import {
@@ -127,6 +128,21 @@ const CopilotOpportunityDetails: FC<{}> = () => {
127128 const application = copilotApplications && copilotApplications [ 0 ]
128129 const isAlreadyMemberOfTheProject = profile && opportunity ?. members ?. includes ( profile . userId )
129130
131+ const getOpportunityType = ( type : string ) : ProjectType => {
132+ switch ( type ) {
133+ case 'ai' :
134+ return ProjectType . ai
135+ case 'datascience' :
136+ return ProjectType . datascience
137+ case 'dev' :
138+ return ProjectType . developement
139+ case 'design' :
140+ return ProjectType . design
141+ default :
142+ return ProjectType . qa
143+ }
144+ }
145+
130146 return (
131147 < ContentLayout
132148 title = 'Copilot Opportunity'
@@ -204,7 +220,11 @@ const CopilotOpportunityDetails: FC<{}> = () => {
204220 < IconOutline . CogIcon className = { styles . icon } />
205221 < div className = { styles . infoText } >
206222 < span className = { styles . infoHeading } > Type</ span >
207- < span className = { styles . infoValue } > { opportunity ?. type } </ span >
223+ < span
224+ className = { styles . infoValue }
225+ >
226+ { opportunity ?. type && getOpportunityType ( opportunity ?. type ) }
227+ </ span >
208228 </ div >
209229 </ div >
210230 < div className = { styles . infoColumn } >
You can’t perform that action at this time.
0 commit comments