monopyly 1.5.1__py3-none-any.whl → 1.6.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. monopyly/CHANGELOG.md +27 -0
  2. monopyly/README.md +3 -3
  3. monopyly/__init__.py +22 -27
  4. monopyly/_version.py +2 -2
  5. monopyly/auth/blueprint.py +2 -0
  6. monopyly/auth/routes.py +2 -3
  7. monopyly/banking/accounts.py +7 -7
  8. monopyly/banking/actions.py +20 -17
  9. monopyly/banking/banks.py +1 -1
  10. monopyly/banking/blueprint.py +2 -0
  11. monopyly/banking/filters.py +6 -6
  12. monopyly/banking/forms.py +3 -5
  13. monopyly/banking/routes.py +72 -10
  14. monopyly/banking/transactions.py +15 -7
  15. monopyly/common/forms/__init__.py +8 -0
  16. monopyly/common/forms/_forms.py +1 -2
  17. monopyly/common/forms/fields.py +0 -2
  18. monopyly/common/forms/utils.py +1 -1
  19. monopyly/common/transactions.py +89 -14
  20. monopyly/core/actions.py +2 -8
  21. monopyly/core/blueprint.py +2 -0
  22. monopyly/core/filters.py +0 -2
  23. monopyly/core/routes.py +1 -1
  24. monopyly/credit/accounts.py +1 -1
  25. monopyly/credit/actions.py +4 -5
  26. monopyly/credit/blueprint.py +2 -0
  27. monopyly/credit/cards.py +7 -3
  28. monopyly/credit/forms.py +3 -5
  29. monopyly/credit/routes.py +65 -87
  30. monopyly/credit/statements.py +1 -1
  31. monopyly/credit/transactions/__init__.py +2 -0
  32. monopyly/credit/transactions/_transactions.py +18 -8
  33. monopyly/credit/transactions/activity/__init__.py +6 -0
  34. monopyly/credit/transactions/activity/parser.py +0 -1
  35. monopyly/credit/transactions/activity/reconciliation.py +25 -4
  36. monopyly/database/__init__.py +1 -59
  37. monopyly/database/models.py +198 -276
  38. monopyly/database/preloads.sql +6 -1
  39. monopyly/scripts/screenshot_application.py +100 -0
  40. monopyly/static/chartist-1.5.0.min.js +8 -0
  41. monopyly/static/css/style.css +35 -14
  42. monopyly/static/img/about/bank-account-details.png +0 -0
  43. monopyly/static/img/about/bank-account-summaries.png +0 -0
  44. monopyly/static/img/about/bank-accounts.png +0 -0
  45. monopyly/static/img/about/credit-account-details.png +0 -0
  46. monopyly/static/img/about/credit-statement-details.png +0 -0
  47. monopyly/static/img/about/credit-transactions.png +0 -0
  48. monopyly/static/img/about/homepage-user.png +0 -0
  49. monopyly/static/img/about/homepage.png +0 -0
  50. monopyly/static/jquery-3.7.1.min.js +2 -0
  51. monopyly/static/js/add-transfer.js +8 -9
  52. monopyly/static/js/bind-tag-actions.js +6 -0
  53. monopyly/static/js/create-balance-chart.js +2 -2
  54. monopyly/static/js/create-category-chart.js +1 -1
  55. monopyly/static/js/load-more-transactions.js +27 -0
  56. monopyly/static/js/modules/expand-transaction.js +7 -6
  57. monopyly/static/js/modules/update-display-ajax.js +20 -1
  58. monopyly/static/js/update-transactions-display.js +8 -2
  59. monopyly/templates/banking/account_page.html +15 -16
  60. monopyly/templates/banking/account_summaries.html +2 -2
  61. monopyly/templates/banking/account_summary.html +1 -1
  62. monopyly/templates/banking/accounts_page.html +2 -2
  63. monopyly/templates/banking/transactions_table/table.html +3 -0
  64. monopyly/templates/banking/transactions_table/transactions.html +0 -1
  65. monopyly/templates/common/tag_tree.html +25 -0
  66. monopyly/templates/{credit → common}/tags_page.html +7 -3
  67. monopyly/templates/common/transactions_table/linked_bank_transaction.html +2 -2
  68. monopyly/templates/common/transactions_table/table.html +6 -0
  69. monopyly/templates/common/transactions_table/transactions.html +9 -15
  70. monopyly/templates/core/index.html +112 -101
  71. monopyly/templates/core/profile.html +1 -1
  72. monopyly/templates/credit/statement_page.html +2 -2
  73. monopyly/templates/credit/statement_reconciliation/statement_reconciliation_inquiry.html +1 -1
  74. monopyly/templates/credit/statement_reconciliation/statement_reconciliation_page.html +3 -3
  75. monopyly/templates/credit/statement_summary.html +2 -2
  76. monopyly/templates/credit/transaction_submission_page.html +3 -3
  77. monopyly/templates/credit/transactions_page.html +19 -3
  78. monopyly/templates/credit/transactions_table/condensed_row_content.html +2 -3
  79. monopyly/templates/credit/transactions_table/expanded_row_content.html +5 -5
  80. monopyly/templates/credit/transactions_table/table.html +3 -0
  81. monopyly/templates/credit/transactions_table/transactions.html +0 -1
  82. monopyly/templates/layout.html +9 -4
  83. {monopyly-1.5.1.dist-info → monopyly-1.6.0.dist-info}/METADATA +12 -13
  84. {monopyly-1.5.1.dist-info → monopyly-1.6.0.dist-info}/RECORD +88 -87
  85. monopyly-1.6.0.dist-info/entry_points.txt +3 -0
  86. monopyly/cli/apps.py +0 -108
  87. monopyly/cli/launch.py +0 -135
  88. monopyly/config/__init__.py +0 -1
  89. monopyly/config/default_settings.py +0 -56
  90. monopyly/config/settings.py +0 -59
  91. monopyly/static/jquery-3.7.0.min.js +0 -2
  92. monopyly/templates/credit/tag_tree/subtag_tree.html +0 -22
  93. monopyly/templates/credit/tag_tree/tag_tree.html +0 -13
  94. monopyly-1.5.1.dist-info/entry_points.txt +0 -2
  95. {monopyly-1.5.1.dist-info → monopyly-1.6.0.dist-info}/WHEEL +0 -0
  96. {monopyly-1.5.1.dist-info → monopyly-1.6.0.dist-info}/licenses/COPYING +0 -0
  97. {monopyly-1.5.1.dist-info → monopyly-1.6.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Load more transactions when the plus icon is clicked.
3
+ */
4
+
5
+ import { executeAjaxRequest } from './modules/ajax.js';
6
+
7
+
8
+ (function() {
9
+
10
+ const endpoint = LOAD_TRANSACTIONS_ENDPOINT;
11
+ const rawData = LOAD_TRANSACTIONS_SELECTORS;
12
+
13
+ $("#more-transactions.button").on("click", function() {
14
+ let $button = $(this);
15
+ let $container = $button.closest(".transactions-container");
16
+ let $table = $container.find(".transactions-table");
17
+ rawData["block_count"] += 1;
18
+ executeAjaxRequest(endpoint, rawData, function(response) {
19
+ if (response) {
20
+ $table.append(response);
21
+ } else {
22
+ console.log("no response");
23
+ }
24
+ });
25
+ });
26
+
27
+ })();
@@ -25,8 +25,9 @@ class TransactionToggleManager {
25
25
  */
26
26
  constructor(callback = null) {
27
27
  // Identify the plus/minus icons
28
- this.$iconsMoreInfoButtons = $('.transaction .more.button');
29
- this.$iconsLessInfoButtons = $('.transaction .less.button');
28
+ this.$table = $('.transactions-table');
29
+ this.iconsMoreInfoSelector = '.transaction .more.button';
30
+ this.iconsLessInfoSelector = '.transaction .less.button';
30
31
  this.#registerClickExpand(callback);
31
32
  this.#registerClickCollapse();
32
33
  }
@@ -37,8 +38,8 @@ class TransactionToggleManager {
37
38
 
38
39
  #registerClickExpand(callback) {
39
40
  const self = this;
40
- this.$iconsMoreInfoButtons.on('click', function(event) {
41
- const $transaction = self.getButtonTransaction(this);
41
+ self.$table.on('click', self.iConsMoreInfoSelector, function(event) {
42
+ const $transaction = self.getButtonTransaction(event.target);
42
43
  const toggler = new TransactionToggler($transaction);
43
44
  toggler.expand(callback);
44
45
  // Do not propagate any additional events up the DOM tree
@@ -49,8 +50,8 @@ class TransactionToggleManager {
49
50
 
50
51
  #registerClickCollapse() {
51
52
  const self = this;
52
- this.$iconsLessInfoButtons.on('click', function(event) {
53
- const $transaction = self.getButtonTransaction(this);
53
+ self.$table.on('click', self.iconsLessInfoSelector, function(event) {
54
+ const $transaction = self.getButtonTransaction(event.target);
54
55
  const toggler = new TransactionToggler($transaction);
55
56
  toggler.collapse();
56
57
  // Do not propagate any additional events up the DOM tree
@@ -30,4 +30,23 @@ function replaceDisplayContentsAjaxRequest(
30
30
  }
31
31
 
32
32
 
33
- export { replaceDisplayContentsAjaxRequest };
33
+ function replaceDisplayElementAjaxRequest(
34
+ endpoint, rawData, $display, callback = null
35
+ ) {
36
+
37
+ // The action is to replace the display element entirely
38
+ function action(response) {
39
+ $display.replaceWith(response);
40
+ // Execute the callback function, if given
41
+ if (callback != null) {
42
+ callback();
43
+ }
44
+ }
45
+
46
+ // Assign the response to the display object
47
+ executeAjaxRequest(endpoint, rawData, action);
48
+
49
+ }
50
+
51
+
52
+ export { replaceDisplayContentsAjaxRequest, replaceDisplayElementAjaxRequest};
@@ -17,7 +17,7 @@ import {
17
17
  TransactionToggleManager, displaySubtransactions
18
18
  } from './modules/expand-transaction.js';
19
19
  import {
20
- replaceDisplayContentsAjaxRequest
20
+ replaceDisplayElementAjaxRequest
21
21
  } from './modules/update-display-ajax.js';
22
22
 
23
23
 
@@ -27,6 +27,8 @@ import {
27
27
  const $filterContainer = $('#card-filter');
28
28
  // Identify the transactions container
29
29
  const $container = $('.transactions-container');
30
+ // Identify selectors used when loading additional transactions
31
+ const selectors = LOAD_TRANSACTIONS_SELECTORS;
30
32
 
31
33
  // Send the Ajax request on click
32
34
  const $filters = $filterContainer.find('.card');
@@ -58,6 +60,7 @@ import {
58
60
  sortOrder = 'desc';
59
61
  }
60
62
  // Update the table with the filters and ordering
63
+ const $table = $container.find('.transactions-table');
61
64
  const endpoint = FILTER_ENDPOINT;
62
65
  const rawData = {
63
66
  'card_ids': cardIDs,
@@ -67,7 +70,10 @@ import {
67
70
  function callback() {
68
71
  const toggleManager = new TransactionToggleManager(displaySubtransactions)
69
72
  }
70
- replaceDisplayContentsAjaxRequest(endpoint, rawData, $container, callback)
73
+ replaceDisplayElementAjaxRequest(endpoint, rawData, $table, callback)
74
+ // Update the selectors with the new filters and ordering
75
+ selectors["selected_card_ids"] = cardIDs;
76
+ selectors["sort_order"] = sortOrder;
71
77
  }
72
78
 
73
79
  })();
@@ -27,9 +27,14 @@
27
27
  </div>
28
28
 
29
29
  <div id="account-transactions-container" class="transactions-container">
30
- {% with transactions = account_transactions %}
31
- {% include 'banking/transactions_table/transactions.html' %}
32
- {% endwith %}
30
+ {% include 'banking/transactions_table/table.html' %}
31
+
32
+ {% if transactions|length < total_transactions %}
33
+ <div id="more-transactions" class="button">
34
+ <img class="icon" src="{{ url_for('static', filename='img/icons/plus-thick.png') }}">
35
+ <div>Load more transactions</div>
36
+ </div>
37
+ {% endif %}
33
38
  </div>
34
39
 
35
40
  </div>
@@ -59,20 +64,14 @@
59
64
  <script>
60
65
  const EXPAND_TRANSACTION_ENDPOINT = "{{ url_for('banking.expand_transaction') }}";
61
66
  const LINKED_TRANSACTION_ENDPOINT = "{{ url_for('banking.show_linked_transaction') }}";
62
- </script>
63
- <script>
64
- const BALANCE_CHART_DATA = {
65
- series: [
66
- {
67
- name: 'balances',
68
- data: [
69
- {% for x, y in chart_data %}
70
- {x: {{ x }}, y: {{ y }}},
71
- {% endfor %}
72
- ],
73
- },
74
- ],
67
+ const LOAD_TRANSACTIONS_ENDPOINT = "{{ url_for('banking.load_more_transactions') }}";
68
+ const LOAD_TRANSACTIONS_SELECTORS = {
69
+ "account_id": {{ account.id }},
70
+ "block_count": 1
75
71
  };
72
+ const BALANCE_CHART_DATA = {{ chart_data|tojson }};
73
+ </script>
74
+ <script type="module" src="{{ url_for('static', filename='js/load-more-transactions.js') }}">
76
75
  </script>
77
76
  <script type="module" src="{{ url_for('static', filename='js/expand-transaction.js') }}">
78
77
  </script>
@@ -8,7 +8,7 @@
8
8
 
9
9
  <h2 class="stack-title">
10
10
  {{ account_type.type_name }}
11
- {% if accounts|length> 1 %}
11
+ {% if accounts|length > 1 %}
12
12
  <span class="stack-title-info">${{ accounts|sum(attribute='balance')|currency }}</span>
13
13
  {% endif %}
14
14
  </h2>
@@ -19,7 +19,7 @@
19
19
  <a class="account-block button-block" href="{{ url_for('banking.load_account_details', account_id=account.id) }}">
20
20
  <div class="title">
21
21
  <span class="digits">{{ account.last_four_digits }}</span>
22
- <b>{{ account.account_type.type_name }}</b>
22
+ <b>{{ account.account_type_view.type_name }}</b>
23
23
  </div>
24
24
  <div class="balance">${{ account.balance|currency }}</div>
25
25
  </a>
@@ -5,7 +5,7 @@
5
5
  </div>
6
6
 
7
7
  <div class="title">
8
- {{ account.account_type.type_common_name.upper() }}
8
+ {{ account.account_type_view.type_common_name.upper() }}
9
9
  </div>
10
10
 
11
11
  <div class="balance">
@@ -16,7 +16,7 @@
16
16
 
17
17
  <div id="bank-container">
18
18
  {% for bank in banks %}
19
- {% set bank_accounts = bank.bank_accounts %}
19
+ {% set bank_accounts = bank.bank_account_views %}
20
20
  {% if bank_accounts %}
21
21
 
22
22
  <div class="bank-stack group-stack">
@@ -28,7 +28,7 @@
28
28
  <div class="account-block box-row">
29
29
 
30
30
  <div class="account-info">
31
- <span class="digits">{{ account.last_four_digits }}</span> <b>{{ account.account_type.type_name }}</b>
31
+ <span class="digits">{{ account.last_four_digits }}</span> <b>{{ account.account_type_view.type_name }}</b>
32
32
  </div>
33
33
 
34
34
  <div class="expanded">
@@ -0,0 +1,3 @@
1
+ {% set field_title_template = 'banking/transactions_table/transaction_field_titles.html' %}
2
+ {% set transactions_template = 'banking/transactions_table/transactions.html' %}
3
+ {% include 'common/transactions_table/table.html' %}
@@ -1,4 +1,3 @@
1
- {% set field_title_template = 'banking/transactions_table/transaction_field_titles.html' %}
2
1
  {% set condensed_row_content_template = 'banking/transactions_table/condensed_row_content.html' %}
3
2
  {% set expanded_row_content_template = 'banking/transactions_table/expanded_row_content.html' %}
4
3
  {% set update_transaction_function = 'banking.update_transaction' %}
@@ -0,0 +1,25 @@
1
+ {% for tag in tags_hierarchy recursive %}
2
+ <li class="tag-container">
3
+ <div class="tag-area">
4
+ <div class="tag">{{ tag.tag_name }}</div>
5
+ <div class="buttons">
6
+ <img class="new-tag button" src="{{ url_for('static', filename='img/icons/plus-thick.png') }}" />
7
+ {% if tag.user_id != 0 %}
8
+ <a class="action button delete">
9
+ {% endif %}
10
+ </a>
11
+ </div>
12
+ </div>
13
+
14
+ <ul class="tags subtags">
15
+ {{ loop(tags_hierarchy[tag]) }}
16
+ </ul>
17
+
18
+ </li>
19
+
20
+ {% if loop.last %}
21
+ <input class="new-tag" type="text" />
22
+ {% endif %}
23
+ {% else %}
24
+ <input class="new-tag" type="text" />
25
+ {% endfor %}
@@ -20,7 +20,11 @@
20
20
 
21
21
  <div id="tags-container" class="tag-container">
22
22
 
23
- {% include 'credit/tag_tree/tag_tree.html' %}
23
+ <ul class="tags">
24
+ {% include 'common/tag_tree.html' %}
25
+ </ul>
26
+
27
+ <img class="root new-tag button" src="{{ url_for('static', filename='img/icons/plus-thick.png') }}" />
24
28
 
25
29
  </div>
26
30
 
@@ -32,8 +36,8 @@
32
36
  {% block javascript %}
33
37
 
34
38
  <script>
35
- const ADD_TAG_ENDPOINT = "{{ url_for('credit.add_tag') }}";
36
- const REMOVE_TAG_ENDPOINT = "{{ url_for('credit.delete_tag') }}";
39
+ const ADD_TAG_ENDPOINT = "{{ url_for('banking.add_tag') }}";
40
+ const REMOVE_TAG_ENDPOINT = "{{ url_for('banking.delete_tag') }}";
37
41
  </script>
38
42
  <script type="module" src="{{ url_for('static', filename='js/bind-tag-actions.js') }}">
39
43
  </script>
@@ -4,9 +4,9 @@
4
4
 
5
5
  <div class="description-header">
6
6
  <div class="account">
7
- {{ transaction.account.bank.bank_name }} ({{ transaction.account.last_four_digits }})
7
+ {{ transaction.account_view.bank.bank_name }} ({{ transaction.account_view.last_four_digits }})
8
8
  <div class="account-type">
9
- {{ transaction.account.account_type.type_common_name }}
9
+ {{ transaction.account_view.account_type_view.type_common_name }}
10
10
  </div>
11
11
  </div>
12
12
  <div class="total">
@@ -0,0 +1,6 @@
1
+ <div class="transactions-table">
2
+
3
+ {% include field_title_template %}
4
+ {% include transactions_template %}
5
+
6
+ </div>
@@ -1,18 +1,12 @@
1
- <div class="transactions-table">
1
+ {% for transaction in transactions %}
2
2
 
3
- {% include field_title_template %}
3
+ {% if transaction.transaction_date > date_today %}
4
+ {% set future = ' future' %}
5
+ {% endif %}
4
6
 
5
- {% for transaction in transactions %}
7
+ <div id="transaction-{{ transaction.id }}" class="transaction{{ future }} row" data-transaction-id="{{ transaction.id }}">
8
+ {% include 'common/transactions_table/transaction_condensed.html' %}
9
+ {% include 'common/transactions_table/transaction_expanded.html' %}
10
+ </div>
6
11
 
7
- {% if transaction.transaction_date > date_today %}
8
- {% set future = ' future' %}
9
- {% endif %}
10
-
11
- <div id="transaction-{{ transaction.id }}" class="transaction{{ future }} row" data-transaction-id="{{ transaction.id }}">
12
- {% include 'common/transactions_table/transaction_condensed.html' %}
13
- {% include 'common/transactions_table/transaction_expanded.html' %}
14
- </div>
15
-
16
- {% endfor %}
17
-
18
- </div>
12
+ {% endfor %}
@@ -17,134 +17,145 @@
17
17
  {% if g.user %}
18
18
  <div id="homepage-panels">
19
19
 
20
- <div id="banking" class="panel">
21
-
22
- <h2>Bank Accounts</h2>
23
-
24
- <ul class="category">
25
- <h4>Profile</h4>
26
- <li>
27
- <a href="{{ url_for('banking.load_accounts') }}">
28
- Manage accounts
29
- </a>
30
- </li>
31
- <li>
32
- <a href="{{ url_for('banking.add_account') }}">
33
- Add a new account
34
- </a>
35
- </li>
36
- <li>
37
- <a href="{{ url_for('credit.load_tags') }}">
38
- Manage transaction tags
39
- </a>
40
- </li>
41
- </ul>
42
-
43
- <h3>Banks</h3>
44
-
45
- {% for bank in bank_accounts %}
46
- <ul class="category">
20
+ <div class="panel-column">
21
+
22
+ <div id="banking" class="panel">
47
23
 
48
- <h4>{{ bank.bank_name }}</h4>
24
+ <h2>Bank Accounts</h2>
25
+
26
+ <ul class="category">
27
+ <h4>Profile</h4>
49
28
  <li>
50
- <a href="{{ url_for('banking.load_account_summaries', bank_id=bank.id) }}">
51
- See account summaries
29
+ <a href="{{ url_for('banking.load_accounts') }}">
30
+ Manage accounts
52
31
  </a>
53
- <ul>
54
- {% for account in bank_accounts[bank]|sort(attribute='account_type.type_common_name,last_four_digits') %}
55
- <li>
56
- <a href="{{ url_for('banking.load_account_details', account_id=account.id) }}">
57
- {{ account.account_type.type_common_name }} {{ account.last_four_digits }}
58
- </a>
59
- </li>
60
- {% endfor %}
61
- </ul>
62
32
  </li>
63
33
  <li>
64
- <a href="{{ url_for('banking.add_transaction', bank_id=bank.id) }}">
65
- Create a new transaction
34
+ <a href="{{ url_for('banking.add_account') }}">
35
+ Add a new account
36
+ </a>
37
+ </li>
38
+ <li>
39
+ <a href="{{ url_for('banking.load_tags') }}">
40
+ Manage transaction tags
66
41
  </a>
67
42
  </li>
68
-
69
43
  </ul>
70
- {% endfor %}
71
44
 
72
- </div>
45
+ <h3>Banks</h3>
73
46
 
74
- <div id="credit" class="panel">
75
-
76
- <h2>Credit Cards</h2>
77
-
78
- <ul class="category">
79
- <h4>Profile</h4>
80
- <li>
81
- <a href="{{ url_for('credit.load_cards') }}">
82
- Manage cards
83
- </a>
84
- </li>
85
- <li>
86
- <a href="{{ url_for('credit.add_card') }}">
87
- Add a new card
88
- </a>
89
- </li>
90
- <li>
91
- <a href="{{ url_for('credit.load_tags') }}">
92
- Manage transaction tags
93
- </a>
94
- </li>
95
- </ul>
96
-
97
- <ul class="category">
98
- <h4>History</h4>
99
- <li>
100
- <a href="{{ url_for('credit.load_statements') }}">
101
- See statement history
102
- </a>
103
- </li>
104
- <li>
105
- <a href="{{ url_for('credit.load_transactions') }}">
106
- See transaction history
107
- </a>
108
- </li>
109
- <li>
110
- <a href="{{ url_for('credit.add_transaction') }}">
111
- Create a new transaction
112
- </a>
113
- </li>
114
- </ul>
115
-
116
- <h3>Cards</h3>
117
-
118
- {% for card in cards %}
119
- <ul class="category">
47
+ {% for bank in bank_accounts %}
48
+ <ul class="category">
120
49
 
121
- <h4>{{ card.account.bank.bank_name }} {{ card.last_four_digits }}</h4>
122
- {% if card.last_statement_id %}
50
+ <h4>{{ bank.bank_name }}</h4>
51
+ <li>
52
+ <a href="{{ url_for('banking.load_account_summaries', bank_id=bank.id) }}">
53
+ See account summaries
54
+ </a>
55
+ <ul>
56
+ {% for account in bank_accounts[bank]|sort(attribute='account_type_view.type_common_name,last_four_digits') %}
57
+ <li>
58
+ <a href="{{ url_for('banking.load_account_details', account_id=account.id) }}">
59
+ {{ account.account_type_view.type_common_name }} {{ account.last_four_digits }}
60
+ </a>
61
+ </li>
62
+ {% endfor %}
63
+ </ul>
64
+ </li>
123
65
  <li>
124
- <a href="{{ url_for('credit.load_statement_details', statement_id=card.last_statement_id) }}">
125
- See most recent statement
66
+ <a href="{{ url_for('banking.add_transaction', bank_id=bank.id) }}">
67
+ Create a new transaction
126
68
  </a>
127
69
  </li>
128
- {% endif %}
70
+
71
+ </ul>
72
+ {% endfor %}
73
+
74
+ </div>
75
+
76
+ </div>
77
+
78
+ <div class="panel-column">
79
+
80
+ <div id="credit" class="panel">
81
+
82
+ <h2>Credit Cards</h2>
83
+
84
+ <ul class="category">
85
+ <h4>Profile</h4>
86
+ <li>
87
+ <a href="{{ url_for('credit.load_cards') }}">
88
+ Manage cards
89
+ </a>
90
+ </li>
129
91
  <li>
130
- <a href="{{ url_for('credit.load_transactions', card_id=card.id) }}">
92
+ <a href="{{ url_for('credit.add_card') }}">
93
+ Add a new card
94
+ </a>
95
+ </li>
96
+ <li>
97
+ <a href="{{ url_for('banking.load_tags') }}">
98
+ Manage transaction tags
99
+ </a>
100
+ </li>
101
+ </ul>
102
+
103
+ <ul class="category">
104
+ <h4>History</h4>
105
+ <li>
106
+ <a href="{{ url_for('credit.load_statements') }}">
107
+ See statement history
108
+ </a>
109
+ </li>
110
+ <li>
111
+ <a href="{{ url_for('credit.load_transactions') }}">
131
112
  See transaction history
132
113
  </a>
133
114
  </li>
134
115
  <li>
135
- <a href="{{ url_for('credit.add_transaction', card_id=card.id) }}">
116
+ <a href="{{ url_for('credit.add_transaction') }}">
136
117
  Create a new transaction
137
118
  </a>
138
119
  </li>
139
-
140
120
  </ul>
141
- {% endfor %}
142
121
 
122
+ <h3>Cards</h3>
123
+
124
+ {% for card in cards %}
125
+ <ul class="category">
126
+
127
+ <h4>{{ card.account.bank.bank_name }} {{ card.last_four_digits }}</h4>
128
+ {% if card.last_statement_id %}
129
+ <li>
130
+ <a href="{{ url_for('credit.load_statement_details', statement_id=card.last_statement_id) }}">
131
+ See most recent statement
132
+ </a>
133
+ </li>
134
+ {% endif %}
135
+ <li>
136
+ <a href="{{ url_for('credit.load_transactions', card_id=card.id) }}">
137
+ See transaction history
138
+ </a>
139
+ </li>
140
+ <li>
141
+ <a href="{{ url_for('credit.add_transaction', card_id=card.id) }}">
142
+ Create a new transaction
143
+ </a>
144
+ </li>
145
+
146
+ </ul>
147
+ {% endfor %}
148
+
149
+ </div>
143
150
 
144
151
  </div>
145
152
 
146
- <div id="investments" class="panel">
147
- <h2>Coming soon!</h2>
153
+ <div class="panel-column">
154
+
155
+ <div id="investments" class="panel">
156
+ <h2>Coming soon!</h2>
157
+ </div>
158
+
148
159
  </div>
149
160
 
150
161
  </div>
@@ -67,7 +67,7 @@
67
67
 
68
68
  <h2>Transactions</h2>
69
69
 
70
- <a href="{{ url_for('credit.load_tags') }}">Manage transaction tags</a>
70
+ <a href="{{ url_for('banking.load_tags') }}">Manage transaction tags</a>
71
71
 
72
72
  </div>
73
73
 
@@ -23,8 +23,8 @@
23
23
  </div>
24
24
 
25
25
  <div id="statement-transactions-container" class="transactions-container">
26
- {% with transactions = statement_transactions, full_view = False %}
27
- {% include 'credit/transactions_table/transactions.html' %}
26
+ {% with full_view = False %}
27
+ {% include 'credit/transactions_table/table.html' %}
28
28
  {% endwith %}
29
29
  </div>
30
30
 
@@ -8,7 +8,7 @@
8
8
  </div>
9
9
 
10
10
  <p class="instructions">
11
- Load a CSV file containing credit activity for comparison against this statement. The CSV file must be located in the <code>Downloads</code> directory on the machine running the Monopyly app.
11
+ Load a CSV file containing credit activity for comparison against this statement.
12
12
  </p>
13
13
 
14
14
  <form action="{{ url_for('credit.load_statement_reconciliation_details', statement_id=statement_id) }}" method="post" enctype="multipart/form-data">
@@ -13,7 +13,7 @@
13
13
 
14
14
 
15
15
  {% block content %}
16
- {% set highlighted_transactions = statement_transactions|selectattr("highlight")|first %}
16
+ {% set highlighted_transactions = transactions|selectattr("highlight")|first %}
17
17
 
18
18
  <div id="credit-statement-reconciliation-details" class="details">
19
19
 
@@ -30,8 +30,8 @@
30
30
  </p>
31
31
  {% endif %}
32
32
 
33
- {% with transactions = statement_transactions, full_view = False %}
34
- {% include 'credit/transactions_table/transactions.html' %}
33
+ {% with full_view = False %}
34
+ {% include 'credit/transactions_table/table.html' %}
35
35
  {% endwith %}
36
36
  </div>
37
37
 
@@ -52,7 +52,7 @@
52
52
 
53
53
  <div class="form-line">
54
54
  <div class="dollar-sign">$</div>
55
- <input id="pay-amount" type="number" name="pay_amount" value="{{ statement.balance }}" />
55
+ <input id="pay-amount" type="number" name="pay_amount" value="{{ statement.balance }}" step="0.01" />
56
56
  <input id="pay-date" type="date" name="pay_date" value="{{ date_today }}" />
57
57
  </div>
58
58
 
@@ -62,7 +62,7 @@
62
62
  <option value="0">Select a bank</option>
63
63
  {% for account in bank_accounts %}
64
64
  <option value="{{ account.id }}">
65
- {{ account.bank.bank_name }} {{ account.account_type.type_name }} ({{ account.last_four_digits }})
65
+ {{ account.bank.bank_name }} {{ account.account_type_view.type_name }} ({{ account.last_four_digits }})
66
66
  </option>
67
67
  {% endfor %}
68
68
  </optgroup>