mirror of
https://github.com/warmbly/warmbly.git
synced 2026-09-07 16:02:16 +00:00
feat: fix the segment dialog UI and make a contact created inside a segment join it (issue #285): the add-to-campaign picker now shows a humanised, colour-toned campaign status instead of the raw PAUSED_NO_ACCOUNTS enum, its footer wraps instead of clipping the hint mid-sentence and the Add leads button no longer breaks across two lines, campaign status labels move to a shared components/app/campaigns/status module, the Segments, Categories and Segment pages plus every unmapped settings and onboarding route get a document title so they stop reading Page not found, and POST /contacts takes a segments array that pins the new contacts in as include overrides (validated before the write, best-effort after it) which the New contact dialog sends when opened from a segment page
This commit is contained in:
@@ -10,10 +10,13 @@ export default function useAddContacts() {
|
||||
onSuccess: () => {
|
||||
// The campaign Leads tab is a ["contacts","list"] search scoped to one
|
||||
// campaign, so a lead created there needs the list refetched, and
|
||||
// ["campaigns"] carries the counts that just moved.
|
||||
// ["campaigns"] carries the counts that just moved. A contact created
|
||||
// inside a segment is pinned into it, which moves that segment's
|
||||
// count and its pinned-contacts panel.
|
||||
return Promise.all([
|
||||
queryClient.invalidateQueries({ queryKey: ["contacts", "list"] }),
|
||||
queryClient.invalidateQueries({ queryKey: ["campaigns"] }),
|
||||
queryClient.invalidateQueries({ queryKey: ["segments"] }),
|
||||
])
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user