|
|
@@ -1,5 +1,5 @@
|
|
|
let date = new Date();
|
|
|
-let yearAgo = new Date(date.getFullYear() - 1, date.getMonth(), date.getDate());
|
|
|
+let yearAgo = new Date(new Date().setFullYear(date.getFullYear() - 1));
|
|
|
|
|
|
let onDataLoad = function(){
|
|
|
let dateSort = document.querySelector("#dateSort");
|
|
|
@@ -11,6 +11,8 @@ axios.post("/transactions", {from: yearAgo, to: date})
|
|
|
.then((response)=>{
|
|
|
if(typeof(response.data) === "string"){
|
|
|
banner.createError(response.data);
|
|
|
+
|
|
|
+
|
|
|
}else{
|
|
|
data.transactions = response.data;
|
|
|
onDataLoad();
|