anima-ds-nucleus 1.0.98 → 1.0.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/anima-ds.cjs.js
CHANGED
|
@@ -1396,6 +1396,11 @@ Cree su primer empresa.`,az="Crear empresa",rz={boxSizing:"border-box",flexShrin
|
|
|
1396
1396
|
padding-left: 8px;
|
|
1397
1397
|
box-sizing: border-box;
|
|
1398
1398
|
}
|
|
1399
|
+
.anima-alta-personas__tabs-shell {
|
|
1400
|
+
box-sizing: border-box;
|
|
1401
|
+
margin-left: 8px;
|
|
1402
|
+
margin-right: 8px;
|
|
1403
|
+
}
|
|
1399
1404
|
.anima-alta-personas__relaciones-laborales-wrap {
|
|
1400
1405
|
width: 100%;
|
|
1401
1406
|
max-width: 100%;
|
|
@@ -1445,6 +1450,18 @@ Cree su primer empresa.`,az="Crear empresa",rz={boxSizing:"border-box",flexShrin
|
|
|
1445
1450
|
justify-items: stretch;
|
|
1446
1451
|
}
|
|
1447
1452
|
@media (min-width: 1024px) {
|
|
1453
|
+
.anima-alta-personas__tabs-nav .anima-alta-personas__tab:nth-child(1) {
|
|
1454
|
+
width: 200px;
|
|
1455
|
+
min-width: 200px;
|
|
1456
|
+
max-width: 200px;
|
|
1457
|
+
flex: 0 0 200px;
|
|
1458
|
+
}
|
|
1459
|
+
.anima-alta-personas__tabs-nav .anima-alta-personas__tab:nth-child(2) {
|
|
1460
|
+
width: 150px;
|
|
1461
|
+
min-width: 150px;
|
|
1462
|
+
max-width: 150px;
|
|
1463
|
+
flex: 0 0 150px;
|
|
1464
|
+
}
|
|
1448
1465
|
.anima-alta-personas__relaciones-grid--con-historial
|
|
1449
1466
|
.anima-alta-personas__relacion-card-slot:not(.anima-alta-personas__relacion-card-slot--historial) {
|
|
1450
1467
|
grid-column: 1 / 2;
|
|
@@ -1490,7 +1507,7 @@ Cree su primer empresa.`,az="Crear empresa",rz={boxSizing:"border-box",flexShrin
|
|
|
1490
1507
|
display: flex;
|
|
1491
1508
|
flex-direction: row;
|
|
1492
1509
|
align-items: stretch;
|
|
1493
|
-
gap:
|
|
1510
|
+
gap: 5px;
|
|
1494
1511
|
}
|
|
1495
1512
|
.anima-alta-personas__tab {
|
|
1496
1513
|
box-sizing: border-box;
|
|
@@ -1693,13 +1710,16 @@ Cree su primer empresa.`,az="Crear empresa",rz={boxSizing:"border-box",flexShrin
|
|
|
1693
1710
|
}
|
|
1694
1711
|
.anima-alta-personas__tabs-wrap {
|
|
1695
1712
|
padding: 0;
|
|
1696
|
-
padding-left: 8px;
|
|
1697
1713
|
background: transparent;
|
|
1698
1714
|
margin-bottom: 16px;
|
|
1699
1715
|
box-sizing: border-box;
|
|
1700
1716
|
}
|
|
1717
|
+
.anima-alta-personas__tabs-shell {
|
|
1718
|
+
margin-left: 0;
|
|
1719
|
+
margin-right: 0;
|
|
1720
|
+
}
|
|
1701
1721
|
.anima-alta-personas__tabs-nav {
|
|
1702
|
-
gap:
|
|
1722
|
+
gap: 20px;
|
|
1703
1723
|
}
|
|
1704
1724
|
.anima-alta-personas__tab {
|
|
1705
1725
|
min-width: 0;
|
|
@@ -1743,10 +1763,10 @@ Cree su primer empresa.`,az="Crear empresa",rz={boxSizing:"border-box",flexShrin
|
|
|
1743
1763
|
padding-left: 16px;
|
|
1744
1764
|
}
|
|
1745
1765
|
}
|
|
1746
|
-
`,V5={...F1},iz={display:"block",marginBottom:"8px",fontFamily:Z,fontWeight:500,fontSize:"14px",lineHeight:"21px",color:"var(--color-main-800)"},cz={width:"100%",height:"84px",minHeight:"84px",maxHeight:"84px",padding:"12px",borderRadius:"8px",border:"1px solid #38656D",fontFamily:Z,fontSize:"16px",lineHeight:"24px",color:"var(--color-main-800)",boxSizing:"border-box",resize:"none",overflowY:"auto"},k1={nombre:"",apellido:"",fechaNacimiento:"",genero:"",nacionalidad:"",tipoDocumento:"",numeroDocumento:"",paisEmision:"",emailPersonal:"",telefonoMovil:"",calle:"",numero:"",piso:"",departamento:"",pais:"",provincia:"",ciudad:"",codigoPostal:"",notasAdicionales:"",fotoUrl:""};function _5(a){return{...k1,...a&&typeof a=="object"?a:{}}}function S0({title:a,children:r,style:n}){return l.jsxs("div",{style:{...L1,...n},children:[a?l.jsx("h2",{style:tz,children:a}):null,r]})}const Xa={border:"1px solid #C4C4C4",borderRadius:"16px",backgroundColor:"#FFFFFF",padding:"20px",boxSizing:"border-box",width:"100%",maxWidth:"100%",minWidth:0},sz={activa:"success",borrador:"primary",inactiva:"error"},B1={width:"40px",height:"40px",minWidth:"40px",borderRadius:"8px",background:"#BDE4E9",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box"},S1="#29474C",dz={width:"40px",height:"40px",minWidth:"40px",borderRadius:"8px",background:"#DDDDDD",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box"},uz="#5F5F5F",fz={fontFamily:Z,fontWeight:500,fontStyle:"normal",fontSize:"20px",lineHeight:"30px",letterSpacing:"0",color:"#29474C",margin:0},mz={fontFamily:_e,fontWeight:400,fontStyle:"normal",fontSize:"14px",lineHeight:"21px",letterSpacing:"0.01em",color:"#29474C",margin:"4px 0 0 0"},hz={flexShrink:0,width:"auto",minHeight:"24px",opacity:1,borderRadius:"var(--radius-16, 16px)",borderWidth:"1px",borderStyle:"solid",borderColor:"var(--color-status-success, #0A742C)",paddingTop:"2px",paddingRight:"12px",paddingBottom:"4px",paddingLeft:"12px",backgroundColor:"var(--misc-exito-fondo, #D3FFDF)",fontFamily:_e,fontWeight:400,fontStyle:"normal",fontSize:"12px",lineHeight:"18px",letterSpacing:"0%",textAlign:"center",verticalAlign:"middle",color:"var(--color-status-success, #0A742C)",display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box"};function R0({iconName:a,label:r,value:n,iconoConFondoHistorial:t=!1}){const o=l.jsx($,{name:a,variant:"24-outline",size:24,style:{color:S1,flexShrink:0,display:"block"},"aria-hidden":!0});return l.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"12px",minWidth:0},children:[t?l.jsx("div",{style:B1,children:o}):o,l.jsxs("div",{style:{minWidth:0,display:"flex",flexDirection:"column",justifyContent:"center"},children:[l.jsx("div",{style:{fontFamily:Z,fontWeight:400,fontSize:"14px",lineHeight:"21px",letterSpacing:"0.01em",color:"#29474C"},children:r}),l.jsx("div",{style:{fontFamily:Z,fontWeight:600,fontSize:"14px",lineHeight:"21px",color:"#29474C",marginTop:"2px"},children:n!=null&&String(n).trim()!==""?n:"—"})]})]})}function Oa(a,r){return a?.id!=null?String(a.id):String(r)}function pz(a){if(!a)return!1;const r=a.estado??a.status??"";return String(r).trim().toLowerCase()==="inactiva"}const ma=44,wz=22,gz=1.5,vz="#29474C",bz={width:`${ma}px`,height:`${ma}px`,minWidth:`${ma}px`,borderRadius:"50%",background:"#B8E2E9",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",flexShrink:0},D5={fontFamily:Z,fontWeight:500,fontStyle:"normal",fontSize:"16px",lineHeight:"24px",letterSpacing:"0",verticalAlign:"middle",color:"#29474C",margin:0,leadingTrim:"none"};function xz(a){if(!a||typeof a!="object")return null;const r=a.id??a.eventoId??a.uuid??a.codigo??null,n=a.titulo??a.title??a.descripcion??a.mensaje??a.texto??a.accion??a.tipoEvento??"",t=a.detalle??a.subtitulo??a.secondary??a.detalleLargo??a.metadata??a.legajoGenerado??a.textoSecundario??"",o=a.fechaHora??a.fechaYHora??a.fechaHoraFormateada??a.timestampLegible??"",i=a.fecha!=null?String(a.fecha):"",c=a.hora!=null?String(a.hora):"",s=a.usuario??a.user??a.autor??a.nombreUsuario??a.usuarioNombre??a.createdBy??a.modificadoPor??"",d=a.iconName??a.icon??a.tipoIcono??"BriefcaseIcon",u=o&&String(o).trim()||(i&&c?`${i} - ${c}`:i||c||"");return!n&&!u&&!s&&!t?null:{id:r,titulo:n,detalle:t,lineaTiempo:u,usuario:s,iconName:d}}function Rz(a){const r=a?.historialLaboral??a?.historial??a?.historialEventos??a?.eventosHistorial;return Array.isArray(r)?r.map(xz).filter(Boolean):[]}function yz({relacion:a,t:r}){const n=Rz(a),t=r("persona.alta.relacionLaboralHistorialTitle",{defaultValue:"Historial"}),o=r("persona.alta.relacionLaboralHistorialEmpty",{defaultValue:"No hay eventos registrados para esta relación."});return l.jsxs("article",{style:{...Xa,display:"flex",flexDirection:"column",overflow:"visible",minWidth:0},"aria-label":t,children:[l.jsx(A,{component:"h3",variant:"body2",style:{fontFamily:Z,fontWeight:400,fontStyle:"normal",fontSize:"20px",lineHeight:"30px",letterSpacing:"0",color:"#29474C",margin:"0 0 16px 0"},children:t}),n.length===0?l.jsx(A,{component:"p",variant:"body2",style:{fontFamily:Z,fontWeight:400,fontSize:"14px",lineHeight:"21px",color:"#29474C",margin:0,opacity:.85},children:o}):l.jsx("div",{role:"list",style:{margin:0,padding:0,width:"100%",minWidth:0,overflowWrap:"break-word",wordBreak:"break-word"},children:n.map((i,c)=>{const s=c===n.length-1,d=i.id!=null?String(i.id):`historial-${c}`;return l.jsxs("div",{role:"listitem",style:{display:"flex",flexDirection:"row",alignItems:"stretch",gap:"16px",marginBottom:s?0:"8px"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",width:`${ma}px`,flexShrink:0},children:[l.jsx("div",{style:bz,children:l.jsx($,{name:i.iconName,variant:"24-outline",size:wz,strokeWidth:gz,style:{color:vz,display:"block"},"aria-hidden":!0})}),s?null:l.jsx("div",{style:{width:"1.5px",flex:"1 1 auto",minHeight:"24px",marginTop:"8px",backgroundColor:"#5F5F5F",borderRadius:"1px"}})]}),l.jsxs("div",{style:{flex:"1 1 auto",minWidth:0,maxWidth:"100%",paddingBottom:s?0:"12px",overflowWrap:"break-word",wordBreak:"break-word"},children:[i.titulo?l.jsx(A,{component:"p",variant:"body2",style:D5,children:i.titulo}):null,i.detalle?l.jsx(A,{component:"p",variant:"body2",style:{...D5,margin:i.titulo?"4px 0 0 0":0},children:i.detalle}):null,i.lineaTiempo?l.jsx(A,{component:"p",variant:"body2",style:{fontFamily:Z,fontWeight:400,fontSize:"14px",lineHeight:"21px",color:"#29474C",margin:"6px 0 0 0"},children:i.lineaTiempo}):null,i.usuario?l.jsx(A,{component:"p",variant:"body2",style:{fontFamily:Z,fontWeight:400,fontStyle:"italic",fontSize:"14px",lineHeight:"21px",color:"#29474C",margin:"4px 0 0 0",opacity:.9},children:i.usuario}):null]})]},d)})})]})}function Ez({relacion:a,index:r,t:n,onEditar:t,onAccionSecundaria:o,onSeleccionar:i,seleccionada:c=!1}){const s=a.empresa??a.nombreEmpresa??a.razonSocial??a.nombre??"—",d=a.codigoLegajo??a.legajoCodigo??a.subtitulo??"",u=a.estado??a.status??"",f=String(u).trim().toLowerCase(),h=f==="inactiva",m=f==="activa"?n("persona.alta.relacionLaboralEstadoActiva",{defaultValue:"Activa"}):f==="borrador"?n("persona.alta.relacionLaboralEstadoBorrador",{defaultValue:"Borrador"}):f==="inactiva"?n("persona.alta.relacionLaboralEstadoInactiva",{defaultValue:"Inactiva"}):"",v=a.estadoLabel??(m||u),g=a.estadoBadgeVariant??sz[f]??"primary",j=a.tipoRelacion??a.tipo??"",y=a.modalidad??"",E=a.fechaInicio??"",b=a.fechaFin??"",x=h?{...Xa,backgroundColor:"#F5F5F5"}:Xa,R=h?dz:B1,M=h?uz:S1,I=f==="activa"?n("persona.alta.relacionLaboralDesactivar",{defaultValue:"Desactivar"}):f==="borrador"?n("persona.alta.relacionLaboralActivar",{defaultValue:"Activar"}):"",C=a.etiquetaAccionSecundaria??a.accionSecundariaLabel??I,L=typeof o=="function"&&C,O=typeof t=="function"&&!h,N=L||O,k=f==="activa"&&a.estadoBadgeVariant==null?{...hz}:{flexShrink:0},_=i?T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),i())}:void 0;return l.jsxs("article",{style:{...x,...i?{cursor:c?"default":"pointer"}:{}},"aria-label":s,...i?{tabIndex:0,onClick:i,onKeyDown:_}:{},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"flex-start",gap:"12px",marginBottom:"20px"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"12px",flex:"1 1 auto",minWidth:0},children:[c?null:l.jsx("div",{style:R,children:l.jsx($,{name:"BuildingOffice2Icon",variant:"24-outline",size:20,style:{color:M},"aria-hidden":!0})}),l.jsxs("div",{style:{flex:"1 1 auto",minWidth:0},children:[l.jsx(A,{component:"h3",variant:"body2",style:fz,children:s}),d?l.jsx(A,{component:"p",variant:"body2",style:mz,children:d}):null]})]}),v?l.jsx(w0,{variant:g,size:f==="activa"&&a.estadoBadgeVariant==null?"small":"medium",style:k,children:v}):null]}),l.jsxs("div",{className:"anima-alta-personas__relacion-card-grid2",children:[l.jsx(R0,{iconName:"BriefcaseIcon",label:n("persona.alta.relacionLaboralTipo",{defaultValue:"Tipo"}),value:j,iconoConFondoHistorial:c}),l.jsx(R0,{iconName:"ComputerDesktopIcon",label:n("persona.alta.relacionLaboralModalidad",{defaultValue:"Modalidad"}),value:y,iconoConFondoHistorial:c})]}),h?l.jsxs("div",{className:"anima-alta-personas__relacion-card-grid2",style:{marginTop:"16px"},children:[l.jsx(R0,{iconName:"CalendarDaysIcon",label:n("persona.alta.relacionLaboralFechaInicio",{defaultValue:"Fecha inicio"}),value:E,iconoConFondoHistorial:c}),l.jsx(R0,{iconName:"CalendarDaysIcon",label:n("persona.alta.relacionLaboralFechaFin",{defaultValue:"Fecha fin"}),value:b,iconoConFondoHistorial:c})]}):l.jsx("div",{style:{marginTop:"16px"},children:l.jsx(R0,{iconName:"CalendarDaysIcon",label:n("persona.alta.relacionLaboralFechaInicio",{defaultValue:"Fecha inicio"}),value:E,iconoConFondoHistorial:c})}),N?l.jsxs("div",{role:"presentation",onClick:T=>T.stopPropagation(),"aria-hidden":c||void 0,style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",gap:"12px",marginTop:"20px",flexWrap:"wrap",visibility:c?"hidden":"visible",pointerEvents:c?"none":"auto"},children:[L?l.jsx(Xe,{type:"button",variant:"outline",text:C,onClick:()=>o(a,r),style:ea,textStyle:b0}):null,O?l.jsx(Xe,{type:"button",text:n("persona.alta.relacionLaboralEditar",{defaultValue:"Editar"}),onClick:()=>t(a,r),style:ea,textStyle:b0}):null]}):null]})}const ea={...F1,height:"40px",padding:"8px 14px",marginLeft:0},Va={...ea,border:"1px solid #29474C",backgroundColor:"transparent"},_a={...b0,color:"#29474C"},jz="#E8B261",Cz="#402E0E",Az="#D3FFDF",Mz="#0A742C",Zz="#0A742C",$z="#DDDDDD",Lz="#C4C4C4",N5=3,Fz="min(720px, calc(100% - 48px))";function M0(a,r){return a==null||String(a).trim()===""?"":r.find(t=>String(t.value)===String(a))?.label??""}function P5(a){if(!a||!/^\d{4}-\d{2}-\d{2}$/.test(String(a).trim()))return"—";const[r,n,t]=String(a).trim().split("-");return`${t}-${n}-${r}`}function kz(a){const r=String(a??"").trim();if(/^\d{4}-\d{2}-\d{2}$/.test(r))return r;const n=r.match(/^(\d{2})[/-](\d{2})[/-](\d{4})$/);return n?`${n[3]}-${n[2]}-${n[1]}`:""}function T5(a,r){if(a==null||String(a).trim()==="")return"";const n=String(a).trim(),t=r.find(s=>String(s.value)===n);if(t)return String(t.value);const o=n.toLowerCase(),i=r.find(s=>String(s.label).trim().toLowerCase()===o);if(i)return String(i.value);const c=r.find(s=>String(s.label).toLowerCase().includes(o)||o.includes(String(s.label).toLowerCase()));return c?String(c.value):""}function Bz(a,r){if(!Array.isArray(r)||r.length===0)return"";const n=a?.empresaId??a?.idEmpresa??a?.empresaCodigo??a?.codigoEmpresa;if(n!=null&&String(n).trim()!==""){const d=String(n).trim();if(r.some(u=>String(u.value)===d))return d}const t=a?.empresa??a?.nombreEmpresa??a?.razonSocial??a?.nombre??"",o=String(t).trim();if(!o)return"";const i=r.find(d=>String(d.label).trim()===o);if(i)return String(i.value);const c=o.toLowerCase(),s=r.find(d=>String(d.label).trim().toLowerCase()===c);return s?String(s.value):""}function Sz({empresaOptions:a,empresaValue:r,onEmpresaChange:n,tipoRelacionOptions:t,modalidadOptions:o,onCancelar:i,onEmpresaPasoCompletado:c,onGuardarBorrador:s,onActivar:d,onFinalizar:u,prefill:f=null,mostrarAvisoRelacionActivaEmpresa:h=!1,bloquearEmpresaEnEdicionActiva:m=!1,bloquearFechaInicioEnEdicionActiva:v=!1}){const{t:g,i18n:j}=$e.useTranslation(),[y,E]=p.useState(()=>{const X=f?.pasoIndex;return typeof X=="number"&&X>=0&&X<N5?X:0}),[b,x]=p.useState(()=>f?.fechaInicio??""),[R,M]=p.useState(()=>f?.tipoRelacion??""),[I,C]=p.useState(()=>f?.modalidad??""),[L,O]=p.useState(!1),[N,k]=p.useState(""),_=p.useMemo(()=>g("persona.alta.relacionLaboralAltaSubmitError",{defaultValue:"Ocurrió un error. Intenta nuevamente."}),[g,j.language]),T=p.useMemo(()=>[{key:"empresa",label:g("persona.alta.relacionLaboralAltaStepEmpresa",{defaultValue:"Empresa"})},{key:"datos",label:g("persona.alta.relacionLaboralAltaStepDatos",{defaultValue:"Datos laborales"})},{key:"confirmacion",label:g("persona.alta.relacionLaboralAltaStepConfirmacion",{defaultValue:"Confirmación"})}],[g,j.language]),W=f!=null,S=f?.relacionId??null,z=W&&f?.flujoWizard==="editar"&&f?.esActiva===!0,V=z&&m,fe=z&&v,ee=r!=null&&String(r).trim()!=="",D=b.trim()!==""&&R.trim()!==""&&I.trim()!=="",oe=()=>{if(y===0){if(!ee)return;typeof c=="function"&&c(r),E(1);return}if(y===1){if(!D)return;E(2);return}},de=p.useCallback(()=>k(""),[]),te=p.useCallback(()=>k(_),[_]),Q=p.useCallback(()=>{const X=M0(r,a),q=M0(R,t),le=M0(I,o);return{modo:W?"edit":"create",flujoWizard:f?.flujoWizard??null,relacionId:S,empresaId:r,empresaLabel:X||"—",fechaInicio:b,fechaInicioDisplay:P5(b),tipoRelacion:R,tipoRelacionLabel:q||"—",modalidad:I,modalidadLabel:le||"—"}},[W,f?.flujoWizard,S,r,a,b,R,t,I,o]),P=async()=>{if(typeof s=="function")try{de(),O(!0),await Promise.resolve(s(Q()))}catch{te()}finally{O(!1)}},ue=async()=>{if(typeof d=="function")try{de(),O(!0),await Promise.resolve(d(Q()))}catch{te();return}finally{O(!1)}typeof u=="function"&&u()},ge=y===N5-1;return l.jsxs("div",{className:"anima-alta-personas__relacion-laboral-alta-vista",children:[l.jsx(A,{variant:"body2",component:"h2",style:{fontFamily:Z,fontWeight:400,fontStyle:"normal",fontSize:"24px",lineHeight:"36px",letterSpacing:"0px",color:"#29474C",margin:"0 0 24px 0",padding:0,textAlign:"center"},children:f?f.flujoWizard==="reingresar"?g("persona.alta.relacionLaboralAltaTitleReingresar",{defaultValue:"Reingresar persona"}):g("persona.alta.relacionLaboralAltaTitleEditar",{defaultValue:"Editar relación laboral"}):g("persona.alta.relacionLaboralAltaTitle",{defaultValue:"Nueva relación laboral"})}),l.jsx("div",{className:"anima-alta-personas__relacion-laboral-alta-stepper-wrap",style:{maxWidth:Fz,width:"100%",marginLeft:"auto",marginRight:"auto",marginBottom:"24px",boxSizing:"border-box"},children:l.jsx("nav",{"aria-label":g("persona.alta.relacionLaboralAltaStepperLabel",{defaultValue:"Pasos del alta de relación laboral"}),style:{width:"100%"},children:l.jsx("ol",{style:{display:"grid",gridTemplateColumns:"auto minmax(0, 1fr) auto minmax(0, 1fr) auto",alignItems:"center",columnGap:"8px",width:"100%",listStyle:"none",margin:0,padding:0},children:T.map((X,q)=>{const le=q===y,ye=q<y,me=le||ye?"#29474C":"#5F5F5F",B=le||ye?600:400,J=le?Cz:"#5F5F5F",Le=ye,Fe={display:"inline-flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderRadius:"50%",flexShrink:0,fontFamily:Z,fontWeight:600,fontSize:"14px",lineHeight:"21px",boxSizing:"border-box",...le?{backgroundColor:jz,border:"2px solid transparent",color:J}:ye?{backgroundColor:Az,border:`2px solid ${Mz}`}:{backgroundColor:$z,border:"2px solid transparent",color:J}};return l.jsxs(p.Fragment,{children:[l.jsx("li",{"aria-label":X.label,style:{minWidth:0,margin:0,padding:0},children:l.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"8px",minWidth:0},children:[l.jsx("span",{style:Fe,"aria-current":le?"step":void 0,children:Le?l.jsx($,{name:"CheckIcon",variant:"24-outline",size:18,style:{color:Zz,flexShrink:0},"aria-hidden":!0}):q+1}),l.jsx("span",{className:"anima-alta-personas__relacion-laboral-alta-step-label",style:{fontFamily:Z,fontWeight:B,fontSize:"14px",lineHeight:"21px",color:me,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:X.label})]})}),q<T.length-1?l.jsx("li",{"aria-hidden":"true",style:{display:"block",minWidth:0,margin:0,padding:0,listStyle:"none",alignSelf:"center"},children:l.jsx("div",{style:{width:"100%",height:"2px",backgroundColor:Lz}})}):null]},X.key)})})})}),l.jsxs("div",{style:{...L1,margin:0},children:[y===0?l.jsxs(l.Fragment,{children:[l.jsx("h3",{style:{...Ha,margin:"0 0 12px 0"},children:g("persona.alta.relacionLaboralAltaSeleccionaEmpresa",{defaultValue:"Selecciona la empresa"})}),l.jsx("p",{style:{fontFamily:Z,fontWeight:400,fontSize:"14px",lineHeight:"21px",color:"#29474C",margin:"0 0 20px 0",whiteSpace:"pre-line"},children:g("persona.alta.relacionLaboralAltaEmpresaAyuda",{defaultValue:`Elige la empresa para la cual se establecerá la relación laboral.
|
|
1766
|
+
`,V5={...F1},iz={display:"block",marginBottom:"8px",fontFamily:Z,fontWeight:500,fontSize:"14px",lineHeight:"21px",color:"var(--color-main-800)"},cz={width:"100%",height:"84px",minHeight:"84px",maxHeight:"84px",padding:"12px",borderRadius:"8px",border:"1px solid #38656D",fontFamily:Z,fontSize:"16px",lineHeight:"24px",color:"var(--color-main-800)",boxSizing:"border-box",resize:"none",overflowY:"auto"},k1={nombre:"",apellido:"",fechaNacimiento:"",genero:"",nacionalidad:"",tipoDocumento:"",numeroDocumento:"",paisEmision:"",emailPersonal:"",telefonoMovil:"",calle:"",numero:"",piso:"",departamento:"",pais:"",provincia:"",ciudad:"",codigoPostal:"",notasAdicionales:"",fotoUrl:""};function _5(a){return{...k1,...a&&typeof a=="object"?a:{}}}function S0({title:a,children:r,style:n}){return l.jsxs("div",{style:{...L1,...n},children:[a?l.jsx("h2",{style:tz,children:a}):null,r]})}const Xa={border:"1px solid #C4C4C4",borderRadius:"16px",backgroundColor:"#FFFFFF",padding:"20px",boxSizing:"border-box",width:"100%",maxWidth:"100%",minWidth:0},sz={activa:"success",borrador:"primary",inactiva:"error"},B1={width:"40px",height:"40px",minWidth:"40px",borderRadius:"8px",background:"#BDE4E9",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box"},S1="#29474C",dz={width:"40px",height:"40px",minWidth:"40px",borderRadius:"8px",background:"#DDDDDD",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box"},uz="#5F5F5F",fz={fontFamily:Z,fontWeight:500,fontStyle:"normal",fontSize:"20px",lineHeight:"30px",letterSpacing:"0",color:"#29474C",margin:0},mz={fontFamily:_e,fontWeight:400,fontStyle:"normal",fontSize:"14px",lineHeight:"21px",letterSpacing:"0.01em",color:"#29474C",margin:"4px 0 0 0"},hz={flexShrink:0,width:"auto",minHeight:"24px",opacity:1,borderRadius:"var(--radius-16, 16px)",borderWidth:"1px",borderStyle:"solid",borderColor:"var(--color-status-success, #0A742C)",paddingTop:"2px",paddingRight:"12px",paddingBottom:"4px",paddingLeft:"12px",backgroundColor:"var(--misc-exito-fondo, #D3FFDF)",fontFamily:_e,fontWeight:400,fontStyle:"normal",fontSize:"12px",lineHeight:"18px",letterSpacing:"0%",textAlign:"center",verticalAlign:"middle",color:"var(--color-status-success, #0A742C)",display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box"};function R0({iconName:a,label:r,value:n,iconoConFondoHistorial:t=!1}){const o=l.jsx($,{name:a,variant:"24-outline",size:24,style:{color:S1,flexShrink:0,display:"block"},"aria-hidden":!0});return l.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"12px",minWidth:0},children:[t?l.jsx("div",{style:B1,children:o}):o,l.jsxs("div",{style:{minWidth:0,display:"flex",flexDirection:"column",justifyContent:"center"},children:[l.jsx("div",{style:{fontFamily:Z,fontWeight:400,fontSize:"14px",lineHeight:"21px",letterSpacing:"0.01em",color:"#29474C"},children:r}),l.jsx("div",{style:{fontFamily:Z,fontWeight:600,fontSize:"14px",lineHeight:"21px",color:"#29474C",marginTop:"2px"},children:n!=null&&String(n).trim()!==""?n:"—"})]})]})}function Oa(a,r){return a?.id!=null?String(a.id):String(r)}function pz(a){if(!a)return!1;const r=a.estado??a.status??"";return String(r).trim().toLowerCase()==="inactiva"}const ma=44,wz=22,gz=1.5,vz="#29474C",bz={width:`${ma}px`,height:`${ma}px`,minWidth:`${ma}px`,borderRadius:"50%",background:"#B8E2E9",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",flexShrink:0},D5={fontFamily:Z,fontWeight:500,fontStyle:"normal",fontSize:"16px",lineHeight:"24px",letterSpacing:"0",verticalAlign:"middle",color:"#29474C",margin:0,leadingTrim:"none"};function xz(a){if(!a||typeof a!="object")return null;const r=a.id??a.eventoId??a.uuid??a.codigo??null,n=a.titulo??a.title??a.descripcion??a.mensaje??a.texto??a.accion??a.tipoEvento??"",t=a.detalle??a.subtitulo??a.secondary??a.detalleLargo??a.metadata??a.legajoGenerado??a.textoSecundario??"",o=a.fechaHora??a.fechaYHora??a.fechaHoraFormateada??a.timestampLegible??"",i=a.fecha!=null?String(a.fecha):"",c=a.hora!=null?String(a.hora):"",s=a.usuario??a.user??a.autor??a.nombreUsuario??a.usuarioNombre??a.createdBy??a.modificadoPor??"",d=a.iconName??a.icon??a.tipoIcono??"BriefcaseIcon",u=o&&String(o).trim()||(i&&c?`${i} - ${c}`:i||c||"");return!n&&!u&&!s&&!t?null:{id:r,titulo:n,detalle:t,lineaTiempo:u,usuario:s,iconName:d}}function Rz(a){const r=a?.historialLaboral??a?.historial??a?.historialEventos??a?.eventosHistorial;return Array.isArray(r)?r.map(xz).filter(Boolean):[]}function yz({relacion:a,t:r}){const n=Rz(a),t=r("persona.alta.relacionLaboralHistorialTitle",{defaultValue:"Historial"}),o=r("persona.alta.relacionLaboralHistorialEmpty",{defaultValue:"No hay eventos registrados para esta relación."});return l.jsxs("article",{style:{...Xa,display:"flex",flexDirection:"column",overflow:"visible",minWidth:0},"aria-label":t,children:[l.jsx(A,{component:"h3",variant:"body2",style:{fontFamily:Z,fontWeight:400,fontStyle:"normal",fontSize:"20px",lineHeight:"30px",letterSpacing:"0",color:"#29474C",margin:"0 0 16px 0"},children:t}),n.length===0?l.jsx(A,{component:"p",variant:"body2",style:{fontFamily:Z,fontWeight:400,fontSize:"14px",lineHeight:"21px",color:"#29474C",margin:0,opacity:.85},children:o}):l.jsx("div",{role:"list",style:{margin:0,padding:0,width:"100%",minWidth:0,overflowWrap:"break-word",wordBreak:"break-word"},children:n.map((i,c)=>{const s=c===n.length-1,d=i.id!=null?String(i.id):`historial-${c}`;return l.jsxs("div",{role:"listitem",style:{display:"flex",flexDirection:"row",alignItems:"stretch",gap:"16px",marginBottom:s?0:"8px"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",width:`${ma}px`,flexShrink:0},children:[l.jsx("div",{style:bz,children:l.jsx($,{name:i.iconName,variant:"24-outline",size:wz,strokeWidth:gz,style:{color:vz,display:"block"},"aria-hidden":!0})}),s?null:l.jsx("div",{style:{width:"1.5px",flex:"1 1 auto",minHeight:"24px",marginTop:"8px",backgroundColor:"#5F5F5F",borderRadius:"1px"}})]}),l.jsxs("div",{style:{flex:"1 1 auto",minWidth:0,maxWidth:"100%",paddingBottom:s?0:"12px",overflowWrap:"break-word",wordBreak:"break-word"},children:[i.titulo?l.jsx(A,{component:"p",variant:"body2",style:D5,children:i.titulo}):null,i.detalle?l.jsx(A,{component:"p",variant:"body2",style:{...D5,margin:i.titulo?"4px 0 0 0":0},children:i.detalle}):null,i.lineaTiempo?l.jsx(A,{component:"p",variant:"body2",style:{fontFamily:Z,fontWeight:400,fontSize:"14px",lineHeight:"21px",color:"#29474C",margin:"6px 0 0 0"},children:i.lineaTiempo}):null,i.usuario?l.jsx(A,{component:"p",variant:"body2",style:{fontFamily:Z,fontWeight:400,fontStyle:"italic",fontSize:"14px",lineHeight:"21px",color:"#29474C",margin:"4px 0 0 0",opacity:.9},children:i.usuario}):null]})]},d)})})]})}function Ez({relacion:a,index:r,t:n,onEditar:t,onAccionSecundaria:o,onSeleccionar:i,seleccionada:c=!1}){const s=a.empresa??a.nombreEmpresa??a.razonSocial??a.nombre??"—",d=a.codigoLegajo??a.legajoCodigo??a.subtitulo??"",u=a.estado??a.status??"",f=String(u).trim().toLowerCase(),h=f==="inactiva",m=f==="activa"?n("persona.alta.relacionLaboralEstadoActiva",{defaultValue:"Activa"}):f==="borrador"?n("persona.alta.relacionLaboralEstadoBorrador",{defaultValue:"Borrador"}):f==="inactiva"?n("persona.alta.relacionLaboralEstadoInactiva",{defaultValue:"Inactiva"}):"",v=a.estadoLabel??(m||u),g=a.estadoBadgeVariant??sz[f]??"primary",j=a.tipoRelacion??a.tipo??"",y=a.modalidad??"",E=a.fechaInicio??"",b=a.fechaFin??"",x=h?{...Xa,backgroundColor:"#F5F5F5"}:Xa,R=h?dz:B1,M=h?uz:S1,I=f==="activa"?n("persona.alta.relacionLaboralDesactivar",{defaultValue:"Desactivar"}):f==="borrador"?n("persona.alta.relacionLaboralActivar",{defaultValue:"Activar"}):"",C=a.etiquetaAccionSecundaria??a.accionSecundariaLabel??I,L=typeof o=="function"&&C,O=typeof t=="function"&&!h,N=L||O,k=f==="activa"&&a.estadoBadgeVariant==null?{...hz}:{flexShrink:0},_=i?T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),i())}:void 0;return l.jsxs("article",{style:{...x,...i?{cursor:c?"default":"pointer"}:{}},"aria-label":s,...i?{tabIndex:0,onClick:i,onKeyDown:_}:{},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"flex-start",gap:"12px",marginBottom:"20px"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"12px",flex:"1 1 auto",minWidth:0},children:[c?null:l.jsx("div",{style:R,children:l.jsx($,{name:"BuildingOffice2Icon",variant:"24-outline",size:20,style:{color:M},"aria-hidden":!0})}),l.jsxs("div",{style:{flex:"1 1 auto",minWidth:0},children:[l.jsx(A,{component:"h3",variant:"body2",style:fz,children:s}),d?l.jsx(A,{component:"p",variant:"body2",style:mz,children:d}):null]})]}),v?l.jsx(w0,{variant:g,size:f==="activa"&&a.estadoBadgeVariant==null?"small":"medium",style:k,children:v}):null]}),l.jsxs("div",{className:"anima-alta-personas__relacion-card-grid2",children:[l.jsx(R0,{iconName:"BriefcaseIcon",label:n("persona.alta.relacionLaboralTipo",{defaultValue:"Tipo"}),value:j,iconoConFondoHistorial:c}),l.jsx(R0,{iconName:"ComputerDesktopIcon",label:n("persona.alta.relacionLaboralModalidad",{defaultValue:"Modalidad"}),value:y,iconoConFondoHistorial:c})]}),h?l.jsxs("div",{className:"anima-alta-personas__relacion-card-grid2",style:{marginTop:"16px"},children:[l.jsx(R0,{iconName:"CalendarDaysIcon",label:n("persona.alta.relacionLaboralFechaInicio",{defaultValue:"Fecha inicio"}),value:E,iconoConFondoHistorial:c}),l.jsx(R0,{iconName:"CalendarDaysIcon",label:n("persona.alta.relacionLaboralFechaFin",{defaultValue:"Fecha fin"}),value:b,iconoConFondoHistorial:c})]}):l.jsx("div",{style:{marginTop:"16px"},children:l.jsx(R0,{iconName:"CalendarDaysIcon",label:n("persona.alta.relacionLaboralFechaInicio",{defaultValue:"Fecha inicio"}),value:E,iconoConFondoHistorial:c})}),N?l.jsxs("div",{role:"presentation",onClick:T=>T.stopPropagation(),"aria-hidden":c||void 0,style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",gap:"12px",marginTop:"20px",flexWrap:"wrap",visibility:c?"hidden":"visible",pointerEvents:c?"none":"auto"},children:[L?l.jsx(Xe,{type:"button",variant:"outline",text:C,onClick:()=>o(a,r),style:ea,textStyle:b0}):null,O?l.jsx(Xe,{type:"button",text:n("persona.alta.relacionLaboralEditar",{defaultValue:"Editar"}),onClick:()=>t(a,r),style:ea,textStyle:b0}):null]}):null]})}const ea={...F1,height:"40px",padding:"8px 14px",marginLeft:0},Va={...ea,border:"1px solid #29474C",backgroundColor:"transparent"},_a={...b0,color:"#29474C"},jz="#E8B261",Cz="#402E0E",Az="#D3FFDF",Mz="#0A742C",Zz="#0A742C",$z="#DDDDDD",Lz="#C4C4C4",N5=3,Fz="min(720px, calc(100% - 48px))";function M0(a,r){return a==null||String(a).trim()===""?"":r.find(t=>String(t.value)===String(a))?.label??""}function P5(a){if(!a||!/^\d{4}-\d{2}-\d{2}$/.test(String(a).trim()))return"—";const[r,n,t]=String(a).trim().split("-");return`${t}-${n}-${r}`}function kz(a){const r=String(a??"").trim();if(/^\d{4}-\d{2}-\d{2}$/.test(r))return r;const n=r.match(/^(\d{2})[/-](\d{2})[/-](\d{4})$/);return n?`${n[3]}-${n[2]}-${n[1]}`:""}function T5(a,r){if(a==null||String(a).trim()==="")return"";const n=String(a).trim(),t=r.find(s=>String(s.value)===n);if(t)return String(t.value);const o=n.toLowerCase(),i=r.find(s=>String(s.label).trim().toLowerCase()===o);if(i)return String(i.value);const c=r.find(s=>String(s.label).toLowerCase().includes(o)||o.includes(String(s.label).toLowerCase()));return c?String(c.value):""}function Bz(a,r){if(!Array.isArray(r)||r.length===0)return"";const n=a?.empresaId??a?.idEmpresa??a?.empresaCodigo??a?.codigoEmpresa;if(n!=null&&String(n).trim()!==""){const d=String(n).trim();if(r.some(u=>String(u.value)===d))return d}const t=a?.empresa??a?.nombreEmpresa??a?.razonSocial??a?.nombre??"",o=String(t).trim();if(!o)return"";const i=r.find(d=>String(d.label).trim()===o);if(i)return String(i.value);const c=o.toLowerCase(),s=r.find(d=>String(d.label).trim().toLowerCase()===c);return s?String(s.value):""}function Sz({empresaOptions:a,empresaValue:r,onEmpresaChange:n,tipoRelacionOptions:t,modalidadOptions:o,onCancelar:i,onEmpresaPasoCompletado:c,onGuardarBorrador:s,onActivar:d,onFinalizar:u,prefill:f=null,mostrarAvisoRelacionActivaEmpresa:h=!1,bloquearEmpresaEnEdicionActiva:m=!1,bloquearFechaInicioEnEdicionActiva:v=!1}){const{t:g,i18n:j}=$e.useTranslation(),[y,E]=p.useState(()=>{const X=f?.pasoIndex;return typeof X=="number"&&X>=0&&X<N5?X:0}),[b,x]=p.useState(()=>f?.fechaInicio??""),[R,M]=p.useState(()=>f?.tipoRelacion??""),[I,C]=p.useState(()=>f?.modalidad??""),[L,O]=p.useState(!1),[N,k]=p.useState(""),_=p.useMemo(()=>g("persona.alta.relacionLaboralAltaSubmitError",{defaultValue:"Ocurrió un error. Intenta nuevamente."}),[g,j.language]),T=p.useMemo(()=>[{key:"empresa",label:g("persona.alta.relacionLaboralAltaStepEmpresa",{defaultValue:"Empresa"})},{key:"datos",label:g("persona.alta.relacionLaboralAltaStepDatos",{defaultValue:"Datos laborales"})},{key:"confirmacion",label:g("persona.alta.relacionLaboralAltaStepConfirmacion",{defaultValue:"Confirmación"})}],[g,j.language]),W=f!=null,S=f?.relacionId??null,z=W&&f?.flujoWizard==="editar"&&f?.esActiva===!0,V=z&&m,fe=z&&v,ee=r!=null&&String(r).trim()!=="",D=b.trim()!==""&&R.trim()!==""&&I.trim()!=="",oe=()=>{if(y===0){if(!ee)return;typeof c=="function"&&c(r),E(1);return}if(y===1){if(!D)return;E(2);return}},de=p.useCallback(()=>k(""),[]),te=p.useCallback(()=>k(_),[_]),Q=p.useCallback(()=>{const X=M0(r,a),q=M0(R,t),le=M0(I,o);return{modo:W?"edit":"create",flujoWizard:f?.flujoWizard??null,relacionId:S,empresaId:r,empresaLabel:X||"—",fechaInicio:b,fechaInicioDisplay:P5(b),tipoRelacion:R,tipoRelacionLabel:q||"—",modalidad:I,modalidadLabel:le||"—"}},[W,f?.flujoWizard,S,r,a,b,R,t,I,o]),P=async()=>{if(typeof s=="function")try{de(),O(!0),await Promise.resolve(s(Q())),typeof u=="function"&&u()}catch{te()}finally{O(!1)}},ue=async()=>{if(typeof d=="function")try{de(),O(!0),await Promise.resolve(d(Q()))}catch{te();return}finally{O(!1)}typeof u=="function"&&u()},ge=y===N5-1;return l.jsxs("div",{className:"anima-alta-personas__relacion-laboral-alta-vista",children:[l.jsx(A,{variant:"body2",component:"h2",style:{fontFamily:Z,fontWeight:400,fontStyle:"normal",fontSize:"24px",lineHeight:"36px",letterSpacing:"0px",color:"#29474C",margin:"0 0 24px 0",padding:0,textAlign:"center"},children:f?f.flujoWizard==="reingresar"?g("persona.alta.relacionLaboralAltaTitleReingresar",{defaultValue:"Reingresar persona"}):g("persona.alta.relacionLaboralAltaTitleEditar",{defaultValue:"Editar relación laboral"}):g("persona.alta.relacionLaboralAltaTitle",{defaultValue:"Nueva relación laboral"})}),l.jsx("div",{className:"anima-alta-personas__relacion-laboral-alta-stepper-wrap",style:{maxWidth:Fz,width:"100%",marginLeft:"auto",marginRight:"auto",marginBottom:"24px",boxSizing:"border-box"},children:l.jsx("nav",{"aria-label":g("persona.alta.relacionLaboralAltaStepperLabel",{defaultValue:"Pasos del alta de relación laboral"}),style:{width:"100%"},children:l.jsx("ol",{style:{display:"grid",gridTemplateColumns:"auto minmax(0, 1fr) auto minmax(0, 1fr) auto",alignItems:"center",columnGap:"8px",width:"100%",listStyle:"none",margin:0,padding:0},children:T.map((X,q)=>{const le=q===y,ye=q<y,me=le||ye?"#29474C":"#5F5F5F",B=le||ye?600:400,J=le?Cz:"#5F5F5F",Le=ye,Fe={display:"inline-flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderRadius:"50%",flexShrink:0,fontFamily:Z,fontWeight:600,fontSize:"14px",lineHeight:"21px",boxSizing:"border-box",...le?{backgroundColor:jz,border:"2px solid transparent",color:J}:ye?{backgroundColor:Az,border:`2px solid ${Mz}`}:{backgroundColor:$z,border:"2px solid transparent",color:J}};return l.jsxs(p.Fragment,{children:[l.jsx("li",{"aria-label":X.label,style:{minWidth:0,margin:0,padding:0},children:l.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"8px",minWidth:0},children:[l.jsx("span",{style:Fe,"aria-current":le?"step":void 0,children:Le?l.jsx($,{name:"CheckIcon",variant:"24-outline",size:18,style:{color:Zz,flexShrink:0},"aria-hidden":!0}):q+1}),l.jsx("span",{className:"anima-alta-personas__relacion-laboral-alta-step-label",style:{fontFamily:Z,fontWeight:B,fontSize:"14px",lineHeight:"21px",color:me,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:X.label})]})}),q<T.length-1?l.jsx("li",{"aria-hidden":"true",style:{display:"block",minWidth:0,margin:0,padding:0,listStyle:"none",alignSelf:"center"},children:l.jsx("div",{style:{width:"100%",height:"2px",backgroundColor:Lz}})}):null]},X.key)})})})}),l.jsxs("div",{style:{...L1,margin:0},children:[y===0?l.jsxs(l.Fragment,{children:[l.jsx("h3",{style:{...Ha,margin:"0 0 12px 0"},children:g("persona.alta.relacionLaboralAltaSeleccionaEmpresa",{defaultValue:"Selecciona la empresa"})}),l.jsx("p",{style:{fontFamily:Z,fontWeight:400,fontSize:"14px",lineHeight:"21px",color:"#29474C",margin:"0 0 20px 0",whiteSpace:"pre-line"},children:g("persona.alta.relacionLaboralAltaEmpresaAyuda",{defaultValue:`Elige la empresa para la cual se establecerá la relación laboral.
|
|
1747
1767
|
Este campo no podrá modificarse una vez que la relación esté activa.`})}),l.jsx(h0,{id:"relacion-laboral-alta-empresa",name:"relacionLaboralAltaEmpresa",label:g("persona.alta.relacionLaboralAltaCampoEmpresa",{defaultValue:"Empresa"}),options:a,value:r,onChange:n,disabled:V,placeholder:g("persona.alta.relacionLaboralAltaEmpresaPlaceholder",{defaultValue:"Elige una empresa de la lista"})}),h?l.jsx("div",{style:{marginTop:"16px",width:"100%"},children:l.jsx(va,{variant:"warning",title:g("persona.alta.relacionLaboralAltaAvisoActivaTitulo",{defaultValue:"Relación activa existente con {{empresa}}",empresa:M0(r,a)||"—"}),children:g("persona.alta.relacionLaboralAltaAvisoActivaDescripcion",{defaultValue:"Esta persona ya tiene una relación activa con esta empresa. Podés guardar como borrador o elegir otra empresa para activar."})})}):null]}):y===1?l.jsxs(l.Fragment,{children:[l.jsx("h3",{style:{...Ha,margin:"0 0 20px 0"},children:g("persona.alta.relacionLaboralAltaDatosRelacionTitulo",{defaultValue:"Datos de la relación laboral"})}),l.jsxs("div",{className:"anima-alta-personas__relacion-card-grid2",children:[l.jsx(u0,{id:"relacion-laboral-alta-fecha-inicio",name:"relacionLaboralAltaFechaInicio",type:"date",label:g("persona.alta.relacionLaboralAltaFechaInicio",{defaultValue:"Fecha de inicio"}),placeholder:g("persona.alta.relacionLaboralAltaFechaInicioPlaceholder",{defaultValue:"Selecciona la fecha de inicio"}),value:b,onChange:X=>x(X.target.value),disabled:fe}),l.jsx(h0,{id:"relacion-laboral-alta-tipo-relacion",name:"relacionLaboralAltaTipoRelacion",label:g("persona.alta.relacionLaboralAltaTipoRelacion",{defaultValue:"Tipo de relación"}),options:t,value:R,onChange:X=>M(X.target.value),placeholder:g("persona.alta.relacionLaboralAltaTipoRelacionPlaceholder",{defaultValue:"Seleccionar"})})]}),l.jsx("div",{style:{marginTop:"16px"},children:l.jsx(h0,{id:"relacion-laboral-alta-modalidad",name:"relacionLaboralAltaModalidad",label:g("persona.alta.relacionLaboralAltaModalidad",{defaultValue:"Modalidad"}),options:o,value:I,onChange:X=>C(X.target.value),placeholder:g("persona.alta.relacionLaboralAltaModalidadPlaceholder",{defaultValue:"Seleccionar"})})})]}):l.jsxs(l.Fragment,{children:[l.jsx("h3",{style:{...Ha,margin:"0 0 12px 0"},children:g("persona.alta.relacionLaboralAltaConfirmaTitulo",{defaultValue:"Confirma los datos ingresados"})}),l.jsx("p",{style:{fontFamily:Z,fontWeight:400,fontSize:"14px",lineHeight:"21px",color:"#5F5F5F",margin:"0 0 20px 0",whiteSpace:"pre-line"},children:g("persona.alta.relacionLaboralAltaConfirmaDescripcion",{defaultValue:`Revisa la información antes de continuar.
|
|
1748
1768
|
Puedes guardar como borrador para completar más tarde o activar la relación laboral inmediatamente.`})}),l.jsx("div",{className:"anima-alta-personas__relacion-laboral-alta-confirmacion-resumen",children:l.jsxs("div",{className:"anima-alta-personas__relacion-card-grid2",children:[l.jsx(R0,{iconName:"BuildingOffice2Icon",label:g("persona.alta.relacionLaboralAltaCampoEmpresa",{defaultValue:"Empresa"}),value:M0(r,a),iconoConFondoHistorial:!0}),l.jsx(R0,{iconName:"CalendarDaysIcon",label:g("persona.alta.relacionLaboralAltaFechaInicio",{defaultValue:"Fecha inicio"}),value:P5(b),iconoConFondoHistorial:!0}),l.jsx(R0,{iconName:"BriefcaseIcon",label:g("persona.alta.relacionLaboralTipo",{defaultValue:"Tipo"}),value:M0(R,t),iconoConFondoHistorial:!0}),l.jsx(R0,{iconName:"ComputerDesktopIcon",label:g("persona.alta.relacionLaboralModalidad",{defaultValue:"Modalidad"}),value:M0(I,o),iconoConFondoHistorial:!0})]})})]}),l.jsxs("div",{className:`anima-alta-personas__relacion-laboral-alta-footer${y===0?" anima-alta-personas__relacion-laboral-alta-footer--paso-uno":""}${y===1?" anima-alta-personas__relacion-laboral-alta-footer--paso-dos":""}${y===2?" anima-alta-personas__relacion-laboral-alta-footer--paso-tres":""}`,children:[l.jsx(Xe,{type:"button",variant:"outline",text:g("persona.alta.relacionLaboralAltaCancelar",{defaultValue:"Cancelar"}),onClick:i,disabled:L,style:{...Va,marginLeft:0},textStyle:_a}),l.jsxs("div",{className:"anima-alta-personas__relacion-laboral-alta-footer-acciones",style:{display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",justifyContent:"flex-end",gap:"12px",marginLeft:"auto"},children:[y>0?l.jsx(Xe,{type:"button",variant:"outline",text:g("persona.alta.relacionLaboralAltaAnterior",{defaultValue:"Anterior"}),onClick:()=>E(X=>Math.max(0,X-1)),disabled:L,style:{...Va,marginLeft:0},textStyle:_a}):null,ge?l.jsxs(l.Fragment,{children:[f?null:l.jsx(Xe,{type:"button",variant:"outline",text:g("persona.alta.relacionLaboralAltaGuardarBorrador",{defaultValue:"Guardar borrador"}),onClick:P,disabled:L,style:{...Va,marginLeft:0},textStyle:_a}),l.jsx(Xe,{type:"button",text:f?g("persona.alta.relacionLaboralAltaGuardar",{defaultValue:"Guardar"}):g("persona.alta.relacionLaboralAltaActivar",{defaultValue:"Activar"}),onClick:ue,disabled:L,style:{...ea,marginLeft:0},textStyle:b0})]}):l.jsx(Xe,{type:"button",text:g("persona.alta.relacionLaboralAltaSiguiente",{defaultValue:"Siguiente"}),disabled:L||y===0&&!ee||y===1&&!D,onClick:oe,style:{...ea,marginLeft:0},textStyle:b0})]})]}),N?l.jsx("div",{role:"alert",style:{marginTop:"10px",...I0,letterSpacing:"0.02em",color:"#B30808"},children:N}):null]})]})}const Iz=({mode:a="create",initialValues:r,initialActiveTab:n=0,onSave:t,onCancel:o,onVolverListadoPersonas:i,generoOptions:c,nacionalidadOptions:s,tipoDocumentoOptions:d,paisOptions:u,provinciaOptions:f,laboralesContent:h,onAddRelacionLaboral:m,relacionLaboralAltaEmpresaOptions:v=[],relacionLaboralAltaTipoRelacionOptions:g,relacionLaboralAltaModalidadOptions:j,onRelacionLaboralAltaEmpresaSiguiente:y,onRelacionLaboralAltaGuardarBorrador:E,onRelacionLaboralAltaActivar:b,onRelacionLaboralAltaFinalizar:x,mostrarAvisoRelacionActivaEmpresa:R=!1,relacionLaboralAltaBloquearEmpresaEnEdicionActiva:M=!1,relacionLaboralAltaBloquearFechaInicioEnEdicionActiva:I=!1,relacionesLaborales:C=[],onRelacionLaboralEditar:L,onRelacionLaboralAccionSecundaria:O,onRelacionLaboralReingresar:N,imageError:k="",imageErrorTitle:_,imageErrorSubtitle:T,onFotoSelect:W,nombreRequiredMessage:S,apellidoRequiredMessage:z,emailError:V="",telefonoError:fe="",emailFormatMessage:ee,telefonoFormatMessage:D,fechaNacimientoMin:oe,fechaNacimientoMax:de,fechaNacimientoError:te="",onFechaNacimientoChange:Q,fechaNacimientoErrorTextStyle:P,fechaNacimientoEdadMinimaAnios:ue,fechaNacimientoEdadErrorMessage:ge,fechaNacimientoOmitirMaxNativo:X=!1,onAfterFormFieldChange:q,className:le="",style:ye={},...me})=>{const{t:B,i18n:J}=$e.useTranslation(),Le=p.useRef(null),[Fe,ve]=p.useState(()=>Number(n)===1?1:0),Ue=p.useMemo(()=>_5(r),[r]),[K,Ye]=p.useState(Ue),[De,qe]=p.useState(null),[Ie,Je]=p.useState(Ue.fotoUrl||""),[He,ke]=p.useState(""),[U,ie]=p.useState(""),[Me,Ne]=p.useState(""),[Te,he]=p.useState(""),[pe,We]=p.useState(""),[ae,Se]=p.useState(null),[we,Ee]=p.useState(!1),[Ge,Qe]=p.useState(""),[e0,Ae]=p.useState(null),[c0,Ke]=p.useState(0),be=p.useMemo(()=>c!==void 0?c:[{value:"",label:B("persona.alta.selectPlaceholder",{defaultValue:"Seleccionar"})},{value:"Femenino",label:B("persona.alta.generoFemenino",{defaultValue:"Femenino"})},{value:"Masculino",label:B("persona.alta.generoMasculino",{defaultValue:"Masculino"})},{value:"Otro",label:B("persona.alta.generoOtro",{defaultValue:"Otro"})},{value:"Prefiero no decir",label:B("persona.alta.generoPrefieroNoDecir",{defaultValue:"Prefiero no decir"})}],[c,B,J.language]),f0=p.useMemo(()=>s!==void 0?s:[{value:"",label:B("persona.alta.selectPlaceholder",{defaultValue:"Seleccionar"})}],[s,B,J.language]),xe=p.useMemo(()=>d!==void 0?d:[{value:"",label:B("persona.alta.selectPlaceholder",{defaultValue:"Seleccionar"})},{value:"DNI",label:"DNI"},{value:"Pasaporte",label:B("persona.alta.docPasaporte",{defaultValue:"Pasaporte"})},{value:"Cédula",label:B("persona.alta.docCedula",{defaultValue:"Cédula"})}],[d,B,J.language]),ze=p.useMemo(()=>u!==void 0?u:[{value:"",label:B("persona.alta.selectPlaceholder",{defaultValue:"Seleccionar"})}],[u,B,J.language]),ce=p.useMemo(()=>f!==void 0?f:[{value:"",label:B("persona.alta.selectPlaceholder",{defaultValue:"Seleccionar"})}],[f,B,J.language]),se=p.useMemo(()=>g!==void 0?g:[{value:"dependencia",label:B("persona.alta.relacionLaboralAltaTipoDependencia",{defaultValue:"Relación de dependencia"})},{value:"locacion",label:B("persona.alta.relacionLaboralAltaTipoLocacion",{defaultValue:"Locación de servicios"})},{value:"monotributo",label:B("persona.alta.relacionLaboralAltaTipoMonotributo",{defaultValue:"Monotributo"})}],[g,B,J.language]),Ce=p.useMemo(()=>j!==void 0?j:[{value:"presencial",label:B("persona.alta.relacionLaboralAltaModalidadPresencial",{defaultValue:"Presencial"})},{value:"hibrido",label:B("persona.alta.relacionLaboralAltaModalidadHibrido",{defaultValue:"Híbrido"})},{value:"remoto",label:B("persona.alta.relacionLaboralAltaModalidadRemoto",{defaultValue:"Remoto"})}],[j,B,J.language]),Oe=p.useMemo(()=>_!==void 0?_:B("persona.alta.imageErrorTitle",{defaultValue:"La imagen seleccionada, no cumple las especificaciones."}),[_,B,J.language]),Be=p.useMemo(()=>T!==void 0?T:B("persona.alta.imageErrorSubtitle",{defaultValue:"Inténtelo nuevamente."}),[T,B,J.language]);p.useEffect(()=>{const ne=_5(r);ne.telefonoMovil=Q0(ne.telefonoMovil),Ye(ne),Je(ne.fotoUrl||""),qe(null),ke(""),ie(""),Ne(""),he(""),We("")},[r,a]),p.useEffect(()=>{Fe!==1&&(Se(null),Ee(!1))},[Fe]),p.useEffect(()=>{we||(Qe(""),Ae(null))},[we]),p.useEffect(()=>{if(ae==null)return;C.some((je,o0)=>Oa(je,o0)===ae)||Se(null)},[C,ae]);const Pe=p.useMemo(()=>{const ne=(K.nombre??"").trim(),je=(K.apellido??"").trim(),o0=(k0,B0)=>(k0.charAt(B0)||"").toUpperCase(),s0=o0(ne,0),p0=o0(je,0);return s0&&p0?`${s0}${p0}`:s0&&ne.length>=2?`${s0}${o0(ne,1)}`:s0||p0||"—"},[K.nombre,K.apellido]),n0=p.useMemo(()=>C.map((ne,je)=>({rel:ne,idx:je,key:Oa(ne,je)})).filter(({key:ne})=>ae==null||ne===ae),[C,ae]),t0=p.useMemo(()=>{if(ae==null)return null;const ne=C.findIndex((je,o0)=>Oa(je,o0)===ae);return ne<0?null:{rel:C[ne],idx:ne}},[C,ae]),w=t0!=null&&pz(t0.rel),F=p.useCallback(ne=>je=>{const o0=je?.target?.value??je;Ye(s0=>{const p0={...s0,[ne]:o0};return typeof q=="function"&&q(ne,String(o0??""),p0),p0}),ne==="nombre"&&ke(""),ne==="apellido"&&ie("")},[q]),H=p.useMemo(()=>ee!==void 0?ee:B("persona.alta.errorEmailFormato",{defaultValue:"Ingresá un correo electrónico válido."}),[ee,B,J.language]),re=p.useMemo(()=>D!==void 0?D:B("persona.alta.errorTelefonoFormato",{defaultValue:"Ingresá entre {{min}} y {{max}} dígitos.",min:r5,max:xa}),[D,B,J.language]),G=p.useCallback(ne=>{const je=ne?.target?.value??"";Ye(s0=>{const p0={...s0,emailPersonal:je};return typeof q=="function"&&q("emailPersonal",String(je??""),p0),p0});const o0=String(je).trim();he(o0===""||Ga(o0)?"":H)},[q,H]),Ve=p.useCallback(ne=>{const je=Q0(ne?.target?.value??"");Ye(o0=>{const s0={...o0,telefonoMovil:je};return typeof q=="function"&&q("telefonoMovil",je,s0),s0}),je.length===0?We(""):We(qa(je)?"":re)},[q,re]),Ze=ne=>{const je=ne.target?.files?.[0];je&&(Ie&&Ie.startsWith("blob:")&&URL.revokeObjectURL(Ie),qe(je),Je(URL.createObjectURL(je)),W?.(je))},Re=typeof k=="string"?k:k?Oe:"",l0=!!(k&&(typeof k!="string"||k)),a0=p.useMemo(()=>ge!==void 0?ge:B("persona.alta.errorFechaEdadMinima",{defaultValue:"Debés tener al menos 16 años."}),[ge,B,J.language]),r0=!X&&de!=null&&de!=="",m0=()=>{Ne("");const ne=(K.nombre??"").trim(),je=(K.apellido??"").trim(),o0=S!==void 0?S:B("persona.alta.errorNombreRequerido",{defaultValue:"El nombre es obligatorio."}),s0=z!==void 0?z:B("persona.alta.errorApellidoRequerido",{defaultValue:"El apellido es obligatorio."}),p0=ne?"":o0,k0=je?"":s0;if(ke(p0),ie(k0),p0||k0)return;const B0=(K.fechaNacimiento??"").trim();let D0="";if(ue!=null&&Number.isFinite(Number(ue))&&B0&&!Ua(B0,Number(ue))&&(D0=a0),Ne(D0),D0)return;const N0=(K.emailPersonal??"").trim();let P0="";N0&&!Ga(N0)&&(P0=H),he(P0);const Ea=Q0(K.telefonoMovil??"");let ja="";Ea.length>0&&!qa(Ea)&&(ja=re),We(ja),!(P0||ja)&&t?.({...K,nombre:ne,apellido:je,emailPersonal:N0,telefonoMovil:Ea,fotoFile:De??null,fotoRemoved:!Ie&&!!r?.fotoUrl})},v0=[{id:"personal",label:B("persona.alta.tabPersonal",{defaultValue:"Información personal"})},{id:"laboral",label:B("persona.alta.tabLaboral",{defaultValue:"Datos laborales"})}],g0=l.jsxs(l.Fragment,{children:[l.jsxs(S0,{children:[l.jsxs("div",{className:"anima-alta-personas__photo-row",children:[l.jsx("div",{className:"anima-alta-personas__photo-avatar",children:Ie?l.jsx("img",{src:Ie,alt:"",style:{width:"100%",height:"100%",objectFit:"cover"}}):l.jsx("span",{className:"anima-alta-personas__photo-initials","aria-hidden":!0,children:Pe})}),l.jsxs("div",{className:"anima-alta-personas__photo-copy",children:[l.jsx("p",{className:"anima-alta-personas__photo-heading",children:B("persona.alta.sectionPhoto",{defaultValue:"Foto de perfil"})}),l.jsxs("p",{className:"anima-alta-personas__photo-desc",children:[l.jsx("span",{className:"anima-alta-personas__photo-desc-part1",children:B("persona.alta.photoLine1",{defaultValue:"Sube una imagen de perfil clara."})})," ",l.jsx("span",{className:"anima-alta-personas__photo-desc-part2",children:B("persona.alta.photoLine2",{defaultValue:"Archivos JPG o PNG de máximo 2Mb"})})]}),l.jsx("input",{ref:Le,type:"file",accept:"image/jpeg,image/png,.jpg,.jpeg,.png",style:{display:"none"},onChange:Ze}),l.jsx("div",{className:"anima-alta-personas__photo-upload-wrap",children:l.jsx(Xe,{type:"button",text:Ie?B("persona.alta.changeImage",{defaultValue:"Cambiar imagen"}):B("persona.alta.uploadImage",{defaultValue:"Subir imagen"}),onClick:()=>Le.current?.click(),style:lz,textStyle:b0})})]})]}),l0?l.jsxs("div",{className:"anima-alta-personas__foto-error-box",style:{marginTop:"16px",paddingTop:"12px",paddingRight:"16px",paddingBottom:"12px",paddingLeft:"16px",gap:"4px",borderRadius:"8px",border:"1px solid #B30808",backgroundColor:"#F8DBDB",display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box"},role:"alert",children:[l.jsx(A,{variant:"body2",style:{fontFamily:_e,fontWeight:400,fontStyle:"normal",fontSize:"14px",lineHeight:"21px",letterSpacing:"0.02em",color:"#B30808",margin:0},children:Re}),l.jsx(A,{variant:"body2",style:{fontFamily:_e,fontWeight:400,fontStyle:"normal",fontSize:"14px",lineHeight:"21px",letterSpacing:"0.02em",color:"#B30808",margin:0},children:Be})]}):null]}),l.jsxs(S0,{title:B("persona.alta.sectionPersonal",{defaultValue:"Datos personales"}),style:{marginTop:16},children:[l.jsxs("div",{className:"anima-alta-personas__grid3",children:[l.jsx(u0,{id:"persona-nombre",label:B("persona.alta.nombre",{defaultValue:"Nombre"}),placeholder:B("persona.alta.ph.nombre",{defaultValue:"Ingresa tu nombre"}),value:K.nombre,onChange:F("nombre"),required:!0,error:He,errorTextStyle:I0}),l.jsx(u0,{id:"persona-apellido",label:B("persona.alta.apellido",{defaultValue:"Apellido"}),placeholder:B("persona.alta.ph.apellido",{defaultValue:"Ingresa tu apellido"}),value:K.apellido,onChange:F("apellido"),required:!0,error:U,errorTextStyle:I0}),l.jsx(u0,{id:"persona-fechaNac",type:"date",label:B("persona.alta.fechaNacimiento",{defaultValue:"Fecha de nacimiento"}),placeholder:B("persona.alta.ph.fechaNacimiento",{defaultValue:"Ingresa tu fecha de nacimiento"}),value:K.fechaNacimiento,onChange:ne=>{const je=ne?.target?.value??"";F("fechaNacimiento")(ne),Q?.(je),ue!=null&&Number.isFinite(Number(ue))&&/^\d{4}-\d{2}-\d{2}$/.test(je)?Ne(Ua(je,Number(ue))?"":a0):Ne("")},...oe!=null&&oe!==""?{min:oe}:{},...r0?{max:de}:{},error:te||Me,errorTextStyle:P??I0})]}),l.jsxs("div",{className:"anima-alta-personas__grid3",style:{marginTop:16},children:[l.jsx(h0,{id:"persona-genero",label:B("persona.alta.genero",{defaultValue:"Género"}),options:be,value:K.genero,onChange:F("genero")}),l.jsx(h0,{id:"persona-nacionalidad",label:B("persona.alta.nacionalidad",{defaultValue:"Nacionalidad"}),options:f0,value:K.nacionalidad,onChange:F("nacionalidad")}),l.jsx("div",{})]})]}),l.jsx(S0,{title:B("persona.alta.sectionId",{defaultValue:"Identificación"}),style:{marginTop:16},children:l.jsxs("div",{className:"anima-alta-personas__grid3",children:[l.jsx(h0,{id:"persona-paisEmision",label:B("persona.alta.paisEmision",{defaultValue:"País de emisión"}),options:ze,value:K.paisEmision,onChange:F("paisEmision")}),l.jsx(h0,{id:"persona-tipoDoc",label:B("persona.alta.tipoDocumento",{defaultValue:"Tipo de documento"}),options:xe,value:K.tipoDocumento,onChange:F("tipoDocumento")}),l.jsx(u0,{id:"persona-numDoc",label:B("persona.alta.numeroDocumento",{defaultValue:"Número de documento"}),placeholder:B("persona.alta.ph.numeroDocumento",{defaultValue:"Ingresa tu N° de documento"}),value:K.numeroDocumento,onChange:F("numeroDocumento")})]})}),l.jsx(S0,{title:B("persona.alta.sectionContact",{defaultValue:"Contacto"}),style:{marginTop:16},children:l.jsxs("div",{className:"anima-alta-personas__grid4",children:[l.jsx("div",{className:"anima-alta-personas__contact-span2",children:l.jsx(u0,{id:"persona-email",type:"email",label:B("persona.alta.emailPersonal",{defaultValue:"Email personal"}),placeholder:B("persona.alta.ph.email",{defaultValue:"Ingresa tu email"}),value:K.emailPersonal,onChange:G,error:Te||V,errorTextStyle:I0})}),l.jsx("div",{className:"anima-alta-personas__contact-span2",children:l.jsx(u0,{id:"persona-tel",type:"tel",inputMode:"numeric",autoComplete:"tel-national",label:B("persona.alta.telefonoMovil",{defaultValue:"Teléfono móvil"}),placeholder:B("persona.alta.ph.telefono",{defaultValue:"Ingresa tu teléfono"}),value:K.telefonoMovil,onChange:Ve,error:pe||fe,errorTextStyle:I0})})]})}),l.jsxs(S0,{title:B("persona.alta.sectionAddress",{defaultValue:"Dirección"}),style:{marginTop:16},children:[l.jsxs("div",{className:"anima-alta-personas__grid4 anima-alta-personas__grid4-dir",children:[l.jsx(u0,{id:"persona-calle",label:B("persona.alta.calle",{defaultValue:"Calle"}),value:K.calle,onChange:F("calle")}),l.jsx(u0,{id:"persona-numero",label:B("persona.alta.numero",{defaultValue:"Número"}),value:K.numero,onChange:F("numero")}),l.jsx(u0,{id:"persona-piso",label:B("persona.alta.piso",{defaultValue:"Piso"}),value:K.piso,onChange:F("piso")}),l.jsx(u0,{id:"persona-depto",label:B("persona.alta.departamento",{defaultValue:"Departamento"}),value:K.departamento,onChange:F("departamento")})]}),l.jsxs("div",{className:"anima-alta-personas__grid4",style:{marginTop:16},children:[l.jsx(h0,{id:"persona-pais",label:B("persona.alta.pais",{defaultValue:"País"}),options:ze,value:K.pais,onChange:F("pais")}),l.jsx(h0,{id:"persona-provincia",label:B("persona.alta.provincia",{defaultValue:"Provincia"}),options:ce,value:K.provincia,onChange:F("provincia")}),l.jsx(u0,{id:"persona-ciudad",label:B("persona.alta.ciudad",{defaultValue:"Ciudad"}),placeholder:B("persona.alta.ph.ciudad",{defaultValue:"Ingresa tu ciudad"}),value:K.ciudad,onChange:F("ciudad")}),l.jsx(u0,{id:"persona-cp",label:B("persona.alta.codigoPostal",{defaultValue:"Código postal"}),placeholder:B("persona.alta.ph.codigoPostal",{defaultValue:"Ingresa tu CP"}),value:K.codigoPostal,onChange:F("codigoPostal")})]})]}),l.jsxs(S0,{title:B("persona.alta.sectionExtra",{defaultValue:"Información adicional"}),style:{marginTop:16},children:[l.jsx("label",{htmlFor:"persona-notas-adic",style:iz,children:B("persona.alta.notasAdicionales",{defaultValue:"Notas adicionales"})}),l.jsx("textarea",{id:"persona-notas-adic",value:K.notasAdicionales,onChange:F("notasAdicionales"),style:cz})]})]}),i0=C.length>0,x0=()=>{Se(null),Ae(null),Qe(""),Ke(ne=>ne+1),Ee(!0),typeof m=="function"&&m()},F0=(ne,je,o0="editar")=>{const s0=Bz(ne,v),p0=ne?.id??ne?.relacionId??ne?.idRelacion??ne?.uuid??null,k0=kz(ne?.fechaInicio??""),B0=T5(ne?.tipoRelacion??ne?.tipo??"",se),D0=T5(ne?.modalidad??"",Ce),N0=String(ne?.estado??ne?.status??"").trim().toLowerCase();Ae({relacionId:p0,fechaInicio:k0,tipoRelacion:B0,modalidad:D0,pasoIndex:0,flujoWizard:o0,esActiva:N0==="activa"}),Qe(s0),Se(null),Ke(P0=>P0+1),Ee(!0)},A0=(ne,je)=>{F0(ne),typeof L=="function"&&L(ne,je)},Ra=(ne,je)=>{F0(ne,je,"reingresar"),typeof N=="function"&&N(ne,je)},aa=37,ya={fontFamily:Z,fontWeight:600,fontStyle:"normal",fontSize:"14px",lineHeight:"21px",letterSpacing:"1%",color:"#29474C",background:"none",border:"none",margin:0,padding:0,cursor:"pointer",textAlign:"left",whiteSpace:"nowrap",minHeight:`${aa}px`,display:"inline-flex",flexDirection:"row",alignItems:"center",gap:"8px"},n5={height:"37px",padding:"8px 14px",margin:0},O1=!we&&i0?l.jsx("div",{style:{width:"100%",margin:0,padding:0,boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"space-between",gap:0,minHeight:`${aa}px`},children:ae!=null?l.jsxs(l.Fragment,{children:[l.jsxs("button",{type:"button",className:"anima-alta-personas__relaciones-volver",onClick:()=>Se(null),style:ya,children:[l.jsx($,{name:"ArrowLeftIcon",variant:"24-outline",size:20,style:{color:"#29474C",flexShrink:0},"aria-hidden":!0}),B("persona.alta.relacionesLaboralesVolver",{defaultValue:"Volver"})]}),w?l.jsxs(Xe,{type:"button",onClick:()=>Ra(t0.rel,t0.idx),textStyle:b0,style:n5,children:[l.jsx($,{name:"ArrowPathIcon",variant:"24-outline",size:16,style:{color:"currentColor",flexShrink:0},"aria-hidden":!0}),B("persona.alta.relacionLaboralReingresar",{defaultValue:"Reingresar"})]}):null]}):l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{display:"flex",alignItems:"center",minWidth:0,minHeight:`${aa}px`,margin:0,padding:0},children:l.jsx(A,{variant:"body2",component:"span",style:{fontFamily:Z,fontWeight:400,fontSize:"20px",lineHeight:"30px",letterSpacing:"0",color:"#29474C",whiteSpace:"nowrap",margin:0,padding:0},children:B("persona.alta.relacionesLaboralesTitle",{defaultValue:"Relaciones laborales"})})}),l.jsxs(Xe,{type:"button",onClick:x0,textStyle:b0,style:{...n5,width:"104px",minWidth:"104px"},children:[l.jsx($,{name:"PlusCircleIcon",variant:"24-outline",size:16,style:{color:"currentColor",flexShrink:0},"aria-hidden":!0}),B("persona.alta.relacionesLaboralesAdd",{defaultValue:"Agregar"})]})]})}):null,V1=h??l.jsx(l.Fragment,{children:l.jsx("div",{className:"anima-alta-personas__relaciones-laborales-wrap",style:we?{marginTop:0}:i0?void 0:{marginTop:0},children:we?l.jsx(Sz,{empresaOptions:v,empresaValue:Ge,onEmpresaChange:ne=>Qe(ne.target.value),tipoRelacionOptions:se,modalidadOptions:Ce,prefill:e0,onCancelar:()=>Ee(!1),onEmpresaPasoCompletado:y,onGuardarBorrador:E,onActivar:b,bloquearEmpresaEnEdicionActiva:M,bloquearFechaInicioEnEdicionActiva:I,onFinalizar:()=>{Ee(!1),typeof x=="function"&&x()},mostrarAvisoRelacionActivaEmpresa:R},`relacion-laboral-alta-${c0}`):i0?l.jsx("div",{className:`anima-alta-personas__relaciones-grid${ae!=null?" anima-alta-personas__relaciones-grid--con-historial":""}`,children:l.jsxs(l.Fragment,{children:[n0.map(({rel:ne,idx:je,key:o0})=>l.jsx("div",{className:"anima-alta-personas__relacion-card-slot",children:l.jsx(Ez,{relacion:ne,index:je,t:B,onEditar:A0,onAccionSecundaria:O,seleccionada:ae===o0,onSeleccionar:()=>{Ee(!1),Se(s0=>s0===o0?s0:o0)}})},o0)),t0!=null?l.jsx("div",{className:"anima-alta-personas__relacion-card-slot anima-alta-personas__relacion-card-slot--historial",children:l.jsx(yz,{relacion:t0.rel,t:B})}):null]})}):l.jsx(M1,{message:B("persona.alta.relacionesLaboralesEmptyMessage",{defaultValue:`Por el momento no hay relaciones laborales cargadas.
|
|
1749
|
-
Agrega tu primer relación laboral.`}),buttonLabel:B("persona.alta.relacionesLaboralesAdd",{defaultValue:"Agregar"}),iconName:"BriefcaseIcon",messagePreferSingleLine:!0,onCrearEmpresa:x0})})});return l.jsxs("div",{className:`anima-alta-personas ${le}`,style:{width:"100%",maxWidth:"100%",minHeight:"100%",background:"transparent",padding:"0 0 24px 0",margin:0,boxSizing:"border-box",...ye},...me,children:[l.jsx("style",{children:oz}),l.jsxs("div",{style:{boxSizing:"border-box",marginLeft:"8px",marginRight:"8px"},children:[l.jsx("div",{className:"anima-alta-personas__tabs-wrap",children:l.jsx("nav",{className:"anima-alta-personas__tabs-nav","aria-label":B("persona.alta.tabsNavAriaLabel",{defaultValue:"Secciones"}),children:v0.map((ne,je)=>l.jsx("button",{type:"button",onClick:()=>ve(je),className:Fe===je?"anima-alta-personas__tab anima-alta-personas__tab--active":"anima-alta-personas__tab",children:ne.label},ne.id))})}),Fe===1&&h==null?O1:null]}),Fe===0?g0:V1,Fe===0?l.jsxs("footer",{className:"anima-alta-personas__footer-actions","aria-label":B("persona.alta.footerActionsLabel",{defaultValue:"Acciones del formulario"}),children:[l.jsx(Xe,{type:"button",variant:"outline",text:B("persona.alta.cancel",{defaultValue:"Cancelar"}),onClick:o,style:V5,textStyle:b0}),l.jsx(Xe,{type:"button",text:B("persona.alta.save",{defaultValue:"Guardar"}),onClick:m0,style:V5,textStyle:b0})]}):null]})},I1=2*1024*1024,H1=["image/jpeg","image/png"];function Hz(a,r={}){if(!a)return"";const n=r.maxBytes??I1,t=r.acceptMime??H1,o=(a.type||"").toLowerCase();return t.includes(o)?a.size>n?"El archivo supera el tamaño máximo permitido (2 Mb).":"":"La imagen debe ser JPG o PNG."}const W5=768,z5={info:"LinkSlashIcon",error:"LinkSlashIcon",success:"LinkSlashIcon"},U5={info:"blue-600",error:"red-600",success:"green-600"},Oz=({text:a="",type:r="info",className:n="",style:t,...o})=>{const i={info:"#2563EB",error:"#FF0000",success:"#16A34A"},c=i[r]??i.info,s=z5[r]??z5.info,d=U5[r]??U5.info,[u,f]=p.useState(()=>typeof window<"u"?window.innerWidth<=W5:!1),[h,m]=p.useState(!1),v=p.useRef(null);p.useEffect(()=>{const y=()=>f(window.innerWidth<=W5);return window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[]);const g=()=>{const y=v.current;y&&m(y.scrollWidth>y.clientWidth)},j=y=>{v.current=y,y&&requestAnimationFrame(g)};return p.useEffect(()=>{let y;const E=requestAnimationFrame(()=>{g();const b=v.current;b&&(y=new ResizeObserver(()=>requestAnimationFrame(g)),y.observe(b))});return()=>{cancelAnimationFrame(E),y&&y.disconnect()}},[a,u]),l.jsxs("div",{className:`anima-badgeinformativo ${n}`,style:{minHeight:"30px",height:u?"auto":"30px",width:u?"100%":"fit-content",maxWidth:u?"100%":void 0,marginLeft:u?0:"10px",marginRight:u?0:"10px",borderRadius:"8px",border:`1px solid ${c}`,backgroundColor:"#FFFFFF",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"flex-start",paddingTop:u?"0.5rem":void 0,paddingBottom:u?"0.5rem":void 0,paddingLeft:"1rem",paddingRight:"1rem",gap:"1rem",...t},...o,children:[l.jsx($,{name:s,size:16,color:d,strokeWidth:2,style:{flexShrink:0,...r==="error"?{color:"#FF0000"}:{}}}),l.jsx("div",{style:{minWidth:0,flex:1,overflow:u?"visible":"hidden",display:"flex",alignItems:"center",alignSelf:"stretch",height:u?void 0:"100%"},children:!u&&h?l.jsx(n1,{content:a,position:"bottom",style:{width:"100%",display:"flex",alignItems:"center"},children:l.jsx("span",{ref:j,style:{color:c,fontFamily:Z,fontWeight:400,fontStyle:"normal",fontSize:"14px",lineHeight:"21px",letterSpacing:"0%",direction:"ltr",textAlign:"left",verticalAlign:"middle",textTransform:"uppercase",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"block"},children:a})}):l.jsx("span",{ref:j,style:{color:c,fontFamily:Z,fontWeight:400,fontStyle:"normal",fontSize:"14px",lineHeight:"21px",letterSpacing:"0%",direction:"ltr",textAlign:"left",verticalAlign:"middle",textTransform:"uppercase",whiteSpace:u?"normal":"nowrap",overflow:u?"visible":"hidden",textOverflow:u?void 0:"ellipsis",display:"block",wordBreak:u?"break-word":void 0},children:a})})]})},G5=769,q5=768,Vz=({title:a="Configuración inicial",titleStyle:r,titleClassName:n="",badgeText:t="Contenido sin funcionalidad definida, no conectado a Backend.",badgeType:o="error",children:i,slotStates:c=["Completado","Completado","Pendiente","Pendiente","Pendiente"],slotTitles:s=["Tenant configurado (nombre/idioma/timezone/logo)","Administradores existentes (al menos 1)","Integración SSO/AD","Configuración de Roles RBAC","Empresas"],slotSubtitles:d=["Parámetros básicos de identidad y localización definidos.","Acceso técnico de administración garantizado.","Conexión con el proveedor de identidad externa.","Definición de matrices de permisos y perfiles.","Carga de razones sociales y estructura legal."],onSlotStateChange:u,containerStyle:f,containerClassName:h="",titleContainerStyle:m,titleContainerClassName:v="",contentContainerStyle:g,contentContainerClassName:j="",className:y="",...E})=>{const{t:b}=$e.useTranslation(),x=b("overview.taskCompleted",{defaultValue:"Completado"}),R=N=>{const k=String(N??"").trim().toLowerCase();return k===String(x).trim().toLowerCase()||k==="completado"||k==="completed"},[M,I]=p.useState(()=>typeof window<"u"?window.innerWidth<=G5:!1),[C,L]=p.useState(()=>typeof window<"u"?window.innerWidth>q5:!0),O=()=>{const N=window.innerWidth;I(N<=G5),L(N>q5)};return p.useLayoutEffect(()=>{O()},[]),p.useEffect(()=>(window.addEventListener("resize",O),()=>window.removeEventListener("resize",O)),[]),l.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",gap:"1rem"},children:[l.jsx(Oz,{text:t,type:o}),l.jsxs("div",{className:`anima-configuracionoverview__container ${h} ${y}`,style:{width:"100%",minWidth:0,height:C?"490px":"auto",minHeight:C?void 0:"490px",borderRadius:"var(--radius-16, 16px)",border:"1px solid var(--color-grey-200, #c4c4c4)",backgroundColor:"var(--color-neutrals-white, #FFFFFF)",boxSizing:"border-box",display:"flex",flexDirection:"column",overflow:"hidden",...f||{}},...E,children:[l.jsx("div",{className:`anima-configuracionoverview__title-container ${v}`,style:{width:"100%",minHeight:0,flexShrink:0,paddingTop:"24px",paddingRight:"var(--space-16, 1rem)",paddingBottom:"4px",paddingLeft:"var(--space-16, 1rem)",gap:"8px",opacity:1,boxSizing:"border-box",display:"flex",flexDirection:"column",...m||{}},children:l.jsxs("div",{style:{width:"100%",minHeight:0,minWidth:0,boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"12px"},children:[a&&l.jsx(A,{variant:"h5",className:n,style:{fontFamily:Z,fontWeight:500,fontStyle:"normal",fontSize:"24px",lineHeight:"36px",letterSpacing:"0%",verticalAlign:"middle",color:"var(--color-cyan-19)",margin:0,flex:"1 1 auto",minWidth:0,...r||{}},children:a}),C&&l.jsx("div",{style:{flexShrink:0,height:"24px",display:"flex",alignItems:"center"},children:l.jsxs(w0,{variant:"success",size:"small",className:"anima-configuracionoverview__title-badge",style:{height:"24px",minWidth:"96px",opacity:1,borderRadius:"var(--radius-16, 16px)",paddingTop:"2px",paddingRight:"12px",paddingBottom:"4px",paddingLeft:"12px",backgroundColor:"var(--color-cyan-82, #B8E2E9)",fontFamily:_e,fontWeight:400,fontStyle:"normal",fontSize:"12px",lineHeight:"18px",letterSpacing:"0%",textAlign:"right",verticalAlign:"middle",color:"var(--color-grey-700, #474747)",display:"inline-flex",alignItems:"center",justifyContent:"flex-end",boxSizing:"border-box"},children:[c.filter(N=>R(N)).length," ",b("overview.completedTasks",{defaultValue:"Tareas completadas"})]})})]})}),i!=null&&l.jsx("div",{className:`anima-configuracionoverview__content ${j}`,style:{width:"100%",minWidth:0,minHeight:0,flex:"1 1 auto",paddingTop:"16px",paddingRight:M?"16px":"24px",paddingBottom:"24px",paddingLeft:M?"16px":"24px",opacity:1,boxSizing:"border-box",display:"flex",flexDirection:"column",gap:"24px",...g||{}},children:i}),l.jsx("div",{className:"anima-configuracionoverview__bottom-panel",style:{width:"100%",minWidth:0,height:C?"424px":"auto",flexShrink:0,margin:0,paddingLeft:"var(--space-16, 1rem)",paddingRight:"var(--space-16, 1rem)",paddingTop:C?0:"var(--space-16, 1rem)",paddingBottom:"var(--space-16, 1rem)",boxSizing:"border-box",display:"flex",flexDirection:"column",overflow:"hidden"},children:[0,1,2,3,4].map(N=>{const k=R(c[N])?x:"Pendiente",_=k===x?"CheckCircleIcon":"EllipsisHorizontalCircleIcon",T=k===x?{flexShrink:0,fill:"#D3FFDF",stroke:"var(--misc-exito-info, #0A742C)"}:{flexShrink:0,color:"var(--color-grey-400, #919191)"},W=()=>{typeof u=="function"&&u(N,k===x?"Pendiente":x)},S=de=>{typeof u=="function"&&(de.key==="Enter"||de.key===" ")&&(de.preventDefault(),W())},z=typeof u=="function",V=k===x?"var(--color-cyan-19)":"var(--color-grey-600, #5F5F5F)",fe=s[N]??"",ee=d[N]??"",D={fontFamily:Z,fontWeight:500,fontStyle:"normal",fontSize:"16px",lineHeight:"24px",letterSpacing:"0%",verticalAlign:"middle",color:V,margin:0},oe={fontFamily:Z,fontWeight:400,fontStyle:"normal",fontSize:"16px",lineHeight:"24px",letterSpacing:"0%",verticalAlign:"middle",color:V,margin:0};return l.jsx("div",{className:"anima-configuracionoverview__bottom-panel-slot",style:{width:"100%",minHeight:C?"80px":"116px",flexShrink:0,boxSizing:"border-box",display:"flex",alignItems:C?"center":"flex-start",justifyContent:"center",...N<4?{borderBottom:"1px solid #E5E5E5"}:{}},children:l.jsxs("div",{className:"anima-configuracionoverview__bottom-panel-slot-inner",role:z?"button":void 0,tabIndex:z?0:void 0,onClick:z?W:void 0,onKeyDown:z?S:void 0,style:{width:"100%",minHeight:C?"48px":void 0,height:C?void 0:"auto",flexShrink:0,boxSizing:"border-box",display:"flex",flexDirection:C?"row":"column",alignItems:C?"center":"stretch",alignSelf:"stretch",paddingLeft:C?"12px":0,paddingTop:C?0:"12px",paddingBottom:C?0:"12px",gap:"12px",...z?{cursor:"pointer"}:{}},children:[C&&l.jsx($,{name:_,size:24,style:T}),l.jsxs("div",{style:{flex:C?"1 1 0":"0 0 auto",minWidth:0,minHeight:"48px",display:"flex",flexDirection:"column",gap:0},children:[l.jsx("div",{className:"anima-configuracionoverview__slot-inner-green",style:{width:"100%",minHeight:"24px",flexShrink:0,boxSizing:"border-box",display:"flex",alignItems:"flex-start",paddingRight:"12px"},children:l.jsx(A,{component:"span",style:{...D,wordBreak:"break-word",overflowWrap:"break-word",display:"block"},children:fe||" "})}),l.jsx("div",{className:"anima-configuracionoverview__slot-inner-green",style:{width:"100%",minHeight:"24px",flexShrink:0,boxSizing:"border-box",display:"flex",alignItems:"flex-start",paddingRight:"12px"},children:l.jsx(A,{component:"span",style:{...oe,wordBreak:"break-word",overflowWrap:"break-word",display:"block"},children:ee||" "})})]}),l.jsx("div",{style:{flexShrink:0,height:"24px",display:"flex",alignItems:"center",...C?{}:{marginTop:"8px"}},children:l.jsx(w0,{variant:k===x?"success":"danger",size:"small",className:"anima-configuracionoverview__slot-badge",style:{width:"96px",height:"24px",opacity:1,borderRadius:"var(--radius-16, 16px)",borderWidth:"1px",borderStyle:"solid",borderColor:k===x?"var(--color-status-success, #0A742C)":"var(--color-status-warning, #CC4908)",paddingTop:"2px",paddingRight:"12px",paddingBottom:"4px",paddingLeft:"12px",backgroundColor:k===x?"var(--misc-exito-fondo, #D3FFDF)":"var(--color-neutrals-white, #FFFFFF)",fontFamily:_e,fontWeight:400,fontStyle:"normal",fontSize:"12px",lineHeight:"18px",letterSpacing:"0%",textAlign:k===x?"right":"center",verticalAlign:"middle",color:k===x?"var(--color-status-success, #0A742C)":"var(--color-status-warning, #CC4908)",display:"inline-flex",alignItems:"center",justifyContent:k===x?"flex-end":"center",boxSizing:"border-box"},children:k===x?x:"Pendiente"})})]})},N)})})]})]})},_z=`
|
|
1769
|
+
Agrega tu primer relación laboral.`}),buttonLabel:B("persona.alta.relacionesLaboralesAdd",{defaultValue:"Agregar"}),iconName:"BriefcaseIcon",messagePreferSingleLine:!0,onCrearEmpresa:x0})})});return l.jsxs("div",{className:`anima-alta-personas ${le}`,style:{width:"100%",maxWidth:"100%",minHeight:"100%",background:"transparent",padding:"0 0 24px 0",margin:0,boxSizing:"border-box",...ye},...me,children:[l.jsx("style",{children:oz}),l.jsxs("div",{className:"anima-alta-personas__tabs-shell",children:[l.jsx("div",{className:"anima-alta-personas__tabs-wrap",children:l.jsx("nav",{className:"anima-alta-personas__tabs-nav","aria-label":B("persona.alta.tabsNavAriaLabel",{defaultValue:"Secciones"}),children:v0.map((ne,je)=>l.jsx("button",{type:"button",onClick:()=>ve(je),className:Fe===je?"anima-alta-personas__tab anima-alta-personas__tab--active":"anima-alta-personas__tab",children:ne.label},ne.id))})}),Fe===1&&h==null?O1:null]}),Fe===0?g0:V1,Fe===0?l.jsxs("footer",{className:"anima-alta-personas__footer-actions","aria-label":B("persona.alta.footerActionsLabel",{defaultValue:"Acciones del formulario"}),children:[l.jsx(Xe,{type:"button",variant:"outline",text:B("persona.alta.cancel",{defaultValue:"Cancelar"}),onClick:o,style:V5,textStyle:b0}),l.jsx(Xe,{type:"button",text:B("persona.alta.save",{defaultValue:"Guardar"}),onClick:m0,style:V5,textStyle:b0})]}):null]})},I1=2*1024*1024,H1=["image/jpeg","image/png"];function Hz(a,r={}){if(!a)return"";const n=r.maxBytes??I1,t=r.acceptMime??H1,o=(a.type||"").toLowerCase();return t.includes(o)?a.size>n?"El archivo supera el tamaño máximo permitido (2 Mb).":"":"La imagen debe ser JPG o PNG."}const W5=768,z5={info:"LinkSlashIcon",error:"LinkSlashIcon",success:"LinkSlashIcon"},U5={info:"blue-600",error:"red-600",success:"green-600"},Oz=({text:a="",type:r="info",className:n="",style:t,...o})=>{const i={info:"#2563EB",error:"#FF0000",success:"#16A34A"},c=i[r]??i.info,s=z5[r]??z5.info,d=U5[r]??U5.info,[u,f]=p.useState(()=>typeof window<"u"?window.innerWidth<=W5:!1),[h,m]=p.useState(!1),v=p.useRef(null);p.useEffect(()=>{const y=()=>f(window.innerWidth<=W5);return window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[]);const g=()=>{const y=v.current;y&&m(y.scrollWidth>y.clientWidth)},j=y=>{v.current=y,y&&requestAnimationFrame(g)};return p.useEffect(()=>{let y;const E=requestAnimationFrame(()=>{g();const b=v.current;b&&(y=new ResizeObserver(()=>requestAnimationFrame(g)),y.observe(b))});return()=>{cancelAnimationFrame(E),y&&y.disconnect()}},[a,u]),l.jsxs("div",{className:`anima-badgeinformativo ${n}`,style:{minHeight:"30px",height:u?"auto":"30px",width:u?"100%":"fit-content",maxWidth:u?"100%":void 0,marginLeft:u?0:"10px",marginRight:u?0:"10px",borderRadius:"8px",border:`1px solid ${c}`,backgroundColor:"#FFFFFF",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"flex-start",paddingTop:u?"0.5rem":void 0,paddingBottom:u?"0.5rem":void 0,paddingLeft:"1rem",paddingRight:"1rem",gap:"1rem",...t},...o,children:[l.jsx($,{name:s,size:16,color:d,strokeWidth:2,style:{flexShrink:0,...r==="error"?{color:"#FF0000"}:{}}}),l.jsx("div",{style:{minWidth:0,flex:1,overflow:u?"visible":"hidden",display:"flex",alignItems:"center",alignSelf:"stretch",height:u?void 0:"100%"},children:!u&&h?l.jsx(n1,{content:a,position:"bottom",style:{width:"100%",display:"flex",alignItems:"center"},children:l.jsx("span",{ref:j,style:{color:c,fontFamily:Z,fontWeight:400,fontStyle:"normal",fontSize:"14px",lineHeight:"21px",letterSpacing:"0%",direction:"ltr",textAlign:"left",verticalAlign:"middle",textTransform:"uppercase",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"block"},children:a})}):l.jsx("span",{ref:j,style:{color:c,fontFamily:Z,fontWeight:400,fontStyle:"normal",fontSize:"14px",lineHeight:"21px",letterSpacing:"0%",direction:"ltr",textAlign:"left",verticalAlign:"middle",textTransform:"uppercase",whiteSpace:u?"normal":"nowrap",overflow:u?"visible":"hidden",textOverflow:u?void 0:"ellipsis",display:"block",wordBreak:u?"break-word":void 0},children:a})})]})},G5=769,q5=768,Vz=({title:a="Configuración inicial",titleStyle:r,titleClassName:n="",badgeText:t="Contenido sin funcionalidad definida, no conectado a Backend.",badgeType:o="error",children:i,slotStates:c=["Completado","Completado","Pendiente","Pendiente","Pendiente"],slotTitles:s=["Tenant configurado (nombre/idioma/timezone/logo)","Administradores existentes (al menos 1)","Integración SSO/AD","Configuración de Roles RBAC","Empresas"],slotSubtitles:d=["Parámetros básicos de identidad y localización definidos.","Acceso técnico de administración garantizado.","Conexión con el proveedor de identidad externa.","Definición de matrices de permisos y perfiles.","Carga de razones sociales y estructura legal."],onSlotStateChange:u,containerStyle:f,containerClassName:h="",titleContainerStyle:m,titleContainerClassName:v="",contentContainerStyle:g,contentContainerClassName:j="",className:y="",...E})=>{const{t:b}=$e.useTranslation(),x=b("overview.taskCompleted",{defaultValue:"Completado"}),R=N=>{const k=String(N??"").trim().toLowerCase();return k===String(x).trim().toLowerCase()||k==="completado"||k==="completed"},[M,I]=p.useState(()=>typeof window<"u"?window.innerWidth<=G5:!1),[C,L]=p.useState(()=>typeof window<"u"?window.innerWidth>q5:!0),O=()=>{const N=window.innerWidth;I(N<=G5),L(N>q5)};return p.useLayoutEffect(()=>{O()},[]),p.useEffect(()=>(window.addEventListener("resize",O),()=>window.removeEventListener("resize",O)),[]),l.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",gap:"1rem"},children:[l.jsx(Oz,{text:t,type:o}),l.jsxs("div",{className:`anima-configuracionoverview__container ${h} ${y}`,style:{width:"100%",minWidth:0,height:C?"490px":"auto",minHeight:C?void 0:"490px",borderRadius:"var(--radius-16, 16px)",border:"1px solid var(--color-grey-200, #c4c4c4)",backgroundColor:"var(--color-neutrals-white, #FFFFFF)",boxSizing:"border-box",display:"flex",flexDirection:"column",overflow:"hidden",...f||{}},...E,children:[l.jsx("div",{className:`anima-configuracionoverview__title-container ${v}`,style:{width:"100%",minHeight:0,flexShrink:0,paddingTop:"24px",paddingRight:"var(--space-16, 1rem)",paddingBottom:"4px",paddingLeft:"var(--space-16, 1rem)",gap:"8px",opacity:1,boxSizing:"border-box",display:"flex",flexDirection:"column",...m||{}},children:l.jsxs("div",{style:{width:"100%",minHeight:0,minWidth:0,boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"12px"},children:[a&&l.jsx(A,{variant:"h5",className:n,style:{fontFamily:Z,fontWeight:500,fontStyle:"normal",fontSize:"24px",lineHeight:"36px",letterSpacing:"0%",verticalAlign:"middle",color:"var(--color-cyan-19)",margin:0,flex:"1 1 auto",minWidth:0,...r||{}},children:a}),C&&l.jsx("div",{style:{flexShrink:0,height:"24px",display:"flex",alignItems:"center"},children:l.jsxs(w0,{variant:"success",size:"small",className:"anima-configuracionoverview__title-badge",style:{height:"24px",minWidth:"96px",opacity:1,borderRadius:"var(--radius-16, 16px)",paddingTop:"2px",paddingRight:"12px",paddingBottom:"4px",paddingLeft:"12px",backgroundColor:"var(--color-cyan-82, #B8E2E9)",fontFamily:_e,fontWeight:400,fontStyle:"normal",fontSize:"12px",lineHeight:"18px",letterSpacing:"0%",textAlign:"right",verticalAlign:"middle",color:"var(--color-grey-700, #474747)",display:"inline-flex",alignItems:"center",justifyContent:"flex-end",boxSizing:"border-box"},children:[c.filter(N=>R(N)).length," ",b("overview.completedTasks",{defaultValue:"Tareas completadas"})]})})]})}),i!=null&&l.jsx("div",{className:`anima-configuracionoverview__content ${j}`,style:{width:"100%",minWidth:0,minHeight:0,flex:"1 1 auto",paddingTop:"16px",paddingRight:M?"16px":"24px",paddingBottom:"24px",paddingLeft:M?"16px":"24px",opacity:1,boxSizing:"border-box",display:"flex",flexDirection:"column",gap:"24px",...g||{}},children:i}),l.jsx("div",{className:"anima-configuracionoverview__bottom-panel",style:{width:"100%",minWidth:0,height:C?"424px":"auto",flexShrink:0,margin:0,paddingLeft:"var(--space-16, 1rem)",paddingRight:"var(--space-16, 1rem)",paddingTop:C?0:"var(--space-16, 1rem)",paddingBottom:"var(--space-16, 1rem)",boxSizing:"border-box",display:"flex",flexDirection:"column",overflow:"hidden"},children:[0,1,2,3,4].map(N=>{const k=R(c[N])?x:"Pendiente",_=k===x?"CheckCircleIcon":"EllipsisHorizontalCircleIcon",T=k===x?{flexShrink:0,fill:"#D3FFDF",stroke:"var(--misc-exito-info, #0A742C)"}:{flexShrink:0,color:"var(--color-grey-400, #919191)"},W=()=>{typeof u=="function"&&u(N,k===x?"Pendiente":x)},S=de=>{typeof u=="function"&&(de.key==="Enter"||de.key===" ")&&(de.preventDefault(),W())},z=typeof u=="function",V=k===x?"var(--color-cyan-19)":"var(--color-grey-600, #5F5F5F)",fe=s[N]??"",ee=d[N]??"",D={fontFamily:Z,fontWeight:500,fontStyle:"normal",fontSize:"16px",lineHeight:"24px",letterSpacing:"0%",verticalAlign:"middle",color:V,margin:0},oe={fontFamily:Z,fontWeight:400,fontStyle:"normal",fontSize:"16px",lineHeight:"24px",letterSpacing:"0%",verticalAlign:"middle",color:V,margin:0};return l.jsx("div",{className:"anima-configuracionoverview__bottom-panel-slot",style:{width:"100%",minHeight:C?"80px":"116px",flexShrink:0,boxSizing:"border-box",display:"flex",alignItems:C?"center":"flex-start",justifyContent:"center",...N<4?{borderBottom:"1px solid #E5E5E5"}:{}},children:l.jsxs("div",{className:"anima-configuracionoverview__bottom-panel-slot-inner",role:z?"button":void 0,tabIndex:z?0:void 0,onClick:z?W:void 0,onKeyDown:z?S:void 0,style:{width:"100%",minHeight:C?"48px":void 0,height:C?void 0:"auto",flexShrink:0,boxSizing:"border-box",display:"flex",flexDirection:C?"row":"column",alignItems:C?"center":"stretch",alignSelf:"stretch",paddingLeft:C?"12px":0,paddingTop:C?0:"12px",paddingBottom:C?0:"12px",gap:"12px",...z?{cursor:"pointer"}:{}},children:[C&&l.jsx($,{name:_,size:24,style:T}),l.jsxs("div",{style:{flex:C?"1 1 0":"0 0 auto",minWidth:0,minHeight:"48px",display:"flex",flexDirection:"column",gap:0},children:[l.jsx("div",{className:"anima-configuracionoverview__slot-inner-green",style:{width:"100%",minHeight:"24px",flexShrink:0,boxSizing:"border-box",display:"flex",alignItems:"flex-start",paddingRight:"12px"},children:l.jsx(A,{component:"span",style:{...D,wordBreak:"break-word",overflowWrap:"break-word",display:"block"},children:fe||" "})}),l.jsx("div",{className:"anima-configuracionoverview__slot-inner-green",style:{width:"100%",minHeight:"24px",flexShrink:0,boxSizing:"border-box",display:"flex",alignItems:"flex-start",paddingRight:"12px"},children:l.jsx(A,{component:"span",style:{...oe,wordBreak:"break-word",overflowWrap:"break-word",display:"block"},children:ee||" "})})]}),l.jsx("div",{style:{flexShrink:0,height:"24px",display:"flex",alignItems:"center",...C?{}:{marginTop:"8px"}},children:l.jsx(w0,{variant:k===x?"success":"danger",size:"small",className:"anima-configuracionoverview__slot-badge",style:{width:"96px",height:"24px",opacity:1,borderRadius:"var(--radius-16, 16px)",borderWidth:"1px",borderStyle:"solid",borderColor:k===x?"var(--color-status-success, #0A742C)":"var(--color-status-warning, #CC4908)",paddingTop:"2px",paddingRight:"12px",paddingBottom:"4px",paddingLeft:"12px",backgroundColor:k===x?"var(--misc-exito-fondo, #D3FFDF)":"var(--color-neutrals-white, #FFFFFF)",fontFamily:_e,fontWeight:400,fontStyle:"normal",fontSize:"12px",lineHeight:"18px",letterSpacing:"0%",textAlign:k===x?"right":"center",verticalAlign:"middle",color:k===x?"var(--color-status-success, #0A742C)":"var(--color-status-warning, #CC4908)",display:"inline-flex",alignItems:"center",justifyContent:k===x?"flex-end":"center",boxSizing:"border-box"},children:k===x?x:"Pendiente"})})]})},N)})})]})]})},_z=`
|
|
1750
1770
|
.anima-configuracionusuarios__container .anima-tabla__search-input::placeholder {
|
|
1751
1771
|
font-family: var(--font-family-sans);
|
|
1752
1772
|
font-weight: 400;
|
package/dist/anima-ds.esm.js
CHANGED
|
@@ -48701,6 +48701,11 @@ const v1 = {
|
|
|
48701
48701
|
padding-left: 8px;
|
|
48702
48702
|
box-sizing: border-box;
|
|
48703
48703
|
}
|
|
48704
|
+
.anima-alta-personas__tabs-shell {
|
|
48705
|
+
box-sizing: border-box;
|
|
48706
|
+
margin-left: 8px;
|
|
48707
|
+
margin-right: 8px;
|
|
48708
|
+
}
|
|
48704
48709
|
.anima-alta-personas__relaciones-laborales-wrap {
|
|
48705
48710
|
width: 100%;
|
|
48706
48711
|
max-width: 100%;
|
|
@@ -48750,6 +48755,18 @@ const v1 = {
|
|
|
48750
48755
|
justify-items: stretch;
|
|
48751
48756
|
}
|
|
48752
48757
|
@media (min-width: 1024px) {
|
|
48758
|
+
.anima-alta-personas__tabs-nav .anima-alta-personas__tab:nth-child(1) {
|
|
48759
|
+
width: 200px;
|
|
48760
|
+
min-width: 200px;
|
|
48761
|
+
max-width: 200px;
|
|
48762
|
+
flex: 0 0 200px;
|
|
48763
|
+
}
|
|
48764
|
+
.anima-alta-personas__tabs-nav .anima-alta-personas__tab:nth-child(2) {
|
|
48765
|
+
width: 150px;
|
|
48766
|
+
min-width: 150px;
|
|
48767
|
+
max-width: 150px;
|
|
48768
|
+
flex: 0 0 150px;
|
|
48769
|
+
}
|
|
48753
48770
|
.anima-alta-personas__relaciones-grid--con-historial
|
|
48754
48771
|
.anima-alta-personas__relacion-card-slot:not(.anima-alta-personas__relacion-card-slot--historial) {
|
|
48755
48772
|
grid-column: 1 / 2;
|
|
@@ -48795,7 +48812,7 @@ const v1 = {
|
|
|
48795
48812
|
display: flex;
|
|
48796
48813
|
flex-direction: row;
|
|
48797
48814
|
align-items: stretch;
|
|
48798
|
-
gap:
|
|
48815
|
+
gap: 5px;
|
|
48799
48816
|
}
|
|
48800
48817
|
.anima-alta-personas__tab {
|
|
48801
48818
|
box-sizing: border-box;
|
|
@@ -48998,13 +49015,16 @@ const v1 = {
|
|
|
48998
49015
|
}
|
|
48999
49016
|
.anima-alta-personas__tabs-wrap {
|
|
49000
49017
|
padding: 0;
|
|
49001
|
-
padding-left: 8px;
|
|
49002
49018
|
background: transparent;
|
|
49003
49019
|
margin-bottom: 16px;
|
|
49004
49020
|
box-sizing: border-box;
|
|
49005
49021
|
}
|
|
49022
|
+
.anima-alta-personas__tabs-shell {
|
|
49023
|
+
margin-left: 0;
|
|
49024
|
+
margin-right: 0;
|
|
49025
|
+
}
|
|
49006
49026
|
.anima-alta-personas__tabs-nav {
|
|
49007
|
-
gap:
|
|
49027
|
+
gap: 20px;
|
|
49008
49028
|
}
|
|
49009
49029
|
.anima-alta-personas__tab {
|
|
49010
49030
|
min-width: 0;
|
|
@@ -49797,7 +49817,7 @@ function YW({
|
|
|
49797
49817
|
]), P = async () => {
|
|
49798
49818
|
if (typeof s == "function")
|
|
49799
49819
|
try {
|
|
49800
|
-
de(), O(!0), await Promise.resolve(s(Q()));
|
|
49820
|
+
de(), O(!0), await Promise.resolve(s(Q())), typeof u == "function" && u();
|
|
49801
49821
|
} catch {
|
|
49802
49822
|
te();
|
|
49803
49823
|
} finally {
|
|
@@ -51067,36 +51087,26 @@ Agrega tu primer relación laboral.`
|
|
|
51067
51087
|
...me,
|
|
51068
51088
|
children: [
|
|
51069
51089
|
/* @__PURE__ */ l.jsx("style", { children: RW }),
|
|
51070
|
-
/* @__PURE__ */ l.jsxs(
|
|
51071
|
-
"div",
|
|
51072
|
-
|
|
51073
|
-
|
|
51074
|
-
|
|
51075
|
-
|
|
51076
|
-
|
|
51077
|
-
|
|
51078
|
-
children: [
|
|
51079
|
-
/* @__PURE__ */ l.jsx("div", { className: "anima-alta-personas__tabs-wrap", children: /* @__PURE__ */ l.jsx(
|
|
51080
|
-
"nav",
|
|
51090
|
+
/* @__PURE__ */ l.jsxs("div", { className: "anima-alta-personas__tabs-shell", children: [
|
|
51091
|
+
/* @__PURE__ */ l.jsx("div", { className: "anima-alta-personas__tabs-wrap", children: /* @__PURE__ */ l.jsx(
|
|
51092
|
+
"nav",
|
|
51093
|
+
{
|
|
51094
|
+
className: "anima-alta-personas__tabs-nav",
|
|
51095
|
+
"aria-label": k("persona.alta.tabsNavAriaLabel", { defaultValue: "Secciones" }),
|
|
51096
|
+
children: y0.map((ne, je) => /* @__PURE__ */ l.jsx(
|
|
51097
|
+
"button",
|
|
51081
51098
|
{
|
|
51082
|
-
|
|
51083
|
-
|
|
51084
|
-
|
|
51085
|
-
|
|
51086
|
-
|
|
51087
|
-
|
|
51088
|
-
|
|
51089
|
-
|
|
51090
|
-
|
|
51091
|
-
|
|
51092
|
-
|
|
51093
|
-
))
|
|
51094
|
-
}
|
|
51095
|
-
) }),
|
|
51096
|
-
ke === 1 && h == null ? y1 : null
|
|
51097
|
-
]
|
|
51098
|
-
}
|
|
51099
|
-
),
|
|
51099
|
+
type: "button",
|
|
51100
|
+
onClick: () => ve(je),
|
|
51101
|
+
className: ke === je ? "anima-alta-personas__tab anima-alta-personas__tab--active" : "anima-alta-personas__tab",
|
|
51102
|
+
children: ne.label
|
|
51103
|
+
},
|
|
51104
|
+
ne.id
|
|
51105
|
+
))
|
|
51106
|
+
}
|
|
51107
|
+
) }),
|
|
51108
|
+
ke === 1 && h == null ? y1 : null
|
|
51109
|
+
] }),
|
|
51100
51110
|
ke === 0 ? x0 : E1,
|
|
51101
51111
|
ke === 0 ? /* @__PURE__ */ l.jsxs(
|
|
51102
51112
|
"footer",
|
package/package.json
CHANGED
|
@@ -178,6 +178,11 @@ const gridResponsiveStyle = `
|
|
|
178
178
|
padding-left: 8px;
|
|
179
179
|
box-sizing: border-box;
|
|
180
180
|
}
|
|
181
|
+
.anima-alta-personas__tabs-shell {
|
|
182
|
+
box-sizing: border-box;
|
|
183
|
+
margin-left: 8px;
|
|
184
|
+
margin-right: 8px;
|
|
185
|
+
}
|
|
181
186
|
.anima-alta-personas__relaciones-laborales-wrap {
|
|
182
187
|
width: 100%;
|
|
183
188
|
max-width: 100%;
|
|
@@ -227,6 +232,18 @@ const gridResponsiveStyle = `
|
|
|
227
232
|
justify-items: stretch;
|
|
228
233
|
}
|
|
229
234
|
@media (min-width: 1024px) {
|
|
235
|
+
.anima-alta-personas__tabs-nav .anima-alta-personas__tab:nth-child(1) {
|
|
236
|
+
width: 200px;
|
|
237
|
+
min-width: 200px;
|
|
238
|
+
max-width: 200px;
|
|
239
|
+
flex: 0 0 200px;
|
|
240
|
+
}
|
|
241
|
+
.anima-alta-personas__tabs-nav .anima-alta-personas__tab:nth-child(2) {
|
|
242
|
+
width: 150px;
|
|
243
|
+
min-width: 150px;
|
|
244
|
+
max-width: 150px;
|
|
245
|
+
flex: 0 0 150px;
|
|
246
|
+
}
|
|
230
247
|
.anima-alta-personas__relaciones-grid--con-historial
|
|
231
248
|
.anima-alta-personas__relacion-card-slot:not(.anima-alta-personas__relacion-card-slot--historial) {
|
|
232
249
|
grid-column: 1 / 2;
|
|
@@ -272,7 +289,7 @@ const gridResponsiveStyle = `
|
|
|
272
289
|
display: flex;
|
|
273
290
|
flex-direction: row;
|
|
274
291
|
align-items: stretch;
|
|
275
|
-
gap:
|
|
292
|
+
gap: 5px;
|
|
276
293
|
}
|
|
277
294
|
.anima-alta-personas__tab {
|
|
278
295
|
box-sizing: border-box;
|
|
@@ -475,13 +492,16 @@ const gridResponsiveStyle = `
|
|
|
475
492
|
}
|
|
476
493
|
.anima-alta-personas__tabs-wrap {
|
|
477
494
|
padding: 0;
|
|
478
|
-
padding-left: 8px;
|
|
479
495
|
background: transparent;
|
|
480
496
|
margin-bottom: 16px;
|
|
481
497
|
box-sizing: border-box;
|
|
482
498
|
}
|
|
499
|
+
.anima-alta-personas__tabs-shell {
|
|
500
|
+
margin-left: 0;
|
|
501
|
+
margin-right: 0;
|
|
502
|
+
}
|
|
483
503
|
.anima-alta-personas__tabs-nav {
|
|
484
|
-
gap:
|
|
504
|
+
gap: 20px;
|
|
485
505
|
}
|
|
486
506
|
.anima-alta-personas__tab {
|
|
487
507
|
min-width: 0;
|
|
@@ -1498,6 +1518,9 @@ function RelacionLaboralAltaNuevaVista({
|
|
|
1498
1518
|
clearSubmitError();
|
|
1499
1519
|
setIsSubmitting(true);
|
|
1500
1520
|
await Promise.resolve(onGuardarBorrador(buildPayloadAltaRelacion()));
|
|
1521
|
+
if (typeof onFinalizar === 'function') {
|
|
1522
|
+
onFinalizar();
|
|
1523
|
+
}
|
|
1501
1524
|
} catch (e) {
|
|
1502
1525
|
failSubmit();
|
|
1503
1526
|
} finally {
|
|
@@ -3074,13 +3097,7 @@ export const AltaEdicionPersonas = ({
|
|
|
3074
3097
|
>
|
|
3075
3098
|
<style>{gridResponsiveStyle}</style>
|
|
3076
3099
|
|
|
3077
|
-
<div
|
|
3078
|
-
style={{
|
|
3079
|
-
boxSizing: 'border-box',
|
|
3080
|
-
marginLeft: '8px',
|
|
3081
|
-
marginRight: '8px',
|
|
3082
|
-
}}
|
|
3083
|
-
>
|
|
3100
|
+
<div className="anima-alta-personas__tabs-shell">
|
|
3084
3101
|
<div className="anima-alta-personas__tabs-wrap">
|
|
3085
3102
|
<nav
|
|
3086
3103
|
className="anima-alta-personas__tabs-nav"
|