From aef4fa2fadc429e469708b0847fd4b05676e09a9 Mon Sep 17 00:00:00 2001 From: Sibunnayak Date: Tue, 5 Nov 2024 10:04:18 +0530 Subject: [PATCH] rd to retailer changed naming --- src/views/Inventory/Inventory.js | 6 +- src/views/Inventory/SingleInventory.js | 2 +- .../principalDistributor.js | 2 +- .../SingleRetailDistributor.js | 4 +- src/views/Sales/Sales.js | 6 +- src/views/Sales/SingleSale.js | 2 +- .../SalesCoOrdinators/SalesCoOrdinator.js | 80 +++++++++---------- .../TerritoryManager/TerritoryManager.js | 52 +++++------- src/views/configuration/MobileApp.js | 6 +- 9 files changed, 73 insertions(+), 87 deletions(-) diff --git a/src/views/Inventory/Inventory.js b/src/views/Inventory/Inventory.js index dee4892..181a182 100644 --- a/src/views/Inventory/Inventory.js +++ b/src/views/Inventory/Inventory.js @@ -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 { inventoryData.map((entry, i) => entry.products.map((product, 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 && ( <> { - PD or RD:{" "} + PD or Retailer:{" "} {inventoryDetails.addedFor} diff --git a/src/views/PrincipalDistributors/principalDistributor.js b/src/views/PrincipalDistributors/principalDistributor.js index 3286c3b..dfa0313 100644 --- a/src/views/PrincipalDistributors/principalDistributor.js +++ b/src/views/PrincipalDistributors/principalDistributor.js @@ -316,7 +316,7 @@ const principalDistributor = () => { type="button" className="btn btn-primary btn-sm waves-effect waves-light btn-table ml-2" > - RD + Retailer diff --git a/src/views/RetailDistributors/SingleRetailDistributor.js b/src/views/RetailDistributors/SingleRetailDistributor.js index ee91692..49cc464 100644 --- a/src/views/RetailDistributors/SingleRetailDistributor.js +++ b/src/views/RetailDistributors/SingleRetailDistributor.js @@ -514,7 +514,7 @@ const SingleRetailDistributor = () => { SL No. Trade Name - RD Name + Retailer Name Address Default Action @@ -535,7 +535,7 @@ const SingleRetailDistributor = () => { - {address?.Name ? `${address.Name}` : "No RD Name"} + {address?.Name ? `${address.Name}` : "No Retailer Name"} diff --git a/src/views/Sales/Sales.js b/src/views/Sales/Sales.js index a8474f5..bfca585 100644 --- a/src/views/Sales/Sales.js +++ b/src/views/Sales/Sales.js @@ -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 { SalesData.map((entry, i) => entry.products.map((product, 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 && ( <> { - PD or RD:{" "} + PD or Retailer:{" "} {SalesDetails.addedFor} diff --git a/src/views/SalesCoOrdinators/SalesCoOrdinator.js b/src/views/SalesCoOrdinators/SalesCoOrdinator.js index 1611ce2..81a4e39 100644 --- a/src/views/SalesCoOrdinators/SalesCoOrdinator.js +++ b/src/views/SalesCoOrdinators/SalesCoOrdinator.js @@ -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
- - - + + @@ -331,8 +326,10 @@ const SalesCoOrdinator = () => { @@ -342,7 +339,7 @@ const SalesCoOrdinator = () => { }) ) : ( - + No Sales Coordinator found! @@ -352,7 +349,8 @@ const SalesCoOrdinator = () => {
- Showing {salescoordinatorsData?.length} of {totalData} entries + Showing {salescoordinatorsData?.length} of {totalData}{" "} + entries
@@ -304,12 +302,8 @@ const TerritoryManager = () => { to={`/view/principaldistributor/${territorymanager._id}`} > @@ -318,28 +312,20 @@ const TerritoryManager = () => { to={`/view/retaildistributor/${territorymanager._id}`} > - + @@ -348,7 +334,7 @@ const TerritoryManager = () => {