PageSourceSearch

https://digijag.se/_next/static/chunks/pages/admin/organizations/[id]/edit-802b99714b20839b.js

js digijag.se collected 2026-10-08 06:05:11 UTC 8,535 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[66],{67820:function(r,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/organizations/[id]/edit",function(){return n(19392)}])},72025:function(r,e,n){"use strict";var i=n(74817),t=n(81154),o=n(25133),a=n(79993),s=n(67833),d=n(83201),l=n(71248);e.Z=function(r){let{instance:e,trigger:n,tKey:c,successMsgKey:u,successRedirect:g,formFields:m,formSchema:p}=r,{t:Z}=(0,s.Z)(c),f=(0,d.useRouter)(),[v,x]=(0,l.useState)(),[z,j]=(0,l.useState)(),h=async(r,i,t)=>{x(void 0);try{await n({...e,...r}),x(Z("".concat(c,":").concat(u))),j("success"),g&&f.push(g)}catch(r){var o,a;x(Z("error:".concat((null===(a=r.response)||void 0===a?void 0:null===(o=a.data)||void 0===o?void 0:o.message)||r.message||"error.internalServerError"))),j("error")}};return(0,i.jsx)(o.Z,{children:(0,i.jsx)(a.Z,{sx:{padding:"2rem 1rem !important"},children:(0,i.jsx)(t.ZP,{instance:e,fields:m,schema:p,onSubmit:h,alertMessage:v,alertSeverity:z,onAlertClose:()=>x(void 0)})})})}},96515:function(r,e,n){"use strict";var i=n(74817),t=n(19550);e.Z=r=>{var e;return(0,i.jsx)(t.Z,{sx:{width:"3rem",border:2,borderColor:"primary.main",borderRadius:"50%",aspectRatio:"1 / 1",display:"flex",justifyContent:"center",alignItems:"center",...null!==(e=r.sx)&&void 0!==e?e:{}},children:r.children})}},91323:function(r,e,n){"use strict";var i=n(74817),t=n(81952),o=n(19550),a=n(30578),s=n(9363),d=n(83201);e.Z=r=>{let{children:e,controls:n,extraControls:l,title:c,titleIcon:u,mainElStyles:g,sx:m,inline:p,isMaterial:Z}=r;(0,d.usePathname)();let f=(0,i.jsxs)(i.Fragment,{children:[n&&(0,i.jsx)(t.ZP,{item:!0,children:n}),c&&(0,i.jsx)(t.ZP,{item:!0,sx:{...p?{}:{mb:{xs:2,sm:3,md:4,lg:5}},...Z?{}:{display:{xs:"none",md:"unset"}}},children:u?(0,i.jsxs)(o.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"start"},children:[(0,i.jsx)(o.Z,{children:u}),(0,i.jsx)(a.Z,{variant:"h1",ml:1,children:c})]}):(0,i.jsx)(a.Z,{variant:"h1",sx:{"&::first-letter":{textTransform:"uppercase"}},children:c})}),l&&(0,i.jsx)(t.ZP,{item:!0,children:l})]});return(0,i.jsx)(o.Z,{sx:{backgroundImage:"url('/main-background.svg')",backgroundSize:"cover",backgroundRepeat:"no-repeat",height:"100%",padding:"".concat(s.VX.padding.xxxl," ").concat(s.VX.padding.xl),display:"grid",gridTemplateColumns:"100%",flexGrow:1,...m||{}},children:(0,i.jsxs)(t.ZP,{component:"main",container:!0,direction:"column",sx:{height:"100%",...g},children:[p?(0,i.jsx)(t.ZP,{container:!0,item:!0,gap:2,alignItems:"center",mb:2,children:f}):f,(0,i.jsx)(t.ZP,{item:!0,children:e})]})})}},25133:function(r,e,n){"use strict";n.d(e,{Z:function(){return x}});var i=n(51307),t=n(46915),o=n(71248),a=n(72801),s=n(78656),d=n(78366),l=n(98974),c=n(2579),u=n(39298),g=n(59698);function m(r){return(0,g.ZP)("MuiCard",r)}(0,u.Z)("MuiCard",["root"]);var p=n(74817);let Z=["className","raised"],f=r=>{let{classes:e}=r;return(0,s.Z)({root:["root"]},m,e)},v=(0,d.ZP)(c.Z,{name:"MuiCard",slot:"Root",overridesResolver:(r,e)=>e.root})(()=>({overflow:"hidden"}));var x=o.forwardRef(function(r,e){let n=(0,l.i)({props:r,name:"MuiCard"}),{className:o,raised:s=!1}=n,d=(0,t.Z)(n,Z),c=(0,i.Z)({},n,{raised:s}),u=f(c);return(0,p.jsx)(v,(0,i.Z)({className:(0,a.Z)(u.root,o),elevation:s?8:void 0,ref:e,ownerState:c},d))})},79993:function(r,e,n){"use strict";n.d(e,{Z:function(){return v}});var i=n(51307),t=n(46915),o=n(71248),a=n(72801),s=n(78656),d=n(78366),l=n(98974),c=n(39298),u=n(59698);function g(r){return(0,u.ZP)("MuiCardContent",r)}(0,c.Z)("MuiCardContent",["root"]);var m=n(74817);let p=["className","component"],Z=r=>{let{classes:e}=r;return(0,s.Z)({root:["root"]},g,e)},f=(0,d.ZP)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(r,e)=>e.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}}));var v=o.forwardRef(function(r,e){let n=(0,l.i)({props:r,name:"MuiCardContent"}),{className:o,component:s="div"}=n,d=(0,t.Z)(n,p),c=(0,i.Z)({},n,{component:s}),u=Z(c);return(0,m.jsx)(f,(0,i.Z)({as:s,className:(0,a.Z)(u.root,o),ownerState:c,ref:e},d))})},19392:function(r,e,n){"use strict";n.r(e),n.d(e,{__N_SSP:function(){return j}});var i=n(74817),t=n(72025),o=n(37912),a=n(96515),s=n(94720),d=n(91323),l=n(75861),c=n(99058),u=n(46062),g=n(70550),m=n(30578),p=n(67833),Z=n(54389),f=n.n(Z),v=n(36497),x=n(71248);function z(){let{t:r}=(0,p.Z)("organization"),e=(0,v.useRouter)(),[n,g]=(0,x.useState)(),{organization:Z}=(0,u.o8)(n),{organizationTrigger:z}=(0,u.P8)(),j=(0,x.useContext)(l.Vi);return(0,x.useEffect)(()=>{e.isReady&&g(parseInt(e.query.id,10))},[e]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f(),{children:(0,i.jsxs)("title",{children:[r("common:global.title")," | Admin | ",r("common:entity.action.edit")," ",r("digijagApp.organization.detail.title")]})}),(0,i.jsxs)(d.Z,{children:[(0,i.jsxs)(m.Z,{variant:"h1",mb:4,px:3,display:"flex",gap:2,alignItems:"center",children:[(0,i.jsx)(a.Z,{children:(0,i.jsx)(o.Z,{color:"primary"})}),r("common:entity.action.edit")," ",r("digijagApp.organization.detail.title")]}),Z&&j?(0,i.jsx)(t.Z,{instance:Z,trigger:z,tKey:"organization",successMsgKey:"digijagApp.organization.updated",successRedirect:"/admin/organizations",formFields:(0,c.V)(r,j.userAuthorities||[]),formSchema:(0,c.J)(r)}):(0,i.jsx)(s.Z,{})]})]})}z.loginRequired=!0,z.allowedRoles=g.y.organizations.edit;var j=!0;e.default=z},99058:function(r,e,n){"use strict";n.d(e,{J:function(){return a},V:function(){return o}});var i=n(53493),t=n(70550);let o=(r,e)=>({name:r("digijagApp.organization.name"),legalName:r("digijagApp.organization.legalName"),"billingAddress+addressLine1":r("digijagApp.organization.addressLine1"),"billingAddress+addressLine2":r("digijagApp.organization.addressLine2"),"billingAddress+zipCode":r("digijagApp.organization.zipCode"),"billingAddress+city":r("digijagApp.organization.city"),"billingAddress+region":r("digijagApp.organization.region"),organizationNumber:r("digijagApp.organization.orgNr"),referenceInformation:r("digijagApp.organization.referenceInformation"),lastInvoiceNumber:{label:r("digijagApp.organization.lastInvoiceNumber"),readonly:!e.some(r=>{var e;return null===(e=t.y.organizations.create)||void 0===e?void 0:e.includes(r)})},lastInvoiceSent:{label:r("digijagApp.organization.lastInvoiceSent"),datetime:!0,readonly:!e.some(r=>{var e;return null===(e=t.y.organizations.create)||void 0===e?void 0:e.includes(r)})},licenses:{label:r("digijagApp.organization.licenses"),number:!0,readonly:!e.some(r=>{var e;return null===(e=t.y.organizations.create)||void 0===e?void 0:e.includes(r)})},img_url:{label:r("digijagApp.organization.imgUrl"),image:!0}}),a=r=>i.Ry().shape({name:i.Z_().required(r("error:error.NotNull")),legalName:i.Z_().required(r("error:error.NotNull")),"billingAddress+addressLine1":i.Z_().required(r("error:error.NotNull")),"billingAddress+addressLine2":i.Z_().notRequired(),"billingAddress+zipCode":i.Z_().required(r("error:error.NotNull")),"billingAddress+city":i.Z_().required(r("error:error.NotNull")),"billingAddress+region":i.Z_().notRequired(),organizationNumber:i.Z_().required(r("error:error.NotNull")),referenceInformation:i.Z_().notRequired(),lastInvoiceNumber:i.Z_().notRequired(),lastInvoiceSent:i.Z_().notRequired(),licenses:i.Rx().required(r("error:error.NotNull")),img_url:i.nK().notRequired()})},46062:function(r,e,n){"use strict";n.d(e,{P8:function(){return u},Pv:function(){return l},Rf:function(){return c},o8:function(){return d},qi:function(){return s}});var i=n(54045),t=n(64124),o=n(58444);let a="/api/organizations",s=(r,e,n)=>{let o="".concat(a,"?page=").concat(r,"&size=").concat(e,"&sort=").concat(n||""),{data:s,error:d,isLoading:l,mutate:c}=(0,i.ZP)(o,t.l2);return{organizations:null==s?void 0:s.data,organizationsIsLoading:l,organizationsError:d,organizationsMutate:c,pagination:null==s?void 0:s.pagination}},d=r=>{let{data:e,error:n,isLoading:o}=(0,i.ZP)(()=>r&&"".concat(a,"/").concat(r),t._i);return{organization:e,organizationIsLoading:o,organizationError:n}},l=r=>{let{error:e,trigger:n}=(0,o.Z)("".concat(a,"/").concat(r),t.hs);return{deleteOrganizationTrigger:n,deleteOrganizationError:e}},c=()=>{let{trigger:r,isMutating:e,error:n}=(0,o.Z)("".concat(a),t.CL);return{organizationTrigger:r,organizationIsMutating:e,organizationMutateError:n}},u=()=>{let{trigger:r,isMutating:e,error:n}=(0,o.Z)("".concat(a),t.Fy,{onSuccess:r=>{(0,i.JG)("".concat(a,"/").concat(r.id))}});return{organizationTrigger:r,organizationIsMutating:e,organizationMutateError:n}}}},function(r){r.O(0,[2229,76,4411,7363,1154,2888,9774,179],function(){return r(r.s=67820)}),_N_E=r.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.