From e5c1f560c52a4c191328feac5f2f0c8bdab85f1b Mon Sep 17 00:00:00 2001 From: Gucheng Wang Date: Tue, 26 Apr 2022 23:56:41 +0800 Subject: [PATCH] Fix bug in payment. --- main.go | 2 +- web/src/PaymentEditPage.js | 18 +++++++++--------- web/src/Setting.js | 8 ++++++++ 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/main.go b/main.go index 939e60cc..c6a81ba3 100644 --- a/main.go +++ b/main.go @@ -31,7 +31,7 @@ import ( ) func main() { - createDatabase := flag.Bool("createDatabase", false, "true if you need casdoor to create database") + createDatabase := flag.Bool("createDatabase", false, "true if you need Casdoor to create database") flag.Parse() object.InitAdapter(*createDatabase) diff --git a/web/src/PaymentEditPage.js b/web/src/PaymentEditPage.js index 104280a4..cda0cc73 100644 --- a/web/src/PaymentEditPage.js +++ b/web/src/PaymentEditPage.js @@ -65,12 +65,6 @@ class PaymentEditPage extends React.Component { } issueInvoice() { - const errorText = this.checkError(); - if (errorText !== "") { - Setting.showMessage("error", errorText); - return; - } - alert("111") } @@ -80,7 +74,7 @@ class PaymentEditPage extends React.Component { renderModal() { const ths = this; - const handleChangeMyTag = () => { + const handleIssueInvoice = () => { ths.issueInvoice(); }; @@ -98,7 +92,7 @@ class PaymentEditPage extends React.Component { } visible={this.state.isModalVisible} - onOk={handleChangeMyTag} + onOk={handleIssueInvoice} onCancel={handleCancel} okText={i18next.t("payment:Issue Invoice")} cancelText={i18next.t("general:Cancel")}> @@ -346,6 +340,12 @@ class PaymentEditPage extends React.Component { { this.state.payment.invoiceUrl === "" ? (