import{j as e,r as f,i as y,K as S,d as h,l as N,O as l,z as D}from"./index-91e9700c.js";import{L as C}from"./PictureAsPdf-73d459d3.js";import{r as F}from"./DatosDom-1b7497dd.js";import{C as v}from"./MoreVert-6fb14bf8.js";import"./Close-84438d62.js";import"./Container-3bb74340.js";import"./createContainer-1f2487c8.js";import"./DialogContentText-3801f418.js";import"./Divider-d0fc16ba.js";const z=a=>{const{ejecutarAdministraWf:c,paramsProceso:b,isFirstTarea:n,mode:i,tarActual:s,dataPrc:u}=a,m=a.dataPrc;return m?e(A,{paramsProceso:b,solInfo:m,ejecutarAdministraWf:c,isFirstTarea:n,mode:i,tarActual:s,dataPrc:u}):e(C,{})},A=a=>{const{ejecutarAdministraWf:c,paramsProceso:b,tarActual:n}=a,i=a.dataPrc;f.useEffect(()=>{y.getData(i,["sol"]).then(o=>{o.sol!==void 0&&(t("SolNumDoc",o.sol.SolNumDoc),t("SolNumDoc",o.sol.SolNumDoc),t("SolCuit",o.sol.SolCuit),t("SolSex",o.sol.SolSex),t("SolNom",o.sol.SolNom),t("SolApe",o.sol.SolApe),t("SolFchNac",o.sol.SolFchNac),t("SolNivEst",o.sol.SolNivEst),t("SolNac",o.sol.SolNac),t("SolEstCiv",o.sol.SolEstCiv))}).catch(o=>{S.error("Error al buscar datos"),console.error(o)})},[]);const s={id:"DmnAbr",name:"SolSex",text:"DmnDet",tabla:"dmn",where:"DmnFilt = 'TIPSEX'",type:"supercombobox"},u={id:"DmnAbr",name:"SolNivEst",text:"DmnDet",tabla:"dmn",where:"DmnFilt = 'ESTNIV'",type:"supercombobox"},m={id:"NacAbr",name:"SolNac",text:"NacNom",tabla:"nac",type:"supercombobox"},p={id:"DmnAbr",name:"SolEstCiv",text:"DmnDet",tabla:"dmn",where:"DmnFilt = 'ESTCIV'",type:"supercombobox"},{control:r,handleSubmit:x,formState:E,setValue:t}=h({mode:"onChange",defaultValues:{SolNumDoc:"",SolCuit:"",SolApe:"",SolNom:"",SolFchNac:"",SolSex:"",SolNivEst:"",SolNac:"",SolEstCiv:""}});return e(v,{children:N("form",{onSubmit:x(o=>{F.guardar("Sol",{iprId:i,data:o}).then(d=>{if(!d.success){S.error("Error al guardar datos");return}c({out:o,act:"END",tar:n})}).catch(d=>{S.error("Error al guardar datos"),console.error(d)})},()=>{console.log(E.errors)}),children:[N("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"10px"},children:[e(l,{required:!0,control:r,name:"SolNumDoc",type:"number",label:"Número de documento"}),e(l,{required:!0,control:r,name:"SolCuit",type:"number",label:"CUIT"}),e(l,{required:!0,control:r,name:"SolApe",type:"text",label:"Apellido"}),e(l,{required:!0,control:r,name:"SolNom",type:"text",label:"Nombre"}),e(l,{required:!0,control:r,name:"SolFchNac",type:"date",label:"Fecha de Nacimiento"}),e(l,{required:!0,control:r,name:"SolSex",type:"supercombobox",label:"Sexo",iField:s}),e(l,{required:!0,control:r,name:"SolNivEst",type:"supercombobox",label:"Nivel de estudio",iField:u}),e(l,{required:!0,control:r,name:"SolNac",type:"supercombobox",label:"Nacionalidad",iField:m}),e(l,{required:!0,control:r,name:"SolEstCiv",type:"supercombobox",label:"Estado civil",iField:p})]}),a.mode!=="history"&&e("div",{style:{display:"flex",justifyContent:"end",marginTop:"10px"},children:e(D,{sx:{marginLeft:"10px"},color:"secondary",type:"submit",variant:"contained",children:"Continuar"})})]})})};export{z as default};
