Skip to content

Commit 4519c74

Browse files
authored
Merge pull request #1147 from topcoder-platform/PM-1498_copilot-opportunity-title
PM-1498 - support for opportunity title
2 parents d505fbb + 596ca36 commit 4519c74

File tree

7 files changed

+29
-2
lines changed

7 files changed

+29
-2
lines changed

src/apps/copilots/src/models/CopilotOpportunity.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export interface CopilotOpportunity {
1515
numHoursPerWeek: number,
1616
numWeeks: number,
1717
overview: string,
18+
opportunityTitle: string,
1819
paymentType: string,
1920
otherPaymentType: string,
2021
requiresCommunication: 'yes' | 'no',

src/apps/copilots/src/models/CopilotRequest.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export interface CopilotRequest {
1313
numHoursPerWeek: number,
1414
numWeeks: number,
1515
overview: string,
16+
opportunityTitle: string,
1617
paymentType: string,
1718
otherPaymentType: string,
1819
requiresCommunication: 'yes' | 'no',

src/apps/copilots/src/pages/copilot-opportunity-details/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ const CopilotOpportunityDetails: FC<{}> = () => {
194194
) }
195195
<div className={styles.wrapper}>
196196
<h1 className={styles.header}>
197-
{opportunity?.projectName}
197+
{opportunity?.opportunityTitle ?? opportunity?.projectName}
198198
</h1>
199199
<div className={styles.infoRow}>
200200
<div className={styles.infoColumn}>

src/apps/copilots/src/pages/copilot-opportunity-list/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const tableColumns: TableColumn<CopilotOpportunity>[] = [
2525
propertyName: 'projectName',
2626
renderer: (copilotOpportunity: CopilotOpportunity) => (
2727
<div className={styles.title}>
28-
{copilotOpportunity.projectName}
28+
{copilotOpportunity.opportunityTitle}
2929
</div>
3030
),
3131
type: 'element',

src/apps/copilots/src/pages/copilot-request-form/index.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ const CopilotRequestForm: FC<{}> = () => {
248248
<div className={styles.form}>
249249
<form>
250250
<h1 className={styles.heading}> Copilot Request </h1>
251+
251252
<p className={styles.subheading}>
252253
Hi,
253254
{' '}
@@ -262,6 +263,21 @@ const CopilotRequestForm: FC<{}> = () => {
262263
Resolve the errors on the form before submitting
263264
</p>
264265
)}
266+
267+
<p className={styles.formRow}>Copilot Opportunity Title</p>
268+
<InputText
269+
dirty
270+
type='text'
271+
label='Title'
272+
name='opportunityTitle'
273+
placeholder='Enter a title for the opportunity'
274+
value={formValues.opportunityTitle?.toString()}
275+
onChange={bind(handleFormValueChange, this, 'opportunityTitle')}
276+
error={formErrors.opportunityTitle}
277+
tabIndex={0}
278+
forceUpdateValue
279+
/>
280+
265281
<p className={styles.formRow}>Select the project you want the copilot for</p>
266282
<InputSelectReact
267283
tabIndex={0}

src/apps/copilots/src/pages/copilot-requests/copilot-request-modal/CopilotRequestModal.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ const CopilotRequestModal: FC<CopilotRequestModalProps> = props => {
5959
<div>Project</div>
6060
<div>{props.project?.name}</div>
6161
</div>
62+
<div className={styles.detailsLine}>
63+
<div>Title</div>
64+
<div>{props.request.opportunityTitle}</div>
65+
</div>
6266
<div className={styles.detailsLine}>
6367
<div>Opportunity details</div>
6468
<a

src/apps/copilots/src/pages/copilot-requests/index.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,11 @@ const CopilotRequestsPage: FC = () => {
170170
},
171171
type: 'element',
172172
},
173+
{
174+
label: 'Title',
175+
propertyName: 'opportunityTitle',
176+
type: 'text',
177+
},
173178
{
174179
label: 'Type',
175180
propertyName: 'type',

0 commit comments

Comments
 (0)