PageSourceSearch

https://app.pooldial.com/static/js/63.a783ce9b.chunk.js

js pooldial.com collected 2026-10-02 10:00:47 UTC 15,311 bytes, 33 lines download raw bytes

1"use strict";(globalThis.webpackChunkadmin_dashboard=globalThis.webpackChunkadmin_dashboard||[]).push([[63],{35884(e,t,n){n.r(t),n.d(t,{default:()=>O});var a=n(65043),r=n(73216),o=n(55895),s=n(83759),i=n(53969),l=n(94799),c=n(73849),d=n(24343),h=n(33699),p=n(47471),u=n(12097),m=n(80172),x=n(56465),v=n(60267),A=n(86995),j=n(63996),f=n(22950),g=n(77266),b=n(63745),y=n(62782),w=n(55447),C=n(62086),z=n(35530),S=n(20296),k=n(27476),H=n(70579);const M={textTransform:"none",fontSize:"0.813rem",borderRadius:"999px",px:1.75,py:.75,backgroundColor:"#016ec3",color:"#ffffff",boxShadow:"none",transition:"none",whiteSpace:"nowrap","&:hover":{backgroundColor:"#01528f",boxShadow:"none"}},V=e=>{switch(e){case"open":return"info";case"in_progress":return"warning";case"completed":return"success";default:return"default"}},W=e=>{switch(e){case"open":return"Open";case"in_progress":return"In Progress";case"completed":return"Completed";case"cancelled":return"Cancelled";default:return e}},P=[{id:"work-orders",label:"Work Orders",icon:(0,H.jsx)(g.A,{}),path:"/work-orders"},{id:"projects",label:"Projects",icon:(0,H.jsx)(j.A,{}),path:"/work-orders/projects"}],O=()=>{var e;const t=(0,r.Zp)(),n=(0,v.A)(),j=(0,A.A)(n.breakpoints.up("lg")),{formatCurrency:g,formatDate:O}=(0,k.C)(),[R,L]=(0,a.useState)([]),[$,N]=(0,a.useState)(null),[I,T]=(0,a.useState)(null),[q,B]=(0,a.useState)(!0),[Q,F]=(0,a.useState)(!0),[D,_]=(0,a.useState)(""),[X,E]=(0,a.useState)(""),[U,G]=(0,a.useState)(1),[Y]=(0,a.useState)(50),Z=(0,a.useCallback)(async()=>{try{F(!0);const e=await y.Q.getProjects({status:D||void 0,search:X||void 0,limit:Y,page:U});L(e.data),N(e.pagination)}catch(e){console.error("Failed to fetch projects:",e)}finally{F(!1)}},[D,X,U,Y]),J=(0,a.useCallback)(async()=>{try{B(!0);const e=await y.Q.getStats();T(e)}catch(e){console.error("Failed to fetch project stats:",e),T({counts:{open:0,inProgress:0,completed:0},amounts:{totalRevenue:0}})}finally{B(!1)}},[]);(0,a.useEffect)(()=>{Z(),J()},[Z,J]);const K=(0,a.useCallback)((e,t)=>{G(t)},[]),ee=e=>e.customer?e.customer.companyName?e.customer.companyName:`${e.customer.firstName||""} ${e.customer.lastName||""}`.trim()||"Unknown":"Unknown",te=[{id:"projectNumber",label:"Project #",render:(e,t)=>(0,H.jsx)(o.A,{fontWeight:"medium",noWrap:!0,children:t.projectNumber})},{id:"customer",label:"Customer",render:(e,t)=>(0,H.jsx)(o.A,{noWrap:!0,children:ee(t)})},{id:"title",label:"Title",hideBelow:"md",render:(e,t)=>(0,H.jsx)(o.A,{noWrap:!0,children:t.title})},{id:"status",label:"Status",render:(e,t)=>(0,H.jsx)(s.A,{label:W(t.status),color:V(t.status),size:"small"})},{id:"totalQuoted",label:"Quoted",render:(e,t)=>(0,H.jsx)(i.A,{sx:{textAlign:"right"},children:(0,H.jsx)(o.A,{noWrap:!0,children:g(t.totalQuoted)})})},{id:"totalPaid",label:"Paid",hideBelow:"lg",render:(e,t)=>(0,H.jsx)(i.A,{sx:{textAlign:"right"},children:(0,H.jsx)(o.A,{noWrap:!0,color:t.totalPaid>0?"success.main":"text.secondary",children:g(t.totalPaid)})})},{id:"createdAt",label:"Created",hideBelow:"md",render:(e,t)=>O(t.createdAt)}],ne=j?256:0;return(0,H.jsxs)(i.A,{sx:{display:"flex",flexDirection:j?"row":"column",position:"relative",flex:1},children:[(0,H.jsx)(S.A,{activeCategory:"projects",categories:P}),(0,H.jsxs)(i.A,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,gap:1.25,ml:j?`${ne}px`:0},children:[(0,H.jsx)(w.zY,{title:"Projects",subtitle:"Track repair and project work from quote to completion"}),(0,H.jsxs)(i.A,{sx:{display:"flex",gap:2,flexWrap:"wrap"},children:[(0,H.jsxs)(l.A,{elevation:0,sx:{p:2,flex:"1 1 150px",minWidth:150},children:[(0,H.jsx)(o.A,{variant:"body2",color:"text.secondary",children:"Total Revenue"}),q?(0,H.jsx)(c.A,{width:80,height:32}):(0,H.jsx)(o.A,{variant:"h5",fontWeight:"bold",color:"success.main",children:g((null===I||void 0===I||null===(e=I.amounts)||void 0===e?void 0:e.totalRevenue)||0)})]}),(0,H.jsxs)(l.A,{elevation:0,sx:{p:2,flex:"1 1 100px",minWidth:100},children:[(0,H.jsx)(o.A,{variant:"body2",color:"text.secondary",children:"Open"}),q?(0,H.jsx)(c.A,{width:40,height:32}):(0,H.jsx)(o.A,{variant:"h5",fontWeight:"bold",children:(null===I||void 0===I?void 0:I.counts.open)||0})]}),(0,H.jsxs)(l.A,{elevation:0,sx:{p:2,flex:"1 1 100px",minWidth:100},children:[(0,H.jsx)(o.A,{variant:"body2",color:"text.secondary",children:"In Progress"}),q?(0,H.jsx)(c.A,{width:40,height:32}):(0,H.jsx)(o.A,{variant:"h5",fontWeight:"bold",children:(null===I||void 0===I?void 0:I.counts.inProgress)||0})]}),(0,H.jsxs)(l.A,{elevation:0,sx:{p:2,flex:"1 1 100px",minWidth:100},children:[(0,H.jsx)(o.A,{variant:"body2",color:"text.secondary",children:"Completed"}),q?(0,H.jsx)(c.A,{width:40,height:32}):(0,H.jsx)(o.A,{variant:"h5",fontWeight:"bold",color:"success.main",children:(null===I||void 0===I?void 0:I.counts.completed)||0})]})]}),(0,H.jsx)(l.A,{elevation:0,sx:{py:1.5,px:2},children:(0,H.jsxs)(i.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,H.jsxs)(i.A,{sx:{display:"flex",gap:2,alignItems:"center"},children:[(0,H.jsx)(d.A,{size:"small",placeholder:"Search projects...",value:X,onChange:e=>{E(e.target.value),G(1)},sx:{minWidth:220},InputProps:{startAdornment:(0,H.jsx)(h.A,{position:"start",children:(0,H.jsx)(b.A,{fontSize:"small",color:"action"})})}}),(0,H.jsxs)(d.A,{select:!0,size:"small",label:"Status",value:D,onChange:e=>{_(e.target.value),G(1)},sx:{minWidth:150},children:[(0,H.jsx)(p.A,{value:"",children:"All"}),(0,H.jsx)(p.A,{value:"open",children:"Open"}),(0,H.jsx)(p.A,{value:"in_progress",children:"In Progress"}),(0,H.jsx)(p.A,{value:"completed",children:"Completed"}),(0,H.jsx)(p.A,{value:"cancelled",children:"Cancelled"})]})]}),(0,H.jsx)(u.A,{variant:"contained",startIcon:(0,H.jsx)(f.A,{}),onClick:()=>t("/billing/quotes/new"),disableRipple:!0,sx:M,children:"New Quote"})]})}),(0,H.jsx)(l.A,{elevation:0,sx:{flex:1,minHeight:0,display:"flex",flexDirection:"column"},children:Q||0!==R.length?(0,H.jsxs)(H.Fragment,{children:[Q?(0,H.jsx)(i.A,{sx:{py:6,display:"flex",justifyContent:"center"},children:(0,H.jsx)(m.A,{size:32})}):(0,H.jsx)(i.A,{sx:{flex:1,minHeight:0,overflow:"auto"},children:(0,H.jsx)(z.A,{columns:te,data:R,onRowClick:e=>t(`/work-orders/projects/${e.id}`),emptyMessage:"No projects found.",striped:!0,stickyHeader:!0,ariaLabel:"Projects table"})}),$&&$.totalPages>1&&(0,H.jsxs)(i.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",p:2,borderTop:"1px solid",borderColor:"divider"},children:[(0,H.jsxs)(o.A,{variant:"body2",color:"text.secondary",children:["Showing ",(U-1)*Y+1,"\u2013",Math.min(U*Y,$.total)," of ",$.total]}),(0,H.jsx)(x.A,{count:$.totalPages,page:U,onChange:K,color:"primary",shape:"rounded",showFirstButton:!0,showLastButton:!0})]})]}):(0,H.jsx)(i.A,{sx:{flex:1,p:2,display:"flex",flexDirection:"column",minHeight:0},children:(0,H.jsx)(C.A,{title:"No projects yet",message:"Projects are created when you convert an approved quote. Start by creating a quote.",action:{label:"New Quote",onClick:()=>t("/billing/quotes/new")},fullHeight:!0})})})]})]})}},63996(e,t,n){n.d(t,{A:()=>
1o});var a=n(14057),r=n(70579);const o=(0,a.A)((0,r.jsx)("path",{d:"M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3zM7 9H4V5h3zm10 6h3v4h-3zm0-10h3v4h-3z"}),"AccountTreeOutlined")},6495(e,t,n){n.d(t,{A:()=>o});var a=n(14057),r=n(70579);const o=(0,a.A)((0,r.jsx)("path",{d:"M4 8h4V4H4zm6 12h4v-4h-4zm-6 0h4v-4H4zm0-6h4v-4H4zm6 0h4v-4h-4zm6-10v4h4V4zm-6 4h4V4h-4zm6 6h4v-4h-4zm0 6h4v-4h-4z"}),"AppsOutlined")},94850(e,t,n){n.d(t,{A:()=>o});var a=n(14057),r=n(70579);const o=(0,a.A)((0,r.jsx)("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"}),"CodeOutlined")},44360(e,t,n){n.d(t,{A:()=>o});var a=n(14057),r=n(70579);const o=(0,a.A)((0,r.jsx)("path",{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2m0 14H4v-6h16zm0-10H4V6h16z"}),"CreditCardOutlined")},39255(e,t,n){n.d(t,{A:()=>o});var a=n(14057),r=n(70579);const o=(0,a.A)((0,r.jsx)("path",{d:"M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2zm-2 0-8 5-8-5zm0 12H4V8l8 5 8-5z"}),"EmailOutlined")},11445(e,t,n){n.d(t,{A:()=>o});var a=n(14057),r=n(70579);const o=(0,a.A)((0,r.jsxs)("g",{fillRule:"evenodd",children:[(0,r.jsx)("path",{d:"M20 3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H4V5h16z"}),(0,r.jsx)("path",{d:"M19.41 10.42 17.99 9l-3.17 3.17-1.41-1.42L12 12.16 14.82 15zM5 7h5v2H5zm0 4h5v2H5zm0 4h5v2H5z"})]}),"FactCheckOutlined")},29668(e,t,n){n.d(t,{A:()=>o});var a=n(14057),r=n(70579);const o=(0,a.A)((0,r.jsx)("path",{d:"M9 13.75c-2.34 0-7 1.17-7 3.5V19h14v-1.75c0-2.33-4.66-3.5-7-3.5M4.34 17c.84-.58 2.87-1.25 4.66-1.25s3.82.67 4.66 1.25zM9 12c1.93 0 3.5-1.57 3.5-3.5S10.93 5 9 5 5.5 6.57 5.5 8.5 7.07 12 9 12m0-5c.83 0 1.5.67 1.5 1.5S9.83 10 9 10s-1.5-.67-1.5-1.5S8.17 7 9 7m7.04 6.81c1.16.84 1.96 1.96 1.96 3.44V19h4v-1.75c0-2.02-3.5-3.17-5.96-3.44M15 12c1.93 0 3.5-1.57 3.5-3.5S16.93 5 15 5c-.54 0-1.04.13-1.5.35.63.89 1 1.98 1 3.15s-.37 2.26-1 3.15c.46.22.96.35 1.5.35"}),"GroupOutlined")},96705(e,t,n){n.d(t,{A:()=>o});var a=n(14057),r=n(70579);const o=(0,a.A)((0,r.jsx)("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2m0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19z"}),"Inbox")},56136(e,t,n){n.d(t,{A:()=>o});var a=n(14057),r=n(70579);const o=(0,a.A)((0,r.jsx)("path",{d:"M4 18v-.65c0-.34.16-.66.41-.81C6.1 15.53 8.03 15 10 15c.03 0 .05 0 .08.01.1-.7.3-1.37.59-1.98-.22-.02-.44-.03-.67-.03-2.42 0-4.68.67-6.61 1.82-.88.52-1.39 1.5-1.39 2.53V20h9.26c-.42-.6-.75-1.28-.97-2zm6-6c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m10.75 10c0-.22-.03-.42-.06-.63l1.14-1.01-1-1.73-1.45.49q-.48-.405-1.08-.63L18 11h-2l-.3 1.49q-.6.225-1.08.63l-1.45-.49-1 1.73 1.14 1.01c-.03.21-.06.41-.06.63s.03.42.06.63l-1.14 1.01 1 1.73 1.45-.49q.48.405 1.08.63L16 21h2l.3-1.49q.6-.225 1.08-.63l1.45.49 1-1.73-1.14-1.01c.03-.21.06-.41.06-.63M17 18c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"}),"ManageAccountsOutlined")},63441(e,t,n){n.d(t,{A:()=>o});var a=n(14057),r=n(70579);const o=(0,a.A)((0,r.jsx)("path",{d:"m20.5 3-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5M10 5.47l4 1.4v11.66l-4-1.4zm-5 .99 3-1.01v11.7l-3 1.16zm14 11.08-3 1.01V6.86l3-1.16z"}),"MapOutlined")},64109(e,t,n){n.d(t,{A:()=>o});var a=n(14057),r=n(70579);const o=(0,a.A)((0,r.jsx)("path",{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2m0 14H4v-6h16zm0-10H4V6h16z"}),"PaymentOutlined")},89344(e,t,n){n.d(t,{A:()=>o});var a=n(14057),r=n(70579);const o=(0,a.A)((0,r.jsx)("path",{d:"M20 9V7c0-1.1-.9-2-2-2h-3c0-1.66-1.34-3-3-3S9 3.34 9 5H6c-1.1 0-2 .9-2 2v2c-1.66 0-3 1.34-3 3s1.34 3 3 3v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c1.66 0 3-1.34 3-3s-1.34-3-3-3m-2 10H6V7h12zm-9-6c-.83 0-1.5-.67-1.5-1.5S8.17 10 9 10s1.5.67 1.5 1.5S9.83 13 9 13m7.5-1.5c0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5 1.5.67 1.5 1.5M8 15h8v2H8z"}),"SmartToyOutlined")},33883(e,t,n){n.d(t,{A:()=>o});var a=n(14057),r=n(70579);const o=(0,a.A)((0,r.jsx)("path",{d:"m21.9 8.89-1.05-4.37c-.22-.9-1-1.52-1.91-1.52H5.05c-.9 0-1.69.63-1.9 1.52L2.1 8.89c-.24 1.02-.02 2.06.62 2.88.08.11.19.19.28.29V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-6.94c.09-.09.2-.18.28-.28.64-.82.87-1.87.62-2.89m-2.99-3.9 1.05 4.37c.1.42.01.84-.25 1.17-.14.18-.44.47-.94.47-.61 0-1.14-.49-1.21-1.14L16.98 5zM13 5h1.96l.54 4.52c.05.39-.07.78-.33 1.07-.22.26-.54.41-.95.41-.67 0-1.22-.59-1.22-1.31zM8.49 9.52 9.04 5H11v4.69c0 .72-.55 1.31-1.29 1.31-.34 0-.65-.15-.89-.41-.25-.29-.37-.68-.33-1.07m-4.45-.16L5.05 5h1.97l-.58 4.86c-.08.65-.6 1.14-1.21 1.14-.49 0-.8-.29-.93-.47-.27-.32-.36-.75-.26-1.17M5 19v-6.03c.08.01.15.03.23.03.87 0 1.66-.36 2.24-.95.6.6 1.4.95 2.31.95.87 0 1.65-.36 2.23-.93.59.57 1.39.93 2.29.93.84 0 1.64-.35 2.24-.95.58.59 1.37.95 2.24.95.08 0 .15-.02.23-.03V19z"}),"StorefrontOutlined")},73849(e,t,n){n.d(t,{A:()=>b});var a=n(65043),r=n(58387),o=n(31807);function s(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function i(e){return parseFloat(e)}var l=n(83290),c=n(58128),d=n(51612),h=n(28301),p=n(79857),u=n(86061);function m(e){return(0,u.Ay)("MuiSkeleton",e)}(0,p.A)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var x=n(70579);const v=l.i7`
2  0% {
3    opacity: 1;
4  }
5
6  50% {
7    opacity: 0.4;
8  }
9
10  100% {
11    opacity: 1;
12  }
13`,A=l.i7`
14  0% {
15    transform: translateX(-100%);
16  }
17
18  50% {
19    /* +0.5s of delay between each loop */
20    transform: translateX(100%);
21  }
22
23  100% {
24    transform: translateX(100%);
25  }
26`,j="string"!==typeof v?l.AH`
27        animation: ${v} 2s ease-in-out 0.5s infinite;
28      `:null,f="string"!==typeof A?l.AH`
29        &::after {
30          animation: ${A} 2s linear 0.5s infinite;
31        }
32      `:null,g=(0,c.Ay)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;
32return[t.root,t[n.variant],!1!==n.animation&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})((0,d.A)(e=>{let{theme:t}=e;const n=s(t.shape.borderRadius)||"px",a=i(t.shape.borderRadius);return{display:"block",backgroundColor:t.vars?t.vars.palette.Skeleton.bg:t.alpha(t.palette.text.primary,"light"===t.palette.mode?.11:.13),height:"1.2em",variants:[{props:{variant:"text"},style:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${a}${n}/${Math.round(a/.6*10)/10}${n}`,"&:empty:before":{content:'"\\00a0"'}}},{props:{variant:"circular"},style:{borderRadius:"50%"}},{props:{variant:"rounded"},style:{borderRadius:(t.vars||t).shape.borderRadius}},{props:e=>{let{ownerState:t}=e;return t.hasChildren},style:{"& > *":{visibility:"hidden"}}},{props:e=>{let{ownerState:t}=e;return t.hasChildren&&!t.width},style:{maxWidth:"fit-content"}},{props:e=>{let{ownerState:t}=e;return t.hasChildren&&!t.height},style:{height:"auto"}},{props:{animation:"pulse"},style:j||{animation:`${v} 2s ease-in-out 0.5s infinite`}},{props:{animation:"wave"},style:{position:"relative",overflow:"hidden",WebkitMaskImage:"-webkit-radial-gradient(white, black)","&::after":{background:`linear-gradient(\n                90deg,\n                transparent,\n                ${(t.vars||t).palette.action.hover},\n                transparent\n              )`,content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:f||{"&::after":{animation:`${A} 2s linear 0.5s infinite`}}}]}})),b=a.forwardRef(function(e,t){const n=(0,h.b)({props:e,name:"MuiSkeleton"}),{animation:a="pulse",className:s,component:i="span",height:l,style:c,variant:d="text",width:p,...u}=n,v={...n,animation:a,component:i,variant:d,hasChildren:Boolean(u.children)},A=(e=>{const{classes:t,variant:n,animation:a,hasChildren:r,width:s,height:i}=e,l={root:["root",n,a,r&&"withChildren",r&&!s&&"fitContent",r&&!i&&"heightAuto"]};return(0,o.A)(l,m,t)})(v);return(0,x.jsx)(g,{as:i,ref:t,className:(0,r.A)(A.root,s),ownerState:v,...u,style:{width:p,height:l,...c}})})}}]);
33//# sourceMappingURL=63.a783ce9b.chunk.js.map

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.