Scroll to payment page bottom.

This commit is contained in:
Gucheng Wang
2022-04-27 01:06:54 +08:00
parent ea005aaf4d
commit 5597f99e3c
4 changed files with 16 additions and 2 deletions

View File

@ -44,6 +44,8 @@ class PaymentEditPage extends React.Component {
this.setState({
payment: payment,
});
Setting.scrollToDiv("invoice-area");
});
}
@ -349,7 +351,7 @@ class PaymentEditPage extends React.Component {
}} />
</Col>
</Row>
<Row style={{marginTop: '20px'}} >
<Row id={"invoice-area"} style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("payment:Invoice actions"), i18next.t("payment:Invoice actions - Tooltip"))} :
</Col>
@ -371,6 +373,7 @@ class PaymentEditPage extends React.Component {
<Button type={"primary"} onClick={() => this.downloadInvoice(false)}>{i18next.t("payment:Download Invoice")}</Button>
)
}
<Button style={{marginLeft: "20px"}} onClick={() => Setting.goToLink(this.state.payment.returnUrl)}>{i18next.t("payment:Return to Website")}</Button>
</Col>
</Row>
</Card>

View File

@ -795,6 +795,15 @@ export function getFromLink() {
return from;
}
export function scrollToDiv(divId) {
if (divId) {
let ele = document.getElementById(divId);
if (ele) {
ele.scrollIntoView({behavior: "smooth"});
}
}
}
export function getSyncerTableColumns(syncer) {
switch (syncer.type) {
case "Keycloak":