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;
|
const subDirectory = import.meta.env.BASE_URL;
|
||||||
|
|
||||||
function PaymentOptions() {
|
function PaymentOptions({ setModalOpen }) {
|
||||||
const { SadminuserAccess } = useAuth();
|
const { SadminuserAccess } = useAuth();
|
||||||
let SAAccessCommonMaster = SadminuserAccess?.find(
|
let SAAccessCommonMaster = SadminuserAccess?.find(
|
||||||
(e) => e?.MenuName === 'Payment Options'
|
(e) => e?.MenuName === 'Payment Options'
|
||||||
|
|
@ -1356,6 +1356,7 @@ function PaymentOptions() {
|
||||||
: 'Data Updated Successfully'
|
: 'Data Updated Successfully'
|
||||||
);
|
);
|
||||||
await dispatch(changeSalesPaymentoption(false));
|
await dispatch(changeSalesPaymentoption(false));
|
||||||
|
setModalOpen(false)
|
||||||
// ✅ Call the function here to update global state
|
// ✅ Call the function here to update global state
|
||||||
try {
|
try {
|
||||||
await fetchAndSetPaymentOptions(dispatch, {
|
await fetchAndSetPaymentOptions(dispatch, {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue