Add success toast after consolidated Jira ticket creation
Shows a notification with the ticket key (e.g. STEAM-2672) as a clickable link to the Jira issue. Auto-dismisses after 8 seconds. Errors are already shown inline in the ConsolidationModal.
This commit is contained in:
@@ -1546,6 +1546,7 @@ function QueuePanel({ open, items, onClose, onUpdate, onDelete, onDeleteMany, on
|
|||||||
|
|
||||||
// Consolidated Jira ticket modal state (multi-item → 1 ticket)
|
// Consolidated Jira ticket modal state (multi-item → 1 ticket)
|
||||||
const [showConsolidationModal, setShowConsolidationModal] = useState(false);
|
const [showConsolidationModal, setShowConsolidationModal] = useState(false);
|
||||||
|
const [consolidationSuccess, setConsolidationSuccess] = useState(null); // { ticket_key, jira_url }
|
||||||
|
|
||||||
// CARD Asset Search state
|
// CARD Asset Search state
|
||||||
const [assetSearchOpen, setAssetSearchOpen] = useState(false);
|
const [assetSearchOpen, setAssetSearchOpen] = useState(false);
|
||||||
@@ -2849,6 +2850,34 @@ function QueuePanel({ open, items, onClose, onUpdate, onDelete, onDeleteMany, on
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* Consolidated Jira ticket success notification */}
|
||||||
|
{consolidationSuccess && (
|
||||||
|
<div style={{
|
||||||
|
position: 'fixed', top: '1rem', right: '440px',
|
||||||
|
zIndex: 10001,
|
||||||
|
display: 'flex', alignItems: 'center', gap: '0.5rem',
|
||||||
|
padding: '0.625rem 1rem',
|
||||||
|
background: 'rgba(14, 165, 233, 0.15)',
|
||||||
|
border: '1px solid rgba(14, 165, 233, 0.4)',
|
||||||
|
borderRadius: '0.375rem',
|
||||||
|
boxShadow: '0 4px 12px rgba(0, 0, 0, 0.4)',
|
||||||
|
fontFamily: "'JetBrains Mono', monospace",
|
||||||
|
fontSize: '0.75rem', fontWeight: '600',
|
||||||
|
color: '#0EA5E9',
|
||||||
|
}}>
|
||||||
|
<Check style={{ width: '14px', height: '14px' }} />
|
||||||
|
Jira ticket created:
|
||||||
|
<a
|
||||||
|
href={consolidationSuccess.jira_url}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
style={{ color: '#7DD3FC', textDecoration: 'underline' }}
|
||||||
|
>
|
||||||
|
{consolidationSuccess.ticket_key}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* Redirect modal */}
|
{/* Redirect modal */}
|
||||||
{redirectItem && (
|
{redirectItem && (
|
||||||
<RedirectModal
|
<RedirectModal
|
||||||
@@ -3059,9 +3088,11 @@ function QueuePanel({ open, items, onClose, onUpdate, onDelete, onDeleteMany, on
|
|||||||
<ConsolidationModal
|
<ConsolidationModal
|
||||||
items={items.filter(i => selectedIds.has(i.id) && i.status === 'pending')}
|
items={items.filter(i => selectedIds.has(i.id) && i.status === 'pending')}
|
||||||
onClose={() => setShowConsolidationModal(false)}
|
onClose={() => setShowConsolidationModal(false)}
|
||||||
onSuccess={() => {
|
onSuccess={(ticketData) => {
|
||||||
setShowConsolidationModal(false);
|
setShowConsolidationModal(false);
|
||||||
setSelectedIds(new Set());
|
setSelectedIds(new Set());
|
||||||
|
setConsolidationSuccess({ ticket_key: ticketData.ticket_key, jira_url: ticketData.jira_url });
|
||||||
|
setTimeout(() => setConsolidationSuccess(null), 8000);
|
||||||
if (onQueueRefresh) onQueueRefresh();
|
if (onQueueRefresh) onQueueRefresh();
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user