mirror of https://github.com/abpframework/abp.git
29 changed files with 174 additions and 101 deletions
@ -0,0 +1,6 @@ |
|||||
|
(function ($) { |
||||
|
$('#GlobalRefreshButton').on('click', |
||||
|
function () { |
||||
|
$(document).trigger('RefreshWidgets', $('#DashboardGlobalFiltersForm').serializeFormToObject()); |
||||
|
}); |
||||
|
})(jQuery); |
||||
@ -0,0 +1,11 @@ |
|||||
|
using System; |
||||
|
|
||||
|
namespace DashboardDemo |
||||
|
{ |
||||
|
public class FilterDto |
||||
|
{ |
||||
|
public DateTime? StartDate { get; set; } |
||||
|
|
||||
|
public DateTime? EndDate { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,9 @@ |
|||||
|
namespace DashboardDemo |
||||
|
{ |
||||
|
public class GetMonthlyUserStatisticDto |
||||
|
{ |
||||
|
public string[] Labels { get; set; } |
||||
|
|
||||
|
public int[] Data { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -1,7 +0,0 @@ |
|||||
namespace DashboardDemo |
|
||||
{ |
|
||||
public class NewUserPerDayStatisticDto |
|
||||
{ |
|
||||
public int[] Data { get; set; } |
|
||||
} |
|
||||
} |
|
||||
@ -1,5 +1,5 @@ |
|||||
(function ($) { |
(function ($) { |
||||
var $container = $('#RefreshGlobalFilterContainer'); |
var $container = $('#DateRangeGlobalFilterContainer'); |
||||
if ($container.length > 0) { |
if ($container.length > 0) { |
||||
|
|
||||
} |
} |
||||
@ -0,0 +1,11 @@ |
|||||
|
@inject IHtmlLocalizer<DashboardDemoResource> L |
||||
|
@using DashboardDemo.Localization.DashboardDemo |
||||
|
@using Microsoft.AspNetCore.Mvc.Localization |
||||
|
@model DashboardDemo.Pages.widgets.Filters.DateRangeGlobalFilterViewComponent |
||||
|
@{ |
||||
|
} |
||||
|
<div id="DateRangeGlobalFilterContainer"> |
||||
|
<input type="date" id="StartDate" name="StartDate"/> |
||||
|
<input type="date" id="EndDate" name="EndDate"/> |
||||
|
</div> |
||||
|
|
||||
@ -0,0 +1,17 @@ |
|||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
|
||||
|
namespace DashboardDemo.Pages.widgets.Filters |
||||
|
{ |
||||
|
[ViewComponent] |
||||
|
public class DateRangeGlobalFilterViewComponent : ViewComponent |
||||
|
{ |
||||
|
public const string Name = "DateRangeGlobalFilter"; |
||||
|
|
||||
|
public const string DisplayName = "Date Range Filter"; |
||||
|
|
||||
|
public IViewComponentResult Invoke() |
||||
|
{ |
||||
|
return View("/Pages/widgets/Filters/DateRangeGlobalFilterViewComponent.cshtml", new DateRangeGlobalFilterViewComponent()); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,10 +0,0 @@ |
|||||
@inject IHtmlLocalizer<DashboardDemoResource> L |
|
||||
@using DashboardDemo.Localization.DashboardDemo |
|
||||
@using Microsoft.AspNetCore.Mvc.Localization |
|
||||
@model DashboardDemo.Pages.widgets.Filters.RefreshGlobalFilterViewComponent |
|
||||
@{ |
|
||||
} |
|
||||
<div id="RefreshGlobalFilterContainer"> |
|
||||
<abp-button button-type="Success" text="@L["Refresh"].Value" id="GlobalRefreshButton"/> |
|
||||
</div> |
|
||||
|
|
||||
@ -1,17 +0,0 @@ |
|||||
using Microsoft.AspNetCore.Mvc; |
|
||||
|
|
||||
namespace DashboardDemo.Pages.widgets.Filters |
|
||||
{ |
|
||||
[ViewComponent] |
|
||||
public class RefreshGlobalFilterViewComponent : ViewComponent |
|
||||
{ |
|
||||
public const string GlobalFilterName = "RefreshGlobalFilter"; |
|
||||
|
|
||||
public const string DisplayName = "Refresh Filter"; |
|
||||
|
|
||||
public IViewComponentResult Invoke() |
|
||||
{ |
|
||||
return View("/Pages/widgets/Filters/RefreshGlobalFilterViewComponent.cshtml", new RefreshGlobalFilterViewComponent()); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
Loading…
Reference in new issue