PageSourceSearch

https://studycafe.se/_next/static/chunks/pages/book-716eb06871535235.js

js studycafe.se collected 2026-10-08 03:20:45 UTC 19,063 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5425],{6889:function(e,t,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/book",function(){return o(38006)}])},38006:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return Q}});var r=o(85893),i=o(2734),l=o(98396),n=o(99226),a=o(67358),s=o(38895),d=o(15861),c=o(31425),u=o(83321),p=o(30381),m=o.n(p),x=o(67294),h=o(23918),g=o(13529),f=o(55008),v=o(45013),b=o(7631),y=o(79417),j=o(9354),Z=o(18597),k=o(93946),C=o(63730),w=o(94054),S=o(18360),T=o(18972),P=o(87918),D=o(90629),I=o(69368),M=o(59334);let W=e=>{let{filterGroups:t,selectedFilters:o,handleCalendarsUpdate:a,title:s,compact:c=!1}=e,u=(0,i.Z)(),p=(0,l.Z)(u.breakpoints.down("md")),m=()=>{o.forEach(e=>{a(void 0,e.groupTitle)})};return c?(0,r.jsxs)(n.Z,{children:[(0,r.jsx)(n.Z,{sx:{display:"flex",flexDirection:p?"column":"row",gap:1.5,flexWrap:"wrap",alignItems:"center",mb:o.length>0?1.5:0},children:t.map((e,t)=>{var i,l;let s=(null===(i=o.find(t=>t.groupTitle===e.title))||void 0===i?void 0:i.values)||[];return(0,r.jsx)(w.Z,{size:"small",sx:{minWidth:p?"100%":160,maxWidth:p?"100%":200},children:(0,r.jsxs)(S.Z,{multiple:!0,value:s,displayEmpty:!0,renderValue:t=>{if(!t||0===t.length)return(0,r.jsx)(d.Z,{variant:"body2",sx:{color:"text.secondary",fontWeight:500,fontSize:"0.8rem"},children:e.title});if(1===t.length){var o;let i=null===(o=e.filters)||void 0===o?void 0:o.find(e=>e.value===t[0]);return(0,r.jsx)(d.Z,{variant:"body2",sx:{fontWeight:500,fontSize:"0.8rem"},children:null==i?void 0:i.label})}return(0,r.jsxs)(d.Z,{variant:"body2",sx:{fontWeight:500,fontSize:"0.8rem"},children:[t.length," selected"]})},sx:{backgroundColor:"background.paper",height:"36px","& .MuiOutlinedInput-notchedOutline":{borderColor:u.palette.divider},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:u.palette.primary.main},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:u.palette.primary.main,borderWidth:2},"& .MuiSelect-select":{py:1,minHeight:"auto"}},onChange:t=>{let o=t.target.value;a(0===o.length?void 0:o.join(","),e.title)},MenuProps:{PaperProps:{sx:{maxHeight:300,mt:1,boxShadow:u.shadows[8],"& .MuiMenuItem-root":{py:1,px:2,borderRadius:1,mx:1,my:.5,"&:hover":{backgroundColor:u.palette.action.hover},"&.Mui-selected":{backgroundColor:u.palette.primary.main+"20",color:u.palette.primary.main,fontWeight:600,"&:hover":{backgroundColor:u.palette.primary.main+"30"}}}}}},children:[(0,r.jsx)(T.Z,{value:"",children:(0,r.jsxs)(n.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,r.jsx)(C.Z,{icon:"mdi:filter-off",fontSize:"1rem"}),(0,r.jsxs)(d.Z,{variant:"body2",children:["All ",e.title.toLowerCase()]})]})}),null===(l=e.filters)||void 0===l?void 0:l.map((e,o)=>(0,r.jsx)(T.Z,{value:e.value||"",children:(0,r.jsx)(d.Z,{variant:"body2",children:e.label})},"filter-".concat(t,"-").concat(o)))]})},"group-".concat(t))})}),(0,r.jsxs)(n.Z,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap",minHeight:o.length>0?"auto":"32px"},children:[o.flatMap(e=>{let o=t.find(t=>t.title===e.groupTitle);return e.values.map((t,i)=>{var l;let n=null==o?void 0:null===(l=o.filters)||void 0===l?void 0:l.find(e=>e.value===t);return(0,r.jsx)(P.Z,{label:"".concat(null==o?void 0:o.title,": ").concat(null==n?void 0:n.label),size:"small",onDelete:()=>{let o=e.values.filter(e=>e!==t);a(0===o.length?void 0:o.join(","),e.groupTitle)},deleteIcon:(0,r.jsx)(C.Z,{icon:"mdi:close",fontSize:"0.75rem"}),sx:{backgroundColor:u.palette.primary.main+"20",color:u.palette.primary.main,fontWeight:500,fontSize:"0.75rem",height:"24px","& .MuiChip-deleteIcon":{color:u.palette.primary.main,"&:hover":{color:u.palette.primary.dark}}}},"active-filter-".concat(e.groupTitle,"-").concat(i))})}),o.length>1&&(0,r.jsx)(P.Z,{label:"Clear all",size:"small",variant:"outlined",onClick:m,deleteIcon:(0,r.jsx)(C.Z,{icon:"mdi:close-circle",fontSize:"0.75rem"}),onDelete:m,sx:{borderColor:u.palette.error.main,color:u.palette.error.main,fontSize:"0.75rem",height:"24px","&:hover":{backgroundColor:u.palette.error.main+"10"},"& .MuiChip-deleteIcon":{color:u.palette.error.main}}})]})]}):(0,r.jsxs)(D.Z,{elevation:0,sx:{p:3,mb:3,backgroundColor:"background.paper",border:e=>"1px solid ".concat(e.palette.divider),borderRadius:2},children:[s&&(0,r.jsx)(d.Z,{variant:"h6",sx:{mb:2,fontWeight:600,color:"text.primary",fontSize:"1.125rem"},children:s}),(0,r.jsx)(n.Z,{sx:{display:"flex",flexDirection:p?"column":"row",gap:2,flexWrap:"wrap",mb:o.length>0?2:0},children:t.map((e,t)=>{var i,l;let s=(null===(i=o.find(t=>t.groupTitle===e.title))||void 0===i?void 0:i.values)||[];return(0,r.jsx)(w.Z,{size:"small",sx:{minWidth:p?"100%":200,maxWidth:p?"100%":250},children:(0,r.jsxs)(S.Z,{multiple:!0,value:s,displayEmpty:!0,renderValue:t=>{if(!t||0===t.length)return(0,r.jsx)(d.Z,{variant:"body2",sx:{color:"text.secondary",fontWeight:500},children:e.title});if(1===t.length){var o;let i=null===(o=e.filters)||void 0===o?void 0:o.find(e=>e.value===t[0]);return(0,r.jsx)(d.Z,{variant:"body2",sx:{fontWeight:500},children:null==i?void 0:i.label})}return(0,r.jsxs)(d.Z,{variant:"body2",sx:{fontWeight:500},children:[t.length," selected"]})},sx:{backgroundColor:"background.paper","& .MuiOutlinedInput-notchedOutline":{borderColor:u.palette.divider},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:u.palette.primary.main},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:u.palette.primary.main,borderWidth:2},"& .MuiSelect-select":{py:1.5,minHeight:"1.4375em"}},onChange:t=>{let o=t.target.value;a(0===o.length?void 0:o.join(","),e.title)},MenuProps:{PaperProps:{sx:{maxHeight:300,mt:1,boxShadow:u.shadows[8],"& .MuiMenuItem-root":{py:1,px:2,borderRadius:1,mx:1,my:.5,"&:hover":{backgroundColor:u.palette.action.hover},"&.Mui-selected":{backgroundColor:u.palette.primary.main+"20",color:u.palette.primary.main,fontWeight:600,"&:hover":{backgroundColor:u.palette.primary.main+"30"}}}}}},children:[(0,r.jsx)(T.Z,{value:"",children:(0,r.jsxs)(n.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,r.jsx)(C.Z,{icon:"mdi:filter-off",fontSize:"1rem"}),(0,r.jsxs)(d.Z,{variant:"body2",children:["All ",e.title.toLowerCase()]})]})}),null===(l=e.filters)||void 0===l?void 0:l.map((e,o)=>(0,r.jsxs)(T.Z,{value:e.value,children:[(0,r.jsx)(I.Z,{checked:s.includes(e.value),size:"small"}),(0,r.jsx)(M.Z,{primary:e.label,primaryTypographyProps:{variant:"body2"}})]},"filter-".concat(t,"-").concat(o)))]})},"group-".concat(t))})}),o.length>0&&(0,r.jsxs)(n.Z,{sx:{pt:2,borderTop:e=>"1px solid ".concat(e.palette.divider)}
1,children:[(0,r.jsx)(d.Z,{variant:"caption",sx:{display:"block",mb:1,fontWeight:600,color:"text.secondary",textTransform:"uppercase",letterSpacing:"0.5px"},children:"Active Filters"}),(0,r.jsxs)(n.Z,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:[o.flatMap(e=>{let o=t.find(t=>t.title===e.groupTitle);return e.values.map((t,i)=>{var l;let n=null==o?void 0:null===(l=o.filters)||void 0===l?void 0:l.find(e=>e.value===t);return(0,r.jsx)(P.Z,{label:"".concat(null==o?void 0:o.title,": ").concat(null==n?void 0:n.label),size:"small",onDelete:()=>{let o=e.values.filter(e=>e!==t);a(0===o.length?void 0:o.join(","),e.groupTitle)},deleteIcon:(0,r.jsx)(C.Z,{icon:"mdi:close",fontSize:"0.875rem"}),sx:{backgroundColor:u.palette.primary.main+"20",color:u.palette.primary.main,fontWeight:500,"& .MuiChip-deleteIcon":{color:u.palette.primary.main,"&:hover":{color:u.palette.primary.dark}}}},"active-filter-".concat(e.groupTitle,"-").concat(i))})}),o.length>1&&(0,r.jsx)(P.Z,{label:"Clear all",size:"small",variant:"outlined",onClick:m,deleteIcon:(0,r.jsx)(C.Z,{icon:"mdi:close-circle",fontSize:"0.875rem"}),onDelete:m,sx:{borderColor:u.palette.error.main,color:u.palette.error.main,"&:hover":{backgroundColor:u.palette.error.main+"10"},"& .MuiChip-deleteIcon":{color:u.palette.error.main}}})]})]})]})},z=e=>{let{title:t,onPrev:o,onNext:a,onToday:s,filterGroups:d,selectedFilters:c,handleCalendarsUpdate:p,filterTitle:m}=e,x=(0,i.Z)(),h=(0,l.Z)(x.breakpoints.down("md"));return(0,r.jsxs)(n.Z,{sx:{display:"flex",flexDirection:h?"column":"row",alignItems:"center",justifyContent:"space-between",gap:2,p:2,borderBottom:"1px solid ".concat(x.palette.divider),backgroundColor:"background.paper"},children:[(0,r.jsxs)(n.Z,{sx:{display:"flex",alignItems:"center",gap:1,order:1},children:[(0,r.jsx)(k.Z,{onClick:o,size:"small",children:(0,r.jsx)(C.Z,{icon:"mdi:chevron-left"})}),(0,r.jsx)(k.Z,{onClick:a,size:"small",children:(0,r.jsx)(C.Z,{icon:"mdi:chevron-right"})}),(0,r.jsx)(u.Z,{variant:"text",onClick:s,sx:{fontSize:"1.25rem",fontWeight:600,color:"text.primary",textTransform:"none",minWidth:"auto",px:2,"&:hover":{backgroundColor:"action.hover"}},children:t})]}),(0,r.jsx)(n.Z,{sx:{order:2,maxWidth:h?"100%":"600px",display:"flex",alignItems:"center"},children:(0,r.jsx)(W,{filterGroups:d,selectedFilters:c,handleCalendarsUpdate:p,compact:!0})})]})};var E=o(96486),N=o.n(E),O=o(51049),F=o(33489),H=o(22120),Y=o(67218),A=o(86501),L=o(47776);let _="sv-se",B={hour:"2-digit",minute:"2-digit"},R={Personal:"error",Business:"primary",Family:"warning",Holiday:"success",ETC:"info"},G={boldText:{textAlign:"center",fontSize:"20px",fontWeight:500,lineHeight:"32px"},dialogActions:{marginTop:"24px",alignItems:"center",display:"flex",justifyContent:"end"},dialogDescription:{color:"#7E8182",fontSize:"14px",textAlign:"center"}};function U(){var e;let{user:t,subscription:o,refreshSubscription:p}=(0,Y.a)(),{bookedPasses:v,setBookedPasses:k}=(0,F.b)(),[w,S]=(0,x.useState)([]),[T,P]=(0,x.useState)([]),[D,I]=(0,x.useState)(null),[M,W]=(0,x.useState)(),[E,U]=(0,x.useState)(!1),[Q,$]=(0,x.useState)(!1),[q,K]=(0,x.useState)(!1),[J,ee]=(0,x.useState)(null),[et,eo]=(0,x.useState)({title:"",message:""}),[er,ei]=(0,x.useState)(!1),[el,en]=(0,x.useState)([]),[ea,es]=x.useState([]),ed=(0,i.Z)(),ec=(0,l.Z)(ed.breakpoints.up("md"),{defaultMatches:!0}),[eu,ep]=(0,x.useState)("September 2025"),{totalPasses:em}=(0,L.M)(o),{t:ex}=(0,H.$G)(),{settings:eh}=(0,h.r)(),eg=(0,b.m)(),ef=[{value:f.IF.QueuePass,label:ex("bookPage.shiftTypes.standardPass")},{value:f.IF.Seminar,label:ex("bookPage.shiftTypes.seminar")}],ev=e=>{e.extendedProps.name&&(m()(e.end).isBefore(new Date)||ee(e))},eb=()=>{ee(null)},ey=async()=>{$(!0);let e=m()(),t=v.filter(t=>{let o=m()(t.startTime);return o.isAfter(e)}),o=t.filter(e=>{var t;return(null===(t=e.shift)||void 0===t?void 0:t.type)===f.IF.QueuePass});if(o.length>=3){eb(),eo({title:ex("bookPage.maxPassesErrorDialogTitle"),message:ex("bookPage.maxPassesErrorDialogMessage")});return}await eg.bookedPass.save({shiftId:Number(null==J?void 0:J.id),shiftType:null==J?void 0:J.extendedProps.type}),eb(),await ek(),await p(),await eZ(),$(!1)},ej=async()=>{let e=v.find(e=>m()(e.startTime).format("YYYY-MM-DD HH:mm")===m()(null==J?void 0:J.start).format("YYYY-MM-DD HH:mm")&&m()(e.endTime).format("YYYY-MM-DD HH:mm")===m()(null==J?void 0:J.end).format("YYYY-MM-DD HH:mm"));e&&await eg.bookedPass.delete(e.id),eb(),await ek(),await p(),await eZ()},eZ=async()=>
1{if(!M){console.error("No dates set, cannot fetch shifts.");return}try{let{activeEnd:e,activeStart:t}=null==M?void 0:M.view,o=await eg.bookedPass.search({EndTime:e.toISOString(),StartTime:t.toISOString()});if(o.data)P(o.data);else{console.error("Failed to fetch shifts. Error: ",o.error),P([]);return}}catch(e){console.error("Error fetching shifts:",e),A.ZP.error(ex("bookPage.errorFetchingShifts"),{duration:15e3})}},ek=async()=>{let e=await eg.bookedPass.getAll();if(e.data){let t=e.data.sort((e,t)=>{let o=new Date(e.startTime),r=new Date(t.startTime);return o.getTime()-r.getTime()});k(t)}else{console.error("Failed to fetch booked passes. Error: ",e.error),k([]);return}};return x.useEffect(()=>{let e=T;ea.forEach(t=>{t.groupTitle===ex("bookPage.groupsFilterLabel")?e=e.filter(e=>{var o;return null===(o=e.visibleTo)||void 0===o?void 0:o.some(e=>e.groupId&&t.values.includes(e.groupId))}):t.groupTitle===ex("bookPage.teachersFilterLabel")?e=e.filter(e=>{var o;return t.values.includes(null===(o=e.teacher)||void 0===o?void 0:o.id)}):t.groupTitle===ex("bookPage.typeFilterLabel")&&(e=e.filter(e=>t.values.includes(e.type)))});let o=[];for(let r of e){let e=new Date(r.startTime).toISOString(),i=new Date(r.endTime).toISOString(),l=function(e,t){let o=V(e,t),r=m()(e.endTime).isBefore(new Date);if(r)return"primary";if(o)return"success";switch(e.type){case f.IF.QueuePass:return"info";case f.IF.Seminar:return"warning";case f.IF.OneOnOne:return"error";default:return"info"}}(r,t);o.push({id:r.id,allDay:!1,start:e,end:i,title:"",url:"",extendedProps:{calendar:l,time:"".concat(new Date(e).toLocaleTimeString(_,B)," - ").concat(new Date(i).toLocaleTimeString(_,B)),name:r.name,teacher:"".concat(r.teacher.firstName," ").concat(r.teacher.lastName),type:r.type}})}S(o)},[ea,T,v,ex]),x.useEffect(()=>{eZ()},[M]),x.useEffect(()=>{if(J){let e=T.find(e=>e.id===Number(J.id)),o=V(e,t);o?K(!!J):U(!!J)}else U(!1),K(!1)},[T,J,v,t]),x.useEffect(()=>{null==D||D.updateSize()},[w,D]),x.useEffect(()=>{var e;let o=null==t?void 0:null===(e=t.groupMemberships)||void 0===e?void 0:e.filter(e=>{var t;return null===(t=e.group)||void 0===t?void 0:t.assignedUserId}),r=N().uniqBy(o,e=>{var t;return null===(t=e.group)||void 0===t?void 0:t.assignedUserId});en(r.map(e=>e.group.assignedUser))},[t]),x.useEffect(()=>{console.log({selectedFilters:ea})},[ea]),(0,r.jsxs)(n.Z,{sx:{width:"100%"},children:[!ec&&(0,r.jsxs)(a.Z,{expanded:er,onChange:()=>ei(e=>!e),sx:{width:"100%",marginBottom:4,boxShadow:"0px 2px 10px 0px rgba(58, 53, 65, 0.1)","&.Mui-expanded":{borderColor:"#3a35411f"}},children:[(0,r.jsx)(s.Z,{id:"controlled-panel-header-1","aria-controls":"controlled-panel-content-1",expandIcon:(0,r.jsx)(C.Z,{icon:"mdi:chevron-down"}),children:(0,r.jsx)(d.Z,{variant:"h6",sx:{fontSize:"1.125rem",fontWeight:600,lineHeight:"1.6",color:"text.primary"},children:ex("bookedPassComponent.title")})}),(0,r.jsx)(n.Z,{sx:{width:"100%",marginRight:2,backgroundColor:"background.paper",padding:"0px 16px 0px 16px"},children:(0,r.jsx)(y.j,{containerStyles:{height:"100%",width:"100%"},showTitle:!1,page:"book"})})]}),(0,r.jsxs)(g.Z,{dateNumberHoverCursor:"default",className:"app-calendar",sx:{display:"flex",flexDirection:"column",boxShadow:"bordered"===eh.skin?0:6,..."bordered"===eh.skin&&{border:e=>"1px solid ".concat(e.palette.divider)},"& .fc .fc-toolbar.fc-header-toolbar":{display:"none !important"},"& .fc-view-harness":{marginTop:"0 !important"},"& .fc":{"& .fc-header-toolbar":{display:"none !important"},"& .fc-toolbar":{display:"none !important"}}},children:[(0,r.jsx)(z,{title:eu,onPrev:()=>null==D?void 0:D.prev(),onNext:()=>null==D?void 0:D.next(),onToday:()=>null==D?void 0:D.today(),filterGroups:[{title:ex("bookPage.groupsFilterLabel"),filters:null==t?void 0:null===(e=t.groupMemberships)||void 0===e?void 0:e.map(e=>({value:e.group.id,label:e.group.name}))},{title:ex("bookPage.teachersFilterLabel"),filters:el.map(e=>({value:e.id,label:"".concat(e.firstName," ").concat(e.lastName)}))},{title:ex("bookPage.typeFilterLabel"),filters:ef.map(e=>({value:e.value,label:e.label}))}],selectedFilters:ea,handleCalendarsUpdate:(e,t)=>
1{t&&es(o=>{if(!e)return o.filter(e=>e.groupTitle!==t);let r=e.split(",").map(e=>""===e?void 0:Number(e)),i=o.findIndex(e=>e.groupTitle===t),l={groupTitle:t,values:r};if(!(i>=0))return[...o,l];{let e=[...o];return e[i]=l,e}})}}),(0,r.jsxs)(n.Z,{sx:{display:"flex",flexDirection:ec?"row":"column"},children:[(0,r.jsxs)(n.Z,{sx:{p:5,pb:0,flex:"1 1 90%",borderRight:ec?e=>"1px solid ".concat(e.palette.divider):"none",backgroundColor:"background.paper"},children:[!ec&&(0,r.jsx)(d.Z,{variant:"h5",sx:{fontSize:"1.25rem",fontWeight:600,lineHeight:"1.6",marginBottom:3,color:"text.primary"},children:ex("bookPage.calendarTitle")}),(0,r.jsx)(Z.Z,{calendarApi:D,events:w,direction:"ltr",initialView:ec?"dayGridMonth":"listMonth",calendarsColor:R,setCalendarApi:I,onDatesChanged:e=>{W(e);let t=e.view.title;ep(t)},handleSelectEvent:ev,handleLeftSidebarToggle:()=>null,updateEvent:e=>null,handleAddEventSidebarToggle:()=>null,weekNumbers:!0,hideHeader:!0})]}),ec&&(0,r.jsx)(n.Z,{sx:{p:"20px",flex:"1 1 35%",backgroundColor:"background.paper"},children:(0,r.jsx)(y.j,{containerStyles:{height:"100%"}})})]})]}),J&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(j.o,{open:E,onClose:eb,title:ex("bookPage.confirmBookingDialogTitle"),children:0===em?(0,r.jsx)(X,{handleDialogClose:eb}):(0,r.jsxs)(n.Z,{sx:{width:"330px"},children:[(0,r.jsx)(d.Z,{sx:G.dialogDescription,children:ex("bookPage.confirmBookingDialogDescription")}),(0,r.jsx)(d.Z,{sx:{...G.boldText,marginTop:"24px"},children:null==J?void 0:J.extendedProps.name}),(0,r.jsx)(d.Z,{sx:G.boldText,children:new Date(J.start).toLocaleDateString("sv-se",{weekday:"long",day:"numeric",month:"long",year:"numeric"})}),(0,r.jsx)(d.Z,{sx:G.boldText,children:null==J?void 0:J.extendedProps.time}),(0,r.jsxs)(c.Z,{className:"dialog-actions-dense",sx:G.dialogActions,children:[(0,r.jsx)(O.KM,{onClick:ey,disabled:Q,children:ex("common.confirm")}),(0,r.jsx)(u.Z,{variant:"outlined",color:"secondary",onClick:eb,children:ex("common.cancel")})]})]})}),(0,r.jsx)(j.o,{open:q,onClose:eb,title:ex("bookPage.confirmCancelBookingDialogTitle"),children:(0,r.jsxs)(n.Z,{sx:{width:"330px"},children:[(0,r.jsx)(d.Z,{sx:G.dialogDescription,children:ex("bookPage.confirmCancelBookingDialogDescription")}),(0,r.jsx)(d.Z,{sx:{...G.boldText,marginTop:"24px"},children:null==J?void 0:J.extendedProps.name}),(0,r.jsx)(d.Z,{sx:G.boldText,children:new Date(J.start).toLocaleDateString("sv-se",{weekday:"long",day:"numeric",month:"long",year:"numeric"})}),(0,r.jsx)(d.Z,{sx:G.boldText,children:null==J?void 0:J.extendedProps.time}),(0,r.jsxs)(c.Z,{className:"dialog-actions-dense",sx:G.dialogActions,children:[(0,r.jsx)(u.Z,{variant:"contained",color:"error",onClick:ej,children:ex("common.cancelPass")}),(0,r.jsx)(u.Z,{variant:"outlined",color:"secondary",onClick:eb,children:ex("common.close")})]})]})})]}),(0,r.jsxs)(j.o,{open:!!et.message,onClose:()=>eo({title:"",message:""}),title:et.title,children:[(0,r.jsx)(d.Z,{sx:G.dialogDescription,children:et.message}),(0,r.jsx)(c.Z,{className:"dialog-actions-dense",sx:G.dialogActions,children:(0,r.jsx)(u.Z,{variant:"outlined",color:"secondary",onClick:()=>eo({title:"",message:""}),children:ex("common.close")})})]})]})}U.acl={action:v.H.Read,subject:v.D.StudentPage};var Q=U;function V(e,t){var o;return null===(o=e.bookedPasses)||void 0===o?void 0:o.some(e=>e.userId===(null==t?void 0:t.id))}let X=e=>{let{t}=(0,H.$G)();return(0,r.jsxs)(n.Z,{sx:{width:"330px"},children:[(0,r.jsx)(d.Z,{sx:G.dialogDescription,children:t("bookPage.noRemainingPassesMessage")}),(0,r.jsx)(d.Z,{sx:G.dialogDescription,children:t("bookPage.congratulationsMessage")}),(0,r.jsx)(c.Z,{className:"dialog-actions-dense",sx:G.dialogActions,children:(0,r.jsx)(u.Z,{variant:"outlined",color:"secondary",onClick:e.handleDialogClose,children:t("common.close")})})]})}}},function(e){e.O(0,[3662,4885,1069,2395,7749,8716,1036,4316,9417,9774,2888,179],function(){return e(e.s=6889)}
1),_N_E=e.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.