rd to retailer changed naming
This commit is contained in:
parent
d18abb7c72
commit
aef4fa2fad
@ -39,7 +39,7 @@ const Inventory = () => {
|
||||
id: entry._id,
|
||||
uniqueId: entry.uniqueId,
|
||||
tradeName: entry.tradeName || "N/A",
|
||||
designation: entry.addedFor === "PrincipalDistributor" ? "PD" : "RD",
|
||||
designation: entry.addedFor === "PrincipalDistributor" ? "PD" : "Retailer",
|
||||
products: entry.products.map((product) => ({
|
||||
SKU: product.SKU,
|
||||
ProductName: product.ProductName,
|
||||
@ -203,7 +203,7 @@ const Inventory = () => {
|
||||
className="text-start"
|
||||
style={{ border: "1px solid" }}
|
||||
>
|
||||
PD/RD
|
||||
PD/Retailer
|
||||
</th>
|
||||
<th
|
||||
className="text-start"
|
||||
@ -253,7 +253,7 @@ const Inventory = () => {
|
||||
inventoryData.map((entry, i) =>
|
||||
entry.products.map((product, j) => (
|
||||
<tr key={`${i}-${j}`}>
|
||||
{/* Only show ID, Date, Time, Trade Name, PD/RD, and Actions on the first row of each entry */}
|
||||
{/* Only show ID, Date, Time, Trade Name, PD/Retailer, and Actions on the first row of each entry */}
|
||||
{j === 0 && (
|
||||
<>
|
||||
<td
|
||||
|
@ -125,7 +125,7 @@ const SingleInventory = () => {
|
||||
<Grid container spacing={2}>
|
||||
<Grid item xs={6}>
|
||||
<Typography>
|
||||
<strong>PD or RD:</strong>{" "}
|
||||
<strong>PD or Retailer:</strong>{" "}
|
||||
{inventoryDetails.addedFor}
|
||||
</Typography>
|
||||
<Typography>
|
||||
|
@ -316,7 +316,7 @@ const principalDistributor = () => {
|
||||
type="button"
|
||||
className="btn btn-primary btn-sm waves-effect waves-light btn-table ml-2"
|
||||
>
|
||||
RD
|
||||
Retailer
|
||||
</button>
|
||||
</Link>
|
||||
</td>
|
||||
|
@ -514,7 +514,7 @@ const SingleRetailDistributor = () => {
|
||||
<tr>
|
||||
<th style={{ width: "5%" }}>SL No.</th>
|
||||
<th style={{ width: "20%" }}>Trade Name</th>
|
||||
<th style={{ width: "15%" }}>RD Name</th>
|
||||
<th style={{ width: "15%" }}>Retailer Name</th>
|
||||
<th style={{ width: "40%" }}>Address</th>
|
||||
<th style={{ width: "7%" }}>Default</th>
|
||||
<th style={{ width: "13%" }}>Action</th>
|
||||
@ -535,7 +535,7 @@ const SingleRetailDistributor = () => {
|
||||
</td>
|
||||
<td className="text-start">
|
||||
<strong>
|
||||
{address?.Name ? `${address.Name}` : "No RD Name"}
|
||||
{address?.Name ? `${address.Name}` : "No Retailer Name"}
|
||||
</strong>
|
||||
</td>
|
||||
<td className="text-start">
|
||||
|
@ -39,7 +39,7 @@ const Sales = () => {
|
||||
id: entry._id,
|
||||
uniqueId: entry.uniqueId,
|
||||
tradeName: entry.tradeName || "N/A",
|
||||
designation: entry.addedFor === "PrincipalDistributor" ? "PD" : "RD",
|
||||
designation: entry.addedFor === "PrincipalDistributor" ? "PD" : "Retailer",
|
||||
products: entry.products.map((product) => ({
|
||||
SKU: product.SKU,
|
||||
ProductName: product.ProductName,
|
||||
@ -203,7 +203,7 @@ const Sales = () => {
|
||||
className="text-start"
|
||||
style={{ border: "1px solid" }}
|
||||
>
|
||||
PD/RD
|
||||
PD/Retailer
|
||||
</th>
|
||||
<th
|
||||
className="text-start"
|
||||
@ -253,7 +253,7 @@ const Sales = () => {
|
||||
SalesData.map((entry, i) =>
|
||||
entry.products.map((product, j) => (
|
||||
<tr key={`${i}-${j}`}>
|
||||
{/* Only show ID, Date, Time, Trade Name, PD/RD, and Actions on the first row of each entry */}
|
||||
{/* Only show ID, Date, Time, Trade Name, PD/Retailer, and Actions on the first row of each entry */}
|
||||
{j === 0 && (
|
||||
<>
|
||||
<td
|
||||
|
@ -125,7 +125,7 @@ const SingleSales = () => {
|
||||
<Grid container spacing={2}>
|
||||
<Grid item xs={6}>
|
||||
<Typography>
|
||||
<strong>PD or RD:</strong>{" "}
|
||||
<strong>PD or Retailer:</strong>{" "}
|
||||
{SalesDetails.addedFor}
|
||||
</Typography>
|
||||
<Typography>
|
||||
|
@ -5,7 +5,7 @@ import Button from "@material-ui/core/Button";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { isAutheticated } from "src/auth";
|
||||
import swal from "sweetalert";
|
||||
import debounce from 'lodash.debounce';
|
||||
import debounce from "lodash.debounce";
|
||||
|
||||
const SalesCoOrdinator = () => {
|
||||
const token = isAutheticated();
|
||||
@ -57,10 +57,13 @@ const SalesCoOrdinator = () => {
|
||||
getSalesCoOrdinatorsData();
|
||||
}, [success, itemPerPage, currentPage]);
|
||||
|
||||
const debouncedSearch = useCallback(debounce(() => {
|
||||
setCurrentPage(1);
|
||||
getSalesCoOrdinatorsData();
|
||||
}, 500), []);
|
||||
const debouncedSearch = useCallback(
|
||||
debounce(() => {
|
||||
setCurrentPage(1);
|
||||
getSalesCoOrdinatorsData();
|
||||
}, 500),
|
||||
[]
|
||||
);
|
||||
|
||||
const handleSearchChange = () => {
|
||||
debouncedSearch();
|
||||
@ -119,7 +122,7 @@ const SalesCoOrdinator = () => {
|
||||
Sales Coordinators
|
||||
</div>
|
||||
<div className="page-title-right">
|
||||
<Button
|
||||
<Button
|
||||
variant="contained"
|
||||
color="primary"
|
||||
className="font-bold mb-2 capitalize mr-2"
|
||||
@ -216,21 +219,25 @@ const SalesCoOrdinator = () => {
|
||||
style={{ background: "#ecdddd" }}
|
||||
>
|
||||
<tr>
|
||||
<th>Unique Id </th>
|
||||
<th className="text-start">Name</th>
|
||||
<th className="text-start">Mobile No.</th>
|
||||
<th className="text-start">Email</th>
|
||||
<th className="text-start">Verify</th>
|
||||
<th className="text-start">Register On</th>
|
||||
<th className="text-start">Mapping</th>
|
||||
<th className="text-start">Action</th>
|
||||
<th style={{ width: "9%" }}>Unique Id </th>
|
||||
<th style={{ width: "18%" }}>Name</th>
|
||||
<th style={{ width: "12%" }}>Mobile No.</th>
|
||||
<th style={{ width: "18%" }}>Email</th>
|
||||
<th style={{ width: "7%" }}>Verify</th>
|
||||
<th style={{ width: "10%" }}>Register On</th>
|
||||
<th className="text-center" style={{ width: "13%" }}>
|
||||
Mapping
|
||||
</th>
|
||||
<th className="text-center" style={{ width: "13%" }}>
|
||||
Action
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loading ? (
|
||||
<tr>
|
||||
<td className="text-center" colSpan="6">
|
||||
<td className="text-center" colSpan="8">
|
||||
Loading...
|
||||
</td>
|
||||
</tr>
|
||||
@ -283,46 +290,34 @@ const SalesCoOrdinator = () => {
|
||||
})}
|
||||
</td>
|
||||
<td className="text-start">
|
||||
<Link
|
||||
<Link
|
||||
to={`/view/SCprincipaldistributor/${salescoordinator._id}`}
|
||||
>
|
||||
<button
|
||||
style={{
|
||||
color: "white",
|
||||
marginRight: "1rem",
|
||||
}}
|
||||
type="button"
|
||||
className="btn btn-primary btn-sm waves-effect waves-light btn-table ml-2"
|
||||
className="btn btn-primary btn-sm waves-effect waves-light btn-table"
|
||||
>
|
||||
PD
|
||||
PD
|
||||
</button>
|
||||
</Link>
|
||||
<Link
|
||||
to={`/view/SCretaildistributor/${salescoordinator._id}`}
|
||||
>
|
||||
<button
|
||||
style={{
|
||||
color: "white",
|
||||
marginRight: "1rem",
|
||||
}}
|
||||
type="button"
|
||||
className="btn btn-primary btn-sm waves-effect waves-light btn-table ml-2"
|
||||
className="btn btn-primary btn-sm waves-effect waves-light btn-table ml-1 md-mt-1 md-ml-0"
|
||||
>
|
||||
RD
|
||||
Retailer
|
||||
</button>
|
||||
</Link>
|
||||
</td>
|
||||
<td className="text-start">
|
||||
</td>
|
||||
<td className="text-start">
|
||||
<Link
|
||||
to={`/salescoordinator/edit/${salescoordinator._id}`}
|
||||
>
|
||||
<button
|
||||
style={{
|
||||
color: "white",
|
||||
marginRight: "1rem",
|
||||
}}
|
||||
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"
|
||||
>
|
||||
Edit
|
||||
</button>
|
||||
@ -331,8 +326,10 @@ const SalesCoOrdinator = () => {
|
||||
<button
|
||||
type="button"
|
||||
style={{ color: "white" }}
|
||||
className="btn btn-danger btn-sm waves-effect waves-light btn-table ml-2"
|
||||
onClick={() => handleDelete(salescoordinator._id)}
|
||||
className="btn btn-danger btn-sm waves-effect waves-light btn-table ml-1 md-mt-1 md-ml-0"
|
||||
onClick={() =>
|
||||
handleDelete(salescoordinator._id)
|
||||
}
|
||||
>
|
||||
Delete
|
||||
</button>
|
||||
@ -342,7 +339,7 @@ const SalesCoOrdinator = () => {
|
||||
})
|
||||
) : (
|
||||
<tr>
|
||||
<td className="text-center" colSpan="6">
|
||||
<td className="text-center" colSpan="8">
|
||||
No Sales Coordinator found!
|
||||
</td>
|
||||
</tr>
|
||||
@ -352,7 +349,8 @@ const SalesCoOrdinator = () => {
|
||||
</div>
|
||||
<div className="d-flex justify-content-between">
|
||||
<div>
|
||||
Showing {salescoordinatorsData?.length} of {totalData} entries
|
||||
Showing {salescoordinatorsData?.length} of {totalData}{" "}
|
||||
entries
|
||||
</div>
|
||||
<div>
|
||||
<button
|
||||
@ -364,7 +362,9 @@ const SalesCoOrdinator = () => {
|
||||
</button>
|
||||
<button
|
||||
onClick={() => setCurrentPage(currentPage + 1)}
|
||||
disabled={salescoordinatorsData?.length < itemPerPage || loading}
|
||||
disabled={
|
||||
salescoordinatorsData?.length < itemPerPage || loading
|
||||
}
|
||||
className="btn btn-primary ml-2"
|
||||
>
|
||||
Next
|
||||
|
@ -219,21 +219,23 @@ const TerritoryManager = () => {
|
||||
style={{ background: "#ecdddd" }}
|
||||
>
|
||||
<tr>
|
||||
<th>Unique Id </th>
|
||||
<th className="text-start">Name</th>
|
||||
<th className="text-start">Mobile No.</th>
|
||||
<th className="text-start">Email</th>
|
||||
<th className="text-start">Verify</th>
|
||||
<th className="text-start">Register On</th>
|
||||
<th className="text-start">Mapping</th>
|
||||
<th className="text-start">Action</th>
|
||||
<th style={{ width: "9%" }}>Unique Id </th>
|
||||
<th style={{ width: "17%" }}>Name</th>
|
||||
<th style={{ width: "11%" }}>Mobile No.</th>
|
||||
<th style={{ width: "17%" }}>Email</th>
|
||||
<th style={{ width: "6%" }}>Verify</th>
|
||||
<th style={{ width: "10%" }}>Register On</th>
|
||||
<th className="text-center" style={{ width: "17%" }}>Mapping</th>
|
||||
<th className="text-center" style={{ width: "13%" }}>
|
||||
Action
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loading ? (
|
||||
<tr>
|
||||
<td className="text-center" colSpan="6">
|
||||
<td className="text-center" colSpan="8">
|
||||
Loading...
|
||||
</td>
|
||||
</tr>
|
||||
@ -290,12 +292,8 @@ const TerritoryManager = () => {
|
||||
to={`/view/salescoordinator/${territorymanager._id}`}
|
||||
>
|
||||
<button
|
||||
style={{
|
||||
color: "white",
|
||||
marginRight: "1rem",
|
||||
}}
|
||||
type="button"
|
||||
className="btn btn-primary btn-sm waves-effect waves-light btn-table ml-2"
|
||||
className="btn btn-primary btn-sm waves-effect waves-light btn-table"
|
||||
>
|
||||
SC
|
||||
</button>
|
||||
@ -304,12 +302,8 @@ const TerritoryManager = () => {
|
||||
to={`/view/principaldistributor/${territorymanager._id}`}
|
||||
>
|
||||
<button
|
||||
style={{
|
||||
color: "white",
|
||||
marginRight: "1rem",
|
||||
}}
|
||||
type="button"
|
||||
className="btn btn-primary btn-sm waves-effect waves-light btn-table ml-2"
|
||||
className="btn btn-primary btn-sm waves-effect waves-light btn-table ml-1 md-mt-1 md-ml-0"
|
||||
>
|
||||
PD
|
||||
</button>
|
||||
@ -318,28 +312,20 @@ const TerritoryManager = () => {
|
||||
to={`/view/retaildistributor/${territorymanager._id}`}
|
||||
>
|
||||
<button
|
||||
style={{
|
||||
color: "white",
|
||||
marginRight: "1rem",
|
||||
}}
|
||||
type="button"
|
||||
className="btn btn-primary btn-sm waves-effect waves-light btn-table ml-2"
|
||||
className="btn btn-primary btn-sm waves-effect waves-light btn-table ml-1 md-mt-1 md-ml-0"
|
||||
>
|
||||
RD
|
||||
Retailer
|
||||
</button>
|
||||
</Link>
|
||||
</td>
|
||||
<td className="text-start">
|
||||
<td className="text-end">
|
||||
<Link
|
||||
to={`/territorymanager/edit/${territorymanager._id}`}
|
||||
>
|
||||
<button
|
||||
style={{
|
||||
color: "white",
|
||||
marginRight: "1rem",
|
||||
}}
|
||||
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"
|
||||
>
|
||||
Edit
|
||||
</button>
|
||||
@ -348,7 +334,7 @@ const TerritoryManager = () => {
|
||||
<button
|
||||
type="button"
|
||||
style={{ color: "white" }}
|
||||
className="btn btn-danger btn-sm waves-effect waves-light btn-table ml-2"
|
||||
className="btn btn-danger btn-sm waves-effect waves-light btn-table ml-1 md-mt-1 md-ml-0"
|
||||
onClick={() =>
|
||||
handleDelete(territorymanager._id)
|
||||
}
|
||||
@ -361,7 +347,7 @@ const TerritoryManager = () => {
|
||||
})
|
||||
) : (
|
||||
<tr>
|
||||
<td className="text-center" colSpan="6">
|
||||
<td className="text-center" colSpan="8">
|
||||
No Territory Manager found!
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -207,7 +207,7 @@
|
||||
// className="label-100 mt-2 row ms-1"
|
||||
// style={{ fontWeight: "bold" }}
|
||||
// >
|
||||
// RD Mobile Application
|
||||
// Retailer Mobile Application
|
||||
// <br />
|
||||
// </label>
|
||||
// <input
|
||||
@ -385,7 +385,7 @@ function MobileApp() {
|
||||
</div>
|
||||
<div className="form-group">
|
||||
<label className="label-100 mt-3" style={{ fontWeight: "bold" }}>
|
||||
RD Mobile Application
|
||||
Retailer Mobile Application
|
||||
</label>
|
||||
<input
|
||||
type="file"
|
||||
@ -394,7 +394,7 @@ function MobileApp() {
|
||||
/>
|
||||
{RDAppUrl && (
|
||||
<a href={RDAppUrl} download className="btn btn-link">
|
||||
Download RD App
|
||||
Download Retailer App
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user