Skip to content

Commit 4a360d0

Browse files
committed
employee add
1 parent e752f46 commit 4a360d0

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

src/features/Employees/EmployeesView.tsx

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import React, { FunctionComponent, useEffect } from 'react';
22
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";
44
import { makeStyles } from "@material-ui/core/styles";
55
import SearchInput from "../../components/SearchInput";
66
import { RootState } from 'app/rootReducer'
77
import { useSelector, useDispatch } from 'react-redux';
88
import { fetchEmployees } from 'features/Employees/employeeSlice'
99
import { CustomMenuItem } from 'components/CustomMenuItem';
1010
import { serverUrl } from 'api/Apis';
11+
import CustomButton from 'components/Button';
1112
interface OwnProps {
1213
}
1314

@@ -42,7 +43,10 @@ const data = {
4243
// mobile: any,//1any,//2345678,
4344
// profilepicpath:
4445
const columns = [
45-
46+
{
47+
id: "profilepicpath",
48+
label: ''
49+
},
4650
{
4751
id: "fname",
4852
label: 'First name'
@@ -70,11 +74,8 @@ const columns = [
7074
{
7175
id: "empid",
7276
label: 'Employee id'
73-
},
74-
{
75-
id: "profilepicpath",
76-
label: ''
77-
},]
77+
}
78+
]
7879
const EmployeesView: FunctionComponent<Props> = (props) => {
7980
const classes = useStyles()
8081

@@ -132,7 +133,16 @@ const EmployeesView: FunctionComponent<Props> = (props) => {
132133
return (
133134
<Grid item xs style={{ height: "100%" }}>
134135
<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>
136146
<TableWrapper style={{ marginLeft: '54px' }} config={TableConfig} />
137147
</Paper>
138148
</Grid>

0 commit comments

Comments
 (0)