1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1749],{84918:function(t,n,e){"use strict";var r=e(64836);n.Z=void 0;var o=r(e(64938)),i=e(85893);n.Z=(0,o.default)((0,i.jsx)("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday")},44510:function(t,n,e){"use strict";var r=e(64836);n.Z=void 0;var o=r(e(64938)),i=e(85893);n.Z=(0,o.default)((0,i.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel")},60888:function(t,n,e){"use strict";var r=e(64836);n.Z=void 0;var o=r(e(64938)),i=e(85893);n.Z=(0,o.default)((0,i.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle")},80087:function(t,n,e){"use strict";var r=e(64836);n.Z=void 0;var o=r(e(64938)),i=e(85893);n.Z=(0,o.default)((0,i.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2m6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56M12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96M4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56m2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8M12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96M14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2m.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56M16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2z"}),"Language")},3769:function(t,n,e){"use strict";var r=e(64836);n.Z=void 0;var o=r(e(64938)),i=e(85893);n.Z=(0,o.default)((0,i.jsx)("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7m0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5"}),"Place")},66242:function(t,n,e){"use strict";e.d(n,{Z:function(){return j}});var r=e(87462),o=e(63366),i=e(67294),a=e(90512),s=e(94780),c=e(90948),d=e(28628),l=e(55113),u=e(1588),f=e(34867);function p(t){return(0,f.ZP)("MuiCard",t)}(0,u.Z)("MuiCard",["root"]);var Z=e(85893);let h=["className","raised"],x=t=>{let{classes:n}=t;return(0,s.Z)({root:["root"]},p,n)},v=(0,c.ZP)(l.Z,{name:"MuiCard",slot:"Root",overridesResolver:(t,n)=>n.root})(()=>({overflow:"hidden"})),m=i.forwardRef(function(t,n){let e=(0,d.i)({props:t,name:"MuiCard"}),{className:i,raised:s=!1}=e,c=(0,o.Z)(e,h),l=(0,r.Z)({},e,{raised:s}),u=x(l);return(0,Z.jsx)(v,(0,r.Z)({className:(0,a.Z)(u.root,i),elevation:s?8:void 0,ref:n,ownerState:l},c))});var j=m},44267:function(t,n,e){"use strict";e.d(n,{Z:function(){return m}});var r=e(87462),o=e(63366),i=e(67294),a=e(90512),s=e(94780),c=e(90948),d=e(28628),l=e(1588),u=e(34867);function f(t){return(0,u.ZP)("MuiCardContent",t)}(0,l.Z)("MuiCardContent",["root"]);var p=e(85893);let Z=["className","component"],h=t=>{let{classes:n}=t;return(0,s.Z)({root:["root"]},f,n)},x=(0,c.ZP)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(t,n)=>n.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),v=i.forwardRef(function(t,n){let e=(0,d.i)({props:t,name:"MuiCardContent"}),{className:i,component:s="div"}=e,c=(0,o.Z)(e,Z),l=(0,r.Z)({},e,{component:s}),u=h(l);return(0,p.jsx)(x,(0,r.Z)({as:s,className:(0,a.Z)(u.root,i),ownerState:l,ref:n},c))});var m=v},4170:function(t,n,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/salon-ticket-manager",function(){return e(50743)}])},50743:function(t,n,e){"use strict";e.r(n),e.d(n,{default:function(){return z}});var r=e(82729),o=e(85893),i=e(67294),a=e(87066),s=e(55494),c=e(35480),d=e(66242),l=e(15861),u=e(44267),f=e(5616),p=e(69417),Z=e(10633),h=e(84918),x=e(80087),v=e(3769),m=e(64512),j=e(29523),g=e(46070),C=e(25333),y=e(44510),b=e(60888);function S(){let t=(0,r._)(["\n max-width: 1200px;\n margin: 0 auto;\n padding: 20px;\n"]);return S=function(){return t},t}function w(){let t=(0,r._)(["\n margin-bottom: 20px;\n border-radius: 12px;\n"]);return w=function(){return t},t}function M(){let t=(0,r._)(["\n font-weight: bold;\n font-size: 24px;\n margin-bottom: 15px;\n"]);return M=function(){return t},t}function P(){let t=(0,r._)(["\n margin-bottom: 15px;\n border-radius: 12px;\n"]);return P=function(){return t},t}function _(){let t=(0,r._)(["\n display: flex;\n justify-content: space-between;
1\n align-items: center;\n"]);return _=function(){return t},t}let k=c.ZP.div(S()),T=(0,c.ZP)(d.Z)(w()),E=(0,c.ZP)(l.Z)(M()),I=(0,c.ZP)(d.Z)(P()),N=(0,c.ZP)(u.Z)(_());function z(){let{data:t,error:n}=(0,s.ZP)(m.RY,j.E),[e,r]=(0,i.useState)(!0),[c,d]=(0,i.useState)([]),[S,w]=(0,i.useState)(1),[M,P]=(0,i.useState)(0);(0,i.useEffect)(()=>{r(!t||!!n)},[t,n]);let _=async function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(null==t?void 0:t.userId)try{let e=await fetch("/api/tickets/getSalonsWithTickets",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({hostId:t.userId,page:n,pageSize:10})}),r=await e.json();d(r.salons),P(r.totalPages)}catch(t){console.error("Error fetching salons:",t)}};(0,i.useEffect)(()=>{_(S)},[t,S]);let z=async(t,n)=>{try{await a.Z.post("/api/tickets/approve",{ticketId:t,paymentIntentId:n}),_(S)}catch(t){console.error("Error approving ticket:",t)}},R=async(t,n)=>{try{await a.Z.post("/api/tickets/decline",{ticketId:t,paymentIntentId:n}),_(S)}catch(t){console.error("Error declining ticket:",t)}};return(0,o.jsx)(C.Z,{isLoading:e,user:t,children:(0,o.jsxs)(k,{children:[(0,o.jsx)(l.Z,{variant:"h4",gutterBottom:!0,children:"Ticket Approval Dashboard"}),c.map(t=>(0,o.jsx)(T,{children:(0,o.jsxs)(u.Z,{children:[(0,o.jsx)(E,{children:t.title}),(0,o.jsxs)(f.Z,{sx:{display:"flex",alignItems:"center",mb:2},children:[(0,o.jsx)(h.Z,{sx:{mr:1,fontSize:"14px"}}),(0,o.jsxs)(l.Z,{variant:"body2",color:"text.secondary",children:[(0,g.Zc)(t.startTime.toString())," @",(0,g.Ov)(t.startTime.toString())]})]}),(0,o.jsxs)(f.Z,{sx:{display:"flex",alignItems:"center",mb:2},children:["VIRTUAL"===t.locationType?(0,o.jsx)(x.Z,{sx:{mr:1,fontSize:"16px"}}):(0,o.jsx)(v.Z,{sx:{mr:1,fontSize:"16px"}}),(0,o.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:"VIRTUAL"===t.locationType?t.zoomJoinUrl:t.location})]}),t.publicTickets.map(t=>{let n="PENDING"===t.status;return(0,o.jsx)(I,{children:(0,o.jsxs)(N,{children:[(0,o.jsxs)(f.Z,{children:[(0,o.jsx)(l.Z,{variant:"h6",children:t.name}),(0,o.jsxs)(l.Z,{variant:"body2",color:"text.secondary",children:["Status: ",t.status]})]}),(0,o.jsxs)(f.Z,{sx:{display:"flex",gap:1},children:[(0,o.jsx)(p.Z,{variant:"contained",color:"success",startIcon:(0,o.jsx)(b.Z,{}),onClick:()=>z(t.id,t.stripePaymentId),disabled:!n,children:"Approve"}),n&&(0,o.jsx)(p.Z,{variant:"contained",color:"error",startIcon:(0,o.jsx)(y.Z,{}),onClick:()=>R(t.id,t.stripePaymentId),children:"Decline"})]})]})},t.id)})]})},t.id)),(0,o.jsx)(f.Z,{sx:{display:"flex",justifyContent:"center",mt:3},children:(0,o.jsx)(Z.Z,{count:M,page:S,onChange:(t,n)=>w(n),color:"primary"})})]})})}}},function(t){t.O(0,[4885,2678,7445,1664,2749,5494,8690,2491,9909,7918,9936,2316,633,9119,8456,8009,9774,2888,179],function(){return t(t.s=4170)}),_N_E=t.O()}]);
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.