diff --git a/public/css/components/dashboard/news.css b/public/css/components/dashboard/news.css index 8c3a090d7..f1adb2b65 100644 --- a/public/css/components/dashboard/news.css +++ b/public/css/components/dashboard/news.css @@ -177,6 +177,7 @@ .fhc-news-items-lg .row:hover .news-truncate span{ text-decoration: underline; cursor: pointer; + font-weight: bold; } diff --git a/public/js/components/DashboardWidget/News.js b/public/js/components/DashboardWidget/News.js index d86ccff0b..f0b6ec75a 100644 --- a/public/js/components/DashboardWidget/News.js +++ b/public/js/components/DashboardWidget/News.js @@ -33,11 +33,8 @@ export default { quantity = this.height === 1 ? 4 : MAX_LOADED_NEWS; } - let slicedNews= this.allNewsList.slice(0, quantity); - slicedNews.sort((a,b)=>{ - return new Date(b.insertamum) - new Date(a.insertamum); - }); - + let slicedNews = this.allNewsList.slice(0, quantity); + return slicedNews; }, carouselItems() { @@ -190,6 +187,9 @@ export default { .then(res => res.data) .then((news) => { this.allNewsList = Array.from(Object.values(news)); + this.allNewsList.sort((a, b) => { + return new Date(b.datum) - new Date(a.datum); + }); this.selected = this.allNewsList.length ? this.allNewsList[0] : null this.initActiveItem() @@ -230,32 +230,30 @@ export default {