"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8398],{29177:function(e,t,n){n.d(t,{Cy:function(){return l},Gy:function(){return a},WF:function(){return i}});var r=n(89290),a=function(e){if(!e)return"";try{l=JSON.parse(e)}catch(e){}if(!l)return e;var t="",n=!0,a=!1,i=void 0;try{for(var l,u,o=Object.entries(l)[Symbol.iterator]();!(n=(u=o.next()).done);n=!0){var s=(0,r._)(u.value,2),c=s[0],f=s[1];f&&c&&(t+=f+", ")}}catch(e){a=!0,i=e}finally{try{n||null==o.return||o.return()}finally{if(a)throw i}}return t},i=function(e){if(!e)return"";try{l=JSON.parse(e)}catch(e){}if(!l)return e;var t="",n=!0,a=!1,i=void 0;try{for(var l,u,o=Object.entries(l)[Symbol.iterator]();!(n=(u=o.next()).done);n=!0){var s=(0,r._)(u.value,2),c=s[0],f=s[1];f&&c&&(t+="".concat(c,": ").concat(f,"\n"))}}catch(e){a=!0,i=e}finally{try{n||null==o.return||o.return()}finally{if(a)throw i}}return t},l=function(e){var t,n;if(e){try{n=JSON.parse(e)}catch(e){}n||(t=e),n&&"object"!=typeof n&&(t=n,n=void 0)}return{addressString:t,addressJson:n}}},78398:function(e,t,n){n.r(t),n.d(t,{default:function(){return b}});var r=n(81862),a=n(85333),i=n(6692),l=n(89290),u=n(8226),o=n(5163),s=n(52322),c=n(63756),f=n(98317),p=n(2784),y=n(1441),d=n(90379),m=n(29177),v=n(74531);function b(){var e,t=(0,f.getGraphQLClient)(),n=(0,l._)((0,p.useState)([]),2),b=n[0],h=n[1],g=(e=(0,r._)(function(){var e,t;return(0,o.__generator)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,(0,f.getGraphQLClient)().getRoles({pagedParams:{pageSize:1e3}})];case 1:return h(null!==(t=null==(e=n.sent())?void 0:e.elements)&&void 0!==t?t:[]),[3,3];case 2:return console.error(n.sent()),[3,3];case 3:return[2]}})}),function(){return e.apply(this,arguments)});return(0,p.useEffect)(function(){g()},[]),(0,s.jsx)(y.Z,{entityCategory:c.EDBEntity.User,entityListRoute:d.sG.route,entityBaseRoute:d.Uu.baseRoute,listLabel:"Users",entityLabel:"User",nameProperty:"fullName",getMany:t.getUsers,deleteOne:t.deleteUser,deleteMany:t.deleteManyUsers,columns:[{name:"avatar",label:"Avatar",type:"Image",visible:!0,getValueView:function(e){return(0,s.jsx)("div",{style:{height:"40px",width:"40px",borderRadius:"100%",backgroundPosition:"center",backgroundSize:"cover",backgroundImage:"url(".concat(e,")")}})}},{name:"fullName",label:"Name",type:"Simple text",visible:!0},{name:"email",label:"Email",type:"Simple text",visible:!0},{name:"roles",label:"Role",type:"Simple text",exactSearch:!0,customGraphQlFragment:"roles {\n id\n name\n title\n }\n",getValueView:function(e){return null==e?void 0:e.map(function(e){return e.title}).join(", ")},getTooltipValueView:function(e){return null==e?void 0:e.map(function(e){return e.title}).join(", ")},searchOptions:b.map(function(e){return{value:e.name,label:e.title}}),applyFilter:function(e,t){return t.roles=[e].filter(Boolean),t},visible:!0}].concat((0,u._)(v.xz.map(function(e){return"createDate"===e.name?(0,i._)((0,a._)({},e),{visible:!0}):(0,i._)((0,a._)({},e),{visible:!1})})),[{name:"phone",label:"Phone",type:"Simple text",visible:!1},{name:"address",label:"Address",type:"Simple text",visible:!1,getValueView:m.Gy,getTooltipValueView:m.WF}])})}}}]);