PageSourceSearch

https://schoolhouse.world/_next/static/chunks/pages/admin/settings-marketing-sources-af63ad1ca54fd254.js

js schoolhouse.world collected 2026-10-01 10:43:01 UTC 4,744 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3809],{42812:(e,r,n)=>{"use strict";n.r(r),n.d(r,{__N_SSP:()=>F,default:()=>v});var i=n(18153),t=n(91921),l=n(38890),s=n(42720),a=n(82736),o=n(76032),d=n(39955),c=n(99407),u=n(63973),h=n(2665),g=n(55791),m=n(83734),k=n(43043),p=n(64435),y=n(39706),Y=n(14232),_=n(75737),S=n(54443),w=n(74175),f=n(9496),M=n(61110),b=n(49783),A=n(46862),D=n(65956);let C=(0,M.A)(function(){let e=(0,S.I)(),[r,n]=Y.useState(!1),[M,C]=Y.useState(null),[F,v]=Y.useState(null),E=(0,Y.useMemo)(()=>(0,y.A)(e(_.A.getMarketingSources())??[],"slug"),[e]),T=Y.useMemo(()=>[{type:"text",label:"Slug",name:"slug",description:"Internal name for the marketing source",required:!0,initialValue:null,size:6},{type:"textarea",label:"Keywords",name:"keywords",description:"Comma separated list of keywords",required:!0,initialValue:null,size:6}],[]),x=Y.useMemo(()=>{let e=E.find(e=>e.slug===F);return null==e?[]:[{type:"textarea",label:"Keywords",name:"keywords",description:"Comma separated list of keywords",required:!0,initialValue:e.keywords.join(", "),size:6}]},[E,F]),[N]=(0,w.A)(async e=>{await f.Vf.admin_settingsPatchMarketingSources({patch_add:[{slug:`${e.slug}`,keywords:`${e.keywords}`.split(",")}]}),n(!1)},[],"Add Marketing Source"),[R]=(0,w.A)(async e=>{null!=F&&(await f.Vf.admin_settingsPatchMarketingSources({patch_add:[{slug:F,keywords:`${e.keywords}`.split(",")}],patch_remove:[F]}),v(null))},[F],"Modify Marketing Source"),[z]=(0,w.A)(async()=>{null!=M&&(await f.Vf.admin_settingsPatchMarketingSources({patch_remove:[M]}),C(null))},[M],"Delete Marketing Source");return(0,i.FD)(b.A,{title:"Marketing Sources",children:[(0,i.Y)(D.A,{size:"lg",title:"Add Marketing Source",onClose:()=>n(!1),open:r,body:()=>(0,i.Y)(A.A,{name:"AddMarketingSource",blocks:T,onSubmit:N})}),(0,i.Y)(D.A,{size:"lg",title:"Modify Marketing Source",onClose:()=>v(null),open:null!=F,body:()=>(0,i.FD)(i.FK,{children:[(0,i.FD)(t.E,{mb:"8px",children:["You are modifying keywords for ",(0,i.Y)("b",{children:F}),"."]}),(0,i.Y)(A.A,{name:"EditMarketingSource",blocks:x,onSubmit:R})]})}),(0,i.Y)(D.A,{size:"lg",title:"Delete Marketing Source",onClose:()=>C(null),open:null!=M,body:()=>(0,i.FD)(i.FK,{children:[(0,i.Y)(t.E,{mb:2,children:"Are you sure you'd like to delete this Marketing Source?"}),(0,i.Y)(t.E,{children:"We should only delete a marketing source if it was entered incorrectly or if it is no longer needed."})]}),rightFooterContent:()=>(0,i.Y)(l.$,{variant:"danger",onClick:z,children:"Yes, Delete"})}),(0,i.FD)(s.m,{children:[(0,i.Y)(a.D,{size:"2xl",mb:8,children:"Marketing Sources"}),(0,i.Y)(o.B,{direction:"column",spacing:10,children:(0,i.FD)(o.B,{direction:"column",spacing:8,mt:8,ml:8,children:[(0,i.Y)(d.a,{children:(0,i.Y)(l.$,{onClick:()=>n(!0),children:"Add New"})}),(0,i.FD)(c.X,{variant:"simple",children:[(0,i.Y)(u.d,{children:(0,i.FD)(h.Tr,{children:[(0,i.Y)(g.Th,{children:"Slug"}),(0,i.Y)(g.Th,{children:"Keywords"}),(0,i.Y)(g.Th,{})]})}),0===E.length?(0,i.Y)(m.r,{children:"No sources defined."}):null,(0,i.Y)(k.N,{children:E.map(({slug:e,keywords:r})=>(0,i.FD)(h.Tr,{children:[(0,i.Y)(p.Td,{children:e}),(0,i.Y)(p.Td,{children:r.join(", ")}),(0,i.Y)(p.Td,{children:(0,i.FD)(d.a,{children:[(0,i.Y)(d.a,{children:(0,i.Y)(l.$,{variant:"outline",onClick:()=>v(e),children:"Edit"})}),(0,i.Y)(d.a,{mt:"4px",children:(0,i.Y)(l.$,{variant:"danger",onClick:()=>C(e),children:"Delete"})})]})})]},e))})]})]})})]})]})},{userRoles:["admin:super"]});var F=!0;let v=C},55791:(e,r,n)=>{"use strict";n.d(r,{Th:()=>a});var i=n(37876),t=n(99407),l=n(11842),s=n(85696);let a=(0,l.R)(({isNumeric:e,...r},n)=>{let l=(0,t.k)();return(0,i.jsx)(s.B.th,{...r,ref:n,__css:l.th,"data-is-numeric":e})})},61110:(e,r,n)=>{"use strict";n.d(r,{A:()=>t});var i=n(16425);function t(e,r){return null!=r.userRoles&&r.userRoles.forEach(e=>{if(!e.startsWith("admin:"))throw Error("Cannot expose admin page to non-admins!")}),(0,i.A)(e,{authScopes:r.authScopes,userRoles:r.userRoles,onboardingUsers:"disallowed"})}},63973:(e,r,n)=>{"use strict";n.d(r,{d:()=>a});var i=n(37876),t=n(99407),l=n(11842),s=n(85696);let a=(0,l.R)((e,r)=>{let n=(0,t.k)();return(0,i.jsx)(s.B.thead,{...e,ref:r,__css:n.thead})})},80114:(e,r,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/settings-marketing-sources",function(){return n(42812)}])},83734:(e,r,n)=>{"use strict";n.d(r,{r:()=>a});var i=n(37876),t=n(99407),l=n(11842),s=n(85696);let a=(0,l.R)((e,r)=>{let{placement:n="bottom",...l}=e,a=(0,t.k)();return(0,i.jsx)(s.B.caption,{...l,ref:r,__css:{...a.caption,captionSide:n}})});a.displayName="TableCaption"}},e=>{e.O(0,[6425,636,6593,8792],()=>e(e.s=80114)),_N_E=e.O()}]);
2//# sourceMappingURL=settings-marketing-sources-af63ad1ca54fd254.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.