pd table fixed

This commit is contained in:
Sibunnayak 2024-10-10 18:13:27 +05:30
parent efdbe2377c
commit 5279bc91ef
2 changed files with 38 additions and 32 deletions

View File

@ -208,24 +208,28 @@ const principalDistributor = () => {
<div className="table-responsive table-shoot mt-3"> <div className="table-responsive table-shoot mt-3">
<table <table
className="table table-centered table-nowrap" className="table table-centered table-nowrap"
style={{ border: "1px solid" }} style={{
border: "1px solid",
tableLayout: "fixed",
width: "100%",
}}
> >
<thead <thead
className="thead-info" className="thead-info"
style={{ background: "rgb(140, 213, 213)" }} style={{ background: "rgb(140, 213, 213)" }}
> >
<tr> <tr>
<th>Unique Id </th> <th style={{ width: "10%" }}>Unique Id</th>
<th>SBU</th> <th style={{ width: "7%" }}>SBU</th>
<th>Name</th> <th style={{ width: "15%" }}>Name</th>
<th>Email</th> <th style={{ width: "17%" }}>Email</th>
{/* <th>Profile Image</th> */} <th style={{ width: "12%" }}>Date Registered</th>
<th style={{ width: "12%" }}>Last Purchase</th>
<th>Date Registered</th> <th style={{ width: "7%" }}>Orders</th>
<th>Last Purchase</th> <th style={{ width: "8%" }}>Mapping</th>
<th>Orders</th> <th className="text-center" style={{ width: "12%" }}>
<th>Mapping</th> Action
<th className="text-center">Action</th> </th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -241,8 +245,8 @@ const principalDistributor = () => {
<td>{user.uniqueId}</td> <td>{user.uniqueId}</td>
<td>{user.SBU ? user.SBU : "N/A"}</td> <td>{user.SBU ? user.SBU : "N/A"}</td>
<td className="text-start">{user.name}</td> <td className="text-start">{user.name}</td>
<td>{user.email}</td> <td className="text-start">{user.email}</td>
<td className="text-start"> <td className="text-center">
{new Date(user.createdAt).toLocaleString( {new Date(user.createdAt).toLocaleString(
"en-IN", "en-IN",
{ {
@ -268,20 +272,21 @@ const principalDistributor = () => {
) )
: "No purchase"} : "No purchase"}
</td> </td>
<td className="text-center"> <td className="text-start">
<Link <Link
to={`/principaldistributor/orders/${user?._id}`} to={`/principaldistributor/orders/${user?._id}`}
> >
<button <button
style={{ style={{
color: "black", color: "black",
marginRight: "1rem", width: "50px",
}} textAlign: "center",
type="button" }}
className="btn btn-warning btn-sm waves-effect waves-light btn-table ml-2" type="button"
> className="btn btn-warning btn-sm waves-effect waves-light btn-table"
{user.totalOrders} >
</button> {user.totalOrders}
</button>
</Link> </Link>
</td> </td>
{/* {loading1 && ( {/* {loading1 && (
@ -295,7 +300,7 @@ const principalDistributor = () => {
_id={user?._id} _id={user?._id}
setLoading1={setLoading1} setLoading1={setLoading1}
/> */} /> */}
<td className="text-start"> <td className="text-center">
<Link <Link
to={`/view/mappedretaildistributor/${user?._id}`} to={`/view/mappedretaildistributor/${user?._id}`}
> >
@ -311,7 +316,7 @@ const principalDistributor = () => {
</button> </button>
</Link> </Link>
</td> </td>
<td className="text-start"> <td className="text-end">
{/* <Link {/* <Link
to={`/users-address/view/${userAddress._id}`} to={`/users-address/view/${userAddress._id}`}
> >
@ -381,7 +386,7 @@ const principalDistributor = () => {
> >
<button <button
type="button" type="button"
className=" btn btn-info btn-sm waves-effect waves-light btn-table ml-2" className=" btn btn-info btn-sm waves-effect waves-light btn-table"
> >
View View
</button> </button>
@ -392,14 +397,15 @@ const principalDistributor = () => {
<button <button
style={{ style={{
color: "white", color: "white",
marginRight: "1rem",
}} }}
type="button" type="button"
className=" className="
btn btn-info btn-sm btn btn-info btn-sm
waves-effect waves-light waves-effect waves-light
btn-table btn-table
mx-1 ml-1
md-mt-1
md-ml-0
" "
> >
Stock Stock

View File

@ -129,7 +129,7 @@ const SalesCoOrdinator = () => {
> >
Add Sales Coordinator Add Sales Coordinator
</Button> </Button>
{/* <Button <Button
variant="contained" variant="contained"
color="primary" color="primary"
className="font-bold mb-2 capitalize" className="font-bold mb-2 capitalize"
@ -140,7 +140,7 @@ const SalesCoOrdinator = () => {
} }
> >
Upload Spreadsheet Upload Spreadsheet
</Button> */} </Button>
</div> </div>
</div> </div>
</div> </div>