PageSourceSearch

https://bip.kwidzyn.pl/static/js/29.a5202c7c.chunk.js

js kwidzyn.pl collected 2026-10-02 10:41:50 UTC 15,227 bytes, 2 lines download raw bytes

1(this["webpackJsonpe-rejestracja"]=this["webpackJsonpe-rejestracja"]||[]).push([[29],{606:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var c=n(2),r=n(7),a=function(e){var t=e.children;return Object(c.jsx)(r.a,{as:"h1",fontSize:"4xl",children:t})}},648:function(e,t,n){"use strict";n.r(t);var c=n(6),r=n(2),a=n(197),o=n(598),s=n(232),i=n(628),u=n(583),j=n(573),l=n(1),d=n(4),b=n(15),O=n(554),h=n(7),p=function(e){var t=e.label,n=e.value,c=Object(b.a)(e,["label","value"]);return Object(r.jsxs)(s.a,{children:[t&&Object(r.jsx)(h.a,{d:"inline",children:t}),Object(r.jsx)(O.a,Object(d.a)({variant:"unstyled",isReadOnly:!0,value:n},c))]})},f=function(e){var t=e.user;return Object(r.jsxs)(o.c,{spacing:4,align:"stretch",children:[Object(r.jsxs)(o.a,{justifyContent:"space-between",children:[Object(r.jsx)(h.a,{children:"Imi\u0119 i nazwisko:"}),Object(r.jsx)(p,{value:t.name})]}),Object(r.jsxs)(o.a,{justifyContent:"space-between",children:[Object(r.jsx)(h.a,{children:"Adres email:"}),Object(r.jsx)(p,{value:t.email})]}),Object(r.jsxs)(o.a,{justifyContent:"space-between",children:[Object(r.jsx)(h.a,{children:"Numer telefonu:"}),Object(r.jsx)(p,{value:t.phone})]})]})},x=n(16),m=n.n(x),w=n(31),y=n(637),v=n(175),k=n(599),S=n(48),g=n(68),C=n(109),I=function(e,t){return Object(S.a)().post("/e-reservation/user/".concat(t,"/edit"),e)},z=n(95),N=n(50),P=n(55),F=Object(N.b)().shape({name:Object(N.c)().required(P.a.requiredField).nullable(),phone:Object(N.c)().nullable()}),E=n(44),T=n(23),A=n(12),B=n(238),R=n(127),q=n(59),U=function(e){var t=e.user,n=e.setIsReadOnly,c=Object(A.useGetThemeColors)(),i=Object(a.d)(c.white,c.black),u=function(){var e=Object(g.a)((function(e){return{userId:e.userId,tokenSecurity:e.tokenSecurity}})),t=e.userId,n=e.tokenSecurity,c=Object(v.b)();if(!t)throw new Error("UserId not found");return Object(k.a)((function(e){return I(e,t).then(function(){var e=Object(w.a)(m.a.mark((function e(r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.invalidateQueries(Object(C.b)(t,n));case 2:return e.abrupt("return",r);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){throw e}))}))}(),j=function(){var e=Object(z.a)().addNotification,t="Edycja";return{showSuccessNotification:function(){return e({title:t,description:"Pomy\u015blnie zmieniono dane.",type:"success"})},showErrorNotification:function(){return e({title:t,description:"Nie uda\u0142o si\u0119 zmieni\u0107 danych",type:"error"})}}}(),l=j.showSuccessNotification,d=j.showErrorNotification,b=function(){var e=Object(w.a)(m.a.mark((function e(t,c){var r;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new FormData,Object.keys(t).forEach((function(e){r.append(e,t[e]?t[e].toString():"")})),e.prev=2,e.next=5,u.mutateAsync(r);case 5:l(),n(!0),e.next=16;break;case 9:if(e.prev=9,e.t0=e.catch(2),400!==e.t0.status){e.next=15;break}return c(e.t0.response.msg),d(),e.abrupt("return");case 15:d();case 16:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t,n){return e.apply(this,arguments)}}();return Object(r.jsx)(E.Form,{onSubmit:b,defaultValues:{name:t.name,phone:t.phone},validationSchema:F,resetOnSubmit:!1,children:function(){return Object(r.jsxs)(r.Fragment,{children:[Object(r.jsxs)(o.c,{spacing:4,align:"stretch",children:[Object(r.jsxs)(o.a,{justifyContent:"space-between",children:[Object(r.jsxs)(h.a,{children:["Imi\u0119 i nazwisko:",Object(r.jsx)(R.a,{ml:1,d:"inline",children:"*"})]}),Object(r.jsx)(E.TextField,{containerProps:{width:"250px"},name:"name",isRequired:!0})]}),Object(r.jsxs)(o.a,{justifyContent:"space-between",children:[Object(r.jsx)(h.a,{children:"Adres email:"}
1),Object(r.jsx)(s.a,{children:Object(r.jsx)(O.a,{w:250,isDisabled:!0,value:t.email})})]}),Object(r.jsxs)(o.a,{justifyContent:"space-between",children:[Object(r.jsx)(h.a,{children:"Numer telefonu:"}),Object(r.jsx)(B.a,{containerProps:{width:"250px"},mask:[/\d/,/\d/,/\d/,/\d/,/\d/,/\d/,/\d/,/\d/,/\d/],name:"phone"})]})]}),Object(r.jsxs)(o.c,{mt:6,spacing:4,children:[Object(r.jsx)(E.SpinnerButton,{id:"confirm-edit-user-data-btn",btnTitle:Object(r.jsx)(h.a,{children:"Zapisz zmiany"}),leftIcon:Object(r.jsx)(T.a,{color:i,icon:y.f}),w:"250px"}),Object(r.jsx)(q.Button,{w:"250px",colorScheme:"red",variant:"outline",onClick:function(){return n(!0)},id:"cancel-edit-user-data-btn",children:Object(r.jsx)(h.a,{children:"Anuluj"})})]})]})}})},D=n(32),M=function(e){return Object(S.a)().post("/e-reservation/user/".concat(e,"/delete"))},W=n(19),G=n(74),L=function(e){var t=e.onClose,n=e.isOpen,c=function(){var e=Object(g.a)((function(e){return{userId:e.userId,deleteAuthorization:e.deleteAuthorization}})),t=e.userId,n=e.deleteAuthorization;if(!t)throw new Error("UserId not found");return Object(k.a)((function(){return M(t).then((function(){n()})).catch((function(e){throw new Error(e)}))}))}(),a=Object(D.g)().push,o=Object(W.a)().friendlyUrl,s=function(){var e=Object(z.a)().addNotification,t="Usuni\u0119cie konta";return{showSuccessNotification:function(){return e({title:t,description:"Pomy\u015blnie usuni\u0119to konto.",type:"success"})},showErrorNotification:function(){return e({title:t,description:"Nie uda\u0142o si\u0119 usun\u0105\u0107 konta",type:"error"})}}}(),i=s.showSuccessNotification,u=s.showErrorNotification,l=function(){var e=Object(w.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.mutateAsync();case 3:i(),a("/e-rezerwacja/".concat(o)),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),u();case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}();return Object(r.jsx)(G.b,{isOpen:n,onClose:t,modalHeader:Object(r.jsx)(h.a,{children:"Potwierdzenie usuni\u0119cia konta"}),modalFooterButtons:Object(r.jsx)(j.a,{w:"100%",children:Object(r.jsx)(q.Button,{onClick:l,isLoading:c.isLoading,w:"250px",colorScheme:"red",mx:"auto",id:"confirm-delete-account-btn",children:Object(r.jsx)(h.a,{children:"Potwierd\u017a"})})}),children:Object(r.jsx)(h.a,{children:"Jeste\u015b pewny/a, \u017ce chcesz usun\u0105\u0107 konto? Operacja jest nieodwracalna. Wszystkie oczekuj\u0105ce um\xf3wione terminy zostan\u0105 anulowane."})})},_=n(606),Z=n(240),H=n(595),J=n(629),Q=n(79),V=function(e){var t=e.setIsReadOnly,n="Edycja";return Object(r.jsx)(H.a,{label:n,"aria-label":n,children:Object(r.jsx)(Q.a,{id:"edit-account-icon-btn","aria-label":n,background:"transparent",icon:Object(r.jsx)(T.a,{w:7,h:7,color:"black.900",icon:J.a}),onClick:function(){t(!1)}})})},X=function(e){var t=e.openDeleteProfileModal,n="Usu\u0144 konto";return Object(r.jsx)(H.a,{label:n,"aria-label":n,children:Object(r.jsx)(Q.a,{id:"delete-account-icon-btn","aria-label":n,background:"transparent",icon:Object(r.jsx)(T.a,{w:7,h:7,color:"black.900",icon:J.b}),onClick:t})})},K=n(582),Y=n(245),$=Object(N.b)().shape({oldPassword:Object(N.c)().required(P.a.requiredField),password:Object(N.c)().required(P.a.requiredField),repeatPassword:Object(N.c)().test("repeat-password","Has\u0142a nie s\u0105 takie same",(function(e){return this.parent.password===e})).required(P.a.requiredField)}),ee=function(e,t){return Object(S.a)().post("/user/".concat(t,"/change-old-password"),e)},te=function(e){var t=e.onCloseModal,n=Object(A.useGetThemeColors)(),c=Object(a.d)(n.white,n.black),s=function(){var e=Object(z.a)().addNotification,t="Zmiana has\u0142a";return{showSuccessNotification:function(){return e({title:t,description:"Pomy\u015blnie zmieniono has\u0142o.",type:"success"})},showErrorNotification:function(n){return e({title:t,description:n||"Nie uda\u0142o si\u0119 zmieni\u0107 has\u0142a",type:"error"})}}}(),i=s.showSuccessNotification,u=s.showErrorNotification,j=function(){var e=Object(g.a)((function(e){return{userId:e.userId}})).userId;if(!e)throw new Error("UserId not found");return Object(k.a)((function(t){return ee(t,e)}))}(),l=function(){var e=Object(w.a)(m.a.mark((function e(n,c){var r;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new FormData,Object.keys(n).forEac
1h((function(e){r.append(e,n[e].toString())})),e.prev=2,e.next=5,j.mutateAsync(r);case 5:i(),t(),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(2),400===e.t0.status&&c(e.t0.response.msg),u(e.t0.message);case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t,n){return e.apply(this,arguments)}}();return Object(r.jsx)(E.Form,{onSubmit:l,defaultValues:{oldPassword:"",password:"",repeatPassword:""},validationSchema:$,resetOnSubmit:!1,children:function(e){var t=(0,e.watch)("password");return Object(r.jsxs)(o.c,{spacing:4,align:"stretch",children:[Object(r.jsx)(E.TextField,{label:"Aktualne has\u0142o",name:"oldPassword",type:E.TextFieldType.PASSWORD}),Object(r.jsx)(E.TextField,{label:"Nowe has\u0142o",name:"password",type:E.TextFieldType.PASSWORD}),Object(r.jsx)(E.TextField,{label:"Powt\xf3rz nowe has\u0142o",name:"repeatPassword",type:E.TextFieldType.PASSWORD}),Object(r.jsx)(Y.a,{password:t}),Object(r.jsx)(o.c,{spacing:4,mt:8,children:Object(r.jsx)(E.SpinnerButton,{btnTitle:Object(r.jsx)(h.a,{children:"Potwierd\u017a zmian\u0119"}),leftIcon:Object(r.jsx)(T.a,{color:c,icon:K.e}),id:"confirm-change-password-btn",minW:"250px"})})]})}})},ne=function(e){var t=e.isOpen,n=e.onClose;return Object(r.jsx)(G.b,{isOpen:t,onClose:n,modalHeader:Object(r.jsx)(h.a,{children:"Zmiana has\u0142a"}),children:Object(r.jsx)(o.c,{spacing:4,children:Object(r.jsx)(s.a,{w:"100%",children:Object(r.jsx)(te,{onCloseModal:n})})})})},ce=n(577),re=function(e){var t=e.openChangePasswordModal,n=Object(b.a)(e,["openChangePasswordModal"]),c=Object(A.useGetThemeColors)(),o=Object(a.d)(c.white,c.black);return Object(r.jsx)(q.Button,Object(d.a)(Object(d.a)({customColorScheme:q.CustomColorScheme.Blue,h:"80px",minW:"300px",leftIcon:Object(r.jsx)(T.a,{color:o,icon:ce.b}),onClick:t,id:"change-password-btn"},n),{},{children:Object(r.jsx)(h.a,{children:"Zmie\u0144 has\u0142o"})}))},ae=n.p+"static/media/undraw_profile_details.b87d188f.svg",oe=n.p+"static/media/undraw_profile_details_dark.0a0bc386.svg",se=n(323),ie=n(149),ue=n(99),je=n(49),le=function(e,t,n){return fetch("".concat(ue.a,"e-reservation/user/").concat(t,"/").concat(e,"/connect-sso/html-form"),{headers:{"X-Access-Token":"Bearer ".concat(n)}}).then((function(e){if(!e.ok)throw new Error(e.statusText);return e.text()}))},de=function(){return"connect-sso-form"},be=n(70),Oe=n(60),he=n(75),pe=function(){var e=Object(A.useGetThemeColors)(),t=Object(a.d)(e.white,e.black),n=function(){var e=Object(W.a)().friendlyUrl,t=Object(g.a)((function(e){return{userId:e.userId,tokenSecurity:e.tokenSecurity}})),n=t.userId,c=t.tokenSecurity;if(!n||!c)throw new Error("UserId not found");return Object(je.a)(de(),(function(){return le(e,n,c)}))}().data;return Object(r.jsxs)(r.Fragment,{children:[n&&Object(r.jsx)(s.a,{id:"sso-form",visibility:"hidden",h:0,children:Object(r.jsx)(he.a,{html:n})}),Object(r.jsx)(q.Button,{customColorScheme:q.CustomColorScheme.Blue,h:"80px",w:"100%",leftIcon:Object(r.jsx)(T.a,{color:t,icon:ie.h}),onClick:function(){var e=document.getElementById("sso-form").getElementsByTagName("form")[0];e&&e.submit()},id:"connect-with-sso-btn",children:Object(r.jsx)(h.a,{children:"Po\u0142\u0105cz konto z SSO"})})]})},fe=function(){return Object(r.jsx)(l.Suspense,{fallback:Object(r.jsx)(be.a,{size:"lg",mt:2,mx:4}),children:Object(r.jsx)(Oe.a,{fallback:function(){return Object(r.jsx)(r.Fragment,{})},children:Object(r.jsx)(pe,{})})})},xe=function(e){return Object(S.a)().post("/user/".concat(e,"/disconnect-sso"))},me=function(e){var t=e.isOpen,n=e.onClose,c=function(){var e=Object(g.a)((function(e){return{userId:e.userId,tokenSecurity:e.tokenSecurity}})),t=e.userId,n=e.tokenSecurity,c=Object(v.b)();if(!t)throw new Error("UserId not found");return Object(k.a)((function(){return xe(t).then(function(){var e=Object(w.a)(m.a.mark((function e(r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.invalidateQueries(Object(C.b)(t,n));case 2:return e.abrupt("return",r);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}))}(),a=function(){var e=Object(z.a)().addNotification,t="Od\u0142\u0105czenie SSO";return{showSuccessNotification:function(){return e({title:t,description:"Pomy\u015blnie od\u0142\u0105czono konto od SSO",type:"success"})},showErrorNotification:function(){return e({title:t,description:"Co\u015b posz\u0142o nie tak",type:"error"})}}}(),o=a.showSuccessNotification,s=a.showErrorNotification;return Object(r.jsx)(G.a,{onClose:n,isOpen:t,onAccept:Object(w.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.mutateAsync();case 3:o(),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),s();case 9:n();case 10:case"end":return e.stop()}}),e,null,[[0,6]])}))),modalBody:Object(r.jsx)(h.a,{children:"Czy na pewno chcesz odwi\u0105za\u0107 konto od SSO?"}),isLoading:c.isLoading})},we=function(){var e=Object(A.useGetThemeColors)(),t=Object(a.d)(e.black,e.white),n=Object(G.c)(),c=n.isOpen,o=n.onClose,s=n.onOpen;return Object(r.jsxs)(r.Fragment,{children:[Object(r.jsx)(me,{isOpen:c,onClose:o}),Object(r.jsx)(q.Button,{colorScheme:"gray",h:"80px",w:"100%",leftIcon:Object(r.jsx)(T.a,{color:t,icon:y.e}),onClick:s,id:"disconnect-from-sso-btn",children:Object(r.jsx)(h.a,{children:"Od\u0142\u0105cz konto od SSO"})})]})},ye=function(e){var t=Object.assign({},e),n=Object(C.c)().data;return n?Object(r.jsx)(s.a,Object(d.a)(Object(d.a)({},t),{},{children:0===n.ssoConnection?Object(r.jsx)(fe,{}):Object(r.jsx)(we,{})})):Object(r.jsx)(r.Fragment,{})};t.default=function(){var e=Object(se.a)(),t=Object(l.useState)(!0),n=Object(c.a)(t,2),d=n[0],b=n[1],O=Object(C.c)().data,h=Object(A.useGetThemeColors)(),p=Object(a.d)(h.primary[600],h.white),x=Object(G.c)(),m=x.isOpen,w=x.onOpen,y=x.onClose,v=Object(G.c)(),k=v.isOpen,S=v.onOpen,g=v.onClose;return O?Object(r.jsxs)(o.a,{children:[Object(r.jsx)(L,{onClose:y,isOpen:m}),Object(r.jsx)(ne,{onClose:g,isOpen:k}),Object(r.jsxs)(s.a,{w:{sm:"100%",lg:"50%"},children:[Object(r.jsx)(_.a,{children:O.name}
1),Object(r.jsxs)(s.a,{border:"2px solid ".concat(p),borderRadius:15,p:4,pb:10,children:[Object(r.jsxs)(i.a,{columns:3,mb:6,children:[Object(r.jsx)(s.a,{}),Object(r.jsx)(u.a,{m:"auto",size:"xl",name:O.name}),Object(r.jsxs)(o.a,{alignItems:"start",spacing:2,ml:"auto",children:[d&&Object(r.jsx)(V,{setIsReadOnly:b}),Object(r.jsx)(X,{openDeleteProfileModal:w})]})]}),d?Object(r.jsx)(f,{user:O}):Object(r.jsx)(U,{user:O,setIsReadOnly:b})]}),1===O.hasLocalAccount&&Object(r.jsx)(r.Fragment,{children:e?Object(r.jsxs)(i.a,{minChildWidth:"300px",spacing:"10px",mt:10,children:[Object(r.jsx)(re,{openChangePasswordModal:S}),Object(r.jsx)(ye,{})]}):Object(r.jsx)(j.a,{mt:10,justifyContent:"center",children:Object(r.jsx)(re,{maxW:"400px",openChangePasswordModal:S})})})]}),Object(r.jsx)(s.a,{w:"50%",display:{base:"none",lg:"flex"},justifyContent:"center",children:Object(r.jsx)(Z.a,{lightImage:ae,darkImage:oe,alt:"Profil u\u017cytkownika"})})]}):Object(r.jsx)(r.Fragment,{})}}}]);
2//# sourceMappingURL=29.a5202c7c.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.