8000 small chages in ui · vishal-coder/CRM_frontend@c14dd7b · GitHub
[go: up one dir, main page]

Skip to content
< 8000 script crossorigin="anonymous" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_gsap_index_js-028cb2a18f5a.js" defer="defer">

Commit c14dd7b

Browse files
committed
small chages in ui
1 parent 6b8eba4 commit c14dd7b

File tree

6 files changed

+29
-42
lines changed

6 files changed

+29
-42
lines changed

src/components/ContactDashboard.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ function ContactDashboard() {
1616
useEffect(() => {
1717
async function getData() {
1818
console.log("getcontacts called");
19-
alert("useeffect called");
2019
const response = await getContacts(
2120
{
2221
username: user.email,
@@ -121,7 +120,6 @@ function ContactDashboard() {
121120
"Payment Done" ? (
122121
<button
123122
onClick={(e) => {
124-
alert("clicked");
125123
navigate(
126124
`/dashboard/addServiceRequest/${tableMeta.rowData[2]}`
127125
);
@@ -132,7 +130,6 @@ function ContactDashboard() {
132130
) : (
133131
<button
134132
onClick={(e) => {
135-
alert("clicked");
136133
handleMarkAsContact(tableMeta.rowIndex);
137134
}}
138135
>
@@ -145,14 +142,15 @@ function ContactDashboard() {
145142
];
146143

147144
const options = {
148-
filterType: "checkbox",
145+
selectableRows: false,
146+
print: false,
149147
};
150148

151149
return (
152-
<div className="contactdashboard">
150+
<div className="listdashboard">
153151
{contactlist && contactlist.length > 0 ? (
154152
<MUIDataTable
155-
title={"Employee List"}
153+
title={"Contact List"}
156154
data={contactlist}
157155
columns={columns}
158156
options={options}

src/components/LeadDashboard.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ function LeadDashboard() {
1313
useEffect(() => {
1414
async function getData() {
1515
console.log("getleads called");
16-
alert("useeffect called");
1716
const response = await getLead(
1817
{
1918
username: user.email,
@@ -136,7 +135,6 @@ function LeadDashboard() {
136135
return (
137136
<button
138137
onClick={(e) => {
139-
alert("clicked");
140138
console.log(rowIndex);
141139
handleDelete(rowIndex);
142140
}}
@@ -158,7 +156,6 @@ function LeadDashboard() {
158156
return (
159157
<button
160158
onClick={(e) => {
161-
alert("clicked");
162159
console.log(rowIndex);
163160
handleMarkAsContact(rowIndex);
164161
}}
@@ -172,14 +169,15 @@ function LeadDashboard() {
172169
];
173170

174171
const options = {
175-
filterType: "checkbox",
172+
selectableRows: false,
173+
print: false,
176174
};
177175

178176
return (
179-
<div className="Leaddashboard">
177+
<div className="listdashboard">
180178
{leadlist && leadlist.length > 0 ? (
181179
<MUIDataTable
182-
title={"Employee List"}
180+
title={"Leads List"}
183181
data={leadlist}
184182
columns={columns}
185183
options={options}

src/components/ServiceDashboard.js

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function UserDashboard() {
3131
console.log("updated list is", list);
3232
setServicelist(list);
3333
} else {
34-
setServicelist(response.contacts);
34+
setServicelist(response.serviceReq);
3535
}
3636
}
3737
getData();
@@ -125,27 +125,17 @@ function UserDashboard() {
125125
</button>
126126
);
127127
},
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-
// },
139128
},
140129
},
141130
];
142131

143132
const options = {
144-
filterType: "checkbox",
133+
selectableRows: false,
134+
print: false,
145135
};
146136

147137
return (
148-
<div className="userdashboard">
138+
<div className="listdashboard">
149139
{servicelist && servicelist.length > 0 ? (
150140
<MUIDataTable
151141
title={"Service Request List"}

src/components/Sidebar.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,15 @@ function Sidebar() {
5454
>
5555
All Contact
5656
</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} */}
6766
</nav>
6867
);
6968
}

src/components/UserDashboard.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ function UserDashboard() {
2929
}, []);
3030

3131
const handleDelete = async (rowIndex) => {
32-
alert("inside handledelete");
3332
console.log("data", rowIndex);
3433
const updatedList = userlist.filter((item, index) => {
3534
return index != rowIndex;
@@ -114,8 +113,6 @@ function UserDashboard() {
114113
return (
115114
<button
116115
onClick={(e) => {
117-
alert("clicked");
118-
console.log(rowIndex);
119116
handleDelete(rowIndex);
120117
}}
121118
>
@@ -128,11 +125,12 @@ function UserDashboard() {
128125
];
129126

130127
const options = {
131-
filterType: "checkbox",
128+
selectableRows: false,
129+
print: false,
132130
};
133131

134132
return (
135-
<div className="userdashboard">
133+
<div className="listdashboard">
136134
{userlist && userlist.length > 0 ? (
137135
<MUIDataTable
138136
title={"Employee List"}
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
.dashboarddetails {
1+
.dashboarddetails,
2+
.listdashboard {
23
flex: 10;
34
background-color: #e1e1e2;
45
border-radius: 15px;
56
overflow: auto;
7+
8+
text-align: center;
9+
margin: 0.4rem;
610
}

0 commit comments

Comments
 (0)
0