feat: fire digest-queue add call from digest chip handler
This commit is contained in:
parent
9bf14fbc75
commit
4246e71061
2 changed files with 16 additions and 0 deletions
|
|
@ -90,6 +90,14 @@ async function reclassifySignal(sig: StageSignal, newLabel: StageSignal['stage_s
|
||||||
body: JSON.stringify({ stage_signal: newLabel }),
|
body: JSON.stringify({ stage_signal: newLabel }),
|
||||||
})
|
})
|
||||||
await useApiFetch(`/api/stage-signals/${sig.id}/dismiss`, { method: 'POST' })
|
await useApiFetch(`/api/stage-signals/${sig.id}/dismiss`, { method: 'POST' })
|
||||||
|
// Digest-only: add to browsable queue (fire-and-forget; sig.id === job_contacts.id)
|
||||||
|
if (newLabel === 'digest') {
|
||||||
|
useApiFetch('/api/digest-queue', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: { 'Content-Type': 'application/json' },
|
||||||
|
body: JSON.stringify({ job_contact_id: sig.id }),
|
||||||
|
}).catch(() => {})
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
const prev = sig.stage_signal
|
const prev = sig.stage_signal
|
||||||
sig.stage_signal = newLabel
|
sig.stage_signal = newLabel
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,14 @@ async function reclassifyPreSignal(job: PipelineJob, sig: StageSignal, newLabel:
|
||||||
body: JSON.stringify({ stage_signal: newLabel }),
|
body: JSON.stringify({ stage_signal: newLabel }),
|
||||||
})
|
})
|
||||||
await useApiFetch(`/api/stage-signals/${sig.id}/dismiss`, { method: 'POST' })
|
await useApiFetch(`/api/stage-signals/${sig.id}/dismiss`, { method: 'POST' })
|
||||||
|
// Digest-only: add to browsable queue (fire-and-forget; sig.id === job_contacts.id)
|
||||||
|
if (newLabel === 'digest') {
|
||||||
|
useApiFetch('/api/digest-queue', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: { 'Content-Type': 'application/json' },
|
||||||
|
body: JSON.stringify({ job_contact_id: sig.id }),
|
||||||
|
}).catch(() => {})
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
const prev = sig.stage_signal
|
const prev = sig.stage_signal
|
||||||
sig.stage_signal = newLabel
|
sig.stage_signal = newLabel
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue