PageSourceSearch

https://bikebook.co.uk/_next/static/chunks/pages/admin/roxform-config-1528e84a3da0d63a.js

js bikebook.co.uk collected 2026-09-24 09:50:47 UTC 7,572 bytes, 2 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},i=(new e.Error).stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="77eabab0-b727-44ad-9b3e-78082f91e04c",e._sentryDebugIdIdentifier="sentry-dbid-77eabab0-b727-44ad-9b3e-78082f91e04c")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3924],{22062:(e,i,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/roxform-config",function(){return t(27948)}])},27948:(e,i,t)=>{"use strict";t.r(i),t.d(i,{default:()=>T});var n=t(6029),s=t(75155),a=t(46232),r=t(43613),l=t(30961),o=t(13918),d=t(72091),c=t(35197),u=t(80956),m=t(16568),b=t(84473),f=t(55729),g=t(68020),p=t(8013),h=t(38002),x=t(81278),y=t(73832),P=t(70839),v=t(59550),N=t(48378),I=t(33636),j=t(95051),C=t(31377),S=t(46831);function w(e){let i,t,a,r,l,o,d,c,u=(0,s.c)(24),{open:m,setOpen:b,onSuccess:g}=e,h=(0,p.jL)(),[x,P]=(0,f.useState)(null),{mutateAsync:v,isPending:N}=(0,y.l2)();u[0]!==v||u[1]!==h||u[2]!==g||u[3]!==x||u[4]!==b?(i=async()=>{null!=x&&await v({params:{businessId:x.businessId}}).then(()=>{g(),b(!1),h((0,S.kw)("success","Business attached to Roxform"))})},u[0]=v,u[1]=h,u[2]=g,u[3]=x,u[4]=b,u[5]=i):i=u[5];let I=i;return u[6]!==b?(t=()=>b(!1),u[6]=b,u[7]=t):t=u[7],u[8]!==b?(a={type:"button",content:"Close",hideOnMobile:!0,buttonProps:{onClick:()=>b(!1)},side:"left"},u[8]=b,u[9]=a):a=u[9],u[10]!==I||u[11]!==N?(r={type:"button",content:"Attach Business",buttonProps:{onClick:I,loading:N},side:"right"},u[10]=I,u[11]=N,u[12]=r):r=u[12],u[13]!==a||u[14]!==r?(l=[a,r],u[13]=a,u[14]=r,u[15]=l):l=u[15],u[16]===Symbol.for("react.memo_cache_sentinel")?(o=e=>P(e),u[16]=o):o=u[16],u[17]!==x?(d=(0,n.jsx)(C.A,{size:"medium",onSelect:o,selectedBusiness:x}),u[17]=x,u[18]=d):d=u[18],u[19]!==m||u[20]!==t||u[21]!==l||u[22]!==d?(c=(0,n.jsx)(j.A,{open:m,onClose:t,maxWidth:"sm",fullWidth:!0,title:"Select a business to attach",subheader:"Select a business to attach to Roxform",actions:l,children:d}),u[19]=m,u[20]=t,u[21]=l,u[22]=d,u[23]=c):c=u[23],c}var A=t(29113);function _(e){let{openAttachBusinessDialog:i,setOpenAttachBusinessDialog:t}=e,{themeStretch:s}=(0,g.A)();(0,m.A)(),(0,x.useRouter)();let{data:a}=(0,y.uz)(),{refreshToken:r}=(0,p.GV)(e=>e.business.service),[l,o]=(0,f.useState)(0),{mutateAsync:C,isPending:_}=(0,y.h0)(),[k,R]=(0,f.useState)(!1),[T,D]=(0,f.useState)(null),{data:E}=(0,y.xT)("Roxform",{query:{staleTime:0,gcTime:0,queryKey:["partnerEmbedConfiguration",r,l]}}),W=null==E?void 0:E.data,B=(0,p.wA)(),V=null==a?void 0:a.data;(0,f.useCallback)((0,h.A)((e,i)=>{setFilterName(e)},200),[]);let z=(e,i)=>{B((0,N.zE)(e.row.serviceId))},M=()=>{o(l+1)};(0,f.useEffect)(()=>{M()},[]);let O=async e=>{await C({params:{businessId:e}}).then(()=>{M(),R(!1),B((0,S.kw)("success","Business removed from Roxform"))})};if(null==V)return null;var F=null==W?void 0:W.businesses.map(e=>({...e,id:e.businessId}));return null==F&&(F=[]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(d.A,{spacing:2,children:[(0,n.jsx)(c.A,{}),(0,n.jsx)(b.A,{objectName:"Business",defaultPageSize:20,tableId:"roxform-businesses",title:"Roxform Businesses",refreshDataToken:l,defaultDensity:"standard",disableHeaderFilters:!0,rowReorderingPropName:"DisplayName",disableSorting:!0,rowReordering:!0,checkboxSelection:!1,columns:[{field:"DisplayName",type:"string",headerName:"Business Name",numeric:!1,disablePadding:!0,minWidth:100,flex:1,getPropValue:e=>e.displayName},{field:"Email",type:"string",headerName:"Email",filterable:!1,sortable:!1,numeric:!1,disablePadding:!0,getPropValue:e=>e.contactEmail},{field:"ContactNumber",type:"string",headerName:"Number",numeric:!0,disablePadding:!0,getPropValue:e=>e.contactNumber?e.contactNumber:"N/a"},{field:"action",type:"action",headerName:"",numeric:!1,disablePadding:!0,options:[{label:"Remove",onClick:e=>{R(!0),D(e.businessId)},icon:(0,n.jsx)(A.l,{size:20})}]}],dataOverride:F,additionalReqProps:{includeProfile:!1},defaultSortModel:{field:"Created",sort:"desc"},sx:{border:"none","& .MuiCardHeader-root":{padding:0}}}),null==V?void 0:V.map(e=>(0,n.jsx)(b.A,{objectName:"Service",defaultPageSize:50,tableId:e.value+"_services",checkboxSelection:!1,detailPanelEnabled:!0,onRowClick:z,mergePropertyId:"serviceId",refreshDataToken:r,rowReordering:!0,defaultHeight:"500px",rowReorderingPropName:"name",getRowClassName:e=>"mui-data-grid-clickable",disableHeaderFilters:!0,disableSorting:!0,title:"Roxform Services",columns:[{field:"Name",type:"string",headerName:"Name",placeholder:"Premium service",numeric:!0,flex:1.5,minWidth:150,disablePadding:!0,getPropValue:e=>e.name},{field:"ServiceGroup.Name",type:"string",headerName:"Category",filterable:!1,numeric:!0,flex:1,minWidth:150,disablePadding:!0,getPropValue:e=>e.serviceGroup.name},{field:"ServicePricingType",type:"singleSelect",headerName:"Pricing Type",numeric:!0,flex:1,minWidth:150,disablePadding:!0,getPropValue:e=>P.t[e.servicePricingType].label},{field:"Price",type:"number",headerName:"Price",placeholder:(0,v.TI)(100),numeric:!0,flex:.7,minWidth:100,disablePadding:!0,getPropValue:e=>"SetPrice"==e.servicePricingType?(0,v.TI)(e.price):"-"},{field:"DurationInMinutes",type:"string",headerName:"Duration",placeholder:"30 minutes",flex:.7,minWidth:120,disablePadding:!0,getPropValue:e=>e.durationInMinutes?e.durationInMinutes+" minutes":"-"},{field:"Included",type:"string",headerName:"Included",flex:.7,filterable:!1,sortable:!1,minWidth:120,disablePadding:!0,getPropValue:e=>{var i,t,s,a;return null==e.serviceItems||0==e.serviceItems.length?"-":(0,n.jsx)("div",{children:(0,n.jsx)(u.A,{title:(0,n.jsx)("ul",{children:(i=[...null!=(s=e.serviceItems)?s:[]],i.sort((e,i)=>e.serviceItemCategory.name.localeCompare(i.serviceItemCategory.name)).map(e=>(0,n.jsx)("li",{children:"[".concat(e.serviceItemCategory.name,"] ").concat(e.name)}
1,e.id)))}),children:(0,n.jsx)("div",{children:"".concat(null!=(a=null==e||null==(t=e.serviceItems)?void 0:t.length)?a:0," items")})})})}}],defaultDensity:"standard",additionalReqProps:{categoryFilters:["roxform"]},dataOverride:e.services,disableExport:!0,sx:{border:"none","& .MuiCardHeader-root":{padding:0}},defaultSortModel:{field:"Price",sort:"desc"}}))]}),(0,n.jsx)(I.A,{}),(0,n.jsx)(w,{open:i,setOpen:t,onSuccess:M}),(0,n.jsx)(j.A,{open:k,onClose:()=>R(!1),title:"Remove business?",maxWidth:"sm",fullWidth:!0,content:"Are you sure you want to remove this business from Roxform?",actions:[{type:"button",content:"Cancel",side:"left",buttonProps:{onClick:()=>R(!1)}},{type:"button",content:"Remove",side:"right",buttonProps:{loading:_,color:"error",onClick:()=>O(T)}}]})]})}var k=t(15086),R=t(89783);let T=()=>{let e,i,t,d=(0,s.c)(4),[c,u]=(0,f.useState)(!1);return d[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsx)(l.l,{size:20}),d[0]=e):e=d[0],d[1]===Symbol.for("react.memo_cache_sentinel")?(i=(0,n.jsx)(k.A,{title:"Roxform Config",icon:e,actions:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.A,{size:"small",variant:"outlined",color:"inherit",startIcon:(0,n.jsx)(o.f,{size:16}),onClick:()=>{u(!0)},children:"Add Business"})," "]})}),d[1]=i):i=d[1],d[2]!==c?(t=(0,n.jsxs)(R.A,{children:[i,(0,n.jsx)(r.A,{maxWidth:"xl",children:(0,n.jsx)(_,{openAttachBusinessDialog:c,setOpenAttachBusinessDialog:u})})]}),d[2]=c,d[3]=t):t=d[3],t}}},e=>{e.O(0,[1474,8600,9664,3652,3761,1909,737,9610,4454,7874,3834,512,8149,6282,5506,3115,299,4148,5328,6531,4100,1933,2330,6593,636,8792],()=>e(e.s=22062)),_N_E=e.O()}]);
2//# sourceMappingURL=roxform-config-1528e84a3da0d63a.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.