Skip to content

Commit d428582

Browse files
author
vikasrohit
authored
Merge pull request #1996 from appirio-tech/hotfix/new-flow-caas
Hotfix/new flow caas
2 parents 7b018e4 + f1625b9 commit d428582

File tree

4 files changed

+685
-172
lines changed

4 files changed

+685
-172
lines changed
Lines changed: 337 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,337 @@
1+
// import NumberText from '../../components/NumberText/NumberText'
2+
import { isFileRequired, findTitle, findFilesSectionTitle } from '../projectWizard'
3+
4+
const sections = [
5+
{
6+
id: 'appDefinition',
7+
title: findTitle,
8+
required: true,
9+
description: 'Welcome to your own private Gig Crowd',
10+
subSections: [
11+
{
12+
id: 'projectName',
13+
required: true,
14+
validationError: 'Please provide a name to your project',
15+
fieldName: 'name',
16+
description: '',
17+
title: 'Project Name',
18+
type: 'project-name'
19+
},
20+
{
21+
id: 'questions',
22+
required: true,
23+
hideTitle: true,
24+
title: 'Questions',
25+
description: '',
26+
type: 'questions',
27+
questions: [
28+
{
29+
id: 'projectInfo',
30+
fieldName: 'description',
31+
// required is not needed if we specifiy validations
32+
// required: true,
33+
validations: 'isRequired,minLength:160',
34+
validationErrors: {
35+
isRequired: 'Please describe your application.',
36+
minLength: 'Please enter at least 160 characters'
37+
},
38+
description: 'Brief describe your application',
39+
title: 'Description',
40+
type: 'textbox'
41+
},
42+
{
43+
icon: 'question',
44+
title: 'How many full time resources do you need?',
45+
description: '',
46+
fieldName: 'details.resources.total',
47+
type: 'textbox',
48+
required: true,
49+
validationError: 'Please enter number of resources'
50+
},
51+
{
52+
icon: 'question',
53+
title: 'How many months do you need the resource for',
54+
description: '',
55+
fieldName: 'details.resources.months',
56+
type: 'slide-radiogroup',
57+
options: [
58+
{value: '1', title: '1'},
59+
{value: '2', title: '2'},
60+
{value: '3', title: '3'},
61+
{value: '4', title: '4'},
62+
{value: '5', title: '5'},
63+
{value: '6', title: '6'},
64+
{value: '7', title: '7'},
65+
{value: '8', title: '8'},
66+
{value: '9', title: '9'},
67+
{value: '10', title: '10'},
68+
{value: '11', title: '11'},
69+
{value: '12', title: '12'}
70+
],
71+
required: true,
72+
validationError: 'Please select one'
73+
},
74+
{
75+
icon: 'question',
76+
title: 'What skills do you need?',
77+
description: '',
78+
fieldName: 'details.resources.skills',
79+
type: 'checkbox-group',
80+
options: [
81+
{ value: 'ios', label:'iOS' },
82+
{ value: 'data-sci', label:'Data Science' },
83+
{ value: 'android', label:'Android' },
84+
{ value: 'java', label:'java' },
85+
{ value: 'dotnet', label:'.NET' },
86+
{ value: 'node', label:'NodeJS' },
87+
{ value: 'javascript', label:'Javascript' },
88+
{ value: 'react', label:'ReactJS' },
89+
{ value: 'angular', label:'AngularJS' }
90+
]
91+
},
92+
{
93+
icon: 'question',
94+
title: 'What is the typical hourly rate you are paying?',
95+
description: '',
96+
fieldName: 'details.resources.hourlyrate',
97+
type: 'slide-radiogroup',
98+
options: [
99+
{ value: 'under30', title:'Under $30' },
100+
{ value: 'under60', title:'Under $60' },
101+
{ value: 'under80', title:'Under $80' },
102+
{ value: 'under100', title:'Under $100' },
103+
{ value: 'under125', title:'Under $125' },
104+
{ value: 'under150', title:'Under $150' },
105+
{ value: 'over150', title:'Over $150' },
106+
]
107+
},
108+
{
109+
icon: 'question',
110+
title: 'What language would you like to interact with the team?',
111+
description: '',
112+
fieldName: 'details.resources.hourlyrate',
113+
type: 'slide-radiogroup',
114+
options: [
115+
{ value: 'english', title:'English' },
116+
{ value: 'spanish', title:'Spanish' },
117+
{ value: 'german', title:'German' },
118+
{ value: 'japanese', title:'Japanese' },
119+
{ value: 'other', title:'Other' }
120+
]
121+
},
122+
{
123+
fieldName: 'details.resources.tooling',
124+
// required is not needed if we specifiy validations
125+
// required: true,
126+
description: 'Please List all project tools you normally interact with',
127+
title: 'Project Tools you utilize for interacting with developers',
128+
type: 'textbox'
129+
},
130+
]
131+
},
132+
{
133+
id: 'notes',
134+
fieldName: 'details.appDefinition.notes',
135+
title: 'Additional Notes',
136+
description: 'Please detail any other additional information. After \
137+
completing this form, you\'ll be able to add additional information about \
138+
your code base',
139+
type: 'notes'
140+
}
141+
142+
143+
]
144+
},
145+
{
146+
id: 'optionals',
147+
required: false,
148+
title: 'Code base',
149+
description: 'Please provide us access to your codebase below or contact \
150+
Topcoder through your dashboard.',
151+
subSections: [
152+
{
153+
id: 'additional',
154+
required: false,
155+
title: 'Codebase questions',
156+
description: '',
157+
type: 'questions',
158+
questions: [
159+
{
160+
icon: 'question',
161+
fieldName: 'details.security.codeURL',
162+
description: '(if you prefer you can also upload your code below)',
163+
title: 'Please provide a URL to your code base repository',
164+
type: 'textbox'
165+
166+
},
167+
{
168+
icon: 'question',
169+
title: 'Please provide Topcoder with any additional information about \
170+
accessing your code base',
171+
description: '',
172+
fieldName: 'details.security.additionalInfo',
173+
type: 'textbox'
174+
}
175+
]
176+
},
177+
{
178+
id: 'files',
179+
required: isFileRequired,
180+
title: findFilesSectionTitle,
181+
description: '',
182+
type: 'files',
183+
fieldName: 'attachments'
184+
}
185+
186+
]
187+
}
188+
189+
190+
]
191+
192+
export default sections
193+
194+
export const basicSections = [
195+
{
196+
id: 'appDefinition',
197+
title: '',
198+
required: true,
199+
description: 'Create your own private Gig Workforce with Topcoder by answering \
200+
a few simple questions',
201+
subSections: [
202+
{
203+
id: 'projectName',
204+
required: true,
205+
validationError: 'Please provide a name to your project',
206+
fieldName: 'name',
207+
title: 'Project Name',
208+
description: '',
209+
type: 'project-name'
210+
},
211+
{
212+
id: 'questions',
213+
required: true,
214+
hideTitle: true,
215+
title: 'Questions',
216+
description: '',
217+
type: 'questions',
218+
questions: [
219+
{
220+
id: 'projectInfo',
221+
fieldName: 'description',
222+
// required is not needed if we specifiy validations
223+
// required: true,
224+
validations: 'isRequired,minLength:160',
225+
validationErrors: {
226+
isRequired: 'Please describe your application.',
227+
minLength: 'Please enter at least 160 characters'
228+
},
229+
description: 'Brief describe your application',
230+
title: 'Description',
231+
type: 'textbox'
232+
},
233+
{
234+
icon: 'question',
235+
title: 'How many full time resources do you need?',
236+
description: '',
237+
fieldName: 'details.resources.total',
238+
type: 'textbox',
239+
required: true,
240+
validationError: 'Please enter number of resources'
241+
},
242+
{
243+
icon: 'question',
244+
title: 'How many months do you need the resource for',
245+
description: '',
246+
fieldName: 'details.resources.months',
247+
type: 'slide-radiogroup',
248+
options: [
249+
{value: '1', title: '1'},
250+
{value: '2', title: '2'},
251+
{value: '3', title: '3'},
252+
{value: '4', title: '4'},
253+
{value: '5', title: '5'},
254+
{value: '6', title: '6'},
255+
{value: '7', title: '7'},
256+
{value: '8', title: '8'},
257+
{value: '9', title: '9'},
258+
{value: '10', title: '10'},
259+
{value: '11', title: '11'},
260+
{value: '12', title: '12'}
261+
],
262+
required: true,
263+
validationError: 'Please select one'
264+
},
265+
{
266+
icon: 'question',
267+
title: 'What skills do you need?',
268+
description: '',
269+
fieldName: 'details.resources.skills',
270+
type: 'checkbox-group',
271+
options: [
272+
{ value: 'ios', label:'iOS' },
273+
{ value: 'data-sci', label:'Data Science' },
274+
{ value: 'android', label:'Android' },
275+
{ value: 'java', label:'java' },
276+
{ value: 'dotnet', label:'.NET' },
277+
{ value: 'node', label:'NodeJS' },
278+
{ value: 'javascript', label:'Javascript' },
279+
{ value: 'react', label:'ReactJS' },
280+
{ value: 'angular', label:'AngularJS' }
281+
]
282+
},
283+
{
284+
icon: 'question',
285+
title: 'What is the typical hourly rate you are paying?',
286+
description: '',
287+
fieldName: 'details.resources.hourlyrate',
288+
type: 'slide-radiogroup',
289+
options: [
290+
{ value: 'under30', title:'Under $30' },
291+
{ value: 'under60', title:'Under $60' },
292+
{ value: 'under80', title:'Under $80' },
293+
{ value: 'under100', title:'Under $100' },
294+
{ value: 'under125', title:'Under $125' },
295+
{ value: 'under150', title:'Under $150' },
296+
{ value: 'over150', title:'Over $150' },
297+
]
298+
},
299+
{
300+
icon: 'question',
301+
title: 'What language would you like to interact with the team?',
302+
description: '',
303+
fieldName: 'details.resources.hourlyrate',
304+
type: 'slide-radiogroup',
305+
options: [
306+
{ value: 'english', title:'English' },
307+
{ value: 'spanish', title:'Spanish' },
308+
{ value: 'german', title:'German' },
309+
{ value: 'japanese', title:'Japanese' },
310+
{ value: 'other', title:'Other' }
311+
]
312+
},
313+
{
314+
fieldName: 'details.resources.tooling',
315+
// required is not needed if we specifiy validations
316+
// required: true,
317+
description: 'Please List all project tools you normally interact with',
318+
title: 'Project Tools you utilize for interacting with developers',
319+
type: 'textbox'
320+
},
321+
]
322+
},
323+
{
324+
id: 'notes',
325+
fieldName: 'details.appDefinition.notes',
326+
title: 'Additional Notes',
327+
description: 'Please detail any other additional information. After \
328+
completing this form, you\'ll be able to add additional information about \
329+
your code base',
330+
type: 'notes'
331+
}
332+
333+
]
334+
}
335+
336+
337+
]

0 commit comments

Comments
 (0)