History in DB switch
This commit is contained in:
parent
0187d9b1bb
commit
316a02fa2f
1 changed files with 9 additions and 0 deletions
|
|
@ -1,6 +1,8 @@
|
|||
|
||||
function getHistHTML(hist) {
|
||||
|
||||
hist = sortHistByDate(hist);
|
||||
|
||||
let html = '', col, title;
|
||||
|
||||
for (let h of hist) {
|
||||
|
|
@ -17,4 +19,11 @@ function getHistHTML(hist) {
|
|||
</svg></i>`;
|
||||
}
|
||||
return html;
|
||||
}
|
||||
|
||||
function sortHistByDate(hist) {
|
||||
|
||||
hist.sort((a, b) => (a.Date > b.Date));
|
||||
|
||||
return hist;
|
||||
}
|
||||
Loading…
Reference in a new issue