From d4cc9663f551286cae15b29925b112d5942d826f Mon Sep 17 00:00:00 2001 From: Ed Charbeneau Date: Fri, 2 Oct 2020 12:02:26 -0400 Subject: [PATCH] - Add markdown docs - Updated Telerik UI to lastest - Fixed minor theme elements - Updated Localization --- .../Client/BlazingCoffee.Client.csproj | 21 +- BlazingCoffee/Client/Pages/Index.razor | 95 +-- .../Client/Pages/ManageEmployees.razor | 10 +- .../Client/Pages/ManageProducts.razor | 17 +- .../Client/Pages/ManageProducts.razor.md | 25 +- .../Client/Pages/SalesReports/Sales.razor | 2 +- BlazingCoffee/Client/Program.cs | 4 +- .../{PublicClient.cs => PublicHttp.cs} | 4 +- .../Client/Shared/CoffeeComponentBase.cs | 21 + .../Client/Shared/Layouts/MainLayout.razor | 40 +- .../Client/Shared/Layouts/MainLayoutState.cs | 23 + BlazingCoffee/Client/Theme/_docs.scss | 8 + BlazingCoffee/Client/Theme/main.scss | 11 +- BlazingCoffee/Client/_Imports.razor | 3 +- BlazingCoffee/Client/libman.json | 19 + BlazingCoffee/Client/package-lock.json | 6 +- BlazingCoffee/Client/package.json | 2 +- .../Client/wwwroot/docs/Index.razor.md | 9 + .../wwwroot/docs/ManageEmployees.razor.md | 6 + .../wwwroot/docs/ManageProducts.razor.md | 22 + .../Client/wwwroot/docs/Sales.razor.md | 21 + .../Server/BlazingCoffee.Server.csproj | 44 +- .../Shared/BlazingCoffee.Shared.csproj | 8 +- .../Shared/Resources/Global.Designer.cs | 9 + .../Shared/Resources/Global.bg-BG.resx | 3 + .../Shared/Resources/Global.de-DE.resx | 3 + .../Shared/Resources/Global.es-ES.resx | 3 + .../Shared/Resources/Global.nl-NL.resx | 3 + BlazingCoffee/Shared/Resources/Global.resx | 3 + .../Resources/TelerikMessages.Designer.cs | 558 ++++++++++++++++++ .../Resources/TelerikMessages.bg-BG.resx | 189 +++++- .../Resources/TelerikMessages.de-DE.resx | 193 +++++- .../Resources/TelerikMessages.es-ES.resx | 110 +++- .../Shared/Resources/TelerikMessages.resx | 242 +++++++- 34 files changed, 1570 insertions(+), 167 deletions(-) rename BlazingCoffee/Client/Services/{PublicClient.cs => PublicHttp.cs} (69%) create mode 100644 BlazingCoffee/Client/Shared/CoffeeComponentBase.cs create mode 100644 BlazingCoffee/Client/Shared/Layouts/MainLayoutState.cs create mode 100644 BlazingCoffee/Client/Theme/_docs.scss create mode 100644 BlazingCoffee/Client/libman.json create mode 100644 BlazingCoffee/Client/wwwroot/docs/Index.razor.md create mode 100644 BlazingCoffee/Client/wwwroot/docs/ManageEmployees.razor.md create mode 100644 BlazingCoffee/Client/wwwroot/docs/ManageProducts.razor.md create mode 100644 BlazingCoffee/Client/wwwroot/docs/Sales.razor.md diff --git a/BlazingCoffee/Client/BlazingCoffee.Client.csproj b/BlazingCoffee/Client/BlazingCoffee.Client.csproj index cc5107c..90a2e26 100644 --- a/BlazingCoffee/Client/BlazingCoffee.Client.csproj +++ b/BlazingCoffee/Client/BlazingCoffee.Client.csproj @@ -17,18 +17,25 @@ - - - - - + + + + + + - - + + + + + + + + diff --git a/BlazingCoffee/Client/Pages/Index.razor b/BlazingCoffee/Client/Pages/Index.razor index b276a43..b50abed 100644 --- a/BlazingCoffee/Client/Pages/Index.razor +++ b/BlazingCoffee/Client/Pages/Index.razor @@ -1,38 +1,65 @@ @page "/" -@inject ITelerikStringLocalizer L +@inherits CoffeeComponentBase +@inject Blazored.LocalStorage.ILocalStorageService localStorage + + + + + + +

@L["Index_SalesCard_Description"]

+ + +
+
+ + + +

@L["Index_SalesCard_Description"]

+ + +
+
+ + + +

@L["Index_ProductsCard_Description"]

+ + +
+
+
+
+
- - -

@L["Index_SalesCard_Description"]

-
- - @L["Sales"] - - - - -
- - -

@L["Index_SalesCard_Description"]

-
- - @L["HumanCapital"] - - - - -
- - -

@L["Index_ProductsCard_Description"]

-
- - @L["ManageProducts"] - - - - -
+ +@code { + TelerikTileLayout tileLayout { get; set; } + + async Task SaveState() + { + await localStorage.SetItemAsync("IndexLayout", tileLayout.GetState()); + } + + protected override async Task OnAfterRenderAsync(bool firstRender) + { + if (firstRender) + { + var state = await localStorage.GetItemAsync("IndexLayout"); + if (state != null) + { + tileLayout.SetState(state); + } + } + } +} \ No newline at end of file diff --git a/BlazingCoffee/Client/Pages/ManageEmployees.razor b/BlazingCoffee/Client/Pages/ManageEmployees.razor index fdb4fb3..2f46367 100644 --- a/BlazingCoffee/Client/Pages/ManageEmployees.razor +++ b/BlazingCoffee/Client/Pages/ManageEmployees.razor @@ -1,11 +1,17 @@ +@inherits CoffeeComponentBase @attribute [Authorize] @page "/manage-employees" @inject HttpClient Http @using Telerik.Blazor.Services -@inject ITelerikStringLocalizer L - +