Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/config/projectQuestions/app_dev.v1.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const sections = [
const product = _.get(project, 'details.products[0]')
if (showProduct && product) {
const prd = findProduct(product)
if (prd) return prd
if (prd) return prd.name
}
return 'Definition'
},
Expand Down
2 changes: 1 addition & 1 deletion src/config/projectQuestions/avd.v1.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const sections = [
const product = _.get(project, 'details.products[0]')
if (showProduct && product) {
const prd = findProduct(product)
if (prd) return prd
if (prd) return prd.name
}
return 'Definition'
},
Expand Down
2 changes: 1 addition & 1 deletion src/config/projectQuestions/generic_chatbot.v1.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const sections = [
const product = _.get(project, 'details.products[0]')
if (showProduct && product) {
const prd = findProduct(product)
if (prd) return prd
if (prd) return prd.name
}
return 'Definition'
},
Expand Down
2 changes: 1 addition & 1 deletion src/config/projectQuestions/ibm_chatbot.v1.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const sections = [
const product = _.get(project, 'details.products[0]')
if (showProduct && product) {
const prd = findProduct(product)
if (prd) return prd
if (prd) return prd.name
}
return 'Definition'
},
Expand Down
2 changes: 1 addition & 1 deletion src/config/projectQuestions/real_world_testing.v1.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const sections = [
const product = _.get(project, 'details.products[0]')
if (showProduct && product) {
const prd = findProduct(product)
if (prd) return prd
if (prd) return prd.name
}
return 'Definition'
},
Expand Down
2 changes: 1 addition & 1 deletion src/config/projectQuestions/visual_design.v1.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const sections = [
const product = _.get(project, 'details.products[0]')
if (showProduct && product) {
const prd = findProduct(product)
if (prd) return prd
if (prd) return prd.name
}
return 'Definition'
},
Expand Down
2 changes: 1 addition & 1 deletion src/config/projectQuestions/wireframes.v1.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const sections = [
const product = _.get(project, 'details.products[0]')
if (showProduct && product) {
const prd = findProduct(product)
if (prd) return prd
if (prd) return prd.name
}
return 'Definition'
},
Expand Down
2 changes: 1 addition & 1 deletion src/config/projectSpecification/typeToSpecification.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"website_development": "app_dev.v1.0",
"application_development": "app_dev.v1.0",
"watson_chatbot": "ibm_chatbot.v1.0",
"chatbot": "generic_chatbot.v1.0",
"generic_chatbot": "generic_chatbot.v1.0",
"generic_dev": "app_dev.v1.0",
"real_world_testing": "real_world_testing.v1.0",
"mobility_testing": "app_dev.v1.0",
Expand Down
107 changes: 80 additions & 27 deletions src/config/projectWizard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ const products = {
info: 'Build a phone, tablet, wearable, or desktop app',
question: 'What do you need to develop?',
id: 'app',
aliases: ['all-apps'],
subtypes: {
App: {
brief: 'Apps',
details: 'Build apps for mobile, web, or wearables',
icon: 'product-app-app',
id: 'application_development'
id: 'application_development',
aliases: ['app', 'application_development']
}
}
},
Expand All @@ -21,33 +23,38 @@ const products = {
info: 'Design and build the high-impact pages for your blog, online store, or company',
question: 'What do you need to develop?',
id: 'website',
aliases: ['all-websites'],
subtypes: {
Website: {
brief: 'Websites',
details: 'Build responsive or regular websites',
icon: 'product-website-website',
id: 'website_development'
id: 'website_development',
aliases: ['website', 'website_development']
}
}
},
Chatbot: {
icon: 'product-cat-chatbot',
info: 'Build, train and test a custom conversation for your chatbot',
question: 'What do you need to develop?',
id: 'all-chatbots',
id: 'chatbot',
aliases: ['all-chatbots'],
subtypes: {
'Watson Chatbot': {
brief: 'Watson Chatbot',
details: 'Build Chatbot using IBM Watson',
icon: 'product-chatbot-watson',
id: 'watson_chatbot',
aliases: ['watson_chatbot'],
hidden: true
},
Chatbot: {
brief: 'Chatbot',
details: 'Build, train and test a custom conversation for your chat bot',
icon: 'product-chatbot-chatbot',
id: 'chatbot'
id: 'generic_chatbot',
aliases: ['chatbot', 'generic_chatbot']
}
}
},
Expand All @@ -56,38 +63,44 @@ const products = {
info: 'Pick the right design project for your needs - wireframes, visual, or other',
question: 'What kind of design do you need?',
id: 'visual_design',
aliases: ['all-designs'],
subtypes: {
Wireframes: {
brief: '10-15 screens',
details: 'Plan and explore the navigation and structure of your app',
icon: 'product-design-wireframes',
id: 'wireframes'
id: 'wireframes',
aliases: ['wireframes']
},
'App Visual Design - Concepts': {
brief: '1-15 screens',
details: 'Visualize and test your app requirements and ideas',
icon: 'product-design-app-visual',
id: 'visual_design_concepts',
aliases: ['visual_design_concepts'],
disabled: true
},
'Visual Design': {
brief: '1-15 screens',
details: 'Create development-ready designs',
icon: 'product-design-app-visual',
id: 'visual_design_prod'
id: 'visual_design_prod',
aliases: ['visual-design', 'visual_design_prod']
},
Infographic: {
brief: 'Infographic',
details: 'Present your data in an easy-to-understand and interesting way',
icon: 'product-design-infographic',
id: 'infographic',
aliases: ['infographic'],
disabled: true
},
'Other Design': {
brief: 'other designs',
details: 'Get help with other types of design',
icon: 'product-design-other',
id: 'generic_design'
id: 'generic_design',
aliases: ['generic-design', 'generic_design']
}
}
},
Expand All @@ -96,31 +109,36 @@ const products = {
info: 'Get help with any part of your development lifecycle',
question: 'What kind of development do you need?',
id: 'app_dev',
aliases: ['all-development'],
subtypes: {
'Front-end Prototype': {
brief: '3-20 screens',
details: 'Translate designs to a web (HTML/CSS/JavaScript) or mobile prototype',
icon: 'product-dev-prototype',
id: 'visual_prototype',
aliases: ['visual-prototype','visual_prototype'],
disabled: true
},
'Front-end': {
brief: '',
details: 'Translate your designs into Web or Mobile front-end',
icon: 'product-dev-front-end-dev',
id: 'frontend_dev'
id: 'frontend_dev',
aliases: ['frontend-development', 'frontend_dev']
},
'Back-end & API': {
brief: '',
details: 'Build the server, DB, and API for your app',
icon: 'product-dev-integration',
id: 'api_dev'
id: 'api_dev',
aliases: ['api-development', 'api_dev']
},
'Development Integration': {
brief: 'Tasks or adhoc',
details: 'Get help with any part of your app or software',
icon: 'product-dev-other',
id: 'generic_dev'
id: 'generic_dev',
aliases: ['generic-development', 'generic_dev']
}
}
},
Expand All @@ -129,46 +147,53 @@ const products = {
info: 'Exploratory Testing, Cross browser-device Testing',
question: 'What kind of quality assurance (QA) do you need?',
id: 'quality_assurance',
aliases: ['all-quality-assurance'],
subtypes: {
'Real World Testing': {
brief: 'TBD',
details: 'Exploratory Testing, Cross browser-device Testing',
icon: 'product-qa-crowd-testing',
id: 'real_world_testing'
id: 'real_world_testing',
aliases: ['real-world-testing', 'real_world_testing']
},
'Mobility Testing': {
brief: 'TBD',
details: 'App Certification, Lab on Hire, User Sentiment Analysis',
icon: 'product-qa-mobility-testing',
id: 'mobility_testing',
aliases: ['mobility-testing', 'mobility_testing'],
disabled: true
},
'Website Performance': {
brief: 'TBD',
details: 'Webpage rendering effiency, Load, Stress and Endurance Test',
icon: 'product-qa-website-performance',
id: 'website_performance',
aliases: ['website-performance', 'website_performance'],
disabled: true
},
'Digital Accessability': {
brief: 'TBD',
details: 'Make sure you app or website conforms to all rules and regulations',
icon: 'product-qa-digital-accessability',
id: 'digital_accessability',
aliases: ['digital-accessability', 'digital_accessability'],
disabled: true
},
'Open Source Automation': {
brief: 'TBD',
details: 'Exploratory testing, cross browser testing',
icon: 'product-qa-os-automation',
id: 'open_source_automation',
aliases: ['open-source-automation', 'open_source_automation'],
disabled: true
},
'Consulting & Adivisory': {
brief: 'TBD',
details: 'Expert services to get your project covered end-to-end',
icon: 'product-qa-consulting',
id: 'consulting_adivisory',
aliases: ['consulting-adivisory', 'consulting_adivisory'],
disabled: true
}
}
Expand All @@ -180,34 +205,54 @@ export default products
// exports all project types as an array
export const projectTypes = _.mapValues(products, (p, key) => ({...p, name: key }) )

export function findProduct(product) {
if (product === 'generic_dev') {
return 'Development'
}
if (product === 'generic_design') {
return 'Design'
}
/**
* Finds product for the given product id. It compares the given value against product id and aliases.
*
* @param {string} productId id of the product.
* @param {boolean} aliasesOnly flag to limit the search to aliases only
*
* @return {object} product object from the catalouge
*/
export function findProduct(productId, aliasesOnly = false) {
for(const pType in products) {
for(const prd in products[pType].subtypes) {
if (products[pType].subtypes[prd].id === product) {
return prd
const subType = products[pType].subtypes[prd]
if ((subType.id === productId && !aliasesOnly) || (subType.aliases && subType.aliases.indexOf(productId) !== -1)) {
return { ...subType, name: prd}
}
}
}
}

export function findCategory(categoryId) {
/**
* Finds project category for the given category id. It compares the given value against id and aliases.
*
* @param {string} categoryId id of the category.
* @param {boolean} aliasesOnly flag to limit the search to aliases only
*
* @return {object} project category object from the catalouge
*/
export function findCategory(categoryId, aliasesOnly = false) {
for(const key in products) {
if (products[key].id === categoryId && !products[key].disabled) {
return { ...products[key], name: key}
const product = products[key]
if (!product.disabled && ((product.id === categoryId && !aliasesOnly) || (product.aliases && product.aliases.indexOf(categoryId) !== -1))) {
return { ...product, name: key}
}
}
return null
}

export function findProductsOfCategory(category, fetchHidden = true) {
/**
* Finds products of the given category id. Never returns disabled products
*
* @param {string} categoryId id of the category.
* @param {boolean} fetchHidden flag to limit the hidden products
*
* @return {Array} non disabled products of the given category from the catalouge
*/
export function findProductsOfCategory(categoryId, fetchHidden = true) {
for(const pType in products) {
if (products[pType].id === category) {
if (products[pType].id === categoryId) {
const ret = []
for(const prd in products[pType].subtypes) {
const product = products[pType].subtypes[prd]
Expand All @@ -220,11 +265,19 @@ export function findProductsOfCategory(category, fetchHidden = true) {
}
}

export function findProductCategory(product) {
/**
* Finds project category for the given product id. It compares the given value against id and aliases.
*
* @param {string} productId id of the category.
* @param {boolean} aliasesOnly flag to limit the search to aliases only
*
* @return {object} project category object, from the catalouge, for the given product
*/
export function findProductCategory(productId, aliasesOnly = false) {
for(const pType in products) {
for(const prd in products[pType].subtypes) {
const subType = products[pType].subtypes[prd]
if (subType.id === product && !subType.disabled) {
if (!subType.disabled && ((subType.id === productId && !aliasesOnly) || (subType.aliases && subType.aliases.indexOf(productId) !== -1))) {
return { ...products[pType], name: pType}
}
}
Expand Down
Loading