@CalcSize(record.Size)
-
+
@if (!string.IsNullOrEmpty(record.UserAppr))
{
-
@record.Macchina.Nome
@record.Macchina.Descrizione
|
-
+ |
@foreach (var item in record.Tags)
{
FilterTag(item.TagId)" title="Filtra Tag">
@@ -187,6 +195,13 @@
|
@record.LastMod.ToString("yyyy.MM.dd")
@record.LastMod.ToString("ddd HH:mm.ss")
+
+ |
+
+ @if (string.IsNullOrEmpty(record.UserAppr))
+ {
+ DeleteRec(record)" title="Elimina Record">
+ }
|
}
@@ -197,6 +212,6 @@
}
\ No newline at end of file
diff --git a/MP.Prog/Pages/Archive.razor.cs b/MP.Prog/Pages/Archive.razor.cs
index af50582a..7d5039fd 100644
--- a/MP.Prog/Pages/Archive.razor.cs
+++ b/MP.Prog/Pages/Archive.razor.cs
@@ -106,15 +106,6 @@ namespace MP.Prog.Pages
#region Protected Methods
- protected async Task ReloadAsync()
- {
- isLoading = true;
- currRecord = null;
- ListRecords = null;
- await ReloadData();
- isLoading = false;
- }
-
///
/// Restituisce size calcolata
///
@@ -137,6 +128,41 @@ namespace MP.Prog.Pages
currRecord = await FDService.FileGetByKey(selRecord.FileId);
}
+ ///
+ /// forza approvazione utente corrente
+ ///
+ ///
+ protected async Task FileSetUserApp(FileModel CurrRec)
+ {
+ if (!await JSRuntime.InvokeAsync("confirm", "Sicuro di voler approvare il salvataggio automatico della nuova revisione?"))
+ return;
+
+ await FDService.FileSetUserApp(CurrRec, MServ.UserName);
+ isLoading = true;
+ await ReloadData();
+ isLoading = false;
+ }
+
+ ///
+ /// Elimina record (non approvato) corrente e riattiva precedente
+ ///
+ ///
+ protected async Task DeleteRec(FileModel CurrRec)
+ {
+ if (!await JSRuntime.InvokeAsync("confirm", "Sicuro di voler eliminare il record e riattivare la revisione antecedente? Il file potrebbe risultare modificato"))
+ return;
+
+ // elimino
+ await FDService.FileDelete(CurrRec);
+ //// verifico eventuali modifiche
+ //var numCheck = await FDService.UpdateMachineArchive(CurrRec.IdxMacchina, 30, false, false, "");
+
+ isLoading = true;
+ await ReloadData();
+ isLoading = false;
+ }
+
+
protected async Task FilterPath(string searchVal)
{
SelFileName = searchVal;
@@ -146,6 +172,14 @@ namespace MP.Prog.Pages
isLoading = false;
}
+ protected async Task FilterTag(string searchVal)
+ {
+ SelTag = searchVal;
+ currPage = 1;
+ await ReloadData();
+ isLoading = false;
+ }
+
protected async Task FilterUserName(string userName)
{
SelUserName = userName;
@@ -155,27 +189,48 @@ namespace MP.Prog.Pages
isLoading = false;
}
- protected async Task FilterTag(string searchVal)
- {
- SelTag = searchVal;
- currPage = 1;
- await ReloadData();
- isLoading = false;
- }
-
+ ///
+ /// Esegue comparazione tra dati DB e filesystem (modificati entro numDays)
+ ///
+ ///
+ ///
protected async Task ForceCheck(int numDays)
{
currRecord = null;
ListRecords = null;
// importante altrimenti NON mostra update UI
await Task.Delay(1);
- //MServ.File_Filter = SelectData.Init(5, 10);
- var numCheck = await FDService.UpdateAllArchive(numDays, false, MServ.UserName);
+ var numCheck = await FDService.UpdateAllArchive(numDays, false, MServ.UserName, false);
await ReloadAllData();
await Task.Delay(1);
await RefreshDisplayLoading();
}
+ ///
+ /// effettua approvazione di ttute le modifiche visualizzate
+ ///
+ ///
+ protected async Task MassAppr()
+ {
+ if (!await JSRuntime.InvokeAsync("confirm", "Sicuro di voler procedere approvando una nuova revisione di ogni file modificato visualizzato?"))
+ return;
+
+ //verifico che sia cliccato solo modificati...
+ if(OnlyMod)
+ {
+ foreach (var item in ListRecords)
+ {
+ await FDService.FileModApprove(item, MServ.UserName);
+ }
+ }
+ // rileggo!
+ ResetData();
+ await ResetFilter();
+ await Task.Delay(1);
+ await ReloadData();
+ isLoading = false;
+ }
+
protected override async Task OnInitializedAsync()
{
SearchTag = defTag;
@@ -188,20 +243,6 @@ namespace MP.Prog.Pages
isLoading = false;
}
- protected async Task PagerReloadNum(int newNum)
- {
- numRecord = newNum;
- await ReloadData();
- isLoading = false;
- }
-
- protected async Task PagerReloadPage(int newNum)
- {
- currPage = newNum;
- await ReloadData();
- isLoading = false;
- }
-
protected async Task RefreshDisplayLoading()
{
await Task.Delay(1);
@@ -218,6 +259,15 @@ namespace MP.Prog.Pages
await ReloadData();
}
+ protected async Task ReloadAsync()
+ {
+ isLoading = true;
+ currRecord = null;
+ ListRecords = null;
+ await ReloadData();
+ isLoading = false;
+ }
+
protected async Task ReloadData()
{
isLoading = true;
@@ -230,19 +280,6 @@ namespace MP.Prog.Pages
await Task.Delay(1);
}
- ///
- /// effettua approvazione di ttute le modifiche visualizzate
- ///
- ///
- protected async Task MassAppr()
- {
- ResetData();
- await ResetFilter();
- await Task.Delay(1);
- await ReloadData();
- isLoading = false;
- }
-
protected void ResetData()
{
FDService.rollBackEdit(currRecord);
@@ -278,6 +315,30 @@ namespace MP.Prog.Pages
currRecord = selRecord;
}
+ ///
+ /// Imposta pagina corrente
+ ///
+ ///
+ ///
+ protected async Task SetNumPage(int newNum)
+ {
+ currPage = newNum;
+ await ReloadData();
+ isLoading = false;
+ }
+
+ ///
+ /// Imposta num record x pagina
+ ///
+ ///
+ ///
+ protected async Task SetRecPage(int newNum)
+ {
+ numRecord = newNum;
+ await ReloadData();
+ isLoading = false;
+ }
+
protected string TextReduce(string textOriginal, int maxChar)
{
string answ = textOriginal;
@@ -462,30 +523,6 @@ namespace MP.Prog.Pages
}
}
}
- private string SelUserName
- {
- get
- {
- string answ = "";
- if (MServ.File_Filter != null)
- {
- answ = MServ.File_Filter.UserName;
- }
- return answ;
- }
- set
- {
- if (!MServ.File_Filter.UserName.Equals(value))
- {
- MServ.File_Filter.UserName = value;
- var pUpd = Task.Run(async () =>
- {
- await ReloadAsync();
- });
- pUpd.Wait();
- }
- }
- }
private string SelIdxMacc
{
@@ -537,6 +574,31 @@ namespace MP.Prog.Pages
}
}
+ private string SelUserName
+ {
+ get
+ {
+ string answ = "";
+ if (MServ.File_Filter != null)
+ {
+ answ = MServ.File_Filter.UserName;
+ }
+ return answ;
+ }
+ set
+ {
+ if (!MServ.File_Filter.UserName.Equals(value))
+ {
+ MServ.File_Filter.UserName = value;
+ var pUpd = Task.Run(async () =>
+ {
+ await ReloadAsync();
+ });
+ pUpd.Wait();
+ }
+ }
+ }
+
#endregion Private Properties
#region Private Methods
diff --git a/MP.Prog/Resources/ChangeLog.html b/MP.Prog/Resources/ChangeLog.html
index c017c782..8fc47a9f 100644
--- a/MP.Prog/Resources/ChangeLog.html
+++ b/MP.Prog/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo gestione Programmi MAPO
- Versione: 6.16.2410.2311
+ Versione: 6.16.2410.2317
Note di rilascio:
diff --git a/MP.Prog/Resources/VersNum.txt b/MP.Prog/Resources/VersNum.txt
index d39e7196..87e7119a 100644
--- a/MP.Prog/Resources/VersNum.txt
+++ b/MP.Prog/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2410.2311
+6.16.2410.2317
diff --git a/MP.Prog/Resources/manifest.xml b/MP.Prog/Resources/manifest.xml
index d2730839..7422f1c2 100644
--- a/MP.Prog/Resources/manifest.xml
+++ b/MP.Prog/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2410.2311
+ 6.16.2410.2317
https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/MP.Prog.zip
https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/ChangeLog.html
false
|