fix: disable attach-to-existing endpoint (Ivanti API returns 400), show redirect message instead
This commit is contained in:
@@ -2668,9 +2668,9 @@ function FpEditModal({ open, onClose, submission, queueItems, onSuccess }) {
|
|||||||
{activeTab === 'attachments' && (
|
{activeTab === 'attachments' && (
|
||||||
<div>
|
<div>
|
||||||
<div style={{ marginBottom: '0.75rem' }}>
|
<div style={{ marginBottom: '0.75rem' }}>
|
||||||
<span style={labelStyle}>Existing Attachments ({existingAttachments.length})</span>
|
<span style={labelStyle}>Attachments from Initial Submission ({existingAttachments.length})</span>
|
||||||
{existingAttachments.length === 0 ? (
|
{existingAttachments.length === 0 ? (
|
||||||
<div style={{ fontFamily: 'monospace', fontSize: '0.72rem', color: '#475569', marginTop: '0.25rem' }}>No attachments.</div>
|
<div style={{ fontFamily: 'monospace', fontSize: '0.72rem', color: '#475569', marginTop: '0.25rem' }}>No attachments were included in the original submission.</div>
|
||||||
) : (
|
) : (
|
||||||
<div style={{ marginTop: '0.25rem' }}>
|
<div style={{ marginTop: '0.25rem' }}>
|
||||||
{existingAttachments.map((att, idx) => (
|
{existingAttachments.map((att, idx) => (
|
||||||
@@ -2694,34 +2694,13 @@ function FpEditModal({ open, onClose, submission, queueItems, onSuccess }) {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{!isApproved && (
|
<div style={{
|
||||||
<div>
|
padding: '0.625rem 0.75rem', borderRadius: '0.375rem',
|
||||||
<span style={labelStyle}>Upload New Attachments</span>
|
background: 'rgba(245,158,11,0.06)', border: '1px solid rgba(245,158,11,0.15)',
|
||||||
<input type="file" multiple onChange={(e) => setFiles(Array.from(e.target.files))}
|
fontFamily: 'monospace', fontSize: '0.72rem', color: '#F59E0B',
|
||||||
style={{ display: 'block', marginTop: '0.25rem', fontFamily: 'monospace', fontSize: '0.72rem', color: '#94A3B8' }}
|
}}>
|
||||||
/>
|
To add additional attachments, upload them directly in the Ivanti platform on the workflow detail page.
|
||||||
{files.length > 0 && (
|
</div>
|
||||||
<div style={{ marginTop: '0.35rem' }}>
|
|
||||||
{files.map((f, idx) => (
|
|
||||||
<div key={idx} style={{ fontFamily: 'monospace', fontSize: '0.68rem', color: '#CBD5E1', padding: '0.15rem 0' }}>
|
|
||||||
<Upload style={{ width: '10px', height: '10px', display: 'inline', marginRight: '0.25rem', color: '#F59E0B' }} />
|
|
||||||
{f.name} <span style={{ color: '#475569' }}>({(f.size / 1024).toFixed(1)} KB)</span>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
<button onClick={handleUploadAttachments} disabled={saving} style={{
|
|
||||||
marginTop: '0.5rem', padding: '0.4rem 1rem',
|
|
||||||
background: 'rgba(245,158,11,0.15)',
|
|
||||||
border: '1px solid rgba(245,158,11,0.4)',
|
|
||||||
borderRadius: '0.375rem', color: '#F59E0B',
|
|
||||||
fontSize: '0.75rem', fontWeight: '700', cursor: saving ? 'not-allowed' : 'pointer',
|
|
||||||
fontFamily: 'monospace', textTransform: 'uppercase', letterSpacing: '0.05em',
|
|
||||||
}}>
|
|
||||||
{saving ? 'Uploading…' : `Upload ${files.length} File(s)`}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user