Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
87163d7
Merge pull request #3346 from appirio-tech/hotfix/post-release-2.4.15.1
Oct 1, 2019
f0654a1
Fixed bug with removing answers to hidden questions while evaluating …
Oct 9, 2019
7c936c0
chore: commented config for quick switch to local Project Service setup
maxceem Oct 10, 2019
108730a
Merge pull request #3353 from appirio-tech/hotfix/post-release-2.4.15.2
Oct 10, 2019
66bf8d6
Merge pull request #3358 from appirio-tech/hotfix/post-release-2.4.15.2
Oct 11, 2019
154b911
Deferring loading of google analytics
Oct 15, 2019
dfcd7e7
Enabling back the price and time efforts on dev
Oct 15, 2019
982b416
fix: keep the whole URL when redirecting after log-in
maxceem Oct 16, 2019
680c00a
Merge pull request #3361 from appirio-tech/hotfix/post-release-2.4.15.3
maxceem Oct 16, 2019
cf563bd
Avoid unnecessary requests
jacky-zhangjb Oct 17, 2019
9580ab4
Merge pull request #3363 from jankyzhang/dev
maxceem Oct 17, 2019
a7ab8dc
add timezone input in profile settings page
vignesh-at-alation Oct 23, 2019
56b29cb
revert company name mandatory field
vignesh-at-alation Oct 23, 2019
3f836ac
- added feature branch to be deployable
RishiRajSahu Oct 25, 2019
a2b739c
- corrected repo name syntax
RishiRajSahu Oct 25, 2019
9d90575
Merge pull request #3365 from vigneshTheDev/feature/add-timezone
RishiRajSahu Oct 25, 2019
33d25b7
reverted test changes.
RishiRajSahu Oct 31, 2019
af99e12
Merge pull request #3366 from appirio-tech/feature/add-timezone-field
RishiRajSahu Oct 31, 2019
8aec58a
fix: hidden options are not being removed before passing to evaluator…
Nov 4, 2019
015570b
fix: don't show values of hidden options in Accordion
maxceem Nov 5, 2019
1bae154
Hidden the price estimate form the progress header when the custom qu…
Nov 5, 2019
02e1fb3
fix: set consistent default questions values
maxceem Nov 7, 2019
35ff0d7
Merge pull request #10 from appirio-tech/dev
PrakashDurlabhji Nov 8, 2019
082333a
f2f avoid draft status
PrakashDurlabhji Nov 8, 2019
5f1a9d5
Merge pull request #3370 from appirio-tech/hotfix/skills-no-filter
RishiRajSahu Nov 8, 2019
c17402f
Merge pull request #3374 from appirio-tech/hotfix/skills-no-filter-2
RishiRajSahu Nov 11, 2019
6d22f96
Merge pull request #3372 from PrakashDurlabhji/dev
maxceem Nov 11, 2019
50f5300
fix #3379
vignesh-at-alation Nov 13, 2019
9c4d512
Merge branch 'dev' into feature/consisten-default-question-values
maxceem Nov 18, 2019
abb6744
Merge pull request #3381 from maxceem/feature/consisten-default-quest…
RishiRajSahu Nov 19, 2019
db9781d
30108163-connect-app
vignesh-at-alation Nov 26, 2019
debd254
Merge pull request #3384 from vigneshTheDev/challenge-30108163-add-wo…
maxceem Nov 27, 2019
39cdecf
Merge pull request #3385 from appirio-tech/feature/working-hours
RishiRajSahu Nov 28, 2019
4b499a3
fix: don't request "email" for members
maxceem Dec 2, 2019
d5fd8b2
Merge pull request #3390 from appirio-tech/hotfix/approve-decline-cop…
Dec 2, 2019
744e3b4
fix: clear form data and wizard state on Project Template change
maxceem Dec 3, 2019
f2e0b7a
fix: continue after refreshing the page after changing the Project Te…
maxceem Dec 3, 2019
22bbdc0
refactor: renamed "LOAD_PROJECT_MEMBER_INVITES" to "LOAD_PROJECT_MEMB…
maxceem Dec 4, 2019
86ee17c
fix for gitIssue#https://github.com/appirio-tech/connect-app/issues/3382
RishiRajSahu Dec 5, 2019
3b2b587
feat: show loading indicator during copilot invite request approve/de…
maxceem Dec 2, 2019
68c15b5
fix-source-data
LieutenantRoger Dec 6, 2019
0b3c574
Merge pull request #3393 from LieutenantRoger/fix-source-data
maxceem Dec 7, 2019
1197593
Revert "fix-source-data"
maxceem Dec 9, 2019
8a090fe
Merge pull request #3394 from appirio-tech/revert-3393-fix-source-data
maxceem Dec 9, 2019
c0f2f06
Revert "Revert "fix-source-data""
maxceem Dec 9, 2019
d552f28
Merge pull request #3395 from appirio-tech/revert-3394-revert-3393-fi…
maxceem Dec 9, 2019
479ef6f
chore: temporary mock user details for members and invites endpoints
maxceem Dec 9, 2019
bcc0b65
F2F add loading indicator when change member role
sumitdaga Dec 9, 2019
ff0f4de
multiple member updates, loading indicator
sumitdaga Dec 10, 2019
fe1c2b9
Revert "fix: don't request "email" for members"
maxceem Dec 10, 2019
6fe4554
fix: getting working hours
maxceem Dec 10, 2019
6c948ff
Merge pull request #3403 from sumitdaga/F2F_30109948
maxceem Dec 11, 2019
54ce6ac
Project Team - Update UI
yoution Dec 10, 2019
873879a
Merge pull request #3408 from yoution/feature/member-list-redesign
maxceem Dec 11, 2019
7d5cc91
fixes issue-3396
sumitdaga Dec 11, 2019
2d8a2f9
fixes issue-3406
sumitdaga Dec 11, 2019
bc0f5db
comment txt fix
sumitdaga Dec 11, 2019
53619ca
Merge pull request #3409 from sumitdaga/issue-3396
maxceem Dec 11, 2019
ceca9fa
Merge pull request #3411 from sumitdaga/issue-3406
maxceem Dec 11, 2019
7f1c450
Merge pull request #3380 from vigneshTheDev/project-submitted-text-ch…
RishiRajSahu Dec 12, 2019
176e2dc
fix for issue-3400
sumitdaga Dec 12, 2019
24eb761
revert business phone to be mandatory field in profile settings
vignesh-at-alation Dec 12, 2019
aa025dc
fix: customer team dialog and topcoder team show memberinfo correct
yoution Dec 12, 2019
e717cbd
Merge pull request #3417 from yoution/feature/member-list-redesign
maxceem Dec 12, 2019
54cab03
Merge pull request #3416 from vigneshTheDev/revert-mandatory-businesp…
maxceem Dec 12, 2019
ef2b934
Merge pull request #3415 from sumitdaga/issue-3400
maxceem Dec 12, 2019
5504669
fix: visual improvements to the new member list UI
maxceem Dec 12, 2019
45c88d0
Merge branch 'dev' into feature/member-list-redesign
maxceem Dec 12, 2019
511ecb3
chore: removed mock data for user details
maxceem Dec 12, 2019
3acd97e
fix: invite disappear after page switching
maxceem Dec 14, 2019
a2387c9
Merge branch 'dev' into feature/member-list-redesign
maxceem Dec 14, 2019
b05db19
fix: disappearing user details when switching page from Dashboard
maxceem Dec 14, 2019
75733a4
fix: member invite after list redesign
maxceem Dec 14, 2019
c0e772e
fix: member invite remove after list redesign
maxceem Dec 14, 2019
166f74a
refactor: move get member invites API to correct file
maxceem Dec 14, 2019
07860a8
fix: cutting member names
maxceem Dec 14, 2019
0cf6f1d
Merge pull request #3430 from appirio-tech/feature/member-list-redesign
maxceem Dec 14, 2019
aab1a20
fix sticky issue
LieutenantRoger Dec 16, 2019
9b5131e
Merge pull request #3436 from LieutenantRoger/feature/member-list-red…
maxceem Dec 16, 2019
6baddf1
fix: apply sticky sidebar fix to other pages
maxceem Dec 16, 2019
9bc0016
Merge branch 'feature/member-list-redesign' into dev
maxceem Dec 16, 2019
8be4d60
fix: member leave confirmation message
maxceem Dec 16, 2019
df52140
fix: lint
maxceem Dec 16, 2019
073b0a3
fix: edit phase via admin users
maxceem Dec 16, 2019
e6b72ff
fix: member leave project confirmation message, part 2
maxceem Dec 17, 2019
999ba03
fix: cannot update phase in Webkit browsers
maxceem Dec 17, 2019
5710ff4
feat: loading user details when updating project member
maxceem Dec 17, 2019
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
13 changes: 12 additions & 1 deletion src/api/projectMemberInvites.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export function updateProjectMemberInvite(projectId, member) {
* @return {object} project member invite returned by api
*/
export function createProjectMemberInvite(projectId, member) {
const url = `${PROJECTS_API_URL}/v4/projects/${projectId}/members/invite/`
const fields = 'id,projectId,userId,email,role,status,createdAt,updatedAt,createdBy,updatedBy,handle,firstName,lastName,photoURL'
const url = `${PROJECTS_API_URL}/v4/projects/${projectId}/members/invite/?fields=` + encodeURIComponent(fields)
return axios({
method: 'post',
url,
Expand All @@ -38,6 +39,16 @@ export function createProjectMemberInvite(projectId, member) {
})
}

export function getProjectMemberInvites(projectId) {
const fields = 'id,projectId,userId,email,role,status,createdAt,updatedAt,createdBy,updatedBy,handle,firstName,lastName,photoURL'
const url = `${PROJECTS_API_URL}/v4/projects/${projectId}/members/invites/?fields=`
+ encodeURIComponent(fields)
return axios.get(url)
.then( resp => {
return resp.data.result.content
})
}

/**
* Get a project member invite based on project's id
* @param {integer} projectId unique identifier of the project
Expand Down
24 changes: 23 additions & 1 deletion src/api/projectMembers.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ export function addProjectMember(projectId, newMember) {


export function updateProjectMember(projectId, memberId, updatedProps) {
const url = `${PROJECTS_API_URL}/v4/projects/${projectId}/members/${memberId}/`
const fields = 'id,userId,role,isPrimary,deletedAt,createdAt,updatedAt,deletedBy,createdBy,updatedBy,handle,firstName,lastName,photoURL,workingHourStart,workingHourEnd,timeZone'
const url = `${PROJECTS_API_URL}/v4/projects/${projectId}/members/${memberId}/?fields=`
+ encodeURIComponent(fields)
return axios.patch(url, { param: updatedProps })
.then(resp => {
return resp.data.result.content
Expand All @@ -66,3 +68,23 @@ export function removeProjectMember(projectId, memberId) {
return memberId
})
}

export function getProjectMembers(projectId) {
const fields = 'id,userId,role,isPrimary,deletedAt,createdAt,updatedAt,deletedBy,createdBy,updatedBy,handle,firstName,lastName,photoURL,workingHourStart,workingHourEnd,timeZone'
const url = `${PROJECTS_API_URL}/v4/projects/${projectId}/members/?fields=`
+ encodeURIComponent(fields)
return axios.get(url)
.then( resp => {
return resp.data.result.content
})
}

export function getProjectMember(projectId, memberId) {
const fields = 'id,userId,role,isPrimary,deletedAt,createdAt,updatedAt,deletedBy,createdBy,updatedBy,handle,firstName,lastName,photoURL,workingHourStart,workingHourEnd,timeZone'
const url = `${PROJECTS_API_URL}/v4/projects/${projectId}/members/${memberId}?fields=`
+ encodeURIComponent(fields)
return axios.get(url)
.then( resp => {
return resp.data.result.content
})
}
10 changes: 8 additions & 2 deletions src/api/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,19 @@ export function updateProjectsMetadata(metadataId, type, data) {
return axios.patch(`${PROJECTS_API_URL}/v4/projects/metadata/${type}/${key}/versions/${version}`, {
param: tmpdata
})
.then(resp => _.get(resp.data, 'result.content', {}))
.then(resp => {
const versionMetadata = _.get(resp.data, 'result.content', {})
return { type, versionMetadata }
})
} else {
const path = type !== 'milestoneTemplates' ? 'projects' : 'timelines'
return axios.patch(`${PROJECTS_API_URL}/v4/${path}/metadata/${type}/${metadataId}`, {
param: data
})
.then(resp => _.get(resp.data, 'result.content', {}))
.then(resp => {
const metadata = _.get(resp.data, 'result.content', {})
return { type, metadata }
})
}
}

Expand Down
13 changes: 13 additions & 0 deletions src/assets/icons/daylight.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions src/assets/icons/moon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/components/AuthenticatedComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export function requiresAuthentication(Component) {
this.setState({isLoggedIn: true})
}).catch((error) => {
console.log(error)
// FIXME should we include hash, search etc
const redirectBackToUrl = window.location.origin + this.props.location.pathname
// we have to to redirect to the same page, so we use the whole URL
const redirectBackToUrl = encodeURIComponent(window.location.href)
const newLocation = ACCOUNTS_APP_LOGIN_URL + '?retUrl=' + redirectBackToUrl
console.log('redirecting... ', newLocation)
window.location = newLocation
Expand Down
26 changes: 20 additions & 6 deletions src/components/ProjectStatus/editableProjectStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import {
PROJECT_STATUS_ACTIVE,
PROJECT_STATUS_COMPLETED,
PROJECT_STATUS_CANCELLED,
TOOLTIP_DEFAULT_DELAY
TOOLTIP_DEFAULT_DELAY,
PROJECT_STATUS_DRAFT
} from '../../config/constants'
import CarretDownNormal9px from '../../assets/icons/arrow-9px-carret-down-normal.svg'

Expand Down Expand Up @@ -63,7 +64,7 @@ const hocStatusDropdown = (CompositeComponent, statusList, projectCanBeActive) =
<div className="status-header">Project Status</div>
<ul>
{
activestatusList.sort((a, b) => a.dropDownOrder > b.dropDownOrder).map((item) =>
activestatusList.sort((a, b) => a.order - b.order).map((item) =>
item.toolTipMessage ? (
<Tooltip key={item.value} theme="light" tooltipDelay={TOOLTIP_DEFAULT_DELAY}>
<div className="tooltip-target">
Expand Down Expand Up @@ -121,6 +122,7 @@ const editableProjectStatus = (CompositeComponent) => class extends Component {
this.showStatusChangeDialog = this.showStatusChangeDialog.bind(this)
this.changeStatus = this.changeStatus.bind(this)
this.handleReasonUpdate = this.handleReasonUpdate.bind(this)
this.getProjectStatusDropdownValues = this.getProjectStatusDropdownValues.bind(this)
}

componentWillReceiveProps() {
Expand Down Expand Up @@ -158,12 +160,20 @@ const editableProjectStatus = (CompositeComponent) => class extends Component {
this.setState({ statusChangeReason : _.get(reason, 'value') })
}

getProjectStatusDropdownValues(status) {
if (status === PROJECT_STATUS_DRAFT) {
return [{color: 'gray', name: 'Draft', fullName: 'Project is in draft', value: PROJECT_STATUS_DRAFT, order: 2, dropDownOrder: 1 }].concat(PROJECT_STATUS)
}
return PROJECT_STATUS
}

render() {
const { showStatusChangeDialog, newStatus, statusChangeReason } = this.state
const { canEdit, projectCanBeActive } = this.props
const { canEdit, projectCanBeActive, status } = this.props
const PROJECT_STATUS_VALUES = this.getProjectStatusDropdownValues(status)
const StatusDropdown = canEdit
? enhanceDropdown(hocStatusDropdown(CompositeComponent, PROJECT_STATUS, projectCanBeActive))
: hocStatusDropdown(CompositeComponent, PROJECT_STATUS, projectCanBeActive)
? enhanceDropdown(hocStatusDropdown(CompositeComponent, PROJECT_STATUS_VALUES, projectCanBeActive))
: hocStatusDropdown(CompositeComponent, PROJECT_STATUS_VALUES, projectCanBeActive)
return (
<div className={cn('EditableProjectStatus', {'modal-active': showStatusChangeDialog})}>
<div className="modal-overlay" onClick={ this.hideStatusChangeDialog }/>
Expand All @@ -190,7 +200,11 @@ editableProjectStatus.propTypes = {
/**
* Boolean flag to control if project status can be switched to active.
*/
projectCanBeActive: PropTypes.bool
projectCanBeActive: PropTypes.bool,
/**
* String representing project status
*/
status: PropTypes.string
}

export default editableProjectStatus
12 changes: 12 additions & 0 deletions src/components/Sticky.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,26 @@ export default class Sticky extends React.Component {
super(props)
this.mountSticky = (sticky) => { this.sticky = sticky }
this.handleScroll = this.handleScroll.bind(this)
this.updateSticky = this.updateSticky.bind(this)
}

componentDidMount() {
window.addEventListener('scroll', this.handleScroll)
document.addEventListener('refreshsticky', this.updateSticky)
}

componentWillUnmount() {
window.removeEventListener('scroll', this.handleScroll)
document.removeEventListener('refreshsticky', this.updateSticky)
}

updateSticky() {
setTimeout(() => {
if (this.sticky) {
this.sticky.updateInitialDimension()
this.sticky.update()
}
})
}

handleScroll() {
Expand Down
88 changes: 88 additions & 0 deletions src/components/TeamManagement/MemberItem.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
import React from 'react'
import PropTypes from 'prop-types'
import moment from 'moment'
import {timezones} from 'appirio-tech-react-components/constants/timezones'
import UserTooltip from '../User/UserTooltip'
import SunIcon from '../../assets/icons/daylight.svg'
import MoonIcon from '../../assets/icons/moon.svg'
import { getFullNameWithFallback } from '../../helpers/tcHelpers'
import './MemberItem.scss'

const MemberItem = (props) => {

const {usr, showEmailOnly} = props

const userFullName = getFullNameWithFallback(usr)
const workingHourStart = _.get(usr, 'workingHourStart')
const workingHourEnd = _.get(usr, 'workingHourEnd')
const timeZone = _.get(usr, 'timeZone')
const email = _.get(usr, 'email')
let localTime
let timeZoneInfo
if(timeZone) {
timeZoneInfo = _.find(timezones, (t) => {return t.zoneName === timeZone})
localTime = moment().utcOffset(timeZoneInfo.gmtOffset/3600).format('h:mm A Z')
}
let localTimeInfoEl = null

let isWorkingTime = false
let showIcon = false
let localWhStart
let localWhEnd

if(localTime || workingHourStart && workingHourEnd ) {

if(workingHourStart && workingHourEnd) {
showIcon = true
localWhStart = moment({hour: workingHourStart.split(':')[0]}).format('h:mm A')
localWhEnd = moment({hour: workingHourEnd.split(':')[0]}).format('h:mm A')

if(localTime) {
let localHour = +moment().utcOffset(timeZoneInfo.gmtOffset/3600).format('H')
const localStartHour = +moment({hour: workingHourStart.split(':')[0] }).format('H')
let localEndHour = +moment({hour: workingHourEnd.split(':')[0] }).format('H')
if(localEndHour <= localStartHour) {
localEndHour += 24
if(localHour < localStartHour) {
localHour += 24
}
}
if(localHour >= localStartHour && localHour <= localEndHour) {
isWorkingTime = true
}
}
}
localTimeInfoEl = (<div styleName="time-info-tooltip">
{localTime? <span>Local Time - {localTime}</span>: null}
{localWhStart && localWhEnd ? <span>Working Hours - {`${localWhStart} - ${localWhEnd}`}</span>: null}
</div>)
}

return (
<div styleName="container">
<UserTooltip {...props} localTimeInfo={localTimeInfoEl}/>
<div styleName="member-detail">
<div styleName="member-name">{showEmailOnly? email :userFullName}</div>
{localWhStart && localWhEnd && <div styleName="wk-hour">WH: {localWhStart} - {localWhEnd}</div>}
{localTime &&<div styleName="local-time">{showIcon&& (isWorkingTime ? <SunIcon/>: <MoonIcon/>)}Local time: {localTime}</div>}
</div>
</div>
)
}

MemberItem.propTypes = {
showRoleSelector: false
}

MemberItem.propTypes = {
usr: PropTypes.object.isRequired,
id: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number
]).isRequired,
previewAvatar: PropTypes.bool,
showEmailOnly: PropTypes.bool,
size: PropTypes.number
}

export default MemberItem
69 changes: 69 additions & 0 deletions src/components/TeamManagement/MemberItem.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
@import '~tc-ui/src/styles/tc-includes';

.container {
display: flex;
flex-direction: row;
min-height: 51px;
width: 100%;

& + & {
margin-top: 2 * $base-unit;
}

:global(.Tooltip) {
margin-left: 5px;
margin-top: 2px;

&:global(.customer-data .tooltip-content-container){
width: 440px;
}
}
}

.member-detail {
margin-left: 2 * $base-unit;
overflow: hidden;
}

.member-name {
@include roboto-bold;
font-size: 16px;
line-height: 20px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.wk-hour {
margin-top: $base-unit;
font-size: 10px;
color: $tc-gray-50;
}

.local-time {
align-items: center;
display: flex;
font-size: 10px;
color: $tc-gray-50;
line-height: 20px;

svg {
vertical-align: sub;
margin-right: $base-unit;
}
}

.time-info-tooltip {
height: 20px;
width: 100%;
color: $tc-gray-50;
display: flex;
justify-content: space-between;

span {
font-size: 12px;
color: $tc-gray-50;
line-height: 20px;
white-space: nowrap
}
}
Loading