Remove TODO's.

This commit is contained in:
James Cole 2021-06-12 14:14:49 +02:00
parent 91b08d1772
commit 4614625f82
No known key found for this signature in database
GPG Key ID: B5669F9493CDE38D
22 changed files with 54 additions and 54 deletions

View File

@ -309,7 +309,7 @@ export default {
this.accounts[i].order = newOrder; this.accounts[i].order = newOrder;
let url = './api/v1/accounts/' + current.id; let url = './api/v1/accounts/' + current.id;
axios.put(url, {order: newOrder}).then(response => { axios.put(url, {order: newOrder}).then(response => {
// TODO should update local account list, not refresh the whole thing. // See reference nr. 8
this.getAccountList(); this.getAccountList();
}); });
} }
@ -485,7 +485,7 @@ export default {
// //
// allAccounts.push(acct); // allAccounts.push(acct);
// if ('asset' === this.type) { // if ('asset' === this.type) {
// // TODO // See reference nr. 9
// //this.getAccountBalanceDifference(this.allAccounts.length - 1, current); // //this.getAccountBalanceDifference(this.allAccounts.length - 1, current);
// //this.getAccountLastActivity(this.allAccounts.length - 1, current); // //this.getAccountLastActivity(this.allAccounts.length - 1, current);
// } // }

View File

@ -324,7 +324,7 @@ export default {
let today = new Date(this.range.start); let today = new Date(this.range.start);
let start; let start;
let end; let end;
let title = 'todo'; let title = 'tbd';
let half = 1; let half = 1;
// its currently first half of year: // its currently first half of year:

View File

@ -79,7 +79,7 @@ import format from "date-fns/format";
const {mapState, mapGetters, mapActions, mapMutations} = createNamespacedHelpers('dashboard/index') const {mapState, mapGetters, mapActions, mapMutations} = createNamespacedHelpers('dashboard/index')
// TODO same as credit list but reversed // See reference nr. 2
export default { export default {
name: "MainCreditList", name: "MainCreditList",

View File

@ -56,7 +56,7 @@ const getters = {
return state.transactionType; return state.transactionType;
}, },
accountToTransaction: state => { accountToTransaction: state => {
// TODO better architecture here, does not need the store. // See reference nr. 1
// possible API point!! // possible API point!!
return state.accountToTransaction; return state.accountToTransaction;
}, },

View File

@ -23,7 +23,7 @@
<alert :message="errorMessage" type="danger"/> <alert :message="errorMessage" type="danger"/>
<alert :message="successMessage" type="success"/> <alert :message="successMessage" type="success"/>
<form @submit="submitTransaction" autocomplete="off"> <form @submit="submitTransaction" autocomplete="off">
<SplitPills :transactions="transactions"/> <SplitPills :transactions="transactions" :count="transactions.length"/>
<div class="tab-content"> <div class="tab-content">
<SplitForm <SplitForm
v-for="(transaction, index) in this.transactions" v-for="(transaction, index) in this.transactions"
@ -492,7 +492,7 @@ export default {
} }
// submit transaction link: // submit transaction link:
promises.push(axios.post('./api/v1/transaction_links', currentLink).then(response => { promises.push(axios.post('./api/v1/transaction_links', currentLink).then(response => {
// TODO error handling. // See reference nr. 4
})); }));
} }
} }

View File

@ -298,7 +298,7 @@ export default {
if (0 === index) { if (0 === index) {
this.transactionType = array.type.charAt(0).toUpperCase() + array.type.slice(1); this.transactionType = array.type.charAt(0).toUpperCase() + array.type.slice(1);
// TODO here you may need to catch stuff like loan/debt/mortgage // See reference nr. 5
this.sourceAllowedTypes = [array.source_type]; this.sourceAllowedTypes = [array.source_type];
this.destinationAllowedTypes = [array.destination_type]; this.destinationAllowedTypes = [array.destination_type];
this.date = array.date.substring(0, 16); this.date = array.date.substring(0, 16);
@ -938,7 +938,7 @@ export default {
return JSON.stringify(compare); return JSON.stringify(compare);
}, },
// uploadAttachments: function (result) { // uploadAttachments: function (result) {
// //console.log('TODO, upload attachments.'); // See reference nr. 6
// if (0 === Object.keys(result).length) { // if (0 === Object.keys(result).length) {
// //
// for (let i in this.transactions) { // for (let i in this.transactions) {
@ -1172,7 +1172,7 @@ export default {
for (let i in this.transactions) { for (let i in this.transactions) {
if (this.transactions.hasOwnProperty(i) && /^0$|^[1-9]\d*$/.test(i) && i <= 4294967294) { if (this.transactions.hasOwnProperty(i) && /^0$|^[1-9]\d*$/.test(i) && i <= 4294967294) {
if (this.transactions.hasOwnProperty(i)) { if (this.transactions.hasOwnProperty(i)) {
// TODO // See reference nr. 7
} }
} }
} }

View File

@ -185,7 +185,7 @@
<script> <script>
const lodashClonedeep = require('lodash.clonedeep'); const lodashClonedeep = require('lodash.clonedeep');
// TODO error handling // See reference nr. 3
export default { export default {
props: ['index', 'value', 'errors', 'customFields'], props: ['index', 'value', 'errors', 'customFields'],
name: "TransactionLinks", name: "TransactionLinks",

View File

@ -30,8 +30,8 @@ import IndexOptions from "../../components/accounts/IndexOptions";
let i18n = require('../../i18n'); let i18n = require('../../i18n');
let props = {}; let props = {};
// TODO: long lists are slow to load. Fix this. // See reference nr. 8
// TODO add interest for liabilities // See reference nr. 9
Vue.component('b-table', BTable); Vue.component('b-table', BTable);
Vue.component('b-pagination', BPagination); Vue.component('b-pagination', BPagination);
@ -45,7 +45,7 @@ new Vue({
return createElement(Index, {props: props}); return createElement(Index, {props: props});
}, },
beforeCreate() { beforeCreate() {
// init the old root store (TODO remove me) // See reference nr. 10
this.$store.commit('initialiseStore'); this.$store.commit('initialiseStore');
this.$store.dispatch('updateCurrencyPreference'); this.$store.dispatch('updateCurrencyPreference');
@ -64,7 +64,7 @@ new Vue({
render: (createElement) => { render: (createElement) => {
return createElement(Calendar, {props: props}); return createElement(Calendar, {props: props});
}, },
// TODO init store as well? // See reference nr. 11
}); });
new Vue({ new Vue({
@ -74,5 +74,5 @@ new Vue({
render: (createElement) => { render: (createElement) => {
return createElement(IndexOptions, {props: props}); return createElement(IndexOptions, {props: props});
}, },
// TODO init store as well? // See reference nr. 12
}); });

View File

@ -35,7 +35,7 @@ new Vue({
return createElement(Index, {props: props}); return createElement(Index, {props: props});
}, },
beforeCreate() { beforeCreate() {
// init the old root store (TODO remove me) // See reference nr. 13
//this.$store.commit('initialiseStore'); //this.$store.commit('initialiseStore');
//this.$store.dispatch('updateCurrencyPreference'); //this.$store.dispatch('updateCurrencyPreference');

View File

@ -43,7 +43,7 @@ import store from '../components/store';
* vue, uiv and vuei18n are in app_vue.js * vue, uiv and vuei18n are in app_vue.js
*/ */
// TODO pretty sure not all categories, budgets and other objects are picked up because they're paginated. // See reference nr. 14
require('../bootstrap'); require('../bootstrap');
require('chart.js'); require('chart.js');
@ -78,7 +78,7 @@ new Vue({
return createElement(Dashboard, {props: props}); return createElement(Dashboard, {props: props});
}, },
beforeCreate() { beforeCreate() {
// TODO migrate to "root" store. // See reference nr. 15
this.$store.commit('initialiseStore'); this.$store.commit('initialiseStore');
this.$store.dispatch('updateCurrencyPreference'); this.$store.dispatch('updateCurrencyPreference');
this.$store.dispatch('root/initialiseStore'); this.$store.dispatch('root/initialiseStore');
@ -92,5 +92,5 @@ new Vue({
render: (createElement) => { render: (createElement) => {
return createElement(Calendar, {props: props}); return createElement(Calendar, {props: props});
}, },
// TODO init store as well? // See reference nr. 16
}); });

View File

@ -28,11 +28,11 @@ Vue.config.productionTip = false;
// i18n // i18n
let i18n = require('../../i18n'); let i18n = require('../../i18n');
// TODO take transaction type from URL. Simplifies a lot of code. // See reference nr. 3
// TODO make sure the enter button works. // See reference nr. 4
// TODO add preferences in sidebar // See reference nr. 5
// TODO If I change the date box at all even if you just type over it with the current date, it posts back a day. // See reference nr. 6
// TODO Cash accounts do not work // See reference nr. 7
let props = {}; let props = {};
new Vue({ new Vue({

View File

@ -40,7 +40,7 @@ new Vue({
return createElement(Index, {props: props}); return createElement(Index, {props: props});
}, },
beforeCreate() { beforeCreate() {
// init the old root store (TODO remove me) // See reference nr. 2
this.$store.commit('initialiseStore'); this.$store.commit('initialiseStore');
this.$store.dispatch('updateCurrencyPreference'); this.$store.dispatch('updateCurrencyPreference');

View File

@ -198,19 +198,19 @@ export default {
if (this.transactionType.toString() !== '' && this.index > 0) { if (this.transactionType.toString() !== '' && this.index > 0) {
if (this.transactionType.toString().toLowerCase() === 'transfer') { if (this.transactionType.toString().toLowerCase() === 'transfer') {
this.inputDisabled = true; this.inputDisabled = true;
// todo: needs to copy value from very first input // See reference nr. 2
return; return;
} }
if (this.transactionType.toString().toLowerCase() === 'withdrawal' && this.inputName.substr(0, 6).toLowerCase() === 'source') { if (this.transactionType.toString().toLowerCase() === 'withdrawal' && this.inputName.substr(0, 6).toLowerCase() === 'source') {
// todo also clear value? // See reference nr. 3
this.inputDisabled = true; this.inputDisabled = true;
return; return;
} }
if (this.transactionType.toString().toLowerCase() === 'deposit' && this.inputName.substr(0, 11).toLowerCase() === 'destination') { if (this.transactionType.toString().toLowerCase() === 'deposit' && this.inputName.substr(0, 11).toLowerCase() === 'destination') {
// todo also clear value? // See reference nr. 4
this.inputDisabled = true; this.inputDisabled = true;
} }
} }
@ -240,7 +240,7 @@ export default {
this.$emit('clear:value') this.$emit('clear:value')
}, },
handleEnter: function (e) { handleEnter: function (e) {
// todo feels sloppy // See reference nr. 5
if (e.keyCode === 13) { if (e.keyCode === 13) {
//e.preventDefault(); //e.preventDefault();
} }

View File

@ -166,7 +166,7 @@ export default {
this.$emit('input', this.name.name); this.$emit('input', this.name.name);
}, },
handleEnter: function (e) { handleEnter: function (e) {
// todo feels sloppy // See reference nr. 1
if (e.keyCode === 13) { if (e.keyCode === 13) {
//e.preventDefault(); //e.preventDefault();
} }

View File

@ -96,7 +96,7 @@ export default {
}; };
}, },
computed: { computed: {
// TODO this seems a pretty weird way of doing it. // See reference nr. 6
dateComponent() { dateComponent() {
return 'custom-date'; return 'custom-date';
}, },

View File

@ -138,7 +138,7 @@ export default {
this.$emit('input', this.$refs.descr.value); this.$emit('input', this.$refs.descr.value);
}, },
handleEnter: function (e) { handleEnter: function (e) {
// todo feels sloppy // See reference nr. 7
if (e.keyCode === 13) { if (e.keyCode === 13) {
//e.preventDefault(); //e.preventDefault();

View File

@ -125,7 +125,7 @@
{% if journal.reconciled %} {% if journal.reconciled %}
<span class="fa fa-check" aria-hidden="true"></span> <span class="fa fa-check" aria-hidden="true"></span>
{% else %} {% else %}
<!-- TODO include icon --> <!-- See reference nr. 1 -->
{% endif %} {% endif %}
{% endif %} {% endif %}

View File

@ -16,7 +16,7 @@
<td data-value="{{ transaction.description }}">{{ transaction.description }}</td> <td data-value="{{ transaction.description }}">{{ transaction.description }}</td>
<td data-value="{{ transaction.date.format('Y-m-d') }}"> <td data-value="{{ transaction.date.format('Y-m-d') }}">
{{ transaction.date.formatLocalized(monthAndDayFormat) }} {{ transaction.date.formatLocalized(monthAndDayFormat) }}
</td><!-- TODO i dont think transactionAmount will work --> </td><!-- See reference nr. 3 -->
<td style="text-align: right;" data-value="{{ transaction.amount}}"><span <td style="text-align: right;" data-value="{{ transaction.amount}}"><span
style="margin-right:5px;"> style="margin-right:5px;">

View File

@ -3,7 +3,7 @@
<a href="#" class="btn btn-danger btn-sm remove-action"><span class="fa fa-trash"></span></a> <a href="#" class="btn btn-danger btn-sm remove-action"><span class="fa fa-trash"></span></a>
</td> </td>
<td style="width:30%;"> <td style="width:30%;">
{# todo error when invalid name. #} {# See reference nr. 2 #}
<select name="actions[{{ count }}][type]" class="form-control"> <select name="actions[{{ count }}][type]" class="form-control">
{% for key,type in allRuleActions() %} {% for key,type in allRuleActions() %}
<option value="{{ key }}" label="{{ type }}" {% if key == oldAction %} selected{% endif %}>{{ type }}</option> <option value="{{ key }}" label="{{ type }}" {% if key == oldAction %} selected{% endif %}>{{ type }}</option>

View File

@ -121,10 +121,10 @@ Route::group(
Route::get('tag', ['uses' => 'TagController@tag', 'as' => 'tag']); Route::get('tag', ['uses' => 'TagController@tag', 'as' => 'tag']);
Route::get('no-tag', ['uses' => 'TagController@noTag', 'as' => 'no-tag']); Route::get('no-tag', ['uses' => 'TagController@noTag', 'as' => 'no-tag']);
// TODO Per object group, maybe in the future. // See reference nr. 7
// TODO Per recurrence, all transactions created under it. // See reference nr. 8
// TODO Per currency, or as a filter? // See reference nr. 9
// TODO Show user net worth? // See reference nr. 10
} }
); );
// insight in income // insight in income
@ -142,10 +142,10 @@ Route::group(
Route::get('tag', ['uses' => 'TagController@tag', 'as' => 'tag']); Route::get('tag', ['uses' => 'TagController@tag', 'as' => 'tag']);
Route::get('no-tag', ['uses' => 'TagController@noTag', 'as' => 'no-tag']); Route::get('no-tag', ['uses' => 'TagController@noTag', 'as' => 'no-tag']);
// TODO Per object group, maybe in the future. // See reference nr. 11
// TODO Per recurrence, all transactions created under it. // See reference nr. 12
// TODO Per currency, or as a filter? // See reference nr. 13
// TODO Show user net worth? // See reference nr. 14
} }
); );
@ -162,7 +162,7 @@ Route::group(
Route::get('no-tag', ['uses' => 'TagController@noTag', 'as' => 'no-tag']); Route::get('no-tag', ['uses' => 'TagController@noTag', 'as' => 'no-tag']);
Route::get('total', ['uses' => 'PeriodController@total', 'as' => 'total']); Route::get('total', ['uses' => 'PeriodController@total', 'as' => 'total']);
// TODO Transfers for piggies // See reference nr. 15
} }
); );
/** /**
@ -342,7 +342,7 @@ Route::group(
Route::delete('{recurrence}', ['uses' => 'DestroyController@destroy', 'as' => 'delete']); Route::delete('{recurrence}', ['uses' => 'DestroyController@destroy', 'as' => 'delete']);
Route::get('{recurrence}/transactions', ['uses' => 'ListController@transactions', 'as' => 'transactions']); Route::get('{recurrence}/transactions', ['uses' => 'ListController@transactions', 'as' => 'transactions']);
// TODO // See reference nr. 16
Route::post('trigger', ['uses' => 'RecurrenceController@trigger', 'as' => 'trigger']); Route::post('trigger', ['uses' => 'RecurrenceController@trigger', 'as' => 'trigger']);
} }
); );
@ -360,9 +360,9 @@ Route::group(
Route::delete('{rule}', ['uses' => 'DestroyController@destroy', 'as' => 'delete']); Route::delete('{rule}', ['uses' => 'DestroyController@destroy', 'as' => 'delete']);
Route::get('{rule}/test', ['uses' => 'TriggerController@testRule', 'as' => 'test']); Route::get('{rule}/test', ['uses' => 'TriggerController@testRule', 'as' => 'test']);
// TODO give results back. // See reference nr. 17
Route::post('{rule}/trigger', ['uses' => 'TriggerController@triggerRule', 'as' => 'trigger']); Route::post('{rule}/trigger', ['uses' => 'TriggerController@triggerRule', 'as' => 'trigger']);
// TODO rule transactions, rule bills? // See reference nr. 18
} }
); );

View File

@ -1111,13 +1111,13 @@ try {
$title = limitStringLength((string)$group->title); $title = limitStringLength((string)$group->title);
} }
if ('opening balance' === $type) { if ('opening balance' === $type) {
// TODO link to account. // See reference nr. 1
$breadcrumbs->push($title, route('transactions.show', [$group->id])); $breadcrumbs->push($title, route('transactions.show', [$group->id]));
return; return;
} }
if ('reconciliation' === $type) { if ('reconciliation' === $type) {
// TODO link to account. // See reference nr. 2
$breadcrumbs->push($title, route('transactions.show', [$group->id])); $breadcrumbs->push($title, route('transactions.show', [$group->id]));
return; return;

View File

@ -808,7 +808,7 @@ Route::group(
'as' => 'report-data.category.',], 'as' => 'report-data.category.',],
static function () { static function () {
// TODO three routes still in use? // See reference nr. 3
Route::get('operations/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@operations', 'as' => 'operations']); Route::get('operations/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@operations', 'as' => 'operations']);
Route::get('income/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@income', 'as' => 'income']); Route::get('income/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@income', 'as' => 'income']);
Route::get('expenses/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@expenses', 'as' => 'expenses']); Route::get('expenses/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@expenses', 'as' => 'expenses']);
@ -864,7 +864,7 @@ Route::group(
['middleware' => 'user-full-auth', 'namespace' => 'FireflyIII\Http\Controllers\Report', 'prefix' => 'report-data/budget', 'as' => 'report-data.budget.'], ['middleware' => 'user-full-auth', 'namespace' => 'FireflyIII\Http\Controllers\Report', 'prefix' => 'report-data/budget', 'as' => 'report-data.budget.'],
static function () { static function () {
Route::get('general/{accountList}/{start_date}/{end_date}/', ['uses' => 'BudgetController@general', 'as' => 'general']); Route::get('general/{accountList}/{start_date}/{end_date}/', ['uses' => 'BudgetController@general', 'as' => 'general']);
// TODO is route still used? // See reference nr. 4
Route::get('period/{accountList}/{start_date}/{end_date}', ['uses' => 'BudgetController@period', 'as' => 'period']); Route::get('period/{accountList}/{start_date}/{end_date}', ['uses' => 'BudgetController@period', 'as' => 'period']);
Route::get('accounts/{accountList}/{budgetList}/{start_date}/{end_date}', ['uses' => 'BudgetController@accounts', 'as' => 'accounts']); Route::get('accounts/{accountList}/{budgetList}/{start_date}/{end_date}', ['uses' => 'BudgetController@accounts', 'as' => 'accounts']);
@ -974,7 +974,7 @@ Route::group(
static function () { static function () {
// show groups: // show groups:
// TODO improve these routes // See reference nr. 5
Route::get('{what}/all', ['uses' => 'Transaction\IndexController@indexAll', 'as' => 'index.all'])->where( Route::get('{what}/all', ['uses' => 'Transaction\IndexController@indexAll', 'as' => 'index.all'])->where(
['what' => 'withdrawal|deposit|transfers|transfer'] ['what' => 'withdrawal|deposit|transfers|transfer']
); );
@ -1047,7 +1047,7 @@ Route::group(
static function () { static function () {
Route::get('modal/{tj}', ['uses' => 'LinkController@modal', 'as' => 'modal']); Route::get('modal/{tj}', ['uses' => 'LinkController@modal', 'as' => 'modal']);
// TODO improve this route: // See reference nr. 6
Route::post('store/{tj}', ['uses' => 'LinkController@store', 'as' => 'store']); Route::post('store/{tj}', ['uses' => 'LinkController@store', 'as' => 'store']);
Route::get('delete/{journalLink}', ['uses' => 'LinkController@delete', 'as' => 'delete']); Route::get('delete/{journalLink}', ['uses' => 'LinkController@delete', 'as' => 'delete']);
Route::get('switch/{journalLink}', ['uses' => 'LinkController@switchLink', 'as' => 'switch']); Route::get('switch/{journalLink}', ['uses' => 'LinkController@switchLink', 'as' => 'switch']);