-
-
-
About
+
+
-
-
- @Body
-
-
+
+
+@code {
+ bool ShowSearch { get; set; } = false;
+
+ protected override void OnInitialized()
+ {
+ MessageService.EA_ShowSearch += OnShowSearch;
+ MessageService.EA_HideSearch += OnHideSearch;
+ }
+ public void OnShowSearch()
+ {
+ ShowSearch = true;
+ InvokeAsync(() =>
+ {
+ StateHasChanged();
+ });
+ }
+ public void OnHideSearch()
+ {
+ ShowSearch = false;
+ InvokeAsync(() =>
+ {
+ StateHasChanged();
+ });
+ }
+
+ public void Dispose()
+ {
+ MessageService.EA_ShowSearch -= OnShowSearch;
+ MessageService.EA_ShowSearch -= OnHideSearch;
+ }
+
+}
\ No newline at end of file
diff --git a/MP-STATS/Shared/MainLayout.razor.css b/MP-STATS/Shared/MainLayout.razor.css
index 43c355a4..83f592d8 100644
--- a/MP-STATS/Shared/MainLayout.razor.css
+++ b/MP-STATS/Shared/MainLayout.razor.css
@@ -9,15 +9,15 @@
}
.sidebar {
- background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
+ background-image: linear-gradient(180deg, rgb(5, 39, 103) 20%, #3aa6ff 90%);
}
.top-row {
background-color: #f7f7f7;
border-bottom: 1px solid #d6d5d5;
- justify-content: flex-end;
height: 3.5rem;
- display: flex;
+ /*justify-content: space-evenly;
+ display: flex;*/
align-items: center;
}
@@ -31,6 +31,26 @@
text-overflow: ellipsis;
}
+.bottom-row {
+ color: #dedede;
+ background-color: #000000;
+ /*border-bottom: 1px solid #313131;*/
+ /*justify-content: flex-end;*/
+ height: 2rem;
+ /*display: flex;*/
+ align-items: center;
+}
+
+ .bottom-row ::deep a, .top-row .btn-link {
+ white-space: nowrap;
+ margin-left: 1.5rem;
+ }
+
+ .bottom-row a:first-child {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+
@media (max-width: 640.98px) {
.top-row:not(.auth) {
display: none;
@@ -63,8 +83,14 @@
z-index: 1;
}
+ .bottom-row {
+ position: fixed;
+ bottom: 0;
+ z-index: 1;
+ }
+
.main > div {
padding-left: 2rem !important;
padding-right: 1.5rem !important;
}
-}
+}
\ No newline at end of file
diff --git a/MP-STATS/Shared/NavMenu.razor b/MP-STATS/Shared/NavMenu.razor
index 0ce829a6..c7710983 100644
--- a/MP-STATS/Shared/NavMenu.razor
+++ b/MP-STATS/Shared/NavMenu.razor
@@ -12,14 +12,14 @@
Home
+ @*
+
+ Diario Impianti
+
+ *@
-
- Diario Impianti
-
-
-
-
- Produzione
+
+ Diario Produzione
@@ -29,7 +29,7 @@
- Controlli
+ Controlli
@*
diff --git a/MP-STATS/Shared/SurveyPrompt.razor b/MP-STATS/Shared/SurveyPrompt.razor
deleted file mode 100644
index 66edfb87..00000000
--- a/MP-STATS/Shared/SurveyPrompt.razor
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
@Title
-
-
- Please take our
- brief survey
-
- and tell us what you think.
-
-
-@code {
- // Demonstrates how a parent component can supply parameters
- [Parameter]
- public string Title { get; set; }
-}
diff --git a/MP-STATS/Startup.cs b/MP-STATS/Startup.cs
index 4a5e50f8..278ea222 100644
--- a/MP-STATS/Startup.cs
+++ b/MP-STATS/Startup.cs
@@ -11,6 +11,9 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
+using Microsoft.AspNetCore.Localization;
+using System.Globalization;
+
namespace MP_STATS
{
public class Startup
@@ -26,8 +29,15 @@ namespace MP_STATS
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
+
+
+ services.AddLocalization();
+
services.AddRazorPages();
services.AddServerSideBlazor();
+ //services.AddSingleton();
+ //services.AddScoped();
+ services.AddScoped();
services.AddSingleton();
}
@@ -45,6 +55,17 @@ namespace MP_STATS
app.UseHsts();
}
+ // cultura IT...
+ var supportedCultures = new[]{
+ new CultureInfo("it-IT")
+ };
+ app.UseRequestLocalization(new RequestLocalizationOptions
+ {
+ DefaultRequestCulture = new RequestCulture("it-IT"),
+ SupportedCultures = supportedCultures,
+ FallBackToParentCultures = false
+ });
+ CultureInfo.DefaultThreadCurrentCulture = CultureInfo.CreateSpecificCulture("it-IT");
app.UseHttpsRedirection();
app.UseStaticFiles();
diff --git a/MP-STATS/Startup.cs.bak b/MP-STATS/Startup.cs.bak
new file mode 100644
index 00000000..137eb51f
--- /dev/null
+++ b/MP-STATS/Startup.cs.bak
@@ -0,0 +1,74 @@
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.HttpsPolicy;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using MP_STATS.Data;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+using Microsoft.AspNetCore.Localization;
+using System.Globalization;
+
+namespace MP_STATS
+{
+ public class Startup
+ {
+ public Startup(IConfiguration configuration)
+ {
+ Configuration = configuration;
+ }
+
+ public IConfiguration Configuration { get; }
+
+ // This method gets called by the runtime. Use this method to add services to the container.
+ // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
+ public void ConfigureServices(IServiceCollection services)
+ {
+ services.AddRazorPages();
+ services.AddServerSideBlazor();
+ services.AddSingleton();
+ }
+
+ // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
+ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
+ {
+ if (env.IsDevelopment())
+ {
+ app.UseDeveloperExceptionPage();
+ }
+ else
+ {
+ app.UseExceptionHandler("/Error");
+ // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
+ app.UseHsts();
+ }
+
+ // cultura IT...
+ var supportedCultures = new[]{
+ new CultureInfo("it-IT")
+ };
+ app.UseRequestLocalization(new RequestLocalizationOptions
+ {
+ DefaultRequestCulture = new RequestCulture("it-IT"),
+ SupportedCultures = supportedCultures,
+ FallBackToParentCultures = false
+ });
+ CultureInfo.DefaultThreadCurrentCulture = CultureInfo.CreateSpecificCulture("it-IT");
+ app.UseHttpsRedirection();
+ app.UseStaticFiles();
+
+ app.UseRouting();
+
+ app.UseEndpoints(endpoints =>
+ {
+ endpoints.MapBlazorHub();
+ endpoints.MapFallbackToPage("/_Host");
+ });
+ }
+ }
+}
diff --git a/MP-STATS/appsettings.Production.json b/MP-STATS/appsettings.Production.json
new file mode 100644
index 00000000..298577c1
--- /dev/null
+++ b/MP-STATS/appsettings.Production.json
@@ -0,0 +1,13 @@
+{
+ "DetailedErrors": true,
+ "Logging": {
+ "LogLevel": {
+ "Default": "Trace",
+ "Microsoft": "Warning",
+ "Microsoft.Hosting.Lifetime": "Information"
+ }
+ },
+ "AllowedHosts": "*",
+ "SherpaBBM": "Data Source=SQL2012DEV;Initial Catalog=SHERPA.BBM;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;",
+ "SherpaFatt": "Data Source=SQL2012DEV;Initial Catalog=SHERPA.Fatt;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;"
+}
\ No newline at end of file
diff --git a/MP-STATS/appsettings.Staging.json b/MP-STATS/appsettings.Staging.json
new file mode 100644
index 00000000..298577c1
--- /dev/null
+++ b/MP-STATS/appsettings.Staging.json
@@ -0,0 +1,13 @@
+{
+ "DetailedErrors": true,
+ "Logging": {
+ "LogLevel": {
+ "Default": "Trace",
+ "Microsoft": "Warning",
+ "Microsoft.Hosting.Lifetime": "Information"
+ }
+ },
+ "AllowedHosts": "*",
+ "SherpaBBM": "Data Source=SQL2012DEV;Initial Catalog=SHERPA.BBM;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;",
+ "SherpaFatt": "Data Source=SQL2012DEV;Initial Catalog=SHERPA.Fatt;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;"
+}
\ No newline at end of file
diff --git a/MP-STATS/appsettings.json b/MP-STATS/appsettings.json
index d9d9a9bf..93a81b25 100644
--- a/MP-STATS/appsettings.json
+++ b/MP-STATS/appsettings.json
@@ -1,10 +1,12 @@
{
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft": "Warning",
- "Microsoft.Hosting.Lifetime": "Information"
- }
- },
- "AllowedHosts": "*"
-}
+ "Logging": {
+ "LogLevel": {
+ "Default": "Trace",
+ "Microsoft": "Warning",
+ "Microsoft.Hosting.Lifetime": "Information"
+ }
+ },
+ "AllowedHosts": "*",
+ "SherpaBBM": "Data Source=SQL2012DEV;Initial Catalog=SHERPA.BBM;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;",
+ "SherpaFatt": "Data Source=SQL2012DEV;Initial Catalog=SHERPA.Fatt;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;"
+}
\ No newline at end of file
diff --git a/MP-STATS/appsettings.json.bak b/MP-STATS/appsettings.json.bak
new file mode 100644
index 00000000..d9d9a9bf
--- /dev/null
+++ b/MP-STATS/appsettings.json.bak
@@ -0,0 +1,10 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft": "Warning",
+ "Microsoft.Hosting.Lifetime": "Information"
+ }
+ },
+ "AllowedHosts": "*"
+}
diff --git a/MP-STATS/wwwroot/css/fonts.less b/MP-STATS/wwwroot/css/fonts.less
new file mode 100644
index 00000000..3f6c81ba
--- /dev/null
+++ b/MP-STATS/wwwroot/css/fonts.less
@@ -0,0 +1,24 @@
+/* lato-regular - latin */
+@font-face {
+ font-family: 'Lato';
+ font-style: normal;
+ font-weight: 400;
+ src: url('../fonts/lato-v17-latin-regular.eot'); /* IE9 Compat Modes */
+ src: local(''), url('../fonts/lato-v17-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
+ url('../fonts/lato-v17-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
+ url('../fonts/lato-v17-latin-regular.woff') format('woff'), /* Modern Browsers */
+ url('../fonts/lato-v17-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
+ url('../fonts/lato-v17-latin-regular.svg#Lato') format('svg'); /* Legacy iOS */
+}
+/* roboto-regular - latin */
+@font-face {
+ font-family: 'Roboto';
+ font-style: normal;
+ font-weight: 400;
+ src: url('../fonts/roboto-v27-latin-regular.eot'); /* IE9 Compat Modes */
+ src: local(''), url('../fonts/roboto-v27-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
+ url('../fonts/roboto-v27-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
+ url('../fonts/roboto-v27-latin-regular.woff') format('woff'), /* Modern Browsers */
+ url('../fonts/roboto-v27-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
+ url('../fonts/roboto-v27-latin-regular.svg#Roboto') format('svg'); /* Legacy iOS */
+}
\ No newline at end of file
diff --git a/MP-STATS/wwwroot/css/site.less b/MP-STATS/wwwroot/css/site.less
new file mode 100644
index 00000000..218dff25
--- /dev/null
+++ b/MP-STATS/wwwroot/css/site.less
@@ -0,0 +1,175 @@
+@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
+@import url('fonts.min.css');
+
+h1, h2, h3, h4, h5, h6, b {
+ font-family: 'Roboto', sans-serif;
+}
+
+html, body {
+ font-family: 'Lato', sans-serif;
+}
+
+a, .btn-link {
+ color: #0366d6;
+}
+
+.btn-primary {
+ color: #fff;
+ background-color: #1b6ec2;
+ border-color: #1861ac;
+}
+
+.content {
+ padding-top: 1.1rem;
+}
+
+.valid.modified:not([type=checkbox]) {
+ outline: 1px solid #26b050;
+}
+
+.invalid {
+ outline: 1px solid red;
+}
+
+.validation-message {
+ color: red;
+}
+
+#blazor-error-ui {
+ background: lightyellow;
+ bottom: 0;
+ box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
+ display: none;
+ left: 0;
+ padding: 0.6rem 1.25rem 0.7rem 1.25rem;
+ position: fixed;
+ width: 100%;
+ z-index: 1000;
+}
+
+#blazor-error-ui .dismiss {
+ cursor: pointer;
+ position: absolute;
+ right: 0.75rem;
+ top: 0.5rem;
+}
+
+/*------------------------------------------------------------------
+[ Shortcuts / .shortcuts ]
+*/
+
+@blSCut: 1rem;
+
+.shortcuts {
+ text-align: center;
+}
+
+.shortcuts .shortcut-icon {
+ font-size: 2*@blSCut;
+}
+
+.shortcuts .shortcut {
+ min-width: @blSCut * 9;
+ min-height: @blSCut * 5;
+ display: inline-block;
+ padding: @blSCut*2/3 0;
+ margin: 0 2px 1em;
+ vertical-align: top;
+ text-decoration: none;
+ background: #F3F3F3;
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#eeeeee));
+ background-image: -webkit-linear-gradient(top, #ffffff, 0%, #eeeeee, 100%);
+ background-image: -moz-linear-gradient(top, #ffffff 0%, #eeeeee 100%);
+ background-image: linear-gradient(to bottom, #ffffff 0%, #eeeeee 100%);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffeeeeee', GradientType=0);
+ border: 1px solid #ddd;
+ box-sizing: border-box;
+ border-radius: @blSCut/2;
+}
+
+.shortcuts .shortcut-sm {
+ min-width: @blSCut * 4.5;
+ min-height: @blSCut * 3;
+ display: inline-block;
+ padding: @blSCut/4 0;
+ margin: 0 2px 1em;
+ vertical-align: top;
+ text-decoration: none;
+ background: #F3F3F3;
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#eeeeee));
+ background-image: -webkit-linear-gradient(top, #ffffff, 0%, #eeeeee, 100%);
+ background-image: -moz-linear-gradient(top, #ffffff 0%, #eeeeee 100%);
+ background-image: linear-gradient(to bottom, #ffffff 0%, #eeeeee 100%);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffeeeeee', GradientType=0);
+ border: 1px solid #ddd;
+ box-sizing: border-box;
+ border-radius: @blSCut/2;
+}
+
+.shortcuts .shortcut .shortcut-icon {
+ width: 100%;
+ margin-top: 0;
+ margin-bottom: 0;
+ font-size: @blSCut*2;
+ color: #333;
+}
+
+.shortcuts .shortcut-sm .shortcut-icon {
+ width: 100%;
+ margin-top: 0;
+ margin-bottom: 0;
+ font-size: @blSCut*2;
+ color: #333;
+}
+
+.shortcuts .shortcut:hover {
+ background: #E8E8E8;
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fafafa), to(#e1e1e1));
+ background-image: -webkit-linear-gradient(top, #fafafa, 0%, #e1e1e1, 100%);
+ background-image: -moz-linear-gradient(top, #fafafa 0%, #e1e1e1 100%);
+ background-image: linear-gradient(to bottom, #fafafa 0%, #e1e1e1 100%);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa', endColorstr='#ffe1e1e1', GradientType=0);
+}
+
+.shortcuts .shortcut-sm:hover {
+ background: #E8E8E8;
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fafafa), to(#e1e1e1));
+ background-image: -webkit-linear-gradient(top, #fafafa, 0%, #e1e1e1, 100%);
+ background-image: -moz-linear-gradient(top, #fafafa 0%, #e1e1e1 100%);
+ background-image: linear-gradient(to bottom, #fafafa 0%, #e1e1e1 100%);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa', endColorstr='#ffe1e1e1', GradientType=0);
+}
+
+.shortcuts .shortcut:active {
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+}
+
+.shortcuts .shortcut-sm:active {
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+}
+
+.shortcuts .shortcut:hover .shortcut-icon {
+ color: #C93;
+}
+
+.shortcuts .shortcut-sm:hover .shortcut-icon {
+ color: #666;
+}
+
+.shortcuts .shortcut-label {
+ display: block;
+ margin-top: .75em;
+ font-weight: 400;
+ color: #666;
+}
+
+@media (max-width: 992px) {
+ .shortcuts .shortcut {
+ min-width: @blSCut * 8;
+ min-height: @blSCut * 4;
+ }
+}
\ No newline at end of file
diff --git a/MP-STATS/wwwroot/img/LogoBlu.svg b/MP-STATS/wwwroot/img/LogoBlu.svg
new file mode 100644
index 00000000..20a55c39
--- /dev/null
+++ b/MP-STATS/wwwroot/img/LogoBlu.svg
@@ -0,0 +1,95 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MP-STATS/wwwroot/js/debounce.js b/MP-STATS/wwwroot/js/debounce.js
new file mode 100644
index 00000000..36556c3a
--- /dev/null
+++ b/MP-STATS/wwwroot/js/debounce.js
@@ -0,0 +1,5 @@
+import _ from 'https://cdn.skypack.dev/lodash';
+
+export function helloWorld() {
+ prompt(_.VERSION);
+}
\ No newline at end of file
diff --git a/MP-STATS/wwwroot/js/external.js b/MP-STATS/wwwroot/js/external.js
new file mode 100644
index 00000000..e6e3102a
--- /dev/null
+++ b/MP-STATS/wwwroot/js/external.js
@@ -0,0 +1,10 @@
+window.global = {
+ openModal: function (modalId) {
+ modalId = '#' + modalId;
+ $(modalId).modal('show');
+ },
+ closeModal: function (modalId) {
+ modalId = '#' + modalId;
+ $(modalId).modal('hide');
+ },
+}
\ No newline at end of file