fix transaction
This commit is contained in:
parent
e8945f7608
commit
b5afc1b120
|
@ -53,6 +53,7 @@ export default class WalletComponent extends React.Component {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.props.appstate.transaction.getAll();
|
||||
this.purchasedItemStore.getAll().then(res => {
|
||||
console.log(res, 'ini purchased items')
|
||||
})
|
||||
|
@ -74,38 +75,39 @@ export default class WalletComponent extends React.Component {
|
|||
const voucher = <NumberFormat value={(this.props.appstate.wallet.data.wallet).toFixed(2)} displayType={'text'} thousandSeparator={true} prefix={'Rp '}/>;
|
||||
const points = <NumberFormat value={this.props.appstate.wallet.data.point} displayType={'text'} thousandSeparator={true}/>;
|
||||
|
||||
const data = [
|
||||
{
|
||||
id: faker.random.uuid(),
|
||||
created_at: faker.date.past(),
|
||||
type: 'Points',
|
||||
amount: faker.commerce.price()
|
||||
},
|
||||
{
|
||||
id: faker.random.uuid(),
|
||||
created_at: faker.date.past(),
|
||||
type: 'Points',
|
||||
amount: faker.commerce.price()
|
||||
},
|
||||
{
|
||||
id: faker.random.uuid(),
|
||||
created_at: faker.date.past(),
|
||||
type: 'Voucher',
|
||||
amount: faker.commerce.price()
|
||||
},
|
||||
{
|
||||
id: faker.random.uuid(),
|
||||
created_at: faker.date.past(),
|
||||
type: 'Voucher',
|
||||
amount: faker.commerce.price()
|
||||
},
|
||||
{
|
||||
id: faker.random.uuid(),
|
||||
created_at: faker.date.past(),
|
||||
type: 'Points',
|
||||
amount: faker.commerce.price()
|
||||
},
|
||||
];
|
||||
// const data = [
|
||||
// {
|
||||
// id: faker.random.uuid(),
|
||||
// created_at: faker.date.past(),
|
||||
// type: 'Points',
|
||||
// amount: faker.commerce.price()
|
||||
// },
|
||||
// {
|
||||
// id: faker.random.uuid(),
|
||||
// created_at: faker.date.past(),
|
||||
// type: 'Points',
|
||||
// amount: faker.commerce.price()
|
||||
// },
|
||||
// {
|
||||
// id: faker.random.uuid(),
|
||||
// created_at: faker.date.past(),
|
||||
// type: 'Voucher',
|
||||
// amount: faker.commerce.price()
|
||||
// },
|
||||
// {
|
||||
// id: faker.random.uuid(),
|
||||
// created_at: faker.date.past(),
|
||||
// type: 'Voucher',
|
||||
// amount: faker.commerce.price()
|
||||
// },
|
||||
// {
|
||||
// id: faker.random.uuid(),
|
||||
// created_at: faker.date.past(),
|
||||
// type: 'Points',
|
||||
// amount: faker.commerce.price()
|
||||
// },
|
||||
// ];
|
||||
const data = this.props.appstate.transaction.list;
|
||||
|
||||
const columns = [{
|
||||
title: 'Id',
|
||||
|
|
|
@ -111,7 +111,7 @@ export default class Transaction {
|
|||
@action
|
||||
getAll() {
|
||||
this.isLoading = true;
|
||||
return this.http.get("transaction")
|
||||
return this.http.get("transactions")
|
||||
.then(res => {
|
||||
this.list = res;
|
||||
this.isLoading = false;
|
||||
|
|
Loading…
Reference in New Issue
Block a user