2018-02-24 18:15:42 +09:00
|
|
|
import React from 'react';
|
|
|
|
import { registerComponent, Components } from 'meteor/vulcan:lib';
|
|
|
|
|
|
|
|
// import { Link } from 'react-router';
|
|
|
|
// const AssociatedDocument = ({ document }) => {
|
|
|
|
// <Link to={document.pageUrl}>{document._id}</Link>
|
|
|
|
// }
|
|
|
|
|
2018-02-24 18:26:56 +09:00
|
|
|
const StripeId = ({ document }) =>
|
|
|
|
<a href={document.stripeChargeUrl} target="_blank">{document.stripeId}</a>
|
|
|
|
|
2018-02-24 18:15:42 +09:00
|
|
|
const ChargesDashboard = props =>
|
|
|
|
<div className="charges">
|
|
|
|
<Components.Datatable
|
|
|
|
showSearch={false}
|
|
|
|
showEdit={false}
|
|
|
|
collectionName="Charges"
|
|
|
|
options={{
|
|
|
|
fragmentName: 'ChargeFragment'
|
|
|
|
}}
|
|
|
|
columns={[
|
2018-02-24 18:26:56 +09:00
|
|
|
'createdAtFormattedShort',
|
2018-02-24 18:15:42 +09:00
|
|
|
'user',
|
|
|
|
'type',
|
|
|
|
'source',
|
|
|
|
'productKey',
|
|
|
|
'test',
|
|
|
|
'properties',
|
2018-02-24 18:26:56 +09:00
|
|
|
{
|
|
|
|
name: 'stripeId',
|
|
|
|
component: StripeId
|
|
|
|
},
|
2018-02-24 18:15:42 +09:00
|
|
|
]}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
registerComponent('ChargesDashboard', ChargesDashboard);
|