Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b374214
Merge pull request #4077 from appirio-tech/hotfix/added_support_to_re…
RishiRajSahu Jul 29, 2020
b18063b
Added featured to support internal intake form
RishiRajSahu Aug 8, 2020
925639a
made branch deployable
RishiRajSahu Aug 8, 2020
68dc35b
Added new svg for internal-project intake
RishiRajSahu Aug 17, 2020
9647041
remove branch from deployable
RishiRajSahu Aug 17, 2020
20052ec
Merge pull request #4088 from appirio-tech/feature/add_option_for_ren…
RishiRajSahu Aug 17, 2020
2f81aea
RS256-IdToken backward compatibility changes in account-app lib version.
Aug 19, 2020
291d643
Using our internal icon for internal-intake forms
RishiRajSahu Aug 20, 2020
7be2ff9
Using default icon for internal intake forms
RishiRajSahu Aug 20, 2020
7876673
Added navigation to work-manager app
RishiRajSahu Aug 20, 2020
30d4eb0
Merge pull request #4094 from appirio-tech/feature/navigation_from_pr…
RishiRajSahu Aug 20, 2020
1334039
Merge pull request #4098 from appirio-tech/hotfix/udpated_segment_ana…
RishiRajSahu Aug 24, 2020
8ed9e48
New component for talent-picker
RishiRajSahu Aug 26, 2020
d76a62f
Added accordion support for new talent picker component
RishiRajSahu Aug 26, 2020
2a4d055
pointing to latest account-app tag for backward compatibility
Aug 31, 2020
8644466
Merge branch 'dev' into feature/RS256-IdToken-backcompatibility
Aug 31, 2020
7af7b42
Merge pull request #4099 from appirio-tech/feature/talent_picker_v2
RishiRajSahu Sep 1, 2020
96876e5
Disable navigation to work-mgr for TaaS projects
RishiRajSahu Sep 1, 2020
e13a412
Merge branch 'dev' into feature/RS256-IdToken-backcompatibility
RishiRajSahu Sep 2, 2020
8dd436a
Merge pull request #4108 from appirio-tech/feature/RS256-IdToken-back…
RishiRajSahu Sep 2, 2020
e2b1026
GitIssue#4058 Retrieve & Display Connect Project Billing Account
RishiRajSahu Sep 2, 2020
ee3ec3b
redirecting login/registration to global reg/login pages
RishiRajSahu Sep 2, 2020
24885ec
removed feature branch from deployable
RishiRajSahu Sep 3, 2020
3b7814b
Merge pull request #4111 from appirio-tech/feature/replace_login_regi…
RishiRajSahu Sep 3, 2020
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
900 changes: 560 additions & 340 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
"redux-thunk": "^2.1.0",
"remarkable": "^1.7.1",
"svg-react-loader": "^0.4.5",
"tc-accounts": "git+https://github.com/appirio-tech/accounts-app.git#0.0.11",
"tc-accounts": "git+https://github.com/appirio-tech/accounts-app.git#v1.0.4",
"tc-ui": "git+https://github.com/appirio-tech/tc-ui.git#feature/connectv2",
"tlds": "^1.191.0",
"topcoder-react-utils": "0.0.39",
Expand Down
10 changes: 10 additions & 0 deletions src/assets/icons/ui-rocket-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/components/ProjectTypeIcon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import IconSalesforceImplementation from '../assets/icons/v.2.5/project-types/sa
import IconSolutions from '../assets/icons/v.2.5/project-types/solutions.svg'
import IconUserSentimentAnalysis from '../assets/icons/v.2.5/project-types/user-sentiment-analysis.svg'
import IconDefault from '../assets/icons/v.2.5/project-types/default.svg'
//import IconTcInternal from '../assets/icons/ui-rocket-white.svg'

const ProjectTypeIcon = ({ type }) => {
// if type is defined as a relative path to the icon, convert it to icon "id"
Expand Down Expand Up @@ -60,6 +61,7 @@ const ProjectTypeIcon = ({ type }) => {
case 'salesforce-implementation': return <IconSalesforceImplementation />
case 'solutions': return <IconSolutions />
case 'user-sentiment-analysis': return <IconUserSentimentAnalysis />
//case 'tc-internal': return <IconTcInternal />
default:
// this will be default icon
return <IconDefault />
Expand Down
19 changes: 15 additions & 4 deletions src/config/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -706,19 +706,20 @@ export const DOMAIN = process.env.domain || 'topcoder.com'
export const CONNECT_DOMAIN = `connect.${DOMAIN}`
export const CONNECT_MAIN_PAGE_URL = `http://connect.${DOMAIN}`
export const ACCOUNTS_APP_CONNECTOR_URL = process.env.ACCOUNTS_APP_CONNECTOR_URL
export const ACCOUNTS_APP_LOGIN_URL = process.env.ACCOUNTS_APP_LOGIN_URL || `https://accounts.${DOMAIN}/#!/connect`
export const ACCOUNTS_APP_REGISTER_URL = process.env.ACCOUNTS_APP_REGISTER_URL || `https://accounts.${DOMAIN}/#!/connect/registration`
export const ACCOUNTS_APP_LOGIN_URL = process.env.ACCOUNTS_APP_LOGIN_URL || `https://accounts.${DOMAIN}/#!/member`
export const ACCOUNTS_APP_REGISTER_URL = process.env.ACCOUNTS_APP_REGISTER_URL || `https://accounts.${DOMAIN}/#!/member/registration?regSource=tcBusiness`

export const TC_API_URL = `https://api.${DOMAIN}`
export const DIRECT_PROJECT_URL = `https://www.${DOMAIN}/direct/projectOverview?formData.projectId=`
export const WORK_MANAGER_APP = `https://challenges.${DOMAIN}/projects`
export const SALESFORCE_PROJECT_LEAD_LINK = process.env.SALESFORCE_PROJECT_LEAD_LINK
export const TC_NOTIFICATION_URL = process.env.TC_NOTIFICATION_URL || `${TC_API_URL}/v5/notifications`
// Uncomment if you run TC Notifications locally
// export const TC_NOTIFICATION_URL = 'http://localstho:4000/v5/notifications'

export const TC_CDN_URL = process.env.TC_CDN_URL || `https://community-app.${DOMAIN}/api/cdn/public`

export const RESET_PASSWORD_URL = `https://accounts.${DOMAIN}/connect/reset-password`
export const RESET_PASSWORD_URL = `https://accounts.${DOMAIN}/member/reset-password`
export const VERIFY_EMAIL_URL = `http://www.${DOMAIN}/settings/account/changeEmail`

export const PROJECT_NAME_MAX_LENGTH = 255
Expand Down Expand Up @@ -1000,4 +1001,14 @@ export const CONTENTFUL_SPACE_ID = process.env.CONTENTFUL_SPACE_ID
*/
export const CONTENTFUL_NODE_TYPES = {
HYPERLINK : 'hyperlink',
}
}
export const INTERNAL_PROJECT_URLS=[
'tc_internal',
'tc-internal'
]


/**
* Project category string
*/
export const PROJECT_CATEGORY_TAAS = 'talent-as-a-service'
14 changes: 12 additions & 2 deletions src/projects/create/components/ProjectWizard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import {
SPECIAL_QUERY_PARAMS,
PROJECT_REF_CODE_MAX_LENGTH,
PROJECT_ATTACHMENTS_FOLDER,
MANAGER_ROLES,
INTERNAL_PROJECT_URLS
} from '../../../config/constants'
import {
buildProjectUpdateQueryByQueryParamSelectCondition,
Expand Down Expand Up @@ -212,7 +214,7 @@ class ProjectWizard extends Component {
* @return {number} step where wizard should move after parsing the URL param
*/
loadProjectFromURL(urlParams, updateQuery) {
const { projectTemplates, projectTypes } = this.props
const { projectTemplates, projectTypes, userRoles } = this.props
const urlAlias = urlParams && urlParams.project
const statusParam = urlParams && urlParams.status

Expand All @@ -233,10 +235,17 @@ class ProjectWizard extends Component {
} else {
// if it is not a project type, it should be a project template
const projectTemplate = getProjectTemplateByAlias(projectTemplates, urlAlias)
const managerRoles = _.filter(MANAGER_ROLES, mgrRole => {
return _.find(userRoles, role => role === mgrRole)
})
const isInternalURL = _.find(INTERNAL_PROJECT_URLS, url => url === urlAlias)
let isValidRole = true
if(isInternalURL)
isValidRole = managerRoles && managerRoles.length > 0

// if we have some project template key in the URL and we can find the project template
// show details step
if (projectTemplate) {
if (isValidRole && projectTemplate) {
updateQuery['type'] = { $set : projectTemplate.category }
updateQuery['templateId'] = { $set : projectTemplate.id }
updateQuery['details'] = {}
Expand Down Expand Up @@ -566,6 +575,7 @@ class ProjectWizard extends Component {
onProjectTypeChange={ this.updateProjectType }
projectTemplates={ projectTemplates }
projectTypes={ projectTypes }
userRoles={ userRoles }
/>
<SelectProjectTemplate
onProjectTemplateChange={ this.updateProjectTemplate }
Expand Down
12 changes: 11 additions & 1 deletion src/projects/create/components/SelectProjectType.jsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
import React from 'react'
import PT from 'prop-types'
import _ from 'lodash'

import SelectProjectTypeCard from './SelectProjectTypeCard'
import { getProjectTemplatesByCategory } from '../../../helpers/templates'
import ProjectTypeIcon from '../../../components/ProjectTypeIcon'
import IconArrowRight from '../../../assets/icons/arrows-16px-1_tail-right.svg'

import { DOMAIN } from '../../../config/constants'
import { DOMAIN, MANAGER_ROLES } from '../../../config/constants'

import './SelectProjectType.scss'

const SelectProjectType = ({
onProjectTypeChange,
projectTypes,
projectTemplates,
userRoles,
}) => {
const cards = []
const managerRoles = _.filter(MANAGER_ROLES, mgrRole => {
return _.find(userRoles, role => role === mgrRole)
})
const isValidRole = managerRoles && managerRoles.length > 0

projectTypes.forEach((projectType) => {

Expand All @@ -25,6 +31,10 @@ const SelectProjectType = ({
// don't render hidden items as well, hidden items can be reached via direct link though
if (projectType.disabled || projectType.hidden || visibleProjectTemplates.length === 0) return

// don't render internal projects to customer user roles
if (projectType.metadata && projectType.metadata.isInternal
&& projectType.metadata.isInternal === true && !isValidRole) return

const icon = <ProjectTypeIcon type={projectType.icon} />

cards.push(
Expand Down
6 changes: 6 additions & 0 deletions src/projects/detail/components/Accordion/Accordion.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const TYPE = {
SLIDER_STANDARD: 'slider-standard',
SELECT_DROPDOWN: 'select-dropdown',
TALENT_PICKER: 'talent-picker',
TALENT_PICKER_V2: 'talent-picker-v2',
}

/**
Expand Down Expand Up @@ -174,6 +175,11 @@ class Accordion extends React.Component {
const totalPeoplePerRole = _.mapValues(_.groupBy(value, v => v.role), valuesUnderGroup => _.sumBy(valuesUnderGroup, v => Number(v.people)))
return _.toPairs(totalPeoplePerRole).filter(([, people]) => people > 0).map(([role, people]) => `${getRoleName(role)}: ${people}`).join(', ')
}
case TYPE.TALENT_PICKER_V2: {
const getRoleName = (role) => _.find(options, { role }).roleTitle
const totalPeoplePerRole = _.mapValues(_.groupBy(value, v => v.role), valuesUnderGroup => _.sumBy(valuesUnderGroup, v => Number(v.people)))
return _.toPairs(totalPeoplePerRole).filter(([, people]) => people > 0).map(([role, people]) => `${getRoleName(role)}: ${people}`).join(', ')
}
default: return value
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@
border-color: $tc-gray-20;
max-width: 300px;
margin-left: 0px;

&.error {
border: 1px solid #ff5b52 !important;
}

&:after {
border-bottom-color: $tc-gray-70;
Expand All @@ -190,6 +194,10 @@
line-height: 24px;
}

textarea.job-textarea {
min-height: 100px;
}

.radio-group-input,
.checkbox-group-item {
width: 100%;
Expand Down
9 changes: 8 additions & 1 deletion src/projects/detail/components/SpecQuestions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import SpecQuestionList from './SpecQuestionList/SpecQuestionList'
import SpecQuestionIcons from './SpecQuestionList/SpecQuestionIcons'
import SkillsQuestion from './SkillsQuestion/SkillsQuestion'
import TalentPickerQuestion from './TalentPickerQuestion/TalentPickerQuestion'
import TalentPickerQuestionV2 from './TalentPickerQuestion/TalentPickerQuestionV2'
import SpecFeatureQuestion from './SpecFeatureQuestion'
import ColorSelector from './../../../components/ColorSelector/ColorSelector'
import SelectDropdown from './../../../components/SelectDropdown/SelectDropdown'
Expand Down Expand Up @@ -382,6 +383,12 @@ class SpecQuestions extends React.Component {
options: q.options,
})
break
case 'talent-picker-v2':
ChildElem = TalentPickerQuestionV2
_.assign(elemProps, {
options: q.options,
})
break
default:
ChildElem = () => (
<div style={{ borderWidth: 1, borderStyle: 'dashed', borderColor: '#f00' }}>
Expand Down Expand Up @@ -452,7 +459,7 @@ class SpecQuestions extends React.Component {
!(question.type === 'estimation' && template.hideEstimation)
).map((q, index) => {
return (
_.includes(['checkbox', 'checkbox-group', 'radio-group', 'add-ons', 'textinput', 'textbox', 'numberinput', 'skills', 'slide-radiogroup', 'slider-standard', 'select-dropdown', 'talent-picker'], q.type) && q.visibilityForRendering === STEP_VISIBILITY.READ_OPTIMIZED ? (
_.includes(['checkbox', 'checkbox-group', 'radio-group', 'add-ons', 'textinput', 'textbox', 'numberinput', 'skills', 'slide-radiogroup', 'slider-standard', 'select-dropdown', 'talent-picker', 'talent-picker-v2'], q.type) && q.visibilityForRendering === STEP_VISIBILITY.READ_OPTIMIZED ? (
<Accordion
key={q.fieldName || `accordion-${index}`}
title={q.summaryTitle || q.title}
Expand Down
Loading