1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6938],{82565:function(e,s,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin-producer/settings/user-profile",function(){return a(50755)}])},62816:function(e,s,a){"use strict";var r=a(94137),t=a(94534),n=a(68873);s.Z=new class{async getOrganization(e){try{return await (0,n.t)("/organizations/".concat(e),{})}catch(e){console.log(e)}}async updateOrganization(e){try{return await (0,r.A)("/organizations/".concat(e.id),e)}catch(e){console.log(e)}}async getUsersByOrganizationID(e){try{let s=await (0,t.C)("/organizations/".concat(e,"/users?size=12&page=1"));return s.result}catch(e){console.log(e)}}async getMainUser(e){try{let s=await (0,t.C)("/organizations/".concat(e,"/main-user"));return s.result}catch(e){console.log(e)}}}},65751:function(e,s,a){"use strict";var r=a(85893);s.Z=e=>{let{message:s}=e;return(0,r.jsxs)("div",{className:"d-flex align-items-center text-white rounded-2 p-2 my-5",style:{backgroundColor:"#A00000"},children:[(0,r.jsx)("span",{className:"material-icons-outlined mx-3",children:"error"}),(0,r.jsx)("p",{className:"d-inline mb-0",children:s})]})}},50755:function(e,s,a){"use strict";a.r(s);var r=a(85893),t=a(62816),n=a(74658),l=a(50141),i=a(65751),o=a(13557),c=a(12664),d=a(86759),m=a(1327),u=a(52638),f=a(59410),p=a.n(f),x=a(33805),h=a(21300),N=a(1937),_=a(41664),g=a.n(_),j=a(11163),v=a(67294),b=a(9473);s.default=()=>{let[e,s]=(0,v.useState)(!1),[a,f]=(0,v.useState)({email:"",firstName:"",lastName:"",telephone:""}),[_,y]=(0,v.useState)(!0),[w,k]=(0,v.useState)(),[z,E]=(0,v.useState)(null),I=(0,b.v9)(u.tH),H=(0,j.useRouter)(),getUserInfo=async e=>{s(!0);let a=await t.Z.getMainUser(e);if(s(!1),a)return f({email:a.email,firstName:a.firstName,lastName:a.lastname,telephone:a.telephone})},getOrganizationByProducerId=async e=>{let s=await n.Z.getProducerByID(e);s&&(E(s),k(s.organization.id))};return(0,v.useEffect)(()=>{if(!I||!H)return;H.query.producerID&&(0,N.tY)(I.user)&&getOrganizationByProducerId(+H.query.producerID),!H.query.producerID&&I&&I.user&&f({email:I.user.email,firstName:I.user.firstName,lastName:I.user.lastName,telephone:I.user.telephone});let e=(0,h.wz)(I);e&&!e.audit&&y(!1)},[I,H]),(0,v.useEffect)(()=>{w&&getUserInfo(w)},[w]),(0,r.jsx)(x.o,{meta:(0,r.jsx)(m.h,{title:"Lokalmat",description:"Lokalmat"}),children:(0,r.jsx)(l.Z,{children:(0,r.jsxs)(o.Z,{producer:z,children:[(0,r.jsx)(c.Z,{title:"Brukerinnstillinger",content:"Du er registrert med f\xf8lgende opplysninger."}),!_&&(0,r.jsx)(i.Z,{message:"Mangler egenrevisjon: Egenrevisjon er obligatorisk for \xe5 bli synlig i lister og s\xf8k"}),(0,r.jsx)("div",{className:"row my-3",children:(0,r.jsx)("div",{className:"col-12 col-md-6",children:(0,r.jsxs)("div",{className:"form-field mb-4",children:[(0,r.jsx)("label",{htmlFor:"producer_settings_username",className:"form-label",children:"Brukernavn:"}),(0,r.jsx)("input",{id:"producer_settings_username",name:"username",value:a.email,className:"form-control",disabled:!0,type:"text"}),(0,r.jsx)("div",{className:"invalid-feedback ms-3"})]})})}),(0,r.jsx)("div",{className:"row my-3",children:(0,r.jsx)("div",{className:"col-12 col-md-6",children:(0,r.jsxs)("div",{className:"form-field mb-4",children:[(0,r.jsx)("label",{htmlFor:"producer_settings_first_name",className:"form-label",children:"Fornavn:"}),(0,r.jsx)("input",{id:"producer_settings_first_name",name:"firstName",value:a.firstName,className:"form-control",disabled:!0,type:"text"}),(0,r.jsx)("div",{className:"invalid-feedback ms-3"})]})})}),(0,r.jsx)("div",{className:"row my-3",children:(0,r.jsx)("div",{className:"col-12 col-md-6",children:(0,r.jsxs)("div",{className:"form-field mb-4",children:[(0,r.jsx)("label",{htmlFor:"producer_settings_last_name",className:"form-label",children:"Etternavn:"}),(0,r.jsx)("input",{id:"producer_settings_last_name",name:"surName",value:a.lastName,className:"form-control",disabled:!0,type:"text"}),(0,r.jsx)("div",{className:"invalid-feedback ms-3"})]})})}),(0,r.jsx)("div",{className:"row my-3",children:(0,r.jsx)("div",{className:"col-12 col-md-6",children:(0,r.jsxs)("div",{className:"form-field mb-4",children:[(0,r.jsx)("label",{htmlFor:"producer_settings_telephone",className:"form-label",children:"Telefon:"}),(0,r.jsx)("input",{id:"producer_settings_telephone",name:"telephone",value:a.telephone,className:"form-control",disabled:!0,type:"text"}),(0,r.jsx)("div",{className:"invalid-feedback ms-3"})]})})}),(0,r.jsx)("div",{className:"row my-3",children:(0,r.jsx)("div",{className:"col-12 col-md-6",children:(0,r.jsxs)("div",{className:"form-field mb-4",children:[(0,r.jsx)("label",{htmlFor:"producer_settings_email",className:"form-label",children:"E-post:"}),(0,r.jsx)("input",{id:"producer_settings_email",name:"ePost",value:a.email,className:"form-control",disabled:!0,type:"text"}),(0,r.jsx)("div",{className:"invalid-feedback ms-3"})]})})}),(0,r.jsx)("div",{className:"row my-3",children:(0,r.jsx)("div",{className:"col-12 col-md-6 d-flex align-items-center justify-content-center justify-content-md-start",children:(0,r.jsx)(g(),{href:"/endrepassord",className:"btn btn-outline-primary fw-bold",style:{padding:"6px 16px"},children:"Endre passord"})})}),(0,r.jsx)(d.Z,{open:e,setHide:()=>s(!1)}),(0,r.jsx)("div",{className:"d-none row justify-content-center align-items-center",children:(0,r.jsx)("div",{className:"col-md-12 text-center py-3 my-4",children:(0,r.jsx)(g(),{href:"/admin-producer/settings/user-overview".concat(H.query.producerID?"?producerID=".concat(H.query.producerID):""),className:p().btn,children:"Neste side"})})})]})})})}},59410:function(e){e.exports={round:"Home_round__T0vZO",arrow:"Home_arrow__kjkp2",bounceAlpha:"Home_bounceAlpha__PDosE",btn:"Home_btn__yWW1G",mobile:"Home_mobile__KfrY_",desktop:"Home_desktop__YQKpu",btnHeader:"Home_btnHeader__cAhZ0"}}},function(e){e.O(0,[2632,2962,3185,3061,3752,1964,9378,73,3e3,9774,2888,179],function(){return e(e.s=82565)}),_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.