PageSourceSearch

https://login.commonsku.com/dist/react/components-CompanyRouter.6e16bd90.chunk.js

js commonsku.com collected 2026-09-24 17:48:55 UTC 7,461 bytes, 2 lines download raw bytes

1"use strict";(globalThis.__LOADABLE_LOADED_CHUNKS__=globalThis.__LOADABLE_LOADED_CHUNKS__||[]).push([[6082],{82507(e,i,n){n.r(i),n.d(i,{default:()=>A});var o=n(41594),t=n.n(o),r=n(47203),a=n(42732),s=n(98483),l=n(26926),d=n(24784),p=n(51904),c=n(2596),h=n(28420),m=n(39913),x=n(36375),y=n(22224),g=n(22078),u=n(63988);class f extends o.Component{renderSocialBadge(e,i){return!e||e.match(/^.*\/none|none|/)[0]?null:(0,u.jsx)("span",{"data-test-name":"CompanyPage.renderSocialBadge",children:(0,u.jsx)("a",{target:"_blank",href:e,title:e,children:(0,u.jsx)("img",{className:"social-icon",src:i})})})}renderHeader(){const{company:e}=this.props,i=(0,y.get)(e,"default_company_user")||{},{avatar:n,contact_facebook:o,contact_twitter:t,contact_linkedin:r,contact_skype:a}=i,s=e.brand_name||e.company_name,{background_image:l,background_image_position:d}=e,p={backgroundImage:l?`url('${(0,g.Lo)(l)}')`:"url(../../images/backgrounds/commonsku-patterns-geometric.png)",backgroundPosition:`0 ${d||0}px`,backgroundSize:"100%",position:"relative",height:"294px",padding:"30px 30px 64px 30px",marginLeft:0};return(0,u.jsxs)("div",{"data-test-name":"CompanyPage.renderHeader",className:"row small-12 columns",style:p,children:[(0,u.jsx)("div",{style:{position:"relative",float:"left",display:"block",marginRight:"30px",width:"200px",height:"200px",overflow:"hidden",borderRadius:"5px",boxShadow:"0 0 8px rgba(0, 0, 0, 0.4)",textAlign:"center"},children:n?(0,u.jsx)("img",{src:(0,g.Lo)(n.large),style:{position:"relative",top:"50%",transform:"translateY(-50%)"},alt:""}):"SUPPLIER"===e.company_type?(0,u.jsx)("img",{src:"../../images/icons/supplier-home-icon.svg",alt:""}):null}),(0,u.jsx)("h1",{style:{fontSize:"36px",lineHeight:"42px",color:"#fff",textShadow:"1px 1px rgba(0,0,0,.5), 0 0 6px rgba(0,0,0,.6)",fontFamily:"museo-slab, sans-serif"},children:s}),this.renderSocialBadge(o,"/images/icons/facebook.png"),this.renderSocialBadge(t,"/images/icons/twitter.png"),this.renderSocialBadge(r,"/images/icons/linkedin.png"),this.renderSocialBadge(a,"/images/icons/skype.png")]})}renderNav(){const{company:{company_type:e}}=this.props;return(0,u.jsx)("div",{"data-test-name":"CompanyPage.renderNav",className:"row small-12 columns",style:{position:"relative",marginTop:"-34px",zIndex:2,borderTop:0,background:"rgba(0,0,0,.25)",borderBottom:"1px solid #eaeaea",borderWidth:"1px 0",height:"34px",padding:"0",marginLeft:0},children:"SUPPLIER"===e?this.renderSupplierNav():this.renderDistributorNav()})}renderSupplierNav(){const{page:e}=this.props,i={float:"left"},n={color:"#fff",textShadow:"1px 1px rgba(0,0,0,.5)",display:"inline-block",textDecoration:"none",whiteSpace:"nowrap",padding:"5px",fontSize:"14px"},o={color:"#fff",textShadow:"none",display:"inline-block",textDecoration:"none",whiteSpace:"nowrap",padding:"5px",fontSize:"14px",fontWeight:700,borderBottom:"3px solid #5ba0b4"},{company:t,identity:r}=this.props;return(0,u.jsxs)("ul",{"data-test-name":"CompanyPage.renderSupplierNav",style:{listStyleType:"none"},children:[(0,u.jsx)("li",{style:i,children:(0,u.jsx)("a",{style:"profile"===e?o:n,href:`/vendor.php?id=${t.company_id}&division_id=${t.division_id}`,children:"Profile"})}),(0,u.jsx)("li",{style:i,children:(0,u.jsx)("a",{style:"products"===e?o:n,href:`/vendor_products.php?id=${t.company_id}&division_id=${t.division_id}`,children:"Products"})}),(0,u.jsx)("li",{style:i,children:(0,u.jsx)("a",{style:o,href:`/vendor_collections.php?id=${t.company_id}&division_id=${t.division_id}`,children:"Collections"})}),r.capabilities.includes("MODIFY-NETWORK-INFO")?(0,u.jsx)("li",{style:i,children:(0,u.jsx)("a",{style:n,href:`/vendor_information.php?id=${t.company_id}&division_id=${t.division_id}`,children:"Information"})}):null]})}renderDistributorNav(){const{page:e}=this.props,i={float:"left"},n={color:"#fff",textShadow:"1px 1px rgba(0,0,0,.5)",display:"inline-block",textDecoration:"none",whiteSpace:"nowrap",padding:"5px",fontSize:"14px"},o={color:"#fff",textShadow:"none",display:"inline-block",textDecoration:"none",whiteSpace:"nowrap",padding:"5px",fontSize:"14px",fontWeight:700,borderBottom:"3px solid #5ba0b4"},{company:t,identity:r}=this.props,a=e=>r.capabilities.includes(e);return(0,u.jsxs)("ul",{"data-test-name":"CompanyPage.renderDistributorNav",style:{listStyleType:"none"},children:[(0,u.jsx)("li",{style:i,children:(0,u.jsx)("a",{style:"profile"===e?o:n,href:`/distributor.php?id=${t.company_id}`,children:"Profile"})}),a("MODIFY-NETWORK-INFO")?(0,u.jsx)("li",{style:i,children:(0,u.jsx)("a",{style:"information"===e?o:n,href:`/distributor_information.php?id=${t.company_id}`,children:"Information"})}):null,a("MODIFY-NETWORK-INFO")?(0,u.jsx)("li",{style:i,children:(0,u.jsx)("a",{style:"contacts"===e?o:n,href:`/distributor_contacts.php?id=${t.company_id}`,children:"Contact"})}):null,a("MODIFY-NETWORK-INFO")?(0,u.jsx)("li",{style:i,children:(0,u.jsx)("a",{style:"billing"===e?o:n,href:`/distributor_billing.php?id=${t.company_id}`,children:"Billing"})}):null,a("FEATURE-CRM")&&a("COMPANY-TYPE-SUPPLIER")?[0==r.association?(0,u.jsx)("li",{style:i,children:(0,u.jsx)("a",{style:"jobs"===e?o:n,href:`/distributor_jobs.php?id=${t.company_id}`,children:"Jobs"})},"jobs"):null,(0,u.jsx)("li",{style:i,children:(0,u.jsx)("a",{style:"library"===e?o:n,href:`/distributor_library.php?id=${t.company_id}`,children:"Library"})},"library")]:null,a("COMPANY-TYPE-SUPPLIER")?(0,u.jsx)("li",{style:i,children:(0,u.jsx)("a",{style:"collections"===e?o:n,href:`/distributor_collections.php?id=${t.company_id}`,children:"Collections"})}):null]})}render(){const{children:e}=this.props,i=t().cloneElement(e,{style:{marginLeft:0}});return(0,u.jsxs)("div",{"data-test-name":"CompanyPage.render",children:[this.renderHeader(),this.renderNav(),i]})}}const b=f;var _=n(25490);const j=(0,s.Ng)(null,e=>({onAddCollection:()=>Promise.resolve(e((0,m.AD)("Creating Collection..."))).then(()=>e((0,x.Kc)()))}
1))(e=>{let{company:i,identity:n,onAddCollection:o}=e;return(0,u.jsxs)("div",{className:"main-content full-width",children:[(0,u.jsx)(b,{company:i,identity:n,page:"collections",children:(0,u.jsx)(_.A,{company_id:i.company_id,division_id:i.division_id})}),i.company_id===n.company_id&&n.capabilities.includes("CREATE-COLLECTION")?(0,u.jsx)("div",{style:{position:"fixed",bottom:0,left:0,width:"100%",backgroundColor:"#666",zIndex:200},children:(0,u.jsx)("a",{className:"button",style:{float:"right",margin:"0.5rem"},onClick:e=>o(),children:"Create Collection"})}):null]})});class v extends o.Component{render(){const{popups:e,company:i,identity:n}=this.props;return(0,u.jsxs)(c.A,{"data-test-name":"CompanyApp.render",children:[(0,u.jsx)(d.A,{}),(0,u.jsx)(p.A,{popups:e,children:(0,u.jsx)(j,{company:i,identity:n})}),(0,u.jsx)(h.A,{popups:e})]})}}const S=(0,s.Ng)((e,i)=>{var n;return{identity:e.identity,company:(0,l.C1)(e,{company_id:null===(n=i.params)||void 0===n?void 0:n.id}),popups:(0,l.ag)(e)}})(v);var C=n(20652);const N=t().memo(e=>{let{panel:i}=e;const n=(0,r.g)(),o=(0,r.zy)(),t=(0,g.vA)({location:o});return i?(0,u.jsx)(S,{panel:i,params:{...n,...t},location:o}):(0,u.jsx)(C.A,{location:o})}),A=e=>{let{location:i}=e;return(0,u.jsx)(a.Kd,{basename:i,children:(0,u.jsxs)(r.BV,{children:[(0,u.jsx)(r.qh,{path:"/vendor_collections.php",element:(0,u.jsx)(N,{panel:"collections"}),ErrorBoundary:c.A}),(0,u.jsx)(r.qh,{path:"*",element:(0,u.jsx)(N,{noMatch:!0}),ErrorBoundary:c.A})]})})}}}]);
2//# sourceMappingURL=components-CompanyRouter.6e16bd90.chunk.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.