mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix issue on dashboard.
This commit is contained in:
parent
3e6aca4cd1
commit
aa629523a0
File diff suppressed because one or more lines are too long
@ -30,10 +30,10 @@
|
||||
"integrity": "sha384-B73JAwYNSgI4rwb14zwxigHgAkg1Ms+j6+9sJoDpiL11+VW5RjQCLfIh0RVoi0h6"
|
||||
},
|
||||
"resources/assets/v2/pages/dashboard/dashboard.js": {
|
||||
"file": "assets/dashboard-b749bce8.js",
|
||||
"file": "assets/dashboard-307bb616.js",
|
||||
"isEntry": true,
|
||||
"src": "resources/assets/v2/pages/dashboard/dashboard.js",
|
||||
"integrity": "sha384-TvAKEMJR8ONhKUtSgHwMgfm3VeK89DxeTTgj9L9CLSaYYbwX5sZZVM+U672RgNDU"
|
||||
"integrity": "sha384-12LQTVUhQ8NDyfArIhB/HjBxu9v2Mo7PO76JNWBlHQStvJtW80r4RRNvE7jifPQS"
|
||||
},
|
||||
"resources/assets/v2/sass/app.scss": {
|
||||
"file": "assets/app-28a195fd.css",
|
||||
|
@ -30,7 +30,7 @@ export default class Get {
|
||||
* @returns {Promise<AxiosResponse<any>>}
|
||||
*/
|
||||
get(identifier, date) {
|
||||
let params = {date: format(date, 'y-MM-d').slice(0, 10)};
|
||||
let params = {date: format(date, 'y-MM-dd').slice(0, 10)};
|
||||
if (!date) {
|
||||
return api.get('/api/v1/accounts/' + identifier);
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ export default class Get {
|
||||
* @returns {Promise<AxiosResponse<any>>}
|
||||
*/
|
||||
get(identifier, date) {
|
||||
let params = {date: format(date, 'y-MM-d').slice(0, 10)};
|
||||
let params = {date: format(date, 'y-MM-dd').slice(0, 10)};
|
||||
if (!date) {
|
||||
return api.get('/api/v2/accounts/' + identifier);
|
||||
}
|
||||
@ -40,10 +40,20 @@ export default class Get {
|
||||
/**
|
||||
*
|
||||
* @param identifier
|
||||
* @param page
|
||||
* @param params
|
||||
* @returns {Promise<AxiosResponse<any>>}
|
||||
*/
|
||||
transactions(identifier, page) {
|
||||
return api.get('/api/v2/accounts/' + identifier + '/transactions', {params: {page: page}});
|
||||
transactions(identifier, params) {
|
||||
const newParams = {
|
||||
page: params.page ?? 1
|
||||
};
|
||||
if (params.hasOwnProperty('start')) {
|
||||
newParams.start = format(params.start, 'y-MM-dd');
|
||||
}
|
||||
if (params.hasOwnProperty('end')) {
|
||||
newParams.end = format(params.end, 'y-MM-dd');
|
||||
}
|
||||
|
||||
return api.get('/api/v2/accounts/' + identifier + '/transactions', {params: newParams});
|
||||
}
|
||||
}
|
||||
|
@ -186,7 +186,12 @@ export default () => ({
|
||||
let parent = response.data.data;
|
||||
|
||||
// get groups for account:
|
||||
(new Get).transactions(parent.id, 1).then((response) => {
|
||||
const params = {
|
||||
page: 1,
|
||||
start: new Date(window.store.get('start')),
|
||||
end: new Date(window.store.get('end')),
|
||||
};
|
||||
(new Get).transactions(parent.id, params).then((response) => {
|
||||
let groups = [];
|
||||
for (let ii = 0; ii < response.data.data.length; ii++) {
|
||||
if (ii >= max) {
|
||||
|
@ -49,8 +49,8 @@ return [
|
||||
'transaction_types_equal' => 'All splits must be of the same type.',
|
||||
'invalid_transaction_type' => 'Invalid transaction type.',
|
||||
'invalid_selection' => 'Your selection is invalid.',
|
||||
'belongs_user' => 'This value is linked to an object that does not belong to you.',
|
||||
'belongs_user_or_user_group' => 'This value is linked to an object that does not belong to your current financial administration.',
|
||||
'belongs_user' => 'This value is linked to an object that does not seem to exist.',
|
||||
'belongs_user_or_user_group' => 'This value is linked to an object that does not seem to exist in your current financial administration.',
|
||||
'at_least_one_transaction' => 'Need at least one transaction.',
|
||||
'recurring_transaction_id' => 'Need at least one transaction.',
|
||||
'need_id_to_match' => 'You need to submit this entry with an ID for the API to be able to match it.',
|
||||
|
Loading…
Reference in New Issue
Block a user