This commit is contained in:
Ed Charbeneau 2020-07-29 11:57:10 -04:00
Родитель 280f4e0e26
Коммит e6f7920d30
9 изменённых файлов: 283 добавлений и 15 удалений

Просмотреть файл

@ -2,15 +2,16 @@
@using System.Globalization
@attribute [Authorize]
@inject HttpClient Http
@inject ITelerikStringLocalizer L
<!-- Demo 1: Remote Sort, Filter, and Paging -->
<SalesByDateChart Data="chartData"></SalesByDateChart>
<CardContainer Title="Sales">
<CardContainer Title="@L["Sales"]">
<TelerikGrid @ref="Grid" Height="500px" FilterMode="@GridFilterMode.FilterMenu"
Sortable="true" Pageable="true" PageSize="10"
OnStateInit="@((GridStateEventArgs<Sale> args) => OnStateInit(args))"
Data=@Model.CurrentPageData TotalCount=@Model.TotalItemCount OnRead=@ReadItems>
<GridToolBar>
<label>Report Range:</label>
<label>@L["Sales_Grid_Toolbar_ReportRange"]</label>
<TelerikDateRangePicker StartValue="@StartValue" EndValue="@EndValue"
BottomView="CalendarView.Year"
StartValueChanged="@((DateTime? sV) => StartValueChangedHandler(sV))"
@ -18,7 +19,7 @@
</TelerikDateRangePicker>
</GridToolBar>
<GridColumns>
<GridColumn Field="@nameof(Sale.Amount)">
<GridColumn Field="@nameof(Sale.Amount)" Title="@L["Sales_Grid_Title_Amount"]">
<Template>
@{
var prod = (Sale)context;
@ -26,11 +27,11 @@
}
</Template>
</GridColumn>
<GridColumn Field="@nameof(Sale.Region)"></GridColumn>
<GridColumn Field="@nameof(Sale.Country)"></GridColumn>
<GridColumn Field="@nameof(Sale.Sku)"></GridColumn>
<GridColumn Field="@nameof(Sale.StoreId)"></GridColumn>
<GridColumn Field="@nameof(Sale.TransactionDate)" Filterable="false">
<GridColumn Field="@nameof(Sale.Region)" Title="@L[""]"></GridColumn>
<GridColumn Field="@nameof(Sale.Country)" Title="@L["Sales_Grid_Title_Country"]"></GridColumn>
<GridColumn Field="@nameof(Sale.Sku)" Title="@L["Sales_Grid_Title_Sku"]"></GridColumn>
<GridColumn Field="@nameof(Sale.StoreId)" Title="@L["Sales_Grid_Title_StoreId"]"></GridColumn>
<GridColumn Field="@nameof(Sale.TransactionDate)" Title="@L["Sales_Grid_Title_TransactionDate"]" Filterable="false">
<Template>
@{
var prod = (Sale)context;
@ -88,7 +89,7 @@
//not updating the model will effectively cancel the event
StartValue = currStart;
Console.WriteLine($"start changed to: {currStart}");
//Console.WriteLine($"start changed to: {currStart}");
}
async Task EndValueChangedHandler(DateTime? currEnd)

Просмотреть файл

@ -1,11 +1,12 @@
@namespace BlazingCoffee.Client.Pages
@inject HttpClient Http
@inject ITelerikStringLocalizer L
@if (Data != null)
{
<CardContainer Title="Reporting">
<CardContainer Title="@L["Reporting"]">
<TelerikChart Height="230px">
<ChartTitle Text="Sales and Revenue Total" />
<ChartTitle Text="@L["ChartTitle_SalesAndRevenueTotal"]" />
<ChartSeriesItems>
@foreach (var item in Data.GroupBy(v => v.Region))
@ -20,7 +21,7 @@
<ChartValueAxes>
<ChartValueAxis Name="RevenueAxis">
<ChartValueAxisTitle Text="Total Sales" />
<ChartValueAxisTitle Text="@L["ChartValueAxisTitle_TotalSales"]" />
<ChartValueAxisLabels Format="{0:C}" />
<ChartValueAxisMajorGridLines Visible="false" />
</ChartValueAxis>

Просмотреть файл

@ -1,4 +1,6 @@
<div class="k-drawer-items">
@inject ITelerikStringLocalizer L
<div class="k-drawer-items">
<header>
<LoginDisplay />
</header>
@ -11,7 +13,7 @@
}
</ul>
<footer>
<h3 class="title">More Info</h3>
<h3 class="title">@L["Nav_MoreInfo"]</h3>
<ul role="menubar" aria-orientation="vertical">
<li class="k-drawer-item k-drawer-separator"></li>
@foreach (DrawerItem item in Data.Where(item => item.Group == "ext"))

99
BlazingCoffee/Shared/Resources/Global.Designer.cs сгенерированный
Просмотреть файл

@ -60,6 +60,24 @@ namespace BlazingCoffee.Shared.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Sales and Revenue Total.
/// </summary>
public static string ChartTitle_SalesAndRevenueTotal {
get {
return ResourceManager.GetString("ChartTitle_SalesAndRevenueTotal", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Total Sales.
/// </summary>
public static string ChartValueAxisTitle_TotalSales {
get {
return ResourceManager.GetString("ChartValueAxisTitle_TotalSales", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Cost.
/// </summary>
@ -240,6 +258,15 @@ namespace BlazingCoffee.Shared.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to More Info.
/// </summary>
public static string Nav_MoreInfo {
get {
return ResourceManager.GetString("Nav_MoreInfo", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Not Available.
/// </summary>
@ -276,6 +303,15 @@ namespace BlazingCoffee.Shared.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Reporting.
/// </summary>
public static string Reporting {
get {
return ResourceManager.GetString("Reporting", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Sales.
/// </summary>
@ -285,6 +321,69 @@ namespace BlazingCoffee.Shared.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Amount.
/// </summary>
public static string Sales_Grid_Title_Amount {
get {
return ResourceManager.GetString("Sales_Grid_Title_Amount", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Country.
/// </summary>
public static string Sales_Grid_Title_Country {
get {
return ResourceManager.GetString("Sales_Grid_Title_Country", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Region.
/// </summary>
public static string Sales_Grid_Title_Region {
get {
return ResourceManager.GetString("Sales_Grid_Title_Region", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Product.
/// </summary>
public static string Sales_Grid_Title_Sku {
get {
return ResourceManager.GetString("Sales_Grid_Title_Sku", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Store.
/// </summary>
public static string Sales_Grid_Title_StoreId {
get {
return ResourceManager.GetString("Sales_Grid_Title_StoreId", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Transaction Date.
/// </summary>
public static string Sales_Grid_Title_TransactionDate {
get {
return ResourceManager.GetString("Sales_Grid_Title_TransactionDate", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Report Range:.
/// </summary>
public static string Sales_Grid_Toolbar_ReportRange {
get {
return ResourceManager.GetString("Sales_Grid_Toolbar_ReportRange", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Select Theme.
/// </summary>

Просмотреть файл

@ -139,7 +139,7 @@
<value>Изисква се вход</value>
</data>
<data name="Toggle_Id" xml:space="preserve">
<value>Отворете / затворете ID</value>
<value>Отворете / затворете ИД</value>
</data>
<data name="Product" xml:space="preserve">
<value>Продукт</value>
@ -210,4 +210,37 @@
<data name="Employee_Grid_Title_Budget" xml:space="preserve">
<value>Бюджет</value>
</data>
<data name="Sales_Grid_Title_Sku" xml:space="preserve">
<value>Продукт</value>
</data>
<data name="Sales_Grid_Title_Amount" xml:space="preserve">
<value>Сума</value>
</data>
<data name="Sales_Grid_Title_Country" xml:space="preserve">
<value>Страна</value>
</data>
<data name="Sales_Grid_Title_StoreId" xml:space="preserve">
<value>Магазин</value>
</data>
<data name="Sales_Grid_Title_TransactionDate" xml:space="preserve">
<value>Дата на транзакция</value>
</data>
<data name="Sales_Grid_Title_Region" xml:space="preserve">
<value>Регион</value>
</data>
<data name="Sales_Grid_Toolbar_ReportRange" xml:space="preserve">
<value>Обхват на отчетите:!</value>
</data>
<data name="Reporting" xml:space="preserve">
<value>Отчитане</value>
</data>
<data name="ChartTitle_SalesAndRevenueTotal" xml:space="preserve">
<value>Общо продажби и приходи!</value>
</data>
<data name="Nav_MoreInfo" xml:space="preserve">
<value>Още информация...</value>
</data>
<data name="ChartValueAxisTitle_TotalSales" xml:space="preserve">
<value>Продажби общо</value>
</data>
</root>

Просмотреть файл

@ -210,4 +210,37 @@
<data name="Employee_Grid_Title_Budget" xml:space="preserve">
<value>Budget</value>
</data>
<data name="Sales_Grid_Title_Sku" xml:space="preserve">
<value>Produkt</value>
</data>
<data name="Sales_Grid_Title_Amount" xml:space="preserve">
<value>Betrag</value>
</data>
<data name="Sales_Grid_Title_Country" xml:space="preserve">
<value>Land</value>
</data>
<data name="Sales_Grid_Title_StoreId" xml:space="preserve">
<value>Store</value>
</data>
<data name="Sales_Grid_Title_TransactionDate" xml:space="preserve">
<value>Transaktionsdatum</value>
</data>
<data name="Sales_Grid_Title_Region" xml:space="preserve">
<value>Region</value>
</data>
<data name="Sales_Grid_Toolbar_ReportRange" xml:space="preserve">
<value>Berichtsbereich</value>
</data>
<data name="Reporting" xml:space="preserve">
<value>Berichterstellung</value>
</data>
<data name="ChartTitle_SalesAndRevenueTotal" xml:space="preserve">
<value>Umsatz und Umsatz insgesamt!</value>
</data>
<data name="Nav_MoreInfo" xml:space="preserve">
<value>Weitere Informationen ...</value>
</data>
<data name="ChartValueAxisTitle_TotalSales" xml:space="preserve">
<value>Gesamtumsatz</value>
</data>
</root>

Просмотреть файл

@ -210,4 +210,37 @@
<data name="Employee_Grid_Title_Budget" xml:space="preserve">
<value>Presupuesto</value>
</data>
<data name="Sales_Grid_Title_Sku" xml:space="preserve">
<value>Producto</value>
</data>
<data name="Sales_Grid_Title_Amount" xml:space="preserve">
<value>Importe</value>
</data>
<data name="Sales_Grid_Title_Country" xml:space="preserve">
<value>País</value>
</data>
<data name="Sales_Grid_Title_StoreId" xml:space="preserve">
<value>Tienda</value>
</data>
<data name="Sales_Grid_Title_TransactionDate" xml:space="preserve">
<value>Fecha de la transacción</value>
</data>
<data name="Sales_Grid_Title_Region" xml:space="preserve">
<value>Región</value>
</data>
<data name="Sales_Grid_Toolbar_ReportRange" xml:space="preserve">
<value>Rango</value>
</data>
<data name="Reporting" xml:space="preserve">
<value>Informes</value>
</data>
<data name="ChartTitle_SalesAndRevenueTotal" xml:space="preserve">
<value>Ventas e ingresos totales!</value>
</data>
<data name="Nav_MoreInfo" xml:space="preserve">
<value>Más información ...</value>
</data>
<data name="ChartValueAxisTitle_TotalSales" xml:space="preserve">
<value>Total de ventas</value>
</data>
</root>

Просмотреть файл

@ -190,4 +190,37 @@
<data name="Employee_Grid_Title_Budget" xml:space="preserve">
<value>Budget</value>
</data>
<data name="Sales_Grid_Title_Sku" xml:space="preserve">
<value>Product</value>
</data>
<data name="Sales_Grid_Title_Amount" xml:space="preserve">
<value>Bedrag</value>
</data>
<data name="Sales_Grid_Title_Country" xml:space="preserve">
<value>Land</value>
</data>
<data name="Sales_Grid_Title_StoreId" xml:space="preserve">
<value>Store</value>
</data>
<data name="Sales_Grid_Title_TransactionDate" xml:space="preserve">
<value>Transactiedatum</value>
</data>
<data name="Sales_Grid_Title_Region" xml:space="preserve">
<value>Regio</value>
</data>
<data name="Sales_Grid_Toolbar_ReportRange" xml:space="preserve">
<value>Rapportbereik :!</value>
</data>
<data name="Reporting" xml:space="preserve">
<value>Rapportage</value>
</data>
<data name="ChartTitle_SalesAndRevenueTotal" xml:space="preserve">
<value>Totaal omzet en omzet!</value>
</data>
<data name="Nav_MoreInfo" xml:space="preserve">
<value>Meer informatie ...</value>
</data>
<data name="ChartValueAxisTitle_TotalSales" xml:space="preserve">
<value>Totale verkoop</value>
</data>
</root>

Просмотреть файл

@ -210,4 +210,37 @@
<data name="Employee_Grid_Title_Budget" xml:space="preserve">
<value>Budget</value>
</data>
<data name="Sales_Grid_Title_Amount" xml:space="preserve">
<value>Amount</value>
</data>
<data name="Sales_Grid_Title_Country" xml:space="preserve">
<value>Country</value>
</data>
<data name="Sales_Grid_Title_Sku" xml:space="preserve">
<value>Product</value>
</data>
<data name="Sales_Grid_Title_StoreId" xml:space="preserve">
<value>Store</value>
</data>
<data name="Sales_Grid_Title_TransactionDate" xml:space="preserve">
<value>Transaction Date</value>
</data>
<data name="Sales_Grid_Title_Region" xml:space="preserve">
<value>Region</value>
</data>
<data name="Sales_Grid_Toolbar_ReportRange" xml:space="preserve">
<value>Report Range:</value>
</data>
<data name="Reporting" xml:space="preserve">
<value>Reporting</value>
</data>
<data name="ChartTitle_SalesAndRevenueTotal" xml:space="preserve">
<value>Sales and Revenue Total</value>
</data>
<data name="ChartValueAxisTitle_TotalSales" xml:space="preserve">
<value>Total Sales</value>
</data>
<data name="Nav_MoreInfo" xml:space="preserve">
<value>More Info</value>
</data>
</root>