diff --git a/src/common/pages/Wallet/index.js b/src/common/pages/Wallet/index.js index edcff39..99d3b7b 100644 --- a/src/common/pages/Wallet/index.js +++ b/src/common/pages/Wallet/index.js @@ -20,11 +20,9 @@ import { } from 'material-ui'; import {Table as TableAntd} from 'antd'; import {startCase} from 'lodash'; -import {LINKS} from "../../routes"; import {Link} from 'react-router-dom'; import SearchIcon from 'material-ui/svg-icons/action/search'; import UnarchiveIcon from 'material-ui/svg-icons/content/unarchive'; -import ArchiveIcon from 'material-ui/svg-icons/content/archive'; import DC from 'decimal.js-light'; import NumberFormat from 'react-number-format'; import MoreIcon from 'material-ui/svg-icons/navigation/more-vert'; @@ -32,7 +30,7 @@ import LoadingDialog from "../LoadingDialog"; import Loader from 'react-loader-advanced'; import './style.scss'; import {DIALOG} from "../../stores/global_ui"; -import EmptyComponent from '../EmptyComponent'; +import faker from 'faker'; @inject('appstate') @observer @@ -49,11 +47,6 @@ export default class WalletComponent extends React.Component { }; this.defaultState = Object.assign({}, this.state); this.http = props.appstate.http; - this.authStore = props.appstate.auth; - this.globalUI = props.appstate.globalUI; - this.transactionStore = props.appstate.transaction; - this.bankStore = props.appstate.bank; - this.userData = props.appstate.userData; } componentDidMount() { @@ -67,48 +60,42 @@ export default class WalletComponent extends React.Component { // this.authStore.getWallet(); } - handleUpdateInput = (searchText) => { - this.setState({ - searchText: searchText, - }); - }; - - handleNewRequest = () => { - this.setState({ - searchText: '', - }); - }; - - tabsHandleChange = (value) => { - this.setState({ - slideIndex: value, - }); - }; - - search = (event)=>{ - if(event.target.value.length == 0){ - this.transactionStore.isSearching = false; - } - else{ - this.transactionStore.isSearching = true; - this.transactionStore.search(event.target.value); - } - }; - - handleChangeSorter = (pagination, filters, sorter) => { - // console.log('Various parameters', pagination, filters, sorter); - this.setState({ - filteredInfo: filters, - sortedInfo: sorter, - }); - }; - - handleChange = (event, index, value) => this.setState({value}); - render() { const voucher = ; const points = ; + 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 columns = [{ title: 'Id', @@ -133,25 +120,26 @@ export default class WalletComponent extends React.Component { dataIndex: 'type', key: 'type', className: 'recentOrder-noOrder', - render: (text) => {text.name} - }, - - { - title: 'Status', - dataIndex: 'status', - key: 'status', - className: 'recentOrder-status', - render: (text) =>
{text === 'created' ? 'Waiting Approval' : startCase(text)}
+ render: (text) => {text} }, + // { + // title: 'Status', + // dataIndex: 'status', + // key: 'status', + // className: 'recentOrder-status', + // render: (text) =>
{text === 'created' ? 'Waiting Approval' : startCase(text)}
+ // }, { title: 'Amount', dataIndex: 'amount', key: 'amount', className: 'recentOrder-customer bolder green', render: (text) => { - return + return + + } @@ -165,30 +153,18 @@ export default class WalletComponent extends React.Component {

Wallet

- { - (this.transactionStore.saldo.length === 2) ? -
-
- - - -
-
- - - -
-
- : -
- - - - - - -
- } +
+
+ + + +
+
+ + + +
+
@@ -196,7 +172,7 @@ export default class WalletComponent extends React.Component {
- } + } messageStyle={{textAlign: 'center'}} backgroundStyle={{backgroundColor: 'rgba(255,255,255,0.5)'}}> {` // return { diff --git a/src/common/pages/Wallet/style.scss b/src/common/pages/Wallet/style.scss index 0cdb30e..ed361e0 100644 --- a/src/common/pages/Wallet/style.scss +++ b/src/common/pages/Wallet/style.scss @@ -1,5 +1,10 @@ .wallet { margin-top: 35px; + + .tableWallet{ + padding: 15px; + } + .container { padding: 25px;