Add Remediate and DECOM to RedirectModal workflow options
RedirectModal had a hardcoded WORKFLOW_OPTIONS array that only included FP, Archer, CARD, and GRANITE. Added DECOM and Remediate options, and updated needsVendor check to require vendor for Remediate workflows.
This commit is contained in:
@@ -4,10 +4,12 @@ import { CornerUpRight, X, Loader, AlertCircle } from 'lucide-react';
|
|||||||
const API_BASE = process.env.REACT_APP_API_BASE || 'http://localhost:3001/api';
|
const API_BASE = process.env.REACT_APP_API_BASE || 'http://localhost:3001/api';
|
||||||
|
|
||||||
const WORKFLOW_OPTIONS = [
|
const WORKFLOW_OPTIONS = [
|
||||||
{ key: 'FP', label: 'FP', col: '#F59E0B', rgb: '245,158,11' },
|
{ key: 'FP', label: 'FP', col: '#F59E0B', rgb: '245,158,11' },
|
||||||
{ key: 'Archer', label: 'Archer', col: '#0EA5E9', rgb: '14,165,233' },
|
{ key: 'Archer', label: 'Archer', col: '#0EA5E9', rgb: '14,165,233' },
|
||||||
{ key: 'CARD', label: 'CARD', col: '#10B981', rgb: '16,185,129' },
|
{ key: 'CARD', label: 'CARD', col: '#10B981', rgb: '16,185,129' },
|
||||||
{ key: 'GRANITE', label: 'GRANITE', col: '#A1887F', rgb: '161,136,127' },
|
{ key: 'GRANITE', label: 'GRANITE', col: '#A1887F', rgb: '161,136,127' },
|
||||||
|
{ key: 'DECOM', label: 'DECOM', col: '#EF4444', rgb: '239,68,68' },
|
||||||
|
{ key: 'Remediate', label: 'Remediate', col: '#A855F7', rgb: '168,85,247' },
|
||||||
];
|
];
|
||||||
|
|
||||||
export default function RedirectModal({ item, onClose, onRedirect }) {
|
export default function RedirectModal({ item, onClose, onRedirect }) {
|
||||||
@@ -16,7 +18,7 @@ export default function RedirectModal({ item, onClose, onRedirect }) {
|
|||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [error, setError] = useState('');
|
const [error, setError] = useState('');
|
||||||
|
|
||||||
const needsVendor = workflowType === 'FP' || workflowType === 'Archer';
|
const needsVendor = workflowType === 'FP' || workflowType === 'Archer' || workflowType === 'Remediate';
|
||||||
const canSubmit = !loading && (!needsVendor || vendor.trim().length > 0);
|
const canSubmit = !loading && (!needsVendor || vendor.trim().length > 0);
|
||||||
|
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user