diff --git a/MP.MONO.ANALYZER/MP.MONO.ANALYZER.csproj b/MP.MONO.ANALYZER/MP.MONO.ANALYZER.csproj
index 16899d7..e408ca7 100644
--- a/MP.MONO.ANALYZER/MP.MONO.ANALYZER.csproj
+++ b/MP.MONO.ANALYZER/MP.MONO.ANALYZER.csproj
@@ -6,7 +6,7 @@
enable
enable
AnyCPU;x86;x64
- 1.12206.1910
+ 1.12206.1912
diff --git a/MP.MONO.ANALYZER/Resources/ChangeLog.html b/MP.MONO.ANALYZER/Resources/ChangeLog.html
index a422a22..5ffbae4 100644
--- a/MP.MONO.ANALYZER/Resources/ChangeLog.html
+++ b/MP.MONO.ANALYZER/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
MAPO-MONO
- Version: 1.12206.1910
+ Version: 1.12206.1912
Release Note:
-
diff --git a/MP.MONO.ANALYZER/Resources/VersNum.txt b/MP.MONO.ANALYZER/Resources/VersNum.txt
index 27b763f..5016f13 100644
--- a/MP.MONO.ANALYZER/Resources/VersNum.txt
+++ b/MP.MONO.ANALYZER/Resources/VersNum.txt
@@ -1 +1 @@
-1.12206.1910
+1.12206.1912
diff --git a/MP.MONO.ANALYZER/Resources/manifest.xml b/MP.MONO.ANALYZER/Resources/manifest.xml
index a3e4287..106c113 100644
--- a/MP.MONO.ANALYZER/Resources/manifest.xml
+++ b/MP.MONO.ANALYZER/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 1.12206.1910
+ 1.12206.1912
http://nexus.steamware.net/repository/SWS/MP.MONO.ANALYZER/stable/LAST/MP.Mon.zip
http://nexus.steamware.net/repository/SWS/MP.MONO.ANALYZER/stable/LAST/ChangeLog.html
false
diff --git a/MP.MONO.DECODER/MP.MONO.DECODER.csproj b/MP.MONO.DECODER/MP.MONO.DECODER.csproj
index e78f92e..4fae695 100644
--- a/MP.MONO.DECODER/MP.MONO.DECODER.csproj
+++ b/MP.MONO.DECODER/MP.MONO.DECODER.csproj
@@ -6,7 +6,7 @@
enable
enable
AnyCPU;x86;x64
- 1.12206.1910
+ 1.12206.1912
diff --git a/MP.MONO.DECODER/Resources/ChangeLog.html b/MP.MONO.DECODER/Resources/ChangeLog.html
index a422a22..5ffbae4 100644
--- a/MP.MONO.DECODER/Resources/ChangeLog.html
+++ b/MP.MONO.DECODER/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
MAPO-MONO
-
Version: 1.12206.1910
+ Version: 1.12206.1912
Release Note:
-
diff --git a/MP.MONO.DECODER/Resources/VersNum.txt b/MP.MONO.DECODER/Resources/VersNum.txt
index 27b763f..5016f13 100644
--- a/MP.MONO.DECODER/Resources/VersNum.txt
+++ b/MP.MONO.DECODER/Resources/VersNum.txt
@@ -1 +1 @@
-1.12206.1910
+1.12206.1912
diff --git a/MP.MONO.DECODER/Resources/manifest.xml b/MP.MONO.DECODER/Resources/manifest.xml
index 7d035ab..5cab691 100644
--- a/MP.MONO.DECODER/Resources/manifest.xml
+++ b/MP.MONO.DECODER/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 1.12206.1910
+ 1.12206.1912
http://nexus.steamware.net/repository/SWS/MP.MONO.DECODER/stable/LAST/MP.Mon.zip
http://nexus.steamware.net/repository/SWS/MP.MONO.DECODER/stable/LAST/ChangeLog.html
false
diff --git a/MP.MONO.Data/Controllers/MpDbController.cs b/MP.MONO.Data/Controllers/MpDbController.cs
index 8cc833a..c05aa89 100644
--- a/MP.MONO.Data/Controllers/MpDbController.cs
+++ b/MP.MONO.Data/Controllers/MpDbController.cs
@@ -519,6 +519,8 @@ namespace MP.MONO.Data.Controllers
}
else
{
+ // se nuovo (user edit) --> NON protetto!
+ editRec.Protected = false;
localDbCtx
.DbSetPMTask
.Add(editRec);
@@ -584,9 +586,10 @@ namespace MP.MONO.Data.Controllers
{
List missTask = new List();
+ // elenco dei task NON disattivati
List? allTask = localDbCtx
.DbSetPMTask
- .Where(x => x.MachineId == MachineId)
+ .Where(x => x.MachineId == MachineId && !x.IsDisabled)
.Include(i => i.CounterNav)
.ToList();
diff --git a/MP.MONO.Data/DbModels/PrevMaintModel.cs b/MP.MONO.Data/DbModels/PrevMaintModel.cs
index 61e03ae..acbf8f9 100644
--- a/MP.MONO.Data/DbModels/PrevMaintModel.cs
+++ b/MP.MONO.Data/DbModels/PrevMaintModel.cs
@@ -60,7 +60,9 @@ namespace MP.MONO.Data.DbModels
public string CCode { get; set; } = "";
///
- /// Indica che il task è protetto, impostato dal costruttore (originale)
+ /// Indica che il task è protetto
+ /// true = impostato dal costruttore (originale)
+ ///
public bool Protected { get; set; } = true;
///
@@ -77,7 +79,7 @@ namespace MP.MONO.Data.DbModels
[NotMapped]
public bool IsValid
{
- get => MachineId > 0 && ExpiryVal >= 1 && ExtIdx != 0 && !string.IsNullOrEmpty(CCode) && !string.IsNullOrEmpty(PMTCode) && !string.IsNullOrEmpty(PMMGCode) && !string.IsNullOrEmpty(JobDescription) && !string.IsNullOrEmpty(PMUTCode);
+ get => MachineId > 0 && ExpiryVal >= 1 && ExtIdx >= 0 && !string.IsNullOrEmpty(CCode) && !string.IsNullOrEmpty(PMTCode) && !string.IsNullOrEmpty(PMMGCode) && !string.IsNullOrEmpty(JobDescription) && !string.IsNullOrEmpty(PMUTCode);
}
///
diff --git a/MP.MONO.SIM/MP.MONO.SIM.csproj b/MP.MONO.SIM/MP.MONO.SIM.csproj
index ac73e5b..6015cb3 100644
--- a/MP.MONO.SIM/MP.MONO.SIM.csproj
+++ b/MP.MONO.SIM/MP.MONO.SIM.csproj
@@ -6,7 +6,7 @@
enable
enable
AnyCPU;x86;x64
- 1.12206.1910
+ 1.12206.1912
diff --git a/MP.MONO.SIM/Resources/ChangeLog.html b/MP.MONO.SIM/Resources/ChangeLog.html
index a422a22..5ffbae4 100644
--- a/MP.MONO.SIM/Resources/ChangeLog.html
+++ b/MP.MONO.SIM/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
MAPO-MONO
-
Version: 1.12206.1910
+ Version: 1.12206.1912
Release Note:
-
diff --git a/MP.MONO.SIM/Resources/VersNum.txt b/MP.MONO.SIM/Resources/VersNum.txt
index 27b763f..5016f13 100644
--- a/MP.MONO.SIM/Resources/VersNum.txt
+++ b/MP.MONO.SIM/Resources/VersNum.txt
@@ -1 +1 @@
-1.12206.1910
+1.12206.1912
diff --git a/MP.MONO.SIM/Resources/manifest.xml b/MP.MONO.SIM/Resources/manifest.xml
index 4cc5751..34f1180 100644
--- a/MP.MONO.SIM/Resources/manifest.xml
+++ b/MP.MONO.SIM/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 1.12206.1910
+ 1.12206.1912
http://nexus.steamware.net/repository/SWS/MP.MONO.SIM/stable/LAST/MP.Mon.zip
http://nexus.steamware.net/repository/SWS/MP.MONO.SIM/stable/LAST/ChangeLog.html
false
diff --git a/MP.MONO.UI/Components/EditMaintTask.razor.cs b/MP.MONO.UI/Components/EditMaintTask.razor.cs
index a7125dc..646a07c 100644
--- a/MP.MONO.UI/Components/EditMaintTask.razor.cs
+++ b/MP.MONO.UI/Components/EditMaintTask.razor.cs
@@ -114,13 +114,17 @@ namespace MP.MONO.UI.Components
if (_currItem != null)
{
+ // aggiorno
await DataService.PrevMaintTaskUpdate(_currItem);
- await DataUpdated.InvokeAsync(0);
+ // update pending...
+ await DataService.SchedMaintTaskCreateMissing(_currItem.MachineId);
}
else
{
Console.WriteLine("Record null!");
}
+ // delay x display
+ await DataUpdated.InvokeAsync(0);
}
#endregion Private Methods
diff --git a/MP.MONO.UI/Components/MaintTaskSched.razor.cs b/MP.MONO.UI/Components/MaintTaskSched.razor.cs
index 561472f..a01dad3 100644
--- a/MP.MONO.UI/Components/MaintTaskSched.razor.cs
+++ b/MP.MONO.UI/Components/MaintTaskSched.razor.cs
@@ -20,12 +20,28 @@ namespace MP.MONO.UI.Components
await ReloadData();
}
+ protected async Task ResetData()
+ {
+ showAddNew = false;
+ currRec = null;
+ await ReloadData();
+ }
+
+ protected async Task UpdateActivData()
+ {
+ //int currTaskId = currRec.PMTaskId;
+ await ReloadData();
+ //currRec = ListRecords.Where(x => x.PMTaskId == currTaskId).FirstOrDefault();
+ showAddNew = false;
+ }
+
#endregion Protected Methods
#region Private Fields
private int _MaxRecord = 200;
+ private PrevMaintTaskModel? currRec = new PrevMaintTaskModel();
private bool doSetup = false;
private List? ListRecords = null;
@@ -43,6 +59,11 @@ namespace MP.MONO.UI.Components
private int _numRecord { get; set; } = 10;
+ private string addNewMessage
+ {
+ get => showAddNew ? "Hide Add New Task" : "Show Add new Task";
+ }
+
private int currPage
{
get => _currPage;
@@ -99,6 +120,10 @@ namespace MP.MONO.UI.Components
}
}
+ private PrevMaintTaskModel? selRecord { get; set; } = null;
+
+ private bool showAddNew { get; set; } = false;
+
private int totalCount
{
get
@@ -124,121 +149,14 @@ namespace MP.MONO.UI.Components
reqChangeMode.InvokeAsync(true);
}
- private bool showAddNew { get; set; } = false;
-
- private PrevMaintTaskModel? currRec = new PrevMaintTaskModel();
-
- ///
- /// Gestione aggiunta nuovo record intervento
- ///
- private void toggleAddNew()
- {
- showAddNew = !showAddNew;
- // se mostro --> creo nuovo record...
- if (showAddNew)
- {
- currRec = new PrevMaintTaskModel();
- }
- }
-
- private string addNewMessage
- {
- get => showAddNew ? "Hide Add New Task" : "Show Add new Task";
- }
-
- private string cssCheckSel(int PMTaskId)
- {
- return PMTaskId == currPMTaskId ? "table-primary" : "";
- }
-
private string cssCheckDisabled(bool isDisabled)
{
return isDisabled ? "text-decoration-line-through" : "";
}
-
-
-
- private void ForceReload(int newNum)
+ private string cssCheckSel(int PMTaskId)
{
- numRecord = newNum;
- }
-
- private void ForceReloadPage(int newNum)
- {
- currPage = newNum;
- }
-
- protected async Task ResetData()
- {
- showAddNew = false;
- currRec = null;
- await ReloadData();
- }
-
- protected async Task UpdateActivData()
- {
- //int currTaskId = currRec.PMTaskId;
- await ReloadData();
- //currRec = ListRecords.Where(x => x.PMTaskId == currTaskId).FirstOrDefault();
- showAddNew = false;
- }
-
- private async Task ReloadData()
- {
- isLoading = true;
- ListRecords = null;
- await Task.Delay(1);
- SearchRecords = await MMDataService.PrevMaintTaskGetFilt(MachineId, 0, MaxRecord);
- ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
- await Task.Delay(1);
- isLoading = false;
- }
-
-
- private PrevMaintTaskModel? selRecord { get; set; } = null;
-
- private async Task EditRecord(PrevMaintTaskModel cRec)
- {
- currRec = cRec;
- showAddNew = true;
- await Task.Delay(1);
- }
-
- private async Task ShowDetail(PrevMaintTaskModel currRec)
- {
- selRecord = currRec;
- if (currRec != null)
- {
- currPMTaskId = currRec.PMTaskId;
- }
- else
- {
- currPMTaskId = 0;
- }
- //await ReloadData();
- await Task.Delay(1);
- }
-
-
- ///
- /// Riabilita un record disabilitato
- ///
- ///
- ///
- private async Task EnableRecord(PrevMaintTaskModel currRec)
- {
-
- string confirmMessage = "Are you sure to re-enable this Task?";
-
- if (!await JSRuntime.InvokeAsync("confirm", confirmMessage))
- return;
-
- // altrimenti riabilito
- await MMDataService.PMTaskEnableRecord(currRec);
-
- await ReloadData();
- await Task.Delay(1);
+ return PMTaskId == currPMTaskId ? "table-primary" : "";
}
///
@@ -275,13 +193,89 @@ namespace MP.MONO.UI.Components
// altrimenti elimino
await MMDataService.PMTaskDeleteRecord(currRec, forceDelete);
+ // update pending...
+ await MMDataService.SchedMaintTaskCreateMissing(currRec.MachineId);
await ReloadData();
await Task.Delay(1);
}
+ private async Task EditRecord(PrevMaintTaskModel cRec)
+ {
+ currRec = cRec;
+ showAddNew = true;
+ await Task.Delay(1);
+ }
+ ///
+ /// Riabilita un record disabilitato
+ ///
+ ///
+ ///
+ private async Task EnableRecord(PrevMaintTaskModel currRec)
+ {
+ string confirmMessage = "Are you sure to re-enable this Task?";
+ if (!await JSRuntime.InvokeAsync("confirm", confirmMessage))
+ return;
+
+ // altrimenti riabilito
+ await MMDataService.PMTaskEnableRecord(currRec);
+ // update pending...
+ await MMDataService.SchedMaintTaskCreateMissing(currRec.MachineId);
+
+ await ReloadData();
+ await Task.Delay(1);
+ }
+
+ private void ForceReload(int newNum)
+ {
+ numRecord = newNum;
+ }
+
+ private void ForceReloadPage(int newNum)
+ {
+ currPage = newNum;
+ }
+
+ private async Task ReloadData()
+ {
+ isLoading = true;
+ ListRecords = null;
+ await Task.Delay(1);
+ SearchRecords = await MMDataService.PrevMaintTaskGetFilt(MachineId, 0, MaxRecord);
+ ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
+ await Task.Delay(1);
+ isLoading = false;
+ }
+
+ private async Task ShowDetail(PrevMaintTaskModel currRec)
+ {
+ selRecord = currRec;
+ if (currRec != null)
+ {
+ currPMTaskId = currRec.PMTaskId;
+ }
+ else
+ {
+ currPMTaskId = 0;
+ }
+ //await ReloadData();
+ await Task.Delay(1);
+ }
+
+ ///
+ /// Gestione aggiunta nuovo record intervento
+ ///
+ private void toggleAddNew()
+ {
+ showAddNew = !showAddNew;
+ // se mostro --> creo nuovo record...
+ if (showAddNew)
+ {
+ currRec = new PrevMaintTaskModel();
+ }
+ }
#endregion Private Methods
}
diff --git a/MP.MONO.UI/MP.MONO.UI.csproj b/MP.MONO.UI/MP.MONO.UI.csproj
index d09fd89..679dcfa 100644
--- a/MP.MONO.UI/MP.MONO.UI.csproj
+++ b/MP.MONO.UI/MP.MONO.UI.csproj
@@ -5,7 +5,7 @@
enable
enable
AnyCPU;x86;x64
- 1.12206.1911
+ 1.12206.1912
diff --git a/MP.MONO.UI/Resources/ChangeLog.html b/MP.MONO.UI/Resources/ChangeLog.html
index e087a20..5ffbae4 100644
--- a/MP.MONO.UI/Resources/ChangeLog.html
+++ b/MP.MONO.UI/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
MAPO-MONO
-
Version: 1.12206.1911
+ Version: 1.12206.1912
Release Note:
-
diff --git a/MP.MONO.UI/Resources/VersNum.txt b/MP.MONO.UI/Resources/VersNum.txt
index b585c33..5016f13 100644
--- a/MP.MONO.UI/Resources/VersNum.txt
+++ b/MP.MONO.UI/Resources/VersNum.txt
@@ -1 +1 @@
-1.12206.1911
+1.12206.1912
diff --git a/MP.MONO.UI/Resources/manifest.xml b/MP.MONO.UI/Resources/manifest.xml
index 8de12c1..67b122c 100644
--- a/MP.MONO.UI/Resources/manifest.xml
+++ b/MP.MONO.UI/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 1.12206.1911
+ 1.12206.1912
http://nexus.steamware.net/repository/SWS/MP.MONO.UI/stable/LAST/MP.Mon.zip
http://nexus.steamware.net/repository/SWS/MP.MONO.UI/stable/LAST/ChangeLog.html
false