oak-pay-business/lib/components/offlineAccount/config/index.js

52 lines
1.3 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = OakComponent({
entity: 'offlineAccount',
isList: true,
projection: {
id: 1,
type: 1,
channel: 1,
name: 1,
qrCode: 1,
allowDeposit: 1,
allowPay: 1,
systemId: 1,
price: 1,
enabled: 1,
taxLossRatio: 1,
refundCompensateRatio: 1,
refundGapDays: 1,
allowWithdrawTransfer: 1,
withdrawTransferLossRatio: 1,
},
properties: {
systemId: '',
},
filters: [
{
filter() {
const { systemId } = this.props;
return {
systemId,
};
}
}
],
formData({ data, legalActions }) {
return {
accounts: data.map((ele) => {
const { type } = ele;
const color = this.features.style.getColor('offlineAccount', 'type', type);
return {
color,
...ele,
};
}),
canCreate: legalActions?.includes('create'),
oakExecutable: this.tryExecute(),
};
},
actions: ['create', 'update', 'remove'],
});