50 lines
1.2 KiB
JavaScript
50 lines
1.2 KiB
JavaScript
export default OakComponent({
|
|
entity: 'pay',
|
|
isList: false,
|
|
projection: {
|
|
id: 1,
|
|
applicationId: 1,
|
|
price: 1,
|
|
meta: 1,
|
|
iState: 1,
|
|
channel: 1,
|
|
paid: 1,
|
|
refunded: 1,
|
|
timeoutAt: 1,
|
|
forbidRefundAt: 1,
|
|
externalId: 1,
|
|
orderId: 1,
|
|
accountId: 1,
|
|
account: {
|
|
id: 1,
|
|
entityId: 1,
|
|
entity: 1,
|
|
},
|
|
order: {
|
|
id: 1,
|
|
creatorId: 1,
|
|
}
|
|
},
|
|
properties: {
|
|
onClose: () => undefined,
|
|
},
|
|
formData({ data }) {
|
|
const application = this.features.application.getApplication();
|
|
const iState = data?.iState;
|
|
const iStateColor = iState && this.features.style.getColor('pay', 'iState', iState);
|
|
const payConfig = this.features.pay.getPayConfigs();
|
|
return {
|
|
pay: data,
|
|
application,
|
|
iStateColor,
|
|
payConfig,
|
|
closable: !!(data?.["#oakLegalActions"]?.includes('close')),
|
|
};
|
|
},
|
|
features: ['application'],
|
|
actions: ['close', 'startPaying', {
|
|
action: 'update',
|
|
attrs: ['meta'],
|
|
}]
|
|
});
|