PageSourceSearch

https://homeshow.ai/static/js/54787.d43e4a66.chunk.js

js homeshow.ai collected 2026-10-05 16:13:33 UTC 8,141 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkreact_app=self.webpackChunkreact_app||[]).push([[54787],{54787(e,s,a){a.r(s),a.d(s,{default:()=>j});var r=a(89379),i=a(9950),t=a(17575),n=a(28429),l=a(4359),o=a(27232),d=a(54356),c=a(214),u=a(7285),h=a(44414);const m=function(e){let{show:s,close:a,usercount:r,limit:i,MoveNext:t,PaidPrice:n}=e;return(0,h.jsx)("div",{className:"SubUser-modal-overlay",style:s?{display:"flex"}:{display:"none"},children:(0,h.jsxs)("div",{className:"SubUser-modal",children:[(0,h.jsxs)("div",{className:"SubUser-modal-header",children:[(0,h.jsx)("div",{className:"SubUser-modal-icon",children:(0,h.jsx)("i",{className:"fas fa-user-lock"})}),(0,h.jsx)("h2",{children:"Plan User Limit Reached"}),(0,h.jsx)("p",{className:"SubUser-subtitle",children:"You've used all available slots in your current plan"}),(0,h.jsx)("div",{className:"SubUser-modal-close",onClick:a,children:(0,h.jsx)("i",{className:"fas fa-times"})})]}),(0,h.jsxs)("div",{className:"SubUser-modal-body",children:[(0,h.jsxs)("p",{children:["You have reached your free limit of ",r," users. Adding a new user will cost $",n," per user/month."]}),(0,h.jsxs)("div",{className:"SubUser-user-progress",children:[(0,h.jsxs)("div",{className:"SubUser-progress-info",children:[(0,h.jsxs)("span",{children:[r,"/",i," Users"]}),(0,h.jsx)("span",{children:"100% Used"})]}),(0,h.jsx)("div",{className:"SubUser-progress-bar",children:(0,h.jsx)("div",{className:"SubUser-progress-fill"})})]}),(0,h.jsxs)("div",{className:"SubUser-buttons",children:[(0,h.jsx)("button",{className:"SubUser-cancel-btn SubUser-btn ",onClick:a,children:"Close"}),(0,h.jsx)("button",{className:"SubUser-upgrade-btn SubUser-btn ",onClick:t,children:"Proceed"})]})]})]})})};var b=a(80421),v=a(40777);a(29588);const p={1:"Dashboard",2:"My Listing",3:"Auto Listing",4:"Listing Report",5:"Boost",6:"Orders",7:"Inbox",8:"Request",9:"Tickets",10:"Database Search",11:"Autos Search",12:"Reported List",13:"Settings",14:"Calender",15:"Distribution Partners",16:"My Manufacturers",17:"Retail Dealers",18:"Liquidation Buyers",19:"Distribution Partners",20:"Distribution Partners",21:"Auto Listing Boost",22:"Subscriptions",23:"My Brands",24:"Business Quotes"},x=e=>{try{const s=JSON.parse(e||"[]");return Array.isArray(s)?s.sort((e,s)=>e-s).map(e=>p[e]).filter(Boolean):[]}catch(s){return[]}},g=e=>{var s,a;return null!==e&&void 0!==e&&null!==(s=e.UserDetailsModel)&&void 0!==s&&s.firstName?"".concat(e.UserDetailsModel.firstName).concat(null!==e&&void 0!==e&&null!==(a=e.UserDetailsModel)&&void 0!==a&&a.lastName?" ".concat(e.UserDetailsModel.lastName):""):(null===e||void 0===e?void 0:e.username)||"Unnamed user"};const j=function(){const[e,s]=(0,i.useState)(1),[a,p]=(0,i.useState)([]),j=(0,n.Zp)(),f=JSON.parse(localStorage.getItem("userProfile")),[S,N]=((0,i.useContext)(t.A),(0,i.use
1State)(null)),[U,y]=(0,i.useState)(!1),[C,P]=(0,i.useState)(!1),[k,A]=(0,i.useState)(!1),[M,D]=(0,i.useState)(void 0),[w,L]=(0,i.useState)(!1),R=(0,u.Rs)(),[I,T]=(0,i.useState)({subUsersCount:0,paidSubUsersCount:0,invitedUserCount:0,paidPrice:0}),[B,E]=(0,i.useState)(0);(0,i.useEffect)(()=>{(0,d.J3)();var e;if(null==localStorage.getItem("authenticated"))j("/");else if("seller"==(null===f||void 0===f||null===(e=f.user)||void 0===e?void 0:e.role)){1==localStorage.getItem("checkuserbusiness")&&j("/business-seller-dashboard")}else j("/dashboard")},[]);const O=a=>{y(!0);const i={id:JSON.parse(localStorage.getItem("userProfile")).userDetail.userId,page:1==a?1:e,businessType:1};s(1==a?1:e),l.A.getWithParams("ManageUsers",i).then(e=>{var s;p(e.product.rows),y(!1),E((null===(s=e.Subscription)||void 0===s?void 0:s.user_Invites)||0),T(s=>(0,r.A)((0,r.A)({},s),e.Stats)),N(e.product.count)}).catch(e=>{console.log(e,"errorr===")}).finally(()=>{y(!1)})},$=()=>{j("/create-user")};(0,i.useEffect)(()=>{null==localStorage.getItem("authenticated")?j("/"):O()},[e]);const z=(0,i.useMemo)(()=>[{tone:"neutral",label:"Total Free Users",value:I.subUsersCount||0,icon:(0,h.jsx)("i",{className:"fas fa-users"})},{tone:"success",label:"Paid Users",value:I.paidSubUsersCount||0,icon:(0,h.jsx)("i",{className:"fas fa-user-check"})},{tone:"warning",label:"Available Slots",value:Math.max(B-I.subUsersCount,0),icon:(0,h.jsx)("i",{className:"fas fa-user-plus"})},{tone:"neutral",label:"Plan Limit",value:B||0,icon:(0,h.jsx)("i",{className:"fas fa-layer-group"})}],[I,B]),J=(0,i.useMemo)(()=>[{key:"name",label:"Name",render:e=>(0,h.jsxs)("div",{className:"settings-dashboard-modern-identity",children:[(0,h.jsx)("span",{children:g(e)}),e.subUserType&&(0,h.jsx)("small",{children:e.subUserType})]})},{key:"permissions",label:"Permissions",render:e=>(0,h.jsx)("div",{className:"settings-dashboard-modern-chip-list",children:x(e.Permissions).map(e=>(0,h.jsx)(v.Ex,{variant:"info",children:e},e))})},{key:"listingType",label:"Listing Type",width:"150px",render:e=>(0,h.jsx)(v.Ex,{variant:e.isPaidUser?"success":"neutral",children:e.isPaidUser?"Paid":"Free"})}],[]);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(b.A,{title:"Manage Users",children:[(0,h.jsx)(c.A,{Loading:C}),(0,h.jsxs)("div",{className:"settings-dashboard-modern-header",children:[(0,h.jsxs)("div",{children:[(0,h.jsx)("span",{className:"settings-dashboard-modern-eyebrow",children:"Team access"}),(0,h.jsx)("h1",{children:"Manage Users"}),(0,h.jsx)("p",{children:"Review sub-users, permissions, seat usage, and plan limits from one workspace."})]}),(0,h.jsx)(v.$n,{icon:(0,h.jsx)("i",{className:"fas fa-plus"}),onClick:async e=>{var s,a;const i=null===(s=R.subscription)||void 0===s?void 0:s.business,t=B,n=I.subUsersCount,l=(null===i||void 0===i||null===(a=i.plan)||void 0===a?void 0:a.paidseatPrice)||0;T(e=>(0,r.A)((0,r.A)({},e),{},{paidPrice:l})),n>=t?L(!0):$()},children:"Create User"})]}),(0,h.jsx)(v.MD,{className:"settings-dashboard-modern-stats",children:z.map(e=>(0,h.jsx)(v.hI,(0,r.A)({},e),e.label))}),(0,h.jsx)(v.Es,{title:"Users",description:"Active business users and their permission coverage.",columns:J,rows:a,loading:U,emptyTitle:"No users found",variant:"clean",tableMinWidth:820,actions:e=>(0,h.jsxs)("div",{className:"settings-dashboard-modern-actions",children:[(0,h.jsx)(v.$n,{size:"sm",variant:"secondary",icon:(0,h.jsx)("i",{className:"fas fa-pen"}),onClick:()=>{return s=e.id,void j("/edit-user/".concat(s));var s},children:"Edit"}),(0,h.jsx)(v.$n,{size:"sm",variant:"danger",icon:(0,h.jsx)("i",{className:"fas fa-trash"}),onClick:s=>((e,s)=>{e.preventDefault(),A(!0),D(s)})(s,e.id),children:"Delete"})]})}),(0,h.jsx)(v.dK,{className:"settings-dashboard-modern-pagination",page:e,pageSize:10,total:S||0,onPageChange:e=>{s(e)}})]}),(0,h.jsx)(v.uo,{show:k,onHide:()=>A(!1),title:"Delete user?",description:"This user will lose access to the business dashboard.",confirmLabel:"Delete",cancelLabel:"Close",tone:"danger",loading:C,onConfirm:()=>{return e=M,P(!0),A(!1),void l.A.httpPost("deleteselleruser",{id:e}).then(e=>{o.oR.success("User Deleted Successfully"),P(!1),O(1),D(void 0),R&&R.Refreshdata()}).catch(e=>{D(void 0),o.oR.error("Some error occurred while deleting the User. Check with admin."),P(!1)});var e}}),w&&(0,h.jsx)(m,{show:w,close:()=>{L(!1)},usercount:I.invitedUserCount+I.subUsersCount,limit:B,MoveNext:$,PaidPrice:I.paidPr
1ice})]})}},80421(e,s,a){a.d(s,{A:()=>d});var r=a(9950),i=a(40777),t=a(17575),n=a(18819),l=a(94406),o=(a(29588),a(44414));function d(e){let{title:s,children:a}=e;const d=(0,r.useContext)(t.A),c=(0,l.A)(),[u,h]=(0,r.useState)(!1),m=null!==d&&void 0!==d&&d.Darkmode?"dark":"light";return(0,o.jsx)("div",{"data-ths-ui-theme":m,children:(0,o.jsx)(i.Rd,{className:"ths-ui-scope container dashboard-next-shell settings-dashboard-modern-shell",topbar:(0,o.jsxs)("div",{className:"settings-dashboard-modern-topbar",children:[(0,o.jsx)(i.$n,{variant:"secondary",size:"sm",icon:(0,o.jsx)("i",{className:"fas fa-bars"}),onClick:()=>h(!0),children:"Menu"}),(0,o.jsx)("strong",{children:s})]}),sidebar:(0,o.jsx)(n.A,{roleInfo:c,unreadCount:0,themeContext:d,onNavigate:()=>h(!1)}),sidebarOpen:u,onSidebarClose:()=>h(!1),children:(0,o.jsx)("div",{className:"settings-dashboard-modern-page",children:a})})})}},29588(){}}]);

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.