forked from USStateDept/State-TalentMAP
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into feature/feature-flags-v2
* dev: Public Profile "Updates" and Edit UI (#147) Bidder Portfolio Edit View (#144) # Conflicts: # src/Components/ProfileDashboard/ProfileDashboard.jsx
- Loading branch information
Showing
23 changed files
with
528 additions
and
67 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/Components/BidderPortfolio/CheckboxList/CheckboxList.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import CheckBox from '../../CheckBox'; | ||
import CLIENT_EDITS from '../../../Constants/ClientEdits'; | ||
|
||
const CheckboxList = ({ id, isDisabled }) => ( | ||
|
||
<div className="client-checkbox-list"> | ||
{CLIENT_EDITS.map(c => ( | ||
<CheckBox | ||
id={`${id}-${c.value}`} | ||
label={c.label} | ||
small | ||
value | ||
key={c.value} | ||
disabled={isDisabled} | ||
className={isDisabled ? 'tm-checkbox-disabled-alternate' : ''} | ||
/> | ||
))} | ||
</div> | ||
); | ||
|
||
CheckboxList.propTypes = { | ||
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, | ||
isDisabled: PropTypes.bool, | ||
}; | ||
|
||
CheckboxList.defaultProps = { | ||
statuses: {}, | ||
isDisabled: false, | ||
}; | ||
|
||
export default CheckboxList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './CheckboxList'; |
49 changes: 49 additions & 0 deletions
49
src/Components/BidderPortfolio/EditButtons/EditButtons.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import React, { Component } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { EMPTY_FUNCTION } from '../../../Constants/PropTypes'; | ||
|
||
class EditButtons extends Component { | ||
constructor(props) { | ||
super(props); | ||
this.onShow = this.onShow.bind(this); | ||
this.onCancel = this.onCancel.bind(this); | ||
this.onSave = this.onSave.bind(this); | ||
this.state = { | ||
showSave: this.props.initialShowSave, | ||
}; | ||
} | ||
onShow() { | ||
this.setState({ showSave: true }, () => this.props.onChange({ show: true, type: 'show' })); | ||
} | ||
onCancel() { | ||
this.setState({ showSave: false }, () => this.props.onChange({ show: false, type: 'cancel' })); | ||
} | ||
onSave() { | ||
this.setState({ showSave: false }, () => this.props.onChange({ show: false, type: 'save' })); | ||
} | ||
changeSaveState(val) { | ||
this.setState({ showSave: val }); | ||
} | ||
render() { | ||
const { showSave } = this.state; | ||
return ( | ||
<div className="edit-buttons-container"> | ||
{!showSave && <button onClick={this.onShow}>Edit</button>} | ||
{showSave && <button onClick={this.onCancel} className="usa-button-secondary">{'Don\'t Save'}</button>} | ||
{showSave && <button onClick={this.onSave}>Save</button>} | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
EditButtons.propTypes = { | ||
onChange: PropTypes.func, | ||
initialShowSave: PropTypes.bool, | ||
}; | ||
|
||
EditButtons.defaultProps = { | ||
onChange: EMPTY_FUNCTION, | ||
initialShowSave: false, | ||
}; | ||
|
||
export default EditButtons; |
Oops, something went wrong.