Merge pull request 'FIX #65 : payment-option-model-issue' (#66) from payment-option-model-issue into main
Reviewed-on: Pozomind/pozo-retail-app#66
This commit is contained in:
commit
0ae065ad57
|
|
@ -2,7 +2,6 @@ import { useState } from 'react';
|
|||
import { IoMdAdd, IoMdSettings } from 'react-icons/io';
|
||||
import { DefaultModal } from '../../../../Components/Modal/DefaultModal';
|
||||
import TooltipWrapper from '../../../../Components/Tooltip/Tooltip';
|
||||
|
||||
import './AllSalesPageSettings.scss';
|
||||
import TableHeadersetting from './TableHeadersetting';
|
||||
import PaymentOptions from '../../../Payment/PaymentOptions/PaymentOptions';
|
||||
|
|
@ -62,7 +61,7 @@ const AllSalesPageSettings = () => {
|
|||
<div className="SettingsComponentDiv">
|
||||
{selectedComponent == 'Payment' && (
|
||||
<div>
|
||||
<PaymentOptions />
|
||||
<PaymentOptions setModalOpen={setsettingModal}/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
|
|
|||
|
|
@ -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