IO-2203 Resolve RO staying after payment modal close.
This commit is contained in:
@@ -7,14 +7,14 @@ import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import {
|
||||
INSERT_NEW_PAYMENT,
|
||||
UPDATE_PAYMENT
|
||||
UPDATE_PAYMENT,
|
||||
} from "../../graphql/payments.queries";
|
||||
import { setEmailOptions } from "../../redux/email/email.actions";
|
||||
import { toggleModalVisible } from "../../redux/modals/modals.actions";
|
||||
import { selectPayment } from "../../redux/modals/modals.selectors";
|
||||
import {
|
||||
selectBodyshop,
|
||||
selectCurrentUser
|
||||
selectCurrentUser,
|
||||
} from "../../redux/user/user.selectors";
|
||||
import { GenerateDocument } from "../../utils/RenderTemplate";
|
||||
import { TemplateList } from "../../utils/TemplateConstants";
|
||||
@@ -124,7 +124,11 @@ function PaymentModalContainer({
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (visible) form.resetFields();
|
||||
if (visible) {
|
||||
form.resetFields();
|
||||
form.resetFields();
|
||||
form.setFieldsValue(context);
|
||||
}
|
||||
}, [visible, form, context]);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -139,6 +143,7 @@ function PaymentModalContainer({
|
||||
: t("payments.labels.edit")
|
||||
}
|
||||
visible={visible}
|
||||
destroyOnClose
|
||||
okText={t("general.actions.save")}
|
||||
onOk={() => form.submit()}
|
||||
width="50%"
|
||||
|
||||
Reference in New Issue
Block a user