diff --git a/MP.Prog/Components/DiffView.razor b/MP.Prog/Components/DiffView.razor index 845fc93e..346db6ca 100644 --- a/MP.Prog/Components/DiffView.razor +++ b/MP.Prog/Components/DiffView.razor @@ -24,8 +24,8 @@
-
- @numChanges modifiche +
+ @numChanges modifiche
diff --git a/MP.Prog/Components/FileEditor.razor.cs b/MP.Prog/Components/FileEditor.razor.cs index d600311a..dd163112 100644 --- a/MP.Prog/Components/FileEditor.razor.cs +++ b/MP.Prog/Components/FileEditor.razor.cs @@ -36,9 +36,6 @@ namespace MP.Prog.Components #region Public Properties - [Parameter] - public List ArtList { get; set; } - [Parameter] public FileModel currItem { @@ -61,6 +58,9 @@ namespace MP.Prog.Components [Parameter] public List MacList { get; set; } + [Parameter] + public List TagList { get; set; } + #endregion Public Properties #region Private Methods diff --git a/MP.Prog/Data/FileArchDataService.cs b/MP.Prog/Data/FileArchDataService.cs index 0f1d2a5c..d8ea5784 100644 --- a/MP.Prog/Data/FileArchDataService.cs +++ b/MP.Prog/Data/FileArchDataService.cs @@ -205,12 +205,6 @@ namespace MP.Prog.Data #region Public Methods - public Task> ArticoliGetFilt(string SearchVal) - { - return Task.FromResult(dbController.ArtGetFilt(SearchVal, 200).ToList()); - //return Task.FromResult(dbController.ArtGetFilt(SearchVal, 20).ToList()); - } - public void Dispose() { // Clear database controller @@ -245,6 +239,12 @@ namespace MP.Prog.Data dbController.RollBackEntity(item); } + public Task> TagGetFilt(string SearchVal) + { + return Task.FromResult(dbController.TagGetFilt(SearchVal, 200).ToList()); + //return Task.FromResult(dbController.ArtGetFilt(SearchVal, 20).ToList()); + } + /// /// Aggiorna intero archivio scansionando dati x tutte le macchine che hanno un path valido /// diff --git a/MP.Prog/MP.Prog.csproj b/MP.Prog/MP.Prog.csproj index 8f98d113..6dcb148c 100644 --- a/MP.Prog/MP.Prog.csproj +++ b/MP.Prog/MP.Prog.csproj @@ -9,6 +9,7 @@ + diff --git a/MP.Prog/Pages/Archive.razor b/MP.Prog/Pages/Archive.razor index 31c0b83f..e119936d 100644 --- a/MP.Prog/Pages/Archive.razor +++ b/MP.Prog/Pages/Archive.razor @@ -65,7 +65,7 @@
@if (currRecord != null) { - + } @if (ListRecords == null) { @@ -89,7 +89,7 @@ Size State Macchina - Articolo + Tags Modificato @*Controllo*@ @@ -136,8 +136,10 @@
@record.Macchina.Descrizione
-
@record.Articolo.Disegno
-
@record.Articolo.DescArticolo
+ @foreach (var item in record.Tags) + { + @item.TagId + }
@record.LastMod.ToString("yyyy.MM.dd")
diff --git a/MP.Prog/Pages/Archive.razor.cs b/MP.Prog/Pages/Archive.razor.cs index f9279fde..b7230ead 100644 --- a/MP.Prog/Pages/Archive.razor.cs +++ b/MP.Prog/Pages/Archive.razor.cs @@ -13,20 +13,19 @@ namespace MP.Prog.Pages { #region Private Fields - private List ArtList; - private FileModel currRecord = null; private List ListRecords; private List MacList; private List SearchRecords; + private List TagList; #endregion Private Fields #region Protected Fields - protected string _SearchArt; + protected string _SearchTag; - protected string defCodArt = ""; + protected string defTag = ""; #endregion Protected Fields @@ -170,26 +169,26 @@ namespace MP.Prog.Pages [Inject] protected NavigationManager NavManager { get; set; } - protected string SearchArt + protected string SearchTag { get { - return _SearchArt; + return _SearchTag; } set { isLoading = true; - _SearchArt = value; + _SearchTag = value; // se son > 3 char... debounce... if (string.IsNullOrEmpty(value)) { - _SearchArt = defCodArt; + _SearchTag = defTag; } - if (value.Length >= defCodArt.Length) + if (value.Length >= defTag.Length) { var pUpd = Task.Run(async () => { - ArtList = await DataService.ArticoliGetFilt(SearchArt); + TagList = await DataService.TagGetFilt(SearchTag); }); pUpd.Wait(); } @@ -289,7 +288,7 @@ namespace MP.Prog.Pages protected override async Task OnInitializedAsync() { DataService.ResetController(); - SearchArt = defCodArt; + SearchTag = defTag; AppMService.ShowSearch = false; AppMService.PageName = "Archivio File Programmi"; AppMService.PageIcon = "fas fa-folder pr-2"; @@ -302,9 +301,9 @@ namespace MP.Prog.Pages isLoading = true; MacList = await DataService.MacchineGetAll(); SelIdxMacc = "0"; - SearchArt = defCodArt; + SearchTag = defTag; - ArtList = await DataService.ArticoliGetFilt(SearchArt); + TagList = await DataService.TagGetFilt(SearchTag); isLoading = false; await ReloadData(); @@ -322,13 +321,13 @@ namespace MP.Prog.Pages SearchRecords = null; ListRecords = null; AppMService.File_Filter = SelectData.Init(5, 10); - SearchArt = defCodArt; + SearchTag = defTag; await ReloadAllData(); } protected void ResetSearchArt() { - SearchArt = defCodArt; + SearchTag = defTag; } protected void searchArtUpd(string newCod) diff --git a/MP.Prog/Pages/Setup.razor b/MP.Prog/Pages/Setup.razor index d7f551ca..cef56f59 100644 --- a/MP.Prog/Pages/Setup.razor +++ b/MP.Prog/Pages/Setup.razor @@ -8,45 +8,6 @@

Setup

-
-
-