Passing Props in Component state Fale change after submit
This commit is contained in:
parent
da85fb9d1e
commit
a5aa9dc8ac
|
|
@ -33,7 +33,7 @@ import { FaCreditCard } from 'react-icons/fa';
|
|||
|
||||
const subDirectory = import.meta.env.BASE_URL;
|
||||
|
||||
function PaymentOptions() {
|
||||
function PaymentOptions({ setModalOpen }) {
|
||||
const { SadminuserAccess } = useAuth();
|
||||
let SAAccessCommonMaster = SadminuserAccess?.find(
|
||||
(e) => e?.MenuName === 'Payment Options'
|
||||
|
|
@ -1356,6 +1356,7 @@ function PaymentOptions() {
|
|||
: 'Data Updated Successfully'
|
||||
);
|
||||
await dispatch(changeSalesPaymentoption(false));
|
||||
setModalOpen(false)
|
||||
// ✅ Call the function here to update global state
|
||||
try {
|
||||
await fetchAndSetPaymentOptions(dispatch, {
|
||||
|
|
|
|||
Loading…
Reference in New Issue