(this.webpackJsonpclient=this.webpackJsonpclient||[]).push([[0],{174:function(e,t,a){},175:function(e,t,a){},178:function(e,t,a){},180:function(e,t,a){"use strict";a.r(t);var s=a(1),i=a(15),n=a.n(i),c=a(5),l=a(57),o=a(132),r=a(133);const d="USER_LOGIN_REQUEST",j="USER_LOGIN_SUCCESS",u="USER_LOGIN_FAIL",b="USER_LOGOUT",h="USER_REGISTER_REQUEST",p="USER_REGISTER_SUCCESS",m="USER_REGISTER_FAIL",O="USER_DETAILS_REQUEST",x="USER_DETAILS_SUCCESS",g="USER_DETAILS_FAIL",v="USER_DETAILS_RESET",f="USER_UPDATE_PROFILE_REQUEST",y="USER_UPDATE_PROFILE_SUCCESS",N="USER_UPDATE_PROFILE_FAIL",A="USER_UPDATE_PROFILE_RESET",S="USER_LIST_REQUEST",E="USER_LIST_SUCCESS",C="USER_LIST_FAIL",I="USER_LIST_RESET",w="USER_DELETE_REQUEST",B="USER_DELETE_SUCCESS",L="USER_DELETE_FAIL",D="USER_UPDATE_REQUEST",k="USER_UPDATE_SUCCESS",z="USER_UPDATE_FAIL",F="USER_UPDATE_RESET",T="EXPERIENCE_DELETE_REQUEST",R="EXPERIENCE_DELETE_SUCCESS",U="EXPERIENCE_DELETE_FAIL",P="EXPERIENCE_DELETE_REQUEST",M="EXPERIENCE_DELETE_SUCCESS",G="EXPERIENCE_DELETE_FAIL",Q="EDUCATION_DELETE_REQUEST",W="EDUCATION_DELETE_SUCCESS",J="EDUCATION_DELETE_FAIL",Y="EVENTO_DELETE_REQUEST",q="EVENTO_DELETE_SUCCESS",H="EVENTO_DELETE_FAIL",_="EVENTO_DETAILS_USER_REQUEST",K="EVENTO_DETAILS_USER_SUCCESS",Z="EVENTO_DETAILS_USER_FAIL",V="EVENTO_DETAILS_REQUEST",X="EVENTO_DETAILS_SUCCESS",$="EVENTO_DETAILS_FAIL",ee="PAYMENT_DELETE_REQUEST",te="PAYMENT_DELETE_SUCCESS",ae="PAYMENT_DELETE_FAIL",se="DOCUMENTI_DELETE_REQUEST",ie="DOCUMENTI_DELETE_SUCCESS",ne="DOCUMENTI_DELETE_FAIL",ce="USER_UPDATE_REQUEST",le="USER_UPDATE_SUCCESS",oe="USER_UPDATE_FAIL",re="USER_BYID_REQUEST",de="USER_BYID_SUCCESS",je="USER_BYID_FAIL",ue="USER_BYID_FAIL",be=Object(l.combineReducers)({userLogin:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case d:return{loading:!0};case j:return{loading:!1,userInfo:t.payload};case u:return{loading:!1,error:t.payload};case b:return{};default:return e}},userRegister:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case h:return{loading:!0};case p:return{loading:!1,userInfo:t.payload};case m:return{loading:!1,error:t.payload};case b:return{};default:return e}},userDetails:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{user:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case O:return{...e,loading:!0};case x:return{loading:!1,user:t.payload};case g:return{loading:!1,error:t.payload};case v:return{user:{}};default:return e}},userByid:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{user:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case re:return{...e,loading:!0};case de:return{loading:!1,user:t.payload};case je:return{loading:!1,error:t.payload};case ue:return{user:{}};default:return e}},userUpdateProfile:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case f:return{loading:!0};case y:return{loading:!1,success:!0,userInfo:t.payload};case N:return{loading:!1,error:t.payload};case A:return{};default:return e}},userAddLingue:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case D:return{loading:!0};case k:return{loading:!1,success:!0,userInfo:t.payload};case z:return{loading:!1,error:t.payload};case F:return{};default:return e}},userDeleteLingue:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case T:return{loading:!0};case R:return{loading:!1,success:!0};case U:return{loading:!1,error:t.payload};default:return e}},userAddExperience:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case D:return{loading:!0};case k:return{loading:!1,success:!0,userInfo:t.payload};case z:return{loading:!1,error:t.payload};case F:return{};default:return e}},userDeleteExperience:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case P:return{loading:!0};case M:return{loading:!1,success:!0};case G:return{loading:!1,error:t.payload};default:return e}},userAddEducation:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case D:return{loading:!0};case k:return{loading:!1,success:!0,userInfo:t.payload};case z:return{loading:!1,error:t.payload};case F:return{};default:return e}},userDeleteEducation:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Q:return{loading:!0};case W:return{loading:!1,success:!0};case J:return{loading:!1,error:t.payload};default:return e}},userAddEvento:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case D:return{loading:!0};case k:return{loading:!1,success:!0,userInfo:t.payload};case z:return{loading:!1,error:t.payload};case F:return{};default:return e}},userDeleteEvento:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Y:return{loading:!0};case q:return{loading:!1,success:!0};case H:return{loading:!1,error:t.payload};default:return e}},userAddPayment:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case f:return{loading:!0};case y:return{loading:!1,success:!0,userInfo:t.payload};case N:return{loading:!1,error:t.payload};case A:return{};default:return e}},userDeletePayment:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case ee:return{loading:!0};case te:return{loading:!1,success:!0};case ae:return{loading:!1,error:t.payload};default:return e}},userAddProject:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case f:return{loading:!0};case y:return{loading:!1,success:!0,userInfo:t.payload};case N:return{loading:!1,error:t.payload};case A:return{};default:return e}},userDeleteProject:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case ce:return{loading:!0};case le:return{loading:!1,success:!0};case oe:return{loading:!1,error:t.payload};default:return e}},userList:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{users:[]},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case S:return{loading:!0};case E:return{loading:!1,users:t.payload};case C:return{loading:!1,error:t.payload};case I:return{users:[]};default:return e}},userDelete:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case w:return{loading:!0};case B:return{loading:!1,success:!0};case L:return{loading:!1,error:t.payload};default:return e}},userUpdate:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{user:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case D:return{loading:!0};case k:return{loading:!1,success:!0};case z:return{loading:!1,error:t.payload};case F:return{user:{}};default:return e}},userUpdateBlocco:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{user:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case D:return{loading:!0};case k:return{loading:!1,success:!0};case z:return{loading:!1,error:t.payload};case F:return{user:{}};default:return e}},userAddLingueAdmin:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case f:return{loading:!0};case y:return{loading:!1,success:!0,userInfo:t.payload};case N:return{loading:!1,error:t.payload};case A:return{};default:return e}},userAddExperienceAdmin:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case f:return{loading:!0};case y:return{loading:!1,success:!0,userInfo:t.payload};case N:return{loading:!1,error:t.payload};case A:return{};default:return e}},userAddEducationAdmin:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case f:return{loading:!0};case y:return{loading:!1,success:!0,userInfo:t.payload};case N:return{loading:!1,error:t.payload};case A:return{};default:return e}},userAddProjectAdmin:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case f:return{loading:!0};case y:return{loading:!1,success:!0,userInfo:t.payload};case N:return{loading:!1,error:t.payload};case A:return{};default:return e}},userAddPaymentAdmin:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case f:return{loading:!0};case y:return{loading:!1,success:!0,userInfo:t.payload};case N:return{loading:!1,error:t.payload};case A:return{};default:return e}},userAddEventoAdmin:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case f:return{loading:!0};case y:return{loading:!1,success:!0,userInfo:t.payload};case N:return{loading:!1,error:t.payload};case A:return{};default:return e}},userEditEventoAdmin:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case f:return{loading:!0};case y:return{loading:!1,success:!0,userInfo:t.payload};case N:return{loading:!1,error:t.payload};case A:return{};default:return e}},userEditEvento:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case D:return{loading:!0};case k:return{loading:!1,success:!0,userInfo:t.payload};case z:return{loading:!1,error:t.payload};case F:return{};default:return e}},userGetEventoAdmin:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{eventodata:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case V:return{...e,loading:!0};case X:return{loading:!1,eventodata:t.payload};case $:return{loading:!1,error:t.payload};case"EVENTO_DETAILS_RESET":return{eventodata:[]};default:return e}},userGetEvento:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{eventodata:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case _:return{...e,loading:!0};case K:return{loading:!1,eventodata:t.payload};case Z:return{loading:!1,error:t.payload};case"EVENTO_DETAILS_USER_RESET":return{eventodata:[]};default:return e}},userAddDocumentiAdmin:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case f:return{loading:!0};case y:return{loading:!1,success:!0,userInfo:t.payload};case N:return{loading:!1,error:t.payload};case A:return{};default:return e}},userDeleteLingueAdmin:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case T:return{loading:!0};case R:return{loading:!1,success:!0};case U:return{loading:!1,error:t.payload};default:return e}},userDeleteExperienceAdmin:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case P:return{loading:!0};case M:return{loading:!1,success:!0};case G:return{loading:!1,error:t.payload};default:return e}},userDeleteEducationAdmin:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Q:return{loading:!0};case W:return{loading:!1,success:!0};case J:return{loading:!1,error:t.payload};default:return e}},userDeleteProjectAdmin:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case ce:return{loading:!0};case le:return{loading:!1,success:!0};case oe:return{loading:!1,error:t.payload};default:return e}},userDeletePaymentAdmin:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case ee:return{loading:!0};case te:return{loading:!1,success:!0};case ae:return{loading:!1,error:t.payload};default:return e}},userDeleteEventoAdmin:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Y:return{loading:!0};case q:return{loading:!1,success:!0};case H:return{loading:!1,error:t.payload};default:return e}},userDeleteDocumentiAdmin:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case se:return{loading:!0};case ie:return{loading:!1,success:!0};case ne:return{loading:!1,error:t.payload};default:return e}}}),he={evento:{},userLogin:{userInfo:localStorage.getItem("userInfo")?JSON.parse(localStorage.getItem("userInfo")):null}},pe=[r.a];var me=Object(l.createStore)(be,he,Object(o.composeWithDevTools)(Object(l.applyMiddleware)(...pe))),Oe=(a(78),a(6)),xe=a(14),ge=a(76),ve=a(10),fe=a.n(ve),ye=!1;const Ne=()=>e=>{localStorage.removeItem("userInfo"),e({type:b}),e({type:v}),e({type:I}),document.location.href="/login"},Ae=(e,t)=>async(t,a)=>{try{t({type:O});const{userLogin:{userInfo:s}}=a(),i={headers:{Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:n}=await fe.a.get("https://api.gestionale.ipsedocet.com/api/users/".concat(e,"/"),i);t({type:x,payload:n}),ye=!0}catch(s){const e=s.response&&s.response.data.message?s.response.data.message:s.message;ye||alert(e),"Request failed with status code 401"===e&&t(Ne()),t({type:g,payload:e})}},Se=e=>async(t,a)=>{try{const{userLogin:{userInfo:s}}=a();t({type:re});const i={headers:{Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:n}=await fe.a.get("https://api.gestionale.ipsedocet.com/api/users/anagrafica/".concat(e),i);t({type:de,payload:n}),ye=!0}catch(s){const e=s.response&&s.response.data.message?s.response.data.message:s.message;ye||alert(e),"Request failed with status code 401"===e&&t(Ne()),t({type:je,payload:e})}},Ee=e=>async(t,a)=>{try{t({type:D});const{userLogin:{userInfo:s}}=a(),i={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:n}=await fe.a.put("https://api.gestionale.ipsedocet.com/api/users/anagrafica/".concat(s._id),e,i);ye=!0,t({type:k,payload:n}),t({type:v,payload:n}),localStorage.setItem("userInfo",JSON.stringify(n))}catch(s){console.log("errore");const e=s.response&&s.response.data.message?s.response.data.message:s.message;ye||alert(e),"Request failed with status code 401"===e&&t(Ne()),t({type:N,payload:e})}},Ce=e=>async(t,a,s)=>{try{t({type:P});const{userLogin:{userInfo:s}}=a(),i={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:n}=await fe.a.delete("https://api.gestionale.ipsedocet.com/api/users/profile/experience/".concat(e),i);ye=!0,t({type:x,payload:n}),t({type:M,payload:n}),t({type:k})}catch(i){const e=i.response&&i.response.data.message?i.response.data.message:i.message;ye||alert(e),"Request failed with status code 401"===e&&t(Ne()),t({type:G,payload:e})}},Ie=e=>async(t,a,s)=>{try{t({type:Q});const{userLogin:{userInfo:s}}=a(),i={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:n}=await fe.a.delete("https://api.gestionale.ipsedocet.com/api/users/profile/education/".concat(e),i);t({type:x,payload:n}),t({type:W,payload:n}),t({type:k}),ye=!0}catch(i){const e=i.response&&i.response.data.message?i.response.data.message:i.message;ye||alert(e),"Request failed with status code 401"===e&&t(Ne()),t({type:J,payload:e})}},we=e=>async(t,a)=>{try{t({type:ce});const{userLogin:{userInfo:s}}=a(),i={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:n}=await fe.a.delete("https://api.gestionale.ipsedocet.com/api/users/profile/project/".concat(e),i);ye=!0,t({type:k,payload:n}),t({type:x,payload:n})}catch(s){const e=s.response&&s.response.data.message?s.response.data.message:s.message;ye||alert(e),"Request failed with status code 401"===e&&t(Ne()),t({type:oe,payload:e})}},Be=()=>async(e,t)=>{try{e({type:S});const{userLogin:{userInfo:a}}=t(),s={headers:{Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:i}=await fe.a.get("https://api.gestionale.ipsedocet.com/api/users",s);e({type:E,payload:i}),ye=!0}catch(a){const t=a.response&&a.response.data.message?a.response.data.message:a.message;alert(t),"Request failed with status code 401"===t&&e(Ne()),e({type:C,payload:t})}},Le=e=>async(t,a)=>{try{t({type:w});const{userLogin:{userInfo:s}}=a(),i={headers:{Authorization:"Bearer ".concat(s.token)}};await fe.a.delete("https://api.gestionale.ipsedocet.com/api/users/".concat(e),i),t({type:B}),ye=!0}catch(s){const e=s.response&&s.response.data.message?s.response.data.message:s.message;ye||alert(e),"Request failed with status code 401"===e&&t(Ne()),t({type:L,payload:e})}};var De=a(0);var ke=e=>{let{location:t,history:a}=e;const i=Object(c.b)(),n=Object(c.c)((e=>e.userLogin)),{userInfo:l}=n,o=Object(c.c)((e=>e.userDetails)),{loading:r,error:d,user:j}=o;return Object(De.jsxs)("nav",{className:"navbar bg-dark",children:[Object(De.jsx)("h1",{children:Object(De.jsxs)(Oe.b,{to:"/",children:[Object(De.jsx)("i",{className:"fas fa-code"})," Gestionale Ipse"]})}),l?Object(De.jsx)(s.Fragment,{children:Object(De.jsxs)("ul",{children:[Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{to:"/dashboard",children:[Object(De.jsx)("i",{className:"fas fa-user"})," ",Object(De.jsx)("span",{className:"hide-sm",children:l.name})]})}),Object(De.jsx)("li",{children:Object(De.jsxs)("a",{onClick:()=>{i(Ne())},href:"/",children:[Object(De.jsx)("i",{className:"fas fa-sign-out-alt"})," ",Object(De.jsx)("span",{className:"hide-sm",children:"Logout"})]})})]})}):Object(De.jsx)(s.Fragment,{children:Object(De.jsxs)("ul",{children:[Object(De.jsx)("li",{children:Object(De.jsx)(Oe.b,{to:"/register",children:"Register"})}),Object(De.jsx)("li",{children:Object(De.jsx)(Oe.b,{to:"/login",children:"Login"})})]})}),l&&l.isAdmin&&Object(De.jsx)("ul",{children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{onClick:()=>(window.location="/profiles",void i({type:ue})),children:[Object(De.jsx)("i",{class:"fas fa-users"})," Dipendenti"]})})})]})};var ze=e=>{let{location:t,history:a}=e;Object(c.b)();const i=Object(c.c)((e=>e.userLogin)),{loading:n,error:l,userInfo:o}=i,r=t.search?t.search.split("=")[1]:"/dashboard";return Object(s.useEffect)((()=>{o&&a.push(r)}),[a,o,r]),Object(De.jsxs)("div",{children:[Object(De.jsx)(ke,{}),Object(De.jsx)("section",{className:"landing",children:Object(De.jsx)("div",{className:"dark-overlay",children:Object(De.jsxs)("div",{className:"landing-inner",children:[Object(De.jsx)("h1",{className:"x-large",children:"Gestionale Ipse"}),Object(De.jsx)("p",{className:"lead",children:"Crea il tuo profilo e monitora la tua situazione giorno per giorno"}),Object(De.jsxs)("div",{className:"buttons",children:[Object(De.jsx)(Oe.b,{to:"/register",className:"btn btn-primary",children:"Registra"}),Object(De.jsx)(Oe.b,{to:"/login",className:"btn btn-light",children:"Login"})]})]})})})]})};var Fe=function(e){return(new Intl.DateTimeFormat).format(new Date(e))};var Te=a(61),Re=a(89),Ue=a(90),Pe=a(27),Me=a.n(Pe);a(174);var Ge=e=>{let{location:t,history:a,giorno:i}=e;console.log(i);const[n,l]=Object(s.useState)(""),[o,r]=Object(s.useState)(""),[d,j]=Object(s.useState)(""),[u,b]=Object(s.useState)(""),[h,p]=Object(s.useState)(""),[m,O]=Object(s.useState)(""),[g,v]=Object(s.useState)(""),[f,y]=Object(s.useState)(""),[A,S]=Object(s.useState)(""),[E,C]=Object(s.useState)(""),[I,w]=Object(s.useState)(!1),B=Object(c.b)(),L=Object(c.c)((e=>e.userLogin)),{userInfo:z}=L,T=Object(c.c)((e=>e.userAddEvento)),{success:R}=T;h.value;Object(s.useEffect)((()=>{z?z&&z.username&&!R||(B({type:F}),console.log(R),B(Ae(z._id))):a.push("/login")}),[B,a,z,R]),console.log(z),Object(s.useEffect)((()=>{setTimeout((()=>{p("Lavorato"),p("Ferie"),p(""),U("")}),1)}),[]);const U=e=>{let t=document.getElementById("tipoevento");"Lavorato"===t.value?document.getElementById("orelavorate").style.display="block":document.getElementById("orelavorate").style.display="none","Straordinario"===t.value?document.getElementById("orestraordinario").style.display="block":document.getElementById("orestraordinario").style.display="none","Mutua"===t.value?document.getElementById("oremutua").style.display="block":document.getElementById("oremutua").style.display="none","Ferie"===t.value?document.getElementById("oreferie").style.display="block":document.getElementById("oreferie").style.display="none","Permesso"===t.value?document.getElementById("orepermesso").style.display="block":document.getElementById("orepermesso").style.display="none"};return Object(De.jsx)("div",{className:"ModFinestra",children:Object(De.jsx)("div",{className:"bodyWind",children:Object(De.jsxs)(s.Fragment,{children:[Object(De.jsxs)("p",{className:"titleWind",children:["Lavorato ",i]}),Object(De.jsxs)("p",{className:"testoWind",children:[Object(De.jsx)("i",{className:"fas fa-code-branch"})," Aggiungi ore Lavorate"]}),Object(De.jsxs)("form",{className:"form",onSubmit:e=>{document.getElementById("init").value,document.getElementById("fin").value;const t=i+"T"+document.getElementById("init").value+":00",a=i+"T"+document.getElementById("fin").value+":00",s=i;var c;console.log(z),console.log(t),console.log(a),e.preventDefault(),B(Ae(z._id)),B((c={title:n,ore:o,start:t,end:a,date:s,orepermessi:m,oreferie:f,oremutua:A,orestraordinario:g,tipoevento:h,note:E},async(e,t)=>{try{e({type:D});const{userLogin:{userInfo:a}}=t(),s={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:i}=await fe.a.put("https://api.gestionale.ipsedocet.com/api/users/profile/evento/".concat(a._id,"/"),c,s);ye=!0,e({type:k,payload:i}),e({type:x,payload:i}),window.location.reload("/dashboard"),ye=!0}catch(a){const t=a.response&&a.response.data.message?a.response.data.message:a.message;ye||alert(t),"Request failed with status code 401"===t&&e(Ne()),e({type:N,payload:t})}})),B(Ae(z._id))},children:[Object(De.jsx)("div",{className:"inputWind",children:Object(De.jsx)("input",{type:"text",placeholder:"Titolo evento/ Cliente",name:"title",value:n,onChange:e=>l(e.target.value),className:"inputWind",id:"titoloevento",required:!0})}),Object(De.jsx)("div",{className:"inputWind",onChange:U,children:Object(De.jsxs)("select",{required:!0,id:"tipoevento",name:"tipoevento",value:h,onChange:e=>p(e.target.value),children:[Object(De.jsx)("option",{value:"",children:"* Seleziona attivit\xe0"}),Object(De.jsx)("option",{value:"Lavorato",children:"Lavorato"}),Object(De.jsx)("option",{value:"Ferie",children:"Ferie"}),Object(De.jsx)("option",{value:"Straordinario",children:"Straordinario"}),Object(De.jsx)("option",{value:"Mutua",children:"Mutua"}),Object(De.jsx)("option",{value:"Permesso",children:"Permesso"})]})}),Object(De.jsx)("div",{id:"orelavorate",className:"inputWind",children:Object(De.jsx)("input",{type:"number",placeholder:"*Num. ore Lavorate",name:"ore",value:o,onChange:e=>r(e.target.value),className:"inputWind",max:"24",id:"orelavorate"})}),Object(De.jsx)("div",{id:"oreferie",className:"inputWind",children:Object(De.jsx)("input",{type:"number",placeholder:"*Num. ore Ferie",name:"oreferie",value:f,onChange:e=>y(e.target.value),className:"inputWind",max:"24"})}),Object(De.jsx)("div",{id:"orepermesso",className:"inputWind",children:Object(De.jsx)("input",{type:"number",placeholder:"*Num. ore Permesso",name:"orepermessi",value:m,onChange:e=>O(e.target.value),className:"inputWind",max:"24"})}),Object(De.jsx)("div",{id:"orestraordinario",className:"inputWind",children:Object(De.jsx)("input",{type:"number",placeholder:"*Num. ore Straordinario",name:"orestraordinario",value:g,onChange:e=>v(e.target.value),className:"inputWind",max:"24"})}),Object(De.jsx)("div",{id:"oremutua",className:"inputWind",children:Object(De.jsx)("input",{type:"number",placeholder:"*Num. ore Mutua",name:"orestraordinario",value:A,onChange:e=>S(e.target.value),className:"inputWind",max:"24"})}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("textarea",{placeholder:"note (max 250 caratteri)",name:"bio",value:E,onChange:e=>C(e.target.value),maxLength:250})}),Object(De.jsxs)("div",{hidden:()=>{alert("ciao")},children:[Object(De.jsxs)("p",{className:"textinputcheck",children:[Object(De.jsx)("input",{type:"checkbox",name:"all",id:"all",onChange:e=>{document.getElementById("init").value="09:00",document.getElementById("fin").value="18:00"}})," ","Giornata Intera"]}),Object(De.jsxs)("div",{className:"contWind1",children:[Object(De.jsx)("h4",{className:"subtitleWind",children:"Inizio"}),Object(De.jsx)("input",{type:"time",name:"orainizio",value:u||"09:00",onChange:e=>b(e.target.value),className:"inputWind",placeholder:"09:00:",id:"init"})]}),Object(De.jsxs)("div",{className:"contWind2",children:[Object(De.jsx)("h4",{className:"subtitleWind",children:"Fine"}),Object(De.jsx)("input",{type:"time",name:"orafine",value:d||"18:00",onChange:e=>j(e.target.value),className:"inputWind",placeholder:"18:00",id:"fin"})]}),Object(De.jsx)("div",{className:"btnDiv",children:Object(De.jsx)("input",{type:"submit",className:"btnSalva"})})]})]})]})})})};a(79);var Qe=e=>{let{match:t,location:a,idEvento:i,history:n}=e;const l=i,o=Object(c.b)(),r=Object(c.c)((e=>e.userLogin)),{userInfo:d}=r,j=Object(c.c)((e=>e.userGetEvento)),{eventodata:u}=j;console.log(u);const[b,h]=Object(s.useState)(""),[p,m]=Object(s.useState)(""),[O,g]=Object(s.useState)(""),[v,f]=Object(s.useState)(""),[y,N]=Object(s.useState)(""),[A,S]=Object(s.useState)(""),[E,C]=Object(s.useState)(""),[I,w]=Object(s.useState)(""),[B,L]=Object(s.useState)(""),[F,T]=Object(s.useState)(""),[R,U]=Object(s.useState)(!1),P=u.date;Object(s.useEffect)((()=>{d?d&&d.username||window.location.reload("/dashboard"):n.push("/login")}),[o,n,d]),Object(s.useEffect)((()=>{var e;o((e=l,async(t,a,s)=>{try{t({type:_});const a={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:s}=await fe.a.get("https://api.gestionale.ipsedocet.com/api/users/profile/evento/".concat(e),a);t({type:K,payload:s}),ye=!0}catch(i){const e=i.response&&i.response.data.message?i.response.data.message:i.message;ye||alert(e),"Request failed with status code 401"===e&&t(Ne()),t({type:Z,payload:e})}})),o({type:K,payload:u}),console.log(u),setTimeout((()=>{N("Lavorato"),N("Ferie"),N(""),M("")}),[u],1)}),[]);const M=e=>{let t=document.getElementById("tipoevento");"Lavorato"===t.value?document.getElementById("orelavorate").style.display="block":document.getElementById("orelavorate").style.display="none","Straordinario"===t.value?document.getElementById("orestraordinario").style.display="block":document.getElementById("orestraordinario").style.display="none","Mutua"===t.value?document.getElementById("oremutua").style.display="block":document.getElementById("oremutua").style.display="none","Ferie"===t.value?document.getElementById("oreferie").style.display="block":document.getElementById("oreferie").style.display="none","Permesso"===t.value?document.getElementById("orepermesso").style.display="block":document.getElementById("orepermesso").style.display="none"};return Object(De.jsx)("div",{className:"ModFinestra",children:Object(De.jsx)("div",{className:"bodyWind",children:Object(De.jsx)(s.Fragment,{children:Object(De.jsxs)("form",{className:"form",onSubmit:e=>{const t=P+"T"+document.getElementById("init").value+":00",a=P+"T"+document.getElementById("fin").value+":00",s=P;var n,c;e.preventDefault(),o((n=i,c={title:b,ore:p,start:t,end:a,date:s,orepermessi:A,oreferie:I,oremutua:B,orestraordinario:E,tipoevento:y,note:F},async(e,t,a)=>{try{e({type:D});const{userLogin:{userInfo:a}}=t(),s={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:i}=await fe.a.post("https://api.gestionale.ipsedocet.com/api/users/profile/evento/".concat(n),c,s);e({type:k,payload:i}),e({type:x,payload:i}),window.location.reload("/"),ye=!0}catch(s){const t=s.response&&s.response.data.message?s.response.data.message:s.message;ye||alert(t),"Request failed with status code 401"===t&&e(Ne()),e({type:z,payload:t})}}))},children:[Object(De.jsx)("div",{className:"inputWind",children:Object(De.jsx)("input",{type:"text",placeholder:u.title,name:"title",value:b,onChange:e=>h(e.target.value),className:"inputWind"})}),Object(De.jsx)("div",{className:"inputWind",onChange:M,children:Object(De.jsxs)("select",{id:"tipoevento",name:"tipoevento",value:y,onChange:e=>N(e.target.value),required:!0,children:[Object(De.jsx)("option",{value:"",children:"* Seleziona attivit\xe0"}),Object(De.jsx)("option",{value:"Lavorato",children:"Lavorato"}),Object(De.jsx)("option",{value:"Ferie",children:"Ferie"}),Object(De.jsx)("option",{value:"Straordinario",children:"Straordinario"}),Object(De.jsx)("option",{value:"Mutua",children:"Mutua"}),Object(De.jsx)("option",{value:"Permesso",children:"Permesso"})]})}),Object(De.jsx)("div",{id:"orelavorate",className:"inputWind",children:Object(De.jsx)("input",{type:"number",placeholder:p||u.ore||0,name:"ore",value:p,onChange:e=>m(e.target.value),className:"inputWind",max:"24",id:"orelavorate"})}),Object(De.jsx)("div",{id:"oreferie",className:"inputWind",children:Object(De.jsx)("input",{type:"number",placeholder:I||u.oreferie||"0",name:"oreferie",value:I,onChange:e=>w(e.target.value),className:"inputWind",max:"24"})}),Object(De.jsx)("div",{id:"orepermesso",className:"inputWind",children:Object(De.jsx)("input",{type:"number",placeholder:A||u.orepermessi||"0",name:"orepermessi",value:A,onChange:e=>S(e.target.value),className:"inputWind",max:"24"})}),Object(De.jsx)("div",{id:"orestraordinario",className:"inputWind",children:Object(De.jsx)("input",{type:"number",placeholder:E||u.orestraordinario||"0",name:"orestraordinario",value:E,onChange:e=>C(e.target.value),className:"inputWind",max:"24"})}),Object(De.jsx)("div",{id:"oremutua",className:"inputWind",children:Object(De.jsx)("input",{type:"number",placeholder:B||u.oremutua||"0",name:"orestraordinario",value:B,onChange:e=>L(e.target.value),className:"inputWind",max:"24"})}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("textarea",{placeholder:u.note||"Note",name:"bio",value:F,onChange:e=>T(e.target.value),maxLength:25})}),Object(De.jsxs)("div",{children:[Object(De.jsxs)("p",{className:"textinputcheck",children:[Object(De.jsx)("input",{type:"checkbox",name:"all",onChange:e=>{document.getElementById("init").value="09:00",document.getElementById("fin").value="18:00"}})," ","Giornata Intera"]}),Object(De.jsxs)("div",{className:"contWind1",children:[Object(De.jsx)("h4",{className:"subtitleWind",children:"Inizio"}),Object(De.jsx)("input",{type:"time",name:"orainizio",value:v||"09:00",onChange:e=>f(e.target.value),className:"inputWind",disabled:R,id:"init"})]}),Object(De.jsxs)("div",{className:"contWind2",children:[Object(De.jsx)("h4",{className:"subtitleWind",children:"Fine"}),Object(De.jsx)("input",{type:"time",name:"orafine",value:O||"18:00",onChange:e=>g(e.target.value),className:"inputWind",disabled:R,id:"fin"})]})]}),Object(De.jsx)("div",{className:"btnDiv",children:Object(De.jsx)("input",{type:"submit",className:"btnSalva"})})]})})})})};var We=e=>{let{evento:t,location:a}=e;var i=!1;const n=Object(c.b)(),l=Object(c.c)((e=>e.userLogin)),{userInfo:o}=l,r=Object(c.c)((e=>e.userDetails)),{loading:d,error:j,user:u}=r,b=Object(c.c)((e=>e.userDeleteEvento)),{successDeleteEvento:h}=b,[p,m]=Object(s.useState)(""),O=(e,t)=>{var a;i=!0,console.log(i),console.log(t),window.confirm("Sei Sicuro?")&&(n((a=e,async(e,t)=>{try{e({type:Y});const{userLogin:{userInfo:s}}=t(),i={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:n}=await fe.a.delete("https://api.gestionale.ipsedocet.com/api/users/profile/evento/".concat(a),i);e({type:x,payload:n}),e({type:q,payload:n}),e({type:k}),ye=!0}catch(j){const a=j.response&&j.response.data.message?j.response.data.message:j.message;ye||alert(a),"Request failed with status code 401"===a&&e(Ne()),e({type:H,payload:a})}})),n(Ae(o._id))),n(Ae(o._id))};const[g,v]=Object(s.useState)(""),[f,y]=Object(s.useState)(""),[N,A]=Object(s.useState)(""),[S,E]=Object(s.useState)(""),[C,I]=Object(s.useState)(""),[w,B]=Object(s.useState)(""),[L,D]=Object(s.useState)(""),[z,F]=Object(s.useState)(""),[T,R]=Object(s.useState)(""),[U,P]=Object(s.useState)(""),[M,G]=Object(s.useState)(""),[Q,W]=Object(s.useState)(""),[J,_]=Object(s.useState)(""),[K,Z]=Object(s.useState)("prova"),[V,X]=Object(s.useState)(!1),[$,ee]=Object(s.useState)(!1),[te,ae]=Object(s.useState)(!1),[se,ie]=Object(s.useState)(!1);console.log("onIinit");return Object(De.jsxs)("div",{className:"contCalendar",children:[Object(De.jsx)(Me.a,{isOpen:se,onRequestClose:()=>ie(!1),children:Object(De.jsx)("p",{onClick:()=>ie(!1),className:"chiusuraModal",children:"X"})}),Object(De.jsx)(Me.a,{isOpen:te,onRequestClose:()=>ae(!1),children:Object(De.jsx)("p",{onClick:()=>ae(!1),className:"chiusuraModal",children:"X"})}),Object(De.jsxs)(Me.a,{className:"ModalEvent",isOpen:V,onRequestClose:()=>X(!1),style:{overlay:{zIndex:"100 ",opacity:"100%"},content:{color:"#fff",backgroundColor:" #0077ff",width:"400px",height:"610px",marginLeft:"35%",marginTop:"2%",marginBottom:"50px",position:"inherit",opacity:"100%",borderRadius:"30px",zIndex:"100 "}},children:[Object(De.jsx)("p",{onClick:()=>X(!1),className:"chiusuraModal",children:"X"}),Object(De.jsx)(Ge,{className:"modalCont",giorno:K})]}),Object(De.jsxs)(Me.a,{className:"ModalEvent",isOpen:$,onRequestClose:()=>ee(!1),style:{overlay:{zIndex:"100 ",opacity:"100%"},content:{color:"#fff",backgroundColor:" #0077ff",width:"400px",height:"610px",marginLeft:"35%",marginTop:"2%",marginBottom:"50px",position:"inherit",opacity:"100%",borderRadius:"30px",zIndex:"100 "}},children:[Object(De.jsx)("p",{onClick:()=>{ee(!1)},className:"chiusuraModal",children:"X"}),Object(De.jsx)(Qe,{id:"pippo",className:"modalCont",idEvento:f,titolo:N,nore:S,starteve:w,endeve:L,norepermessi:z,noreferie:T,noremutua:U,norestraordinario:M,gtipoevento:Q,gnote:J,idUser:u._id,giorno:C})]}),Object(De.jsxs)("div",{className:"contenitoreCal",children:[console.log("onIinit"),Object(De.jsx)(ge.a,{style:{width:"400px",zIndex:"1"},plugins:[Te.b,Ue.a,Re.a],initialView:"dayGridMonth",headerToolbar:{left:"prev,next today",center:"title",right:"dayGridMonth,timeGridWeek,timeGridDay"},firstDay:1,locale:"it",selectable:!0,validRange:{start:o.blocco},events:t,eventContent:function(e){return Object(De.jsx)("div",{className:"contCal",style:{background:" #0077ff",paddingTop:"1px",paddingBottom:"10px",paddingLeft:"1%",height:"130px",marginBottom:"1px",width:"100%",zIndex:"100",marginTop:"10%"},children:Object(De.jsxs)("div",{children:[Object(De.jsxs)("div",{children:[Object(De.jsx)("p",{className:"deleteEvento",onClick:t=>O(e.event.extendedProps._id,t),children:"X"}),Object(De.jsx)("h3",{style:{color:"black",paddingLeft:"4%"},children:e.event.title.substring(0,10)})]}),Object(De.jsxs)("div",{children:[Object(De.jsxs)("h5",{style:{fontSize:"0.8rem",color:"white ",paddingLeft:"4%"},children:["Lavorate: ",e.event.extendedProps.ore]}),Object(De.jsxs)("h6",{style:{fontSize:"0.8rem",color:"white ",paddingLeft:"4%"},children:[" Straordinario: ",e.event.extendedProps.orestraordinario]}),Object(De.jsxs)("h6",{style:{fontSize:"0.8rem",color:"white ",paddingLeft:"4%"},children:["Ferie: ",e.event.extendedProps.oreferie]})," ",Object(De.jsxs)("h6",{style:{fontSize:"0.8rem",color:"white ",paddingLeft:"4%"},children:[" Mutua: ",e.event.extendedProps.oremutua]}),Object(De.jsxs)("h6",{style:{fontSize:"0.8rem",color:"white ",paddingLeft:"4%"},children:[" Permessi: ",e.event.extendedProps.orepermessi]})]}),Object(De.jsxs)("p",{children:[" ",e.event.extendedProps.start]}),Object(De.jsxs)("p",{children:[" ",e.event.extendedProps.end]})]})})},editable:!1,dateClick:e=>(e=>{console.log(e.date.getDay()),console.log(e.date.getDate()),console.log(e.date.getMonth()),console.log(e.date.getYear()),console.log(e.date.getTime()),console.log(e.date.getDate()),Z(e.dateStr),X(!0)})(e),eventClick:e=>{ee(!1),function(e,t){setTimeout((()=>{i||(e.event._instance.range.start.toISOString().slice(0,10),y(e.event.extendedProps._id),ee(!0))}),10)}(e)}})]})]})};var Je=e=>{let{curriculum:t,dipendente:a}=e;const s=Object(c.b)();return Object(De.jsx)("div",{children:Object(De.jsx)("div",{className:"sidebar",children:Object(De.jsxs)("ul",{children:[Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"",children:[Object(De.jsx)("i",{className:"fas fa-user-circle "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Profilo"})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",onClick:()=>(window.location="/edit-profile",void s({type:v})),children:[Object(De.jsx)("i",{className:"fas fa-cogs"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Edit "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",onClick:()=>(window.location="/edit-curriculum",void s({type:v})),children:[Object(De.jsx)("i",{class:"fas fa-id-badge"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Edit CV "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-experience/",children:[Object(De.jsx)("i",{className:"fab fa-black-tie "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Lavoro "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-education",children:[Object(De.jsx)("i",{className:"fas fa-graduation-cap "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Studi "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-project",children:[Object(De.jsx)("i",{className:"fas fa-briefcase "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Progetto "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/curriculum/",children:[Object(De.jsx)("i",{class:"far fa-file"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Curriculum "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-lingue",children:[Object(De.jsx)("i",{class:"fas fa-language"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Lingue "})]})})})]})})})};a(2);var Ye=e=>{let{location:t,history:a}=e;const i=Object(c.b)(),n=Object(c.c)((e=>e.userLogin)),{userInfo:l}=n,o=Object(c.c)((e=>e.userDetails)),{loading:r,error:d,user:j}=o;t.search&&t.search.split("=")[1];console.log(j),Object(s.useEffect)((()=>{l?j&&j.username||i(Ae(l._id)):a.push("/login")}),[i,l,j]);const u=e=>{var t;window.confirm("Sei sicuro?")&&i((t=e,async(e,a,s)=>{try{e({type:T});const{userLogin:{userInfo:s}}=a(),i={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:n}=await fe.a.delete("https://api.gestionale.ipsedocet.com/api/users/profile/lingue/".concat(t),i);ye=!0,e({type:x,payload:n}),e({type:R,payload:n}),e({type:k})}catch(d){const a=d.response&&d.response.data.message?d.response.data.message:d.message;ye||alert(a),"Request failed with status code 401"===a&&e(Ne()),e({type:U,payload:a})}}))};var b=[];void 0===j.lingue||(b=j.lingue.map((e=>Object(De.jsxs)("tr",{children:[Object(De.jsx)("td",{className:"tableLingText",children:e.lingua}),Object(De.jsx)("td",{className:"tableLingText",children:e.livascolt}),Object(De.jsx)("td",{className:"tableLingText",children:e.livlett}),Object(De.jsx)("td",{className:"tableLingText",children:e.livinter}),Object(De.jsx)("td",{className:"tableLingText",children:e.livprod}),Object(De.jsx)("td",{className:"tableLingText",children:e.livprodscrt}),Object(De.jsx)("td",{className:"noone",children:Object(De.jsx)("button",{onClick:()=>u(e._id),className:"btn btn-danger",children:Object(De.jsx)("i",{class:"fas fa-trash-alt"})})})]},e._id))));var h=[];void 0===j.experience||(h=j.experience.map((e=>Object(De.jsxs)("tr",{children:[Object(De.jsx)("td",{children:e.company}),Object(De.jsx)("td",{children:e.title}),Object(De.jsxs)("td",{children:[Fe(e.from)," - ",e.to?Fe(e.to):"Oggi"]}),Object(De.jsx)("td",{className:"noone",children:Object(De.jsx)("button",{onClick:()=>{return t=e._id,void(window.confirm("Sei sicuro?")&&i(Ce(t)));var t},className:"btn btn-danger",children:Object(De.jsx)("i",{class:"fas fa-trash-alt"})})})]},e._id))));var p=[];void 0===j.education||(p=j.education.map((e=>Object(De.jsxs)("tr",{children:[Object(De.jsx)("td",{children:e.school}),Object(De.jsx)("td",{className:"hide-sm",children:e.degree}),Object(De.jsxs)("td",{children:[Fe(e.from)," - ",e.to?Fe(e.to):"Oggi"]}),Object(De.jsx)("td",{className:"noone",children:Object(De.jsx)("button",{onClick:()=>{return t=e._id,void(window.confirm("Sei sicuro?")&&(i(Ae(l._id)),i(Ie(t)),i(Ae(l._id))));var t},className:"btn btn-danger",children:Object(De.jsx)("i",{class:"fas fa-trash-alt"})})})]},e._id))));var m=[];void 0===j.payment||(m=j.payment.map((e=>Object(De.jsxs)("tr",{children:[Object(De.jsxs)("td",{children:[e.title,"-",e.saldo,"\u20ac"]}),Object(De.jsxs)("td",{children:[Fe(e.from)," a ",Object(De.jsx)("br",{}),Fe(e.to)]}),Object(De.jsx)("td",{children:Object(De.jsx)("button",{className:"btn btn-success",onClick:()=>(e=>{const t={headers:{Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}};fetch("https://api.gestionale.ipsedocet.com/bucket/?key=pagamenti/"+e,t).then((t=>{console.log(t.body),t.json().then((t=>{console.log(t.result.data);var a=new Blob([new Uint8Array(t.result.data)]);let s=window.URL.createObjectURL(a),i=document.createElement("a");console.log("cia"),i.href=s,i.download=e,i.click()}))}))})(e.filecaricato),children:Object(De.jsx)("i",{class:"fas fa-download"})})})]},e._id))));var O=[];return void 0===j.project||(O=j.project.map((e=>Object(De.jsxs)("tr",{children:[Object(De.jsx)("td",{children:e.company}),Object(De.jsx)("td",{children:e.title}),Object(De.jsxs)("td",{children:[Fe(e.from)," - ",e.to?Fe(e.to):"Oggi"]}),Object(De.jsx)("td",{className:"noone",children:Object(De.jsx)("button",{onClick:()=>{return t=e._id,void(window.confirm("Sei sicuro?")&&(i(Ae(l._id)),i(we(t)),i(Ae(l._id))));var t},className:"btn btn-danger",children:Object(De.jsx)("i",{class:"fas fa-trash-alt"})})})]},e._id)))),Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)(ke,{}),void 0!==j.name?Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)(Je,{curriculum:j.curriculum,dipendente:j.username||j.name}),Object(De.jsx)("h1",{className:"large text-primary",children:"Dashboard"}),Object(De.jsxs)("p",{className:"lead",children:[Object(De.jsx)("i",{className:"fas fa-user"})," Benvenuto ",j.name," ",j.surname," "," ",Object(De.jsx)("div",{hidden:void 0===j.curriculum,children:Object(De.jsxs)("button",{className:"btn btn-success",onClick:()=>(e=>{const t={headers:{Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}};fetch("https://api.gestionale.ipsedocet.com/bucketCur?key=curriculum/"+e,t).then((t=>{console.log(t.body),t.json().then((t=>{console.log(t.result.data);var a=new Blob([new Uint8Array(t.result.data)]);let s=window.URL.createObjectURL(a),i=document.createElement("a");i.href=s,i.download=e,i.click()}))}))})(j.curriculum),children:[Object(De.jsx)("i",{class:"fas fa-download"})," ",Object(De.jsx)("tb",{children:"Scarica CV"})]})})]}),Object(De.jsx)(We,{evento:j.evento}),Object(De.jsx)(s.Fragment,{children:Object(De.jsxs)("div",{className:"contdash",children:[Object(De.jsx)("h2",{className:"my-2",children:"Percorso Lavorativo"}),Object(De.jsxs)("table",{className:"table",children:[Object(De.jsx)("thead",{children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("th",{children:"Azienda"}),Object(De.jsx)("th",{children:"Titolo"}),Object(De.jsx)("th",{children:"Anni"})]})}),Object(De.jsx)("tbody",{children:h})]})]})}),Object(De.jsx)(s.Fragment,{children:Object(De.jsxs)("div",{className:"contdash",children:[Object(De.jsx)("h2",{className:"my-2",children:"Percorso Formativo"}),Object(De.jsxs)("table",{className:"table",children:[Object(De.jsx)("thead",{children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("th",{children:"Scuola / Universit\xe0"}),Object(De.jsx)("th",{children:"Grado"}),Object(De.jsx)("th",{children:"Anni"})]})}),Object(De.jsx)("tbody",{children:p})]})]})}),Object(De.jsx)(s.Fragment,{children:Object(De.jsxs)("div",{className:"contdash",children:[Object(De.jsx)("h2",{className:"my-2",children:"Pagamenti"}),Object(De.jsxs)("table",{className:"table",children:[Object(De.jsx)("thead",{children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("th",{children:"Mese"}),Object(De.jsx)("th",{children:"Data"}),Object(De.jsx)("th",{children:"File"})]})}),Object(De.jsx)("tbody",{children:m})]})]})}),Object(De.jsx)(s.Fragment,{children:Object(De.jsxs)("div",{className:"contdash",children:[Object(De.jsx)("h2",{className:"my-2",children:"Progetti"}),Object(De.jsxs)("table",{className:"table",children:[Object(De.jsx)("thead",{children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("th",{children:"Azienda"}),Object(De.jsx)("th",{children:"Titolo"}),Object(De.jsx)("th",{children:"Anni"})]})}),Object(De.jsx)("tbody",{children:O})]})]})}),Object(De.jsx)(s.Fragment,{children:Object(De.jsxs)("div",{className:"contdash",children:[Object(De.jsx)("h2",{className:"my-2",children:"Lingue"}),Object(De.jsxs)("table",{className:"tableLing",children:[Object(De.jsx)("thead",{children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("th",{children:"Lingua"}),Object(De.jsx)("th",{children:"Ascolto"}),Object(De.jsx)("th",{children:"Lettura"}),Object(De.jsx)("th",{children:"Interazione"}),Object(De.jsx)("th",{children:"Produzione"}),Object(De.jsx)("th",{children:"Prod. Scritta"})]})}),Object(De.jsx)("tbody",{children:b})]})]})})]}):Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)("p",{children:"Non hai ancora settato il tuo profilo..."}),Object(De.jsx)(Oe.b,{to:"/create-profile",className:"btn btn-primary my-1",children:"Create Profile"})]})]})};var qe=e=>{var t;let{location:a,history:i}=e;const[n,l]=Object(s.useState)(""),[o,r]=Object(s.useState)(""),[d,j]=Object(s.useState)(""),[u,b]=Object(s.useState)(""),[h,p]=Object(s.useState)([]),[m,O]=Object(s.useState)(""),[x,g]=Object(s.useState)(""),[v,f]=Object(s.useState)(""),[y,N]=Object(s.useState)(""),[S,E]=Object(s.useState)(""),C=Object(c.b)(),I=Object(c.c)((e=>e.userLogin)),{userInfo:w}=I,B=Object(c.c)((e=>e.userDetails)),{loading:L,error:D,user:k}=B,z=Object(c.c)((e=>e.userUpdateProfile)),{success:F}=z,T=a.search?a.search.split("=")[1]:"/dashboard";a.search&&a.search.split("=")[1];console.log(w),Object(s.useEffect)((()=>{w?w&&w.username&&!F||(C({type:A}),C(Ae(w._id))):i.push("/login")}),[C,i,w,k,F]),console.log(w);return Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)(ke,{}),Object(De.jsx)("h1",{className:"large text-primary",children:"Crea Profilo"}),Object(De.jsxs)("p",{className:"lead",children:[Object(De.jsx)("i",{className:"fas fa-user"})," Aggiungi informazioni"]}),Object(De.jsx)("small",{children:"* = campi richiesti"}),Object(De.jsxs)("form",{className:"form",onSubmit:e=>{e.preventDefault();const t=document.getElementById("ocrop").value.split(", ");C(Ee({id:w._id,username:w.username,email:w.email,isAdmin:w.isAdmin,name:n,surname:o,company:d,skills:t,luogo:u,bio:x,status:m,datbir:v,nazionalit:y,cellulare:S})),i.push(T)},children:[Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"text",placeholder:"Nome",name:"nome",value:n,onChange:e=>l(e.target.value),required:!0})}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"text",placeholder:"Cognome",name:"surname",value:o,onChange:e=>r(e.target.value),required:!0})}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("input",{type:"text",placeholder:null!==(t=w.cellulare)&&void 0!==t?t:"Inserisci cellulare",name:"cellulare",value:S,onChange:e=>E(e.target.value),maxLength:12,pattern:"[0-9]{8,10}"}),Object(De.jsx)("small",{className:"form-text",children:"Cellulare"})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("input",{placeholder:"",type:"date",placeholder:w.datbir,name:"datbir",value:v,onChange:e=>f(e.target.value)}),Object(De.jsx)("small",{className:"form-text",children:"Data di Nascit\xe0"})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsxs)("select",{name:"status",value:y,onChange:e=>N(e.target.value),children:[Object(De.jsx)("option",{value:"",children:"-- Seleziona Nazionalit\xe0 --"}),Object(De.jsx)("option",{value:"afghan",children:"Afghan"}),Object(De.jsx)("option",{value:"albanian",children:"Albanian"}),Object(De.jsx)("option",{value:"algerian",children:"Algerian"}),Object(De.jsx)("option",{value:"american",children:"American"}),Object(De.jsx)("option",{value:"andorran",children:"Andorran"}),Object(De.jsx)("option",{value:"angolan",children:"Angolan"}),Object(De.jsx)("option",{value:"antiguans",children:"Antiguans"}),Object(De.jsx)("option",{value:"argentinean",children:"Argentinean"}),Object(De.jsx)("option",{value:"armenian",children:"Armenian"}),Object(De.jsx)("option",{value:"australian",children:"Australian"}),Object(De.jsx)("option",{value:"austrian",children:"Austrian"}),Object(De.jsx)("option",{value:"azerbaijani",children:"Azerbaijani"}),Object(De.jsx)("option",{value:"bahamian",children:"Bahamian"}),Object(De.jsx)("option",{value:"bahraini",children:"Bahraini"}),Object(De.jsx)("option",{value:"bangladeshi",children:"Bangladeshi"}),Object(De.jsx)("option",{value:"barbadian",children:"Barbadian"}),Object(De.jsx)("option",{value:"barbudans",children:"Barbudans"}),Object(De.jsx)("option",{value:"batswana",children:"Batswana"}),Object(De.jsx)("option",{value:"belarusian",children:"Belarusian"}),Object(De.jsx)("option",{value:"belgian",children:"Belgian"}),Object(De.jsx)("option",{value:"belizean",children:"Belizean"}),Object(De.jsx)("option",{value:"beninese",children:"Beninese"}),Object(De.jsx)("option",{value:"bhutanese",children:"Bhutanese"}),Object(De.jsx)("option",{value:"bolivian",children:"Bolivian"}),Object(De.jsx)("option",{value:"bosnian",children:"Bosnian"}),Object(De.jsx)("option",{value:"brazilian",children:"Brazilian"}),Object(De.jsx)("option",{value:"british",children:"British"}),Object(De.jsx)("option",{value:"bruneian",children:"Bruneian"}),Object(De.jsx)("option",{value:"bulgarian",children:"Bulgarian"}),Object(De.jsx)("option",{value:"burkinabe",children:"Burkinabe"}),Object(De.jsx)("option",{value:"burmese",children:"Burmese"}),Object(De.jsx)("option",{value:"burundian",children:"Burundian"}),Object(De.jsx)("option",{value:"cambodian",children:"Cambodian"}),Object(De.jsx)("option",{value:"cameroonian",children:"Cameroonian"}),Object(De.jsx)("option",{value:"canadian",children:"Canadian"}),Object(De.jsx)("option",{value:"cape verdean",children:"Cape Verdean"}),Object(De.jsx)("option",{value:"central african",children:"Central African"}),Object(De.jsx)("option",{value:"chadian",children:"Chadian"}),Object(De.jsx)("option",{value:"chilean",children:"Chilean"}),Object(De.jsx)("option",{value:"chinese",children:"Chinese"}),Object(De.jsx)("option",{value:"colombian",children:"Colombian"}),Object(De.jsx)("option",{value:"comoran",children:"Comoran"}),Object(De.jsx)("option",{value:"congolese",children:"Congolese"}),Object(De.jsx)("option",{value:"costa rican",children:"Costa Rican"}),Object(De.jsx)("option",{value:"croatian",children:"Croatian"}),Object(De.jsx)("option",{value:"cuban",children:"Cuban"}),Object(De.jsx)("option",{value:"cypriot",children:"Cypriot"}),Object(De.jsx)("option",{value:"czech",children:"Czech"}),Object(De.jsx)("option",{value:"danish",children:"Danish"}),Object(De.jsx)("option",{value:"djibouti",children:"Djibouti"}),Object(De.jsx)("option",{value:"dominican",children:"Dominican"}),Object(De.jsx)("option",{value:"dutch",children:"Dutch"}),Object(De.jsx)("option",{value:"east timorese",children:"East Timorese"}),Object(De.jsx)("option",{value:"ecuadorean",children:"Ecuadorean"}),Object(De.jsx)("option",{value:"egyptian",children:"Egyptian"}),Object(De.jsx)("option",{value:"emirian",children:"Emirian"}),Object(De.jsx)("option",{value:"equatorial guinean",children:"Equatorial Guinean"}),Object(De.jsx)("option",{value:"eritrean",children:"Eritrean"}),Object(De.jsx)("option",{value:"estonian",children:"Estonian"}),Object(De.jsx)("option",{value:"ethiopian",children:"Ethiopian"}),Object(De.jsx)("option",{value:"fijian",children:"Fijian"}),Object(De.jsx)("option",{value:"filipino",children:"Filipino"}),Object(De.jsx)("option",{value:"finnish",children:"Finnish"}),Object(De.jsx)("option",{value:"french",children:"French"}),Object(De.jsx)("option",{value:"gabonese",children:"Gabonese"}),Object(De.jsx)("option",{value:"gambian",children:"Gambian"}),Object(De.jsx)("option",{value:"georgian",children:"Georgian"}),Object(De.jsx)("option",{value:"german",children:"German"}),Object(De.jsx)("option",{value:"ghanaian",children:"Ghanaian"}),Object(De.jsx)("option",{value:"greek",children:"Greek"}),Object(De.jsx)("option",{value:"grenadian",children:"Grenadian"}),Object(De.jsx)("option",{value:"guatemalan",children:"Guatemalan"}),Object(De.jsx)("option",{value:"guinea-bissauan",children:"Guinea-Bissauan"}),Object(De.jsx)("option",{value:"guinean",children:"Guinean"}),Object(De.jsx)("option",{value:"guyanese",children:"Guyanese"}),Object(De.jsx)("option",{value:"haitian",children:"Haitian"}),Object(De.jsx)("option",{value:"herzegovinian",children:"Herzegovinian"}),Object(De.jsx)("option",{value:"honduran",children:"Honduran"}),Object(De.jsx)("option",{value:"hungarian",children:"Hungarian"}),Object(De.jsx)("option",{value:"icelander",children:"Icelander"}),Object(De.jsx)("option",{value:"indian",children:"Indian"}),Object(De.jsx)("option",{value:"indonesian",children:"Indonesian"}),Object(De.jsx)("option",{value:"iranian",children:"Iranian"}),Object(De.jsx)("option",{value:"iraqi",children:"Iraqi"}),Object(De.jsx)("option",{value:"irish",children:"Irish"}),Object(De.jsx)("option",{value:"israeli",children:"Israeli"}),Object(De.jsx)("option",{value:"italian",children:"Italiana"}),Object(De.jsx)("option",{value:"ivorian",children:"Ivorian"}),Object(De.jsx)("option",{value:"jamaican",children:"Jamaican"}),Object(De.jsx)("option",{value:"japanese",children:"Japanese"}),Object(De.jsx)("option",{value:"jordanian",children:"Jordanian"}),Object(De.jsx)("option",{value:"kazakhstani",children:"Kazakhstani"}),Object(De.jsx)("option",{value:"kenyan",children:"Kenyan"}),Object(De.jsx)("option",{value:"kittian and nevisian",children:"Kittian and Nevisian"}),Object(De.jsx)("option",{value:"kuwaiti",children:"Kuwaiti"}),Object(De.jsx)("option",{value:"kyrgyz",children:"Kyrgyz"}),Object(De.jsx)("option",{value:"laotian",children:"Laotian"}),Object(De.jsx)("option",{value:"latvian",children:"Latvian"}),Object(De.jsx)("option",{value:"lebanese",children:"Lebanese"}),Object(De.jsx)("option",{value:"liberian",children:"Liberian"}),Object(De.jsx)("option",{value:"libyan",children:"Libyan"}),Object(De.jsx)("option",{value:"liechtensteiner",children:"Liechtensteiner"}),Object(De.jsx)("option",{value:"lithuanian",children:"Lithuanian"}),Object(De.jsx)("option",{value:"luxembourger",children:"Luxembourger"}),Object(De.jsx)("option",{value:"macedonian",children:"Macedonian"}),Object(De.jsx)("option",{value:"malagasy",children:"Malagasy"}),Object(De.jsx)("option",{value:"malawian",children:"Malawian"}),Object(De.jsx)("option",{value:"malaysian",children:"Malaysian"}),Object(De.jsx)("option",{value:"maldivan",children:"Maldivan"}),Object(De.jsx)("option",{value:"malian",children:"Malian"}),Object(De.jsx)("option",{value:"maltese",children:"Maltese"}),Object(De.jsx)("option",{value:"marshallese",children:"Marshallese"}),Object(De.jsx)("option",{value:"mauritanian",children:"Mauritanian"}),Object(De.jsx)("option",{value:"mauritian",children:"Mauritian"}),Object(De.jsx)("option",{value:"mexican",children:"Mexican"}),Object(De.jsx)("option",{value:"micronesian",children:"Micronesian"}),Object(De.jsx)("option",{value:"moldovan",children:"Moldovan"}),Object(De.jsx)("option",{value:"monacan",children:"Monacan"}),Object(De.jsx)("option",{value:"mongolian",children:"Mongolian"}),Object(De.jsx)("option",{value:"moroccan",children:"Moroccan"}),Object(De.jsx)("option",{value:"mosotho",children:"Mosotho"}),Object(De.jsx)("option",{value:"motswana",children:"Motswana"}),Object(De.jsx)("option",{value:"mozambican",children:"Mozambican"}),Object(De.jsx)("option",{value:"namibian",children:"Namibian"}),Object(De.jsx)("option",{value:"nauruan",children:"Nauruan"}),Object(De.jsx)("option",{value:"nepalese",children:"Nepalese"}),Object(De.jsx)("option",{value:"new zealander",children:"New Zealander"}),Object(De.jsx)("option",{value:"ni-vanuatu",children:"Ni-Vanuatu"}),Object(De.jsx)("option",{value:"nicaraguan",children:"Nicaraguan"}),Object(De.jsx)("option",{value:"nigerien",children:"Nigerien"}),Object(De.jsx)("option",{value:"north korean",children:"North Korean"}),Object(De.jsx)("option",{value:"northern irish",children:"Northern Irish"}),Object(De.jsx)("option",{value:"norwegian",children:"Norwegian"}),Object(De.jsx)("option",{value:"omani",children:"Omani"}),Object(De.jsx)("option",{value:"pakistani",children:"Pakistani"}),Object(De.jsx)("option",{value:"palauan",children:"Palauan"}),Object(De.jsx)("option",{value:"panamanian",children:"Panamanian"}),Object(De.jsx)("option",{value:"papua new guinean",children:"Papua New Guinean"}),Object(De.jsx)("option",{value:"paraguayan",children:"Paraguayan"}),Object(De.jsx)("option",{value:"peruvian",children:"Peruvian"}),Object(De.jsx)("option",{value:"polish",children:"Polish"}),Object(De.jsx)("option",{value:"portuguese",children:"Portuguese"}),Object(De.jsx)("option",{value:"qatari",children:"Qatari"}),Object(De.jsx)("option",{value:"romanian",children:"Romanian"}),Object(De.jsx)("option",{value:"russian",children:"Russian"}),Object(De.jsx)("option",{value:"rwandan",children:"Rwandan"}),Object(De.jsx)("option",{value:"saint lucian",children:"Saint Lucian"}),Object(De.jsx)("option",{value:"salvadoran",children:"Salvadoran"}),Object(De.jsx)("option",{value:"samoan",children:"Samoan"}),Object(De.jsx)("option",{value:"san marinese",children:"San Marinese"}),Object(De.jsx)("option",{value:"sao tomean",children:"Sao Tomean"}),Object(De.jsx)("option",{value:"saudi",children:"Saudi"}),Object(De.jsx)("option",{value:"scottish",children:"Scottish"}),Object(De.jsx)("option",{value:"senegalese",children:"Senegalese"}),Object(De.jsx)("option",{value:"serbian",children:"Serbian"}),Object(De.jsx)("option",{value:"seychellois",children:"Seychellois"}),Object(De.jsx)("option",{value:"sierra leonean",children:"Sierra Leonean"}),Object(De.jsx)("option",{value:"singaporean",children:"Singaporean"}),Object(De.jsx)("option",{value:"slovakian",children:"Slovakian"}),Object(De.jsx)("option",{value:"slovenian",children:"Slovenian"}),Object(De.jsx)("option",{value:"solomon islander",children:"Solomon Islander"}),Object(De.jsx)("option",{value:"somali",children:"Somali"}),Object(De.jsx)("option",{value:"south african",children:"South African"}),Object(De.jsx)("option",{value:"south korean",children:"South Korean"}),Object(De.jsx)("option",{value:"spanish",children:"Spanish"}),Object(De.jsx)("option",{value:"sri lankan",children:"Sri Lankan"}),Object(De.jsx)("option",{value:"sudanese",children:"Sudanese"}),Object(De.jsx)("option",{value:"surinamer",children:"Surinamer"}),Object(De.jsx)("option",{value:"swazi",children:"Swazi"}),Object(De.jsx)("option",{value:"swedish",children:"Swedish"}),Object(De.jsx)("option",{value:"swiss",children:"Swiss"}),Object(De.jsx)("option",{value:"syrian",children:"Syrian"}),Object(De.jsx)("option",{value:"taiwanese",children:"Taiwanese"}),Object(De.jsx)("option",{value:"tajik",children:"Tajik"}),Object(De.jsx)("option",{value:"tanzanian",children:"Tanzanian"}),Object(De.jsx)("option",{value:"thai",children:"Thai"}),Object(De.jsx)("option",{value:"togolese",children:"Togolese"}),Object(De.jsx)("option",{value:"tongan",children:"Tongan"}),Object(De.jsx)("option",{value:"trinidadian or tobagonian",children:"Trinidadian or Tobagonian"}),Object(De.jsx)("option",{value:"tunisian",children:"Tunisian"}),Object(De.jsx)("option",{value:"turkish",children:"Turkish"}),Object(De.jsx)("option",{value:"tuvaluan",children:"Tuvaluan"}),Object(De.jsx)("option",{value:"ugandan",children:"Ugandan"}),Object(De.jsx)("option",{value:"ukrainian",children:"Ukrainian"}),Object(De.jsx)("option",{value:"uruguayan",children:"Uruguayan"}),Object(De.jsx)("option",{value:"uzbekistani",children:"Uzbekistani"}),Object(De.jsx)("option",{value:"venezuelan",children:"Venezuelan"}),Object(De.jsx)("option",{value:"vietnamese",children:"Vietnamese"}),Object(De.jsx)("option",{value:"welsh",children:"Welsh"}),Object(De.jsx)("option",{value:"yemenite",children:"Yemenite"}),Object(De.jsx)("option",{value:"zambian",children:"Zambian"}),Object(De.jsx)("option",{value:"zimbabwean",children:"Zimbabwean"})]}),Object(De.jsx)("small",{className:"form-text",children:"Nazionalit\xe0"})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsxs)("select",{name:"status",value:m,onChange:e=>O(e.target.value),children:[Object(De.jsx)("option",{children:"* Seleziona stato Professionale"}),Object(De.jsx)("option",{value:"Developer",children:"Developer"}),Object(De.jsx)("option",{value:"Junior Developer",children:"Junior Developer"}),Object(De.jsx)("option",{value:"Senior Developer",children:"Senior Developer"}),Object(De.jsx)("option",{value:"Manager",children:"Manager"}),Object(De.jsx)("option",{value:"Student or Learning",children:"Studente o Apprendista"}),Object(De.jsx)("option",{value:"Instructor",children:"Instruttore o Insegnante"}),Object(De.jsx)("option",{value:"Other",children:"Altro"})]}),Object(De.jsx)("small",{className:"form-text",children:"Dacci un idea del tuo attuale inquadramento"})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("input",{type:"text",placeholder:"Azienda",name:"company",value:d,onChange:e=>j(e.target.value)}),Object(De.jsx)("small",{className:"form-text",children:"Azienda"})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("input",{type:"text",placeholder:"Localit\xe0",name:"location",value:u,onChange:e=>b(e.target.value)}),Object(De.jsx)("small",{className:"form-text",children:"Citta & provinacia (es. Milano, MI)"})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("input",{type:"text",placeholder:"* Skills",name:"skills",value:h,id:"ocrop",onChange:e=>p(e.target.value)}),Object(De.jsx)("small",{className:"form-text",children:"Per favore usa la virgola per separare i valori (es. HTML,CSS,JavaScript,PHP)"})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("textarea",{placeholder:"Una tua breve descrizione",name:"bio",value:x,onChange:e=>g(e.target.value)}),Object(De.jsx)("small",{className:"form-text",children:"Parlaci un p\xf2 di te..."})]}),Object(De.jsx)("input",{type:"submit",className:"btn btn-primary my-1"}),Object(De.jsx)(Oe.b,{className:"btn btn-light my-1",to:"/dashboard",children:"Go Back"})]})]})};var He=e=>{let{location:t,history:a}=e;const[i,n]=Object(s.useState)(""),[l,o]=Object(s.useState)(""),[r,d]=Object(s.useState)(""),[j,u]=Object(s.useState)(""),[b,h]=Object(s.useState)(""),[p,m]=Object(s.useState)(!1),[O,g]=Object(s.useState)(""),v=Object(c.b)(),f=Object(c.c)((e=>e.userLogin)),{userInfo:y}=f,S=Object(c.c)((e=>e.userDetails)),{loading:E,error:C,user:I}=S,w=Object(c.c)((e=>e.userAddExperience)),{success:B}=w,L=t.search?t.search.split("=")[1]:"/dashboard";console.log(y),Object(s.useEffect)((()=>{y?I&&I.username&&!B||(v({type:A}),v(Ae(y._id))):a.push("/login")}),[v,a,y,I,B]),console.log(y);return Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)(ke,{}),Object(De.jsx)("h1",{className:"large text-primary",children:"Agg. Esperienza"}),Object(De.jsxs)("p",{className:"lead",children:[Object(De.jsx)("i",{className:"fas fa-code-branch"})," Aggiungi ogni posizione come programmator/developer ricoperta in passato"]}),Object(De.jsx)("small",{children:"* = campo richiesto"}),Object(De.jsxs)("form",{className:"form",onSubmit:e=>{e.preventDefault(),v(Ae(y._id)),v(((e,t)=>async(t,a)=>{try{t({type:D});const{userLogin:{userInfo:s}}=a(),i={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:n}=await fe.a.put("https://api.gestionale.ipsedocet.com/api/users/profile/experience/".concat(s._id),e,i);ye=!0,t({type:k,payload:n}),t({type:x,payload:n})}catch(C){const a=C.response&&C.response.data.message?C.response.data.message:C.message;ye||alert(a),"Request failed with status code 401"===a&&t(Ne()),t({type:N,payload:a})}})({company:i,title:l,luogo:r,from:j,to:b,current:p,description:O})),v(Ae(y._id)),a.push(L)},children:[Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"text",placeholder:"* Posizione Lavorativa",name:"title",value:l,onChange:e=>o(e.target.value),required:!0})}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"text",placeholder:"* Azienda",name:"company",value:i,onChange:e=>n(e.target.value),required:!0})}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"text",placeholder:"Luogo",name:"luogo",value:r,onChange:e=>d(e.target.value)})}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("h4",{children:"Data Inizio"}),Object(De.jsx)("input",{placeholder:"",type:"date",name:"from",value:j,onChange:e=>u(e.target.value)})]}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsxs)("p",{children:[Object(De.jsx)("input",{type:"checkbox",name:"current",onChange:e=>m(!p)})," ","Lavoro Attuale"]})}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("h4",{children:"Data Fine"}),Object(De.jsx)("input",{type:"date",name:"to",value:b,onChange:e=>h(e.target.value),disabled:p})]}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("textarea",{name:"description",cols:"30",rows:"5",placeholder:"Descrizione Mansioni",value:O,onChange:e=>g(e.target.value)})}),Object(De.jsx)("input",{type:"submit",className:"btn btn-primary my-1"}),Object(De.jsx)(Oe.b,{className:"btn btn-light my-1",to:"/dashboard",children:"Indietro"})]})]})};var _e=e=>{let{location:t,history:a}=e;const[i,n]=Object(s.useState)(""),[l,o]=Object(s.useState)(""),[r,d]=Object(s.useState)(""),[j,u]=Object(s.useState)(""),[b,h]=Object(s.useState)(""),[p,m]=Object(s.useState)(!1),[O,g]=Object(s.useState)(""),v=Object(c.b)(),f=Object(c.c)((e=>e.userLogin)),{userInfo:y}=f,S=Object(c.c)((e=>e.userDetails)),{loading:E,error:C,user:I}=S,w=Object(c.c)((e=>e.userAddEducation)),{success:B}=w,L=t.search?t.search.split("=")[1]:"/dashboard";console.log(y),Object(s.useEffect)((()=>{y?I&&I.username&&!B||(v({type:A}),v(Ae(y._id))):a.push("/login")}),[v,a,y,I,B]),console.log(y);return Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)(ke,{}),Object(De.jsx)("h1",{className:"large text-primary",children:"Aggiungi studi"}),Object(De.jsxs)("p",{className:"lead",children:[Object(De.jsx)("i",{className:"fas fa-code-branch"})," Aggiungi scuole effettuate o corsi eseguiti"]}),Object(De.jsx)("small",{children:"* = campo richiesto"}),Object(De.jsxs)("form",{className:"form",onSubmit:e=>{e.preventDefault(),v(Ae(y._id)),v((e=>async(t,a)=>{try{t({type:D});const{userLogin:{userInfo:s}}=a(),i={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:n}=await fe.a.put("https://api.gestionale.ipsedocet.com/api/users/profile/education/".concat(s._id),e,i);ye=!0,t({type:k,payload:n}),t({type:x,payload:n})}catch(C){const a=C.response&&C.response.data.message?C.response.data.message:C.message;ye||alert(a),"Request failed with status code 401"===a&&t(Ne()),t({type:N,payload:a})}})({token:y.token,id:y._id,username:y.username,email:y.email,isAdmin:y.isAdmin,school:i,degree:l,fieldofstudy:r,from:j,to:b,current:p,description:O})),v(Ae(y._id)),a.push(L)},children:[Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"text",placeholder:"* Scuola o Corso",name:"school",value:i,onChange:e=>n(e.target.value),required:!0})}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"text",placeholder:"*Grado o Certificazione",name:"degree",value:l,onChange:e=>o(e.target.value),required:!0})}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"text",placeholder:"Corso di studi",name:"fieldofstudy",value:r,onChange:e=>d(e.target.value)})}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("h4",{children:"Data inizio"}),Object(De.jsx)("input",{placeholder:"",type:"date",name:"from",value:j,onChange:e=>u(e.target.value)})]}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsxs)("p",{children:[Object(De.jsx)("input",{type:"checkbox",name:"current",checked:p,value:p,onChange:e=>m(!p)})," ","Scuola Attuale"]})}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("h4",{children:"Data fine"}),Object(De.jsx)("input",{placeholder:"",type:"date",name:"to",value:b,onChange:e=>h(e.target.value),disabled:p})]}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("textarea",{name:"description",cols:"30",rows:"5",placeholder:"Descrizione Programma",value:O,onChange:e=>g(e.target.value)})}),Object(De.jsx)("input",{type:"submit",className:"btn btn-primary my-1"}),Object(De.jsx)(Oe.b,{className:"btn btn-light my-1",to:"/dashboard",children:"Indietro"})]})]})};var Ke=()=>Object(De.jsx)(s.Fragment,{children:Object(De.jsx)("img",{src:"data:image/gif;base64,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",style:{width:"200px",margin:"auto",display:"block"},alt:"Loading..."})});var Ze=e=>{let{history:t}=e;const a=Object(c.b)(),[i,n]=Object(s.useState)(""),l=Object(c.c)((e=>e.userLogin)),{userInfo:o}=l,r=Object(c.c)((e=>e.userList)),{loading:d,error:j,users:u}=r,b=Object(c.c)((e=>e.userDelete)),{success:h}=b;Object(s.useEffect)((()=>{o&&o.isAdmin?a(Be()):t.push("/login")}),[a,t,h,o]);return Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)(ke,{}),Object(De.jsx)("div",{className:"sidebar",children:Object(De.jsxs)("ul",{children:[Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"",children:[Object(De.jsx)("i",{className:"fas fa-user-circle "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Profilo"})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",onClick:()=>(window.location="/profiles",void a({type:ue})),children:[Object(De.jsx)("i",{class:"fas fa-users"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Dipendenti "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/list-curriculum",children:[Object(De.jsx)("i",{class:"fas fa-users"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Lista CV "})]})})})]})}),d?Object(De.jsx)(Ke,{}):Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)("h1",{className:"large text-primary",children:"Dipendenti"}),Object(De.jsxs)("div",{children:[" ",Object(De.jsx)("input",{className:"barraricerca",placeholder:"Cerca...",onChange:e=>{n(e.target.value)}})]}),Object(De.jsxs)("p",{className:"lead",children:[Object(De.jsx)("i",{className:"fab fa-connectdevelop"})," Connesso con Gestionale Ipse"]}),Object(De.jsx)("div",{className:"",children:u.length>0?u.filter((e=>{try{if(""==i)return e;if(e.name.toLowerCase().includes(i.toLowerCase()))return e;if(e.surname.toLowerCase().includes(i.toLowerCase()))return e}catch(j){}})).map(((e,t)=>Object(De.jsx)("div",{hidden:void 0===e.name,className:"profileitems",children:Object(De.jsxs)("div",{children:[Object(De.jsx)("p",{className:"deleteUserX",onClick:()=>{return t=e._id,void(window.confirm("Sei sicuro di voler Eliminare?")&&window.confirm("Sei proprio sicuro di voler Eliminare?")&&a(Le(t)));var t},children:Object(De.jsx)("i",{class:"fas fa-trash-alt"})}),Object(De.jsxs)("h2",{children:[" ",e.name," ",e.surname]}),Object(De.jsxs)("p",{children:[e.status," ",e.company&&Object(De.jsxs)("span",{children:[" presso ",e.company]})]}),Object(De.jsx)("p",{children:e.situazione}),Object(De.jsx)("p",{children:e.skills+" - "}),Object(De.jsx)("p",{className:"my-1",children:t.location&&Object(De.jsx)("span",{children:e.location})}),Object(De.jsx)(Oe.b,{to:"/profile/".concat(e._id),className:"btn btn-primary",children:"Mostra Profilo"})]})}))):Object(De.jsx)("h4",{children:" Nessun profilo trovato..."})})]})]})};var Ve=e=>{let{match:t,location:a,history:i,giorno:n}=e;const[l,o]=Object(s.useState)(""),[r,d]=Object(s.useState)(""),[j,u]=Object(s.useState)(""),[b,h]=Object(s.useState)(""),[p,m]=Object(s.useState)(""),[O,x]=Object(s.useState)(""),[g,v]=Object(s.useState)(""),[S,E]=Object(s.useState)(""),[C,I]=Object(s.useState)(""),[w,B]=Object(s.useState)(""),[L,D]=Object(s.useState)(!1),k=Object(c.b)(),z=Object(c.c)((e=>e.userLogin)),{userInfo:F}=z,T=Object(c.c)((e=>e.userByid)),{loading:R,error:U,user:P}=T,M=Object(c.c)((e=>e.userAddEvento)),{success:G}=M,Q=P._id;Object(s.useEffect)((()=>{P?P&&P.username&&!G||(k({type:A}),k(Se(P._id)),window.location.reload("/profile/".concat(P._id))):i.push("/login")}),[k,i,F,G]),Object(s.useEffect)((()=>{setTimeout((()=>{m("Lavorato"),m("Ferie"),m(""),W("")}),1)}),[]);const W=e=>{let t=document.getElementById("tipoevento");"Lavorato"===t.value?document.getElementById("orelavorate").style.display="block":document.getElementById("orelavorate").style.display="none","Straordinario"===t.value?document.getElementById("orestraordinario").style.display="block":document.getElementById("orestraordinario").style.display="none","Mutua"===t.value?document.getElementById("oremutua").style.display="block":document.getElementById("oremutua").style.display="none","Ferie"===t.value?document.getElementById("oreferie").style.display="block":document.getElementById("oreferie").style.display="none","Permesso"===t.value?document.getElementById("orepermesso").style.display="block":document.getElementById("orepermesso").style.display="none"};return Object(De.jsx)("div",{className:"ModFinestra",children:Object(De.jsx)("div",{className:"bodyWind",children:Object(De.jsxs)(s.Fragment,{children:[Object(De.jsxs)("p",{className:"titleWind",children:["Lavorato ",n]}),Object(De.jsxs)("p",{className:"testoWind",children:[Object(De.jsx)("i",{className:"fas fa-code-branch"})," Aggiungi ore Lavorate"]}),Object(De.jsxs)("form",{className:"form",onSubmit:e=>{const t=n+"T"+document.getElementById("init").value+":00",a=n+"T"+document.getElementById("fin").value+":00",s=n;e.preventDefault(),k(Se(P._id)),k(((e,t)=>async(a,s,i)=>{try{a({type:f});const{userLogin:{userInfo:i}}=s(),n={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:c}=await fe.a.put("https://api.gestionale.ipsedocet.com/api/users/profile/evento/admin/".concat(e),t,n);a({type:y,payload:c}),a({type:de,payload:c}),window.location.reload("/"),ye=!0}catch(U){const t=U.response&&U.response.data.message?U.response.data.message:U.message;ye||alert(t),"Request failed with status code 401"===t&&a(Ne()),a({type:N,payload:t})}})(Q,{title:l,ore:r,start:t,end:a,date:s,orepermessi:O,oreferie:S,oremutua:C,orestraordinario:g,tipoevento:p,note:w})),k(Se(P._id))},children:[Object(De.jsx)("div",{className:"inputWind",children:Object(De.jsx)("input",{type:"text",placeholder:"Titolo evento/ Cliente",name:"title",value:l,onChange:e=>o(e.target.value),className:"inputWind",required:!0})}),Object(De.jsx)("div",{className:"inputWind",onChange:W,children:Object(De.jsxs)("select",{required:!0,id:"tipoevento",name:"tipoevento",value:p,onChange:e=>m(e.target.value),required:!0,children:[Object(De.jsx)("option",{value:"",children:"* Seleziona attivit\xe0"}),Object(De.jsx)("option",{value:"Lavorato",children:"Lavorato"}),Object(De.jsx)("option",{value:"Ferie",children:"Ferie"}),Object(De.jsx)("option",{value:"Straordinario",children:"Straordinario"}),Object(De.jsx)("option",{value:"Mutua",children:"Mutua"}),Object(De.jsx)("option",{value:"Permesso",children:"Permesso"})]})}),Object(De.jsx)("div",{id:"orelavorate",className:"inputWind",children:Object(De.jsx)("input",{id:"ciao",type:"number",placeholder:"*Num. ore Lavorate",name:"ore",value:r,onChange:e=>d(e.target.value),className:"inputWind",max:"24",id:"orelavorate"})}),Object(De.jsx)("div",{id:"oreferie",className:"inputWind",children:Object(De.jsx)("input",{type:"number",placeholder:"*Num. ore Ferie",name:"oreferie",value:S,onChange:e=>E(e.target.value),className:"inputWind",max:"24"})}),Object(De.jsx)("div",{id:"orepermesso",className:"inputWind",children:Object(De.jsx)("input",{type:"number",placeholder:"*Num. ore Permesso",name:"orepermessi",value:O,onChange:e=>x(e.target.value),className:"inputWind",max:"24"})}),Object(De.jsx)("div",{id:"orestraordinario",className:"inputWind",children:Object(De.jsx)("input",{type:"number",placeholder:"*Num. ore Straordinario",name:"orestraordinario",value:g,onChange:e=>v(e.target.value),className:"inputWind",max:"24"})}),Object(De.jsx)("div",{id:"oremutua",className:"inputWind",children:Object(De.jsx)("input",{type:"number",placeholder:"*Num. ore Mutua",name:"orestraordinario",value:C,onChange:e=>I(e.target.value),className:"inputWind",max:"24"})}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("textarea",{placeholder:"Note",name:"bio",value:w,onChange:e=>B(e.target.value),maxLength:300})}),Object(De.jsxs)("div",{children:[Object(De.jsxs)("p",{className:"textinputcheck",children:[Object(De.jsx)("input",{type:"checkbox",name:"all",onChange:e=>{document.getElementById("init").value="09:00",document.getElementById("fin").value="18:00"}})," ","Giornata Intera"]}),Object(De.jsxs)("div",{className:"contWind1",children:[Object(De.jsx)("h4",{className:"subtitleWind",children:"Inizio"}),Object(De.jsx)("input",{type:"time",name:"orainizio",value:b||"09:00",onChange:e=>h(e.target.value),className:"inputWind",disabled:L,id:"init"})]}),Object(De.jsxs)("div",{className:"contWind2",children:[Object(De.jsx)("h4",{className:"subtitleWind",children:"Fine"}),Object(De.jsx)("input",{type:"time",name:"orafine",value:j||"18:00",onChange:e=>u(e.target.value),className:"inputWind",disabled:L,id:"fin"})]})]}),Object(De.jsx)("div",{className:"btnDiv",children:Object(De.jsx)("input",{type:"submit",className:"btnSalva"})})]})]})})})},Xe=a(45),$e=a.n(Xe);var et=e=>{let{dipendente:t}=e;const a=Object(c.b)(),i=Object(c.c)((e=>e.userByid)),{loading:n,error:l,user:o}=i,[r,d]=Object(s.useState)(""),[j,u]=Object(s.useState)(""),[b,h]=Object(s.useState)("");Object(s.useEffect)((()=>{var e;(null!==(e=!o)&&void 0!==e?e:o.isAdmin)?window.location.push("/login"):o&&o.name||(a(Se(t)),a(Se(t)))}),[a,o]);o.evento;const p=o.name+"."+o.surname+Fe(Date.now());return Object(De.jsx)(s.Fragment,{children:n?Object(De.jsx)(Ke,{}):Object(De.jsxs)(s.Fragment,{children:[Object(De.jsxs)("h3",{children:[o.name," ",o.surname," "," "," ","-- "+o.email]}),Object(De.jsx)("input",{className:"ricerca",placeholder:"",onChange:e=>d(e.target.value)}),Object(De.jsx)($e.a,{id:"test-table-xls-button",className:"download-table-xls-button",table:"estrazione",filename:p,sheet:p,buttonText:"Estrai"}),Object(De.jsx)("div",{className:"",children:Object(De.jsxs)("table",{id:"estrazione",className:"table-to-xls",children:[Object(De.jsx)("thead",{className:"thead",children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("th",{children:"Inizio"}),Object(De.jsx)("th",{children:"Titolo"}),Object(De.jsx)("th",{children:"Tipologia"}),Object(De.jsx)("th",{children:"Ore Lavorate"}),Object(De.jsx)("th",{children:"Straordinari"}),Object(De.jsx)("th",{children:"Ferie"}),Object(De.jsx)("th",{children:"Permessi"}),Object(De.jsx)("th",{children:"Mutua"}),Object(De.jsx)("th",{children:"Note"})]})}),o.evento.length>0?o.evento.filter((e=>""==r||e.start.toLowerCase().includes(r.toLowerCase())?e:void 0)).map(((e,t)=>Object(De.jsx)("tbody",{children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("td",{children:void 0===e.start?null:e.start.substring(0,10)}),Object(De.jsx)("td",{children:e.title}),Object(De.jsx)("td",{children:e.tipoevento}),Object(De.jsx)("td",{children:e.ore}),Object(De.jsx)("td",{children:e.orestraordinario}),Object(De.jsx)("td",{children:e.oreferie}),Object(De.jsx)("td",{children:e.orepermessi}),Object(De.jsx)("td",{children:e.oremutua}),Object(De.jsx)("td",{children:e.note})]})}))):Object(De.jsx)("h4",{children:"Nessun evento trovato..."})]})})]})})};var tt=e=>{let{match:t,location:a,history:i,giorno:n}=e;const[l,o]=Object(s.useState)(""),r=Object(c.b)(),d=Object(c.c)((e=>e.userLogin)),{userInfo:j}=d,u=Object(c.c)((e=>e.userByid)),{loading:b,error:h,user:p}=u,m=Object(c.c)((e=>e.userUpdateBlocco)),{success:O}=m;p._id;Object(s.useEffect)((()=>{p?p&&p.username&&!O||(r({type:A}),r(Se(p._id)),window.location.reload("/profile/".concat(p._id))):i.push("/login")}),[r,i,j,O]);return Object(De.jsx)("div",{className:"ModFinestra",children:Object(De.jsx)("div",{className:"bodyWind",children:Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)("p",{className:"titleWind2",children:"Blocca Eventi "}),Object(De.jsxs)("p",{className:"testoWind",children:[Object(De.jsx)("i",{className:"fas fa-code-branch"})," ",p.name," ",p.surname]}),Object(De.jsxs)("form",{className:"form",onSubmit:e=>{e.preventDefault(),r(Se(p._id)),r(((e,t)=>async(a,s)=>{try{a({type:D});const{userLogin:{userInfo:i}}=s(),n={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:c}=await fe.a.put("https://api.gestionale.ipsedocet.com/api/users/admin/".concat(e),t,n);a({type:k}),a({type:de,payload:c}),a({type:ue}),ye=!0}catch(h){const t=h.response&&h.response.data.message?h.response.data.message:h.message;ye||alert(t),"Request failed with status code 401"===t&&a(Ne()),a({type:z,payload:t})}})(p._id,{id:p._id,username:p.username,email:p.email,isAdmin:j.isAdmin,blocco:l})),r(Se(p._id))},children:[Object(De.jsx)("div",{className:"inputWind2",children:Object(De.jsx)("input",{type:"date",placeholder:"",name:"ore",value:l,onChange:e=>o(e.target.value),className:"inputWind",required:!0})}),Object(De.jsx)("div",{className:"btnDiv",children:Object(De.jsx)("input",{type:"submit",className:"btnSalva2"})})]})]})})})};var at=e=>{let{match:t,location:a,history:i,idUser:n,idEvento:l}=e;const o=l,r=Object(c.b)(),d=Object(c.c)((e=>e.userLogin)),{userInfo:j}=d,u=Object(c.c)((e=>e.userByid)),{loading:b,error:h,user:p}=u,m=Object(c.c)((e=>e.userGetEventoAdmin)),{eventodata:O}=m,[x,g]=Object(s.useState)(""),[v,A]=Object(s.useState)(""),[S,E]=Object(s.useState)(""),[C,I]=Object(s.useState)(""),[w,B]=Object(s.useState)(""),[L,D]=Object(s.useState)(""),[k,z]=Object(s.useState)(""),[F,T]=Object(s.useState)(""),[R,U]=Object(s.useState)(""),[P,M]=Object(s.useState)(""),[G,Q]=Object(s.useState)(!1);Object(s.useEffect)((()=>{p?p&&p.username||window.location.reload("/profile/".concat(n)):i.push("/login")}),[r,i,j,p]),Object(s.useEffect)((e=>{r(((e,t)=>async(a,s,i)=>{try{a({type:V});const s={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:i}=await fe.a.get("https://api.gestionale.ipsedocet.com/api/users/profile/evento/admin/".concat(e,"/").concat(t),s);console.log(t),a({type:X,payload:i}),ye=!0}catch(h){const t=h.response&&h.response.data.message?h.response.data.message:h.message;ye||alert(t),"Request failed with status code 401"===t&&a(Ne()),a({type:$,payload:t})}})(p._id,o)),r({type:X,payload:O}),setTimeout((()=>{B("Lavorato"),B("Ferie"),B(""),J("")}),[O],1)}),[]);const W=O.date,J=e=>{let t=document.getElementById("tipoevento");"Lavorato"===t.value?document.getElementById("orelavorate").style.display="block":document.getElementById("orelavorate").style.display="none","Straordinario"===t.value?document.getElementById("orestraordinario").style.display="block":document.getElementById("orestraordinario").style.display="none","Mutua"===t.value?document.getElementById("oremutua").style.display="block":document.getElementById("oremutua").style.display="none","Ferie"===t.value?document.getElementById("oreferie").style.display="block":document.getElementById("oreferie").style.display="none","Permesso"===t.value?document.getElementById("orepermesso").style.display="block":document.getElementById("orepermesso").style.display="none"};return Object(De.jsx)("div",{className:"ModFinestra",children:Object(De.jsx)("div",{className:"bodyWind",children:Object(De.jsx)(s.Fragment,{children:Object(De.jsxs)("form",{className:"form",onSubmit:e=>{const t=W+"T"+document.getElementById("init").value+":00",a=W+"T"+document.getElementById("fin").value+":00",s=W;e.preventDefault(),r(Se(p._id)),r(((e,t,a)=>async(s,i,n)=>{try{s({type:f});const{userLogin:{userInfo:n}}=i(),c={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:l}=await fe.a.post("https://api.gestionale.ipsedocet.com/api/users/profile/evento/admin/"+e+"/"+t,a,c);s({type:y,payload:l}),s({type:de,payload:l}),window.location.reload("/"),ye=!0}catch(h){const t=h.response&&h.response.data.message?h.response.data.message:h.message;ye||alert(t),"Request failed with status code 401"===t&&s(Ne()),s({type:N,payload:t})}})(p._id,o,{title:x,ore:v,start:t,end:a,date:s,orepermessi:L,oreferie:F,oremutua:R,orestraordinario:k,tipoevento:w,note:P})),r(Se(p._id))},children:[Object(De.jsx)("div",{className:"inputWind",children:Object(De.jsx)("input",{type:"text",placeholder:O.title,name:"title",value:x,onChange:e=>g(e.target.value),className:"inputWind"})}),Object(De.jsx)("div",{className:"inputWind",onChange:J,children:Object(De.jsxs)("select",{id:"tipoevento",name:"tipoevento",value:w,onChange:e=>B(e.target.value),required:!0,children:[Object(De.jsx)("option",{value:"",children:"* Seleziona attivit\xe0"}),Object(De.jsx)("option",{value:"Lavorato",children:"Lavorato"}),Object(De.jsx)("option",{value:"Ferie",children:"Ferie"}),Object(De.jsx)("option",{value:"Straordinario",children:"Straordinario"}),Object(De.jsx)("option",{value:"Mutua",children:"Mutua"}),Object(De.jsx)("option",{value:"Permesso",children:"Permesso"})]})}),Object(De.jsx)("div",{id:"orelavorate",className:"inputWind",children:Object(De.jsx)("input",{type:"number",placeholder:v||O.ore,name:"ore",value:v,onChange:e=>A(e.target.value),className:"inputWind",max:"24",id:"orelavorate"})}),Object(De.jsx)("div",{id:"oreferie",className:"inputWind",children:Object(De.jsx)("input",{type:"number",placeholder:F||O.oreferie,name:"oreferie",value:F,onChange:e=>T(e.target.value),className:"inputWind",max:"24"})}),Object(De.jsx)("div",{id:"orepermesso",className:"inputWind",children:Object(De.jsx)("input",{type:"number",placeholder:L||O.orepermessi,name:"orepermessi",value:L,onChange:e=>D(e.target.value),className:"inputWind",max:"24"})}),Object(De.jsx)("div",{id:"orestraordinario",className:"inputWind",children:Object(De.jsx)("input",{type:"number",placeholder:k||O.orestraordinario,name:"orestraordinario",value:k,onChange:e=>z(e.target.value),className:"inputWind",max:"24"})}),Object(De.jsx)("div",{id:"oremutua",className:"inputWind",children:Object(De.jsx)("input",{type:"number",placeholder:R||O.oremutua,name:"orestraordinario",value:R,onChange:e=>U(e.target.value),className:"inputWind",max:"24"})}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("textarea",{placeholder:O.note||"Note",name:"bio",value:P,onChange:e=>M(e.target.value),maxLength:25})}),Object(De.jsxs)("div",{children:[Object(De.jsxs)("p",{className:"textinputcheck",children:[Object(De.jsx)("input",{type:"checkbox",name:"all",onChange:e=>{document.getElementById("init").value="09:00",document.getElementById("fin").value="18:00"}})," ","Giornata Intera"]}),Object(De.jsxs)("div",{className:"contWind1",children:[Object(De.jsx)("h4",{className:"subtitleWind",children:"Inizio"}),Object(De.jsx)("input",{type:"time",name:"orainizio",value:C||"09:00",onChange:e=>I(e.target.value),className:"inputWind",disabled:G,id:"init"})]}),Object(De.jsxs)("div",{className:"contWind2",children:[Object(De.jsx)("h4",{className:"subtitleWind",children:"Fine"}),Object(De.jsx)("input",{type:"time",name:"orafine",value:S||"18:00",onChange:e=>E(e.target.value),className:"inputWind",disabled:G,id:"fin"})]})]}),Object(De.jsx)("div",{className:"btnDiv",children:Object(De.jsx)("input",{type:"submit",className:"btnSalva"})})]})})})})};var st=e=>{let{match:t,evento:a,dipendente:i}=e;var n=!1;const l=Object(c.b)(),o=Object(c.c)((e=>e.userLogin)),{userInfo:r}=o,d=Object(c.c)((e=>e.userByid)),{loading:j,error:u,user:b}=d,h=Object(c.c)((e=>e.userDeleteEvento)),{successDeleteEvento:p}=h,m=e=>{var t,a;n=!0,window.confirm("Sei Sicuro?")&&(l((t=i,a=e,async(e,s)=>{try{e({type:Y});const{userLogin:{userInfo:i}}=s(),n={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:c}=await fe.a.delete("https://api.gestionale.ipsedocet.com/api/users/profile/evento/admin/".concat(t,"/").concat(a),n);e({type:de,payload:c}),e({type:q,payload:c}),e({type:y}),ye=!0}catch(u){const a=u.response&&u.response.data.message?u.response.data.message:u.message;ye||alert(a),"Request failed with status code 401"===a&&e(Ne()),e({type:H,payload:a})}})),l(Se(i))),l(Se(i))};const[O,x]=Object(s.useState)(""),[g,v]=Object(s.useState)(""),[f,N]=Object(s.useState)(""),[A,S]=Object(s.useState)(""),[E,C]=Object(s.useState)(""),[I,w]=Object(s.useState)(""),[B,L]=Object(s.useState)(""),[D,k]=Object(s.useState)(""),[z,F]=Object(s.useState)(""),[T,R]=Object(s.useState)(""),[U,P]=Object(s.useState)(""),[M,G]=Object(s.useState)(""),[Q,W]=Object(s.useState)(""),[J,_]=Object(s.useState)("prova"),[K,Z]=Object(s.useState)(!1),[V,X]=Object(s.useState)(!1),[$,ee]=Object(s.useState)(!1);return Object(De.jsxs)("div",{className:"contCalendar",children:[Object(De.jsxs)(Me.a,{isOpen:$,onRequestClose:()=>ee(!1),style:{overlay:{zIndex:"100 ",opacity:"100%"},content:{color:"#fff",backgroundColor:" #0077ff",width:"350px",height:"300px",marginLeft:"35%",marginTop:"2%",marginBottom:"50px",position:"inherit",opacity:"100%",borderRadius:"30px",zIndex:"100 "}},children:[Object(De.jsx)("p",{onClick:()=>ee(!1),className:"chiusuraModal",children:"X"}),Object(De.jsx)(tt,{className:"modalCont"})]}),Object(De.jsxs)(Me.a,{className:"ModalEvent",isOpen:K,onRequestClose:()=>Z(!1),style:{overlay:{zIndex:"100 ",opacity:"100%"},content:{color:"#fff",backgroundColor:" #0077ff",width:"400px",height:"610px",marginLeft:"35%",marginTop:"2%",marginBottom:"50px",position:"inherit",opacity:"100%",borderRadius:"30px",zIndex:"100 "}},children:[Object(De.jsx)("p",{onClick:()=>Z(!1),className:"chiusuraModal",children:"X"}),Object(De.jsx)(Ve,{className:"modalCont",giorno:J})]}),Object(De.jsxs)(Me.a,{className:"ModalEvent",isOpen:V,onRequestClose:()=>X(!1),style:{overlay:{zIndex:"100 ",opacity:"100%"},content:{color:"#fff",backgroundColor:" #0077ff",width:"400px",height:"610px",marginLeft:"35%",marginTop:"2%",marginBottom:"50px",position:"inherit",opacity:"100%",borderRadius:"30px",zIndex:"100 "}},children:[Object(De.jsx)("p",{onClick:()=>X(!1),className:"chiusuraModal",children:"X"}),Object(De.jsx)(at,{className:"modalCont",idEvento:g,titolo:f,nore:A,starteve:I,endeve:B,norepermessi:D,noreferie:z,noremutua:T,norestraordinario:U,gtipoevento:M,gnote:Q,idUser:b._id,giorno:E})]}),Object(De.jsx)("div",{className:"contenitoreCal",children:Object(De.jsx)(ge.a,{style:{width:"400px",zIndex:"1"},validRange:{start:b.blocco},plugins:[Te.b,Ue.a,Re.a],initialView:"dayGridMonth",headerToolbar:{left:"prev,next today blocca",center:"title",right:"dayGridMonth,timeGridWeek,timeGridDay"},customButtons:{blocca:{text:"Blocca",click:function(){ee(!0)}}},customButtons2:{prova:{text:"prova",click:function(){ee(!0)}}},firstDay:1,locale:"it",selectable:!0,events:a,eventContent:function(e){return Object(De.jsx)("div",{className:"contCal",style:{background:" #0077ff",paddingTop:"1px",paddingBottom:"10px",paddingLeft:"1%",height:"130px",marginBottom:"1px",width:"100%",zIndex:"100",marginTop:"10%"},children:Object(De.jsxs)("div",{children:[Object(De.jsxs)("div",{children:[Object(De.jsx)("p",{className:"deleteEvento",onClick:t=>m(e.event.extendedProps._id),children:"X"}),Object(De.jsx)("h3",{style:{color:"black",paddingLeft:"4%"},children:e.event.title.substring(0,10)})]}),Object(De.jsxs)("div",{children:[Object(De.jsxs)("h5",{style:{fontSize:"0.8rem",color:"white ",paddingLeft:"4%"},children:["Lavorate: ",e.event.extendedProps.ore]}),Object(De.jsxs)("h6",{style:{fontSize:"0.8rem",color:"white ",paddingLeft:"4%"},children:[" Straordinario: ",e.event.extendedProps.orestraordinario]}),Object(De.jsxs)("h6",{style:{fontSize:"0.8rem",color:"white ",paddingLeft:"4%"},children:["Ferie: ",e.event.extendedProps.oreferie]})," ",Object(De.jsxs)("h6",{style:{fontSize:"0.8rem",color:"white ",paddingLeft:"4%"},children:[" Mutua: ",e.event.extendedProps.oremutua]}),Object(De.jsxs)("h6",{style:{fontSize:"0.8rem",color:"white ",paddingLeft:"4%"},children:[" Permessi: ",e.event.extendedProps.orepermessi]})]}),Object(De.jsxs)("p",{children:[" ",e.event.extendedProps.start]}),Object(De.jsxs)("p",{children:[" ",e.event.extendedProps.end]})]})})},editable:!1,dateClick:e=>(e=>{_(e.dateStr),Z(!0)})(e),eventClick:e=>{!function(e,t){setTimeout((()=>{n||(e.event._instance.range.start.toISOString().slice(0,10),v(e.event.extendedProps._id),X(!0))}),10)}(e)}})})]})},it=a(58);a(175);class nt extends s.Component{constructor(e){super(e),this.state={info:{},id:this.props.test},this.state.info.experience=[],this.state.info.education=[],this.state.info.skills=[],this.state.info.lingue=[],this.state.info.hobby=[],this.state.info.competenzedig=[]}componentDidMount(){const e={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}};fe.a.get("https://api.gestionale.ipsedocet.com/api/users/anagrafica/"+this.state.id,e).then((e=>{this.setState({info:e.data})})).catch((e=>{this.setState({errorMessage:e.message}),alert(e),console.error("There was an error!",e)}))}render(){return Object(De.jsxs)("div",{children:[Object(De.jsxs)("div",{className:"",children:[Object(De.jsx)("div",{className:"",children:Object(De.jsx)("p",{className:"titleparag",children:"INFORMAZIONI PERSONALI"})}),Object(De.jsxs)("div",{className:"infoanagrafica",children:[Object(De.jsxs)("p",{className:"anagraficap",children:[this.state.info.name," ",this.state.info.surname]}),Object(De.jsxs)("p",{className:"anagraficap",children:[Object(De.jsx)("i",{class:"fas fa-map-marked-alt"})," ",this.state.info.indirizzo]}),Object(De.jsxs)("p",{className:"anagraficap",children:[Object(De.jsx)("i",{class:"fas fa-mobile-alt"})," ",this.state.info.cellulare]}),Object(De.jsxs)("p",{className:"anagraficap",children:[Object(De.jsx)("i",{class:"fas fa-envelope"})," ",this.state.info.email2]}),Object(De.jsx)("p",{className:"dati-ana",children:"Sesso:"})," ",Object(De.jsx)("p",{className:"anagraficap",children:this.state.info.genere}),Object(De.jsx)("p",{className:"dati-ana",children:"Data di nascita:"})," ",Object(De.jsx)("p",{className:"anagraficap",children:this.state.info.datbir}),Object(De.jsx)("p",{className:"dati-ana",children:"Nazionalit\xe0"})," ",Object(De.jsx)("p",{className:"anagraficap",children:this.state.info.nazionalit})]})]}),Object(De.jsx)("div",{className:"",children:Object(De.jsxs)("div",{className:"",children:[Object(De.jsx)("div",{className:""}),Object(De.jsxs)("div",{children:[Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)("div",{children:Object(De.jsx)("p",{className:"titleparag",children:"ESPERIENZA PROFESSIONALE"})}),Object(De.jsx)("div",{className:"tableExpdiv",children:Object(De.jsxs)("table",{className:"tableExp",children:[Object(De.jsx)("thead",{children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("th",{children:""}),Object(De.jsx)("th",{children:" "})]})}),this.state.info.experience.map((e=>Object(De.jsx)("tbody",{children:Object(De.jsxs)("tr",{children:[Object(De.jsxs)("td",{className:"tableData-Data",children:[Object(De.jsxs)("p",{className:"paragTableExp",children:[Fe(e.from)," - ",e.to?Fe(e.to):"Oggi"]})," "]}),Object(De.jsxs)("td",{className:"tableData-Descr",children:[Object(De.jsx)("p",{className:"dati-ana",children:e.title}),Object(De.jsxs)("p",{className:"dati-ana",children:[e.company," - ",e.luogo]}),Object(De.jsx)("p",{className:"paragTableExpDesc",children:e.description})]})]})})))]})})]}),Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)("div",{children:Object(De.jsx)("p",{className:"titleparag",children:"ISTRUZIONE E FORMAZIONE"})}),Object(De.jsx)("div",{className:"tableEdudiv",children:Object(De.jsxs)("table",{children:[Object(De.jsx)("thead",{children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("th",{}),Object(De.jsx)("th",{}),Object(De.jsx)("th",{})]})}),this.state.info.education.map((e=>Object(De.jsx)("tbody",{children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("td",{className:"tableData-Data",children:Object(De.jsxs)("p",{className:"paragTableExp",children:[Fe(e.from)," - ",e.to?Fe(e.to):"Oggi"]})}),Object(De.jsxs)("td",{className:"tableData-Descr",children:[Object(De.jsxs)("p",{className:"dati-ana",children:[e.fieldofstudy," - ",e.degree]}),Object(De.jsxs)("p",{className:"dati-ana",children:[e.shool," - ",e.luogo]}),Object(De.jsx)("p",{className:"paragTableExpDesc",children:e.description})]})]})})))]})})]}),Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)("p",{className:"titleparag",children:"COMPETENZE PERSONALI"}),Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)("div",{children:Object(De.jsx)("p",{className:"titleparag",children:"Lingue Straniere"})}),Object(De.jsx)("div",{className:"tablelinguadiv",children:Object(De.jsx)("table",{className:"tablelingua",children:Object(De.jsx)("thead",{children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("th",{className:"th-tablelinguadiv1",children:"COMPRENSIONE"}),Object(De.jsx)("th",{className:"th-tablelinguadiv2",children:"PARLATO"}),Object(De.jsx)("th",{className:"th-tablelinguadiv3",children:"PRODUZIONE SCRITTA"})]})})})}),Object(De.jsx)("div",{className:"tablelinguadiv2",children:Object(De.jsxs)("table",{className:"tablelingua",children:[Object(De.jsx)("thead",{children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("th",{className:"th-tablelingua",children:" "}),Object(De.jsx)("th",{className:"th-tablelingua1",children:"Ascolto "}),Object(De.jsx)("th",{className:"th-tablelingua2",children:"Lettura"}),Object(De.jsx)("th",{className:"th-tablelingua3",children:"Interazione"}),Object(De.jsx)("th",{className:"th-tablelingua4",children:"Produzione"}),Object(De.jsx)("th",{className:"th-tablelingua5",children:"Produzione Scritta"})]})}),this.state.info.lingue.map((e=>Object(De.jsx)("tbody",{children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("td",{children:Object(De.jsxs)("p",{className:"dati-ana",children:[e.lingua," "]})}),Object(De.jsx)("td",{className:"th-tabledina1",children:Object(De.jsx)("p",{className:"dati-ana",children:e.livascolt})}),Object(De.jsx)("td",{className:"th-tabledina2",children:Object(De.jsx)("p",{className:"dati-ana",children:e.livlett})}),Object(De.jsx)("td",{className:"th-tabledina3",children:Object(De.jsxs)("p",{className:"dati-ana",children:[e.livinter," "]})}),Object(De.jsx)("td",{className:"th-tabledina4",children:Object(De.jsx)("p",{className:"dati-ana",children:e.livprod})}),Object(De.jsx)("td",{className:"th-tabledina5",children:Object(De.jsx)("p",{className:"dati-ana",children:e.livprodscrt})})]})})))]})}),Object(De.jsx)("div",{children:Object(De.jsx)("p",{className:"legend-ling",children:"Livelli: A1 e A2: Utente base - B1 e B2: Utente autonomo - C1 e C2: Utente avanzato"})})]})]}),Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)("div",{children:Object(De.jsx)("p",{className:"titleparag",children:"Competenze professionali "})}),this.state.info.skills.map((e=>Object(De.jsx)("div",{children:Object(De.jsx)("edo",{children:Object(De.jsx)("li",{className:"listaComp",children:e})})})))]}),Object(De.jsxs)("div",{children:[Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)("div",{children:Object(De.jsx)("p",{className:"titleparag",children:"Competenze Digitali "})}),this.state.info.competenzedig.map((e=>Object(De.jsx)("div",{children:Object(De.jsx)("edo",{children:Object(De.jsx)("li",{className:"listaComp",children:e})})})))]}),Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)("div",{children:Object(De.jsx)("p",{className:"titleparag",children:"Ulteriori Informazione e Hobby"})}),this.state.info.hobby.map((e=>Object(De.jsx)("div",{children:Object(De.jsx)("edo",{children:Object(De.jsx)("li",{className:"listaComp",children:e})})})))]})]}),Object(De.jsxs)("div",{children:[Object(De.jsx)("p",{className:"titleparag",children:" Trattamento dei dati personali"}),Object(De.jsx)("p",{className:"trattDati",children:"Autorizzo il trattamento dei miei dati "}),Object(De.jsx)("p",{className:"trattDati",children:' personali ai sensi del Decreto Legislativo 30 giugno 2003, n. 196 "Codice in materia di protezione dei dati personali.'})]})]}),Object(De.jsx)("div",{})]})})]})}}var ct=nt;var lt=e=>{let{match:t,history:a}=e;const i=t.params.id,n=Object(c.b)();console.log(i);const l=Object(s.useRef)();console.log(l.current);const o=Object(it.useReactToPrint)({content:()=>l.current});return Object(De.jsxs)("div",{children:[Object(De.jsx)(ke,{}),Object(De.jsx)("div",{children:Object(De.jsx)("div",{className:"sidebar",children:Object(De.jsxs)("ul",{children:[Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"",children:[Object(De.jsx)("i",{className:"fas fa-user-circle "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Profilo"})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/profiles",children:[Object(De.jsx)("i",{class:"fas fa-users"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Dipendenti "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/edit-profile/".concat(i),children:[Object(De.jsx)("i",{className:"fas fa-cogs"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Edit "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-experience/".concat(i),children:[Object(De.jsx)("i",{className:"fab fa-black-tie "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Lavoro "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-education/".concat(i),children:[Object(De.jsx)("i",{className:"fas fa-graduation-cap "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Studi "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-project/".concat(i),children:[Object(De.jsx)("i",{className:"fas fa-briefcase "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Progetto "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-payment/".concat(i),children:[Object(De.jsx)("i",{className:"fas fa-credit-card "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Pagamento "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-lingue/".concat(i),children:[Object(De.jsx)("i",{class:"fas fa-language"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Lingue "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/curriculum/".concat(i),children:[Object(De.jsx)("i",{class:"far fa-file"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Curriculum "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/list-pagamenti/".concat(i),children:[Object(De.jsx)("i",{class:"fas fa-file-csv"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Estract Pay"})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/list-event/".concat(i),children:[Object(De.jsx)("i",{class:"fas fa-file-csv"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Estract Eve "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("div",{className:"Bottoneeliminauser",children:Object(De.jsxs)("button",{className:"btn btn-danger",onClick:()=>{return e=i,void(window.confirm("Sei sicuro?")&&(n(Le(e)),a.push("/profiles")));var e},children:[Object(De.jsx)("i",{className:"fas fa-user-minus"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Delete Account"})]})})})]})})}),Object(De.jsxs)("div",{className:"contdashPrint",children:[Object(De.jsx)(ct,{test:i,ref:l}),Object(De.jsx)("div",{children:Object(De.jsxs)("button",{className:"btnEstrai",onClick:o,children:["Salva CV "," ",Object(De.jsx)("i",{class:"fas fa-file-pdf"})]})})]}),Object(De.jsx)("div",{})]})};var ot=e=>{let{match:t,history:a,location:i}=e;const n=Object(c.b)(),l=t.params.id,o=Object(c.c)((e=>e.userByid)),{loading:r,error:d,user:j}=o;console.log(j);Object(s.useEffect)((()=>{var e;(null!==(e=!j)&&void 0!==e?e:j.isAdmin)?a.push("/login"):j&&j.name&&j.username||(n(Se(l)),n(Se(l)))}),[n,j,a,l]);const u=(e,t)=>{window.confirm("Sei sicuro?")&&(n(Se(e)),n(((e,t)=>async(a,s,i)=>{try{a({type:P});const{userLogin:{userInfo:i}}=s(),n={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:c}=await fe.a.delete("https://api.gestionale.ipsedocet.com/api/users/profile/experience/admin/".concat(e,"/").concat(t),n);ye=!0,a({type:de,payload:c}),a({type:M,payload:c}),a({type:y})}catch(d){const t=d.response&&d.response.data.message?d.response.data.message:d.message;ye||alert(t),"Request failed with status code 401"===t&&a(Ne()),a({type:G,payload:t})}})(e,t)),n(Se(e)))},b=(e,t)=>{window.confirm("Sei sicuro?")&&(n(Se(e)),n(((e,t)=>async(a,s,i)=>{try{a({type:Q});const{userLogin:{userInfo:i}}=s(),n={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:c}=await fe.a.delete("https://api.gestionale.ipsedocet.com/api/users/profile/education/admin/".concat(e,"/").concat(t),n);ye=!0,a({type:de,payload:c}),a({type:W,payload:c}),a({type:y})}catch(d){const t=d.response&&d.response.data.message?d.response.data.message:d.message;ye||alert(t),"Request failed with status code 401"===t&&a(Ne()),a({type:J,payload:t})}})(e,t)),n(Se(e)))},h=(e,t)=>{window.confirm("Sei sicuro?")&&(n(Se(e)),n(((e,t)=>async(a,s)=>{try{a({type:ce});const{userLogin:{userInfo:i}}=s(),n={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:c}=await fe.a.delete("https://api.gestionale.ipsedocet.com/api/users/profile/project/admin/".concat(e,"/").concat(t),n);a({type:de,payload:c}),a({type:le,payload:c}),a({type:y}),ye=!0}catch(d){const t=d.response&&d.response.data.message?d.response.data.message:d.message;ye||alert(t),"Request failed with status code 401"===t&&a(Ne()),a({type:oe,payload:t})}})(e,t)),n(Se(e)))},p=(e,t)=>{window.confirm("Sei sicuro?")&&(n(Se(e)),n(((e,t)=>async(a,s)=>{try{a({type:ee});const{userLogin:{userInfo:i}}=s(),n={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:c}=await fe.a.delete("https://api.gestionale.ipsedocet.com/api/users/profile/payment/admin/".concat(e,"/").concat(t),n);a({type:de,payload:c}),a({type:te,payload:c}),a({type:y}),ye=!0}catch(d){const t=d.response&&d.response.data.message?d.response.data.message:d.message;ye||alert(t),"Request failed with status code 401"===t&&a(Ne()),a({type:ae,payload:t})}})(e,t)),n(Se(e)))},m=(e,t)=>{window.confirm("Sei sicuro?")&&(n(Se(e)),n(((e,t)=>async(a,s,i)=>{try{a({type:T});const{userLogin:{userInfo:i}}=s(),n={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:c}=await fe.a.delete("https://api.gestionale.ipsedocet.com/api/users/profile/lingue/admin/".concat(e,"/").concat(t),n);ye=!0,a({type:de,payload:c}),a({type:R,payload:c}),a({type:y})}catch(d){const t=d.response&&d.response.data.message?d.response.data.message:d.message;ye||alert(t),"Request failed with status code 401"===t&&a(Ne()),a({type:U,payload:t})}})(e,t)),n(Se(e)))};console.log(j);var O=[];void 0===j.lingue||(O=j.lingue.map((e=>Object(De.jsxs)("tr",{children:[Object(De.jsx)("td",{className:"tableLingText",children:e.lingua}),Object(De.jsx)("td",{className:"tableLingText",children:e.livascolt}),Object(De.jsx)("td",{className:"tableLingText",children:e.livlett}),Object(De.jsx)("td",{className:"tableLingText",children:e.livinter}),Object(De.jsx)("td",{className:"tableLingText",children:e.livprod}),Object(De.jsx)("td",{className:"tableLingText",children:e.livprodscrt}),Object(De.jsx)("td",{className:"noone",children:Object(De.jsx)("button",{onClick:()=>m(l,e._id),className:"btn btn-danger",children:Object(De.jsx)("i",{class:"fas fa-trash-alt"})})})]},e._id))));var x=[];void 0===j.experience||(x=j.experience.map((e=>Object(De.jsxs)("div",{children:[Object(De.jsxs)("h2",{className:"text-dark",children:[e.company," ",Object(De.jsx)("button",{onClick:()=>u(l,e._id),className:"btn btn-danger",children:Object(De.jsx)("i",{class:"fas fa-trash-alt"})})]}),Object(De.jsxs)("p",{children:[Fe(e.from)," - ",e.to?Fe(e.to):"Now"]}),Object(De.jsxs)("p",{children:[Object(De.jsx)("strong",{children:"Posizione: "})," ",e.title]}),Object(De.jsxs)("p",{children:[Object(De.jsx)("strong",{children:"Luogo: "})," ",e.luogo]}),Object(De.jsxs)("p",{children:[Object(De.jsx)("strong",{children:"Descrizione: "})," ",e.description]})]}))));var g=[];void 0===j.education||(g=j.education.map((e=>Object(De.jsxs)("div",{children:[Object(De.jsxs)("h2",{className:"text-dark",children:[e.school," ",Object(De.jsx)("button",{onClick:()=>b(l,e._id),className:"btn btn-danger",children:Object(De.jsx)("i",{class:"fas fa-trash-alt"})})]}),Object(De.jsxs)("p",{children:[Fe(e.from)," - ",e.to?Fe(e.to):"Now"]}),Object(De.jsxs)("p",{children:[Object(De.jsx)("strong",{children:"Grado: "})," ",e.degree]}),Object(De.jsxs)("p",{children:[Object(De.jsx)("strong",{children:"Campo di studi : "})," ",e.fieldofstudy]}),Object(De.jsxs)("p",{children:[Object(De.jsx)("strong",{children:"Descrizione: "})," ",e.description]})]}))));var v=[];void 0===j.payment||(v=j.payment.map((e=>Object(De.jsxs)("div",{children:[Object(De.jsxs)("h2",{className:"text-dark",children:[e.title," ",Object(De.jsx)("button",{onClick:()=>p(l,e._id),className:"btn btn-danger",children:Object(De.jsx)("i",{class:"fas fa-trash-alt"})})]}),Object(De.jsxs)("p",{children:[Object(De.jsx)("strong",{children:"Data: "})," ",Fe(e.from)," - ",Fe(e.to)]}),Object(De.jsxs)("p",{children:[Object(De.jsx)("strong",{children:"Saldo: "})," ",e.saldo]}),Object(De.jsxs)("p",{children:[Object(De.jsx)("strong",{children:"Cedolino: "})," ",e.filecaricato]})]}))));var f=[];void 0===j.skills||(f=j.skills.map((e=>Object(De.jsx)("div",{children:Object(De.jsxs)("h2",{className:"text-dark",children:[Object(De.jsx)("i",{className:"fas fa-check"})," ",e]})}))));var N=[];return void 0===j.project||(N=j.project.map((e=>Object(De.jsxs)("div",{children:[Object(De.jsxs)("h2",{className:"text-dark",children:[e.title," ",Object(De.jsx)("button",{onClick:()=>h(l,e._id),className:"btn btn-danger",children:Object(De.jsx)("i",{class:"fas fa-trash-alt"})})]}),Object(De.jsxs)("p",{children:[Fe(e.from)," - ",e.to?Fe(e.to):"Now"," "]}),Object(De.jsxs)("p",{children:[Object(De.jsx)("strong",{children:"Luogo: "})," ",e.luogo]}),Object(De.jsxs)("p",{children:[Object(De.jsx)("strong",{children:"Descrizione: "})," ",e.description]})]})))),Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)(ke,{}),void 0!==j.name?Object(De.jsxs)(s.Fragment,{children:[Object(De.jsxs)("div",{className:"profile-top bg-primary p-2",children:[Object(De.jsxs)("h1",{className:"large",children:[j.name," ",j.surname]}),Object(De.jsxs)("p",{className:"lead",children:[j.status," ",j.company&&Object(De.jsxs)("span",{children:[" presso ",j.company]})]}),Object(De.jsxs)("h2",{children:[j.situazione," "]}),Object(De.jsxs)("h5",{children:[" ",j.datbir]}),Object(De.jsx)("p",{children:j.location&&Object(De.jsx)("span",{children:j.location})}),Object(De.jsx)("div",{className:"icons my-1"})]}),Object(De.jsxs)("div",{children:[Object(De.jsx)("div",{children:Object(De.jsx)("div",{className:"sidebar",children:Object(De.jsxs)("ul",{children:[Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/profile/".concat(l),children:[Object(De.jsx)("i",{className:"fas fa-user-circle "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Profilo"})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",onClick:()=>(window.location="/profiles",void n({type:ue})),children:[Object(De.jsx)("i",{class:"fas fa-users"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Dipendenti "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",onClick:()=>(window.location="/list-curriculum",void n({type:ue})),children:[Object(De.jsx)("i",{class:"fas fa-users"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Lista CV "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/edit-profile/".concat(l),children:[Object(De.jsx)("i",{className:"fas fa-cogs"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Edit "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-experience/".concat(l),children:[Object(De.jsx)("i",{className:"fab fa-black-tie "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Lavoro "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-education/".concat(l),children:[Object(De.jsx)("i",{className:"fas fa-graduation-cap "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Studi "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-project/".concat(l),children:[Object(De.jsx)("i",{className:"fas fa-briefcase "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Progetto "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-payment/".concat(l),children:[Object(De.jsx)("i",{className:"fas fa-credit-card "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Pagamento "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-lingue/".concat(l),children:[Object(De.jsx)("i",{class:"fas fa-language"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Lingue "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/curriculum/".concat(l),children:[Object(De.jsx)("i",{class:"far fa-file"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Curriculum "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/list-documenti/".concat(l),children:[Object(De.jsx)("i",{class:"fas fa-file-csv"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Documenti"})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/list-pagamenti/".concat(l),children:[Object(De.jsx)("i",{class:"fas fa-file-csv"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Estract Pay"})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/list-event/".concat(l),children:[Object(De.jsx)("i",{class:"fas fa-file-csv"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Estract Eve "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("div",{className:"Bottoneeliminauser",children:Object(De.jsxs)("button",{className:"btn btn-danger",onClick:()=>{return e=j._id,void(window.confirm("Sei sicuro?")&&(n(Le(e)),a.push("/profiles")));var e},children:[Object(De.jsx)("i",{className:"fas fa-user-minus"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Delete Account"})]})})})]})})}),Object(De.jsx)(st,{dipendente:l,evento:j.evento})]}),Object(De.jsx)("div",{}),Object(De.jsxs)("div",{className:"contdash",children:[j.bio&&Object(De.jsxs)(s.Fragment,{children:[Object(De.jsxs)("h2",{className:"text-primary",children:[j.name.trim().split(" ")[0]," Descrizione"]}),Object(De.jsx)("p",{children:j.bio}),Object(De.jsx)("div",{className:"line"})]}),Object(De.jsx)("h2",{className:"text-primary",children:"Competenze"}),Object(De.jsx)("div",{className:"skills",children:f}),Object(De.jsxs)("div",{hidden:void 0===j.curriculum,children:[Object(De.jsxs)("b",{children:["Scarica Curriculum "," "]}),Object(De.jsx)("button",{className:"btn btn-success",onClick:()=>(e=>{const t={headers:{Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}};fetch("https://api.gestionale.ipsedocet.com/bucketCur?key=curriculum/"+e,t).then((t=>{console.log(t.body),t.json().then((t=>{console.log(t.result.data);var a=new Blob([new Uint8Array(t.result.data)]);let s=window.URL.createObjectURL(a),i=document.createElement("a");i.href=s,i.download=e,i.click()}))}))})(j.curriculum),children:Object(De.jsx)("i",{class:"fas fa-download"})})]})]}),Object(De.jsxs)("div",{className:"contdash",children:[Object(De.jsx)("h2",{className:"text-primary",children:"ESPERIENZE LAVORATIVE"}),x]}),Object(De.jsxs)("div",{className:"contdash",children:[Object(De.jsx)("h2",{className:"text-primary",children:"ESPERIENZE FORMATIVE"}),g]}),Object(De.jsxs)("div",{className:"contdash",children:[Object(De.jsx)("h2",{className:"text-primary",children:"PAGAMENTI"}),v]}),Object(De.jsxs)("div",{className:"contdash",children:[Object(De.jsx)("h2",{className:"text-primary",children:"PROGETTI"}),N]}),Object(De.jsxs)("div",{className:"contdash",children:[Object(De.jsx)("h2",{className:"text-primary",children:"LINGUE"}),Object(De.jsxs)("table",{className:"tableLing",children:[Object(De.jsx)("thead",{children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("th",{children:"Lingua"}),Object(De.jsx)("th",{children:"Ascolto"}),Object(De.jsx)("th",{children:"Lettura"}),Object(De.jsx)("th",{children:"Interazione"}),Object(De.jsx)("th",{children:"Produzione"}),Object(De.jsx)("th",{children:"Prod. Scritta"})]})}),Object(De.jsx)("tbody",{children:O})]})]})]}):Object(De.jsx)(s.Fragment,{children:Object(De.jsx)(Ke,{})})]})};var rt=()=>Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)(ke,{}),Object(De.jsxs)("h1",{className:"x-large text-primary",children:[Object(De.jsx)("i",{className:"fas fa-exclamation-triangle"})," Page Not Found"]}),Object(De.jsx)("p",{className:"large",children:"Sorry, this page does not exist"})]});var dt=e=>{let{location:t,history:a}=e;const[i,n]=Object(s.useState)(""),[l,o]=Object(s.useState)(""),[r,d]=Object(s.useState)(""),[j,u]=Object(s.useState)(""),[b,h]=Object(s.useState)(""),[p,m]=Object(s.useState)(!1),[O,g]=Object(s.useState)(""),v=Object(c.b)(),f=Object(c.c)((e=>e.userLogin)),{userInfo:y}=f,S=Object(c.c)((e=>e.userAddProject)),{success:E}=S,C=t.search?t.search.split("=")[1]:"/dashboard";console.log(y),Object(s.useEffect)((()=>{y?y&&y.username&&!E||(v({type:A}),v(Ae(y._id))):a.push("/login")}),[v,a,y,E]),console.log(y);return Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)(ke,{}),Object(De.jsx)("h1",{className:"large text-primary",children:"Agg. Progetto"}),Object(De.jsxs)("p",{className:"lead",children:[Object(De.jsx)("i",{className:"fas fa-code-branch"})," Aggiungi progetto"]}),Object(De.jsx)("small",{children:"* = campo richiesto"}),Object(De.jsxs)("form",{className:"form",onSubmit:e=>{var t;e.preventDefault(),v(Ae(y._id)),v((t={company:i,title:l,luogo:r,from:j,to:b,current:p,description:O},async(e,a)=>{try{e({type:D});const{userLogin:{userInfo:s}}=a(),i={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:n}=await fe.a.put("https://api.gestionale.ipsedocet.com/api/users/profile/project/".concat(s._id),t,i);ye=!0,e({type:k,payload:n}),e({type:x,payload:n})}catch(s){const t=s.response&&s.response.data.message?s.response.data.message:s.message;ye||alert(t),"Request failed with status code 401"===t&&e(Ne()),e({type:N,payload:t})}})),v(Ae(y._id)),a.push(C)},children:[Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"text",placeholder:"* Posizione Lavorativa",name:"title",value:l,onChange:e=>o(e.target.value),required:!0})}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"text",placeholder:"* Azienda",name:"company",value:i,onChange:e=>n(e.target.value),required:!0})}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"text",placeholder:"Luogo",name:"luogo",value:r,onChange:e=>d(e.target.value)})}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("h4",{children:"Data Inizio"}),Object(De.jsx)("input",{placeholder:"",type:"date",name:"from",value:j,onChange:e=>u(e.target.value)})]}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsxs)("p",{children:[Object(De.jsx)("input",{type:"checkbox",name:"current",checked:p,value:p,onChange:e=>m(!p)})," ","Lavoro Attuale"]})}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("h4",{children:"Data Fine"}),Object(De.jsx)("input",{placeholder:"",type:"date",name:"to",value:b,onChange:e=>h(e.target.value),disabled:p})]}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("textarea",{name:"description",cols:"30",rows:"5",placeholder:"Descrizione Mansioni",value:O,onChange:e=>g(e.target.value)})}),Object(De.jsx)("input",{type:"submit",className:"btn btn-primary my-1"}),Object(De.jsx)(Oe.b,{className:"btn btn-light my-1",to:"/dashboard",children:"Indietro"})]})]})};var jt=e=>{let{location:t,match:a,history:i}=e;const n=a.params.id,[l,o]=Object(s.useState)(""),[r,d]=Object(s.useState)(""),[j,u]=Object(s.useState)(""),[b,h]=Object(s.useState)(""),[p,m]=Object(s.useState)(""),[O,x]=Object(s.useState)(!1),[g,v]=Object(s.useState)(""),S=Object(c.b)(),E=Object(c.c)((e=>e.userLogin)),{userInfo:C}=E,I=Object(c.c)((e=>e.userByid)),{loading:w,error:B,user:L}=I,D=Object(c.c)((e=>e.userAddExperience)),{success:k}=D,z=t.search?t.search.split("=")[1]:"/profile/".concat(n);Object(s.useEffect)((()=>{L?L&&L.username&&!k||(S({type:A}),S(Se(n))):i.push("/login")}),[S,i,C,L,k]);return Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)(ke,{}),Object(De.jsxs)("h1",{className:"large text-primary",children:["Agg. Esperienza a ",L.name," ",L.surname]}),Object(De.jsxs)("p",{className:"lead",children:[Object(De.jsx)("i",{className:"fas fa-code-branch"})," Aggiungi ogni posizione come programmator/developer ricoperta in passato"]}),Object(De.jsx)("small",{children:"* = campo richiesto"}),Object(De.jsxs)("form",{className:"form",onSubmit:e=>{e.preventDefault(),S(Se(n)),S(((e,t)=>async(a,s)=>{try{a({type:f});const{userLogin:{userInfo:i}}=s(),n={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:c}=await fe.a.put("https://api.gestionale.ipsedocet.com/api/users/profile/experience/admin/".concat(e),t,n);ye=!0,a({type:y,payload:c}),a({type:de,payload:c})}catch(B){const t=B.response&&B.response.data.message?B.response.data.message:B.message;ye||alert(t),"Request failed with status code 401"===t&&a(Ne()),a({type:N,payload:t})}})(n,{company:l,title:r,luogo:j,from:b,to:p,current:O,description:g})),S(Se(n)),i.push(z)},children:[Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"text",placeholder:"* Posizione Lavorativa",name:"title",value:r,onChange:e=>d(e.target.value),required:!0})}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"text",placeholder:"* Azienda",name:"company",value:l,onChange:e=>o(e.target.value),required:!0})}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"text",placeholder:"Luogo",name:"luogo",value:j,onChange:e=>u(e.target.value)})}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("h4",{children:"Data Inizio"}),Object(De.jsx)("input",{type:"date",name:"from",value:b,onChange:e=>h(e.target.value)})]}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsxs)("p",{children:[Object(De.jsx)("input",{type:"checkbox",name:"current",onChange:e=>x(!O)})," ","Lavoro Attuale"]})}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("h4",{children:"Data Fine"}),Object(De.jsx)("input",{placeholder:"",type:"date",name:"to",value:p,onChange:e=>m(e.target.value),disabled:O})]}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("textarea",{name:"description",cols:"30",rows:"5",placeholder:"Descrizione Mansioni",value:g,onChange:e=>v(e.target.value)})}),Object(De.jsx)("input",{type:"submit",className:"btn btn-primary my-1"}),Object(De.jsx)(Oe.b,{className:"btn btn-light my-1",to:"/profile/".concat(n),children:"Indietro"})]})]})};var ut=e=>{let{location:t,match:a,history:i}=e;const n=a.params.id,[l,o]=Object(s.useState)(""),[r,d]=Object(s.useState)(""),[j,u]=Object(s.useState)(""),[b,h]=Object(s.useState)(""),[p,m]=Object(s.useState)(""),[O,x]=Object(s.useState)(!1),[g,v]=Object(s.useState)(""),f=Object(c.b)(),S=Object(c.c)((e=>e.userLogin)),{userInfo:E}=S,C=Object(c.c)((e=>e.userByid)),{loading:I,error:w,user:B}=C,L=Object(c.c)((e=>e.userAddEducation)),{success:k}=L,z=t.search?t.search.split("=")[1]:"/profile/".concat(n);Object(s.useEffect)((()=>{E?B&&B.username&&!k||(f({type:A}),f(Se(n))):i.push("/login")}),[f,i,E,B,k]);return Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)(ke,{}),Object(De.jsxs)("h1",{className:"large text-primary",children:["Aggiungi studi a ",B.name," ",B.surname]}),Object(De.jsxs)("p",{className:"lead",children:[Object(De.jsx)("i",{className:"fas fa-code-branch"})," Aggiungi scuole effettuate o corsi eseguiti"]}),Object(De.jsx)("small",{children:"* = campo richiesto"}),Object(De.jsxs)("form",{className:"form",onSubmit:e=>{e.preventDefault(),f(Se(n)),f(((e,t)=>async(a,s)=>{try{a({type:D});const{userLogin:{userInfo:i}}=s(),n={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:c}=await fe.a.put("https://api.gestionale.ipsedocet.com/api/users/profile/education/admin/".concat(e),t,n);ye=!0,a({type:y,payload:c}),a({type:de,payload:c})}catch(w){const t=w.response&&w.response.data.message?w.response.data.message:w.message;ye||alert(t),"Request failed with status code 401"===t&&a(Ne()),a({type:N,payload:t})}})(n,{school:l,degree:r,fieldofstudy:j,from:b,to:p,current:O,description:g})),f(Se(n)),i.push(z)},children:[Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"text",placeholder:"* Scuola o Corso",name:"school",value:l,onChange:e=>o(e.target.value),required:!0})}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"text",placeholder:"*Grado o Certificazione",name:"degree",value:r,onChange:e=>d(e.target.value),required:!0})}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"text",placeholder:"Corso di studi",name:"fieldofstudy",value:j,onChange:e=>u(e.target.value)})}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("h4",{children:"Data inizio"}),Object(De.jsx)("input",{type:"date",name:"from",value:b,onChange:e=>h(e.target.value)})]}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsxs)("p",{children:[Object(De.jsx)("input",{type:"checkbox",name:"current",checked:O,value:O,onChange:e=>x(!O)})," ","Scuola Attuale"]})}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("h4",{children:"Data fine"}),Object(De.jsx)("input",{placeholder:"",type:"date",name:"to",value:p,onChange:e=>m(e.target.value),disabled:O})]}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("textarea",{name:"description",cols:"30",rows:"5",placeholder:"Descrizione Programma",value:g,onChange:e=>v(e.target.value)})}),Object(De.jsx)("input",{type:"submit",className:"btn btn-primary my-1"}),Object(De.jsx)(Oe.b,{className:"btn btn-light my-1",to:"/profile/".concat(n),children:"Indietro"})]})]})};var bt=e=>{let{match:t,location:a,history:i}=e;const n=t.params.id,[l,o]=Object(s.useState)(""),[r,d]=Object(s.useState)(""),[j,u]=Object(s.useState)(""),[b,h]=Object(s.useState)(""),[p,m]=Object(s.useState)(new File([" "]," ")),[O,x]=Object(s.useState)("Choose File"),[g,v]=Object(s.useState)(""),S=Object(c.b)(),E=Object(c.c)((e=>e.userLogin)),{userInfo:C}=E,I=Object(c.c)((e=>e.userByid)),{loading:w,error:B,user:L}=I,D=Object(c.c)((e=>e.userAddPayment)),{success:k}=D,z=a.search?a.search.split("=")[1]:"/profile/".concat(n);Object(s.useEffect)((()=>{L?L&&L.username&&!k||(S({type:A}),S(Se(n))):i.push("/login")}),[S,i,C,L,k]);return Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)(ke,{}),Object(De.jsxs)("h1",{className:"large text-primary",children:["Agg. Pagamento a ",L.name," ",L.surname]}),Object(De.jsxs)("p",{className:"lead",children:[Object(De.jsx)("i",{className:"fas fa-code-branch"})," Aggiungi pagamento"]}),Object(De.jsx)("small",{children:"* = campo richiesto"}),Object(De.jsxs)("form",{className:"form",onSubmit:e=>{e.preventDefault(),S(Se(n)),(async e=>{const t=document.getElementById("customFile").value;if(" "===t)return;if(" "===t)return;const a=new FormData;a.append("name","pagamenti/"+p.name),a.append("mimetype",p.type),a.append("file",p);try{const e={headers:{Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token),"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET,PUT,POST,DELETE,PATCH,OPTIONS"}};console.log(p),console.log(a),await fe.a.post("https://api.gestionale.ipsedocet.com/bucket",a,e,{}),alert("File Uploaded")}catch(s){500===s.response.status?alert("There was a problem with the server"):(console.log(p),alert("Qualcosa \xe8 andato storto"))}})();const t=p.name;S(((e,t)=>async(a,s)=>{try{a({type:f});const{userLogin:{userInfo:i}}=s(),n={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:c}=await fe.a.put("https://api.gestionale.ipsedocet.com/api/users/profile/payment/admin/".concat(e),t,n);ye=!0,a({type:y,payload:c}),a({type:de,payload:c})}catch(B){const t=B.response&&B.response.data.message?B.response.data.message:B.message;ye||alert(t),"Request failed with status code 401"===t&&a(Ne()),a({type:N,payload:t})}})(n,{title:l,saldo:r,from:j,to:b,filecaricato:t})),S(Se(n)),i.push(z)},children:[Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"text",placeholder:"*Mese Pagamento",name:"title",value:l,onChange:e=>o(e.target.value),required:!0})}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"text",placeholder:"*Saldo",name:"saldo",value:r,onChange:e=>d(e.target.value),required:!0})}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("h4",{children:"Data Inizio"}),Object(De.jsx)("input",{placeholder:"",type:"date",name:"from",value:j,onChange:e=>u(e.target.value)})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("h4",{children:"Data Fine"}),Object(De.jsx)("input",{placeholder:"",type:"date",name:"to",value:b,onChange:e=>h(e.target.value)})]}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{required:!0,name:"file",type:"file",id:"customFile",enctype:"multipart/form-data",onChange:e=>{(e=>{m(e),x(e.name)})(e.target.files[0])}})}),Object(De.jsx)("input",{type:"submit",className:"btn btn-primary my-1"}),Object(De.jsx)(Oe.b,{className:"btn btn-light my-1",to:"/profile/".concat(n),children:"Indietro"})]})]})};var ht=e=>{let{location:t,match:a,history:i}=e;const n=a.params.id,[l,o]=Object(s.useState)(""),[r,d]=Object(s.useState)(""),[j,u]=Object(s.useState)(""),[b,h]=Object(s.useState)(""),[p,m]=Object(s.useState)(""),[O,x]=Object(s.useState)(!1),[g,v]=Object(s.useState)(""),S=Object(c.b)(),E=Object(c.c)((e=>e.userLogin)),{userInfo:C}=E,I=Object(c.c)((e=>e.userByid)),{loading:w,error:B,user:L}=I,D=Object(c.c)((e=>e.userAddProject)),{success:k}=D,z=t.search?t.search.split("=")[1]:"/profile/".concat(n);Object(s.useEffect)((()=>{L?L&&L.username&&!k||(S({type:A}),S(Se(n))):i.push("/login")}),[S,i,C,L,k]);return Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)(ke,{}),Object(De.jsxs)("h1",{className:"large text-primary",children:["Agg. Progetto a ",L.name," ",L.surname]}),Object(De.jsxs)("p",{className:"lead",children:[Object(De.jsx)("i",{className:"fas fa-code-branch"})," Aggiungi progetto"]}),Object(De.jsx)("small",{children:"* = campo richiesto"}),Object(De.jsxs)("form",{className:"form",onSubmit:e=>{e.preventDefault(),S(Se(n)),S(((e,t)=>async(a,s)=>{try{a({type:f});const{userLogin:{userInfo:i}}=s(),n={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:c}=await fe.a.put("https://api.gestionale.ipsedocet.com/api/users/profile/project/admin/".concat(e),t,n);a({type:y,payload:c}),a({type:de,payload:c}),ye=!0}catch(B){const t=B.response&&B.response.data.message?B.response.data.message:B.message;ye||alert(t),"Request failed with status code 401"===t&&a(Ne()),a({type:N,payload:t})}})(n,{company:l,title:r,luogo:j,from:b,to:p,current:O,description:g})),S(Se(n)),i.push(z)},children:[Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"text",placeholder:"* Posizione Lavorativa",name:"title",value:r,onChange:e=>d(e.target.value),required:!0})}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"text",placeholder:"* Azienda",name:"company",value:l,onChange:e=>o(e.target.value),required:!0})}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"text",placeholder:"Luogo",name:"luogo",value:j,onChange:e=>u(e.target.value)})}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("h4",{children:"Data Inizio"}),Object(De.jsx)("input",{type:"date",name:"from",value:b,onChange:e=>h(e.target.value)})]}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsxs)("p",{children:[Object(De.jsx)("input",{type:"checkbox",name:"current",checked:O,value:O,onChange:e=>x(!O)})," ","Lavoro Attuale"]})}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("h4",{children:"Data Fine"}),Object(De.jsx)("input",{type:"date",name:"to",value:p,onChange:e=>m(e.target.value),disabled:O})]}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("textarea",{name:"description",cols:"30",rows:"5",placeholder:"Descrizione Mansioni",value:g,onChange:e=>v(e.target.value)})}),Object(De.jsx)("input",{type:"submit",className:"btn btn-primary my-1"}),Object(De.jsx)(Oe.b,{className:"btn btn-light my-1",to:"/profile/".concat(n),children:"Indietro"})]})]})};a(184);var pt=e=>{let{location:t,history:a}=e;const[i,n]=Object(s.useState)(""),[l,o]=Object(s.useState)(""),[r,d]=Object(s.useState)(""),[u,b]=Object(s.useState)(""),[O,x]=Object(s.useState)(null),g=Object(c.b)(),v=Object(c.c)((e=>e.userRegister)),{loading:f,error:y,userInfo:N}=v,A=t.search?t.search.split("=")[1]:"/";Object(s.useEffect)((()=>{N&&a.push(A)}),[a,N,A]);return Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)(ke,{}),Object(De.jsx)("h1",{className:"large text-primary",children:"Registra"}),Object(De.jsxs)("p",{className:"lead",children:[Object(De.jsx)("i",{className:"fas fa-user"})," Crea il tuo Account"]}),Object(De.jsxs)("form",{className:"form",onSubmit:e=>{e.preventDefault(),r!==u?x("Passwords do not match"):g(((e,t,a)=>async s=>{try{s({type:h});const i={headers:{"Content-Type":"application/json"}},{data:n}=await fe.a.post("https://api.gestionale.ipsedocet.com/api/users",{username:e,email:t,password:a},i);ye=!0,s({type:p,payload:n}),s({type:j,payload:n}),localStorage.setItem("userInfo",JSON.stringify(n))}catch(y){const t=y.response&&y.response.data.message?y.response.data.message:y.message;ye||alert(t),s({type:m,payload:y.response&&y.response.data.message?y.response.data.message:y.message})}})(i,l,r))},children:[Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"text",placeholder:"Username",name:"name",value:i,onChange:e=>n(e.target.value)})}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("input",{type:"email",placeholder:"Indirizzo Email ",name:"email",value:l,onChange:e=>o(e.target.value)}),Object(De.jsx)("small",{className:"form-text",children:"This site uses Gravatar so if you want a profile image, use a Gravatar email"})]}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"password",placeholder:"Password",name:"password",value:r,onChange:e=>d(e.target.value)})}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"password",placeholder:"Conferma Password",name:"confirmPassword",value:u,onChange:e=>b(e.target.value)})}),Object(De.jsx)("button",{type:"submit",className:"btn btn-primary",value:"Register",children:" Register "})]}),Object(De.jsxs)("p",{className:"my-1",children:["Hai gi\xe0 un account? ",Object(De.jsx)(Oe.b,{to:"/login",children:"Log in"})]})]})};var mt=e=>{let{location:t,history:a}=e;const[i,n]=Object(s.useState)(""),[l,o]=Object(s.useState)(""),r=Object(c.b)(),h=Object(c.c)((e=>e.userLogin)),{loading:p,error:m,userInfo:O}=h,g=t.search?t.search.split("=")[1]:"/dashboard";Object(s.useEffect)((()=>{O&&a.push(g)}),[a,O,g]);return Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)(ke,{}),Object(De.jsx)("h1",{className:"large text-primary",children:"Log In"}),Object(De.jsxs)("p",{className:"lead",children:[Object(De.jsx)("i",{className:"fas fa-user"})," Entra nel tuo Account"]}),Object(De.jsxs)("form",{className:"form",onSubmit:e=>{e.preventDefault(),r(((e,t,a)=>async a=>{try{a({type:d});const s={headers:{"Content-Type":"application/json"}},{data:i}=await fe.a.post("https://api.gestionale.ipsedocet.com/api/users/login",{email:e,password:t},s);ye=!0,a({type:j,payload:i}),a({type:x,payload:i}),localStorage.setItem("userInfo",JSON.stringify(i))}catch(m){const t=m.response&&m.response.data.message?m.response.data.message:m.message;ye||alert(t),a({type:u,payload:m.response&&m.response.data.message?m.response.data.message:m.message}),a({type:b})}})(i,l))},children:[Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"email",placeholder:"Email Address",name:"email",value:i,onChange:e=>n(e.target.value),required:!0})}),Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"password",placeholder:"Password",name:"password",value:l,onChange:e=>o(e.target.value),minLength:"6"})}),Object(De.jsx)("button",{type:"submit",className:"btn btn-primary",value:"Login",children:" Login "})]}),Object(De.jsxs)("p",{className:"my-1",children:["Non hai un Account? ",Object(De.jsx)(Oe.b,{to:"/register",children:"Registra"})]})]})},Ot=a(91),xt=a.n(Ot);a(130);var gt=e=>{var t,a,i;let{location:n,history:l}=e;const[o,r]=Object(s.useState)(""),[d,j]=Object(s.useState)(""),[u,b]=Object(s.useState)(""),[h,p]=Object(s.useState)(""),[m,O]=Object(s.useState)(""),[g,v]=Object(s.useState)(""),[f,y]=Object(s.useState)(""),[N,A]=Object(s.useState)(""),[S,E]=Object(s.useState)([""]),[C,I]=Object(s.useState)(""),[w,B]=Object(s.useState)(""),L=Object(c.b)(),D=Object(c.c)((e=>e.userLogin)),{userInfo:k}=D,z=Object(c.c)((e=>e.userDetails)),{loading:T,error:R,user:U}=z,P=Object(c.c)((e=>e.userUpdate)),{success:M}=P,G=n.search?n.search.split("=")[1]:"/dashboard";n.search&&n.search.split("=")[1];console.log(k),Object(s.useEffect)((()=>{k?k&&k.username&&!M||(L({type:x}),L(Ae(k._id)),L({type:F})):l.push("/login")}),[L,l,U,M]),console.log(k);const[Q,W]=Object(s.useState)(null);try{var J=k.datbir.substring(0,10)}catch(R){}return Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)(ke,{}),Object(De.jsx)("h1",{className:"large text-primary",children:"Modifica Profilo"}),Object(De.jsxs)("p",{className:"lead",children:[Object(De.jsx)("i",{className:"fas fa-user"})," Aggiungi informazioni"]}),Object(De.jsx)("small",{children:"* = campi richiesti"}),Object(De.jsxs)("form",{className:"form",onSubmit:e=>{e.preventDefault();try{var t=Q.toISOString(),a=Fe(t)}catch(R){}const s=(document.getElementById("ocrop").value||document.getElementById("ocrop").placeholder).split(",");L(Ae(k._id)),L(Ee({id:k._id,username:k.username,email:k.email,isAdmin:k.isAdmin,name:o,surname:d,company:f,skills:s,luogo:N,bio:w,status:C,datbir:a||k.datbir,nazionalit:m,cellulare:g,genere:h})),l.push(G)},children:[Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Cellulare"})}),Object(De.jsx)("input",{type:"text",placeholder:null!==(t=k.cellulare)&&void 0!==t?t:"Inserisci cellulare",name:"cellulare",value:g||k.cellulare,onChange:e=>v(e.target.value),maxLength:12,pattern:"[0-9]{8,10}"}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Genere"})}),Object(De.jsxs)("select",{name:"status",value:h||k.genere,onChange:e=>p(e.target.value),children:[Object(De.jsx)("option",{children:"* Seleziona Genere"}),Object(De.jsx)("option",{value:"Maschile",children:"Maschile"}),Object(De.jsx)("option",{value:"Femminile",children:"Femminile"}),Object(De.jsx)("option",{value:"Non Specificato",children:"Non Specificato"})]})]})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Data Di Nascita"})}),Object(De.jsx)(xt.a,{selected:Q,value:Q||J,onChange:e=>W(e),dateFormat:"dd/MM/yyyy",isClearable:!0,showYearDropdown:!0,showMonthDropdown:!0,scrollableMonthYearDropdown:!0,scrollableYearDropdown:!0,id:"pippo5"})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Nazionalit\xe0"})}),Object(De.jsxs)("select",{name:"status",value:m||k.nazionalit,onChange:e=>O(e.target.value),children:[Object(De.jsx)("option",{value:"",children:"-- Seleziona Nazionalit\xe0 --"}),Object(De.jsx)("option",{value:"afghan",children:"Afghan"}),Object(De.jsx)("option",{value:"albanian",children:"Albanian"}),Object(De.jsx)("option",{value:"algerian",children:"Algerian"}),Object(De.jsx)("option",{value:"american",children:"American"}),Object(De.jsx)("option",{value:"andorran",children:"Andorran"}),Object(De.jsx)("option",{value:"angolan",children:"Angolan"}),Object(De.jsx)("option",{value:"antiguans",children:"Antiguans"}),Object(De.jsx)("option",{value:"argentinean",children:"Argentinean"}),Object(De.jsx)("option",{value:"armenian",children:"Armenian"}),Object(De.jsx)("option",{value:"australian",children:"Australian"}),Object(De.jsx)("option",{value:"austrian",children:"Austrian"}),Object(De.jsx)("option",{value:"azerbaijani",children:"Azerbaijani"}),Object(De.jsx)("option",{value:"bahamian",children:"Bahamian"}),Object(De.jsx)("option",{value:"bahraini",children:"Bahraini"}),Object(De.jsx)("option",{value:"bangladeshi",children:"Bangladeshi"}),Object(De.jsx)("option",{value:"barbadian",children:"Barbadian"}),Object(De.jsx)("option",{value:"barbudans",children:"Barbudans"}),Object(De.jsx)("option",{value:"batswana",children:"Batswana"}),Object(De.jsx)("option",{value:"belarusian",children:"Belarusian"}),Object(De.jsx)("option",{value:"belgian",children:"Belgian"}),Object(De.jsx)("option",{value:"belizean",children:"Belizean"}),Object(De.jsx)("option",{value:"beninese",children:"Beninese"}),Object(De.jsx)("option",{value:"bhutanese",children:"Bhutanese"}),Object(De.jsx)("option",{value:"bolivian",children:"Bolivian"}),Object(De.jsx)("option",{value:"bosnian",children:"Bosnian"}),Object(De.jsx)("option",{value:"brazilian",children:"Brazilian"}),Object(De.jsx)("option",{value:"british",children:"British"}),Object(De.jsx)("option",{value:"bruneian",children:"Bruneian"}),Object(De.jsx)("option",{value:"bulgarian",children:"Bulgarian"}),Object(De.jsx)("option",{value:"burkinabe",children:"Burkinabe"}),Object(De.jsx)("option",{value:"burmese",children:"Burmese"}),Object(De.jsx)("option",{value:"burundian",children:"Burundian"}),Object(De.jsx)("option",{value:"cambodian",children:"Cambodian"}),Object(De.jsx)("option",{value:"cameroonian",children:"Cameroonian"}),Object(De.jsx)("option",{value:"canadian",children:"Canadian"}),Object(De.jsx)("option",{value:"cape verdean",children:"Cape Verdean"}),Object(De.jsx)("option",{value:"central african",children:"Central African"}),Object(De.jsx)("option",{value:"chadian",children:"Chadian"}),Object(De.jsx)("option",{value:"chilean",children:"Chilean"}),Object(De.jsx)("option",{value:"chinese",children:"Chinese"}),Object(De.jsx)("option",{value:"colombian",children:"Colombian"}),Object(De.jsx)("option",{value:"comoran",children:"Comoran"}),Object(De.jsx)("option",{value:"congolese",children:"Congolese"}),Object(De.jsx)("option",{value:"costa rican",children:"Costa Rican"}),Object(De.jsx)("option",{value:"croatian",children:"Croatian"}),Object(De.jsx)("option",{value:"cuban",children:"Cuban"}),Object(De.jsx)("option",{value:"cypriot",children:"Cypriot"}),Object(De.jsx)("option",{value:"czech",children:"Czech"}),Object(De.jsx)("option",{value:"danish",children:"Danish"}),Object(De.jsx)("option",{value:"djibouti",children:"Djibouti"}),Object(De.jsx)("option",{value:"dominican",children:"Dominican"}),Object(De.jsx)("option",{value:"dutch",children:"Dutch"}),Object(De.jsx)("option",{value:"east timorese",children:"East Timorese"}),Object(De.jsx)("option",{value:"ecuadorean",children:"Ecuadorean"}),Object(De.jsx)("option",{value:"egyptian",children:"Egyptian"}),Object(De.jsx)("option",{value:"emirian",children:"Emirian"}),Object(De.jsx)("option",{value:"equatorial guinean",children:"Equatorial Guinean"}),Object(De.jsx)("option",{value:"eritrean",children:"Eritrean"}),Object(De.jsx)("option",{value:"estonian",children:"Estonian"}),Object(De.jsx)("option",{value:"ethiopian",children:"Ethiopian"}),Object(De.jsx)("option",{value:"fijian",children:"Fijian"}),Object(De.jsx)("option",{value:"filipino",children:"Filipino"}),Object(De.jsx)("option",{value:"finnish",children:"Finnish"}),Object(De.jsx)("option",{value:"french",children:"French"}),Object(De.jsx)("option",{value:"gabonese",children:"Gabonese"}),Object(De.jsx)("option",{value:"gambian",children:"Gambian"}),Object(De.jsx)("option",{value:"georgian",children:"Georgian"}),Object(De.jsx)("option",{value:"german",children:"German"}),Object(De.jsx)("option",{value:"ghanaian",children:"Ghanaian"}),Object(De.jsx)("option",{value:"greek",children:"Greek"}),Object(De.jsx)("option",{value:"grenadian",children:"Grenadian"}),Object(De.jsx)("option",{value:"guatemalan",children:"Guatemalan"}),Object(De.jsx)("option",{value:"guinea-bissauan",children:"Guinea-Bissauan"}),Object(De.jsx)("option",{value:"guinean",children:"Guinean"}),Object(De.jsx)("option",{value:"guyanese",children:"Guyanese"}),Object(De.jsx)("option",{value:"haitian",children:"Haitian"}),Object(De.jsx)("option",{value:"herzegovinian",children:"Herzegovinian"}),Object(De.jsx)("option",{value:"honduran",children:"Honduran"}),Object(De.jsx)("option",{value:"hungarian",children:"Hungarian"}),Object(De.jsx)("option",{value:"icelander",children:"Icelander"}),Object(De.jsx)("option",{value:"indian",children:"Indian"}),Object(De.jsx)("option",{value:"indonesian",children:"Indonesian"}),Object(De.jsx)("option",{value:"iranian",children:"Iranian"}),Object(De.jsx)("option",{value:"iraqi",children:"Iraqi"}),Object(De.jsx)("option",{value:"irish",children:"Irish"}),Object(De.jsx)("option",{value:"israeli",children:"Israeli"}),Object(De.jsx)("option",{value:"italiana",children:"Italiana"}),Object(De.jsx)("option",{value:"ivorian",children:"Ivorian"}),Object(De.jsx)("option",{value:"jamaican",children:"Jamaican"}),Object(De.jsx)("option",{value:"japanese",children:"Japanese"}),Object(De.jsx)("option",{value:"jordanian",children:"Jordanian"}),Object(De.jsx)("option",{value:"kazakhstani",children:"Kazakhstani"}),Object(De.jsx)("option",{value:"kenyan",children:"Kenyan"}),Object(De.jsx)("option",{value:"kittian and nevisian",children:"Kittian and Nevisian"}),Object(De.jsx)("option",{value:"kuwaiti",children:"Kuwaiti"}),Object(De.jsx)("option",{value:"kyrgyz",children:"Kyrgyz"}),Object(De.jsx)("option",{value:"laotian",children:"Laotian"}),Object(De.jsx)("option",{value:"latvian",children:"Latvian"}),Object(De.jsx)("option",{value:"lebanese",children:"Lebanese"}),Object(De.jsx)("option",{value:"liberian",children:"Liberian"}),Object(De.jsx)("option",{value:"libyan",children:"Libyan"}),Object(De.jsx)("option",{value:"liechtensteiner",children:"Liechtensteiner"}),Object(De.jsx)("option",{value:"lithuanian",children:"Lithuanian"}),Object(De.jsx)("option",{value:"luxembourger",children:"Luxembourger"}),Object(De.jsx)("option",{value:"macedonian",children:"Macedonian"}),Object(De.jsx)("option",{value:"malagasy",children:"Malagasy"}),Object(De.jsx)("option",{value:"malawian",children:"Malawian"}),Object(De.jsx)("option",{value:"malaysian",children:"Malaysian"}),Object(De.jsx)("option",{value:"maldivan",children:"Maldivan"}),Object(De.jsx)("option",{value:"malian",children:"Malian"}),Object(De.jsx)("option",{value:"maltese",children:"Maltese"}),Object(De.jsx)("option",{value:"marshallese",children:"Marshallese"}),Object(De.jsx)("option",{value:"mauritanian",children:"Mauritanian"}),Object(De.jsx)("option",{value:"mauritian",children:"Mauritian"}),Object(De.jsx)("option",{value:"mexican",children:"Mexican"}),Object(De.jsx)("option",{value:"micronesian",children:"Micronesian"}),Object(De.jsx)("option",{value:"moldovan",children:"Moldovan"}),Object(De.jsx)("option",{value:"monacan",children:"Monacan"}),Object(De.jsx)("option",{value:"mongolian",children:"Mongolian"}),Object(De.jsx)("option",{value:"moroccan",children:"Moroccan"}),Object(De.jsx)("option",{value:"mosotho",children:"Mosotho"}),Object(De.jsx)("option",{value:"motswana",children:"Motswana"}),Object(De.jsx)("option",{value:"mozambican",children:"Mozambican"}),Object(De.jsx)("option",{value:"namibian",children:"Namibian"}),Object(De.jsx)("option",{value:"nauruan",children:"Nauruan"}),Object(De.jsx)("option",{value:"nepalese",children:"Nepalese"}),Object(De.jsx)("option",{value:"new zealander",children:"New Zealander"}),Object(De.jsx)("option",{value:"ni-vanuatu",children:"Ni-Vanuatu"}),Object(De.jsx)("option",{value:"nicaraguan",children:"Nicaraguan"}),Object(De.jsx)("option",{value:"nigerien",children:"Nigerien"}),Object(De.jsx)("option",{value:"north korean",children:"North Korean"}),Object(De.jsx)("option",{value:"northern irish",children:"Northern Irish"}),Object(De.jsx)("option",{value:"norwegian",children:"Norwegian"}),Object(De.jsx)("option",{value:"omani",children:"Omani"}),Object(De.jsx)("option",{value:"pakistani",children:"Pakistani"}),Object(De.jsx)("option",{value:"palauan",children:"Palauan"}),Object(De.jsx)("option",{value:"panamanian",children:"Panamanian"}),Object(De.jsx)("option",{value:"papua new guinean",children:"Papua New Guinean"}),Object(De.jsx)("option",{value:"paraguayan",children:"Paraguayan"}),Object(De.jsx)("option",{value:"peruvian",children:"Peruvian"}),Object(De.jsx)("option",{value:"polish",children:"Polish"}),Object(De.jsx)("option",{value:"portuguese",children:"Portuguese"}),Object(De.jsx)("option",{value:"qatari",children:"Qatari"}),Object(De.jsx)("option",{value:"romanian",children:"Romanian"}),Object(De.jsx)("option",{value:"russian",children:"Russian"}),Object(De.jsx)("option",{value:"rwandan",children:"Rwandan"}),Object(De.jsx)("option",{value:"saint lucian",children:"Saint Lucian"}),Object(De.jsx)("option",{value:"salvadoran",children:"Salvadoran"}),Object(De.jsx)("option",{value:"samoan",children:"Samoan"}),Object(De.jsx)("option",{value:"san marinese",children:"San Marinese"}),Object(De.jsx)("option",{value:"sao tomean",children:"Sao Tomean"}),Object(De.jsx)("option",{value:"saudi",children:"Saudi"}),Object(De.jsx)("option",{value:"scottish",children:"Scottish"}),Object(De.jsx)("option",{value:"senegalese",children:"Senegalese"}),Object(De.jsx)("option",{value:"serbian",children:"Serbian"}),Object(De.jsx)("option",{value:"seychellois",children:"Seychellois"}),Object(De.jsx)("option",{value:"sierra leonean",children:"Sierra Leonean"}),Object(De.jsx)("option",{value:"singaporean",children:"Singaporean"}),Object(De.jsx)("option",{value:"slovakian",children:"Slovakian"}),Object(De.jsx)("option",{value:"slovenian",children:"Slovenian"}),Object(De.jsx)("option",{value:"solomon islander",children:"Solomon Islander"}),Object(De.jsx)("option",{value:"somali",children:"Somali"}),Object(De.jsx)("option",{value:"south african",children:"South African"}),Object(De.jsx)("option",{value:"south korean",children:"South Korean"}),Object(De.jsx)("option",{value:"spanish",children:"Spanish"}),Object(De.jsx)("option",{value:"sri lankan",children:"Sri Lankan"}),Object(De.jsx)("option",{value:"sudanese",children:"Sudanese"}),Object(De.jsx)("option",{value:"surinamer",children:"Surinamer"}),Object(De.jsx)("option",{value:"swazi",children:"Swazi"}),Object(De.jsx)("option",{value:"swedish",children:"Swedish"}),Object(De.jsx)("option",{value:"swiss",children:"Swiss"}),Object(De.jsx)("option",{value:"syrian",children:"Syrian"}),Object(De.jsx)("option",{value:"taiwanese",children:"Taiwanese"}),Object(De.jsx)("option",{value:"tajik",children:"Tajik"}),Object(De.jsx)("option",{value:"tanzanian",children:"Tanzanian"}),Object(De.jsx)("option",{value:"thai",children:"Thai"}),Object(De.jsx)("option",{value:"togolese",children:"Togolese"}),Object(De.jsx)("option",{value:"tongan",children:"Tongan"}),Object(De.jsx)("option",{value:"trinidadian or tobagonian",children:"Trinidadian or Tobagonian"}),Object(De.jsx)("option",{value:"tunisian",children:"Tunisian"}),Object(De.jsx)("option",{value:"turkish",children:"Turkish"}),Object(De.jsx)("option",{value:"tuvaluan",children:"Tuvaluan"}),Object(De.jsx)("option",{value:"ugandan",children:"Ugandan"}),Object(De.jsx)("option",{value:"ukrainian",children:"Ukrainian"}),Object(De.jsx)("option",{value:"uruguayan",children:"Uruguayan"}),Object(De.jsx)("option",{value:"uzbekistani",children:"Uzbekistani"}),Object(De.jsx)("option",{value:"venezuelan",children:"Venezuelan"}),Object(De.jsx)("option",{value:"vietnamese",children:"Vietnamese"}),Object(De.jsx)("option",{value:"welsh",children:"Welsh"}),Object(De.jsx)("option",{value:"yemenite",children:"Yemenite"}),Object(De.jsx)("option",{value:"zambian",children:"Zambian"}),Object(De.jsx)("option",{value:"zimbabwean",children:"Zimbabwean"})]})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Stato Professionale"})}),Object(De.jsxs)("select",{name:"status",value:C||k.status,onChange:e=>I(e.target.value),children:[Object(De.jsx)("option",{children:"* Seleziona stato Professionale"}),Object(De.jsx)("option",{value:"Developer",children:"Developer"}),Object(De.jsx)("option",{value:"Junior Developer",children:"Junior Developer"}),Object(De.jsx)("option",{value:"Senior Developer",children:"Senior Developer"}),Object(De.jsx)("option",{value:"Manager",children:"Manager"}),Object(De.jsx)("option",{value:"Student or Learning",children:"Studente o Apprendista"}),Object(De.jsx)("option",{value:"Instructor",children:"Instruttore o Insegnante"}),Object(De.jsx)("option",{value:"Other",children:"Altro"})]}),Object(De.jsx)("small",{className:"form-text",children:"Dacci un idea del tuo attuale inquadramento"})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Azienda"})}),Object(De.jsx)("input",{type:"text",placeholder:null!==(a=k.company)&&void 0!==a?a:"Azienda",name:"company",value:f||k.company,onChange:e=>y(e.target.value)}),Object(De.jsx)("small",{className:"form-text",children:"Azienda"})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Luogo"})}),Object(De.jsx)("input",{type:"text",placeholder:k.luogo,name:"location",value:N||k.luogo,onChange:e=>A(e.target.value)}),Object(De.jsx)("small",{className:"form-text",children:"Citta & provinacia (es. Milano, MI)"})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Skills"})}),Object(De.jsx)("input",{type:"text",placeholder:k.skills,name:"skills",value:S||k.skills,onChange:e=>E(e.target.value),id:"ocrop"}),Object(De.jsx)("small",{className:"form-text",children:"Per favore usa la virgola per separare i valori (es. HTML,CSS,JavaScript,PHP)"})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Descrizione Biografica"})}),Object(De.jsx)("textarea",{placeholder:null!==(i=k.bio)&&void 0!==i?i:"Descrizione ",name:"bio",value:w||k.bio,onChange:e=>B(e.target.value)}),Object(De.jsx)("small",{className:"form-text",children:"Parlaci un p\xf2 di te..."})]}),Object(De.jsx)("input",{type:"submit",className:"btn btn-primary my-1"}),Object(De.jsx)(Oe.b,{className:"btn btn-light my-1",to:"/dashboard",children:"Go Back"})]})]})};var vt=e=>{let{match:t,history:a,location:i}=e;const n=Object(c.b)(),l=t.params.id,o=Object(c.c)((e=>e.userByid)),{loading:r,error:d,user:j}=o;console.log(j);return Object(s.useEffect)((()=>{var e;(null!==(e=!j)&&void 0!==e?e:j.isAdmin)?a.push("/login"):j&&j.name||(n(Se(l)),n(Se(l)))}),[n,j,a,l]),Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)(ke,{}),Object(De.jsx)("div",{children:Object(De.jsx)("div",{className:"sidebar",children:Object(De.jsxs)("ul",{children:[Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"",children:[Object(De.jsx)("i",{className:"fas fa-user-circle "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Profilo"})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",onClick:()=>(window.location="/profiles",void n({type:ue})),children:[Object(De.jsx)("i",{class:"fas fa-users"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Dipendenti "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/list-curriculum",children:[Object(De.jsx)("i",{class:"fas fa-users"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Lista CV "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/edit-profile/".concat(l),children:[Object(De.jsx)("i",{className:"fas fa-cogs"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Edit "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-experience/".concat(l),children:[Object(De.jsx)("i",{className:"fab fa-black-tie "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Lavoro "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-education/".concat(l),children:[Object(De.jsx)("i",{className:"fas fa-graduation-cap "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Studi "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-project/".concat(l),children:[Object(De.jsx)("i",{className:"fas fa-briefcase "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Progetto "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-payment/".concat(l),children:[Object(De.jsx)("i",{className:"fas fa-credit-card "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Pagamento "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-lingue/".concat(l),children:[Object(De.jsx)("i",{class:"fas fa-language"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Lingue "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/curriculum/".concat(l),children:[Object(De.jsx)("i",{class:"far fa-file"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Curriculum "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/list-documenti/".concat(l),children:[Object(De.jsx)("i",{class:"fas fa-file-csv"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Documenti"})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/list-pagamenti/".concat(l),children:[Object(De.jsx)("i",{class:"fas fa-file-csv"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Estract Pay"})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/list-event/".concat(l),children:[Object(De.jsx)("i",{class:"fas fa-file-csv"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Estract Eve "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("div",{className:"Bottoneeliminauser",children:Object(De.jsxs)("button",{className:"btn btn-danger",onClick:()=>{return e=j._id,void(window.confirm("Sei sicuro?")&&(n(Le(e)),a.push("/profiles")));var e},children:[Object(De.jsx)("i",{className:"fas fa-user-minus"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Delete Account"})]})})})]})})}),Object(De.jsx)("div",{className:"contdash",children:void 0!==j.name?Object(De.jsx)(s.Fragment,{children:Object(De.jsx)(et,{dipendente:l})}):Object(De.jsx)(s.Fragment,{children:Object(De.jsx)(Ke,{})})})]})};a(178);class ft extends s.Component{constructor(e){console.log(e),super(e),console.log(e),this.state={info:{},id:this.props.test},this.state.info.experience=[],this.state.info.education=[],this.state.info.skills=[],this.state.info.lingue=[],this.state.info.hobby=[],this.state.info.competenzedig=[]}componentDidMount(){console.log(this.props.id);const e={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}};fe.a.get("https://api.gestionale.ipsedocet.com/api/users/anagrafica/"+this.state.id,e).then((e=>{this.setState({info:e.data})})).catch((e=>{this.setState({errorMessage:e.message}),console.error("There was an error!",e)}))}render(){return Object(De.jsxs)("div",{children:[Object(De.jsxs)("div",{className:"",children:[Object(De.jsx)("div",{className:"",children:Object(De.jsx)("p",{className:"titleparag",children:"INFORMAZIONI PERSONALI"})}),Object(De.jsxs)("div",{className:"infoanagrafica",children:[Object(De.jsxs)("p",{className:"anagraficap",children:[this.state.info.name," ",this.state.info.surname]}),Object(De.jsxs)("p",{className:"anagraficap",children:[Object(De.jsx)("i",{class:"fas fa-map-marked-alt"})," ",this.state.info.indirizzo]}),Object(De.jsxs)("p",{className:"anagraficap",children:[Object(De.jsx)("i",{class:"fas fa-mobile-alt"})," ",this.state.info.cellulare]}),Object(De.jsxs)("p",{className:"anagraficap",children:[Object(De.jsx)("i",{class:"fas fa-envelope"})," ",this.state.info.email2]}),Object(De.jsx)("p",{className:"dati-ana",children:"Sesso:"})," ",Object(De.jsx)("p",{className:"anagraficap",children:this.state.info.genere}),Object(De.jsx)("p",{className:"dati-ana",children:"Data di nascita:"})," ",Object(De.jsx)("p",{className:"anagraficap",children:this.state.info.datbir}),Object(De.jsx)("p",{className:"dati-ana",children:"Nazionalit\xe0"})," ",Object(De.jsx)("p",{className:"anagraficap",children:this.state.info.nazionalit})]})]}),Object(De.jsx)("div",{className:"",children:Object(De.jsxs)("div",{className:"",children:[Object(De.jsx)("div",{className:""}),Object(De.jsxs)("div",{children:[Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)("div",{children:Object(De.jsx)("p",{className:"titleparag",children:"ESPERIENZA PROFESSIONALE"})}),Object(De.jsx)("div",{className:"tableExpdiv",children:Object(De.jsxs)("table",{className:"tableExp",children:[Object(De.jsx)("thead",{children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("th",{children:""}),Object(De.jsx)("th",{children:" "})]})}),this.state.info.experience.map((e=>Object(De.jsx)("tbody",{children:Object(De.jsxs)("tr",{children:[Object(De.jsxs)("td",{className:"tableData-Data",children:[Object(De.jsxs)("p",{className:"paragTableExp",children:[Fe(e.from)," - ",e.to?Fe(e.to):"Oggi"]})," "]}),Object(De.jsxs)("td",{className:"tableData-Descr",children:[Object(De.jsx)("p",{className:"dati-ana",children:e.posizione}),Object(De.jsxs)("p",{className:"dati-ana",children:[e.company," - ",e.luogo]}),Object(De.jsx)("p",{className:"paragTableExpDesc",children:e.description})]})]})})))]})})]}),Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)("div",{children:Object(De.jsx)("p",{className:"titleparag",children:"ISTRUZIONE E FORMAZIONE"})}),Object(De.jsx)("div",{className:"tableEdudiv",children:Object(De.jsxs)("table",{children:[Object(De.jsx)("thead",{children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("th",{}),Object(De.jsx)("th",{}),Object(De.jsx)("th",{})]})}),this.state.info.education.map((e=>Object(De.jsx)("tbody",{children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("td",{className:"tableData-Data",children:Object(De.jsxs)("p",{className:"paragTableExp",children:[Fe(e.from)," - ",e.to?Fe(e.to):"Oggi"]})}),Object(De.jsxs)("td",{className:"tableData-Descr",children:[Object(De.jsxs)("p",{className:"dati-ana",children:[e.fieldofstudy," - ",e.degree]}),Object(De.jsxs)("p",{className:"dati-ana",children:[e.shool," - ",e.luogo]}),Object(De.jsx)("p",{className:"paragTableExpDesc",children:e.description})]})]})})))]})})]}),Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)("p",{className:"titleparag",children:"COMPETENZE PERSONALI"}),Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)("div",{children:Object(De.jsx)("p",{className:"titleparag",children:"Lingue Straniere"})}),Object(De.jsx)("div",{className:"tablelinguadiv",children:Object(De.jsx)("table",{className:"tablelingua",children:Object(De.jsx)("thead",{children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("th",{className:"th-tablelinguadiv1",children:"COMPRENSIONE"}),Object(De.jsx)("th",{className:"th-tablelinguadiv2",children:"PARLATO"}),Object(De.jsx)("th",{className:"th-tablelinguadiv3",children:"PRODUZIONE SCRITTA"})]})})})}),Object(De.jsx)("div",{className:"tablelinguadiv2",children:Object(De.jsxs)("table",{className:"tablelingua",children:[Object(De.jsx)("thead",{children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("th",{className:"th-tablelingua",children:" "}),Object(De.jsx)("th",{className:"th-tablelingua1",children:"Ascolto "}),Object(De.jsx)("th",{className:"th-tablelingua2",children:"Lettura"}),Object(De.jsx)("th",{className:"th-tablelingua3",children:"Interazione"}),Object(De.jsx)("th",{className:"th-tablelingua4",children:"Produzione"}),Object(De.jsx)("th",{className:"th-tablelingua5",children:"Produzione Scritta"})]})}),this.state.info.lingue.map((e=>Object(De.jsx)("tbody",{children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("td",{children:Object(De.jsxs)("p",{className:"dati-ana",children:[e.lingua," "]})}),Object(De.jsx)("td",{className:"th-tabledina1",children:Object(De.jsx)("p",{className:"dati-ana",children:e.livascolt})}),Object(De.jsx)("td",{className:"th-tabledina2",children:Object(De.jsx)("p",{className:"dati-ana",children:e.livlett})}),Object(De.jsx)("td",{className:"th-tabledina3",children:Object(De.jsxs)("p",{className:"dati-ana",children:[e.livinter," "]})}),Object(De.jsx)("td",{className:"th-tabledina4",children:Object(De.jsx)("p",{className:"dati-ana",children:e.livprod})}),Object(De.jsx)("td",{className:"th-tabledina5",children:Object(De.jsx)("p",{className:"dati-ana",children:e.livprodscrt})})]})})))]})}),Object(De.jsx)("div",{children:Object(De.jsx)("p",{className:"legend-ling",children:"Livelli: A1 e A2: Utente base - B1 e B2: Utente autonomo - C1 e C2: Utente avanzato"})})]})]}),Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)("div",{children:Object(De.jsx)("p",{className:"titleparag",children:"Competenze professionali "})}),this.state.info.skills.map((e=>Object(De.jsx)("div",{children:Object(De.jsx)("edo",{children:Object(De.jsx)("li",{className:"listaComp",children:e})})})))]}),Object(De.jsxs)("div",{children:[Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)("div",{children:Object(De.jsx)("p",{className:"titleparag",children:"Competenze Digitali "})}),this.state.info.competenzedig.map((e=>Object(De.jsx)("div",{children:Object(De.jsx)("edo",{children:Object(De.jsx)("li",{className:"listaComp",children:e})})})))]}),Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)("div",{children:Object(De.jsx)("p",{className:"titleparag",children:"Ulteriori Informazione e Hobby"})}),this.state.info.hobby.map((e=>Object(De.jsx)("div",{children:Object(De.jsx)("edo",{children:Object(De.jsx)("li",{className:"listaComp",children:e})})})))]})]}),Object(De.jsxs)("div",{children:[Object(De.jsx)("p",{className:"titleparag",children:" Trattamento dei dati personali"}),Object(De.jsx)("p",{className:"trattDati",children:"Autorizzo il trattamento dei miei dati "}),Object(De.jsx)("p",{className:"trattDati",children:' personali ai sensi del Decreto Legislativo 30 giugno 2003, n. 196 "Codice in materia di protezione dei dati personali.'})]})]}),Object(De.jsx)("div",{})]})})]})}}var yt=ft;var Nt=e=>{let{match:t,history:a}=e;const i=Object(c.b)(),n=Object(c.c)((e=>e.userLogin)),{userInfo:l}=n,o=Object(c.c)((e=>e.userDetails)),{loading:r,error:d,user:j}=o,u=l._id,b=Object(s.useRef)(),h=Object(it.useReactToPrint)({content:()=>b.current});return console.log(l),Object(s.useEffect)((()=>{l?j&&j.username||(console.log(l._id),i(Ae(l._id))):a.push("/login")}),[]),Object(De.jsxs)("div",{children:[Object(De.jsx)(ke,{}),Object(De.jsx)(Je,{}),Object(De.jsxs)("div",{className:"contdashPrint",children:[Object(De.jsx)(yt,{test:u,ref:b}),Object(De.jsx)("div",{children:Object(De.jsxs)("button",{className:"btnEstrai",onClick:h,children:["Salva CV "," ",Object(De.jsx)("i",{class:"fas fa-file-pdf"})]})})]}),Object(De.jsx)("div",{})]})};var At=e=>{var t,a;let{location:i,history:n}=e;const[l,o]=Object(s.useState)(""),[r,d]=Object(s.useState)([]),[j,u]=Object(s.useState)([]),[b,h]=Object(s.useState)(""),[p,m]=Object(s.useState)(new File([" "],"")),[O,x]=Object(s.useState)("Choose File"),[g,v]=Object(s.useState)(""),f=Object(c.b)(),y=Object(c.c)((e=>e.userLogin)),{userInfo:N}=y,S=Object(c.c)((e=>e.userDetails)),{loading:E,error:C,user:I}=S,w=Object(c.c)((e=>e.userUpdateProfile)),{success:B}=w,L=i.search?i.search.split("=")[1]:"/dashboard";i.search&&i.search.split("=")[1];console.log(N),Object(s.useEffect)((()=>{N?N&&N.username&&!B||(f({type:A}),f(Ae(N._id))):n.push("/login")}),[f,n,N,I,B]),console.log(N);const D=async e=>{const t=document.getElementById("customFile").value;if(""===t)return;if(""===t)return;const a=new FormData;a.append("name","curriculum/"+p.name),a.append("mimetype",p.type),a.append("file",p);try{const e={headers:{Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token),"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET,PUT,POST,DELETE,PATCH,OPTIONS"}};console.log(p),console.log(a),await fe.a.post("https://api.gestionale.ipsedocet.com/bucketCur",a,e,{}),alert("File Uploaded")}catch(s){500===s.response.status?alert("There was a problem with the server"):(console.log(p),alert(s.response.data.msg))}};return Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)(ke,{}),Object(De.jsx)("h1",{className:"large text-primary",children:"Modifica CV"}),Object(De.jsxs)("p",{className:"lead",children:[Object(De.jsx)("i",{className:"fas fa-user"})," Aggiungi informazioni"]}),Object(De.jsx)("small",{children:"* = campi richiesti"}),Object(De.jsxs)("form",{className:"form",onSubmit:e=>{e.preventDefault();const t=(document.getElementById("hobby").value||document.getElementById("hobby").placeholder).split(","),a=(document.getElementById("competenzedig").value||document.getElementById("competenzedig").placeholder).split(",");void 0!==p&&D(p);const s=p.name;f(Ee({id:N._id,username:N.username,email:N.email,isAdmin:N.isAdmin,indirizzo:l,hobby:t,competenzedig:a,curriculum:s,email2:g})),f(Ae(N._id)),n.push(L)},children:[Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Email"})}),Object(De.jsx)("input",{type:"email",placeholder:null!==(t=I.email2)&&void 0!==t?t:"Inserisci email",name:"email",value:g,onChange:e=>v(e.target.value)})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Indirizzo"})}),Object(De.jsx)("input",{type:"text",placeholder:N.indirizzo||"Indirizzo",name:"indirizzo",value:l,onChange:e=>o(e.target.value)}),Object(De.jsx)("small",{className:"form-text",children:"Scrivi il tuo indirizzo --- es* Via Roma, 1 , Roma (RM)"})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Competenze Digitali"})}),Object(De.jsx)("input",{type:"text",placeholder:N.competenzedig||"Competenze Digitali",name:"competenzedig",value:j,onChange:e=>u(e.target.value),id:"competenzedig"}),Object(De.jsx)("small",{className:"form-text",children:"Per favore usa la virgola per separare i valori (es. HTML Buono,CSS eccellente, JavaScript ottimo, PHP ottimo)"}),Object(De.jsx)("small",{className:"form-text",children:"Legenda (Sufficiente, Discreto, Buono, Eccellente)"})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Ulteriore informazione Hobby"})}),Object(De.jsx)("input",{type:"text",placeholder:null!==(a=N.hobby)&&void 0!==a?a:"Ulteriore informazione Hobby",name:"hobby",value:r,onChange:e=>d(e.target.value),id:"hobby"}),Object(De.jsx)("small",{className:"form-text",children:"Per favore usa la virgola per separare i valori (es. Suonare la chitarra, etc,)"})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Upload CV"})}),Object(De.jsx)("input",{name:"file",type:"file",id:"customFile",enctype:"multipart/form-data",onChange:e=>{(e=>{void 0!==e&&(m(e),x(e.name))})(e.target.files[0])}})]}),Object(De.jsx)("input",{type:"submit",className:"btn btn-primary my-1"}),Object(De.jsx)(Oe.b,{className:"btn btn-light my-1",to:"/dashboard",children:"Go Back"})]})]})};var St=e=>{let{location:t,match:a,history:i}=e;const n=a.params.id,[l,o]=Object(s.useState)(""),[r,d]=Object(s.useState)(""),[j,u]=Object(s.useState)(""),[b,h]=Object(s.useState)(""),[p,m]=Object(s.useState)(""),[O,x]=Object(s.useState)(""),g=Object(c.b)(),v=Object(c.c)((e=>e.userLogin)),{userInfo:S}=v,E=Object(c.c)((e=>e.userByid)),{loading:C,error:I,user:w}=E,B=Object(c.c)((e=>e.userAddLingue)),{success:L}=B,D=t.search?t.search.split("=")[1]:"/profile/".concat(n);Object(s.useEffect)((()=>{w?w&&w.username&&!L||(g({type:A}),g(Se(n))):i.push("/login")}),[g,i,S,w,L]);return Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)(ke,{}),Object(De.jsxs)("h1",{className:"large text-primary",children:["Agg. Lingua a ",w.name," ",w.surname]}),Object(De.jsxs)("p",{className:"lead",children:[Object(De.jsx)("i",{className:"fas fa-code-branch"})," Aggiungi ogni posizione come programmator/developer ricoperta in passato"]}),Object(De.jsx)("small",{children:"* = campo richiesto"}),Object(De.jsxs)("form",{className:"form",onSubmit:e=>{e.preventDefault(),g(Se(n)),g(((e,t)=>async(a,s)=>{try{a({type:f});const{userLogin:{userInfo:i}}=s(),n={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:c}=await fe.a.put("https://api.gestionale.ipsedocet.com/api/users/profile/lingue/admin/".concat(e),t,n);a({type:y,payload:c}),a({type:de,payload:c}),ye=!0}catch(I){const t=I.response&&I.response.data.message?I.response.data.message:I.message;alert(t),"Request failed with status code 401"===t&&a(Ne()),a({type:N,payload:t})}})(n,{lingua:l,livlett:j,livascolt:r,livinter:b,livprod:p,livprodscrt:O})),g(Se(n)),i.push(D)},children:[Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"text",placeholder:"* Lingua ",name:"lingua",value:l,onChange:e=>o(e.target.value),required:!0})}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("small",{className:"form-text",children:"Livello Comprensione - ascolto"}),Object(De.jsxs)("select",{name:"genere",value:r,onChange:e=>d(e.target.value),children:[Object(De.jsx)("option",{children:"* Seleziona Livello Comprensione - ascolto"}),Object(De.jsx)("option",{value:"A1",children:"A1"}),Object(De.jsx)("option",{value:"A2",children:"A2"}),Object(De.jsx)("option",{value:"B1",children:"B1"}),Object(De.jsx)("option",{value:"B2",children:"B2"}),Object(De.jsx)("option",{value:"C1",children:"C1"}),Object(De.jsx)("option",{value:"C2",children:"C2"})]})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("small",{className:"form-text",children:"Livello Comprensione - lettura"}),Object(De.jsxs)("select",{name:"genere",value:j,onChange:e=>u(e.target.value),children:[Object(De.jsx)("option",{children:"* Seleziona Livello Comprensione - lettura"}),Object(De.jsx)("option",{value:"A1",children:"A1"}),Object(De.jsx)("option",{value:"A2",children:"A2"}),Object(De.jsx)("option",{value:"B1",children:"B1"}),Object(De.jsx)("option",{value:"B2",children:"B2"}),Object(De.jsx)("option",{value:"C1",children:"C1"}),Object(De.jsx)("option",{value:"C2",children:"C2"})]})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("small",{className:"form-text",children:"Livello Parlato - interazione"}),Object(De.jsxs)("select",{name:"genere",value:b,onChange:e=>h(e.target.value),children:[Object(De.jsx)("option",{children:"* Seleziona Livello Parlato - interazione"}),Object(De.jsx)("option",{value:"A1",children:"A1"}),Object(De.jsx)("option",{value:"A2",children:"A2"}),Object(De.jsx)("option",{value:"B1",children:"B1"}),Object(De.jsx)("option",{value:"B2",children:"B2"}),Object(De.jsx)("option",{value:"C1",children:"C1"}),Object(De.jsx)("option",{value:"C2",children:"C2"})]})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("small",{className:"form-text",children:"Livello Parlato - produzione"}),Object(De.jsxs)("select",{name:"genere",value:p,onChange:e=>m(e.target.value),children:[Object(De.jsx)("option",{children:"* Seleziona Livello Parlato - produzione"}),Object(De.jsx)("option",{value:"A1",children:"A1"}),Object(De.jsx)("option",{value:"A2",children:"A2"}),Object(De.jsx)("option",{value:"B1",children:"B1"}),Object(De.jsx)("option",{value:"B2",children:"B2"}),Object(De.jsx)("option",{value:"C1",children:"C1"}),Object(De.jsx)("option",{value:"C2",children:"C2"})]})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("small",{className:"form-text",children:"Livello Produzione scritta"}),Object(De.jsxs)("select",{name:"genere",value:O,onChange:e=>x(e.target.value),children:[Object(De.jsx)("option",{children:"* Seleziona Livello Produzione scritta "}),Object(De.jsx)("option",{value:"A1",children:"A1"}),Object(De.jsx)("option",{value:"A2",children:"A2"}),Object(De.jsx)("option",{value:"B1",children:"B1"}),Object(De.jsx)("option",{value:"B2",children:"B2"}),Object(De.jsx)("option",{value:"C1",children:"C1"}),Object(De.jsx)("option",{value:"C2",children:"C2"})]})]}),Object(De.jsx)("input",{type:"submit",className:"btn btn-primary my-1"}),Object(De.jsx)(Oe.b,{className:"btn btn-light my-1",to:"/profile/".concat(n),children:"Indietro"})]})]})};var Et=e=>{let{location:t,history:a}=e;const[i,n]=Object(s.useState)(""),[l,o]=Object(s.useState)(""),[r,d]=Object(s.useState)(""),[j,u]=Object(s.useState)(""),[b,h]=Object(s.useState)(""),[p,m]=Object(s.useState)(""),O=Object(c.b)(),g=Object(c.c)((e=>e.userLogin)),{userInfo:f}=g,y=Object(c.c)((e=>e.userDetails)),{loading:S,error:E,user:C}=y,I=Object(c.c)((e=>e.userAddLingue)),{success:w}=I,B=t.search?t.search.split("=")[1]:"/dashboard";console.log(f),Object(s.useEffect)((()=>{f?C&&C.username&&!w||(O({type:A}),O(Ae(f._id))):a.push("/login")}),[O,a,f,C,w]),console.log(f);return Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)(ke,{}),Object(De.jsx)("h1",{className:"large text-primary",children:"Agg. Esperienza"}),Object(De.jsxs)("p",{className:"lead",children:[Object(De.jsx)("i",{className:"fas fa-code-branch"})," Aggiungi ogni posizione come programmator/developer ricoperta in passato"]}),Object(De.jsx)("small",{children:"* = campo richiesto"}),Object(De.jsxs)("form",{className:"form",onSubmit:e=>{e.preventDefault(),O(Ae(f._id)),O(((e,t)=>async(t,a)=>{try{t({type:D});const{userLogin:{userInfo:s}}=a(),i={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:n}=await fe.a.put("https://api.gestionale.ipsedocet.com/api/users/profile/lingue/".concat(s._id),e,i);ye=!0,t({type:k,payload:n}),t({type:x,payload:n}),window.location.reload="/dashboard"}catch(E){const a=E.response&&E.response.data.message?E.response.data.message:E.message;ye||alert(a),"Request failed with status code 401"===a&&t(Ne()),t({type:N,payload:a})}})({token:f.token,id:f._id,username:f.username,email:f.email,isAdmin:f.isAdmin,lingua:i,livlett:r,livascolt:l,livinter:j,livprod:b,livprodscrt:p})),O({type:v}),a.push(B)},children:[Object(De.jsx)("div",{className:"form-group",children:Object(De.jsx)("input",{type:"text",placeholder:"* Lingua ",name:"lingua",value:i,onChange:e=>n(e.target.value),required:!0})}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("small",{className:"form-text",children:"Livello Comprensione - ascolto"}),Object(De.jsxs)("select",{name:"genere",value:l,onChange:e=>o(e.target.value),children:[Object(De.jsx)("option",{children:"* Seleziona Livello Comprensione - ascolto"}),Object(De.jsx)("option",{value:"A1",children:"A1"}),Object(De.jsx)("option",{value:"A2",children:"A2"}),Object(De.jsx)("option",{value:"B1",children:"B1"}),Object(De.jsx)("option",{value:"B2",children:"B2"}),Object(De.jsx)("option",{value:"C1",children:"C1"}),Object(De.jsx)("option",{value:"C2",children:"C2"})]})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("small",{className:"form-text",children:"Livello Comprensione - lettura"}),Object(De.jsxs)("select",{name:"genere",value:r,onChange:e=>d(e.target.value),children:[Object(De.jsx)("option",{children:"* Seleziona Livello Comprensione - lettura"}),Object(De.jsx)("option",{value:"A1",children:"A1"}),Object(De.jsx)("option",{value:"A2",children:"A2"}),Object(De.jsx)("option",{value:"B1",children:"B1"}),Object(De.jsx)("option",{value:"B2",children:"B2"}),Object(De.jsx)("option",{value:"C1",children:"C1"}),Object(De.jsx)("option",{value:"C2",children:"C2"})]})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("small",{className:"form-text",children:"Livello Parlato - interazione"}),Object(De.jsxs)("select",{name:"genere",value:j,onChange:e=>u(e.target.value),children:[Object(De.jsx)("option",{children:"* Seleziona Livello Parlato - interazione"}),Object(De.jsx)("option",{value:"A1",children:"A1"}),Object(De.jsx)("option",{value:"A2",children:"A2"}),Object(De.jsx)("option",{value:"B1",children:"B1"}),Object(De.jsx)("option",{value:"B2",children:"B2"}),Object(De.jsx)("option",{value:"C1",children:"C1"}),Object(De.jsx)("option",{value:"C2",children:"C2"})]})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("small",{className:"form-text",children:"Livello Parlato - produzione"}),Object(De.jsxs)("select",{name:"genere",value:b,onChange:e=>h(e.target.value),children:[Object(De.jsx)("option",{children:"* Seleziona Livello Parlato - produzione"}),Object(De.jsx)("option",{value:"A1",children:"A1"}),Object(De.jsx)("option",{value:"A2",children:"A2"}),Object(De.jsx)("option",{value:"B1",children:"B1"}),Object(De.jsx)("option",{value:"B2",children:"B2"}),Object(De.jsx)("option",{value:"C1",children:"C1"}),Object(De.jsx)("option",{value:"C2",children:"C2"})]})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("small",{className:"form-text",children:"Livello Produzione scritta"}),Object(De.jsxs)("select",{name:"genere",value:p,onChange:e=>m(e.target.value),children:[Object(De.jsx)("option",{children:"* Seleziona Livello Produzione scritta "}),Object(De.jsx)("option",{value:"A1",children:"A1"}),Object(De.jsx)("option",{value:"A2",children:"A2"}),Object(De.jsx)("option",{value:"B1",children:"B1"}),Object(De.jsx)("option",{value:"B2",children:"B2"}),Object(De.jsx)("option",{value:"C1",children:"C1"}),Object(De.jsx)("option",{value:"C2",children:"C2"})]})]}),Object(De.jsx)("input",{type:"submit",className:"btn btn-primary my-1"}),Object(De.jsx)(Oe.b,{className:"btn btn-light my-1",to:"/dashboard",children:"Indietro"})]})]})};var Ct=e=>{var t,a,i,n,l,o,r;let{location:d,match:j,history:u}=e;const b=j.params.id,[h,p]=Object(s.useState)(null),[m,O]=Object(s.useState)(""),[x,g]=Object(s.useState)(""),[v,N]=Object(s.useState)(""),[S,E]=Object(s.useState)(""),[C,I]=Object(s.useState)(""),[w,B]=Object(s.useState)(""),[L,D]=Object(s.useState)(""),[k,F]=Object(s.useState)(""),[T,R]=Object(s.useState)(""),[U,P]=Object(s.useState)(""),[M,G]=Object(s.useState)([""]),[Q,W]=Object(s.useState)(""),[J,Y]=Object(s.useState)(""),[q,H]=Object(s.useState)(""),[_,K]=Object(s.useState)(""),[Z,V]=Object(s.useState)(""),[X,$]=Object(s.useState)([""]),[ee,te]=Object(s.useState)([""]),[ae,se]=Object(s.useState)(""),[ie,ne]=Object(s.useState)(new File([" "],"")),[ce,le]=Object(s.useState)("Choose File"),oe=Object(c.b)(),re=Object(c.c)((e=>e.userLogin)),{userInfo:je}=re,ue=Object(c.c)((e=>e.userByid)),{loading:be,error:he,user:pe}=ue,me=Object(c.c)((e=>e.userUpdateProfile)),{success:xe}=me,ge=d.search?d.search.split("=")[1]:"/profile/".concat(b);console.log(je),Object(s.useEffect)((()=>{je?pe&&pe.username&&!xe||(oe({type:A}),oe(Se(b))):u.push("/login")}),[oe,u,xe]);try{var ve=pe.datbir.substring(0,10)}catch(he){}return console.log(ve),Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)(ke,{}),Object(De.jsxs)("h1",{className:"large text-primary",children:["Modifica Profilo di ",pe.name," ",pe.surname]}),Object(De.jsxs)("p",{className:"lead",children:[Object(De.jsx)("i",{className:"fas fa-user"})," Aggiungi informazioni"]}),Object(De.jsx)("small",{children:"* = campi richiesti"}),Object(De.jsxs)("form",{className:"form",onSubmit:e=>{e.preventDefault();try{var t=h.toISOString(),a=Fe(t)}catch(he){}const s=(document.getElementById("ocrop").value||document.getElementById("ocrop").placeholder).split(","),i=(document.getElementById("hobby").value||document.getElementById("hobby").placeholder).split(","),n=(document.getElementById("competenzedig").value||document.getElementById("competenzedig").placeholder).split(", ");oe(Se(b)),void 0!==ie&&(async e=>{const t=document.getElementById("customFile").value;if(""===t)return;if(""===t)return;const a=new FormData;a.append("name","curriculum/"+ie.name),a.append("mimetype",ie.type),a.append("file",ie);try{const e={headers:{Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token),"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET,PUT,POST,DELETE,PATCH,OPTIONS"}};console.log(ie),console.log(a),await fe.a.post("https://api.gestionale.ipsedocet.com/bucketCur",a,e,{}),alert("File Uploaded")}catch(s){500===s.response.status?alert("There was a problem with the server"):(console.log(ie),alert("Qualcosa \xe8 andato storto"+s.response.data.msg))}})();const c=ie.name;oe(((e,t)=>async(a,s)=>{try{a({type:f});const{userLogin:{userInfo:i}}=s(),n={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(i.token)}},{data:c}=await fe.a.put("https://api.gestionale.ipsedocet.com/api/users/modifica/admin/".concat(e),t,n);a({type:y}),a({type:de,payload:c}),ye=!0}catch(he){const t=he.response&&he.response.data.message?he.response.data.message:he.message;alert(t),"Request failed with status code 401"===t&&a(Ne()),a({type:z,payload:t})}})(b,{username:pe.username,email:k,isAdmin:pe.isAdmin,name:m,surname:x,company:w,skills:s,luogo:L,bio:J,status:Q,datbir:a||pe.datbir,nazionalit:S,cellulare:C,situazione:q,curriculum:c,indirizzo:_,hobby:i,competenzedig:n,email2:U,password:T,genere:Z})),oe(Se(b)),u.push(ge)},children:[Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Email Account"})}),Object(De.jsx)("input",{type:"email",placeholder:null!==(t=pe.email)&&void 0!==t?t:"Inserisci email",name:"email",value:k,onChange:e=>F(e.target.value)})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Modifica Password Account"})}),Object(De.jsx)("input",{type:"password",placeholder:null!==(a=pe.password)&&void 0!==a?a:"Inserisci password",name:"email",value:T,onChange:e=>R(e.target.value)})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Cellulare"})}),Object(De.jsx)("input",{type:"text",placeholder:null!==(i=pe.cellulare)&&void 0!==i?i:"Inserisci cellulare",name:"cellulare",value:C,onChange:e=>I(e.target.value),maxLength:12,pattern:"[0-9]{8,10}"}),Object(De.jsx)("small",{className:"form-text",children:"Cellulare"})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Email"})}),Object(De.jsx)("input",{type:"email",placeholder:null!==(n=pe.email2)&&void 0!==n?n:"Inserisci email",name:"email",value:U,onChange:e=>P(e.target.value)})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Genere"})}),Object(De.jsxs)("select",{name:"status",value:Z||pe.genere,onChange:e=>V(e.target.value),children:[Object(De.jsx)("option",{children:"* Seleziona Genere"}),Object(De.jsx)("option",{value:"Maschile",children:"Maschile"}),Object(De.jsx)("option",{value:"Femminile",children:"Femminile"}),Object(De.jsx)("option",{value:"Non Specificato",children:"Non Specificato"})]})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Data Di Nascita"})}),Object(De.jsx)(xt.a,{selected:h,value:h||ve,onChange:e=>p(e),dateFormat:"dd/MM/yyyy",isClearable:!0,showYearDropdown:!0,showMonthDropdown:!0,scrollableMonthYearDropdown:!0,scrollableYearDropdown:!0,id:"datanascita"})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Nazionalit\xe0"})}),Object(De.jsxs)("select",{name:"status",value:S||pe.nazionalit,onChange:e=>E(e.target.value),children:[Object(De.jsx)("option",{children:"-- Seleziona Nazionalit\xe0 --"}),Object(De.jsx)("option",{value:"afghan",children:"Afghan"}),Object(De.jsx)("option",{value:"albanian",children:"Albanian"}),Object(De.jsx)("option",{value:"algerian",children:"Algerian"}),Object(De.jsx)("option",{value:"american",children:"American"}),Object(De.jsx)("option",{value:"andorran",children:"Andorran"}),Object(De.jsx)("option",{value:"angolan",children:"Angolan"}),Object(De.jsx)("option",{value:"antiguans",children:"Antiguans"}),Object(De.jsx)("option",{value:"argentinean",children:"Argentinean"}),Object(De.jsx)("option",{value:"armenian",children:"Armenian"}),Object(De.jsx)("option",{value:"australian",children:"Australian"}),Object(De.jsx)("option",{value:"austrian",children:"Austrian"}),Object(De.jsx)("option",{value:"azerbaijani",children:"Azerbaijani"}),Object(De.jsx)("option",{value:"bahamian",children:"Bahamian"}),Object(De.jsx)("option",{value:"bahraini",children:"Bahraini"}),Object(De.jsx)("option",{value:"bangladeshi",children:"Bangladeshi"}),Object(De.jsx)("option",{value:"barbadian",children:"Barbadian"}),Object(De.jsx)("option",{value:"barbudans",children:"Barbudans"}),Object(De.jsx)("option",{value:"batswana",children:"Batswana"}),Object(De.jsx)("option",{value:"belarusian",children:"Belarusian"}),Object(De.jsx)("option",{value:"belgian",children:"Belgian"}),Object(De.jsx)("option",{value:"belizean",children:"Belizean"}),Object(De.jsx)("option",{value:"beninese",children:"Beninese"}),Object(De.jsx)("option",{value:"bhutanese",children:"Bhutanese"}),Object(De.jsx)("option",{value:"bolivian",children:"Bolivian"}),Object(De.jsx)("option",{value:"bosnian",children:"Bosnian"}),Object(De.jsx)("option",{value:"brazilian",children:"Brazilian"}),Object(De.jsx)("option",{value:"british",children:"British"}),Object(De.jsx)("option",{value:"bruneian",children:"Bruneian"}),Object(De.jsx)("option",{value:"bulgarian",children:"Bulgarian"}),Object(De.jsx)("option",{value:"burkinabe",children:"Burkinabe"}),Object(De.jsx)("option",{value:"burmese",children:"Burmese"}),Object(De.jsx)("option",{value:"burundian",children:"Burundian"}),Object(De.jsx)("option",{value:"cambodian",children:"Cambodian"}),Object(De.jsx)("option",{value:"cameroonian",children:"Cameroonian"}),Object(De.jsx)("option",{value:"canadian",children:"Canadian"}),Object(De.jsx)("option",{value:"cape verdean",children:"Cape Verdean"}),Object(De.jsx)("option",{value:"central african",children:"Central African"}),Object(De.jsx)("option",{value:"chadian",children:"Chadian"}),Object(De.jsx)("option",{value:"chilean",children:"Chilean"}),Object(De.jsx)("option",{value:"chinese",children:"Chinese"}),Object(De.jsx)("option",{value:"colombian",children:"Colombian"}),Object(De.jsx)("option",{value:"comoran",children:"Comoran"}),Object(De.jsx)("option",{value:"congolese",children:"Congolese"}),Object(De.jsx)("option",{value:"costa rican",children:"Costa Rican"}),Object(De.jsx)("option",{value:"croatian",children:"Croatian"}),Object(De.jsx)("option",{value:"cuban",children:"Cuban"}),Object(De.jsx)("option",{value:"cypriot",children:"Cypriot"}),Object(De.jsx)("option",{value:"czech",children:"Czech"}),Object(De.jsx)("option",{value:"danish",children:"Danish"}),Object(De.jsx)("option",{value:"djibouti",children:"Djibouti"}),Object(De.jsx)("option",{value:"dominican",children:"Dominican"}),Object(De.jsx)("option",{value:"dutch",children:"Dutch"}),Object(De.jsx)("option",{value:"east timorese",children:"East Timorese"}),Object(De.jsx)("option",{value:"ecuadorean",children:"Ecuadorean"}),Object(De.jsx)("option",{value:"egyptian",children:"Egyptian"}),Object(De.jsx)("option",{value:"emirian",children:"Emirian"}),Object(De.jsx)("option",{value:"equatorial guinean",children:"Equatorial Guinean"}),Object(De.jsx)("option",{value:"eritrean",children:"Eritrean"}),Object(De.jsx)("option",{value:"estonian",children:"Estonian"}),Object(De.jsx)("option",{value:"ethiopian",children:"Ethiopian"}),Object(De.jsx)("option",{value:"fijian",children:"Fijian"}),Object(De.jsx)("option",{value:"filipino",children:"Filipino"}),Object(De.jsx)("option",{value:"finnish",children:"Finnish"}),Object(De.jsx)("option",{value:"french",children:"French"}),Object(De.jsx)("option",{value:"gabonese",children:"Gabonese"}),Object(De.jsx)("option",{value:"gambian",children:"Gambian"}),Object(De.jsx)("option",{value:"georgian",children:"Georgian"}),Object(De.jsx)("option",{value:"german",children:"German"}),Object(De.jsx)("option",{value:"ghanaian",children:"Ghanaian"}),Object(De.jsx)("option",{value:"greek",children:"Greek"}),Object(De.jsx)("option",{value:"grenadian",children:"Grenadian"}),Object(De.jsx)("option",{value:"guatemalan",children:"Guatemalan"}),Object(De.jsx)("option",{value:"guinea-bissauan",children:"Guinea-Bissauan"}),Object(De.jsx)("option",{value:"guinean",children:"Guinean"}),Object(De.jsx)("option",{value:"guyanese",children:"Guyanese"}),Object(De.jsx)("option",{value:"haitian",children:"Haitian"}),Object(De.jsx)("option",{value:"herzegovinian",children:"Herzegovinian"}),Object(De.jsx)("option",{value:"honduran",children:"Honduran"}),Object(De.jsx)("option",{value:"hungarian",children:"Hungarian"}),Object(De.jsx)("option",{value:"icelander",children:"Icelander"}),Object(De.jsx)("option",{value:"indian",children:"Indian"}),Object(De.jsx)("option",{value:"indonesian",children:"Indonesian"}),Object(De.jsx)("option",{value:"iranian",children:"Iranian"}),Object(De.jsx)("option",{value:"iraqi",children:"Iraqi"}),Object(De.jsx)("option",{value:"irish",children:"Irish"}),Object(De.jsx)("option",{value:"israeli",children:"Israeli"}),Object(De.jsx)("option",{value:"italiana",children:"Italiana"}),Object(De.jsx)("option",{value:"ivorian",children:"Ivorian"}),Object(De.jsx)("option",{value:"jamaican",children:"Jamaican"}),Object(De.jsx)("option",{value:"japanese",children:"Japanese"}),Object(De.jsx)("option",{value:"jordanian",children:"Jordanian"}),Object(De.jsx)("option",{value:"kazakhstani",children:"Kazakhstani"}),Object(De.jsx)("option",{value:"kenyan",children:"Kenyan"}),Object(De.jsx)("option",{value:"kittian and nevisian",children:"Kittian and Nevisian"}),Object(De.jsx)("option",{value:"kuwaiti",children:"Kuwaiti"}),Object(De.jsx)("option",{value:"kyrgyz",children:"Kyrgyz"}),Object(De.jsx)("option",{value:"laotian",children:"Laotian"}),Object(De.jsx)("option",{value:"latvian",children:"Latvian"}),Object(De.jsx)("option",{value:"lebanese",children:"Lebanese"}),Object(De.jsx)("option",{value:"liberian",children:"Liberian"}),Object(De.jsx)("option",{value:"libyan",children:"Libyan"}),Object(De.jsx)("option",{value:"liechtensteiner",children:"Liechtensteiner"}),Object(De.jsx)("option",{value:"lithuanian",children:"Lithuanian"}),Object(De.jsx)("option",{value:"luxembourger",children:"Luxembourger"}),Object(De.jsx)("option",{value:"macedonian",children:"Macedonian"}),Object(De.jsx)("option",{value:"malagasy",children:"Malagasy"}),Object(De.jsx)("option",{value:"malawian",children:"Malawian"}),Object(De.jsx)("option",{value:"malaysian",children:"Malaysian"}),Object(De.jsx)("option",{value:"maldivan",children:"Maldivan"}),Object(De.jsx)("option",{value:"malian",children:"Malian"}),Object(De.jsx)("option",{value:"maltese",children:"Maltese"}),Object(De.jsx)("option",{value:"marshallese",children:"Marshallese"}),Object(De.jsx)("option",{value:"mauritanian",children:"Mauritanian"}),Object(De.jsx)("option",{value:"mauritian",children:"Mauritian"}),Object(De.jsx)("option",{value:"mexican",children:"Mexican"}),Object(De.jsx)("option",{value:"micronesian",children:"Micronesian"}),Object(De.jsx)("option",{value:"moldovan",children:"Moldovan"}),Object(De.jsx)("option",{value:"monacan",children:"Monacan"}),Object(De.jsx)("option",{value:"mongolian",children:"Mongolian"}),Object(De.jsx)("option",{value:"moroccan",children:"Moroccan"}),Object(De.jsx)("option",{value:"mosotho",children:"Mosotho"}),Object(De.jsx)("option",{value:"motswana",children:"Motswana"}),Object(De.jsx)("option",{value:"mozambican",children:"Mozambican"}),Object(De.jsx)("option",{value:"namibian",children:"Namibian"}),Object(De.jsx)("option",{value:"nauruan",children:"Nauruan"}),Object(De.jsx)("option",{value:"nepalese",children:"Nepalese"}),Object(De.jsx)("option",{value:"new zealander",children:"New Zealander"}),Object(De.jsx)("option",{value:"ni-vanuatu",children:"Ni-Vanuatu"}),Object(De.jsx)("option",{value:"nicaraguan",children:"Nicaraguan"}),Object(De.jsx)("option",{value:"nigerien",children:"Nigerien"}),Object(De.jsx)("option",{value:"north korean",children:"North Korean"}),Object(De.jsx)("option",{value:"northern irish",children:"Northern Irish"}),Object(De.jsx)("option",{value:"norwegian",children:"Norwegian"}),Object(De.jsx)("option",{value:"omani",children:"Omani"}),Object(De.jsx)("option",{value:"pakistani",children:"Pakistani"}),Object(De.jsx)("option",{value:"palauan",children:"Palauan"}),Object(De.jsx)("option",{value:"panamanian",children:"Panamanian"}),Object(De.jsx)("option",{value:"papua new guinean",children:"Papua New Guinean"}),Object(De.jsx)("option",{value:"paraguayan",children:"Paraguayan"}),Object(De.jsx)("option",{value:"peruvian",children:"Peruvian"}),Object(De.jsx)("option",{value:"polish",children:"Polish"}),Object(De.jsx)("option",{value:"portuguese",children:"Portuguese"}),Object(De.jsx)("option",{value:"qatari",children:"Qatari"}),Object(De.jsx)("option",{value:"romanian",children:"Romanian"}),Object(De.jsx)("option",{value:"russian",children:"Russian"}),Object(De.jsx)("option",{value:"rwandan",children:"Rwandan"}),Object(De.jsx)("option",{value:"saint lucian",children:"Saint Lucian"}),Object(De.jsx)("option",{value:"salvadoran",children:"Salvadoran"}),Object(De.jsx)("option",{value:"samoan",children:"Samoan"}),Object(De.jsx)("option",{value:"san marinese",children:"San Marinese"}),Object(De.jsx)("option",{value:"sao tomean",children:"Sao Tomean"}),Object(De.jsx)("option",{value:"saudi",children:"Saudi"}),Object(De.jsx)("option",{value:"scottish",children:"Scottish"}),Object(De.jsx)("option",{value:"senegalese",children:"Senegalese"}),Object(De.jsx)("option",{value:"serbian",children:"Serbian"}),Object(De.jsx)("option",{value:"seychellois",children:"Seychellois"}),Object(De.jsx)("option",{value:"sierra leonean",children:"Sierra Leonean"}),Object(De.jsx)("option",{value:"singaporean",children:"Singaporean"}),Object(De.jsx)("option",{value:"slovakian",children:"Slovakian"}),Object(De.jsx)("option",{value:"slovenian",children:"Slovenian"}),Object(De.jsx)("option",{value:"solomon islander",children:"Solomon Islander"}),Object(De.jsx)("option",{value:"somali",children:"Somali"}),Object(De.jsx)("option",{value:"south african",children:"South African"}),Object(De.jsx)("option",{value:"south korean",children:"South Korean"}),Object(De.jsx)("option",{value:"spanish",children:"Spanish"}),Object(De.jsx)("option",{value:"sri lankan",children:"Sri Lankan"}),Object(De.jsx)("option",{value:"sudanese",children:"Sudanese"}),Object(De.jsx)("option",{value:"surinamer",children:"Surinamer"}),Object(De.jsx)("option",{value:"swazi",children:"Swazi"}),Object(De.jsx)("option",{value:"swedish",children:"Swedish"}),Object(De.jsx)("option",{value:"swiss",children:"Swiss"}),Object(De.jsx)("option",{value:"syrian",children:"Syrian"}),Object(De.jsx)("option",{value:"taiwanese",children:"Taiwanese"}),Object(De.jsx)("option",{value:"tajik",children:"Tajik"}),Object(De.jsx)("option",{value:"tanzanian",children:"Tanzanian"}),Object(De.jsx)("option",{value:"thai",children:"Thai"}),Object(De.jsx)("option",{value:"togolese",children:"Togolese"}),Object(De.jsx)("option",{value:"tongan",children:"Tongan"}),Object(De.jsx)("option",{value:"trinidadian or tobagonian",children:"Trinidadian or Tobagonian"}),Object(De.jsx)("option",{value:"tunisian",children:"Tunisian"}),Object(De.jsx)("option",{value:"turkish",children:"Turkish"}),Object(De.jsx)("option",{value:"tuvaluan",children:"Tuvaluan"}),Object(De.jsx)("option",{value:"ugandan",children:"Ugandan"}),Object(De.jsx)("option",{value:"ukrainian",children:"Ukrainian"}),Object(De.jsx)("option",{value:"uruguayan",children:"Uruguayan"}),Object(De.jsx)("option",{value:"uzbekistani",children:"Uzbekistani"}),Object(De.jsx)("option",{value:"venezuelan",children:"Venezuelan"}),Object(De.jsx)("option",{value:"vietnamese",children:"Vietnamese"}),Object(De.jsx)("option",{value:"welsh",children:"Welsh"}),Object(De.jsx)("option",{value:"yemenite",children:"Yemenite"}),Object(De.jsx)("option",{value:"zambian",children:"Zambian"}),Object(De.jsx)("option",{value:"zimbabwean",children:"Zimbabwean"})]})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Stato Professionale"})}),Object(De.jsxs)("select",{name:"status",value:Q||pe.status,onChange:e=>W(e.target.value),children:[Object(De.jsx)("option",{children:"* Seleziona stato Professionale"}),Object(De.jsx)("option",{value:"Developer",children:"Developer"}),Object(De.jsx)("option",{value:"Junior Developer",children:"Junior Developer"}),Object(De.jsx)("option",{value:"Senior Developer",children:"Senior Developer"}),Object(De.jsx)("option",{value:"Manager",children:"Manager"}),Object(De.jsx)("option",{value:"Student or Learning",children:"Studente o Apprendista"}),Object(De.jsx)("option",{value:"Instructor",children:"Instruttore o Insegnante"}),Object(De.jsx)("option",{value:"Other",children:"Altro"})]}),Object(De.jsx)("small",{className:"form-text",children:"Dacci un idea del tuo attuale inquadramento"})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Azienda"})}),Object(De.jsx)("input",{type:"text",placeholder:null!==(l=pe.company)&&void 0!==l?l:"Azienda",name:"company",value:w,onChange:e=>B(e.target.value)})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Luogo"})}),Object(De.jsx)("input",{type:"text",placeholder:pe.luogo,name:"location",value:L,onChange:e=>D(e.target.value)}),Object(De.jsx)("small",{className:"form-text",children:"Citta & provinacia (es. Milano, MI)"})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Skills"})}),Object(De.jsx)("input",{type:"text",placeholder:pe.skills,name:"skills",value:M,onChange:e=>G(e.target.value),id:"ocrop"}),Object(De.jsx)("small",{className:"form-text",children:"Per favore usa la virgola per separare i valori (es. HTML,CSS,JavaScript,PHP)"})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Indirizzo"})}),Object(De.jsx)("input",{type:"text",placeholder:pe.indirizzo||"Indirizzo",name:"indirizzo",value:_,onChange:e=>K(e.target.value)}),Object(De.jsx)("small",{className:"form-text",children:"Scrivi il tuo indirizzo --- es* Via Roma, 1 , Roma (RM)"})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Competenze Digitali"})}),Object(De.jsx)("input",{type:"text",placeholder:pe.competenzedig||"Competenze Digitali",name:"competenzedig",value:ee||pe.competenzedig,onChange:e=>te(e.target.value),id:"competenzedig"}),Object(De.jsx)("small",{className:"form-text",children:"Per favore usa la virgola per separare i valori (es. HTML Buono,CSS eccellente, JavaScript ottimo, PHP ottimo)"}),Object(De.jsx)("small",{className:"form-text",children:"Legenda (Sufficiente, Discreto, Buono, Eccellente)"})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Ulteriore informazione Hobby"})}),Object(De.jsx)("input",{type:"text",placeholder:null!==(o=pe.hobby)&&void 0!==o?o:"Ulteriore informazione Hobby",name:"hobby",value:X,onChange:e=>$(e.target.value),id:"hobby"}),Object(De.jsx)("small",{className:"form-text",children:"Per favore usa la virgola per separare i valori (es. Suonare la chitarra, etc,)"})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Descrizione Biografica"})}),Object(De.jsx)("textarea",{placeholder:null!==(r=pe.bio)&&void 0!==r?r:"Descrizione",name:"bio",value:J,onChange:e=>Y(e.target.value)}),Object(De.jsx)("small",{className:"form-text",children:"Parlaci un p\xf2 di te..."})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Status User"})}),Object(De.jsxs)("select",{name:"status",value:q||pe.situazione,onChange:e=>H(e.target.value),children:[Object(De.jsx)("option",{children:"* Seleziona stato Professionale"}),Object(De.jsx)("option",{value:"Dipendente",children:"Dipendente"}),Object(De.jsx)("option",{value:"Visitatore",children:"Visitatore"}),Object(De.jsx)("option",{value:"Autore",children:"Autore"}),Object(De.jsx)("option",{value:"Dismesso",children:"Dismesso"})]}),Object(De.jsx)("small",{className:"form-text",children:"Situazione User"})]}),Object(De.jsxs)("div",{className:"form-group",children:[Object(De.jsx)("label",{children:Object(De.jsx)("h4",{children:"Upload Curriculum"})}),Object(De.jsx)("input",{name:"file",type:"file",id:"customFile",enctype:"multipart/form-data",onChange:e=>{(e=>{void 0!==e&&(ne(e),le(e.name))})(e.target.files[0])}})]}),Object(De.jsx)("input",{type:"submit",className:"btn btn-primary my-1"}),Object(De.jsx)(Oe.b,{className:"btn btn-light my-1",to:"/profile/".concat(b),children:"Indietro"})]})]})};var It=e=>{let{dipendente:t}=e;const a=Object(c.b)(),i=Object(c.c)((e=>e.userByid)),{loading:n,error:l,user:o}=i,[r,d]=Object(s.useState)(""),[j,u]=Object(s.useState)(""),[b,h]=Object(s.useState)("");Object(s.useEffect)((()=>{var e;(null!==(e=!o)&&void 0!==e?e:o.isAdmin)?window.location.push("/login"):o&&o.name||(a(Se(t)),a(Se(t)))}),[a,o]);o.payment;const p=o.name+Date.now();return Object(De.jsx)(s.Fragment,{children:n?Object(De.jsx)(Ke,{}):Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)("input",{className:"ricerca",placeholder:"2021-01-01",onChange:e=>d(e.target.value)}),Object(De.jsx)($e.a,{id:"table-xls-button",className:"download-table-xls-button",table:"estrazionePagamentiSingolo",filename:p,sheet:p,buttonText:"Estrai"}),Object(De.jsx)("div",{className:"",children:Object(De.jsxs)("table",{id:"estrazionePagamentiSingolo",className:"table-to-xls",children:[Object(De.jsx)("thead",{className:"thead",children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("th",{children:"Titolo"}),Object(De.jsx)("th",{children:"Saldo"}),Object(De.jsx)("th",{children:"Da"}),Object(De.jsx)("th",{children:"A"}),Object(De.jsx)("th",{})]})}),o.payment.length>0?o.payment.filter((e=>""==r||e.from.toLowerCase().includes(r.toLowerCase())?e:void 0)).map(((e,t)=>Object(De.jsx)("tbody",{children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("td",{children:e.title}),Object(De.jsxs)("td",{children:[e.saldo,"\u20ac"]}),Object(De.jsx)("td",{children:Fe(e.from)}),Object(De.jsx)("td",{children:Fe(e.to)}),Object(De.jsx)("td",{children:Object(De.jsx)("button",{className:"btn btn-success",onClick:()=>(e=>{const t={headers:{Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}};fetch("https://api.gestionale.ipsedocet.com/bucket/?key=pagamenti/"+e,t).then((t=>{console.log(t.body),t.json().then((t=>{console.log(t.result.data);var a=new Blob([new Uint8Array(t.result.data)]);let s=window.URL.createObjectURL(a),i=document.createElement("a");console.log("cia"),i.href=s,i.download=e,i.click()}))}))})(e.filecaricato),children:Object(De.jsx)("i",{class:"fas fa-download"})})})]})}))):Object(De.jsx)("h4",{children:"Nessun pagamento trovato..."})]})})]})})};var wt=e=>{let{match:t,history:a,location:i}=e;const n=Object(c.b)(),l=t.params.id,o=Object(c.c)((e=>e.userByid)),{loading:r,error:d,user:j}=o;console.log(j);return Object(s.useEffect)((()=>{var e;(null!==(e=!j)&&void 0!==e?e:j.isAdmin)?a.push("/login"):j&&j.name||(n(Se(l)),console.log("****"),console.log(j),n(Se(l)))}),[n,j,a,l]),Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)(ke,{}),Object(De.jsx)("div",{children:Object(De.jsx)("div",{className:"sidebar",children:Object(De.jsxs)("ul",{children:[Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"",children:[Object(De.jsx)("i",{className:"fas fa-user-circle "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Profilo"})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",onClick:()=>(window.location="/profiles",void n({type:ue})),children:[Object(De.jsx)("i",{class:"fas fa-users"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Dipendenti "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/list-curriculum",children:[Object(De.jsx)("i",{class:"fas fa-users"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Lista CV "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/edit-profile/".concat(l),children:[Object(De.jsx)("i",{className:"fas fa-cogs"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Edit "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-experience/".concat(l),children:[Object(De.jsx)("i",{className:"fab fa-black-tie "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Lavoro "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-education/".concat(l),children:[Object(De.jsx)("i",{className:"fas fa-graduation-cap "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Studi "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-project/".concat(l),children:[Object(De.jsx)("i",{className:"fas fa-briefcase "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Progetto "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-payment/".concat(l),children:[Object(De.jsx)("i",{className:"fas fa-credit-card "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Pagamento "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-lingue/".concat(l),children:[Object(De.jsx)("i",{class:"fas fa-language"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Lingue "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/curriculum/".concat(l),children:[Object(De.jsx)("i",{class:"far fa-file"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Curriculum "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/list-documenti/".concat(l),children:[Object(De.jsx)("i",{class:"fas fa-file-csv"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Documenti"})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/list-pagamenti/".concat(l),children:[Object(De.jsx)("i",{class:"fas fa-file-csv"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Estract Pay"})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/list-event/".concat(l),children:[Object(De.jsx)("i",{class:"fas fa-file-csv"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Estract Eve "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("div",{className:"Bottoneeliminauser",children:Object(De.jsxs)("button",{className:"btn btn-danger",onClick:()=>{return e=j._id,void(window.confirm("Sei sicuro?")&&(n(Le(e)),a.push("/profiles")));var e},children:[Object(De.jsx)("i",{className:"fas fa-user-minus"})," ",Object(De.jsxs)("t",{className:"hide-sm",children:[" ","Delete Account"]})]})})})]})})}),Object(De.jsx)("div",{className:"contdash",children:void 0!==j.name?Object(De.jsx)(s.Fragment,{children:Object(De.jsx)(It,{dipendente:l})}):Object(De.jsx)(s.Fragment,{children:Object(De.jsx)(Ke,{})})})]})};var Bt=e=>{let{match:t,history:a,location:i}=e;const n=Object(c.b)(),[l,o]=Object(s.useState)(""),r=Object(c.c)((e=>e.userLogin)),{userInfo:d}=r,j=Object(c.c)((e=>e.userList)),{loading:u,error:b,users:h}=j;return Object(s.useEffect)((()=>{(null!==d&&void 0!==d?d:d.isAdmin)?n(Be()):a.push("/login")}),[n,a,d]),Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)(ke,{}),Object(De.jsx)("div",{className:"sidebar",children:Object(De.jsxs)("ul",{children:[Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"",children:[Object(De.jsx)("i",{className:"fas fa-user-circle "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Profilo"})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",onClick:()=>(window.location="/profiles",void n({type:ue})),children:[Object(De.jsx)("i",{class:"fas fa-users"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Dipendenti "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/list-curriculum",children:[Object(De.jsx)("i",{class:"fas fa-users"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Lista CV "})]})})})]})}),u?Object(De.jsx)(Ke,{}):Object(De.jsx)(s.Fragment,{children:Object(De.jsxs)("div",{className:"contdash",children:[Object(De.jsx)("input",{className:"ricerca",placeholder:"Nome - Cognome - Username",onChange:e=>o(e.target.value)}),Object(De.jsx)("div",{className:"",children:Object(De.jsxs)("table",{id:"estrazionePagamentiSingolo",className:"table-to-xls",children:[Object(De.jsx)("thead",{className:"thead",children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("th",{children:"Nome e Cognome"}),Object(De.jsx)("th",{children:"Username"}),Object(De.jsx)("th",{children:"Email"}),Object(De.jsx)("th",{children:"Ruolo"})]})}),h.length>0?h.filter((e=>""==l||e.name.toLowerCase().includes(l.toLowerCase())||e.surname.toLowerCase().includes(l.toLowerCase())||e.username.toLowerCase().includes(l.toLowerCase())?e:void 0)).map(((e,t)=>Object(De.jsx)("tbody",{children:Object(De.jsxs)("tr",{children:[Object(De.jsxs)("td",{children:[e.name," ",e.surname]}),Object(De.jsx)("td",{children:e.username}),Object(De.jsx)("td",{children:e.email}),Object(De.jsx)("td",{children:e.situazione}),Object(De.jsxs)("td",{hidden:void 0===e.curriculum,children:[" ",Object(De.jsx)("button",{className:"btn btn-success",onClick:()=>(e=>{const t={headers:{Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}};fetch("https://api.gestionale.ipsedocet.com/bucketCur?key=curriculum/"+e,t).then((t=>{console.log(t.body),t.json().then((t=>{console.log(t.result.data);var a=new Blob([new Uint8Array(t.result.data)]);let s=window.URL.createObjectURL(a),i=document.createElement("a");console.log("cia"),i.href=s,i.download=e,i.click()}))}))})(e.curriculum),children:Object(De.jsx)("i",{class:"fas fa-download"})})]})]})}))):Object(De.jsx)("h4",{children:"Nessun curriculum trovato..."})]})})]})})]})};var Lt=e=>{let{dipendente:t}=e;const a=Object(c.b)(),i=Object(c.c)((e=>e.userLogin)),{userInfo:n}=i,l=Object(c.c)((e=>e.userDetails)),{loading:o,error:r,user:d}=l,[j,u]=Object(s.useState)(""),[b,h]=Object(s.useState)(""),[p,m]=Object(s.useState)("");Object(s.useEffect)((()=>{d?d&&d.name||(a(Ae(d._id)),a(Ae(n._id))):window.location.push("/login")}),[a,n,d]);d.evento,d.name,d.surname,Fe(Date.now());return Object(De.jsx)(s.Fragment,{children:o?Object(De.jsx)(Ke,{}):Object(De.jsxs)(s.Fragment,{children:[Object(De.jsxs)("h3",{children:[d.name," ",d.surname," "," "," ","-- "+d.email]}),Object(De.jsx)("input",{className:"ricerca",placeholder:"",onChange:e=>u(e.target.value)}),Object(De.jsx)("div",{className:"",children:Object(De.jsxs)("table",{id:"estrazione",className:"table-to-xls",children:[Object(De.jsx)("thead",{className:"thead",children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("th",{children:"Inizio"}),Object(De.jsx)("th",{children:"Titolo"}),Object(De.jsx)("th",{children:"Tipologia"}),Object(De.jsx)("th",{children:"Ore Lavorate"}),Object(De.jsx)("th",{children:"Straordinari"}),Object(De.jsx)("th",{children:"Ferie"}),Object(De.jsx)("th",{children:"Permessi"}),Object(De.jsx)("th",{children:"Mutua"}),Object(De.jsx)("th",{children:"Note"})]})}),n.evento.length>0?n.evento.filter((e=>""==j||e.start.toLowerCase().includes(j.toLowerCase())?e:void 0)).map(((e,t)=>Object(De.jsx)("tbody",{children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("td",{children:void 0===e.start?null:e.start.substring(0,10)}),Object(De.jsx)("td",{children:e.title}),Object(De.jsx)("td",{children:e.tipoevento}),Object(De.jsx)("td",{children:e.ore}),Object(De.jsx)("td",{children:e.orestraordinario}),Object(De.jsx)("td",{children:e.oreferie}),Object(De.jsx)("td",{children:e.orepermessi}),Object(De.jsx)("td",{children:e.oremutua}),Object(De.jsx)("td",{children:e.note})]})}))):Object(De.jsx)("h4",{children:"Nessun evento trovato..."})]})})]})})};var Dt=e=>{let{match:t,history:a,location:i}=e;const n=Object(c.b)(),l=(t.params.id,Object(c.c)((e=>e.userLogin))),{userInfo:o}=l,r=Object(c.c)((e=>e.userDetails)),{loading:d,error:j,user:u}=r;return console.log(o),Object(s.useEffect)((()=>{o?u&&u.name||(n(Ae(o._id)),n(Ae(o._id))):a.push("/login")}),[n,o,a]),Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)(ke,{}),Object(De.jsx)(Je,{}),Object(De.jsx)("div",{className:"contdash",children:void 0!==o.name?Object(De.jsx)(s.Fragment,{children:Object(De.jsx)(Lt,{dipendente:o._id})}):Object(De.jsx)(s.Fragment,{children:Object(De.jsx)(Ke,{})})})]})};var kt=e=>{let{dipendente:t,history:a,location:i}=e;const n=t,l=Object(c.b)(),o=Object(c.c)((e=>e.userByid)),{loading:r,error:d,user:j}=o,[u,b]=Object(s.useState)(""),[h,p]=Object(s.useState)(""),[m,O]=Object(s.useState)(""),[x,g]=Object(s.useState)(!1);Object(s.useEffect)((()=>{var e;(null!==(e=!j)&&void 0!==e?e:j.isAdmin)?window.location.push("/login"):j&&j.name||(l(Se(t)),l(Se(t)))}),[l,j]);j.documenti,j.name,Date.now();const v=(e,t)=>{window.confirm("Sei sicuro?")&&(l(Se(e)),l(((e,t)=>async(a,s)=>{try{a({type:se});const{userLogin:{userInfo:i}}=s(),n={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:c}=await fe.a.delete("https://api.gestionale.ipsedocet.com/api/users/profile/documenti/admin/".concat(e,"/").concat(t),n);a({type:de,payload:c}),a({type:ie,payload:c}),a({type:y}),ye=!0}catch(d){const t=d.response&&d.response.data.message?d.response.data.message:d.message;ye||alert(t),"Request failed with status code 401"===t&&a(Ne()),a({type:ne,payload:t})}})(e,t)),l(Se(e)))};return Object(De.jsx)(s.Fragment,{children:r?Object(De.jsx)(Ke,{}):Object(De.jsx)(s.Fragment,{children:Object(De.jsx)("div",{className:"",children:Object(De.jsxs)("table",{id:"estrazionePagamentiSingolo",className:"table-to-xls",children:[Object(De.jsx)("thead",{className:"thead",children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("th",{className:"th1Add",children:"Titolo"}),Object(De.jsx)("th",{children:" Action "})]})}),j.documenti.length>0?j.documenti.filter((e=>""==u||e.from.toLowerCase().includes(u.toLowerCase())?e:void 0)).map(((e,t)=>Object(De.jsx)("tbody",{children:Object(De.jsxs)("tr",{children:[Object(De.jsx)("td",{className:"th1Add",children:e.title}),Object(De.jsxs)("td",{children:[Object(De.jsx)("button",{className:"btn btn-success",onClick:()=>(e=>{const t={headers:{Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}};fetch("https://api.gestionale.ipsedocet.com/bucketCur?key=documenti/"+e,t).then((t=>{console.log(t.body),t.json().then((t=>{console.log(t.result.data);var a=new Blob([new Uint8Array(t.result.data)]);let s=window.URL.createObjectURL(a),i=document.createElement("a");console.log("cia"),i.href=s,i.download=e,i.click()}))}))})(e.filecaricato),children:Object(De.jsx)("i",{class:"fas fa-download"})}),Object(De.jsx)("button",{className:"btn btn-danger",onClick:()=>{v(n,e._id),(e=>{console.log(e);const t={headers:{Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}};fe.a.delete("https://api.gestionale.ipsedocet.com/bucket?key=documenti/"+e,t).then((e=>{console.log(e.body)}))})(e.filecaricato)},children:Object(De.jsx)("i",{class:"fas fa-trash"})})]})]})}))):Object(De.jsx)("h4",{children:"Nessun documento trovato..."})]})})})})};var zt=e=>{let{match:t,location:a,history:i,dipendente:n}=e;const l=n,[o,r]=Object(s.useState)(""),[d,j]=Object(s.useState)(new File([" "]," ")),[u,b]=Object(s.useState)("Choose File"),[h,p]=Object(s.useState)(""),m=Object(c.b)(),O=Object(c.c)((e=>e.userLogin)),{userInfo:x}=O,g=Object(c.c)((e=>e.userByid)),{loading:v,error:S,user:E}=g,C=Object(c.c)((e=>e.userAddPayment)),{success:I}=C;Object(s.useEffect)((()=>{E?E&&E.username&&!I||(m({type:A}),m(Se(l)),window.location.reload("/list-documenti/".concat(E._id))):i.push("/login")}),[m,i,x,E,I]);return Object(De.jsxs)(s.Fragment,{children:[Object(De.jsxs)("h3",{className:"titolomodaleDoc text-primary",children:["Agg. Documento a ",E.name," ",E.surname]}),Object(De.jsxs)("p",{className:"lead1",children:[Object(De.jsx)("i",{className:"fas fa-code-branch"})," Aggiungi Documento"]}),Object(De.jsxs)("form",{className:"form",onSubmit:e=>{e.preventDefault(),m(Se(l)),(async e=>{const t=document.getElementById("customFile").value;if(" "===t)return;if(" "===t)return;const a=new FormData;a.append("name","documenti/"+d.name),a.append("mimetype",d.type),a.append("file",d);try{const e={headers:{Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token),"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET,PUT,POST,DELETE,PATCH,OPTIONS"}};console.log(d),console.log(a),await fe.a.post("https://api.gestionale.ipsedocet.com/bucket",a,e,{}),alert("File Uploaded")}catch(s){500===s.response.status?alert("There was a problem with the server"):(console.log(d),alert("Qualcosa \xe8 andato storto"))}})();const t=d.name;m(Se(l)),m(((e,t)=>async(a,s)=>{try{a({type:f});const{userLogin:{userInfo:i}}=s(),n={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(JSON.parse(localStorage.getItem("userInfo")).token)}},{data:c}=await fe.a.put("https://api.gestionale.ipsedocet.com/api/users/profile/documenti/admin/".concat(e),t,n);ye=!0,a({type:y,payload:c}),a({type:de,payload:c})}catch(S){const t=S.response&&S.response.data.message?S.response.data.message:S.message;ye||alert(t),"Request failed with status code 401"===t&&a(Ne()),a({type:N,payload:t})}})(l,{title:o,filecaricato:t})),m(Se(l))},children:[Object(De.jsx)("div",{className:"form-group1",children:Object(De.jsx)("input",{type:"text",placeholder:"*Documento",name:"title",value:o,onChange:e=>r(e.target.value),required:!0})}),Object(De.jsx)("div",{className:"form-group1",children:Object(De.jsx)("input",{required:!0,name:"file",type:"file",id:"customFile",enctype:"multipart/form-data",onChange:e=>{(e=>{j(e),b(e.name)})(e.target.files[0])}})}),Object(De.jsx)("input",{type:"submit",className:"btnAdd btn-primary my-1"})]})]})};var Ft=e=>{let{match:t,history:a,location:i}=e;const n=Object(c.b)(),l=t.params.id,[o,r]=Object(s.useState)(!1),d=Object(c.c)((e=>e.userByid)),{loading:j,error:u,user:b}=d;console.log(b);return Object(s.useEffect)((()=>{var e;(null!==(e=!b)&&void 0!==e?e:b.isAdmin)?a.push("/login"):b&&b.name||(n(Se(l)),console.log("****"),console.log(b),n(Se(l)))}),[n,b,a,l]),Object(De.jsxs)(s.Fragment,{children:[Object(De.jsx)(ke,{}),Object(De.jsx)("div",{children:Object(De.jsx)("div",{className:"sidebar",children:Object(De.jsxs)("ul",{children:[Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/profile/".concat(l),children:[Object(De.jsx)("i",{className:"fas fa-user-circle "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Profilo"})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",onClick:()=>(window.location="/profiles",void n({type:ue})),children:[Object(De.jsx)("i",{class:"fas fa-users"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Dipendenti "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/list-curriculum",children:[Object(De.jsx)("i",{class:"fas fa-users"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Lista CV "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/edit-profile/".concat(l),children:[Object(De.jsx)("i",{className:"fas fa-cogs"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Edit "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-experience/".concat(l),children:[Object(De.jsx)("i",{className:"fab fa-black-tie "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Lavoro "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-education/".concat(l),children:[Object(De.jsx)("i",{className:"fas fa-graduation-cap "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Studi "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-project/".concat(l),children:[Object(De.jsx)("i",{className:"fas fa-briefcase "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Progetto "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-payment/".concat(l),children:[Object(De.jsx)("i",{className:"fas fa-credit-card "})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Pagamento "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/add-lingue/".concat(l),children:[Object(De.jsx)("i",{class:"fas fa-language"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Lingue "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/curriculum/".concat(l),children:[Object(De.jsx)("i",{class:"far fa-file"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Curriculum "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/list-documenti/".concat(l),children:[Object(De.jsx)("i",{class:"fas fa-file-csv"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Documenti"})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/list-pagamenti/".concat(l),children:[Object(De.jsx)("i",{class:"fas fa-file-csv"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Estract Pay"})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("li",{children:Object(De.jsxs)(Oe.b,{className:"sidebarlist",to:"/list-event/".concat(l),children:[Object(De.jsx)("i",{class:"fas fa-file-csv"})," ",Object(De.jsx)("t",{className:"hide-sm",children:"Estract Eve "})]})})}),Object(De.jsx)("div",{className:"divsid",children:Object(De.jsx)("div",{className:"Bottoneeliminauser",children:Object(De.jsxs)("button",{className:"btn btn-danger",onClick:()=>{return e=b._id,void(window.confirm("Sei sicuro?")&&(n(Le(e)),a.push("/profiles")));var e},children:[Object(De.jsx)("i",{className:"fas fa-user-minus"})," ",Object(De.jsxs)("t",{className:"hide-sm",children:[" ","Delete Account"]})]})})})]})})}),Object(De.jsxs)("div",{className:"contdash",children:[Object(De.jsx)("div",{children:Object(De.jsxs)(Me.a,{className:"ModalEvent",isOpen:o,onRequestClose:()=>r(!1),style:{overlay:{zIndex:"100 ",opacity:"100%"},content:{color:"#fff",backgroundColor:" #0077ff",width:"400px",height:"310px",marginLeft:"35%",marginTop:"2%",marginBottom:"50px",position:"inherit",opacity:"100%",borderRadius:"30px",zIndex:"100 "}},children:[Object(De.jsx)("p",{onClick:()=>r(!1),className:"chiusuraModal",children:"X"}),Object(De.jsx)(zt,{dipendente:t.params.id})]})}),Object(De.jsx)("div",{className:"contAdd",children:Object(De.jsx)("button",{className:"btnAddDoc",onClick:()=>r(!0),children:"Aggiungi Documento"})}),void 0!==b.name?Object(De.jsx)(s.Fragment,{children:Object(De.jsx)(kt,{dipendente:l})}):Object(De.jsx)(s.Fragment,{children:Object(De.jsx)(Ke,{})})]})]})};var Tt=()=>Object(De.jsx)(Oe.a,{children:Object(De.jsx)("main",{children:Object(De.jsxs)(xe.c,{children:[Object(De.jsx)(xe.a,{exact:!0,path:"/",component:ze}),Object(De.jsx)(xe.a,{exact:!0,path:"/register",component:pt}),Object(De.jsx)(xe.a,{exact:!0,path:"/login",component:mt}),Object(De.jsx)(xe.a,{exact:!0,path:"/profiles",component:Ze}),Object(De.jsx)(xe.a,{exact:!0,path:"/profile/:id",component:ot}),Object(De.jsx)(xe.a,{exact:!0,path:"/list-event/:id",component:vt}),Object(De.jsx)(xe.a,{exact:!0,path:"/list-eventi/",component:Dt}),Object(De.jsx)(xe.a,{exact:!0,path:"/list-pagamenti/:id",component:wt}),Object(De.jsx)(xe.a,{exact:!0,path:"/list-curriculum/",component:Bt}),Object(De.jsx)(xe.a,{exact:!0,path:"/list-documenti/:id",component:Ft}),Object(De.jsx)(xe.a,{exact:!0,path:"/dashboard",component:Ye}),Object(De.jsx)(xe.a,{exact:!0,path:"/create-profile",component:qe}),Object(De.jsx)(xe.a,{exact:!0,path:"/edit-profile",component:gt}),Object(De.jsx)(xe.a,{exact:!0,path:"/edit-profile/:id",component:Ct}),Object(De.jsx)(xe.a,{exact:!0,path:"/edit-curriculum",component:At}),Object(De.jsx)(xe.a,{exact:!0,path:"/add-lingue",component:Et}),Object(De.jsx)(xe.a,{exact:!0,path:"/add-experience",component:He}),Object(De.jsx)(xe.a,{exact:!0,path:"/add-education",component:_e}),Object(De.jsx)(xe.a,{exact:!0,path:"/add-project",component:dt}),Object(De.jsx)(xe.a,{exact:!0,path:"/add-evento",component:Ge}),Object(De.jsx)(xe.a,{exact:!0,path:"/add-lingue/:id",component:St}),Object(De.jsx)(xe.a,{exact:!0,path:"/add-experience/:id",component:jt}),Object(De.jsx)(xe.a,{exact:!0,path:"/add-education/:id",component:ut}),Object(De.jsx)(xe.a,{exact:!0,path:"/add-project/:id",component:ht}),Object(De.jsx)(xe.a,{exact:!0,path:"/add-payment/:id",component:bt}),Object(De.jsx)(xe.a,{exact:!0,path:"/curriculum/:id",component:lt}),Object(De.jsx)(xe.a,{exact:!0,path:"/curriculum/",component:Nt}),Object(De.jsx)(xe.a,{component:rt})]})})});Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));n.a.render(Object(De.jsx)(c.a,{store:me,children:Object(De.jsx)(Tt,{})}),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((e=>{e.unregister()})).catch((e=>{console.error(e.message)}))},78:function(e,t,a){},79:function(e,t,a){}},[[180,1,2]]]); //# sourceMappingURL=main.757bd8f4.chunk.js.map