Skip to content

Commit

Permalink
feat(account statement): implement basic user interface (#1672)
Browse files Browse the repository at this point in the history
This commit adds in the Account Statement module, a replacement for the old `general_ledger` that is only focused on accounts.  It will show all transactions hitting an account.  Later features should show the details of each transaction row so that a user can determine if the transaction was correctly made.
  • Loading branch information
mbayopanda authored and jniles committed May 26, 2017
1 parent 1b1c5cb commit 43a989e
Show file tree
Hide file tree
Showing 31 changed files with 1,040 additions and 62 deletions.
8 changes: 8 additions & 0 deletions client/src/i18n/en/account_statement.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"ACCOUNT_STATEMENT":{
"TITLE":"Account Statement",
"COMMENT":"Comment",
"SELECTED_ROWS":"Selected Rows",
"SUCCESSFULLY_COMMENTED":"Rows successfully commented"
}
}
1 change: 1 addition & 0 deletions client/src/i18n/en/form.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@
"CLIENT_TO_IGNORE":"Client(s) to ignore",
"CODE":"Code",
"COLUMNS":"Columns",
"COMMENT":"Comment",
"CONFIRMATION":"Confirmation",
"CONTACT":"Contact",
"CONTACT_ADMIN":"Please contact the administrator",
Expand Down
1 change: 1 addition & 0 deletions client/src/i18n/en/tree.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{"TREE":{"ACCOUNT":"Account",
"ACCOUNT_STATEMENT":"Account Statement",
"ADMIN":"Admin",
"AGED_CREDITORS":"Aged Debts",
"BALANCE":"Balance",
Expand Down
8 changes: 8 additions & 0 deletions client/src/i18n/fr/account_statement.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"ACCOUNT_STATEMENT":{
"TITLE":"Relevé de compte",
"COMMENT":"Commentaire",
"SELECTED_ROWS":"Ligne(s) selectionnée(s)",
"SUCCESSFULLY_COMMENTED":"Ligne(s) commentées avec succès"
}
}
1 change: 1 addition & 0 deletions client/src/i18n/fr/form.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@
"CLIENT_TO_IGNORE":"Client(s) à ignorer",
"CODE":"Code",
"COLUMNS":"Colonnes",
"COMMENT":"Commentaire",
"CONFIRMATION":"Confirmation",
"CONTACT":"Contact",
"CONTACT_ADMIN":"Veuillez contacter l'administrateur",
Expand Down
2 changes: 1 addition & 1 deletion client/src/i18n/fr/periods.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"PERIOD_LIMIT" : "Limite de période",
"CUSTOM_FROM" : "de",
"CUSTOM_TO" : "à",
"SELECT_PERIOD" : "Période choisie",
"SELECT_PERIOD" : "Choisir une période",
"SELECT_CUSTOM_PERIOD" : "Période personnalisée",
"SUBMIT_CUSTOM_PERIOD" : "Valider la période"
}
Expand Down
1 change: 1 addition & 0 deletions client/src/i18n/fr/tree.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{"TREE":{"ACCOUNT":"Comptes",
"ACCOUNT_STATEMENT":"Rélevé de compte",
"ADMIN":"Admin",
"AGED_CREDITORS":"Balance âgée des Créances",
"BALANCE":"Balance",
Expand Down
17 changes: 9 additions & 8 deletions client/src/js/services/FilterService.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,29 +122,29 @@ function FilterService(Store) {
return activeFilters.map(function (filter) {
return filter._key.concat(':', filter._label);
});
}
};

FilterList.prototype.formatCache = function formatCache() {
return angular.copy(this._filterIndex);
}
};

// replaces current filters with filters from cache
FilterList.prototype.loadCache = function loadCache(storedCache) {
Object.keys(storedCache).forEach(function (key) {
var cached = storedCache[key];
var currentFilter = this._filterIndex[key];
if(currentFilter) {
if (currentFilter) {
currentFilter.setValue(cached._value, cached._displayValue);
}
}.bind(this));
}
};

FilterList.prototype._indexList = function indexList(index, list) {
index = list.reduce(function (aggregateIndex, filterDefinition) {
aggregateIndex[filterDefinition._key] = filterDefinition;
return aggregateIndex;
}, index);
}
};

// returns a flat array of filters that have values (and should be applied)
FilterList.prototype._filterActiveFilters = function filterActiveFilters() {
Expand All @@ -158,7 +158,7 @@ function FilterService(Store) {
}
}.bind(this));
return filtered;
}
};

// expose Filter data element
FilterList.prototype.Filter = Filter;
Expand All @@ -178,9 +178,10 @@ function Filter(key, label, valueFilter) {

this.setDefault = function setDefault(value) {
this._isDefault = value;
}
};

this.setValue = function setValue(value, displayValue) {
this._value = value;
this._displayValue = displayValue;
}
};
}
Loading

0 comments on commit 43a989e

Please sign in to comment.