PageSourceSearch

https://get.checkfront.com/lib/vite/InternalTools-c972f11c.js

js checkfront.com collected 2026-10-02 02:16:57 UTC 8,663 bytes, 1 lines download raw bytes

1import{e as U,j as e,c as m,F as v,P as t}from"./componentLoader.jsx-2026.10.01-3d77ab87.js";import{r as g}from"./logger-3e1e3eff.js";import{B as k}from"./Banner-1832e2d9.js";import{G as i}from"./Grid-95575dae.js";import{P as I,a as G}from"./Page-6cd9626c.js";import{a as S}from"./index-213dd4d3.js";import{C as j}from"./Checkbox-d2bb405c.js";import{E as L}from"./Link-bec2c870.js";import{a as O}from"./staffside.js-2026.10.01-3d77ab87.js";import"./index-e642497c.js";import"./_Uint8Array-4a201bc7.js";import"./_equalByTag-f809a93d.js";import"./index-6a18cc6d.js";import{h as E}from"./helmTabs-d851c60d.js";import{s as H}from"./index-2506ba77.js";import{T}from"./TextField-9054bcd3.js";import{B as C}from"./Button-daed7707.js";import{T as y}from"./Text-db1ebb07.js";import{A as M}from"./Add-563a4607.js";import"./TextStyle-4fbf16a4.js";import{L as z}from"./List-3c9a706f.js";import{L as b}from"./ListItem-aa4e54b4.js";import{C as B}from"./Cross-eb4df075.js";import"./vendor-21ae10b1.js";import"./brand-387037d2.js";import"./universe.js-2026.10.01-3d77ab87.js";import"./eq-9168d086.js";import"./Tabs-521d8288.js";import"./LinkClientside-cbcc64bc.js";import"./localStorage-80b97aa2.js";import"./objectWithoutPropertiesLoose-4f48578a.js";import"./clsx.m-1229b3e0.js";import"./styled-3cf1ada0.js";import"./generateUtilityClasses-3639df65.js";import"./useForkRef-c447dde0.js";import"./isMuiElement-aaa5f8ae.js";import"./isHostComponent-73d6e646.js";import"./ButtonBase-80420884.js";import"./hoist-non-react-statics.cjs-3f8ebaa8.js";import"./assertThisInitialized-081f9914.js";import"./TransitionGroupContext-e097c791.js";import"./useIsFocusVisible-96325d48.js";A.propTypes={csrfToken:t.string,setError:t.func,setSuccess:t.func};function A({csrfToken:a,setError:d,setSuccess:p}){const l=U(),[c,u]=g.useState(l.localhelm);return e(j,{checked:c,label:m(v,{children:["Enable communicating with"," ",e(L,{url:"https://helm.localhost:8443/directory/",className:"margin-left-1",external:!0,children:"local Helm"})]}),onChange:async()=>{const o=!c;u(o);try{const{data:r}
1=await S.post("/helm/tools/",{action:"setLocalhelm",value:o},O(a));r.status==="OK"?p(!0):d(r.message)}catch(r){d("Error: ",r.message)}}})}F.propTypes={auth0Org:t.string,auth0OrgId:t.string,serverForwardingUrl:t.string,csrfToken:t.string,setError:t.func,setSuccess:t.func};function F({auth0Org:a,auth0OrgId:d,serverForwardingUrl:p,csrfToken:l,setError:c,setSuccess:u}){const[o,r]=g.useState(!1),[f,h]=g.useState(a),[s,n]=g.useState(a);return m(v,{children:[m(i.Row,{noGutters:!0,className:"padding-top-3",children:[e(i.Col,{col:"4",children:e(T,{id:"auth0Org",name:"auth0Org",spellCheck:!1,label:"Auth0 Organization Name",placeholder:"org-4246-mar16",value:s,onChange:w=>n(w.toLowerCase()),suffix:e(C,{icon:e(M,{}),onClick:()=>{n("org-4246-"+H.generate(5).toLowerCase())}})})}),e(i.Col,{col:"1",className:"margin-x-2 align-self-end",children:e(C,{primary:!0,disabled:!s||!p||o||s===f,isLoading:o,onClick:async()=>{r(!0),c(""),u(!1);try{const{data:w}=await S.post("/helm/tools/",{action:"saveAuth0Org",auth0Org:s},O(l));w.status==="OK"?u(!0):c(w.message)}catch(w){c("An error occurred while saving auth0Org. Please try again.")}h(s),r(!1)},children:"Change Auth0 Org"})})]}),e(i.Row,{noGutters:!0,children:m(i.Col,{col:"4",className:"display-flex flex-column",children:[s===a?e(L,{url:`https://manage.auth0.com/dashboard/us/dev-5ihxxmjc/organizations/${d}/overview`,children:"View Org in Auth0"}):p?null:e(k,{type:"error",className:"margin-x-0",children:"Set a forwarding url first!"}),e(L,{url:"https://manage.auth0.com/dashboard/us/dev-5ihxxmjc/organizations",children:"View all Orgs"}),e(y,{size:"sm",children:"Changing the Auth0 Org can be useful in testing migrating users into Auth0, and the syncing of settings with Auth0 without modifying the main default test org."})]})})]})}P.propTypes={serverForwardingUrl:t.string,setServerForwardingUrl:t.func,csrfToken:t.string,setError:t.func,setSuccess:t.func};function P({serverForwardingUrl:a,setServerForwardingUrl:d,csrfToken:p,setError:l,setSuccess:c}){const[u,o]=g.useState(!1),[r,f]=g.useState(a);async function h(){o(!0),l(""),c(!1);const n=r.replace(/(https?:\/\/)/,"");if(!await s(n)){o(!1);return}try{const{data:x}=await S.post("/helm/tools/",{action:"saveLocalForwardingUrl",localForwardingUrl:n},O(p));x.status==="OK"?(c(!0),d(n),f(n)):l(x.message)}catch(x){l("An error occurred while saving forwarding URL. Please try again.")}o(!1)}async function s(n){return!n.includes(".ngrok.io")&&!n.includes(".ngrok-free.app")&&!n.includes(".checkfront.com")?(l("Validation Error: Please enter a valid forwarding url!"),!1):!0}return m(v,{children:[e(i.Col,{col:"6",children:e(T,{id:"forwardingUrl",name:"forwardingUrl",spellCheck:!1,label:"Local Forwarding URL",placeholder:"b166-184-66-6-22.ngrok-free.app",helpText:e(N,{forwardingUrl:r}),value:r,onChange:n=>{f(n)},autoFocus:!0})}),e(i.Col,{col:"1",className:"margin-x-2 align-self-end",children:e(C,{primary:!0,disabled:!r||u||a===r,isLoading:u,onClick:()=>{h()},children:"Save Core Forwarding URL"})})]})}N.propTypes={forwardingUrl:t.string};function N({forwardingUrl:a}){return m(v,{children:[m(y,{children:["The Company URL to be used by external services for forwarding requests to local dev (test.checkfront.com). Generate one by running"," ",e("code",{children:"ngrok http 443 --host-header test.checkfront.com"})]}),m(y,{className:"margin-y-4",children:["Example usages:",m(z,{children:[e(b,{children:"- With MyAllocator, this value would be used in conjunction with mapping our test MyAllocator Property ID to Company ID 4246 on gateway (which is done automatically when activating the MyAllocator addon)."}),e(b,{children:"- Setting this URL allows requests from outside your local computer to be made to Booking Manager, allowing the Highlander Widget (/manage/widgets) to work locally."}),e(b,{children:"- Allows webhooks from Square or Stripe to be forwarded to your local instance of booking manager"})]})]}),!a&&e(k,{noMargins:!0,type:"info",className:"margin-y-4",heading:"Note",children:"This value cannot be read from Gateway once set, and will override any existing value."})]})}R.propTypes={csrfToken:t.string,setError:t.func,setSuccess:t.func,serverOverride:t.string,setServerOverride:t.func};function R({csrfToken:a,setError:d,setSuccess:p,serverOverride:l,setServerOverride:c}){const[u,o]=g.useState(!1),[r,f]=g.useState(l);async function h(){if(o(!0),d(""),r)try{await S.get(`${r}/api/status`)}catch(s){d(`Invalid payments override URL: ${r}`),o(!1);return}try{const{data:s}=await S.post("/helm/tools/",{action:"savePaymentsOverride",override:r},O(a));s.status==="OK"&&(p(!0),c(r))}catch(s){d(`An error ${r?"setting":"resetting"} payments override occurred`)}o(!1)}return e(v,{children:m(i.Row,{noGutters:!0,children:[e(i.Col,{col:"8",children:e(T,{id:"override",name:"override",label:"Payments Service Override",placeholder:"http://pay-local.checkfront.com",helpText:m(v,{children:[e(y,{children:"Saving will change the endpoint for payments service locally."}),e(y,{children:"If no value is set, core will use the local payments service."}),e(y,{size:"sm",children:"Note: This has no impact in production."})]}),suffix:e(C,{disabled:!r,icon:e(B,{}),onClick:()=>f("")}),value:r,onChange:s=>
1f(s)})}),e(i.Col,{col:"3",className:"margin-x-3 align-self-end",children:e(C,{primary:!0,disabled:r===l,isLoading:u,onClick:()=>h(),children:"Save Payments Override"})})]})})}V.propTypes={csrfToken:t.string,forwardingUrl:t.string,auth0OrgId:t.string,auth0Org:t.string,paymentsOverride:t.string};function V({csrfToken:a,forwardingUrl:d,auth0OrgId:p,auth0Org:l,paymentsOverride:c}){const u=U(),[o,r]=g.useState(""),[f,h]=g.useState(!1),[s,n]=g.useState(d),[w,x]=g.useState(c);return m(I,{pageHeader:e(G.PageHeader,{title:"Internal Tools",subtitle:"A collection of settings and tools for local development.",tabs:E()}),width:"fluid",children:[o.length||f?e(i.Row,{children:e(i.Col,{col:"7",children:e(k,{dismissible:!0,onDismiss:()=>{r(""),h(!1)},noMargins:!0,type:o?"error":"success",className:"margin-bottom-4",children:o||"Success!"})})}):null,e(i.Row,{noGutters:!0,children:e(P,{serverForwardingUrl:s,setServerForwardingUrl:n,setError:r,setSuccess:h,csrfToken:a})}),u.useAuth0Login&&e(F,{setError:r,setSuccess:h,csrfToken:a,auth0OrgId:p,auth0Org:l,serverForwardingUrl:s}),u.usePaymentServices&&e(i.Row,{noGutters:!0,spacing:"xl",className:"padding-top-3",children:e(R,{setError:r,setSuccess:h,csrfToken:a,serverOverride:w,setServerOverride:x})}),e(i.Row,{noGutters:!0,spacing:"xl",className:"padding-top-3",children:e(A,{setError:r,setSuccess:h,csrfToken:a})})]})}export{V as default};

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.