Skip to content

Commit 726c5a3

Browse files
committed
Merge branch 'dev'
2 parents 5921265 + d0339d2 commit 726c5a3

17 files changed

+401
-75
lines changed

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, 'feature/back-forward-button-project-wizard']
2323
owner: appirio-tech
2424
commands:
2525
- ./deploy.sh DEV
Loading

src/components/TopBar/Filters.js

+7-11
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,7 @@ import React, {PropTypes} from 'react'
22
import _ from 'lodash'
33
import { Dropdown, DropdownItem, SwitchButton } from 'appirio-tech-react-components'
44
import { PROJECT_STATUS } from '../../config/constants'
5-
6-
const projectTypes = [
7-
{ val: null, label: 'All Types' },
8-
{ val: 'generic', label: 'Work Project' },
9-
{ val: 'visual_design', label: 'Visual Design' },
10-
{ val: 'visual_prototype', label: 'Visual Prototype' },
11-
{ val: 'app_dev', label: 'App Development' }
12-
]
5+
import { projectTypes } from '../../config/projectWizard'
136

147
const projectStatuses = [
158
{ val: 'in(draft,in_review,reviewed,active)', label: 'Open' },
@@ -19,12 +12,15 @@ const projectStatuses = [
1912

2013
const Filters = ({ criteria, handleMyProjectsFilter, applyFilters }) => {
2114

22-
const type = _.find(projectTypes, t => t.val === (criteria.type || null))
15+
const type = _.find(projectTypes, t => t.id === (criteria.type || null))
2316
const status = _.find(projectStatuses, t => t.val === (criteria.status || null))
2417

2518
const _types = _.map(projectTypes, p => {
26-
return { val: { type: p.val }, label: p.label }
19+
return { val: { type: p.id }, label: p.name }
2720
})
21+
// adds null valued object for All Types selection
22+
_types.splice(0, 0, { val: { type: null}, label: 'All Types' })
23+
2824
const _statuses = _.map(projectStatuses, p => {
2925
return { val: { status: p.val }, label: p.label }
3026
})
@@ -36,7 +32,7 @@ const Filters = ({ criteria, handleMyProjectsFilter, applyFilters }) => {
3632
<label className="first">Project Type</label>
3733
<div className="search-select-widget">
3834
<Dropdown theme="new-theme" noPointer pointerShadow>
39-
<a className="dropdown-menu-header">{ type.label || 'All Types' }</a>
35+
<a className="dropdown-menu-header">{ _.get(type, 'name') || 'All Types' }</a>
4036
<ul className="dropdown-menu-list">
4137
{
4238
_types.map((item, i) =>

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const sections = [
2020
const product = _.get(project, 'details.products[0]')
2121
if (showProduct && product) {
2222
const prd = findProduct(product)
23-
if (prd) return prd
23+
if (prd) return prd.name
2424
}
2525
return 'Definition'
2626
},

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const sections = [
2222
const product = _.get(project, 'details.products[0]')
2323
if (showProduct && product) {
2424
const prd = findProduct(product)
25-
if (prd) return prd
25+
if (prd) return prd.name
2626
}
2727
return 'Definition'
2828
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
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.name
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+
id: 'projectInfo',
49+
fieldName: 'description',
50+
description: 'Brief Description',
51+
title: 'Description',
52+
type: 'textbox'
53+
},
54+
{
55+
icon: 'question',
56+
title: 'What capabilities does the chatbot need to support?',
57+
description: '',
58+
type: 'checkbox-group',
59+
fieldName: 'details.appDefinition.capabilities',
60+
options: [
61+
{value: 'order_management', label: 'Order Management'},
62+
{value: 'information', label: 'Information'},
63+
{value: 'help', label: 'Help'},
64+
{value: 'complaints', label: 'Complaints'},
65+
{value: 'billing', label: 'Billing'},
66+
{value: 'account_management', label: 'Account Management'},
67+
{value: 'custom', label: 'Custom (please explain in the Notes)'}
68+
]
69+
},
70+
{
71+
icon: 'question',
72+
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.',
73+
description: '',
74+
type: 'textbox',
75+
fieldName: 'details.appDefinition.integrationSystems'
76+
},
77+
{
78+
icon: 'question',
79+
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).',
80+
description: '',
81+
type: 'textbox',
82+
fieldName: 'details.appDefinition.existingAgentScripts'
83+
},
84+
{
85+
icon: 'question',
86+
title: 'Are you planning to transfer conversations to human agents? If so, please list the agents’ communication tools (e.g., Slack, LiveAgent, Intercom, etc.).',
87+
description: '',
88+
type: 'textbox',
89+
fieldName: 'details.appDefinition.transferToHumanAgents'
90+
}
91+
]
92+
},
93+
{
94+
id: 'notes',
95+
fieldName: 'details.appDefinition.notes',
96+
title: 'Notes',
97+
description: 'Add any other important information regarding your project (e.g., links to documents or existing applications, budget or timing constraints)',
98+
type: 'notes'
99+
},
100+
{
101+
id: 'files',
102+
required: isFileRequired,
103+
title: (project) => `Project Files (${_.get(project, 'attachments', []).length})` || 'Files',
104+
description: '',
105+
type: 'files',
106+
fieldName: 'attachments'
107+
}
108+
]
109+
}
110+
]
111+
112+
export default sections
113+
114+
export const basicSections = [
115+
{
116+
id: 'appDefinition',
117+
title: '',
118+
required: true,
119+
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.',
120+
subSections: [
121+
{
122+
id: 'projectName',
123+
required: true,
124+
validationError: 'Please provide a name for your project',
125+
fieldName: 'name',
126+
description: '',
127+
title: 'Project Name',
128+
type: 'project-name'
129+
},
130+
{
131+
id: 'questions',
132+
required: true,
133+
hideTitle: true,
134+
title: 'Questions',
135+
description: '',
136+
type: 'questions',
137+
questions: [
138+
{
139+
id: 'projectInfo',
140+
required: true,
141+
fieldName: 'description',
142+
validationError: 'Please provide a description',
143+
description: 'Brief Description',
144+
title: 'Description',
145+
type: 'textbox'
146+
},
147+
{
148+
icon: 'question',
149+
required: true,
150+
validationError: 'Please complete this section',
151+
title: 'What capabilities does the chatbot need to support?',
152+
description: '',
153+
type: 'checkbox-group',
154+
fieldName: 'details.appDefinition.capabilities',
155+
options: [
156+
{value: 'order_management', label: 'Order management'},
157+
{value: 'information', label: 'Information'},
158+
{value: 'help', label: 'Help'},
159+
{value: 'complaints', label: 'Complaints'},
160+
{value: 'billing', label: 'Billing'},
161+
{value: 'account_management', label: 'Account management'},
162+
{value: 'custom', label: 'Custom (please explain in the Notes)'}
163+
]
164+
},
165+
{
166+
icon: 'question',
167+
required: true,
168+
validationError: 'Please complete this section',
169+
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.',
170+
description: '',
171+
type: 'textbox',
172+
fieldName: 'details.appDefinition.integrationSystems'
173+
},
174+
{
175+
icon: 'question',
176+
required: true,
177+
validationError: 'Please complete this section',
178+
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).',
179+
description: '',
180+
type: 'textbox',
181+
fieldName: 'details.appDefinition.existingAgentScripts'
182+
},
183+
{
184+
icon: 'question',
185+
required: true,
186+
validationError: 'Please complete this section',
187+
title: 'Are you planning to transfer conversations to human agents? If so, please list the agents’ communication tools (e.g., Slack, LiveAgent, Intercom, etc.).',
188+
description: '',
189+
type: 'textbox',
190+
fieldName: 'details.appDefinition.transferToHumanAgents'
191+
}
192+
]
193+
},
194+
{
195+
id: 'notes',
196+
fieldName: 'details.appDefinition.notes',
197+
title: 'Notes',
198+
description: 'Add any other important information regarding your project (e.g., links to documents or existing applications, budget or timing constraints)',
199+
type: 'notes'
200+
}
201+
]
202+
}
203+
]

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const sections = [
2020
const product = _.get(project, 'details.products[0]')
2121
if (showProduct && product) {
2222
const prd = findProduct(product)
23-
if (prd) return prd
23+
if (prd) return prd.name
2424
}
2525
return 'Definition'
2626
},

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const sections = [
2323
const product = _.get(project, 'details.products[0]')
2424
if (showProduct && product) {
2525
const prd = findProduct(product)
26-
if (prd) return prd
26+
if (prd) return prd.name
2727
}
2828
return 'Definition'
2929
},

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const sections = [
2222
const product = _.get(project, 'details.products[0]')
2323
if (showProduct && product) {
2424
const prd = findProduct(product)
25-
if (prd) return prd
25+
if (prd) return prd.name
2626
}
2727
return 'Definition'
2828
},

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const sections = [
2222
const product = _.get(project, 'details.products[0]')
2323
if (showProduct && product) {
2424
const prd = findProduct(product)
25-
if (prd) return prd
25+
if (prd) return prd.name
2626
}
2727
return 'Definition'
2828
},

src/config/projectSpecification/typeToSpecification.json

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"website_development": "app_dev.v1.0",
99
"application_development": "app_dev.v1.0",
1010
"watson_chatbot": "ibm_chatbot.v1.0",
11+
"generic_chatbot": "generic_chatbot.v1.0",
1112
"generic_dev": "app_dev.v1.0",
1213
"real_world_testing": "real_world_testing.v1.0",
1314
"mobility_testing": "app_dev.v1.0",

0 commit comments

Comments
 (0)