PageSourceSearch

https://www.oscainc.org/_next/static/chunks/pages/admin/settings/userAgreements-eed2e41c6f7cbacb.js

js oscainc.org collected 2026-10-04 13:29:21 UTC 16,777 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[74773],{44692:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/settings/userAgreements",function(){return t(71150)}])},85200:function(n,e,t){"use strict";t.d(e,{DY:function(){return AdminPage},hb:function(){return s},lm:function(){return AdminPageHeading},yG:function(){return AdminPageHeader}});var i=t(85893),o=t(48641),r=t(38655);t(67294);let AdminPage=n=>{let{children:e,...t}=n;return(0,i.jsx)(o.xu,{...t,children:e})},AdminPageHeader=n=>{let{children:e,...t}=n;return(0,i.jsx)(o.Kq,{direction:"row",spacing:"4",alignItems:"flex-start",...t,children:e})},AdminPageHeading=n=>{let{children:e,...t}=n;return(0,i.jsx)(o.X6,{size:"md",...t,children:e})},s=(0,r.Gp)((n,e)=>{let{children:t,...r}=n;return(0,i.jsx)(o.xu,{marginY:"5",...r,ref:e,children:t})})},39174:function(n,e,t){"use strict";t.d(e,{A:function(){return NoMatchPage}});var i=t(85893),o=t(48641),r=t(23887),s=t(47741),d=t(11163);t(67294);let NoMatchPage=()=>{let n=(0,d.useRouter)();return(0,i.jsxs)(o.gC,{p:"12",spacing:"4",textAlign:"center",children:[(0,i.jsx)(r.Ee,{src:"https://tradewing-public.s3.us-east-2.amazonaws.com/tradewing-logo.png",alt:"Tradewing",width:"50px",height:"50px"}),(0,i.jsx)(o.xv,{textStyle:"xlBodyStrong",children:"Page Not Found"}),(0,i.jsx)(o.xv,{children:"Please check that you have the correct URL and try again. If you need help finding and accessing your community, please contact [email protected]."}),(0,i.jsx)(s.zx,{onClick:()=>n.push("/"),children:"Return to Site"})]})}},51494:function(n,e,t){"use strict";t.d(e,{u:function(){return d}});var i=t(85893),o=t(49184),r=t(48641),s=t(67294);let d=s.forwardRef((n,e)=>{let{children:t,...s}=n;return(0,i.jsx)(o.XZ,{ref:e,...s,children:(0,i.jsx)(r.xv,{textStyle:"compact",color:"gray.600",children:t})})});d.displayName="CompactCheckbox"},71150:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return F}});var i=t(82729),o=t(85893),r=t(50456),s=t(37887),d=t(48641),c=t(67294),a=t(85200),l=t(69171),u=t(48076),m=t(23253),v=t(96317),C=t(50319),x=t(90195),f=t(80419),y=t(47741),g=t(83234),h=t(9041),j=t(87536),p=t(15927),P=t(16225),A=t(66854),_=t(52670),O=t(51494),E=t(86678);function _templateObject(){let n=(0,i._)(["\n  mutation CodeOfConduct_UpdateTenant($input: UpdateTenantInput!) {\n    updateTenant(input: $input) {\n      data {\n        _id\n        obnoxiousCodeOfConduct\n        codeOfConduct\n      }\n    }\n  }\n"]);return _templateObject=function(){return n},n}function _templateObject1(){let n=(0,i._)(["\n  fragment CodeOfConduct_TenantFragment on Tenant {\n    _id\n    codeOfConduct\n    obnoxiousCodeOfConduct\n  }\n"]);return _templateObject1=function(){return n},n}let T=(0,r.Ps)(_templateObject()),CodeOfConduct=n=>{var e;let{tenant:t}=n,[i,r]=(0,x.kt)(!1),s=(0,f.pm)(),{control:a,handleSubmit:l,reset:u}=(0,j.cI)({defaultValues:{obnoxiousCodeOfConduct:null!==(e=t.obnoxiousCodeOfConduct)&&void 0!==e&&e,codeOfConduct:t.codeOfConduct?t.codeOfConduct:(0,h.convertToRaw)(h.EditorState.createEmpty().getCurrentContent())}});c.useEffect(()=>{var n;u({obnoxiousCodeOfConduct:null!==(n=t.obnoxiousCodeOfConduct)&&void 0!==n&&n,codeOfConduct:t.codeOfConduct?t.codeOfConduct:(0,h.convertToRaw)(h.EditorState.createEmpty().getCurrentContent())})},[t,u]);let[m,v]=(0,C.D)(T,{onCompleted:()=>s({status:"success",description:"Successfully updated the code of conduct."}),onError:()=>s({status:"error",description:"Failed to update the code of conduct."})}),b=l(async n=>{await m({variables:{input:{id:t._id,data:{codeOfConduct:n.codeOfConduct,obnoxiousCodeOfConduct:n.obnoxiousCodeOfConduct}}}}),r.off()});return(0,o.jsx)(_.Z,{p:"6",children:(0,o.jsxs)(d.Kq,{spacing:"6",children:[(0,o.jsxs)(d.Kq,{direction:"row",justifyContent:"space-between",children:[(0,o.jsx)(d.xv,{textStyle:"xlBodyStrong",children:"Code of Conduct"}),(0,o.jsx)(y.zx,{visibility:i?"hidden":void 0,variant:"outline",colorScheme:"gray",size:"sm",onClick:r.on,children:"Edit"})]}),i?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(g.NI,{children:(0,o.jsx)(j.Qr,{name:"codeOfConduct",control:a,render:n=>
1{let{field:{onChange:e,value:t,ref:i,onBlur:r}}=n;return(0,o.jsx)(A.L,{value:t,onChange:e,ref:i,onBlur:r})}})}),(0,o.jsx)(j.Qr,{name:"obnoxiousCodeOfConduct",control:a,render:n=>{let{field:{onChange:e,value:t,ref:i,onBlur:r}}=n;return(0,o.jsx)(O.u,{onChange:e,isChecked:t,ref:i,onBlur:r,children:"Require users to sign the Code of Conduct"})}})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(p.Q_,{children:t.codeOfConduct&&(0,h.convertFromRaw)(t.codeOfConduct).getPlainText().length>0?(0,o.jsx)(p.Ic,{as:E.M,children:(0,o.jsx)(P.$,{rawDraftContentState:t.codeOfConduct})}):(0,o.jsx)(p.Bl,{children:"None"})}),(0,o.jsxs)(p.Q_,{children:[(0,o.jsx)(p.zt,{children:"Required to Sign"}),(0,o.jsx)(p.Ic,{children:t.obnoxiousCodeOfConduct?"Yes":"No"})]})]}),i&&(0,o.jsxs)(d.Kq,{direction:"row",justifyContent:"flex-end",children:[(0,o.jsx)(y.zx,{variant:"outline",colorScheme:"gray",size:"sm",onClick:()=>{u(),r.off()},children:"Cancel"}),(0,o.jsx)(y.zx,{size:"sm",onClick:b,isLoading:v.loading,children:"Save"})]})]})})};function PrivacyPolicy_templateObject(){let n=(0,i._)(["\n  mutation PrivacyPolicy_UpdateTenant($input: UpdateTenantInput!) {\n    updateTenant(input: $input) {\n      data {\n        _id\n        obnoxiousPrivacyPolicy\n        privacyPolicy\n      }\n    }\n  }\n"]);return PrivacyPolicy_templateObject=function(){return n},n}function PrivacyPolicy_templateObject1(){let n=(0,i._)(["\n  fragment PrivacyPolicy_TenantFragment on Tenant {\n    _id\n    obnoxiousPrivacyPolicy\n    privacyPolicy\n  }\n"]);return PrivacyPolicy_templateObject1=function(){return n},n}CodeOfConduct.tenantFragment=(0,r.Ps)(_templateObject1());let b=(0,r.Ps)(PrivacyPolicy_templateObject()),PrivacyPolicy=n=>{var e;let{tenant:t}=n,[i,r]=(0,x.kt)(!1),s=(0,f.pm)(),{control:a,handleSubmit:l,reset:u}=(0,j.cI)({defaultValues:{obnoxiousPrivacyPolicy:null!==(e=t.obnoxiousPrivacyPolicy)&&void 0!==e&&e,privacyPolicy:t.privacyPolicy?t.privacyPolicy:(0,h.convertToRaw)(h.EditorState.createEmpty().getCurrentContent())}});c.useEffect(()=>{var n;u({obnoxiousPrivacyPolicy:null!==(n=t.obnoxiousPrivacyPolicy)&&void 0!==n&&n,privacyPolicy:t.privacyPolicy?t.privacyPolicy:(0,h.convertToRaw)(h.EditorState.createEmpty().getCurrentContent())})},[t,u]);let[m,v]=(0,C.D)(b,{onCompleted:()=>s({status:"success",description:"Successfully updated Privacy Policy."}),onError:()=>s({status:"error",description:"Failed to update Privacy Policy."})}),T=l(async n=>{await m({variables:{input:{id:t._id,data:{privacyPolicy:n.privacyPolicy,obnoxiousPrivacyPolicy:n.obnoxiousPrivacyPolicy}}}}),r.off()});return(0,o.jsx)(_.Z,{p:"6",children:(0,o.jsxs)(d.Kq,{spacing:"6",children:[(0,o.jsxs)(d.Kq,{direction:"row",justifyContent:"space-between",children:[(0,o.jsx)(d.xv,{textStyle:"xlBodyStrong",children:"Privacy Policy"}),(0,o.jsx)(y.zx,{visibility:i?"hidden":void 0,variant:"outline",colorScheme:"gray",size:"sm",onClick:r.on,children:"Edit"})]}),i?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(g.NI,{children:(0,o.jsx)(j.Qr,{name:"privacyPolicy",control:a,render:n=>{let{field:{onChange:e,value:t,ref:i,onBlur:r}}=n;return(0,o.jsx)(A.L,{value:t,onChange:e,ref:i,onBlur:r})}})}),(0,o.jsx)(j.Qr,{name:"obnoxiousPrivacyPolicy",control:a,render:n=>{let{field:{onChange:e,value:t,ref:i,onBlur:r}}=n;return(0,o.jsx)(O.u,{onChange:e,isChecked:t,ref:i,onBlur:r,children:"Require users to sign the Privacy Policy"})}})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(p.Q_,{children:t.privacyPolicy&&(0,h.convertFromRaw)(t.privacyPolicy).getPlainText().length>0?(0,o.jsx)(p.Ic,{as:E.M,children:(0,o.jsx)(P.$,{rawDraftContentState:t.privacyPolicy})}):(0,o.jsx)(p.Bl,{children:"None"})}),(0,o.jsxs)(p.Q_,{children:[(0,o.jsx)(p.zt,{children:"Required to Sign"}),(0,o.jsx)(p.Ic,{children:t.obnoxiousPrivacyPolicy?"Yes":"No"})]})]}),i&&(0,o.jsxs)(d.Kq,{direction:"row",justifyContent:"flex-end",children:[(0,o.jsx)(y.zx,{variant:"outline",colorScheme:"gray",size:"sm",onClick:()=>{u(),r.off()},children:"Cancel"}),(0,o.jsx)(y.zx,{size:"sm",onClick:T,isLoading:v.loading,children:"Save"})]})]})})};function TermsAndConditions_templateObject(){let n=(0,i._)(["\n  mutation TermsAndConditions_UpdateTenant($input: UpdateTenantInput!) {\n    updateTenant(input: $input) {\n      data {\n        _id\n        obnoxiousTermsAndConditions\n        termsAndConditions\n      }\n    }\n  }\n"]);
1return TermsAndConditions_templateObject=function(){return n},n}function TermsAndConditions_templateObject1(){let n=(0,i._)(["\n  fragment TermsAndConditions_TenantFragment on Tenant {\n    _id\n    obnoxiousTermsAndConditions\n    termsAndConditions\n  }\n"]);return TermsAndConditions_templateObject1=function(){return n},n}PrivacyPolicy.tenantFragment=(0,r.Ps)(PrivacyPolicy_templateObject1());let S=(0,r.Ps)(TermsAndConditions_templateObject()),TermsAndConditions=n=>{var e;let{tenant:t}=n,[i,r]=(0,x.kt)(!1),s=(0,f.pm)(),{control:a,handleSubmit:l,reset:u}=(0,j.cI)({defaultValues:{obnoxiousTermsAndConditions:null!==(e=t.obnoxiousTermsAndConditions)&&void 0!==e&&e,termsAndConditions:t.termsAndConditions?t.termsAndConditions:(0,h.convertToRaw)(h.EditorState.createEmpty().getCurrentContent())}});c.useEffect(()=>{var n;u({obnoxiousTermsAndConditions:null!==(n=t.obnoxiousTermsAndConditions)&&void 0!==n&&n,termsAndConditions:t.termsAndConditions?t.termsAndConditions:(0,h.convertToRaw)(h.EditorState.createEmpty().getCurrentContent())})},[t,u]);let[m,v]=(0,C.D)(S,{onCompleted:()=>s({status:"success",description:"Successfully updated Terms and Conditions."}),onError:()=>s({status:"error",description:"Failed to update Terms and Conditions."})}),T=l(async n=>{await m({variables:{input:{id:t._id,data:{termsAndConditions:n.termsAndConditions,obnoxiousTermsAndConditions:n.obnoxiousTermsAndConditions}}}}),r.off()});return(0,o.jsx)(_.Z,{p:"6",children:(0,o.jsxs)(d.Kq,{spacing:"6",children:[(0,o.jsxs)(d.Kq,{direction:"row",justifyContent:"space-between",children:[(0,o.jsx)(d.xv,{textStyle:"xlBodyStrong",children:"Terms and Conditions"}),(0,o.jsx)(y.zx,{visibility:i?"hidden":void 0,variant:"outline",colorScheme:"gray",size:"sm",onClick:r.on,children:"Edit"})]}),i?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(g.NI,{children:(0,o.jsx)(j.Qr,{name:"termsAndConditions",control:a,render:n=>{let{field:{onChange:e,value:t,ref:i,onBlur:r}}=n;return(0,o.jsx)(A.L,{value:t,onChange:e,ref:i,onBlur:r})}})}),(0,o.jsx)(j.Qr,{name:"obnoxiousTermsAndConditions",control:a,render:n=>{let{field:{onChange:e,value:t,ref:i,onBlur:r}}=n;return(0,o.jsx)(O.u,{onChange:e,isChecked:t,ref:i,onBlur:r,children:"Require users to sign the Terms And Conditions"})}})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(p.Q_,{children:t.termsAndConditions&&(0,h.convertFromRaw)(t.termsAndConditions).getPlainText().length>0?(0,o.jsx)(p.Ic,{as:E.M,children:(0,o.jsx)(P.$,{rawDraftContentState:t.termsAndConditions})}):(0,o.jsx)(p.Bl,{children:"None"})}),(0,o.jsxs)(p.Q_,{children:[(0,o.jsx)(p.zt,{children:"Required to Sign"}),(0,o.jsx)(p.Ic,{children:t.obnoxiousTermsAndConditions?"Yes":"No"})]})]}),i&&(0,o.jsxs)(d.Kq,{direction:"row",justifyContent:"flex-end",children:[(0,o.jsx)(y.zx,{variant:"outline",colorScheme:"gray",size:"sm",onClick:()=>{u(),r.off()},children:"Cancel"}),(0,o.jsx)(y.zx,{size:"sm",onClick:T,isLoading:v.loading,children:"Save"})]})]})})};function UserAgreementsPage_templateObject(){let n=(0,i._)(["\n  query UserAgreementsPage_Tenant {\n    tenant {\n      result {\n        _id\n        ...CodeOfConduct_TenantFragment\n        ...PrivacyPolicy_TenantFragment\n        ...TermsAndConditions_TenantFragment\n      }\n    }\n  }\n  ","\n  ","\n  ","\n"]);return UserAgreementsPage_templateObject=function(){return n},n}TermsAndConditions.tenantFragment=(0,r.Ps)(TermsAndConditions_templateObject1());let R=(0,r.Ps)(UserAgreementsPage_templateObject(),CodeOfConduct.tenantFragment,PrivacyPolicy.tenantFragment,TermsAndConditions.tenantFragment);var w=t(93064),F=(0,t(52609).z)(()=>{var n;let e=(0,s.a)(R,{variables:{input:{filter:{active:{_eq:!0}}}}}),{cms:t}=(0,m.g)(),i=null===(n=e.data)||void 0===n?void 0:n.tenant.result;return(0,o.jsx)(v.C,{children:e.loading?(0,o.jsx)(l.g,{}):e.error||!i?(0,o.jsx)(u.S,{}):(0,o.jsxs)(a.DY,{maxWidth:"container.md",marginX:"auto",children:[(0,o.jsx)(a.yG,{children:(0,o.jsx)(a.lm,{children:"User Agreements"})}),(0,o.jsx)(a.hb,{children:(0,o.jsxs)(d.Kq,{spacing:"6",children:[(0,o.jsx)(CodeOfConduct,{tenant:i}),(0,o.jsx)(PrivacyPolicy,{tenant:i}),(0,o.jsx)(TermsAndConditions,{tenant:i})]})})]})})},{requiresEvery:[w.lj.ADMIN_ROLE]})},39615:function(n,e,t){"use strict";t.d(e,{E:function(){return getExternalUrl}});let getExternalUrl=n=>n?n.match(/^http?:\/\//i)||n.match(/^https?:\/\//i)?n:"http://"+n:void 0},52609:function(n,e,t){"use strict";t.d(e,{z:function(){return restrictedRoute}});var i=t(85893),o=t(11163),r=t(67294),s=t(39174),d=t(63205),c=t(62893),a=t(69171),l=t(47503),u=t
1(45893),m=t(93064);let v=new Map([[m.lj.AUTHENTICATION,n=>{var e;return!!(null===(e=n.user)||void 0===e?void 0:e._id)}],[m.lj.ADMIN_ROLE,n=>{var e,t;return(null===(e=n.user)||void 0===e?void 0:e.role)===l.uA.ADMIN||(null===(t=n.user)||void 0===t?void 0:t.role)===l.uA.MORGOTH}],[m.lj.MORGOTH_ROLE,n=>{var e;return(null===(e=n.user)||void 0===e?void 0:e.role)===l.uA.MORGOTH}],[m.lj.COMMUNITY_ACCESS,n=>{var e;return(null==n?void 0:null===(e=n.tenant)||void 0===e?void 0:e.communityAccessConfig)===l.iX.PUBLIC?!n.user||n.user.canAccessCommunity:!!n.user&&n.user.canAccessCommunity}],[m.lj.COMMUNITY_READ_ONLY_ACCESS,n=>{var e;return!!(null===(e=n.user)||void 0===e?void 0:e.canAccessCommunityReadOnly)}],[m.lj.SPONSOR_DASHBOARD_ACCESS,n=>{var e,t;return!!(null===(t=n.user)||void 0===t?void 0:null===(e=t.rosterOrganization)||void 0===e?void 0:e.currentUserOrganizationPermission.canManageOrganizationSponsorship)}],[m.lj.SPONSOR_DIRECTORY_ACCESS,n=>{var e,t,i;switch(null===(e=n.tenant)||void 0===e?void 0:e.sponsorDirectoryAccessConfig){case l.pZ.PUBLIC:return!0;case l.pZ.LOGGED_IN_USERS:return!!(null===(t=n.user)||void 0===t?void 0:t._id);case l.pZ.HIDDEN:return!1;default:throw Error("unknown sponsorDirectoryAccessConfig: ".concat(null===(i=n.tenant)||void 0===i?void 0:i.sponsorDirectoryAccessConfig))}}],[m.lj.MEMBER_DIRECTORY_ACCESS,n=>{var e;return!!(null===(e=n.tenant)||void 0===e?void 0:e.currentUserPermissions.canAccessMemberDirectory)}],[m.lj.EVENTS_FEED_ACCESS,n=>{var e;return!!(null===(e=n.tenant)||void 0===e?void 0:e.currentUserPermissions.canAccessEventsFeed)}],[m.lj.ORGANIZATION_DASHBOARD_ACCESS,n=>{var e,t;return!!(null===(t=n.user)||void 0===t?void 0:null===(e=t.rosterOrganization)||void 0===e?void 0:e.currentUserOrganizationPermission.canManageOrganizationProfile)}],[m.lj.DM_PAGE_ACCESS,n=>{var e;return!!(null===(e=n.user)||void 0===e?void 0:e.canAccessDMPage)}],[m.lj.ORGANIZATION_MEMBERSHIP_ACCESS,n=>{var e,t;return!!(null===(t=n.user)||void 0===t?void 0:null===(e=t.rosterOrganization)||void 0===e?void 0:e.currentUserOrganizationPermission.canManageOrganizationMembership)}],[m.lj.FEATURE_FLAG_CMS,n=>{var e,t;return!!(null===(t=n.tenant)||void 0===t?void 0:null===(e=t.featureFlags)||void 0===e?void 0:e.cms)}],[m.lj.FEATURE_FLAG_CONFERENCES,n=>{var e,t;return!!(null===(t=n.tenant)||void 0===t?void 0:null===(e=t.featureFlags)||void 0===e?void 0:e.conferences)}],[m.lj.FEATURE_FLAG_WEBFLOW,n=>{var e,t;return!!(null===(t=n.tenant)||void 0===t?void 0:null===(e=t.featureFlags)||void 0===e?void 0:e.webflow)}],[m.lj.PAID_MODULE_WEBSITE_BUILDER,n=>{var e,t;return!!(null===(t=n.tenant)||void 0===t?void 0:null===(e=t.paidModules)||void 0===e?void 0:e.websiteBuilder)}]]),useRequiredPermission=n=>{let e=(0,u.x)();if(!n.requiresEvery&&!n.requiresSome)return{hasPermission:!0,loading:!1};if(e.loading)return{hasPermission:!1,loading:!0};let t=null==n||!n.requiresEvery||(null==n?void 0:n.requiresEvery.map(n=>v.get(n)).every(n=>!n||n(e))),i=null==n||!n.requiresSome||(null==n?void 0:n.requiresSome.map(n=>v.get(n)).some(n=>!!n&&n(e)));return{hasPermission:t&&i,loading:!1}},restrictedRoute=(n,e,t)=>l=>{let u=(0,o.useRouter)(),m=useRequiredPermission(e),v=(0,c.T)(),C=(0,d.U)(),x=m.loading||v.isLoading||C.loading,f=!!t&&!!t.requiresMemberManagement&&!C.isActive;return(r.useEffect(()=>{x||m.hasPermission&&!f||v.isAuthenticated||!u.isReady||u.replace({pathname:"/login",query:{redirect:u.asPath}})},[x,u,f,v.isAuthenticated,m.hasPermission]),x)?(0,i.jsx)(a.g,{}):!m.hasPermission||f?v.isAuthenticated?(0,i.jsx)(s.A,{}):(0,i.jsx)(a.g,{}):(0,i.jsx)(n,{...l})}},48521:function(){}},function(n){n.O(0,[9669,9041,5206,64986,96317,55643,66854,49774,92888,40179],function(){return n(n.s=44692)}),_N_E=n.O()}]);
2//# sourceMappingURL=userAgreements-eed2e41c6f7cbacb.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.