|
1 | 1 | import React, { FunctionComponent, useEffect } from 'react';
|
2 | 2 | import TableWrapper from "../../components/TableWrapper";
|
3 |
| -import { Avatar, createStyles, fade, Grid, Paper, Theme } from "@material-ui/core"; |
| 3 | +import { Avatar, Box, createStyles, fade, Grid, Paper, Theme } from "@material-ui/core"; |
4 | 4 | import { makeStyles } from "@material-ui/core/styles";
|
5 | 5 | import SearchInput from "../../components/SearchInput";
|
6 | 6 | import { RootState } from 'app/rootReducer'
|
7 | 7 | import { useSelector, useDispatch } from 'react-redux';
|
8 | 8 | import { fetchEmployees } from 'features/Employees/employeeSlice'
|
9 | 9 | import { CustomMenuItem } from 'components/CustomMenuItem';
|
10 | 10 | import { serverUrl } from 'api/Apis';
|
| 11 | +import CustomButton from 'components/Button'; |
11 | 12 | interface OwnProps {
|
12 | 13 | }
|
13 | 14 |
|
@@ -42,7 +43,10 @@ const data = {
|
42 | 43 | // mobile: any,//1any,//2345678,
|
43 | 44 | // profilepicpath:
|
44 | 45 | const columns = [
|
45 |
| - |
| 46 | + { |
| 47 | + id: "profilepicpath", |
| 48 | + label: '' |
| 49 | + }, |
46 | 50 | {
|
47 | 51 | id: "fname",
|
48 | 52 | label: 'First name'
|
@@ -70,11 +74,8 @@ const columns = [
|
70 | 74 | {
|
71 | 75 | id: "empid",
|
72 | 76 | label: 'Employee id'
|
73 |
| - }, |
74 |
| - { |
75 |
| - id: "profilepicpath", |
76 |
| - label: '' |
77 |
| - },] |
| 77 | + } |
| 78 | +] |
78 | 79 | const EmployeesView: FunctionComponent<Props> = (props) => {
|
79 | 80 | const classes = useStyles()
|
80 | 81 |
|
@@ -132,7 +133,16 @@ const EmployeesView: FunctionComponent<Props> = (props) => {
|
132 | 133 | return (
|
133 | 134 | <Grid item xs style={{ height: "100%" }}>
|
134 | 135 | <Paper className={classes.paper}>
|
135 |
| - <SearchInput style={{ margin: '0 23px 30px', paddingTop: '37px' }} placeholder="Search Employees by name, email or mobile" width={500} /> |
| 136 | + |
| 137 | + <Box display="flex" justifyContent="space-between" style={{ paddingTop: '37px', paddingLeft: '30px', paddingBottom: '25.5px'}} > |
| 138 | + <SearchInput /*style={{ margin: '0 23px 30px', paddingTop: '37px' }}*/ placeholder="Search Employees by name, email or mobile" width={500} /> |
| 139 | + {/* <SelectInput value="Action" /> */} |
| 140 | + <CustomMenuItem to='/employee/add'> |
| 141 | + <CustomButton style={{ width: '150px', fontSize: '12px', height: '39px', padding: 0 }}> |
| 142 | + Add |
| 143 | + </CustomButton> |
| 144 | + </CustomMenuItem> |
| 145 | + </Box> |
136 | 146 | <TableWrapper style={{ marginLeft: '54px' }} config={TableConfig} />
|
137 | 147 | </Paper>
|
138 | 148 | </Grid>
|
|
0 commit comments