Merge branch 'main' of https://git.cnapp.co.in/gitadmin/admin
This commit is contained in:
commit
bcd73e2bad
@ -33,15 +33,12 @@ const Inventory = () => {
|
|||||||
name: nameRef.current?.value || "",
|
name: nameRef.current?.value || "",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
// console.log("response", response);
|
||||||
const transformedData =
|
const transformedData =
|
||||||
response.data?.inventories?.map((entry) => ({
|
response.data?.inventories?.map((entry) => ({
|
||||||
id: entry._id,
|
id: entry._id,
|
||||||
uniqueId: entry.uniqueId,
|
uniqueId: entry.uniqueId,
|
||||||
tradeName:
|
tradeName: entry.tradeName || "N/A",
|
||||||
entry.addedForData?.shippingAddress?.tradeName ||
|
|
||||||
entry.addedForData?.trade_name ||
|
|
||||||
"N/A",
|
|
||||||
designation: entry.addedFor === "PrincipalDistributor" ? "PD" : "RD",
|
designation: entry.addedFor === "PrincipalDistributor" ? "PD" : "RD",
|
||||||
products: entry.products.map((product) => ({
|
products: entry.products.map((product) => ({
|
||||||
SKU: product.SKU,
|
SKU: product.SKU,
|
||||||
|
@ -140,7 +140,7 @@ const SingleInventory = () => {
|
|||||||
</Typography>
|
</Typography>
|
||||||
<Typography>
|
<Typography>
|
||||||
<strong>Trade Name:</strong>{" "}
|
<strong>Trade Name:</strong>{" "}
|
||||||
{inventoryDetails.addedForData.shippingAddress?.tradeName||inventoryDetails.addedForData.trade_name}
|
{inventoryDetails.addedForData.shippingAddress?.tradeName||inventoryDetails.addedForData.kyc.trade_name}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
@ -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,17 +272,18 @@ 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"
|
type="button"
|
||||||
className="btn btn-warning btn-sm waves-effect waves-light btn-table ml-2"
|
className="btn btn-warning btn-sm waves-effect waves-light btn-table"
|
||||||
>
|
>
|
||||||
{user.totalOrders}
|
{user.totalOrders}
|
||||||
</button>
|
</button>
|
||||||
@ -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
|
||||||
|
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user