Compare commits

...

2 Commits

Author SHA1 Message Date
Yang Luo
d43d58dee2 feat: fix getProviders() owner bug in product edit page 2024-05-01 18:04:50 +08:00
Yang Luo
9eb4b12041 fix: rename to countryCodes for UI 2024-05-01 11:44:21 +08:00
2 changed files with 6 additions and 6 deletions

View File

@@ -41,7 +41,7 @@ class ProductEditPage extends React.Component {
UNSAFE_componentWillMount() {
this.getProduct();
this.getOrganizations();
this.getPaymentProviders();
this.getPaymentProviders(this.state.organizationName);
}
getProduct() {
@@ -67,8 +67,8 @@ class ProductEditPage extends React.Component {
});
}
getPaymentProviders() {
ProviderBackend.getProviders(this.props.account.owner)
getPaymentProviders(organizationName) {
ProviderBackend.getProviders(organizationName)
.then((res) => {
if (res.status === "ok") {
this.setState({

View File

@@ -116,8 +116,8 @@ class ProviderTable extends React.Component {
},
{
title: i18next.t("user:Country/Region"),
dataIndex: "countryCode",
key: "countryCode",
dataIndex: "countryCodes",
key: "countryCodes",
width: "140px",
render: (text, record, index) => {
if (record.provider?.category !== "SMS") {
@@ -131,7 +131,7 @@ class ProviderTable extends React.Component {
mode={"multiple"}
initValue={text ? text : ["All"]}
onChange={(value) => {
this.updateField(table, index, "countryCode", value);
this.updateField(table, index, "countryCodes", value);
}}
countryCodes={this.getUserOrganization()?.countryCodes}
/>