skip stage configured and working
This commit is contained in:
@@ -923,6 +923,10 @@ const AutomationPage: React.FC = () => {
|
||||
const stageBorderColors = ['border-l-brand-500', 'border-l-purple-500', 'border-l-warning-500', 'border-l-gray-600'];
|
||||
const stageBorderColor = stageBorderColors[index] || 'border-l-brand-500';
|
||||
|
||||
// Check if this stage is enabled in config
|
||||
const stageEnabledKey = `stage_${stage.number}_enabled` as keyof AutomationConfig;
|
||||
const isStageEnabled = config?.[stageEnabledKey] ?? true;
|
||||
|
||||
return (
|
||||
<div
|
||||
key={stage.number}
|
||||
@@ -947,9 +951,11 @@ const AutomationPage: React.FC = () => {
|
||||
<StageIcon className="size-4 text-white" />
|
||||
</div>
|
||||
<span className="text-base font-bold text-gray-900 dark:text-white">Stage {stage.number}</span>
|
||||
{isActive && <span className="text-xs px-2 py-0.5 bg-brand-500 text-white rounded-full font-medium">● Active</span>}
|
||||
{isActive && isStageEnabled && <span className="text-xs px-2 py-0.5 bg-brand-500 text-white rounded-full font-medium">● Active</span>}
|
||||
{isActive && !isStageEnabled && <span className="text-xs px-2 py-0.5 bg-orange-500 text-white rounded-full font-medium">Skipped</span>}
|
||||
{isComplete && <span className="text-xs px-2 py-0.5 bg-success-500 text-white rounded-full font-medium">✓</span>}
|
||||
{!isActive && !isComplete && stage.pending > 0 && <span className="text-xs px-2 py-0.5 bg-gray-400 text-white rounded-full font-medium">Ready</span>}
|
||||
{!isActive && !isComplete && stage.pending > 0 && !isStageEnabled && <span className="text-xs px-2 py-0.5 bg-orange-500 text-white rounded-full font-medium">Skipped</span>}
|
||||
{!isActive && !isComplete && stage.pending > 0 && isStageEnabled && <span className="text-xs px-2 py-0.5 bg-gray-400 text-white rounded-full font-medium">Ready</span>}
|
||||
</div>
|
||||
{/* Stage Function Name - Right side, larger font */}
|
||||
<div className={`text-sm font-bold ${stageConfig.textColor}`}>{stageConfig.name}</div>
|
||||
@@ -1053,6 +1059,10 @@ const AutomationPage: React.FC = () => {
|
||||
const stageBorderColors56 = ['border-l-brand-500', 'border-l-purple-500'];
|
||||
const stageBorderColor = stageBorderColors56[index] || 'border-l-brand-500';
|
||||
|
||||
// Check if this stage is enabled in config
|
||||
const stageEnabledKey = `stage_${stage.number}_enabled` as keyof AutomationConfig;
|
||||
const isStageEnabled = config?.[stageEnabledKey] ?? true;
|
||||
|
||||
return (
|
||||
<div
|
||||
key={stage.number}
|
||||
@@ -1076,9 +1086,11 @@ const AutomationPage: React.FC = () => {
|
||||
<StageIcon className="size-4 text-white" />
|
||||
</div>
|
||||
<span className="text-base font-bold text-gray-900 dark:text-white">Stage {stage.number}</span>
|
||||
{isActive && <span className="text-xs px-2 py-0.5 bg-brand-500 text-white rounded-full font-medium">● Active</span>}
|
||||
{isActive && isStageEnabled && <span className="text-xs px-2 py-0.5 bg-brand-500 text-white rounded-full font-medium">● Active</span>}
|
||||
{isActive && !isStageEnabled && <span className="text-xs px-2 py-0.5 bg-orange-500 text-white rounded-full font-medium">Skipped</span>}
|
||||
{isComplete && <span className="text-xs px-2 py-0.5 bg-success-500 text-white rounded-full font-medium">✓</span>}
|
||||
{!isActive && !isComplete && stage.pending > 0 && <span className="text-xs px-2 py-0.5 bg-gray-400 text-white rounded-full font-medium">Ready</span>}
|
||||
{!isActive && !isComplete && stage.pending > 0 && !isStageEnabled && <span className="text-xs px-2 py-0.5 bg-orange-500 text-white rounded-full font-medium">Skipped</span>}
|
||||
{!isActive && !isComplete && stage.pending > 0 && isStageEnabled && <span className="text-xs px-2 py-0.5 bg-gray-400 text-white rounded-full font-medium">Ready</span>}
|
||||
</div>
|
||||
{/* Stage Function Name - Right side, larger font */}
|
||||
<div className={`text-sm font-bold ${stageConfig.textColor}`}>{stageConfig.name}</div>
|
||||
@@ -1162,6 +1174,9 @@ const AutomationPage: React.FC = () => {
|
||||
|
||||
const progressPercent = totalReview > 0 ? Math.min(Math.round((approvedCount / totalReview) * 100), 100) : 0;
|
||||
|
||||
// Check if stage 7 is enabled in config
|
||||
const isStage7Enabled = config?.stage_7_enabled ?? true;
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`
|
||||
@@ -1184,9 +1199,12 @@ const AutomationPage: React.FC = () => {
|
||||
<PaperPlaneIcon className="size-4 text-white" />
|
||||
</div>
|
||||
<span className="text-base font-bold text-gray-900 dark:text-white">Stage 7</span>
|
||||
{isActive && <span className="text-xs px-2 py-0.5 bg-success-500 text-white rounded-full font-medium">● Active</span>}
|
||||
{isActive && isStage7Enabled && <span className="text-xs px-2 py-0.5 bg-success-500 text-white rounded-full font-medium">● Active</span>}
|
||||
{isActive && !isStage7Enabled && <span className="text-xs px-2 py-0.5 bg-orange-500 text-white rounded-full font-medium">Skipped</span>}
|
||||
{isActive && !isStage7Enabled && <span className="text-xs px-2 py-0.5 bg-orange-500 text-white rounded-full font-medium">Skipped</span>}
|
||||
{isComplete && <span className="text-xs px-2 py-0.5 bg-success-500 text-white rounded-full font-medium">✓</span>}
|
||||
{!isActive && !isComplete && pendingReview > 0 && <span className="text-xs px-2 py-0.5 bg-gray-400 text-white rounded-full font-medium">Ready</span>}
|
||||
{!isActive && !isComplete && pendingReview > 0 && !isStage7Enabled && <span className="text-xs px-2 py-0.5 bg-orange-500 text-white rounded-full font-medium">Skipped</span>}
|
||||
{!isActive && !isComplete && pendingReview > 0 && isStage7Enabled && <span className="text-xs px-2 py-0.5 bg-gray-400 text-white rounded-full font-medium">Ready</span>}
|
||||
</div>
|
||||
{/* Stage Function Name - Right side, larger font */}
|
||||
<div className={`text-sm font-bold ${stageConfig.textColor}`}>{stageConfig.name}</div>
|
||||
|
||||
Reference in New Issue
Block a user