bug fixed

This commit is contained in:
Sibunnayak 2024-11-04 20:33:43 +05:30
parent 729d387db3
commit d18abb7c72
5 changed files with 21 additions and 27 deletions

View File

@ -307,13 +307,13 @@ const _nav = [
to: "/logo", to: "/logo",
group: "Settings", group: "Settings",
}, },
{ // {
component: CNavItem, // component: CNavItem,
name: "Mobile App", // name: "Mobile App",
icon: <CIcon icon={cilFeaturedPlaylist} customClassName="nav-icon" />, // icon: <CIcon icon={cilFeaturedPlaylist} customClassName="nav-icon" />,
to: "/mobile-app", // to: "/mobile-app",
group: "Settings", // group: "Settings",
}, // },
// { // {
// component: CNavItem, // component: CNavItem,
// name: "Copyright Message", // name: "Copyright Message",

View File

@ -2,6 +2,7 @@ import React, { useState, useEffect, useCallback, useRef } from "react";
import axios from "axios"; import axios from "axios";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import { isAutheticated } from "src/auth"; import { isAutheticated } from "src/auth";
import { toast } from "react-hot-toast";
import { import {
Button, Button,
Box, Box,
@ -124,8 +125,9 @@ const ProductManual = () => {
}, },
}); });
handleClose(); handleClose();
swal("Success", "New product manual added successfully!", "success"); setSuccess((prev) => !prev);
getProductManuals(); toast.success("New product manual added successfully!");
// getProductManuals();
} catch (error) { } catch (error) {
swal("Error", "Failed to add product manual", "error"); swal("Error", "Failed to add product manual", "error");
} finally { } finally {
@ -155,12 +157,8 @@ const ProductManual = () => {
); );
handleClose(); handleClose();
setSuccess((prev) => !prev); setSuccess((prev) => !prev);
swal( toast.success("The product manual was updated successfully!");
"Success", // getProductManuals();
"The product manual was updated successfully!",
"success"
);
getProductManuals();
} catch (err) { } catch (err) {
swal("Error", "Failed to update product manual", "error"); swal("Error", "Failed to update product manual", "error");
} finally { } finally {
@ -183,12 +181,8 @@ const ProductManual = () => {
headers: { Authorization: `Bearer ${token}` }, headers: { Authorization: `Bearer ${token}` },
}); });
setSuccess((prev) => !prev); setSuccess((prev) => !prev);
swal( toast.success("The product manual was deleted successfully!");
"Success", // getProductManuals();
"The product manual was deleted successfully!",
"success"
);
getProductManuals();
} catch (err) { } catch (err) {
swal("Error", "Failed to delete product manual", "error"); swal("Error", "Failed to delete product manual", "error");
} }

View File

@ -218,13 +218,13 @@ const OpeningInventoryReports = () => {
Brand Name Brand Name
</th> </th>
<th className="text-start" style={{ width: "15%" }}> <th className="text-start" style={{ width: "15%" }}>
Total At PD & RD Total At PDs & Retailers
</th> </th>
<th className="text-start" style={{ width: "10%" }}> <th className="text-start" style={{ width: "10%" }}>
All PDs All PDs
</th> </th>
<th className="text-start" style={{ width: "10%" }}> <th className="text-start" style={{ width: "10%" }}>
All RDs All Retailers
</th> </th>
</tr> </tr>
</thead> </thead>

View File

@ -218,13 +218,13 @@ const StockReports = () => {
Brand Name Brand Name
</th> </th>
<th className="text-start" style={{ width: "15%" }}> <th className="text-start" style={{ width: "15%" }}>
Total At PD & RD Total At PDs & Retailers
</th> </th>
<th className="text-start" style={{ width: "10%" }}> <th className="text-start" style={{ width: "10%" }}>
All PDs All PDs
</th> </th>
<th className="text-start" style={{ width: "10%" }}> <th className="text-start" style={{ width: "10%" }}>
All RDs All Retailers
</th> </th>
</tr> </tr>
</thead> </thead>

View File

@ -154,7 +154,7 @@ const WidgetsDropdown = ({
className="mb-4" className="mb-4"
color="primary" color="primary"
value={<>{retaildistributor}</>} value={<>{retaildistributor}</>}
title="Total Reatailers" title="Total Retailers"
/> />
</CCol> </CCol>
{/* </CRow> */} {/* </CRow> */}