PageSourceSearch

https://omni-lime.vercel.app/_next/static/chunks/pages/epermitsCheck/[...params]-6513b6bd36e396c6.js

js omni-lime.vercel.app collected 2026-10-03 07:27:53 UTC 6,027 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[35493],{6779:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/epermitsCheck/[...params]",function(){return i(24902)}])},24902:function(e,t,i){"use strict";i.r(t);var n=i(85893),l=i(11163),s=i(88329),r=i(90092),o=i(64831),a=i(52867),u=i(31521),c=i(67294),d=i(11700),m=i.n(d),p=i(55346),h=i(37860),x=i(133),v=i(58018),f=i(79679),y=i(34955),j=i(75069);t.default=()=>{var e,t,i,d,g,E;let S,k,w,_;let N=(0,l.useRouter)();try{S=null==N?void 0:null===(i=N.query)||void 0===i?void 0:i.params[0],k=null==N?void 0:null===(d=N.query)||void 0===d?void 0:d.params[1],w=null==N?void 0:null===(g=N.query)||void 0===g?void 0:g.params[2],_=null==N?void 0:null===(E=N.query)||void 0===E?void 0:E.params[3]}catch(e){}let{dateFormat:z}=(0,j.C)(e=>e.app),[I,C]=(0,c.useState)([]),[H,L]=(0,c.useState)(void 0),[G,O]=(0,c.useState)(void 0),[P,T]=(0,c.useState)(void 0),[W,A]=(0,c.useState)(""),[F,J]=(0,c.useState)(""),{data:R,isLoading:U,isFetching:b}=(0,u.rl)({uuid:S,client:k,dayPermitId:w},{skip:!S||!k||!w}),q=(0,v.bm)({url:"/client/".concat(k,"/users"),params:{complete:"1",filters:{OR:I.map(e=>({field:"id",value:e}))}}},{skip:!k||0===I.length});return((0,c.useEffect)(()=>{if(!U&&!b&&(null==R?void 0:R.status)==="success"){let e=new Date,t=new Date(1e3*+(null==R?void 0:R.dayEpermit.date)),i=new Date(1e3*+(null==R?void 0:R.dayEpermit.date));try{t.setHours(null==R?void 0:R.dayEpermit.timeFrom.split(":")[0]),t.setMinutes(null==R?void 0:R.dayEpermit.timeFrom.split(":")[1])}catch(e){}try{i.setHours(null==R?void 0:R.dayEpermit.timeTo.split(":")[0]),i.setMinutes(null==R?void 0:R.dayEpermit.timeTo.split(":")[1])}catch(e){}let n=[];if("General Permit"===_){try{let e=JSON.parse(null==R?void 0:R.epermit.highRiskActivities);null==e||e.map(e=>{e.users.map(e=>{n.includes(e)||n.push(e)})})}catch(e){}try{let e=JSON.parse(null==R?void 0:R.epermit.persons);null==e||e.map(e=>{n.includes(e)||n.push(e)})}catch(e){}}else{try{let e=JSON.parse(null==R?void 0:R.epermit.defaultHighRiskActivities);null==e||e.map(e=>{e.controlMeasure==_&&n.push(...e.users)})}catch(e){}try{let e=JSON.parse(null==R?void 0:R.epermit.highRiskActivities);null==e||e.map(e=>{e.name==_&&n.push(...e.users)})}catch(e){}}n.length>0&&C(n),L(t),O(i),T(null==R?void 0:R.dayEpermit),A(null==R?void 0:R.dayEpermit.status),J(null==R?void 0:R.user),i&&e>i&&A("expired")}},[R,U,b,_]),U||b)?(0,n.jsx)(s.k,{w:"full",h:"100vh",justifyContent:"center",alignItems:"center",children:(0,n.jsx)(s.k,{p:5,shadow:"md",direction:"column",alignItems:"center",gap:2,children:(0,n.jsx)(h.a,{size:"150"})})}):R?(0,n.jsx)(s.k,{w:"full",h:"100vh",justifyContent:"center",children:(0,n.jsxs)(s.k,{p:5,shadow:"md",direction:"column",alignItems:"center",gap:2,children:[(0,n.jsxs)(r.x,{mt:5,fontSize:"x-large",children:["E Permit ",P?P.id:""," "]}),(0,n.jsx)(r.x,{fontSize:"x-large",fontWeight:600,children:m()(W)}),("new"===W||"approved"===W)&&(0,n.jsx)(p.DAO,{color:"#4299E1",size:"200"}),"expired"===W&&(0,n.jsxs)(s.k,{direction:"column",justifyContent:"center",alignItems:"center",gap:5,children:[(0,n.jsx)(p.a4m,{color:"#F6E05E",size:"200"}),(0,n.jsx)(y.Z,{status:"warning",title:"".concat((0,x.WU)(H,"".concat(z," HH:mm"))," - ").concat((0,x.WU)(G,"".concat(z," HH:mm")))})]}),"Not Issued"===W&&(0,n.jsx)(p.a4m,{color:"#F6E05E",size:"200"}),("closed"===W||"Cancelled"===W)&&(0,n.jsx)(p.a4m,{color:"#E53E3E",size:"200"}),"Issued"===W&&(0,n.jsxs)(s.k,{direction:"column",gap:3,alignItems:"center",children:[(0,n.jsx)(s.k,{justifyContent:"center",children:(0,n.jsx)(p.xik,{color:"#38A169",size:"200"})}),(0,n.jsxs)(r.x,{fontSize:"lg",children:[(0,x.WU)(H,"".concat(z," HH:mm"))," - ",(0,x.WU)(G,"".concat(z," HH:mm"))]}),(0,n.jsx)(r.x,{fontSize:"lg",children:F}),(0,n.jsx)(r.x,{children:null==P?void 0:P.description}),(0,n.jsx)(o.i,{}),(0,n.jsx)(r.x,{fontSize:"2xl",fontWeight:"bold",children:_}),"General Permit"===_&&(0,n.jsx)(r.x,{fontSize:"lg",children:"Additional Persons:"}),(null==q?void 0:q.isLoading)?(0,n.jsx)(h.a,{}):(0,n.jsx)(a.QI,{children:null==q?void 0:null===(t=q.data)||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.map(e=>(0,n.jsx)(a.HC,{children:(0,f.G)(e)},e.id))})]})]})}):(0,n.jsx)(s.k,{w:"full",h:"100vh",justifyContent:"center",alignItems:"center",children:(0,n.jsxs)(s.k,{p:5,shadow:"md",direction:"column",alignItems:"center",gap:2,children:[(0,n.jsx)(r.x,{fontSize:"x-large",children:"Please try again later"}
1),(0,n.jsx)(p.a4m,{color:"#F6E05E",size:"200"})]})})}},52867:function(e,t,i){"use strict";i.d(t,{GS:function(){return h},HC:function(){return v},QI:function(){return x},aV:function(){return p}});var n=i(85893),l=i(16431),s=i(80274),r=i(71508),o=i(12553),a=i(49381),u=i(73035),c=i(26277);let[d,m]=(0,s.k)({name:"ListStylesContext",errorMessage:"useListStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<List />\" "}),p=(0,a.G)(function(e,t){let i=(0,u.j)("List",e),{children:s,styleType:o="none",stylePosition:a,spacing:m,...p}=(0,l.L)(e),h=(0,r.W)(s);return(0,n.jsx)(d,{value:i,children:(0,n.jsx)(c.m.ul,{ref:t,listStyleType:o,listStylePosition:a,role:"list",__css:{...i.container,...m?{"& > *:not(style) ~ *:not(style)":{mt:m}}:{}},...p,children:h})})});p.displayName="List";let h=(0,a.G)((e,t)=>{let{as:i,...l}=e;return(0,n.jsx)(p,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...l})});h.displayName="OrderedList";let x=(0,a.G)(function(e,t){let{as:i,...l}=e;return(0,n.jsx)(p,{ref:t,as:"ul",styleType:"initial",marginStart:"1em",...l})});x.displayName="UnorderedList";let v=(0,a.G)(function(e,t){let i=m();return(0,n.jsx)(c.m.li,{ref:t,...e,__css:i.item})});v.displayName="ListItem",(0,a.G)(function(e,t){let i=m();return(0,n.jsx)(o.J,{ref:t,role:"presentation",...e,__css:i.icon})}).displayName="ListIcon"}},function(e){e.O(0,[19440,76660,5970,73768,78845,47665,74232,40123,60509,23219,15443,44321,41664,27606,133,92575,79679,92888,49774,40179],function(){return e(e.s=6779)}),_N_E=e.O()}]);
2//# sourceMappingURL=[...params]-6513b6bd36e396c6.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.