diff --git a/authz/authz.go b/authz/authz.go index a414e5ae..5ee72f41 100644 --- a/authz/authz.go +++ b/authz/authz.go @@ -89,6 +89,8 @@ p, *, *, GET, /api/get-resources, *, * p, *, *, GET, /api/get-product, *, * p, *, *, POST, /api/buy-product, *, * p, *, *, GET, /api/get-payment, *, * +p, *, *, POST, /api/update-payment, *, * +p, *, *, POST, /api/invoice-payment, *, * p, *, *, GET, /api/get-providers, *, * p, *, *, POST, /api/unlink, *, * p, *, *, POST, /api/set-password, *, * diff --git a/object/payment.go b/object/payment.go index b6cf006a..167382e1 100644 --- a/object/payment.go +++ b/object/payment.go @@ -53,7 +53,7 @@ type Payment struct { InvoiceTitle string `xorm:"varchar(100)" json:"invoiceTitle"` InvoiceTaxId string `xorm:"varchar(100)" json:"invoiceTaxId"` InvoiceRemark string `xorm:"varchar(100)" json:"invoiceRemark"` - InvoiceUrl string `xorm:"varchar(100)" json:"invoiceUrl"` + InvoiceUrl string `xorm:"varchar(255)" json:"invoiceUrl"` } func GetPaymentCount(owner, field, value string) int { diff --git a/web/src/PaymentEditPage.js b/web/src/PaymentEditPage.js index 1d30892b..b8d2103c 100644 --- a/web/src/PaymentEditPage.js +++ b/web/src/PaymentEditPage.js @@ -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 { }} /> - + {Setting.getLabel(i18next.t("payment:Invoice actions"), i18next.t("payment:Invoice actions - Tooltip"))} : @@ -371,6 +373,7 @@ class PaymentEditPage extends React.Component { ) } + diff --git a/web/src/Setting.js b/web/src/Setting.js index 74f92f7e..3e5bdf59 100644 --- a/web/src/Setting.js +++ b/web/src/Setting.js @@ -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":