|
1 | | -import React from 'react'; |
2 | | -import ReactDOM from 'react-dom'; |
3 | | -import '@atlaskit/css-reset'; |
| 1 | +import React from "react"; |
| 2 | +import ReactDOM from "react-dom"; |
| 3 | +import "@atlaskit/css-reset"; |
4 | 4 |
|
5 | | -import initialData from './data/2017.json'; |
6 | | -import accounts from './data/accounts.json'; |
7 | | -import Column from './column'; |
| 5 | +import initialData from "./data/2017.json"; |
| 6 | +import accounts from "./data/accounts.json"; |
| 7 | +import Column from "./column"; |
8 | 8 |
|
9 | 9 | const data = { |
10 | 10 | transactions: initialData, |
11 | | - accounts: accounts |
12 | | -} |
| 11 | + accounts: accounts, |
| 12 | +}; |
| 13 | + |
| 14 | +const HomeBank = () => <a href="https://homebank.ro">homebank.ro</a>; |
13 | 15 |
|
14 | 16 | class App extends React.Component { |
15 | 17 | state = data; |
16 | 18 |
|
17 | 19 | render() { |
18 | 20 | return ( |
19 | 21 | <> |
20 | | - <div className="container-fluid"> |
21 | | - <div className="row my-3"> |
22 | | - <div className="col-md-12"> |
23 | | - <h2>Transactions selector</h2> |
24 | | - </div> |
| 22 | + <div className="container-fluid"> |
| 23 | + <div className="row my-3"> |
| 24 | + <div className="col-md-12"> |
| 25 | + <h2>Assign transactions to accounts</h2> |
| 26 | + <p> |
| 27 | + Simple application to assign transactions exported from ING |
| 28 | + HomeBank to accounts. Used by tools like{" "} |
| 29 | + <a href="https://hledger.org/">hledger</a> from{" "} |
| 30 | + <a href="https://plaintextaccounting.org/"> |
| 31 | + plaintextaccounting.org |
| 32 | + </a> |
| 33 | + </p> |
| 34 | + <h3>Steps to use the application</h3> |
| 35 | + <ul> |
| 36 | + <li> |
| 37 | + Export transactions from <HomeBank />{" "} |
| 38 | + </li> |
| 39 | + <li> |
| 40 | + Export accounts from <strong>ledger/hledger</strong> using |
| 41 | + hledger accounts |
| 42 | + </li> |
| 43 | + <li>Import both accounts and transcations list here</li> |
| 44 | + <li> |
| 45 | + Assign each transaction to an account by dragging it over |
| 46 | + </li> |
| 47 | + <li>Export transactions list</li> |
| 48 | + </ul> |
25 | 49 | </div> |
26 | 50 | </div> |
| 51 | + </div> |
27 | 52 | <div className="container-fluid"> |
28 | 53 | <div className="row"> |
29 | 54 | <div className="col-md-4"> |
30 | | - <textarea className="form-control" rows="5" placeholder="Accounts list:"></textarea> |
| 55 | + <textarea |
| 56 | + className="form-control" |
| 57 | + rows="5" |
| 58 | + placeholder="Accounts list:" |
| 59 | + ></textarea> |
31 | 60 | </div> |
32 | 61 | <div className="col-md-4"> |
33 | | - <button type="button" className="btn btn-outline-primary btn-block mb-2">Update Accounts list</button> |
| 62 | + <button |
| 63 | + type="button" |
| 64 | + className="btn btn-outline-primary btn-block mb-2" |
| 65 | + > |
| 66 | + Update Accounts list |
| 67 | + </button> |
34 | 68 | <div className="input-group my-2"> |
35 | 69 | <div className="input-group-prepend"> |
36 | | - <button className="btn btn-outline-primary" type="button" id="inputGroupFileAddon03">Import transactions</button> |
| 70 | + <button |
| 71 | + className="btn btn-outline-primary" |
| 72 | + type="button" |
| 73 | + id="inputGroupFileAddon03" |
| 74 | + > |
| 75 | + Import transactions |
| 76 | + </button> |
37 | 77 | </div> |
38 | 78 | <div className="custom-file"> |
39 | | - <input type="file" className="custom-file-input" id="inputGroupFile03" ariaDescribedby="inputGroupFileAddon03" /> |
40 | | - <label className="custom-file-label" for="inputGroupFile03">*.csv/Excell file...</label> |
| 79 | + <input |
| 80 | + type="file" |
| 81 | + className="custom-file-input" |
| 82 | + id="inputGroupFile03" |
| 83 | + aria-describedby="inputGroupFileAddon03" |
| 84 | + /> |
| 85 | + <label className="custom-file-label" htmlFor="inputGroupFile03"> |
| 86 | + *.csv export from{" "} |
| 87 | + <a href="https://homebank.ro">homebank.ro</a> |
| 88 | + </label> |
41 | 89 | </div> |
42 | 90 | </div> |
43 | | - <button type="button" className="btn btn-outline-primary btn-block mt-2">Export data</button> |
| 91 | + <button |
| 92 | + type="button" |
| 93 | + className="btn btn-outline-primary btn-block mt-2" |
| 94 | + > |
| 95 | + Export data |
| 96 | + </button> |
44 | 97 | </div> |
45 | 98 | <div className="col-md-4"></div> |
46 | 99 |
|
47 | 100 | <div className="col-md-4"> |
48 | | - <Column key="accounts-column" title="Accounts" accounts={this.state.accounts} /> |
| 101 | + <Column |
| 102 | + key="accounts-column" |
| 103 | + title="Accounts" |
| 104 | + accounts={this.state.accounts} |
| 105 | + /> |
49 | 106 | </div> |
50 | 107 | <div className="col-md-4"> |
51 | 108 | <Column title="Assigned transactions" /> |
52 | 109 | </div> |
53 | 110 | <div className="col-md-4"> |
54 | | - <Column key="transactions-column" title="Transactions" transactions={this.state.transactions} /> |
| 111 | + <Column |
| 112 | + key="transactions-column" |
| 113 | + title="Transactions" |
| 114 | + transactions={this.state.transactions} |
| 115 | + /> |
55 | 116 | </div> |
56 | 117 | </div> |
57 | 118 | </div> |
58 | 119 | </> |
59 | | - ) |
| 120 | + ); |
60 | 121 | } |
61 | 122 | } |
62 | 123 |
|
63 | | -ReactDOM.render( |
64 | | - <App />, |
65 | | - document.getElementById('root') |
66 | | -); |
| 124 | +ReactDOM.render(<App />, document.getElementById("root")); |
0 commit comments