Skip to content

Commit e371fa8

Browse files
committed
Made daterange responsive
1 parent c69a8e5 commit e371fa8

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

LinkDotNet.Blog.Web/Shared/Admin/Dashboard/DateRangeSelector.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<div class="col-1">
1+
<div class="col-lg-1 col-md-2 col-sm-3 col-4">
22
<p>Since: </p>
33
</div>
4-
<div class="col-2">
4+
<div class="col-lg-2 col-md-4 col-sm-6 col-8">
55
<select @onchange="RaiseDateTimeSpanChanged">
66
@foreach (var (title, time) in options)
77
{

LinkDotNet.Blog.Web/Shared/Admin/Dashboard/VisitCountPerPage.razor

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@
5151
private async Task LoadBlogPostInformationAsync()
5252
{
5353
visitData = await (from ur in blogDbContext.UserRecords
54-
where ur.DateTimeUtcClicked >= startDate
55-
join bp in blogDbContext.BlogPosts
56-
on ur.UrlClicked.Replace("blogPost/", string.Empty) equals bp.Id
57-
group new { ur, bp } by new { ur.UrlClicked }
54+
where ur.DateTimeUtcClicked >= startDate
55+
join bp in blogDbContext.BlogPosts
56+
on ur.UrlClicked.Replace("blogPost/", string.Empty) equals bp.Id
57+
group new { ur, bp } by new { ur.UrlClicked }
5858
into gp
59-
orderby gp.Count() descending
60-
select new VisitCountPageData
59+
orderby gp.Count() descending
60+
select new VisitCountPageData
6161
{
6262
Id = gp.FirstOrDefault().bp.Id,
6363
Title = gp.FirstOrDefault().bp.Title,
@@ -69,6 +69,7 @@
6969
private async Task RefreshVisitCount(DateTime newBeginning)
7070
{
7171
startDate = newBeginning;
72+
visitData = null;
7273
await LoadBlogPostInformationAsync();
7374
}
7475
}

0 commit comments

Comments
 (0)