Skip to content

Commit 2de7119

Browse files
authored
Merge pull request #1121 from appirio-tech/dev
Production release : v1.2.2
2 parents f3a2f8a + 5fa523f commit 2de7119

23 files changed

+478
-36
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Install dependencies by running the following in the root of the project:
2929
- **Note:** You must use npm 3. Type `npm -v` to ensure you have a 3.x version.
3030

3131
## NPM Commands
32-
- To run locally, run `npm start` and head to `http://localhost:3000/search/challenges`
32+
- To run locally, run `npm start` and head to `http://localhost:3000/new_project`
3333
- Run tests with `npm test` or use `npm run test:watch` to rerun tests after files change
3434
- To make sure your code passes linting: `npm run lint`
3535
- To create the build: `npm run build`

circle.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ compile:
1919

2020
deployment:
2121
development:
22-
branch: dev
22+
branch: [dev]
2323
owner: appirio-tech
2424
commands:
2525
- ./deploy.sh DEV

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"react": "^15.6.1",
5252
"react-addons-css-transition-group": "^15.6.0",
5353
"react-addons-pure-render-mixin": "^15.6.0",
54+
"query-string": "^4.3.4",
5455
"react-color": "^2.13.1",
5556
"react-datetime": "2.7.1",
5657
"react-dom": "^15.6.1",

src/assets/images/product-chatbot.svg

+21
Loading

src/components/App/App.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
body {
44
min-width: 320px;
5-
background-color: $tc-gray-neutral-dark;
5+
background-color: $tc-gray-neutral-light;
66
}
77

88
.ReactModal__Body--open {

src/components/TopBar/ProjectsToolBar.scss

+5-1
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,12 @@ $tc-body-large : 20px;
4747
display: flex;
4848
align-items: center;
4949
// justify-content: center;
50-
padding: 5px 2*$base-unit 5px 34px;
50+
padding: 0 2*$base-unit 0 34px;
5151
text-align: left;
5252
color: $tc-gray-40;
5353
background-color: transparent;
5454
border-radius: 2px;
55+
border: 0;
5556
font-size: 12px;
5657
position: relative;
5758
&:before{
@@ -173,6 +174,9 @@ $tc-body-large : 20px;
173174
top: 12px;
174175
z-index: 22;/* +1 from z-index of the modal overlay */
175176
}
177+
.FillProjectDetails .header {
178+
margin: 35px 0 0;
179+
}
176180
}
177181

178182
.project-creation-dialog {

src/config/constants.js

+2
Original file line numberDiff line numberDiff line change
@@ -253,3 +253,5 @@ export const MAINTENANCE_MODE = false
253253
export const LS_INCOMPLETE_PROJECT = 'incompleteProject'
254254

255255
export const CONNECT_MESSAGE_API_URL = process.env.CONNECT_MESSAGE_API_URL || TC_API_URL
256+
257+
export const NEW_PROJECT_PATH = '/new-project'

src/config/projectQuestions/app_dev.v1.0.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const sections = [
3030
{
3131
id: 'projectName',
3232
required: true,
33-
validationError: 'Please provide a name to your project',
33+
validationError: 'Please provide a name for your project',
3434
fieldName: 'name',
3535
description: '',
3636
title: 'Project Name',
@@ -240,7 +240,7 @@ export const basicSections = [
240240
{
241241
id: 'projectName',
242242
required: true,
243-
validationError: 'Please provide a name to your project',
243+
validationError: 'Please provide a name for your project',
244244
fieldName: 'name',
245245
description: '',
246246
title: 'Project Name',

src/config/projectQuestions/avd.v1.0.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const sections = [
3232
{
3333
id: 'projectName',
3434
required: true,
35-
validationError: 'Please provide a name to your project',
35+
validationError: 'Please provide a name for your project',
3636
fieldName: 'name',
3737
description: '',
3838
title: 'Project Name',
@@ -239,7 +239,7 @@ export const basicSections = [
239239
{
240240
id: 'projectName',
241241
required: true,
242-
validationError: 'Please provide a name to your project',
242+
validationError: 'Please provide a name for your project',
243243
fieldName: 'name',
244244
description: '',
245245
title: 'Project Name',
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,257 @@
1+
import _ from 'lodash'
2+
// import { Icons } from 'appirio-tech-react-components'
3+
import { findProduct} from '../projectWizard'
4+
5+
const isFileRequired = (project, subSections) => {
6+
const subSection = _.find(subSections, (s) => s.type === 'questions')
7+
const fields = _.filter(subSection.questions, q => q.type.indexOf('see-attached') > -1)
8+
// iterate over all seeAttached type fields to check
9+
// if any see attached is checked.
10+
return _.some(_.map(
11+
_.map(fields, 'fieldName'),
12+
fn => _.get(project, `${fn}.seeAttached`)
13+
))
14+
}
15+
16+
const sections = [
17+
{
18+
id: 'appDefinition',
19+
title: (project, showProduct) => {
20+
const product = _.get(project, 'details.products[0]')
21+
if (showProduct && product) {
22+
const prd = findProduct(product)
23+
if (prd) return prd
24+
}
25+
return 'Definition'
26+
},
27+
required: true,
28+
description: 'Please answer a few basic questions about your project. You can also provide the needed information in a supporting document--add a link in the notes section or upload it below.',
29+
subSections: [
30+
{
31+
id: 'projectName',
32+
required: true,
33+
validationError: 'Please provide a name for your project',
34+
fieldName: 'name',
35+
description: '',
36+
title: 'Project Name',
37+
type: 'project-name'
38+
},
39+
{
40+
id: 'questions',
41+
required: true,
42+
hideTitle: true,
43+
title: 'Questions',
44+
description: '',
45+
type: 'questions',
46+
questions: [
47+
{
48+
icon: 'question',
49+
title: 'Are you an existing Watson Virtual Assistant customer?',
50+
description: '',
51+
fieldName: 'details.appDefinition.existingWatsonCustomer',
52+
type: 'checkbox',
53+
options: [
54+
{value: 'true', title: 'Yes'},
55+
{value: 'false', title: 'No'},
56+
]
57+
},
58+
{
59+
id: 'projectInfo',
60+
required: true,
61+
fieldName: 'description',
62+
description: 'Brief Description',
63+
title: 'Description',
64+
type: 'textbox'
65+
},
66+
{
67+
icon: 'question',
68+
title: 'Do you have an existing IBM Bluemix account?',
69+
description: '',
70+
type: 'radio-group',
71+
fieldName: 'details.appDefinition.hasBluemixAccount',
72+
options: [
73+
{value: 'true', label: 'Yes'},
74+
{value: 'false', label: 'No'}
75+
]
76+
},
77+
{
78+
icon: 'question',
79+
title: 'What capabilities does the chatbot need to support? (check all that apply)',
80+
description: '',
81+
type: 'checkbox-group',
82+
fieldName: 'details.appDefinition.capabilities',
83+
options: [
84+
{value: 'order_management', label: 'Order Management'},
85+
{value: 'information', label: 'Information'},
86+
{value: 'help', label: 'Help'},
87+
{value: 'complaints', label: 'Complaints'},
88+
{value: 'billing', label: 'Billing'},
89+
{value: 'account_management', label: 'Account Management'},
90+
{value: 'custom', label: 'Custom'}
91+
],
92+
},
93+
{
94+
icon: 'question',
95+
title: 'Will the chatbot need to provide data from any systems to support the capabilities you listed above?',
96+
description: '',
97+
type: 'radio-group',
98+
fieldName: 'details.appDefinition.integrationSystems',
99+
options: [
100+
{value: 'true', label: 'Yes'},
101+
{value: 'false', label: 'No'}
102+
]
103+
},
104+
{
105+
icon: 'question',
106+
title: 'Do you have existing agent scripts?',
107+
description: '',
108+
type: 'radio-group',
109+
fieldName: 'details.appDefinition.existingAgentScripts',
110+
options: [
111+
{value: 'true', label: 'Yes'},
112+
{value: 'false', label: 'No'}
113+
]
114+
},
115+
{
116+
icon: 'question',
117+
title: 'Are you planning to transfer conversations to human agents?',
118+
description: '',
119+
type: 'radio-group',
120+
fieldName: 'details.appDefinition.transferToHumanAgents',
121+
options: [
122+
{value: 'true', label: 'Yes'},
123+
{value: 'false', label: 'No'}
124+
]
125+
}
126+
]
127+
},
128+
{
129+
id: 'notes',
130+
fieldName: 'details.appDefinition.notes',
131+
title: 'Notes',
132+
description: 'Add any other important information regarding your project (e.g., links to documents or existing applications, budget or timing constraints)',
133+
type: 'notes'
134+
},
135+
{
136+
id: 'files',
137+
required: isFileRequired,
138+
title: (project) => `Project Files (${_.get(project, 'attachments', []).length})` || 'Files',
139+
description: '',
140+
type: 'files',
141+
fieldName: 'attachments'
142+
}
143+
]
144+
}
145+
]
146+
147+
export default sections
148+
149+
export const basicSections = [
150+
{
151+
id: 'appDefinition',
152+
title: '',
153+
required: true,
154+
description: 'Please answer a few basic questions about your project and, as an option, add links to supporting documents in the “Notes” section. If you have any files to upload, you’ll be able to do so later.',
155+
subSections: [
156+
{
157+
id: 'projectName',
158+
required: true,
159+
validationError: 'Please provide a name for your project',
160+
fieldName: 'name',
161+
description: '',
162+
title: 'Project Name',
163+
type: 'project-name'
164+
},
165+
{
166+
id: 'questions',
167+
required: true,
168+
hideTitle: true,
169+
title: 'Questions',
170+
description: '',
171+
type: 'questions',
172+
questions: [
173+
{
174+
id: 'projectInfo',
175+
required: true,
176+
fieldName: 'description',
177+
description: 'Brief Description',
178+
title: 'Description',
179+
type: 'textbox'
180+
},
181+
{
182+
icon: 'question',
183+
required: true,
184+
title: 'Are you an existing Watson Virtual Assistant customer?',
185+
description: '',
186+
fieldName: 'details.appDefinition.existingWatsonCustomer',
187+
type: 'radio-group',
188+
options: [
189+
{value: 'true', label: 'Yes'},
190+
{value: 'false', label: 'No'},
191+
]
192+
},
193+
{
194+
icon: 'question',
195+
required: true,
196+
title: 'Do you have an existing IBM Bluemix account?',
197+
description: '',
198+
type: 'radio-group',
199+
fieldName: 'details.appDefinition.hasBluemixAccount',
200+
options: [
201+
{value: 'true', label: 'Yes'},
202+
{value: 'false', label: 'No'}
203+
]
204+
},
205+
{
206+
icon: 'question',
207+
// required: true,
208+
title: 'What capabilities does the chatbot need to support?',
209+
description: '',
210+
type: 'checkbox-group',
211+
fieldName: 'details.appDefinition.capabilities',
212+
options: [
213+
{value: 'order_management', label: 'Order management'},
214+
{value: 'information', label: 'Information'},
215+
{value: 'help', label: 'Help'},
216+
{value: 'complaints', label: 'Complaints'},
217+
{value: 'billing', label: 'Billing'},
218+
{value: 'account_management', label: 'Account management'},
219+
{value: 'custom', label: 'Custom (please explain in the Notes)'}
220+
],
221+
},
222+
{
223+
icon: 'question',
224+
required: true,
225+
title: 'Will the chatbot need to access data from any systems to support the capabilities you listed above? If so, please list the systems below. (Change to text box)',
226+
description: '',
227+
type: 'textbox',
228+
fieldName: 'details.appDefinition.integrationSystems'
229+
},
230+
{
231+
icon: 'question',
232+
required: true,
233+
title: 'Do you have any example agent conversations you can provide? If so, please paste them or any links to documents below (you’ll be able to upload documents later).',
234+
description: '',
235+
type: 'textbox',
236+
fieldName: 'details.appDefinition.existingAgentScripts'
237+
},
238+
{
239+
icon: 'question',
240+
required: true,
241+
title: 'Are you planning to transfer conversations to human agents? If so, please list the agents’ communication tools (e.g., Slack, LiveAgent, Intercom, etc.)',
242+
description: '',
243+
type: 'textbox',
244+
fieldName: 'details.appDefinition.transferToHumanAgents'
245+
}
246+
]
247+
},
248+
{
249+
id: 'notes',
250+
fieldName: 'details.appDefinition.notes',
251+
title: 'Notes',
252+
description: 'Add any other important information regarding your project (e.g., links to documents or existing applications, budget or timing constraints)',
253+
type: 'notes'
254+
}
255+
]
256+
}
257+
]

0 commit comments

Comments
 (0)