From 5f955499e2751be78e9f71f0f68906888f3d6c61 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 16 Sep 2022 10:32:47 +0200 Subject: [PATCH 1/4] Fix file favicon e logfolder --- MP.SPEC/MP.SPEC.csproj | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index d6e8553e..45d1f9ee 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -28,4 +28,16 @@ + + + Always + + + + + + Always + + + From 10d9625b6d72f47462f89a32b7d0f06560aab9d4 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 16 Sep 2022 10:33:03 +0200 Subject: [PATCH 2/4] fix articoli: - tolto refuso cancellazione csv temp appoggio --- MP.SPEC/Pages/Articoli.razor.cs | 45 +++++++++------------------------ 1 file changed, 12 insertions(+), 33 deletions(-) diff --git a/MP.SPEC/Pages/Articoli.razor.cs b/MP.SPEC/Pages/Articoli.razor.cs index 077e64ee..c2f10873 100644 --- a/MP.SPEC/Pages/Articoli.razor.cs +++ b/MP.SPEC/Pages/Articoli.razor.cs @@ -44,13 +44,13 @@ namespace MP.SPEC.Pages #region Protected Properties [Inject] - protected IJSRuntime JSRuntime { get; set; } + protected IJSRuntime JSRuntime { get; set; } = null!; [Inject] - protected MpDataService MDService { get; set; } + protected MpDataService MDService { get; set; } = null!; [Inject] - protected MessageService MessageService { get; set; } + protected MessageService MessageService { get; set; } = null!; [Inject] protected NavigationManager NavManager { get; set; } @@ -78,7 +78,7 @@ namespace MP.SPEC.Pages /// protected async Task addNew() { - currRecord = new MP.Data.DatabaseModels.AnagArticoli() + currRecord = new AnagArticoli() { CodArticolo = $"_NEW_{DateTime.Now:yyyyMMdd.HHmmss}", DescArticolo = "Nuovo articolo", @@ -101,7 +101,7 @@ namespace MP.SPEC.Pages /// /// /// - protected async Task deleteRecord(MP.Data.DatabaseModels.AnagArticoli selRec) + protected async Task deleteRecord(AnagArticoli selRec) { if (!await JSRuntime.InvokeAsync("confirm", "Eliminazione Articolo: sei sicuro di voler procedere?")) return; @@ -124,7 +124,6 @@ namespace MP.SPEC.Pages protected override async Task OnInitializedAsync() { - clearFile(); numRecord = 10; // mostro ricerca MessageService.ShowSearch = true; @@ -142,7 +141,6 @@ namespace MP.SPEC.Pages protected void ResetData() { - clearFile(); currRecord = null; } @@ -152,13 +150,13 @@ namespace MP.SPEC.Pages await Task.Delay(1); } - protected async Task selRecord(MP.Data.DatabaseModels.AnagArticoli selRec) + protected async Task selRecord(AnagArticoli selRec) { currRecord = selRec; await Task.Delay(1); } - protected async Task update(MP.Data.DatabaseModels.AnagArticoli selRec) + protected async Task update(AnagArticoli selRec) { if (!await JSRuntime.InvokeAsync("confirm", "Confermi di voler salvare le modifiche?")) return; @@ -180,12 +178,11 @@ namespace MP.SPEC.Pages #region Private Fields private string _selAzienda = "*"; - private MP.Data.DatabaseModels.AnagArticoli? currRecord = null; - private string fileName = "Controlli.csv"; - private List? ListAziende; - private List? ListRecords; - private List? ListTipoArt; - private List? SearchRecords; + private AnagArticoli? currRecord = null; + private List? ListAziende; + private List? ListRecords; + private List? ListTipoArt; + private List? SearchRecords; #endregion Private Fields @@ -209,11 +206,6 @@ namespace MP.SPEC.Pages } } - private string fullPath - { - get => $"{Directory.GetCurrentDirectory()}\\temp\\{fileName}"; - } - private bool isLoading { get; set; } = false; private int numRecord @@ -274,19 +266,6 @@ namespace MP.SPEC.Pages return answ; } - private async void clearFile() - { - await Task.Run(() => File.Delete(fullPath)); - } - - private async Task ExportCsv() - { - isLoading = true; - // salvo davvero! - await MP.Data.Utils.SaveToCsv(SearchRecords, fullPath); - isLoading = false; - } - private async Task reloadData() { isLoading = true; From 92c196023dc232a0037344656474c5fbe0a7f04f Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 16 Sep 2022 10:33:13 +0200 Subject: [PATCH 3/4] fix posizione img home page --- MP.SPEC/Pages/Index.razor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MP.SPEC/Pages/Index.razor b/MP.SPEC/Pages/Index.razor index 82a68f49..b3173e20 100644 --- a/MP.SPEC/Pages/Index.razor +++ b/MP.SPEC/Pages/Index.razor @@ -6,13 +6,13 @@
- +
MAPO SPEC
- +
From 6ea938a91ab197ac391bd12defafddd00a6c6601 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 16 Sep 2022 10:36:25 +0200 Subject: [PATCH 4/4] Aggiunta web.config x windows auth --- MP.SPEC/web.config | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 MP.SPEC/web.config diff --git a/MP.SPEC/web.config b/MP.SPEC/web.config new file mode 100644 index 00000000..8b60d983 --- /dev/null +++ b/MP.SPEC/web.config @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file