PageSourceSearch

https://mrkspos.com/build/assets/CrmLeadFollowUpCard-BOmh97Oj.js

js mrkspos.com collected 2026-09-24 14:49:43 UTC 3,669 bytes, 1 lines download raw bytes

1import{j as t}from"./vendor-react-BXDKjWfl.js";import{C as y,b as g,c as h,a as w}from"./card-fjvTZ4w9.js";import{u as j}from"./app-CQYd8FmO.js";import{r as N}from"./vendor-inertia-Ca3DBwCx.js";import{a as C}from"./vendor-other-OHcCBNj6.js";import{CalendarDays as k,Circle as i,CheckCircle2 as _,CircleX as D}from"./vendor-icons-tduVCsjY.js";import"./utils-DzIIg4YZ.js";import"./vendor-utils-Sp7XtC9M.js";/* empty css            */import"./vendor-i18n-QDUiSOiS.js";import"./vendor-echo-CtsglDNk.js";const v=[{key:"day_0",label:"Today",days:0},{key:"day_1",label:"Next Day",days:1},{key:"day_3",label:"3 Days",days:3},{key:"day_7",label:"7 Days",days:7},{key:"day_15",label:"15 Days",days:15},{key:"day_30",label:"30 Days",days:30}];function O({lead:o,auth:c,className:m=""}){const{setIsLoading:n}=j(),u=o.meta?.follow_ups??{},f=(s,e)=>{if(u[e])return"completed";if(!o.follow_up_start_date)return"upcoming";const r=o.follow_up_start_date.substring(0,10),[a,b,x]=r.split("-"),d=new Date(parseInt(a),parseInt(b)-1,parseInt(x)),l=new Date;return l.setHours(0,0,0,0),Math.abs(l.getTime()-d.getTime()),l>new Date(d.getTime()+s*24*60*60*1e3)?"missed":l.getTime()===new Date(d.getTime()+s*24*60*60*1e3).getTime()?"due_today":"upcoming"},p=(s,e)=>{n(!0);const r=e!=="completed";C.post(route(c.adminPrefix+".crm-leads.toggleFollowUp",{id:o.id,milestone:s}),{status:r}).then(()=>{N.reload({only:["lead","timelines"]})}).catch(a=>{alert(a.response?.data?.error||"Something went wrong.")}).finally(()=>{n(!1)})};return t.jsxs(y,{className:`h-full ${m}`,children:[t.jsx(g,{className:"border-b pb-3",children:t.jsxs(h,{className:"flex items-center gap-2 text-lg",children:[t.jsx(k,{className:"h-5 w-5"}),"Follow Up Diagram"]})}),t.jsx(w,{className:"p-0",children:t.jsx("div",{className:"before:via-muted relative flex flex-col gap-4 p-4 before:absolute before:inset-0 before:ml-[1.7rem] before:h-full before:w-0.5 before:-translate-x-px before:bg-gradient-to-b before:from-transparent before:to-transparent md:before:mx-auto md:before:translate-x-0",children:v.map(s=>{const e=f(s.days,s.key);let r=i,a="text-gray-300";return e==="completed"?(r=_,a="text-green-500"):e==="missed"?(r=D,a="text-red-500"):e==="due_today"&&(r=i,a="text-blue-500"),t.jsx("div",{className:"group is-active relative flex items-center justify-between md:justify-normal md:odd:flex-row-reverse",children:t.jsxs("div",{className:"bg-card z-10 flex w-full items-center gap-3 px-1 py-2",children:[t.jsx("button",{type:"button",onClick:()=>p(s.key,e),disabled:e==="missed"||e==="upcoming",className:`bg-card flex shrink-0 items-center justify-center rounded-full p-1 transition-colors ${e==="missed"||e==="upcoming"?"cursor-not-allowed opacity-70":"colorful:hover:bg-white/10 hover:bg-gray-100 dark:hover:bg-gray-800"} ${a}`,children:t.jsx(r,{className:"bg-card h-6 w-6 rounded-full"})}),t.jsx("div",{className:`flex-1 rounded-md border p-3 transition-colors ${e==="due_today"?"colorful:border-blue-800 colorful:bg-blue-900/20 border-blue-300 bg-blue-50/50 dark:border-blue-800 dark:bg-blue-900/20":"border-border"}`,children:t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("span",{className:"text-sm font-medium",children:[s.label," Follow Up"]}),e==="completed"&&t.jsx("span",{className:"text-xs font-semibold text-green-600",children:"Done"}),e==="missed"&&t.jsx("span",{className:"text-xs font-semibold text-red-600",children:"Missed"}),e==="due_today"&&t.jsx("span",{className:"text-xs font-semibold text-blue-600",children:"Due Today"}),e==="upcoming"&&t.jsx("span",{className:"text-muted-foreground text-xs",children:"Upcoming"})]})})]})},s.key)})})})]})}export{O as default};

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.