IO-2203 Resolve RO staying after payment modal close.
This commit is contained in:
@@ -4,7 +4,7 @@ import moment from "moment";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { DateFormatter } from "../../utils/DateFormatter";
|
||||
import ContractLicenseDecodeButton from "../contract-license-decode-button/contract-license-decode-button.component";
|
||||
//import ContractLicenseDecodeButton from "../contract-license-decode-button/contract-license-decode-button.component";
|
||||
import ContractStatusSelector from "../contract-status-select/contract-status-select.component";
|
||||
import ContractsRatesChangeButton from "../contracts-rates-change-button/contracts-rates-change-button.component";
|
||||
import CourtesyCarFuelSlider from "../courtesy-car-fuel-select/courtesy-car-fuel-select.component";
|
||||
|
||||
@@ -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%"
|
||||
|
||||
@@ -193,9 +193,8 @@ export function Manage({ match, conflict, bodyshop }) {
|
||||
<Suspense
|
||||
fallback={<LoadingSpinner message={t("general.labels.loadingapp")} />}
|
||||
>
|
||||
|
||||
<PaymentModalContainer />
|
||||
|
||||
<PaymentModalContainer />
|
||||
|
||||
<BreadCrumbs />
|
||||
<BillEnterModalContainer />
|
||||
<JobCostingModal />
|
||||
|
||||
Reference in New Issue
Block a user