1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6636],{76920:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/digivi/admin/users",function(){return t(88463)}])},70753:function(e,n,t){"use strict";var i=t(74817),r=t(77273),a=t(79993),o=t(25133),l=t(49213),s=t(36497),c=t(37518),u=t.n(c);n.Z=e=>{let{mediaUrl:n,mediaAlt:t,children:c,sx:d,...x}=e;(0,s.useRouter)();let p=()=>(0,i.jsxs)(i.Fragment,{children:[n&&(0,i.jsx)(r.Z,{component:"img",image:n,alt:t||""}),(0,i.jsx)(a.Z,{children:c})]});return(0,i.jsx)(o.Z,{sx:d,children:x.href?(0,i.jsx)(l.Z,{LinkComponent:u(),...x,children:p()}):p()})}},31075:function(e,n,t){"use strict";var i=t(74817),r=t(45345),a=t(19550),o=t(65191),l=t(37518),s=t.n(l);n.Z=function(e){let{actions:n,table:t,sx:l,direction:c,...u}=e;return(0,i.jsx)(r.Z,{spacing:1,direction:c||{xs:"column",md:"row"},sx:{...t?{border:"1px solid #e0e0e0",borderBlockEnd:"unset",p:2}:{py:2},background:"#FFFFFF",...l||{}},...u,children:n.map((e,n)=>{let t={...e.sxButton,...e.focusStyles&&"object"==typeof e.focusStyles?e.focusStyles:{}};return e.render?(0,i.jsx)(a.Z,{children:e.render()},"action-button-".concat(n)):(0,i.jsx)(o.Z,{LinkComponent:s(),href:"string"==typeof e.onClick?e.onClick:void 0,onClick:"string"!=typeof e.onClick?e.onClick:void 0,variant:"contained",color:e.color,startIcon:e.icon,fullWidth:!0,sx:{textWrap:"nowrap",...t},children:e.label},"action-button-".concat(n))})})}},77906:function(e,n,t){"use strict";var i=t(74817),r=t(2808),a=t(19550),o=t(65191),l=t(21225),s=t(30578),c=t(45345),u=t(63829),d=t(31075),x=t(64124),p=t(67833),h=t(42479),v=t(9363);n.Z=function(e){let{items:n,renderItem:t,actions:g,pagination:m,currentSearch:f,onChangePage:Z,spacing:j,listProps:b,previousButtonContent:y,nextButtonContent:k,buttonsStackProps:S,...C}=e,w=(0,r.Z)(),{t:I}=(0,p.Z)("common"),M=m&&("prev"in m||"next"in m),_=(0,i.jsx)(i.Fragment,{children:m&&("prev"in m||"next"in m)&&(0,i.jsxs)(a.Z,{sx:{mt:2,mb:2,display:"flex",justifyContent:"space-between",marginBottom:2},children:["prev"in m&&Z&&(y?(0,i.jsx)(o.Z,{variant:"contained",onClick:()=>Z(m.prev),"aria-label":I("paging.prev"),sx:{ml:"auto","&:focus, &:hover":{outline:"2px solid currentColor"}},disableRipple:!0,children:y}):(0,i.jsx)(l.Z,{onClick:()=>Z(m.prev),"aria-label":I("paging.prev"),sx:{color:w.palette.primary.main,"&:focus, &:hover":{outline:"2px solid currentColor"}},disableRipple:!0,children:(0,i.jsx)(u.Z,{sx:{fontSize:(0,v.Mr)(44)}})})),"next"in m&&Z&&(k?(0,i.jsx)(o.Z,{variant:"contained",onClick:()=>Z(m.next),"aria-label":I("paging.next"),sx:{ml:"auto","&:focus, &:hover":{outline:"2px solid currentColor"}},disableRipple:!0,children:k}):(0,i.jsx)(l.Z,{onClick:()=>Z(m.next),"aria-label":I("paging.next"),sx:{ml:"auto",color:w.palette.primary.main,"&:focus, &:hover":{outline:"2px solid currentColor"}},disableRipple:!0,children:(0,i.jsx)(h.Z,{sx:{fontSize:(0,v.Mr)(44)}})}))]})});return(0,i.jsxs)(a.Z,{sx:{...M?{}:{mt:8,mb:8}},...C,children:[f&&(0,i.jsx)(s.Z,{variant:"h2",children:I(n&&n.length?"common:entity.action.searchResults":"common:entity.action.noSearchResults",{search:f})}),_,(0,i.jsx)(c.Z,{spacing:j,component:(null==b?void 0:b.component)||"ul",sx:{padding:0,listStyle:"none",...(null==b?void 0:b.sx)||{}},...b||{},children:n.length>0&&n.map((e,n,r)=>(0,i.jsx)("li",{children:t(e,n,r)},"".concat((0,x.zO)(),"-").concat(n)))}),_,g&&(0,i.jsx)(d.Z,{actions:g,...S||{}})]})}},63829:function(e,n,t){"use strict";var i=t(74817),r=t(31231);n.Z=e=>(0,i.jsx)(r.Z,{...e,sx:{...e.sx},width:"24",height:"24",viewBox:"0 0 24 24",children:(0,i.jsx)("path",{id:"arrow-circle-left-solid",d:"M20,32A12,12,0,1,1,32,20,12,12,0,0,1,20,32Zm1.4-6.948-3.653-3.5h8.835a1.159,1.159,0,0,0,1.161-1.161v-.774a1.159,1.159,0,0,0-1.161-1.161H17.745l3.653-3.5a1.163,1.163,0,0,0,.019-1.66l-.532-.527a1.157,1.157,0,0,0-1.64,0l-6.421,6.416a1.157,1.157,0,0,0,0,1.64l6.421,6.421a1.157,1.157,0,0,0,1.64,0l.532-.527A1.163,1.163,0,0,0,21.4,25.052Z",transform:"translate(-8 -8)",fill:"currentColor"})})},42479:function(e,n,t){"use strict";var i=t(74817),r=t(31231);n.Z=e=>(0,i.jsx)(r.Z,{...e,sx:{...e.sx},width:"24",height:"24",viewBox:"0 0 24 24",children:(0,i.jsx)("path",{id:"arrow-circle-left-solid",d:"M20,32A12,12,0,1,0,8,20,12,12,0,0,0,20,32Zm-1.4-6.948,3.653-3.5H13.419a1.159,1.159,0,0,1-1.161-1.161v-.774a1.159,1.159,0,0,1,1.161-1.161h8.835l-3.653-3.5a1.163,1.163,0,0,1-.019-1.66l.532-.527a1.157,1.157,0,0,1,1.64,0l6.421,6.416a1.157,1.157,0,0,1,0,1.64l-6.421,6.421a1.157,1.157,0,0,1-1.64,0l-.532-.527A1.163,1.163,0,0,1,18.6,25.052Z",transform:"translate(-8 -8)",fill:"currentColor"})})},25560:function(e,n,t){"use strict";var i=t(74817),r=t(71248),a=t(44006),o=t(75393),l=t(5069),s=t(9363),c=t(7449);
1n.Z=e=>{let{placeholder:n,placeholderValue:t,items:u,onChange:d,SelectIcon:x,reset:p}=e,[h,v]=(0,r.useState)(t),g=(0,r.useRef)(null),[m,f]=(0,r.useState)(0);(0,r.useEffect)(()=>{f(g.current?g.current.getBoundingClientRect().bottom:0)},[g]),(0,r.useEffect)(()=>{p&&v(t)},[p,t]);let Z={sx:{maxHeight:"100%"},disableScrollLock:!0,PaperProps:{sx:{border:"2px solid ".concat(s.VX.colors.mainPurple),boxShadow:c.Z.shadows[2],top:"".concat(m,"px !important"),"& .MuiList-root":{padding:0},"& .MuiMenuItem-root":{padding:s.VX.padding.big,"&:not(:last-of-type)":{borderBottom:"2px solid ".concat(s.VX.colors.mainPurple)}}}},BackdropProps:{sx:{bgcolor:"transparent"}}};return(0,i.jsxs)(a.Z,{ref:g,value:h,onChange:e=>{let n=e.target.value;v(n),d(n)},MenuProps:Z,"aria-label":n,autoWidth:!0,inputProps:{sx:{display:"flex",alignItems:"center"}},children:[h===t&&(0,i.jsxs)(o.Z,{value:t,sx:{display:"none"},children:[(0,i.jsx)(l.Z,{children:x}),n]}),u.map(e=>{let{value:n,label:t,icon:r}=e;return(0,i.jsxs)(o.Z,{value:n,children:[r&&(0,i.jsx)(l.Z,{children:r}),t]},n)})]})}},93961:function(e,n,t){"use strict";var i=t(74817),r=t(19550),a=t(30578),o=t(88735),l=t.n(o),s=t(71248),c=t(9363);let u=(0,s.forwardRef)((e,n)=>{var t,o;let{imgProps:s,title:u,subTitle:d,children:x,actions:p,centerText:h}=e,v="string"==typeof(null==s?void 0:s.src)?s.src:null==s?void 0:s.src.src,g=!!(null==v?void 0:v.includes("/_next/static/media/"));return(0,i.jsxs)(i.Fragment,{children:[(null==s?void 0:s.src)&&(0,i.jsx)(r.Z,{sx:{overflow:"hidden",position:"relative",marginTop:(0,c.Mr)(10),marginBottom:(0,c.Mr)(20),...null==s?void 0:s.imgStyles},children:g?(0,i.jsx)(l(),{src:null==s?void 0:s.src,alt:null==s?void 0:s.alt,height:null==s?void 0:s.height,width:null==s?void 0:s.width,priority:null!==(t=s.priority)&&void 0!==t&&t}):(0,i.jsx)(l(),{src:null==s?void 0:s.src,alt:null==s?void 0:s.alt,fill:!0,priority:null!==(o=s.priority)&&void 0!==o&&o,style:{objectFit:"cover"}})}),u&&(0,i.jsx)(a.Z,{variant:"h1",ref:n,tabIndex:-1,sx:{mb:(0,c.Mr)(20),textAlign:h?"center":"left",whiteSpace:"pre-line","&:focus-visible":{outline:0}},children:u}),d&&(0,i.jsx)(a.Z,{variant:"h2",component:"p",sx:{textAlign:h?"center":"left"},children:d}),x,p&&(0,i.jsx)(r.Z,{sx:{display:"flex",flexDirection:"column",mt:3,width:"100%"},children:p})]})});u.displayName="DigiViAdminLayout",n.Z=u},69828:function(e,n,t){"use strict";var i=t(57784),r=t(74817);n.Z=(0,i.Z)((0,r.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m5 11h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddCircle")},13603:function(e,n,t){"use strict";var i=t(57784),r=t(74817);n.Z=(0,i.Z)((0,r.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search")},88463:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSG:function(){return k}});var i=t(74817),r=t(9363),a=t(70753),o=t(77906),l=t(25560),s=t(91175),c=t(93961),u=t(91116),d=t(64124),x=t(13603),p=t(69828),h=t(19550),v=t(46521),g=t(44946),m=t(25932),f=t(65191),Z=t(54389),j=t.n(Z),b=t(71248);function y(){let e=(0,b.useRef)(null),[n,t]=(0,b.useState)("name,asc"),{currentPage:s,currentSearch:Z,pageSize:y,handleChangePage:k,handleSearch:S}=(0,d.h0)(),{users:C,usersIsLoading:w,pagination:I}=(0,u.lx)(s,y,n,Z),M=e=>{t(e)};return(0,b.useEffect)(()=>{var n;Z&&e&&(null==e?void 0:e.current)&&(null==e?void 0:null===(n=e.current)||void 0===n?void 0:n.value)!=Z&&(e.current.value=Z)},[Z]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(j(),{children:(0,i.jsx)("title",{children:"DigiVi | Admin"})}),(0,i.jsxs)(c.Z,{title:"Anv\xe4ndare",children:[(0,i.jsxs)(h.Z,{component:"form",onSubmit:n=>{var t;n.preventDefault(),S((null==e?void 0:null===(t=e.current)||void 0===t?void 0:t.value)||"")},sx:{display:"flex",flexWrap:"wrap",justifyContent:"space-between",alignItems:"start",gap:2,mb:2},children:[(0,i.jsxs)(v.Z,{sx:{display:"flex",gap:1},children:[(0,i.jsx)(g.Z,{htmlFor:"user-data-search",sx:{mt:1,mb:.6},children:"S\xf6k anv\xe4ndare eller plats"}),(0,i.jsxs)(h.Z,{sx:{display:"flex",gap:1},children:[(0,i.jsx)(m.Z,{inputRef:e,id:"user-data-search",placeholder:"S\xf6k namn eller plats"}),(0,i.jsx)(f.Z,{type:"submit",variant:"contained",startIcon:(0,i.jsx)(x.Z,{}),sx:{minHeight:"unset",p:"".concat((0,r.Mr)(11.6)," ").concat((0,r.Mr)(25))},children:"S\xf6k"})]})]}),(0,i.jsx)(l.Z,{placeholder:"Namn, A - \xd6",placeholderValue:"name,asc",items:[{value:"name,asc",label:"Namn, A - \xd6"},{value:"name,desc",label:"Namn, \xd6 - A"},{value:"nickname,asc",label:"Smeknamn, A - \xd6"},{value:"nickname,desc",label:"Smeknamn, \xd6 - A"},{value:"city,asc",label:"Stad, A - \xd6"},{value:"city,desc",label:"Stad, \xd6 - A"}],onChange:e=>{M(e)}})]}),!w&&C?(0,i.jsx)(o.Z,{items:C,pagination:I,currentSearch:Z,onChangePage:k,buttonsStackProps:{sx:{position:"sticky",bottom:0,px:2},direction:"column"},actions:[{label:"Ny anv\xe4ndare",onClick:"/digivi/admin/users/create",icon:(0,i.jsx)(p.Z,{}),color:"success"},{label:"Ny registrator",onClick:"/digivi/admin/users/create/registrar",icon:(0,i.jsx)(p.Z,{}),color:"info"}],renderItem:e=>{var n,t;return(0,i.jsxs)(a.Z,{href:e.userDataId?"/digivi/admin/users/".concat(e.userDataId):void 0,sx:{height:"100%",textAlign:"center",textDecoration:e.userDataId?void 0:"line-through"},children:[(0,i.jsxs)(h.Z,{children:[e.name,(null===(n=e.nickname)||void 0===n?void 0:n.trim())&&" (".concat(e.nickname,")")]}),(0,i.jsx)(h.Z,{children:(null===(t=e.city)||void 0===t?void 0:t.trim())&&e.city})]},"user-".concat(e.id))},spacing:2,width:"100%"}):w&&"Laddar anv\xe4ndare..."]})]})}y.getLayout=e=>(0,i.jsx)(s.Z,{backButton:!0,backUrl:"/digivi/admin",children:e}),y.loginRequired=!0,y.allowedRoles=["ROLE_DIGIVI_ADMIN","ROLE_SUPERADMIN"],y.redirectUrl="/digivi";var k=!0;n.default=y},91116:function(e,n,t){"use strict";t.d(n,{L2:function(){return c},U0:function(){return s},kP:function(){return d},lx:function(){return u},u4:function(){return x},wR:function(){return p}});var i=t(58444),r=t(54045),a=t(39994),o=t(64124);let l="/api/digivi-user-data",s=()=>{let{data:e,error:n,isLoading:t}=(0,r.ZP)("".concat(l,"/current"),o._i);return{user:e,userIsLoading:t,userError:n}},c=e=>{let{data:n,error:t,isLoading:i,mutate:a}=(0,r.ZP)(()=>e&&"".concat(l,"/").concat(e),o._i);return{user:n,userIsLoading:i,userError:t,userMutate:a}},u=(e,n,t,i)=>{let{data:a,error:s,isLoading:c,mutate:u}=(0,r.ZP)(()=>i?"".concat(l,"/search/").concat(i,"?page=").concat(e,"&size=").concat(n,"&sort=").concat(t):"".concat(l,"?page=").concat(e,"&size=").concat(n,"&sort=").concat(t),o.l2);return{users:null==a?void 0:a.data,pagination:null==a?void 0:a.pagination,usersIsLoading:c,usersIsError:s,usersMutate:u}},d=()=>{let{trigger:e,isMutating:n,error:t}=(0,i.Z)(l,o.Fy,{onSuccess:()=>(0,r.JG)("".concat(l,"/current"))});return{digiviUserTrigger:e,digiviUserIsMutating:n,digiviUserMutateError:t}},x=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.yJ,t=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,s=arguments.length>4?arguments[4]:void 0,{data:c,error:u,isLoading:d,mutate:x}=(0,r.ZP)(()=>s?i?"".concat(l,"/find/search/").concat(i,"?page=").concat(e,"&size=").concat(n,"&sort=").concat(t):"".concat(l,"/find?page=").concat(e,"&size=").concat(n,"&sort=").concat(t):null,o.l2);return{users:null==c?void 0:c.data,pagination:null==c?void 0:c.pagination,usersIsLoading:d,usersIsError:u,usersMutate:x}},p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.yJ,t=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,s=arguments.length>4?arguments[4]:void 0,{data:c,error:u,isLoading:d,mutate:x}=(0,r.ZP)(()=>s?i?"".concat(l,"/match/search/").concat(i,"?page=").concat(e,"&size=").concat(n,"&sort=").concat(t):"".concat(l,"/match?page=").concat(e,"&size=").concat(n,"&sort=").concat(t):null,o.l2);return{users:null==c?void 0:c.data,pagination:null==c?void 0:c.pagination,usersIsLoading:d,usersIsError:u,usersMutate:x}}}},function(e){e.O(0,[7808,4760,1175,2888,9774,179],function(){return e(e.s=76920)}),_N_E=e.O()}]);
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.