From 3bba87736878015c504ba48b74295047653fd46e Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Fri, 10 Feb 2023 15:10:26 +0100 Subject: [PATCH] =?UTF-8?q?aggiunte=20funzionalit=C3=A0=20famiglie=20artic?= =?UTF-8?q?oli?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- StockMan.CORE/Components/EditButtons.razor | 8 ++ StockMan.CORE/Components/EditButtons.razor.cs | 42 +++++++++++ .../Components/EditButtons.razor.less | 30 ++++++++ StockMan.CORE/Components/ItemFamList.razor | 42 +++++++++-- StockMan.CORE/Components/ItemFamList.razor.cs | 34 ++++++++- .../Components/ItemFamList.razor.css | 66 ++++++++++++++-- .../Components/ItemFamList.razor.less | 75 +++++++++++++++++-- .../Components/ItemFamList.razor.min.css | 2 +- StockMan.CORE/Components/NewNavMenu.razor.css | 1 - .../Components/NewNavMenu.razor.less | 2 +- .../Components/NewNavMenu.razor.min.css | 2 +- StockMan.CORE/Components/VisualButtons.razor | 10 +++ .../Components/VisualButtons.razor.cs | 42 +++++++++++ .../Components/VisualButtons.razor.css | 28 +++++++ .../Components/VisualButtons.razor.less | 30 ++++++++ .../Components/VisualButtons.razor.min.css | 1 + StockMan.CORE/Data/StockDataService.cs | 15 +++- StockMan.CORE/Shared/MainLayout.razor | 2 +- StockMan.CORE/Shared/MainLayout.razor.css | 10 ++- StockMan.CORE/Shared/MainLayout.razor.less | 12 ++- StockMan.CORE/Shared/MainLayout.razor.min.css | 2 +- StockMan.CORE/compilerconfig.json | 4 + StockMan.CORE/wwwroot/lib/menuCompression.js | 27 ++++++- StockMan.Data/Controllers/StoManController.cs | 49 ++++++++++-- 24 files changed, 499 insertions(+), 37 deletions(-) create mode 100644 StockMan.CORE/Components/EditButtons.razor create mode 100644 StockMan.CORE/Components/EditButtons.razor.cs create mode 100644 StockMan.CORE/Components/EditButtons.razor.less create mode 100644 StockMan.CORE/Components/VisualButtons.razor create mode 100644 StockMan.CORE/Components/VisualButtons.razor.cs create mode 100644 StockMan.CORE/Components/VisualButtons.razor.css create mode 100644 StockMan.CORE/Components/VisualButtons.razor.less create mode 100644 StockMan.CORE/Components/VisualButtons.razor.min.css diff --git a/StockMan.CORE/Components/EditButtons.razor b/StockMan.CORE/Components/EditButtons.razor new file mode 100644 index 0000000..bf0ce21 --- /dev/null +++ b/StockMan.CORE/Components/EditButtons.razor @@ -0,0 +1,8 @@ +
+ +
+
+ +
\ No newline at end of file diff --git a/StockMan.CORE/Components/EditButtons.razor.cs b/StockMan.CORE/Components/EditButtons.razor.cs new file mode 100644 index 0000000..766f548 --- /dev/null +++ b/StockMan.CORE/Components/EditButtons.razor.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Components; +using System.Net.Http; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Components.Authorization; +using Microsoft.AspNetCore.Components.Forms; +using Microsoft.AspNetCore.Components.Routing; +using Microsoft.AspNetCore.Components.Web; +using Microsoft.AspNetCore.Components.Web.Virtualization; +using Microsoft.JSInterop; +using EgwCoreLib.Razor; +using EgwCoreLib.Razor.Data; +using StockMan.CORE; +using StockMan.CORE.Data; +using StockMan.CORE.Shared; + +namespace StockMan.CORE.Components +{ + public partial class EditButtons + { + [Parameter] + public string idForJs { get; set; } = ""; + + [Parameter] + public EventCallback callbackForJs { get; set; } + + [Inject] + protected IJSRuntime JSRuntime { get; set; } = null!; + + protected bool editMode = false; + + private async Task disableEdit() + { + await callbackForJs.InvokeAsync(editMode); + editMode = false; + await JSRuntime.InvokeVoidAsync("noEditing", idForJs); + } + } +} \ No newline at end of file diff --git a/StockMan.CORE/Components/EditButtons.razor.less b/StockMan.CORE/Components/EditButtons.razor.less new file mode 100644 index 0000000..c063a1c --- /dev/null +++ b/StockMan.CORE/Components/EditButtons.razor.less @@ -0,0 +1,30 @@ +.buttonDet, .buttonEdit { + width: 4rem; + height: 4rem; + display: flex; + align-content: center; + flex-wrap: wrap; +} + +.buttonDet button { + background-color: rgba(86,184,167,0.2); + border: none; + padding: 0; + text-align: center; + border-radius: 50%; + height: 75%; + width: 75%; + color: #56b8a7; +} + + +.buttonEdit button { + background-color: rgba(254,152,83,0.2); + border: none; + padding: 0; + text-align: center; + border-radius: 50%; + height: 75%; + width: 75%; + color: #fe9853; +} diff --git a/StockMan.CORE/Components/ItemFamList.razor b/StockMan.CORE/Components/ItemFamList.razor index 785c1ed..2599204 100644 --- a/StockMan.CORE/Components/ItemFamList.razor +++ b/StockMan.CORE/Components/ItemFamList.razor @@ -72,8 +72,11 @@ else
# ARTICOLI
-
- +
+ +
@foreach (var item in ListRecord) @@ -83,8 +86,9 @@ else @item.Id
- @item.Descr +
+
@item.NumItems
@@ -92,8 +96,36 @@ else *@
- -
+ +
+ @*@if (editMode) + { + + } + else + { + + }*@ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
diff --git a/StockMan.CORE/Components/ItemFamList.razor.cs b/StockMan.CORE/Components/ItemFamList.razor.cs index 79954c0..4250f35 100644 --- a/StockMan.CORE/Components/ItemFamList.razor.cs +++ b/StockMan.CORE/Components/ItemFamList.razor.cs @@ -21,6 +21,10 @@ namespace StockMan.CORE.Components protected StockDataService SDService { get; set; } = null!; [Inject] protected IJSRuntime JSRuntime { get; set; } = null!; + [Inject] + protected NavigationManager NavManager{ get; set; } = null!; + + protected bool editMode = false; public List? ListRecord { get; set; } = null; public List? SearchRecords { get; set; } = null; @@ -82,9 +86,37 @@ namespace StockMan.CORE.Components currRowSel = id; } await JSRuntime.InvokeVoidAsync("unSelectItem", currRowSel); + editMode = false; currRowSel = ""; - await JSRuntime.InvokeVoidAsync("selectItem", id); + if (currRowSel != id) + { + await JSRuntime.InvokeVoidAsync("selectItem", id); + } currRowSel = id; } + + //protected void changeEditMode(bool isEditing) + //{ + // editMode = isEditing; + //} + private async Task enableEdit(string id) + { + editMode = true; + await JSRuntime.InvokeVoidAsync("isEditing", id); + } + private async Task disableEdit() + { + editMode = false; + await JSRuntime.InvokeVoidAsync("noEditing", currRowSel); + } + protected async Task editItemFam(ItemFamilyModel selRec) + { + await SDService.ItemFamilyMod(selRec); + NavManager.NavigateTo(NavManager.Uri, true); + } + protected async Task showAddNew() + { + await JSRuntime.InvokeVoidAsync("showAddNew"); + } } } \ No newline at end of file diff --git a/StockMan.CORE/Components/ItemFamList.razor.css b/StockMan.CORE/Components/ItemFamList.razor.css index c90f846..d8aa9f4 100644 --- a/StockMan.CORE/Components/ItemFamList.razor.css +++ b/StockMan.CORE/Components/ItemFamList.razor.css @@ -39,6 +39,14 @@ align-content: center; flex-wrap: wrap; } +.categoria input { + background-color: transparent; + border: none; + width: 100%; +} +.categoria input:focus { + outline: 0; +} .numArt { width: 20%; display: flex; @@ -61,11 +69,12 @@ margin: 0.45rem 0 0 0; } .contenuto div { - padding: 0.5rem; + margin: 0 0.5rem 0 0.5rem; + /*padding: 0.5rem;*/ } .contenuto { border-radius: 0.5rem; - background: linear-gradient(to left, white 50%, rgba(92, 122, 255, 0.5) 50%) right; + background: linear-gradient(to left, white 50%, rgba(92, 122, 255, 0.2) 50%) right; background-size: 200%; transition: 1s cubic-bezier(0.5, 0.25, 0, 1); } @@ -89,9 +98,6 @@ background-color: transparent; color: #95a5a6; } -.button1:hover { - transform: rotate(-90deg); -} .button2 { background-color: #982649; color: #fff; @@ -124,8 +130,56 @@ border-color: #3547d4; } .hoverOptions { - background-color: #FF0000; + /*background-color: #FF0000;*/ height: 100%; width: 100%; + opacity: 0; + transition: visibility 0s, opacity 0.5s linear; + display: flex; + padding: 0; +} +.buttonDet, +.buttonEdit { + width: 4rem; + height: 4rem; + display: flex; + align-content: center; + flex-wrap: wrap; +} +.buttonDet button { + background-color: rgba(86, 184, 167, 0.2); + border: none; + padding: 0; + text-align: center; + border-radius: 50%; + height: 75%; + width: 75%; + color: #56b8a7; +} +.buttonEdit button { + background-color: rgba(254, 152, 83, 0.2); + border: none; + padding: 0; + text-align: center; + border-radius: 50%; + height: 75%; + width: 75%; + color: #fe9853; +} +.visualBlock { + display: flex; +} +.editBlock { display: none; +} +.dropDownNew { + background-color: #fff; + border-radius: 1rem; + border: 0.5rem solid #27ae60; + position: absolute; + height: 20rem; + right: 2.5rem; + z-index: 99999; + width: 0; + transition: 0.5s; } \ No newline at end of file diff --git a/StockMan.CORE/Components/ItemFamList.razor.less b/StockMan.CORE/Components/ItemFamList.razor.less index 907db9b..b3716ab 100644 --- a/StockMan.CORE/Components/ItemFamList.razor.less +++ b/StockMan.CORE/Components/ItemFamList.razor.less @@ -48,6 +48,16 @@ .labelsStyle; } +.categoria input { + background-color: transparent; + border: none; + width: 100%; +} + +.categoria input:focus { + outline: 0 +} + .numArt { width: 20%; .labelsStyle; @@ -70,14 +80,15 @@ } .contenuto div { - padding: 0.5rem; + margin: 0 0.5rem 0 0.5rem; + /*padding: 0.5rem;*/ //border-right: 0.1px solid rgb(189, 195, 199); //border-left: 0.1px solid rgb(189, 195, 199); } .contenuto { border-radius: 0.5rem; - background: linear-gradient(to left, white 50%, rgba(92, 122, 255, 0.5) 50%) right; + background: linear-gradient(to left, white 50%, rgba(92, 122, 255, 0.2) 50%) right; background-size: 200%; transition: 1s cubic-bezier(0.5,0.25,0,1); } @@ -106,8 +117,8 @@ color: rgb(149, 165, 166); } -.button1:hover{ - transform: rotate(-90deg); +.button1:hover { + //transform: rotate(-90deg); } .button2 { @@ -141,8 +152,62 @@ .hoverOptions { - background-color: #FF0000; + /*background-color: #FF0000;*/ height: 100%; width: 100%; + opacity: 0; + transition: visibility 0s, opacity 0.5s linear; + display: flex; + padding: 0; +} + +.buttonDet, .buttonEdit { + width: 4rem; + height: 4rem; + display: flex; + align-content: center; + flex-wrap: wrap; +} + +.buttonDet button { + background-color: rgba(86,184,167,0.2); + border: none; + padding: 0; + text-align: center; + border-radius: 50%; + height: 75%; + width: 75%; + color: #56b8a7; +} + + +.buttonEdit button { + background-color: rgba(254,152,83,0.2); + border: none; + padding: 0; + text-align: center; + border-radius: 50%; + height: 75%; + width: 75%; + color: #fe9853; +} + +.visualBlock { + display: flex; +} + +.editBlock { display: none; +} + +.dropDownNew { + background-color: #fff; + border-radius: 1rem; + border: 0.5rem solid #27ae60; + position: absolute; + height: 20rem; + right: 2.5rem; + z-index: 99999; + width: 0; + transition: 0.5s; } \ No newline at end of file diff --git a/StockMan.CORE/Components/ItemFamList.razor.min.css b/StockMan.CORE/Components/ItemFamList.razor.min.css index 22ab209..d568700 100644 --- a/StockMan.CORE/Components/ItemFamList.razor.min.css +++ b/StockMan.CORE/Components/ItemFamList.razor.min.css @@ -1 +1 @@ -.itemFamTable{width:100%;margin-bottom:1rem;background-color:#f7fbff;}.itemFamTable tbody tr{background-color:#fff;}.itemFamTable tr{padding-top:.5rem;margin-top:.5rem;border-radius:1rem;}.intestazione,.contenuto{display:flex;justify-content:space-between;}.intestazione{font-weight:bold;background-color:#ebf2fd;padding:.5rem;border-radius:.5rem;color:#a2adbd;}.labelsStyle{display:flex;align-content:center;flex-wrap:wrap;}.buttonCol{display:flex;justify-content:space-between;width:17%;}.categoria{width:25%;display:flex;align-content:center;flex-wrap:wrap;}.numArt{width:20%;display:flex;align-content:center;flex-wrap:wrap;}.idUni{width:20%;display:flex;align-content:center;flex-wrap:wrap;}.contenuto{box-shadow:rgba(149,157,165,.2) 0 8px 24px;margin:.45rem 0 0 0;}.contenuto div{padding:.5rem;}.contenuto{border-radius:.5rem;background:linear-gradient(to left,#fff 50%,rgba(92,122,255,.5) 50%) right;background-size:200%;transition:1s cubic-bezier(.5,.25,0,1);}.but2{display:flex;justify-content:space-between;width:17%;text-align:end;}.button1,.button2{margin-inline:.5rem;border:0;border-radius:.2rem;padding:.4rem;}.button1{transition:.5s;background-color:transparent;color:#95a5a6;}.button1:hover{transform:rotate(-90deg);}.button2{background-color:#982649;color:#fff;}.buttonNew{margin-inline:.5rem;border:0;border-radius:.2rem;padding:.4rem;transition:.5s;background-color:transparent;color:#95a5a6;background-color:#27ae60;color:#fff;}.butAddDiv{text-align:end;}.searchBar{background-color:transparent;border:0;border-bottom:1px solid #d1d1d1;width:75%;transition:border cubic-bezier(.49,.17,.43,.26) .3s;}.searchBar:focus{outline:0;border-color:#3547d4;}.hoverOptions{background-color:#f00;height:100%;width:100%;display:none;} \ No newline at end of file +.itemFamTable{width:100%;margin-bottom:1rem;background-color:#f7fbff;}.itemFamTable tbody tr{background-color:#fff;}.itemFamTable tr{padding-top:.5rem;margin-top:.5rem;border-radius:1rem;}.intestazione,.contenuto{display:flex;justify-content:space-between;}.intestazione{font-weight:bold;background-color:#ebf2fd;padding:.5rem;border-radius:.5rem;color:#a2adbd;}.labelsStyle{display:flex;align-content:center;flex-wrap:wrap;}.buttonCol{display:flex;justify-content:space-between;width:17%;}.categoria{width:25%;display:flex;align-content:center;flex-wrap:wrap;}.categoria input{background-color:transparent;border:0;width:100%;}.categoria input:focus{outline:0;}.numArt{width:20%;display:flex;align-content:center;flex-wrap:wrap;}.idUni{width:20%;display:flex;align-content:center;flex-wrap:wrap;}.contenuto{box-shadow:rgba(149,157,165,.2) 0 8px 24px;margin:.45rem 0 0 0;}.contenuto div{margin:0 .5rem 0 .5rem;}.contenuto{border-radius:.5rem;background:linear-gradient(to left,#fff 50%,rgba(92,122,255,.2) 50%) right;background-size:200%;transition:1s cubic-bezier(.5,.25,0,1);}.but2{display:flex;justify-content:space-between;width:17%;text-align:end;}.button1,.button2{margin-inline:.5rem;border:0;border-radius:.2rem;padding:.4rem;}.button1{transition:.5s;background-color:transparent;color:#95a5a6;}.button2{background-color:#982649;color:#fff;}.buttonNew{margin-inline:.5rem;border:0;border-radius:.2rem;padding:.4rem;transition:.5s;background-color:transparent;color:#95a5a6;background-color:#27ae60;color:#fff;}.butAddDiv{text-align:end;}.searchBar{background-color:transparent;border:0;border-bottom:1px solid #d1d1d1;width:75%;transition:border cubic-bezier(.49,.17,.43,.26) .3s;}.searchBar:focus{outline:0;border-color:#3547d4;}.hoverOptions{height:100%;width:100%;opacity:0;transition:visibility 0s,opacity .5s linear;display:flex;padding:0;}.buttonDet,.buttonEdit{width:4rem;height:4rem;display:flex;align-content:center;flex-wrap:wrap;}.buttonDet button{background-color:rgba(86,184,167,.2);border:0;padding:0;text-align:center;border-radius:50%;height:75%;width:75%;color:#56b8a7;}.buttonEdit button{background-color:rgba(254,152,83,.2);border:0;padding:0;text-align:center;border-radius:50%;height:75%;width:75%;color:#fe9853;}.visualBlock{display:flex;}.editBlock{display:none;}.dropDownNew{background-color:#fff;border-radius:1rem;border:.5rem solid #27ae60;position:absolute;height:20rem;right:2.5rem;z-index:99999;width:0;transition:.5s;} \ No newline at end of file diff --git a/StockMan.CORE/Components/NewNavMenu.razor.css b/StockMan.CORE/Components/NewNavMenu.razor.css index 6559d1c..3c2768c 100644 --- a/StockMan.CORE/Components/NewNavMenu.razor.css +++ b/StockMan.CORE/Components/NewNavMenu.razor.css @@ -6,7 +6,6 @@ position: sticky; background-color: #3547d3; box-shadow: 3px 3px 10px 0px #D1D1D1; - transition: 0.35s; color: #fff; } #myBtn { diff --git a/StockMan.CORE/Components/NewNavMenu.razor.less b/StockMan.CORE/Components/NewNavMenu.razor.less index 25735bc..16d6b61 100644 --- a/StockMan.CORE/Components/NewNavMenu.razor.less +++ b/StockMan.CORE/Components/NewNavMenu.razor.less @@ -8,7 +8,7 @@ //border-radius: 1.5rem; background-color: #3547d3; box-shadow: 3px 3px 10px 0px #D1D1D1; - transition: 0.35s; + //transition: 0.35s; color: #fff; } diff --git a/StockMan.CORE/Components/NewNavMenu.razor.min.css b/StockMan.CORE/Components/NewNavMenu.razor.min.css index 2baf11d..9840d54 100644 --- a/StockMan.CORE/Components/NewNavMenu.razor.min.css +++ b/StockMan.CORE/Components/NewNavMenu.razor.min.css @@ -1 +1 @@ -.navMenu{background-color:#f00;padding:1rem;width:18rem;height:100%;position:sticky;background-color:#3547d3;box-shadow:3px 3px 10px 0 #d1d1d1;transition:.35s;color:#fff;}#myBtn{transition:.25s;border:0;background:none;padding:0;}.title{text-align:center;display:flex;justify-content:space-between;transition:1s;margin-bottom:1rem;}.titleComp{margin-bottom:1rem;}.icon{margin-top:.5rem;padding:.8rem;background-color:#d9d9d9;border-radius:50%;}.title h4{margin-top:.7rem;}.links{align-content:center;text-align:center;display:grid;height:100%;}.decoration{text-decoration:none;}.bot{position:absolute;bottom:0;left:0;background-color:#f6faff;width:100%;display:flex;justify-content:space-evenly;align-content:center;flex-wrap:wrap;color:#000;}.bot div{display:flex;justify-content:space-evenly;align-content:center;flex-wrap:wrap;}.bot h6{padding-top:2rem;color:#000;}.bot div{background-color:rgba(52,73,94,.5);height:3rem;width:3rem;margin:1rem;display:flex;justify-content:space-evenly;align-content:center;flex-wrap:wrap;font-size:1.5rem;}.navLinkIcon{padding:0;margin:0;}.navLinkIcon,.navLinkText{width:50%;transition:.25s;}.linkChildren{align-content:start;display:none;height:0%;transition:1s;}.linkChildItem{background-color:rgba(179,157,219,.2);transition:background-color 200ms ease-out 100ms;}.last{background-color:rgba(179,157,219,.2);transition:background-color 200ms ease-out 100ms;border-radius:.5rem;}.linkChildItem:hover{background-color:#f6faff;}.linkChildItem:hover a{color:#000;}.navLinkItem{text-decoration:none;padding:.5rem 1rem .5rem 1rem;border-radius:1rem;transition:background-color 300ms ease-out 100ms;display:flex;width:100%;justify-content:space-between;margin-top:.2rem;}.navLinkItemComp{text-decoration:none;padding:.5rem 1rem .5rem 1rem;border-radius:1rem;transition:background-color 300ms ease-out 100ms;display:flex;width:100%;justify-content:space-between;margin-top:.2rem;}.navLinkItemActive{text-decoration:none;padding:.5rem 1rem .5rem 1rem;transition:background-color 300ms ease-out 100ms;display:flex;width:100%;border-radius:1rem 1rem 0 0;background-color:#f6faff;justify-content:space-between;color:#000;}.navLinkItem:hover{background-color:rgba(246,250,255,.5);color:#000;}.navLinkItemComp:hover{background-color:rgba(246,250,255,.5);color:#000;}.navLinkChildrenText{text-decoration:none;color:#fff;}.navLinkItem i,.navLinkItemActive i{width:25%;text-align:center;display:flex;justify-content:center;align-content:center;flex-wrap:wrap;font-size:1rem;}.navLinkItem h6,.navLinkItemActive h6{width:75%;text-align:center;display:flex;flex-wrap:wrap;align-content:center;font-weight:bold;padding-top:.5rem;}.chiusura{width:100%;height:.5rem;background-color:rgba(179,157,219,.2);border-radius:0 0 .5rem .5rem;} \ No newline at end of file +.navMenu{background-color:#f00;padding:1rem;width:18rem;height:100%;position:sticky;background-color:#3547d3;box-shadow:3px 3px 10px 0 #d1d1d1;color:#fff;}#myBtn{transition:.25s;border:0;background:none;padding:0;}.title{text-align:center;display:flex;justify-content:space-between;transition:1s;margin-bottom:1rem;}.titleComp{margin-bottom:1rem;}.icon{margin-top:.5rem;padding:.8rem;background-color:#d9d9d9;border-radius:50%;}.title h4{margin-top:.7rem;}.links{align-content:center;text-align:center;display:grid;height:100%;}.decoration{text-decoration:none;}.bot{position:absolute;bottom:0;left:0;background-color:#f6faff;width:100%;display:flex;justify-content:space-evenly;align-content:center;flex-wrap:wrap;color:#000;}.bot div{display:flex;justify-content:space-evenly;align-content:center;flex-wrap:wrap;}.bot h6{padding-top:2rem;color:#000;}.bot div{background-color:rgba(52,73,94,.5);height:3rem;width:3rem;margin:1rem;display:flex;justify-content:space-evenly;align-content:center;flex-wrap:wrap;font-size:1.5rem;}.navLinkIcon{padding:0;margin:0;}.navLinkIcon,.navLinkText{width:50%;transition:.25s;}.linkChildren{align-content:start;display:none;height:0%;transition:1s;}.linkChildItem{background-color:rgba(179,157,219,.2);transition:background-color 200ms ease-out 100ms;}.last{background-color:rgba(179,157,219,.2);transition:background-color 200ms ease-out 100ms;border-radius:.5rem;}.linkChildItem:hover{background-color:#f6faff;}.linkChildItem:hover a{color:#000;}.navLinkItem{text-decoration:none;padding:.5rem 1rem .5rem 1rem;border-radius:1rem;transition:background-color 300ms ease-out 100ms;display:flex;width:100%;justify-content:space-between;margin-top:.2rem;}.navLinkItemComp{text-decoration:none;padding:.5rem 1rem .5rem 1rem;border-radius:1rem;transition:background-color 300ms ease-out 100ms;display:flex;width:100%;justify-content:space-between;margin-top:.2rem;}.navLinkItemActive{text-decoration:none;padding:.5rem 1rem .5rem 1rem;transition:background-color 300ms ease-out 100ms;display:flex;width:100%;border-radius:1rem 1rem 0 0;background-color:#f6faff;justify-content:space-between;color:#000;}.navLinkItem:hover{background-color:rgba(246,250,255,.5);color:#000;}.navLinkItemComp:hover{background-color:rgba(246,250,255,.5);color:#000;}.navLinkChildrenText{text-decoration:none;color:#fff;}.navLinkItem i,.navLinkItemActive i{width:25%;text-align:center;display:flex;justify-content:center;align-content:center;flex-wrap:wrap;font-size:1rem;}.navLinkItem h6,.navLinkItemActive h6{width:75%;text-align:center;display:flex;flex-wrap:wrap;align-content:center;font-weight:bold;padding-top:.5rem;}.chiusura{width:100%;height:.5rem;background-color:rgba(179,157,219,.2);border-radius:0 0 .5rem .5rem;} \ No newline at end of file diff --git a/StockMan.CORE/Components/VisualButtons.razor b/StockMan.CORE/Components/VisualButtons.razor new file mode 100644 index 0000000..7a2bf03 --- /dev/null +++ b/StockMan.CORE/Components/VisualButtons.razor @@ -0,0 +1,10 @@ +
+ +
+
+ +
+ + diff --git a/StockMan.CORE/Components/VisualButtons.razor.cs b/StockMan.CORE/Components/VisualButtons.razor.cs new file mode 100644 index 0000000..488388e --- /dev/null +++ b/StockMan.CORE/Components/VisualButtons.razor.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Components; +using System.Net.Http; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Components.Authorization; +using Microsoft.AspNetCore.Components.Forms; +using Microsoft.AspNetCore.Components.Routing; +using Microsoft.AspNetCore.Components.Web; +using Microsoft.AspNetCore.Components.Web.Virtualization; +using Microsoft.JSInterop; +using EgwCoreLib.Razor; +using EgwCoreLib.Razor.Data; +using StockMan.CORE; +using StockMan.CORE.Data; +using StockMan.CORE.Shared; + +namespace StockMan.CORE.Components +{ + public partial class VisualButtons + { + [Parameter] + public string idForJs { get; set; } = ""; + + [Parameter] + public EventCallback callbackForJs { get; set; } + + [Inject] + protected IJSRuntime JSRuntime { get; set; } = null!; + + protected bool editMode = false; + + private async Task enableEdit() + { + await callbackForJs.InvokeAsync(editMode); + editMode = true; + await JSRuntime.InvokeVoidAsync("isEditing", idForJs); + } + } +} \ No newline at end of file diff --git a/StockMan.CORE/Components/VisualButtons.razor.css b/StockMan.CORE/Components/VisualButtons.razor.css new file mode 100644 index 0000000..3fd7615 --- /dev/null +++ b/StockMan.CORE/Components/VisualButtons.razor.css @@ -0,0 +1,28 @@ +.buttonDet, +.buttonEdit { + width: 4rem; + height: 4rem; + display: flex; + align-content: center; + flex-wrap: wrap; +} +.buttonDet button { + background-color: rgba(86, 184, 167, 0.2); + border: none; + padding: 0; + text-align: center; + border-radius: 50%; + height: 75%; + width: 75%; + color: #56b8a7; +} +.buttonEdit button { + background-color: rgba(254, 152, 83, 0.2); + border: none; + padding: 0; + text-align: center; + border-radius: 50%; + height: 75%; + width: 75%; + color: #fe9853; +} \ No newline at end of file diff --git a/StockMan.CORE/Components/VisualButtons.razor.less b/StockMan.CORE/Components/VisualButtons.razor.less new file mode 100644 index 0000000..c063a1c --- /dev/null +++ b/StockMan.CORE/Components/VisualButtons.razor.less @@ -0,0 +1,30 @@ +.buttonDet, .buttonEdit { + width: 4rem; + height: 4rem; + display: flex; + align-content: center; + flex-wrap: wrap; +} + +.buttonDet button { + background-color: rgba(86,184,167,0.2); + border: none; + padding: 0; + text-align: center; + border-radius: 50%; + height: 75%; + width: 75%; + color: #56b8a7; +} + + +.buttonEdit button { + background-color: rgba(254,152,83,0.2); + border: none; + padding: 0; + text-align: center; + border-radius: 50%; + height: 75%; + width: 75%; + color: #fe9853; +} diff --git a/StockMan.CORE/Components/VisualButtons.razor.min.css b/StockMan.CORE/Components/VisualButtons.razor.min.css new file mode 100644 index 0000000..f661bb2 --- /dev/null +++ b/StockMan.CORE/Components/VisualButtons.razor.min.css @@ -0,0 +1 @@ +.buttonDet,.buttonEdit{width:4rem;height:4rem;display:flex;align-content:center;flex-wrap:wrap;}.buttonDet button{background-color:rgba(86,184,167,.2);border:0;padding:0;text-align:center;border-radius:50%;height:75%;width:75%;color:#56b8a7;}.buttonEdit button{background-color:rgba(254,152,83,.2);border:0;padding:0;text-align:center;border-radius:50%;height:75%;width:75%;color:#fe9853;} \ No newline at end of file diff --git a/StockMan.CORE/Data/StockDataService.cs b/StockMan.CORE/Data/StockDataService.cs index ab66902..213f43c 100644 --- a/StockMan.CORE/Data/StockDataService.cs +++ b/StockMan.CORE/Data/StockDataService.cs @@ -107,7 +107,20 @@ namespace StockMan.CORE.Data Log.Debug($"ItemFamilyGetAll | {source} in: {ts.TotalMilliseconds} ms"); return dbResult; } - + /// + /// Aggiornamento record selezionato + /// + /// + /// + public async Task ItemFamilyMod(ItemFamilyModel currRec) + { + var dbResult = await dbController.ItemFamilyMod(currRec); + // elimino cache redis... + RedisValue pattern = new RedisValue($"{rKeyItemFamily}:*"); + bool answ = await ExecFlushRedisPattern(pattern); + await Task.Delay(1); + return dbResult; + } /// /// Lista Permessi diff --git a/StockMan.CORE/Shared/MainLayout.razor b/StockMan.CORE/Shared/MainLayout.razor index 254f4ab..82a5258 100644 --- a/StockMan.CORE/Shared/MainLayout.razor +++ b/StockMan.CORE/Shared/MainLayout.razor @@ -4,7 +4,7 @@ StockMan.CORE
-