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:
karthikalakshmi 2026-02-03 15:49:50 +05:30
commit 0ae065ad57
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,6 @@ import { useState } from 'react';
import { IoMdAdd, IoMdSettings } from 'react-icons/io'; import { IoMdAdd, IoMdSettings } from 'react-icons/io';
import { DefaultModal } from '../../../../Components/Modal/DefaultModal'; import { DefaultModal } from '../../../../Components/Modal/DefaultModal';
import TooltipWrapper from '../../../../Components/Tooltip/Tooltip'; import TooltipWrapper from '../../../../Components/Tooltip/Tooltip';
import './AllSalesPageSettings.scss'; import './AllSalesPageSettings.scss';
import TableHeadersetting from './TableHeadersetting'; import TableHeadersetting from './TableHeadersetting';
import PaymentOptions from '../../../Payment/PaymentOptions/PaymentOptions'; import PaymentOptions from '../../../Payment/PaymentOptions/PaymentOptions';
@ -62,7 +61,7 @@ const AllSalesPageSettings = () => {
<div className="SettingsComponentDiv"> <div className="SettingsComponentDiv">
{selectedComponent == 'Payment' && ( {selectedComponent == 'Payment' && (
<div> <div>
<PaymentOptions /> <PaymentOptions setModalOpen={setsettingModal}/>
</div> </div>
)} )}

View File

@ -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, {