Skip to content

Commit cd48385

Browse files
committed
fix: demo feedbacks implementation
1 parent 26ee3b3 commit cd48385

File tree

3 files changed

+11
-86
lines changed

3 files changed

+11
-86
lines changed

src/apps/copilots/src/pages/copilot-opportunity-details/apply-opportunity-modal/ApplyOpportunityModal.tsx

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ const ApplyOpportunityModal: FC<ApplyOpportunityModalProps> = props => {
4444
size='lg'
4545
title={
4646
success
47-
? `Your Application for ${props.projectName} Has Been Received!`
48-
: `Confirm Your Copilot Application for ${props.projectName}`
47+
? `Your Application Has Been Received!`
48+
: `Confirm Your Copilot Application`
4949
}
5050
buttons={
5151
!success ? (
@@ -62,21 +62,17 @@ const ApplyOpportunityModal: FC<ApplyOpportunityModalProps> = props => {
6262
<div className={styles.info}>
6363
{
6464
success
65-
? `We appreciate the time and effort you've taken to apply
66-
for this exciting opportunity. Our team is committed
67-
to providing a seamless and efficient process to ensure a
68-
great experience for all copilots. We will review your application
69-
within short time.`
65+
? `Thank you for taking the time to apply for this exciting opportunity. We truly value your interest and effort. Your application will be reviewed promptly.`
7066
: `We're excited to see your interest in joining our team as a copilot
71-
for the ${props.projectName} project! Before we proceed, we want to
67+
for the "${props.projectName}" project! Before we proceed, we want to
7268
ensure that you have carefully reviewed the project requirements and
73-
are committed to meeting them.`
69+
are committed to meeting them. Please write below the reason(s) why you believe you're a good fit for this project (e.g., previous experience, availability, etc.).`
7470
}
7571
</div>
7672
{
7773
!success && (
7874
<InputTextarea
79-
name='Notes'
75+
name='Reason'
8076
onChange={onChange}
8177
value={notes}
8278
error={error}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ const tableColumns: TableColumn<CopilotOpportunity>[] = [
8484
propertyName: 'startDate',
8585
type: 'date',
8686
},
87+
{
88+
label: 'Duration(Weeks)',
89+
propertyName: 'numWeeks',
90+
type: 'text',
91+
},
8792
{
8893
label: 'Complexity',
8994
propertyName: 'complexity',

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

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ const CopilotRequestForm: FC<{}> = () => {
2020
const [formValues, setFormValues] = useState<any>({})
2121
const [isFormChanged, setIsFormChanged] = useState(false)
2222
const [formErrors, setFormErrors] = useState<any>({})
23-
const [existingCopilot, setExistingCopilot] = useState<string>('')
2423
const [paymentType, setPaymentType] = useState<string>('')
2524

2625
const projectTypes = ProjectTypes ? ProjectTypes.map(project => ({
@@ -29,16 +28,6 @@ const CopilotRequestForm: FC<{}> = () => {
2928
}))
3029
: []
3130

32-
function exisitingCopilotToggle(t: 'yes'|'no'): void {
33-
setExistingCopilot(t)
34-
setFormErrors((prevFormErrors: any) => {
35-
const updatedErrors = { ...prevFormErrors }
36-
delete updatedErrors.existingCopilot
37-
return updatedErrors
38-
})
39-
setIsFormChanged(true)
40-
}
41-
4231
function togglePaymentType(t: 'standard'|'other'): void {
4332
setFormValues((prevFormValues: any) => ({
4433
...prevFormValues,
@@ -141,12 +130,6 @@ const CopilotRequestForm: FC<{}> = () => {
141130

142131
const fieldValidations: { condition: boolean; key: string; message: string }[] = [
143132
{ condition: !formValues.projectId, key: 'projectId', message: 'Project is required' },
144-
{ condition: !existingCopilot, key: 'existingCopilot', message: 'Selection is required' },
145-
{
146-
condition: existingCopilot === 'yes' && !formValues.copilotUsername,
147-
key: 'copilotUsername',
148-
message: 'Username is required',
149-
},
150133
{ condition: !formValues.complexity, key: 'complexity', message: 'Selection is required' },
151134
{
152135
condition: !formValues.requiresCommunication,
@@ -220,7 +203,6 @@ const CopilotRequestForm: FC<{}> = () => {
220203
toast.success('Copilot request sent successfully')
221204
setFormValues({
222205
complexity: '',
223-
copilotUsername: '',
224206
numHoursPerWeek: '',
225207
numWeeks: '',
226208
otherPaymentType: '',
@@ -234,7 +216,6 @@ const CopilotRequestForm: FC<{}> = () => {
234216
})
235217
setIsFormChanged(false)
236218
setFormErrors({})
237-
setExistingCopilot('')
238219
setPaymentType('')
239220
})
240221
.catch(e => {
@@ -288,63 +269,6 @@ const CopilotRequestForm: FC<{}> = () => {
288269
dirty
289270
error={formErrors.projectId}
290271
/>
291-
<p className={styles.formRow}>
292-
Are you already working with a copilot that you&apos;d love to work with on this project
293-
as well?
294-
</p>
295-
296-
<div className={styles.formRadioBtn}>
297-
<InputRadio
298-
label='Yes'
299-
name='existingCopilot'
300-
id='yes'
301-
value='Yes'
302-
checked={existingCopilot === 'yes'}
303-
onChange={function t() { exisitingCopilotToggle('yes') }}
304-
/>
305-
<InputRadio
306-
label='No'
307-
name='existingCopilot'
308-
id='no'
309-
value='No'
310-
checked={existingCopilot === 'no'}
311-
onChange={function t() { exisitingCopilotToggle('no') }}
312-
/>
313-
</div>
314-
{
315-
existingCopilot === 'yes'
316-
&& (
317-
<div className={styles.formRow}>
318-
<p className={styles.formRow}>
319-
Great! What is the username of the copilot you&apos;d like to work with again?
320-
</p>
321-
322-
<InputText
323-
name='copilot name'
324-
label='Copilot username'
325-
placeholder='Type the copilot username here...'
326-
dirty
327-
tabIndex={0}
328-
type='text'
329-
onChange={bind(handleFormValueChange, this, 'copilotUsername')}
330-
value={formValues.copilotUsername}
331-
error={formErrors.copilotUsername}
332-
/>
333-
</div>
334-
)
335-
}
336-
{formErrors.existingCopilot && (
337-
<p className={styles.error}>
338-
<IconSolid.ExclamationIcon />
339-
{formErrors.existingCopilot}
340-
</p>
341-
)}
342-
{formValues.existingCopilot === 'yes' && !formValues.copilotUsername && (
343-
<p className={styles.error}>
344-
<IconSolid.ExclamationIcon />
345-
{formErrors.existingCopilot}
346-
</p>
347-
)}
348272

349273
<p className={styles.formRow}>What type of project are you working on?</p>
350274
<InputSelect

0 commit comments

Comments
 (0)