C2015-028 Add Editorial Mode to PROMS Step Editor

This commit is contained in:
2025-09-25 08:01:19 -04:00
parent e8b32c4ed3
commit 9130604fa6
10 changed files with 161 additions and 38 deletions

View File

@@ -3933,9 +3933,7 @@ namespace VEPROMS.CSLA.Library
get
{
bool chg = HasChanges;
StepInfo si = this as StepInfo;
if (si == null) return false;
StepConfig sc = si.MyConfig as StepConfig;
StepConfig sc = this.MyConfig as StepConfig;
if (sc == null) return false;
// if there is no override & return whether there was a change to the text.
if (chg && ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ChangeIds &&
@@ -3943,6 +3941,21 @@ namespace VEPROMS.CSLA.Library
return false; // No Change ID - No Change Bar
if ((sc.Step_SpellCheckerChangedText ?? "") == "NoChangeBar")
return false; // Spell Checker, in editorial mode (format flag EditoralSpellCheck) , made the change and there was no change bar prior to that change B2015-024
// C2015-028 Add Editorial Mode to PROMS Step Editor
// last change was in editorial mode, so ignore it
if (!string.IsNullOrEmpty(sc.Step_ChangeIDEditorialMode))
return false;
// C2015-028 Add Editorial Mode to PROMS Step Editor
// Add Check for enhanced docs
// If enhanced docs, need to check the step_config for the master
if (sc.MyEnhancedDocuments != null && sc.MyEnhancedDocuments.Count == 1 && sc.MyEnhancedDocuments[0].Type == 0)
{
ItemInfo ii = ItemInfo.Get(sc.MyEnhancedDocuments[0].ItemID, true);
if (ii == null) return false; // when deleting a source step, this was causing a crash (null ii)
return ii.HasChangeBar;
}
if (sc.Step_CBOverride == null)
return chg;
return (sc.Step_CBOverride == "On");
@@ -3953,9 +3966,7 @@ namespace VEPROMS.CSLA.Library
get
{
if (this.IsAccPages || this.IsProcedure || this.IsSection) return false;
StepInfo si = this as StepInfo;
if (si == null) return false;
StepConfig sc = si.MyConfig as StepConfig;
StepConfig sc = this.MyConfig as StepConfig;
if (sc == null) return false;
// go back to source & see what date it has:
if (sc.MyEnhancedDocuments != null && sc.MyEnhancedDocuments.Count == 1 && sc.MyEnhancedDocuments[0].Type == 0)