-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #287 from YujithIsura/master
backend validation added for party delete
- Loading branch information
Showing
7 changed files
with
120 additions
and
16 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { withStyles } from '@material-ui/core/styles'; | ||
import AppBar from '@material-ui/core/AppBar'; | ||
import Tabs from '@material-ui/core/Tabs'; | ||
import Tab from '@material-ui/core/Tab'; | ||
import Typography from '@material-ui/core/Typography'; | ||
|
||
|
||
function TabContainer(props) { | ||
return ( | ||
<Typography component="div" style={{ padding: 8 * 3 }}> | ||
{props.children} | ||
</Typography> | ||
); | ||
} | ||
|
||
TabContainer.propTypes = { | ||
children: PropTypes.node.isRequired, | ||
}; | ||
|
||
const styles = theme => ({ | ||
root: { | ||
flexGrow: 1, | ||
width: '100%', | ||
backgroundColor: theme.palette.background.paper, | ||
}, | ||
tabs: { | ||
backgroundColor: '#dcdfe5', | ||
} | ||
}); | ||
|
||
class ScrollableTabsButtonAuto extends React.Component { | ||
state = { | ||
value: 0, | ||
}; | ||
|
||
handleChange = (event, value) => { | ||
this.setState({ value }); | ||
}; | ||
|
||
render() { | ||
const { classes , customProps ,onCloseModal,callElectionPendingElements,callElectionRejectedElements,callElectionApproveElements } = this.props; | ||
const { value } = this.state; | ||
|
||
return ( | ||
<div className={classes.root}> | ||
<AppBar style={{color:'black'}} position="static" > | ||
<Tabs | ||
classes={{flexContainer: classes.tabs}} | ||
value={value} | ||
onChange={this.handleChange} | ||
// indicatorColor="primary" | ||
// textColor="primary" | ||
scrollable | ||
scrollButtons="auto" | ||
> | ||
<Tab label="Pending Templates" /> | ||
<Tab label="Approved Templates" /> | ||
<Tab label="Rejected Templates" /> | ||
|
||
|
||
</Tabs> | ||
</AppBar> | ||
{value === 0 && <TabContainer>{callElectionPendingElements}</TabContainer>} | ||
{value === 1 && <TabContainer>{callElectionApproveElements}</TabContainer>} | ||
{value === 2 && <TabContainer>{callElectionRejectedElements}</TabContainer>} | ||
|
||
|
||
</div> | ||
); | ||
|
||
} | ||
} | ||
|
||
ScrollableTabsButtonAuto.propTypes = { | ||
classes: PropTypes.object.isRequired, | ||
}; | ||
|
||
export default withStyles(styles)(ScrollableTabsButtonAuto); |
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