File tree Expand file tree Collapse file tree 6 files changed +29
-42
lines changed Expand file tree Collapse file tree 6 files changed +29
-42
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ function ContactDashboard() {
16
16
useEffect ( ( ) => {
17
17
async function getData ( ) {
18
18
console . log ( "getcontacts called" ) ;
19
- alert ( "useeffect called" ) ;
20
19
const response = await getContacts (
21
20
{
22
21
username : user . email ,
@@ -121,7 +120,6 @@ function ContactDashboard() {
121
120
"Payment Done" ? (
122
121
< button
123
122
onClick = { ( e ) => {
124
- alert ( "clicked" ) ;
125
123
navigate (
126
124
`/dashboard/addServiceRequest/${ tableMeta . rowData [ 2 ] } `
127
125
) ;
@@ -132,7 +130,6 @@ function ContactDashboard() {
132
130
) : (
133
131
< button
134
132
onClick = { ( e ) => {
135
- alert ( "clicked" ) ;
136
133
handleMarkAsContact ( tableMeta . rowIndex ) ;
137
134
} }
138
135
>
@@ -145,14 +142,15 @@ function ContactDashboard() {
145
142
] ;
146
143
147
144
const options = {
148
- filterType : "checkbox" ,
145
+ selectableRows : false ,
146
+ print : false ,
149
147
} ;
150
148
151
149
return (
152
- < div className = "contactdashboard " >
150
+ < div className = "listdashboard " >
153
151
{ contactlist && contactlist . length > 0 ? (
154
152
< MUIDataTable
155
- title = { "Employee List" }
153
+ title = { "Contact List" }
156
154
data = { contactlist }
157
155
columns = { columns }
158
156
options = { options }
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ function LeadDashboard() {
13
13
useEffect ( ( ) => {
14
14
async function getData ( ) {
15
15
console . log ( "getleads called" ) ;
16
- alert ( "useeffect called" ) ;
17
16
const response = await getLead (
18
17
{
19
18
username : user . email ,
@@ -136,7 +135,6 @@ function LeadDashboard() {
136
135
return (
137
136
< button
138
137
onClick = { ( e ) => {
139
- alert ( "clicked" ) ;
140
138
console . log ( rowIndex ) ;
141
139
handleDelete ( rowIndex ) ;
142
140
} }
@@ -158,7 +156,6 @@ function LeadDashboard() {
158
156
return (
159
157
< button
160
158
onClick = { ( e ) => {
161
- alert ( "clicked" ) ;
162
159
console . log ( rowIndex ) ;
163
160
handleMarkAsContact ( rowIndex ) ;
164
161
} }
@@ -172,14 +169,15 @@ function LeadDashboard() {
172
169
] ;
173
170
174
171
const options = {
175
- filterType : "checkbox" ,
172
+ selectableRows : false ,
173
+ print : false ,
176
174
} ;
177
175
178
176
return (
179
- < div className = "Leaddashboard " >
177
+ < div className = "listdashboard " >
180
178
{ leadlist && leadlist . length > 0 ? (
181
179
< MUIDataTable
182
- title = { "Employee List" }
180
+ title = { "Leads List" }
183
181
data = { leadlist }
184
182
columns = { columns }
185
183
options = { options }
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ function UserDashboard() {
31
31
console . log ( "updated list is" , list ) ;
32
32
setServicelist ( list ) ;
33
33
} else {
34
- setServicelist ( response . contacts ) ;
34
+ setServicelist ( response . serviceReq ) ;
35
35
}
36
36
}
37
37
getData ( ) ;
@@ -125,27 +125,17 @@ function UserDashboard() {
125
125
</ button >
126
126
) ;
127
127
} ,
128
- // customBodyRender: (value, tableMeta, updateValue) => {
129
- // return (
130
- // <button
131
- // onClick={(e) => {
132
- // handleUpdateRequestStatus(tableMeta.rowData[0]);
133
- // }}
134
- // >
135
- // Service Request
136
- // </button>
137
- // );
138
- // },
139
128
} ,
140
129
} ,
141
130
] ;
142
131
143
132
const options = {
144
- filterType : "checkbox" ,
133
+ selectableRows : false ,
134
+ print : false ,
145
135
} ;
146
136
147
137
return (
148
- < div className = "userdashboard " >
138
+ < div className = "listdashboard " >
149
139
{ servicelist && servicelist . length > 0 ? (
150
140
< MUIDataTable
151
141
title = { "Service Request List" }
Original file line number Diff line number Diff line change @@ -54,16 +54,15 @@ function Sidebar() {
54
54
>
55
55
All Contact
56
56
</ NavLink >
57
- { user && user . userType != "Employee" ? (
58
- < NavLink
59
- to = "serviceDashboard"
60
- className = { ( { isActive } ) =>
61
- isActive ? "link-active sidebarItem" : "link sidebarItem"
62
- }
63
- >
64
- Service Dashboard
65
- </ NavLink >
66
- ) : null }
57
+ < NavLink
58
+ to = "serviceDashboard"
59
+ className = { ( { isActive } ) =>
60
+ isActive ? "link-active sidebarItem" : "link sidebarItem"
61
+ }
62
+ >
63
+ Service Dashboard
64
+ </ NavLink >
65
+ { /* {user && user.userType != "Employee" ? null : null} */ }
67
66
</ nav >
68
67
) ;
69
68
}
Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ function UserDashboard() {
29
29
} , [ ] ) ;
30
30
31
31
const handleDelete = async ( rowIndex ) => {
32
- alert ( "inside handledelete" ) ;
33
32
console . log ( "data" , rowIndex ) ;
34
33
const updatedList = userlist . filter ( ( item , index ) => {
35
34
return index != rowIndex ;
@@ -114,8 +113,6 @@ function UserDashboard() {
114
113
return (
115
114
< button
116
115
onClick = { ( e ) => {
117
- alert ( "clicked" ) ;
118
- console . log ( rowIndex ) ;
119
116
handleDelete ( rowIndex ) ;
120
117
} }
121
118
>
@@ -128,11 +125,12 @@ function UserDashboard() {
128
125
] ;
129
126
130
127
const options = {
131
- filterType : "checkbox" ,
128
+ selectableRows : false ,
129
+ print : false ,
132
130
} ;
133
131
134
132
return (
135
- < div className = "userdashboard " >
133
+ < div className = "listdashboard " >
136
134
{ userlist && userlist . length > 0 ? (
137
135
< MUIDataTable
138
136
title = { "Employee List" }
Original file line number Diff line number Diff line change 1
- .dashboarddetails {
1
+ .dashboarddetails ,
2
+ .listdashboard {
2
3
flex : 10 ;
3
4
background-color : # e1e1e2 ;
4
5
border-radius : 15px ;
5
6
overflow : auto;
7
+
8
+ text-align : center;
9
+ margin : 0.4rem ;
6
10
}
You can’t perform that action at this time.
0 commit comments