PageSourceSearch

https://app.arrivy.com/dist/gen/customer-portal-users.DDWmlq9U.js

js arrivy.com collected 2026-09-24 18:40:05 UTC 3,456 bytes, 1 lines download raw bytes

1import{r as m,bd as P,be as h,bJ as x,bK as d,j as o,bc as C,x as D,P as N,f_ as O,fX as E,y as I,bN as S}from"./ReactToastify.CBzBkeYa.js";import{H as v}from"./header.BIDifK82.js";import{E as L}from"./map.DcnUoseG.js";import{C as T}from"./container-context.Bquy_l1c.js";import{U as J}from"./users-manager.DrINB7nK.js";import{aY as R}from"./index.zqlVuLiK.js";import"./quote-pdf-generator.CG5v8RMG.js";import"./calendar.Dx3LyFfq.js";import"./react-datepicker.Drt99mtT.js";import"./dropdown-filter-v2.CdDsQ7GO.js";import"./pagination.VzfFKJyS.js";import"./create-user-modal.B0vgeX5m.js";import"./address.DaKdTC5M.js";const q=()=>{const[e,s]=m.useState({loading:!0,profile:{},companyProfile:{},objectData:[],page:1,itemsPerPage:50,filters:"",filtersList:[{id:"SCHEDULER",name:"Scheduler"},{id:"DRIVER",name:"Driver"}]});m.useEffect(()=>{f()},[]);const f=()=>{Promise.all([P(),h(!1,!0)]).then(([t,r])=>{const a=JSON.parse(t),n=JSON.parse(r);p({type:n?.contact_object?.type,contact_company_id:n?.contact_object?.company_id}),s(i=>({...i,companyProfile:a,profile:n,loading:!1}))}).catch(t=>{t.status===0&&s(r=>({...r,internetIssue:!0,loading:!1}))})},c=t=>{I(t.text,t.options)},g={createToastNotification:c,objectType:"shippers",subObjectType:"users"},p=({filters:t=e.filters,page:r=e.page,search:a=e.search,type:n=e.profile?.contact_object?.type,contact_company_id:i=e.profile?.contact_object?.company_id})=>{s(l=>({...l,loadingData:!0,filters:t,search:a,page:r}));const b={page:r,items_per_page:e.itemsPerPage,order_by:"name",order_direction:"ascending",type:n,get_company_info:!0,contact_company_id:i,...a?{search:a}:{},...t?{user_role:t}:{}};x(b).then(l=>{const u=JSON.parse(l);s(_=>({..._,objectData:u,loadingData:!1}))}).catch(l=>{d(l,"loadingData",c,s)})},j=t=>{s(a=>({...a,loadingData:!0}));const r={page:1,items_per_page:50,order_by:"name",order_direction:"ascending",type:e.profile?.contact_object?.type,associated_company_ids:e.profile?.contact_object?.company_id,search:t};S(r).then(a=>{const n=JSON.parse(a);s(i=>({...i,objectData:n,loadingData:!1}))}).catch(a=>{d(a,"loadingData",c,s)})},y=t=>{if(t.length<3){if(t.length===0){p({search:t});return}c({text:"Please enter at least 3 characters to perform search",options:{type:"error",position:"bottom-left",className:"toast-error",autoClose:8e3}});return}j(t)};return o.jsxs(L,{component_name:"customerPortalUsers",children:[o.jsx(R,{errorText:"No Internet Connection Available...",showError:e.internetIssue}),o.jsx(C,{className:"customer-portal hide-intercom"}),o.jsxs(T.Provider,{value:g,children:[o.jsx(D,{className:"toast-container",toastClassName:"toast",progressClassName:"toast-progress",autoClose:1}),e.loading&&o.jsxs("div",{className:"page-loader-wrapper",children:[o.jsx("img",{src:"/images/arrivy-logos/logo.svg",alt:"Arrivy Logo"}),o.jsxs("div",{className:"page-loader",children:["Loading ",o.jsx(N,{color:"#008BF8",size:10})]})]}),!e.loading&&o.jsx(v,{companyProfile:e.companyProfile,profile:e.profile}),o.jsx("main",{id:"main",children:o.jsx(J,{loading:e.loading||e.loadingData,companyProfile:e.companyProfile,createToastNotification:c,objectData:e.objectData,page:e.page,itemsPerPage:e.itemsPerPage,setPage:t=>p({page:t}),getObjectsData:p,onSearch:y,updateObject:E,createObject:O,type:"users",companyID:e.profile?.contact_object?.company_id,userType:e.profile?.contact_object?.type,contactCompanies:e.filtersList,filterTitle:"Role",hideDeleteIcon:!0})})]})]})};export{q 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.