Skip to content

Commit d9f18a6

Browse files
author
Vikas Agarwal
committed
Github issue#1208, Real World Testing project missing tag on list view
— Fixed with assumptions
1 parent eefd933 commit d9f18a6

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

src/projects/create/components/ProjectWizard.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ class ProjectWizard extends Component {
161161
window.scrollTo(0, 0)
162162
const { onStepChange, onProjectUpdate } = this.props
163163
const products = findProductsOfCategory(projectType)
164-
console.log(products, 'products')
165164
const updateQuery = { }
166165
// restore common fields from dirty project
167166
// this.restoreCommonDetails(products, updateQuery, detailsQuery)

src/projects/list/components/Projects/ProjectsView.jsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import Walkthrough from '../Walkthrough/Walkthrough'
1010

1111
import UserWithName from '../../../../components/User/UserWithName'
1212
import CoderBot from '../../../../components/CoderBot/CoderBot'
13+
import { findCategory } from '../../../../config/projectWizard'
1314
import { ROLE_CONNECT_MANAGER, ROLE_CONNECT_COPILOT, PROJECT_STATUS } from '../../../../config/constants'
1415

1516
// This handles showing a spinner while the state is being loaded async
@@ -39,10 +40,14 @@ const projectTypeMap = {
3940
'app_dev': 'Full App'
4041
}
4142
const projectTypeClassMap = {
42-
'generic': 'purple-block',
43-
'visual_design': 'blue-block',
44-
'visual_prototype': 'blue-block',
45-
'app_dev': 'green-block'
43+
'generic' : 'purple-block',
44+
'visual_design' : 'blue-block',
45+
'visual_prototype' : 'blue-block',
46+
'app_dev' : 'green-block',
47+
'app' : 'green-block',
48+
'website' : 'green-block',
49+
'chatbot' : 'green-block',
50+
'quality_assurance' : 'green-block',
4651
}
4752
/*eslint-enable */
4853

@@ -79,11 +84,12 @@ const ProjectsView = props => {
7984
const url = `/projects/${item.id}`
8085
const code = _.get(item, 'details.utm.code', '')
8186
const projectTypeClass = projectTypeClassMap[item.type]
87+
const projectType = _.get(findCategory(item.type), 'name', '')
8288
return (
8389
<div className="spacing">
8490
<Link to={url} className="link-title">{item.name}</Link>
8591
<div className="project-metadata">
86-
<span className={ projectTypeClass }>{projectTypeMap[item.type]}</span>
92+
<span className={ projectTypeClass }>{ projectType }</span>
8793
{ code && <span className="item-ref-code txt-gray-md">Ref: {code}</span> }
8894
<span className="txt-time">{moment(item.createdAt).format('DD MMM YYYY')}</span>
8995
</div>

0 commit comments

Comments
 (0)