Fix payment owner issue

This commit is contained in:
Yang Luo
2023-06-12 00:31:49 +08:00
parent 2d04731622
commit 3c30222fce
6 changed files with 14 additions and 12 deletions

View File

@ -27,7 +27,7 @@ class PaymentListPage extends BaseListPage {
newPayment() {
const randomName = Setting.getRandomName();
return {
owner: this.props.account.owner,
owner: "admin",
name: `payment_${randomName}`,
createdTime: moment().format(),
displayName: `New Payment - ${randomName}`,
@ -265,7 +265,7 @@ class PaymentListPage extends BaseListPage {
value = params.type;
}
this.setState({loading: true});
PaymentBackend.getPayments(Setting.isAdminUser(this.props.account) ? "" : this.props.account.owner, params.pagination.current, params.pagination.pageSize, field, value, sortField, sortOrder)
PaymentBackend.getPayments("admin", Setting.isAdminUser(this.props.account) ? "" : this.props.account.owner, params.pagination.current, params.pagination.pageSize, field, value, sortField, sortOrder)
.then((res) => {
this.setState({
loading: false,