aggiunte funzionalità famiglie articoli
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
<div class="buttonDet">
|
||||
<button><i class="fa-light fa-floppy-disk"></i></button>
|
||||
</div>
|
||||
<div class="buttonEdit">
|
||||
<button @onclick="()=>disableEdit()">
|
||||
<i class="fa-solid fa-ban"></i>
|
||||
</button>
|
||||
</div>
|
||||
@@ -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<bool> 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -72,8 +72,11 @@ else
|
||||
<div class="numArt">
|
||||
# ARTICOLI
|
||||
</div>
|
||||
<div class="butAddDiv">
|
||||
<button class="buttonNew"><i class="fa-solid fa-plus"></i> Aggiunta nuova famiglia</button>
|
||||
<div class="butAddDiv" >
|
||||
<button class="buttonNew" @onclick="()=>showAddNew()"><i class="fa-solid fa-plus"></i> Aggiunta nuova famiglia</button>
|
||||
<div class="dropDownNew" id="addNew">
|
||||
s
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@foreach (var item in ListRecord)
|
||||
@@ -83,8 +86,9 @@ else
|
||||
@item.Id
|
||||
</div>
|
||||
<div class="categoria">
|
||||
@item.Descr
|
||||
<input id="@($"lblCate{item.Id}")" @bind="@item.Descr"/>
|
||||
</div>
|
||||
|
||||
<div class="numArt">
|
||||
@item.NumItems
|
||||
</div>
|
||||
@@ -92,8 +96,36 @@ else
|
||||
<button class="button2"><i class="fa-solid fa-pen-to-square"></i></button>
|
||||
</div>*@
|
||||
<div class="buttonCol" @onclick="()=>selectedItem(item.Id)">
|
||||
<button class="button1"><i class="fa-solid fa-ellipsis"></i></button>
|
||||
<div class="hoverOptions" >
|
||||
<button class="button1" id="@($"btn{item.Id}")"><i class="fa-solid fa-ellipsis"></i></button>
|
||||
<div class="hoverOptions" id="@($"opt{item.Id}")">
|
||||
@*@if (editMode)
|
||||
{
|
||||
<EditButtons callbackForJs="changeEditMode" idForJs="@currRowSel"></EditButtons>
|
||||
}
|
||||
else
|
||||
{
|
||||
<VisualButtons callbackForJs="changeEditMode" idForJs="@item.Id"></VisualButtons>
|
||||
}*@
|
||||
<div class="editBlock" id="@($"editBlock{item.Id}")">
|
||||
<div class="buttonDet" @onclick="()=>editItemFam(item)">
|
||||
<button><i class="fa-solid fa-cloud-arrow-up"></i></button>
|
||||
</div>
|
||||
<div class="buttonEdit">
|
||||
<button @onclick="()=>disableEdit()">
|
||||
<i class="fa-solid fa-ban"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="visualBlock" id="@($"visualBlock{item.Id}")">
|
||||
<div class="buttonDet">
|
||||
<button><i class="fa-solid fa-magnifying-glass-plus"></i></button>
|
||||
</div>
|
||||
<div class="buttonEdit">
|
||||
<button @onclick="()=>enableEdit(item.Id)">
|
||||
<i class="fa-regular fa-pen-to-square"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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<ItemFamilyModel>? ListRecord { get; set; } = null;
|
||||
public List<ItemFamilyModel>? 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");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
+1
-1
@@ -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;}
|
||||
.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;}
|
||||
@@ -6,7 +6,6 @@
|
||||
position: sticky;
|
||||
background-color: #3547d3;
|
||||
box-shadow: 3px 3px 10px 0px #D1D1D1;
|
||||
transition: 0.35s;
|
||||
color: #fff;
|
||||
}
|
||||
#myBtn {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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;}
|
||||
.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;}
|
||||
@@ -0,0 +1,10 @@
|
||||
<div class="buttonDet">
|
||||
<button><i class="fa-solid fa-magnifying-glass-plus"></i></button>
|
||||
</div>
|
||||
<div class="buttonEdit">
|
||||
<button @onclick="()=>enableEdit()">
|
||||
<i class="fa-regular fa-pen-to-square"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -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<bool> 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;}
|
||||
@@ -107,7 +107,20 @@ namespace StockMan.CORE.Data
|
||||
Log.Debug($"ItemFamilyGetAll | {source} in: {ts.TotalMilliseconds} ms");
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiornamento record selezionato
|
||||
/// </summary>
|
||||
/// <param name="currRec"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> 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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lista Permessi
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<PageTitle>StockMan.CORE</PageTitle>
|
||||
|
||||
<div class="page">
|
||||
<div class="nav">
|
||||
<div class="nav" id="navMain">
|
||||
<NewNavMenu NavMenuLinks="@navMenuLinks" Title="STOCK MAN" User="steamw/zaccaria.majid"></NewNavMenu>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
.page{position:relative;display:flex;flex-direction:column;}main{flex:1;background-color:#f7fbff;width:100%;}.page{flex-direction:row;}
|
||||
.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;}
|
||||
@@ -22,5 +22,9 @@
|
||||
{
|
||||
"outputFile": "Pages/FamiglieArticoli.razor.css",
|
||||
"inputFile": "Pages/FamiglieArticoli.razor.less"
|
||||
},
|
||||
{
|
||||
"outputFile": "Components/VisualButtons.razor.css",
|
||||
"inputFile": "Components/VisualButtons.razor.less"
|
||||
}
|
||||
]
|
||||
@@ -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";
|
||||
}
|
||||
@@ -93,20 +93,59 @@ namespace StockMan.Data.Controllers
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lista Item Flux (ALL!)
|
||||
/// Modifica Famiglie Articoli
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<ItemFluxModel> ItemsFluxGetAll()
|
||||
public List<ItemFamilyModel> ItemFamilyMod()
|
||||
{
|
||||
List<ItemFluxModel> dbResult = new List<ItemFluxModel>();
|
||||
List<ItemFamilyModel> dbResult = new List<ItemFamilyModel>();
|
||||
using (StockManContext localDbCtx = new StockManContext(_configuration))
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
.DbSetItemFlux
|
||||
.OrderBy(x => x.DtMov)
|
||||
.DbSetItemFamily
|
||||
.OrderBy(x => x.Descr)
|
||||
.ToList();
|
||||
}
|
||||
return dbResult;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lista Item Flux (ALL!)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> ItemFamilyMod(ItemFamilyModel editRec)
|
||||
{
|
||||
bool fatto = false;
|
||||
List<ItemFamilyModel> dbResult = new List<ItemFamilyModel>();
|
||||
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;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user