-
+
diff --git a/StockMan.CORE/Shared/MainLayout.razor.css b/StockMan.CORE/Shared/MainLayout.razor.css
index cf7abc2..6223fcc 100644
--- a/StockMan.CORE/Shared/MainLayout.razor.css
+++ b/StockMan.CORE/Shared/MainLayout.razor.css
@@ -1,7 +1,7 @@
.page {
position: relative;
display: flex;
- flex-direction: column;
+ flex-direction: row;
}
main {
flex: 1;
@@ -11,6 +11,10 @@ main {
border-radius: 1rem;
box-shadow: 3px 3px 10px 0px #D1D1D1;*/
}
-.page {
- flex-direction: row;
+.nav {
+ width: 18rem;
+ height: 100vh;
+ position: sticky;
+ top: 0;
+ transition: 0.35s;
}
\ No newline at end of file
diff --git a/StockMan.CORE/Shared/MainLayout.razor.less b/StockMan.CORE/Shared/MainLayout.razor.less
index 5262815..e75bfee 100644
--- a/StockMan.CORE/Shared/MainLayout.razor.less
+++ b/StockMan.CORE/Shared/MainLayout.razor.less
@@ -1,7 +1,7 @@
.page {
position: relative;
display: flex;
- flex-direction: column;
+ flex-direction: row;
}
@@ -14,7 +14,11 @@ main {
box-shadow: 3px 3px 10px 0px #D1D1D1;*/
}
-.page {
- flex-direction: row;
-}
+.nav {
+ width: 18rem;
+ height: 100vh;
+ position: sticky;
+ top: 0;
+ transition: 0.35s;
+}
diff --git a/StockMan.CORE/Shared/MainLayout.razor.min.css b/StockMan.CORE/Shared/MainLayout.razor.min.css
index b96e4cd..4a90a16 100644
--- a/StockMan.CORE/Shared/MainLayout.razor.min.css
+++ b/StockMan.CORE/Shared/MainLayout.razor.min.css
@@ -1 +1 @@
-.page{position:relative;display:flex;flex-direction:column;}main{flex:1;background-color:#f7fbff;width:100%;}.page{flex-direction:row;}
\ No newline at end of file
+.page{position:relative;display:flex;flex-direction:row;}main{flex:1;background-color:#f7fbff;width:100%;}.nav{width:18rem;height:100vh;position:sticky;top:0;transition:.35s;}
\ No newline at end of file
diff --git a/StockMan.CORE/compilerconfig.json b/StockMan.CORE/compilerconfig.json
index bcb1767..3d57acc 100644
--- a/StockMan.CORE/compilerconfig.json
+++ b/StockMan.CORE/compilerconfig.json
@@ -22,5 +22,9 @@
{
"outputFile": "Pages/FamiglieArticoli.razor.css",
"inputFile": "Pages/FamiglieArticoli.razor.less"
+ },
+ {
+ "outputFile": "Components/VisualButtons.razor.css",
+ "inputFile": "Components/VisualButtons.razor.less"
}
]
\ No newline at end of file
diff --git a/StockMan.CORE/wwwroot/lib/menuCompression.js b/StockMan.CORE/wwwroot/lib/menuCompression.js
index f799406..b69c611 100644
--- a/StockMan.CORE/wwwroot/lib/menuCompression.js
+++ b/StockMan.CORE/wwwroot/lib/menuCompression.js
@@ -1,12 +1,14 @@
function openNav() {
document.getElementById("mySidebar").style.width = "18rem";
+ document.getElementById("navMain").style.width = "18rem";
document.getElementById("mySidebar").style.margin = "0";
document.getElementById("mySidebar").style.borderRadius = "0";
}
function closeNav() {
document.getElementById("mySidebar").style.width = "5rem";
+ document.getElementById("navMain").style.width = "5rem";
document.getElementById("mySidebar").style.margin = "0.5rem 0 0.5rem 0";
document.getElementById("mySidebar").style.borderRadius = "0 0.5rem 0.5rem 0";
}
@@ -24,10 +26,33 @@ function doHideChildren(id) {
function selectItem(id) {
console.log(id);
document.getElementById(id).style.backgroundPosition = "left";
- document.getElementsByClassName("hoverOptions").style.display = "block";
+ document.getElementById("btn" + id).style.transform = "rotate(-90deg)";
+ document.getElementById("opt" + id).style.visibility = "visible";
+ document.getElementById("opt" + id).style.opacity = "1";
+ //document.getElementsByClassName("hoverOptions").style.display = "block";
}
function unSelectItem(id) {
console.log(id);
document.getElementById(id).style.backgroundPosition = "right";
+ document.getElementById("btn" + id).style.transform = "rotate(0deg)";
+ document.getElementById("opt" + id).style.visibility = "hidden";
+ document.getElementById("opt" + id).style.opacity = "0";
+}
+
+function isEditing(id) {
+ document.getElementById("lblCate" + id).disabled = false;
+ document.getElementById("lblCate" + id).style.borderBottom = "1px solid #000";
+ document.getElementById("editBlock" + id).style.display = "flex";
+ document.getElementById("visualBlock" + id).style.display = "none";
+}
+
+function noEditing(id) {
+ document.getElementById("lblCate" + id).disabled = true;
+ document.getElementById("lblCate" + id).style.borderBottom = "none";
+ document.getElementById("editBlock" + id).style.display = "none";
+ document.getElementById("visualBlock" + id).style.display = "flex";
+}
+function showAddNew() {
+ document.getElementById("addNew").style.width= "25rem";
}
\ No newline at end of file
diff --git a/StockMan.Data/Controllers/StoManController.cs b/StockMan.Data/Controllers/StoManController.cs
index 398404d..d9d23bb 100644
--- a/StockMan.Data/Controllers/StoManController.cs
+++ b/StockMan.Data/Controllers/StoManController.cs
@@ -93,20 +93,59 @@ namespace StockMan.Data.Controllers
}
///
- /// Lista Item Flux (ALL!)
+ /// Modifica Famiglie Articoli
///
///
- public List
ItemsFluxGetAll()
+ public List ItemFamilyMod()
{
- List dbResult = new List();
+ List dbResult = new List();
using (StockManContext localDbCtx = new StockManContext(_configuration))
{
dbResult = localDbCtx
- .DbSetItemFlux
- .OrderBy(x => x.DtMov)
+ .DbSetItemFamily
+ .OrderBy(x => x.Descr)
.ToList();
}
return dbResult;
+
+ }
+
+ ///
+ /// Lista Item Flux (ALL!)
+ ///
+ ///
+ public async Task ItemFamilyMod(ItemFamilyModel editRec)
+ {
+ bool fatto = false;
+ List dbResult = new List();
+ using (StockManContext localDbCtx = new StockManContext(_configuration))
+ {
+ try
+ {
+ var currRec = localDbCtx
+ .DbSetItemFamily
+ .Where(x => x.Id == editRec.Id)
+ .FirstOrDefault();
+ if (currRec != null)
+ {
+ currRec.Descr = editRec.Descr;
+ }
+ else
+ {
+ localDbCtx
+ .DbSetItemFamily
+ .Add(editRec);
+ }
+ await localDbCtx.SaveChangesAsync();
+ fatto = true;
+ }
+ catch (Exception exc)
+ {
+ Log.Error($"Eccezione durante ScanBySession{Environment.NewLine}{exc}");
+ }
+ }
+ return fatto;
+
}
///