oak-pay-business/es/components/offlineAccount/upsert/index.js

35 lines
726 B
JavaScript

export default OakComponent({
entity: 'offlineAccount',
projection: {
id: 1,
type: 1,
channel: 1,
name: 1,
qrCode: 1,
allowDeposit: 1,
allowPay: 1,
systemId: 1,
enabled: 1,
depositLossRatio: 1,
taxlossRatio: 1,
},
isList: false,
formData({ data }) {
return {
offlineAccount: data,
};
},
lifetimes: {
ready() {
if (this.isCreation()) {
this.update({
allowDeposit: false,
allowPay: false,
price: 0,
enabled: true,
});
}
}
}
});