PageSourceSearch

https://app.paperlessparts.com/app/v33.129.1-8e1e372/different_organization_page.chunk.06d611f2.js

js paperlessparts.com collected 2026-10-03 20:35:45 UTC 3,510 bytes, 3 lines download raw bytes

1/*! For license information please see different_organization_page.chunk.06d611f2.js.LICENSE.txt */
2"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9490],{862788:(e,r,s)=>{s.r(r),s.d(r,{default:()=>y});var n=s(63696),o=s(497602),t=s(242164),i=s(951945),a=s(704290),c=s(562540);const u=({isLoading:e,onChangeGroup:r,nextBusinessGroupName:s})=>{const a=(0,o.useSelector)(i.getBusinessName),u=(0,n.useRef)(),{isOpen:l,onOpen:d,onClose:p}=(0,t.useDisclosure)();return(0,c.jsxs)(t.Box,{alignItems:"center",borderColor:"separator.border",borderRadius:"lg",borderStyle:"solid",borderWidth:"1px",display:"flex",flexDirection:"column",width:"544px",padding:3,children:[(0,c.jsx)(t.UsersIcon,{size:7,color:"feature.secondary"}),(0,c.jsx)(t.Text,{fontWeight:"heavy",size:"xl",mt:2,children:"Different organization"}),e?(0,c.jsx)(t.Spinner,{size:"lg"}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(t.Text,{textAlign:"center",mt:2,children:["The link that you followed is for ",(0,c.jsx)("b",{children:s}),", but you are currently active in ",(0,c.jsx)("b",{children:a}),"."]}),(0,c.jsxs)(t.Text,{textAlign:"center",mt:2,children:["To view this page,"," ",(0,c.jsxs)(t.Popover,{initialFocusRef:u,isOpen:l,onClose:p,children:[(0,c.jsx)(t.PopoverTrigger,{children:(0,c.jsxs)(t.Button,{variant:"link",size:"md",onClick:d,children:["switch to ",s,"."]})}),(0,c.jsx)(t.Portal,{children:(0,c.jsxs)(t.PopoverContent,{children:[(0,c.jsx)(t.PopoverHeader,{children:"Change active organization?"}),(0,c.jsx)(t.PopoverBody,{children:"Changing your active organization will affect all tabs in your browser."}),(0,c.jsx)(t.PopoverFooter,{children:(0,c.jsxs)(t.PopoverButtonGroup,{children:[(0,c.jsx)(t.Button,{variant:"secondary",mr:"1",onClick:p,children:"cancel"}),(0,c.jsx)(t.Button,{variant:"primary",ref:u,onClick:()=>{r(),p()},children:"confirm"})]})})]})})]})]})]})]})};var l=s(557384),d=s(149519),p=s(264500),h=s(174804);const x=()=>{const{search:e}=(0,d.zy)();return(0,n.useMemo)((()=>new URLSearchParams(e).get(h.VN)),[e])},g=()=>{const e=(0,o.useSelector)(p.getHomePage);l.A.parse(window.location.search);const r=l.A.parse(window.location.search)?.[h._Z];return("string"==typeof r?r:null)||e},f=()=>{const e=(0,d.W6)(),r=g();return()=>e.push(r)},j=()=>{const e=(0,o.useDispatch)(),r=f(),s=(0,o.useSelector)(i.getGroupMemberId),t=(0,o.useSelector)(i.getAvailableGroupMembers),l=g(),d=x(),p=t.find((e=>e.group.locator===d));return(0,n.useEffect)((()=>{p&&p.id!==s||r()}),[s,p,r]),(0,c.jsx)(u,{isLoading:!1,nextBusinessGroupName:p?.group?.businessName,onChangeGroup:()=>{e(a._e.request({groupMemberId:p.id,nextUrl:l}))}})};var m=s(821943),b=s(636710);const v=()=>{const e=(0,o.useDispatch)(),r=(0,o.useSelector)(i.getGroupPrimaryKey),s=(0,o.useSelector)(i.getIsSuperuser),t=x(),l=g(),d=f(),{isLoading:p,isError:h,isFetched:j,data:v}=(0,m.I)(["super-user-list"],(async()=>await b.A.getUserGroups({search:t})),{enabled:!!t}),y=v?.results?.find((e=>e.locator===t));return(0,n.useEffect)((()=>{(j&&!y||h)&&d()}),[j,y,d,h]),(0,n.useEffect)((()=>{j&&y?.id===r&&d()}),[j,y,r,d]),s||d(),(0,c.jsx)(u,{isLoading:p,nextBusinessGroupName:y?.businessName,onChangeGroup:()=>{e(a.tz.request({userGroupId:y.id,nextUrl:l}))}})},y=()=>{const e=(0,o.useSelector)(i.getIsSuperuser),r=x(),s=f();return(0,n.useEffect)((()=>{r||s()}),[r,s]),(0,c.jsx)(t.Box,{display:"flex",justifyContent:"center",mt:"200px",w:"100%",children:e?(0,c.jsx)(v,{}):(0,c.jsx)(j,{})})}}}]);
3//# sourceMappingURL=different_organization_page.chunk.06d611f2.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.