PageSourceSearch

https://colara.co/assets/WorkflowsHub-BFvCuxqq.js

js colara.co collected 2026-09-24 14:36:51 UTC 12,992 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/WorkflowProgressView-BK73Gx6S.js","assets/index-CCfJC9m9.js","assets/vendor-C_lr6Peh.js","assets/index-EQ5jy9v_.css","assets/PageSkeleton-BeEnqj1m.js","assets/skeleton-D19tAbGf.js","assets/select-BK7nL9Mt.js","assets/index-D7pJbSr8.js","assets/index-DnHsgeAP.js","assets/check-wh8Oepvp.js","assets/chevron-up-BKNTUudS.js","assets/ClientWorkflowsView-BKtDQYRj.js","assets/invoice-reminder-workflow-Y9NzG0E0.js","assets/use-unsaved-changes-warning-CDDPJ7Xw.js","assets/input-BhU9ByXS.js","assets/label-Dpeci-J4.js","assets/switch-Dsti7IIC.js","assets/receipt-text-lsayHJbV.js","assets/plus-Cx32ukVL.js","assets/disclosure-summary-DiAEyCbo.js","assets/chevron-right-C6nWXIh2.js","assets/html-text-nuc7F1He.js","assets/email-plain-text-hAD0xMT2.js","assets/crm-shortcodes-D-w6xNV3.js","assets/client-name-zfge3VH_.js","assets/currency-Bpf8_ITC.js","assets/date-utils-_xtJs2tX.js","assets/bookmark-plus-CofZw01L.js","assets/calendar-check-DfQs7Sww.js","assets/party-popper-DESjsxcT.js","assets/dropdown-menu-CrqGqHT1.js","assets/index-6nj-CStY.js","assets/circle-DD1ufIjP.js","assets/workflow-7IwvQk-T.js","assets/git-branch-CAyWKYNr.js","assets/grip-vertical-DY8HdbcO.js","assets/clock-3-DAJRhQ-f.js","assets/square-check-big-DH4vwcyp.js","assets/arrow-up-Dkus4uTS.js","assets/arrow-down-Bhw02iNr.js","assets/use-autosave-DBbQ56kv.js","assets/PageHelper-BeU7BH7D.js","assets/use-dismissed-hints-C5DtZfZV.js","assets/framer-motion-BelE6YLj.js","assets/circle-question-mark-CP_yXdEO.js","assets/textarea-DPKXeB9F.js","assets/empty-state-4a14WMSj.js","assets/circle-check-vKn0VvWh.js","assets/zap-CP_9R3DG.js","assets/calendar-DTAYBCHu.js","assets/clipboard-list-D4d8SG2B.js","assets/gift-D-fgjl6H.js","assets/image-C538Flpk.js","assets/pencil-B1CfnCkx.js","assets/lightbulb-CfrL7HRw.js","assets/clock-NeT8qJCP.js","assets/send-Dla22FU7.js","assets/bell-CoAbrTlJ.js","assets/trash-2-q_yUbozN.js","assets/timer-D7UYKmYf.js","assets/pin-DOdSrsqs.js","assets/layout-grid-DxSSbb99.js","assets/play-B0w_0Qg8.js","assets/copy-BBUkuAem.js","assets/settings-2-Ck3QicmE.js","assets/AutomationsHub-B7zlLzI1.js","assets/FlowEditor-EhHPmxuu.js","assets/reactflow-CfPU3W8g.js","assets/memoize-BFYXIJ-M.js","assets/index-5-VMID8x.js","assets/reactflow-Fd0xVSp_.css","assets/ShortCodePreviewDialog-rSILyKcF.js","assets/EmailPreviewMergeBanner-ByloVHqK.js","assets/search-DJ1DqJUl.js","assets/AiWritingAssist-COWhiWSj.js","assets/wand-sparkles-Bwbf1Sma.js","assets/ShortCodeReference-CABpQykt.js","assets/popover-DsNWZLCi.js","assets/braces-B4a2Ghgm.js","assets/calendar-clock-DmW_XzR4.js","assets/arrow-right-left-C9WcJyhH.js","assets/tag-DMwA46Sl.js","assets/receipt-tMfuPpa_.js","assets/calendar-plus-Ben4uHnr.js","assets/archive-B9Z6CxMm.js","assets/undo-2-BISTJWF5.js","assets/redo-2-vLt8zs53.js","assets/unlink-C2omrWM5.js","assets/index-DSUImCn6.js","assets/editorial-intro-KdlexPhE.js","assets/EmailTemplatePicker-B3rI3x5L.js","assets/list-Cl5pfbaH.js","assets/save-DPQEOg4B.js","assets/funnel-D01ivakc.js","assets/code-xml-C_jUuoW1.js"])))=>i.map(i=>d[i]);
2import{q as _,B as v,ac as W,u as C,ah as L,P,ar as h,_ as j}from"./index-CCfJC9m9.js";import{r as n,j as e}from"./vendor-C_lr6Peh.js";import{W as T}from"./WorkflowEmailPreferencePrompt-BOhfBsJv.js";import{I as R}from"./input-BhU9ByXS.js";import{L as S}from"./label-Dpeci-J4.js";import{S as I,a as A,b as $,c as O,d as V}from"./select-BK7nL9Mt.js";import{c as k,W as B}from"./WorkflowEmailReviewNotice-qg29zk6T.js";import{W as D,a as F}from"./WorkflowEmailDraftDialog-B_WbYtxO.js";import{M as q}from"./mobile-section-select-BVQjtzqb.js";import{P as g}from"./PageSkeleton-BeEnqj1m.js";import{c as K}from"./tab-aliases-DbnNBIFG.js";import{W as U}from"./workflow-7IwvQk-T.js";import{B as H}from"./bookmark-plus-CofZw01L.js";import{P as M}from"./plus-Cx32ukVL.js";import"./index-D7pJbSr8.js";import"./index-DnHsgeAP.js";import"./check-wh8Oepvp.js";import"./chevron-up-BKNTUudS.js";import"./textarea-DPKXeB9F.js";import"./html-text-nuc7F1He.js";import"./email-plain-text-hAD0xMT2.js";import"./skeleton-D19tAbGf.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"0ccb255495e39d589ace3c3ce0094401fe4fff85"};var r=new t.Error().stack;r&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[r]="420ae8e6-bfeb-4456-9c34-7493cc030992",t._sentryDebugIdIdentifier="sentry-dbid-420ae8e6-bfeb-4456-9c34-7493cc030992")}catch{}})();const z=[{value:"action",label:"Action needed"},{value:"queued",label:"Queued / sending"},{value:"sent",label:"Sent"},{value:"paused",label:"Paused"},{value:"failed",label:"Failed"},{value:"canceled",label:"Canceled"},{value:"all",label:"All emails"}];function E(t,r){return r==="all"?!0:r==="action"?k(t)||["awaiting_review","held","failed"].includes(t.status):r==="queued"?t.status==="pending"||t.status==="sending":r==="canceled"?t.status==="cancelled"||t.status==="canceled":t.status===r}function Y(t){return t.status==="awaiting_review"?"Ready for your review":t.status==="sent"?"Sent":t.status==="pending"||t.status==="sending"?"Sending — awaiting confirmation":t.status==="paused"?k(t)?"Reply received — review before sending":"Paused":t.status==="held"?"Needs your review":t.status==="failed"?"Sending failed":t.status==="cancelled"||t.status==="canceled"?"Canceled":"Needs attention"}function Q(t,r){const o=t.lastError?.trim();return!o||o.localeCompare(r,void 0,{sensitivity:"accent"})===0?null:o}function G(){const t=n.useId(),[r,o]=n.useState(null),[i,u]=n.useState("action"),[m,f]=n.useState(""),{data:a=[],isLoading:l,isError:c,isFetching:p,refetch:w}=_({queryKey:[F],refetchInterval:5e3}),x=m.trim().toLocaleLowerCase(),b=a.filter(s=>E(s,i)&&(!x||[s.contactName,s.to,s.subject,s.workflowName].some(d=>d?.toLocaleLowerCase().includes(x))));return e.jsxs("section",{className:"space-y-5","data-testid":"workflow-email-review",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"font-display text-xl",children:"Email review"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Start with emails that need your attention. Preview the recipient and message before approving; queued emails and sent history stay available below."})]}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-[minmax(0,1fr)_230px]",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(S,{htmlFor:`${t}-search`,children:"Search workflow emails"}),e.jsx(R,{id:`${t}-search`,value:m,onChange:s=>
2f(s.target.value),placeholder:"Client, subject, or workflow",type:"search"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(S,{htmlFor:`${t}-status`,children:"Email status"}),e.jsxs(I,{value:i,onValueChange:s=>u(s),children:[e.jsx(A,{id:`${t}-status`,"data-testid":"select-email-review-status",children:e.jsx($,{})}),e.jsx(O,{children:z.map(s=>e.jsxs(V,{value:s.value,children:[s.label," (",a.filter(d=>E(d,s.value)).length,")"]},s.value))})]})]})]}),l&&e.jsx("p",{role:"status",children:"Loading emails…"}),c&&e.jsxs("div",{role:"alert",className:"space-y-3",children:[e.jsx("p",{children:"We couldn't load your emails. Please try again."}),e.jsx(v,{variant:"outline",onClick:()=>{w()},disabled:p,children:"Try again"})]}),!l&&!c&&e.jsxs("p",{className:"text-xs text-muted-foreground",role:"status",children:[b.length," of ",a.length," emails"]}),!l&&!c&&b.length===0&&e.jsxs("div",{className:"space-y-3 py-6 text-sm text-muted-foreground","data-testid":"email-review-empty",children:[e.jsx("p",{children:x?"No emails match your search.":a.length===0?"You're all caught up. Workflow emails will appear here when they're ready for review.":i==="action"?"Nothing needs your attention. Use Email status to see queued emails and sent history.":"No emails in this view."}),x&&e.jsx(v,{variant:"outline",onClick:()=>f(""),children:"Clear search"})]}),b.map(s=>{const d=Y(s),N=Q(s,d);return e.jsxs("article",{className:"border-b border-border/20 py-4 flex flex-col sm:flex-row sm:items-center justify-between gap-3","data-testid":`email-review-${s.id}`,children:[e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsxs("p",{className:"font-medium text-sm flex items-center gap-2",children:[e.jsx(W,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}),s.subject]}),e.jsxs("p",{className:"text-xs text-muted-foreground break-words",children:[s.contactName," · ",s.to," · ",s.workflowName]}),e.jsx("p",{className:"text-xs",role:"status",children:d}),N&&e.jsx("p",{className:"text-xs text-muted-foreground",children:N})]}),k(s)&&e.jsx(v,{variant:"outline",onClick:()=>o(s),"data-testid":`button-review-email-${s.id}`,children:"Edit & review"})]},s.id)}),e.jsx(D,{email:r,onClose:()=>o(null)})]})}const J=n.lazy(()=>j(()=>import("./WorkflowProgressView-BK73Gx6S.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]))),X=n.lazy(()=>j(()=>import("./ClientWorkflowsView-BKtDQYRj.js").then(t=>t.C),__vite__mapDeps([11,2,1,3,12,13,14,15,16,6,7,8,9,10,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64])).then(t=>({default:t.ClientWorkflowsView}))),Z=n.lazy(()=>j(()=>import("./AutomationsHub-B7zlLzI1.js"),__vite__mapDeps([65,2,1,3,66,33,62,34,36,37,67,68,69,70,14,6,7,8,9,10,45,71,72,47,73,21,22,74,75,76,77,23,24,25,26,78,27,20,55,49,79,57,56,50,80,81,82,83,52,84,18,11,12,13,15,16,17,19,28,29,30,31,32,35,38,39,40,41,42,43,44,46,48,51,53,54,58,59,60,61,63,64,85,86,87,88,89,90,91,92,93,94]))),ee="/automations",y=[{value:"progress",label:"Progress"},{value:"library",label:"Library"},{value:"email-review",label:"Email review"},{value:"automations",label:"Automations"}],te=new Set(y.map(t=>t.value));function se(t){const r=new URLSearchParams(t).get("tab");return r&&te.has(r)?r:"progress"}function Se(){const[,t]=C(),r=L(),o=n.useMemo(()=>{const a=K();return se(a?`?tab=${a}`:r)},[r]),i=n.useCallback((a,l)=>{const c=new URLSearchParams(window.location.search);c.set("tab",a),c.delete("showTemplates");for(const[p,w]of Object.entries(l??{}))c.set(p,w);t(`${ee}?${c.toString()}`)},[t]),u=n.useCallback(a=>t(`/clients/${a}`),[t]),m=n.useCallback(a=>t(`/crm/workflow/${a}`),[t]),{data:f=[]}=_({queryKey:["/api/crm/contacts"],enabled:o==="library"});return e.jsxs("div",{className:"max-w-7xl mx-auto px-6 sm:px-10 py-10 sm:py-16","data-testid":"automations-hub",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-end justify-between gap-6 mb-8",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"font-display text-3xl font-light tracking-tight text-foreground mb-2 flex items-center gap-3","data-testid":"text-automations-heading",children:[e.jsx(U,{className:"w-7 h-7 text-primary"}),"Workflows"]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Where every client stands, the templates you run them through, and the automations that fire on their own."})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[o!=="library"&&e.jsxs("button",{type:"button",onClick:()=>i("library",{showTemplates:"1"}),className:"text-[11px] tracking-[0.15em] uppercase text-muted-foreground hover:text-foreground transition-colors flex items-center gap-1.5","data-testid":"button-recipe-library",children:[e.jsx(H,{className:"w-3 h-3"})," Template Library"]}),e.jsxs(P,{onClick:()=>t("/crm/workflow/new"),"data-testid":"button-create-workflow",children:[e.jsx(M,{className:"w-3.5 h-3.5"})," Create Workflow"]})]})]}),e.jsx(q,{sections:y,value:o,onValueChange:a=>i(a),ariaLabel:"Workflows section",testId:"select-workflows-section",className:"mb-8"}),e.jsx("div",{className:"hidden sm:flex flex-wrap items-center gap-x-2 gap-y-1 sm:gap-x-8 border-b border-border/10 mb-10",role:"tablist","aria-label":"Workflows sections","data-testid":"workflows-hub-tabs",children:y.map(a=>{const l=a.value===o;return e.jsx("button",{type:"button",role:"tab","aria-selected":l,onClick:()=>
2i(a.value),className:`text-xs sm:text-[10px] tracking-normal sm:tracking-[0.18em] sm:uppercase pb-3 whitespace-nowrap transition-colors border-b-2 -mb-px ${l?"border-foreground text-foreground font-medium":"border-transparent text-foreground/65 hover:text-foreground"}`,"data-testid":`tab-${a.value}`,children:a.label},a.value)})}),e.jsx(T,{}),o!=="email-review"&&e.jsx(B,{}),o==="email-review"&&e.jsx(h,{name:"Email review",children:e.jsx(G,{})}),o==="progress"&&e.jsx(h,{name:"Workflow progress",children:e.jsx(n.Suspense,{fallback:e.jsx(g,{variant:"cards"}),children:e.jsx(J,{onOpenLibrary:()=>i("library"),onClientClick:u,onOpenWorkflow:m})})}),o==="library"&&e.jsx(h,{name:"Workflow library",children:e.jsx(n.Suspense,{fallback:e.jsx(g,{variant:"cards"}),children:e.jsx(X,{contacts:f,onClientClick:u})})}),o==="automations"&&e.jsx(h,{name:"Automations",children:e.jsx(n.Suspense,{fallback:e.jsx(g,{variant:"cards"}),children:e.jsx(Z,{})})})]})}export{ee as WORKFLOWS_HUB_PATH,y as WORKFLOWS_HUB_TABS,Se as default,se as resolveWorkflowsHubTab};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.