diff --git a/web/ASC.Web.Client/src/components/pages/Payments/index.js b/web/ASC.Web.Client/src/components/pages/Payments/index.js
index 2734cf20e8..c2b80630db 100644
--- a/web/ASC.Web.Client/src/components/pages/Payments/index.js
+++ b/web/ASC.Web.Client/src/components/pages/Payments/index.js
@@ -6,14 +6,14 @@ import PaymentsEnterprise from "../PaymentsEnterprise";
import PaymentsSaaS from "../PaymentsSaaS";
class Payments extends React.Component {
render() {
- const { standAloneMode } = this.props;
- return standAloneMode ? : ;
+ const { standaloneMode } = this.props;
+ return standaloneMode ? : ;
}
}
function mapStateToProps(state) {
return {
- standAloneMode: state.payments.standAloneMode,
+ standaloneMode: state.payments.standaloneMode,
};
}
diff --git a/web/ASC.Web.Client/src/components/pages/PaymentsEnterprise/index.js b/web/ASC.Web.Client/src/components/pages/PaymentsEnterprise/index.js
index e8cd167d7a..769035d4ff 100644
--- a/web/ASC.Web.Client/src/components/pages/PaymentsEnterprise/index.js
+++ b/web/ASC.Web.Client/src/components/pages/PaymentsEnterprise/index.js
@@ -1,5 +1,5 @@
import React from "react";
-import { PageLayout, utils } from "asc-web-common";
+import { PageLayout, utils, store } from "asc-web-common";
import { Loader, utils as Utils } from "asc-web-components";
import styled from "styled-components";
import { withRouter } from "react-router";
@@ -13,12 +13,14 @@ import ContactContainer from "./sub-components/contact-container";
import ModalDialogContainer from "./sub-components/modal-dialog-container";
import { setLicense } from "../../../store/payments/actions";
import { createI18N } from "../../../helpers/i18n";
+import moment from "moment";
+import isEmpty from "lodash/isEmpty";
const i18n = createI18N({
page: "PaymentsEnterprise",
localesPath: "pages/PaymentsEnterprise",
});
-
+const { setCurrentProductId } = store.auth.actions;
const { changeLanguage } = utils;
const { tablet, mobile } = Utils.device;
@@ -47,7 +49,18 @@ class Body extends React.PureComponent {
visibleModalDialog: false,
};
- document.title = `${t("Payments")}`;
+ document.title = `${t("Payments")} – ${t("OrganizationName")}`;
+ }
+
+ componentDidMount() {
+ this.props.currentProductId !== "payments" &&
+ this.props.setCurrentProductId("payments");
+ }
+
+ componentDidUpdate(prevProps) {
+ if (this.props.currentProductId !== prevProps.currentProductId) {
+ this.fetchData(this.props.currentProductId);
+ }
}
onButtonClickUpload = (file) => {
@@ -82,7 +95,6 @@ class Body extends React.PureComponent {
t,
createPortals,
} = this.props;
-
const { hasErrorLicense, errorMessage, visibleModalDialog } = this.state;
return !isLoaded ? (
@@ -141,4 +153,5 @@ function mapStateToProps(state) {
}
export default connect(mapStateToProps, {
setLicense,
+ setCurrentProductId,
})(withRouter(PaymentsEnterprise));
diff --git a/web/ASC.Web.Client/src/components/pages/PaymentsEnterprise/locales/en/translation.json b/web/ASC.Web.Client/src/components/pages/PaymentsEnterprise/locales/en/translation.json
index bd3790cc5f..e8084d3c38 100644
--- a/web/ASC.Web.Client/src/components/pages/PaymentsEnterprise/locales/en/translation.json
+++ b/web/ASC.Web.Client/src/components/pages/PaymentsEnterprise/locales/en/translation.json
@@ -14,5 +14,6 @@
"Payments": "Payments",
"LoadingError": "Loading error",
"LicenseError": "Licence is not valid. Make sure you choose the right file",
- "createdPortals": "Number of portals you've created"
+ "createdPortals": "Number of portals you've created",
+ "OrganizationName": "ONLYOFFICE"
}
diff --git a/web/ASC.Web.Client/src/components/pages/PaymentsEnterprise/locales/ru/translation.json b/web/ASC.Web.Client/src/components/pages/PaymentsEnterprise/locales/ru/translation.json
index 7b0e6d369f..54066506d6 100644
--- a/web/ASC.Web.Client/src/components/pages/PaymentsEnterprise/locales/ru/translation.json
+++ b/web/ASC.Web.Client/src/components/pages/PaymentsEnterprise/locales/ru/translation.json
@@ -14,5 +14,6 @@
"Payments": "Платежи",
"LoadingError": "Ошибка загрузки",
"LicenseError": "Лицензия не действительна. Убедитесь что вы выбрали верный файл",
- "createdPortals": " Порталы, созданные вами:"
+ "createdPortals": " Порталы, созданные вами:",
+ "OrganizationName": "ONLYOFFICE"
}