PageSourceSearch

https://inteleza.ai/assets/waiting-on-B_x8GORZ.js

js inteleza.ai collected 2026-10-05 15:36:50 UTC 3,012 bytes, 1 lines download raw bytes

1import{a as e,c as t,r as n}from"./useRouter-BzYNxvEH.js";import{t as r}from"./useServerFn-vqpo7YmT.js";import{t as i}from"./useMutation-CFHK3Xh8.js";import{t as a}from"./createLucideIcon-J-M3V14v.js";import{A as o}from"./app-shell-BQStI60y.js";import{I as s,R as c}from"./index-CyZ6zfOn.js";import{r as l}from"./tasks.functions-CeOyw8t_.js";var u=a(`user-round`,[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]]),d=t(e(),1);function f(e){let t=new Date(`${e}T00:00:00Z`);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{day:`numeric`,month:`short`,timeZone:`UTC`})}function p(e){if(!e.blocked_by)return``;let t=`Waiting on ${e.blocked_by}`;return e.follow_up_on?`${t} - follow up ${f(e.follow_up_on)}`:t}var m=n();function h({taskId:e,task:t}){let n=c(),a=r(l),[f,h]=(0,d.useState)(!1),[g,_]=(0,d.useState)(t.blocked_by??``),[v,y]=(0,d.useState)(t.follow_up_on??``),b=i({mutationFn:t=>a({data:{id:e,...t}}),onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`tasks`]}),h(!1),s.success(t.blockedBy?`Marked as waiting on someone`:`Block cleared`)},onError:e=>s.error(e.message)});return t.blocked_by&&!f?(0,m.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-full border border-hair px-2 py-0.5 text-[11px] text-muted-foreground`,children:[(0,m.jsx)(u,{className:`size-3`,strokeWidth:1.8}),(0,m.jsx)(`button`,{type:`button`,onClick:()=>h(!0),className:`hover:text-foreground`,children:p(t)}),(0,m.jsx)(`button`,{type:`button`,"aria-label":`Clear the block`,onClick:()=>b.mutate({blockedBy:null,followUpOn:null}),className:`hover:text-foreground`,children:(0,m.jsx)(o,{className:`size-3`,strokeWidth:2})})]}):f?(0,m.jsxs)(`form`,{onSubmit:e=>{if(e.preventDefault(),!g.trim()){s.error(`Who are you waiting on?`);return}b.mutate({blockedBy:g.trim(),followUpOn:v||null})},className:`flex flex-wrap items-center gap-2`,children:[(0,m.jsx)(`input`,{value:g,onChange:e=>_(e.target.value),placeholder:`Who are you waiting on?`,maxLength:80,"aria-label":`Person you are waiting on`,className:`w-44 rounded-full border border-hair bg-transparent px-3 py-1 text-xs outline-none focus:border-foreground`}),(0,m.jsx)(`input`,{type:`date`,value:v,onChange:e=>y(e.target.value),"aria-label":`Follow-up date`,className:`rounded-full border border-hair bg-transparent px-3 py-1 text-xs outline-none focus:border-foreground`}),(0,m.jsx)(`button`,{type:`submit`,disabled:b.isPending,className:`rounded-full bg-foreground px-3 py-1 text-xs text-background disabled:opacity-60`,children:`Save`}),(0,m.jsx)(`button`,{type:`button`,onClick:()=>h(!1),className:`text-xs text-muted-foreground hover:text-foreground`,children:`Cancel`})]}):(0,m.jsxs)(`button`,{type:`button`,onClick:()=>h(!0),className:`inline-flex items-center gap-1.5 rounded-full border border-hair px-2 py-0.5 text-[11px] text-muted-foreground hover:border-foreground hover:text-foreground`,children:[(0,m.jsx)(u,{className:`size-3`,strokeWidth:1.8}),`Waiting on someone`]})}export{h as t};

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.