1"use strict";(()=>{(globalThis.__LOADABLE_LOADED_CHUNKS__=globalThis.__LOADABLE_LOADED_CHUNKS__||[]).push([[796],{77862:(K,C,t)=>{t.d(C,{o:()=>u});var s=t(74848),l=t(41421),h=t(64801),v=t(77267);const u=({title:U,remoteRecord:c,className:g})=>{var x;const P=Array.isArray(c)?c:[c],R=P.some(A=>A.hasServerError),D=((x=P.find(A=>!!A.error))==null?void 0:x.error)||null;return(0,s.jsx)(v.d,{title:U,className:g,children:R?(0,s.jsx)(h.y,{error:D}):(0,s.jsx)(l.d,{error:D})})}},77267:(K,C,t)=>{t.d(C,{d:()=>u});var s=t(74848),l=t(46942),h=t.n(l),v=t(67785);const u=({title:U,children:c,className:g})=>(0,s.jsx)(v.CardBox,{title:U,titleSize:v.CARD_BOX_TITLE_SIZE.large,className:h()(g,"BoxPlaceholder"),children:c})},72096:(K,C,t)=>{t.r(C),t.d(C,{ListPage:()=>F,ListPageContainer:()=>F,default:()=>_});var s=t(74848),l=t(96540),h=t(24180),v=t(57246),u=t(89351),U=t(77862),c=t(81661),g=t(45671),x=t(16284),P=t(86404),R=t(34930),D=t(87957),A=t(79429),$=t(22614),d=t(71454),Q=t(63443),V=t(57649),S=t(9093),y=t(17973),G=t(34168),J=t(57041),W=t(39773),Y=t(52470),p=t(25419),b=t(67785),w=t(93153),k=t(50479);const q=({backButtonUrl:B,data:m,page:j,onPageChange:i,id:o,description:T,onAdd:E,onEdit:I,onRemove:n})=>{var L;const e=(0,u.W)(),{costCenter:a,total:f,data:M,pageSize:N}=m,z=(L=m==null?void 0:m.costCenter)==null?void 0:L.userRoleInCostCenter,O=(0,w.N)(z,e);return(0,s.jsxs)("div",{className:"UsersListPage",children:[(0,s.jsx)(W.o,{className:"MyAccount-BackButton--TopSide",url:B,children:e("Back to cost center overview")}),(0,s.jsxs)(Y.t,{title:`${O} - ${o}`,titleQuantity:f,titleSize:b.CARD_BOX_TITLE_SIZE.large,actionButton:{customComponent:(0,s.jsx)(k.l,{handleAddUserClick:E,canCreateUser:!!(a!=null&&a.canCreateUser)})},children:[T?(0,s.jsx)("div",{className:"UsersListPage-Description",children:e("Additional users can be added here to access the registered customer number. Different authorization levels are available. Each user has their own shopping cart and their own shareable shopping lists.")}):null,(0,s.jsx)(p.L,{users:M,costCenter:a,onEdit:I,onRemove:n})]}),(0,s.jsx)(J.d,{className:"MyAccount-Pagination",total:Math.ceil(f/N),page:j,onPageChange:i,areButtonsVisible:M.length>0}),(0,s.jsx)(W.o,{className:"MyAccount-BackButton--BottomSide",url:B,children:e("Back to cost center overview")})]})},F=()=>{var B,m,j;const i=(0,u.W)(),{costCenterId:o,page:T}=(0,h.g)(),E=(0,Q.x)(),I=(0,P.m)(),n=(0,R.e)(o),L=(0,D._)(),e=(0,A.w)(),a=(0,V.Z)(),f=(0,$.t)(),M=r=>{f({costCenterId:o,userId:r})},N=a(d.bw.myAccount),z=a(d.bw.myAccountCostCenters,{page:1}),O=a(d.bw.myAccountCostCenter,{costCenterId:decodeURI(o)}),tt=()=>{var r;if((r=e.data)==null?void 0:r.costCenter.canCreateUser){const X=a(d.bw.myAccountCostCentersUsersCreate,{costCenterId:o});(0,S.Fe)(X,E)}},st=r=>{var H;if((H=e.data)==null?void 0:H.costCenter.canCreateUser){const nt=r?a(d.bw.myAccountCostCentersUsersUpdate,{costCenterId:o,userId:r}):a(d.bw.myAccountCostCentersUsersCreate,{costCenterId:o});(0,S.Fe)(nt,E)}},Z=parseInt(T,10)||1,et=r=>{(0,S.Fe)(a(d.bw.myAccountCostCenterUsers,{costCenterId:o,page:r}),E)};(0,v.i)([{title:i("My account"),url:N},{title:i("Cost Centers"),url:z},{title:((B=n==null?void 0:n.data)==null?void 0:B.label)||"...",url:O},{title:i("Manage Users")}]),(0,l.useEffect)(()=>(y.A.on(y.l.removeCostCenterUserFulfilled,()=>{L({costCenterId:o,page:1,pageSize:x.O})}),()=>{y.A.off(y.l.removeCostCenterUserFulfilled)}),[]),(0,l.useEffect)(()=>{I(o)},[o]),(0,l.useEffect)(()=>{L({costCenterId:o,page:Z,pageSize:x.O})},[T]);const ot=(0,s.jsxs)("div",{className:"cds-CardBox",children:[(0,s.jsx)("div",{className:"cds-CardBox-Title",children:(0,s.jsx)("h2",{className:"cds-CardBox-TitleHeading cds-CardBox-TitleHeading--Large CostCentersListPage-Heading",children:i("Users")})}),(0,s.jsx)(G.m,{})]});return(0,s.jsxs)(c.E,{active:g.T2.costCenters,children:[(e.isLoading||n.isLoading)&&ot,e.isLoaded&&n.isLoaded&&!e.hasFailed&&!n.hasFailed&&e.data&&(0,s.jsx)(q,{backButtonUrl:O,data:e.data,page:Z,onPageChange:et,id:((m=n==null?void 0:n.data)==null?void 0:m.label)||"",description:((j=n==null?void 0:n.data)==null?void 0:j.description)||null,onAdd:tt,onEdit:st,onRemove:M}),(e.hasFailed||n.hasFailed)&&(0,s.jsx)(U.o,{title:i("Manage Users"),remoteRecord:e})]})},_=F}}]);})(); 2 3//# sourceMappingURL=users.2da55c81.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.