1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6050],{26050:function(e,n,t){t.r(n),t.d(n,{default:function(){return x}});var r=t(57437),a=t(21691),c=t(29721),i=t(35069),s=t(88139),u=(0,t(3243).Z)("outline","alert-hexagon","IconAlertHexagon",[["path",{d:"M19.875 6.27c.7 .398 1.13 1.143 1.125 1.948v7.284c0 .809 -.443 1.555 -1.158 1.948l-6.75 4.27a2.269 2.269 0 0 1 -2.184 0l-6.75 -4.27a2.225 2.225 0 0 1 -1.158 -1.948v-7.285c0 -.809 .443 -1.554 1.158 -1.947l6.75 -3.98a2.33 2.33 0 0 1 2.25 0l6.75 3.98h-.033z",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]]),l=t(24458),o=t(55378),d=t(2265),h=t(14438),f=t(50745),_=t(34274),p=t(62473);function x(){let[e,n]=(0,d.useState)(),{closeModal:t}=(0,p.Z)(),{data:x}=(0,f.Z)(),{mutateAsync:E,isPending:y}=(0,_.Z)(),v=async()=>{try{e&&(await E(e),t())}catch(e){h.toast.error("Error estableciendo CV Principal")}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.k,{className:"flex flex-col gap-1",children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(u,{color:"#fb7c11"})," A\xfan no tienes un CV Principal"]})}),(0,r.jsxs)(i.I,{children:[(0,r.jsx)("div",{className:"flex flex-col gap-6",children:(0,r.jsx)("h1",{children:"Debes tener un CV Principal para poder usar todas nuestras funcionalidades."})}),(0,r.jsx)(l.g,{"aria-label":"Lista de CVs",items:x,placeholder:"Selecciona un CV",onChange:e=>{n(e.target.value)},children:e=>(0,r.jsx)(o.R,{children:e.name},e._id)})]}),(0,r.jsx)(s.R,{children:(0,r.jsx)(a.A,{color:"primary",isDisabled:!e,isLoading:y,onClick:v,children:"Establecer Principal"})})]})}},34274:function(e,n,t){t.d(n,{Z:function(){return s}});var r=t(29827),a=t(21770),c=t(78457);let i=async e=>fetch("/api/cv/".concat(e,"/main"),{method:"POST",headers:{"Content-Type":"application/json"}}).then(e=>e.json());function s(){let e=(0,r.useQueryClient)();return(0,a.useMutation)({mutationFn:i,onSuccess:()=>{e.invalidateQueries({queryKey:[c.ew]})}})}},50745:function(e,n,t){t.d(n,{Z:function(){return i}});var r=t(71632),a=t(78457);let c=async()=>fetch("/api/cv/list").then(e=>e.json()).then(e=>e.data);function i(){return(0,r.useQuery)({queryKey:[a.ew],queryFn:c})}},78457:function(e,n,t){t.d(n,{HT:function(){return c},Oh:function(){return l},Qr:function(){return i},Te:function(){return s},ew:function(){return a},uB:function(){return r},xq:function(){return u}});let r="QK_GET_CV",a="QK_GET_CVS_BY_USER",c="QK_GET_SKILLS",i="QK_GET_QUIZ",s="QK_GET_USER_QUIZ",u="QUERY_KEY_GET_LAST_EMPLOYABILITY",l="QK_GET_CAREERS"}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.