import{j as t,r as f,i as y,_ as S,d as h,l as b,O as l,z as D}from"./index-cc84e56a.js";import{L as C}from"./PictureAsPdf-01d63a75.js";import{r as F}from"./GenericForm-b723407d.js";import{C as v}from"./MoreVert-64b91ae9.js";import"./ContentCopy-975c4378.js";import"./Delete-96744410.js";import"./ListItemText-a965cfbd.js";import"./ImageViewerModal-6b52c15d.js";import"./cjs-0b69d496.js";import"./AdmUsuarios-10c7fd6e.js";import"./Edit-5a622c9b.js";import"./ListItemIcon-77037982.js";import"./Divider-b784899a.js";import"./NoRowsComponent-73b1b6ea.js";import"./useForm-48439e2f.js";import"./useThemeProps-34ae68cb.js";import"./Card-ecc10a21.js";import"./CardContent-3949478d.js";import"./Container-56e8d2d4.js";import"./createContainer-a5dd8c1d.js";import"./OmegaTransferList-a83f6ea3.js";import"./CardHeader-ce2759f4.js";import"./Avatar-74796535.js";import"./_commonjs-dynamic-modules-334f5ece.js";import"./env-198ff0f3.js";import"./mapValues-ae7c2760.js";import"./Scheduler-d20f7c7d.js";import"./___vite-browser-external_commonjs-proxy-159536b4.js";const eo=i=>{const{ejecutarAdministraWf:c,paramsProceso:p,isFirstTarea:n,mode:a,tarActual:s,dataPrc:u}=i,m=i.dataPrc;return m?t(A,{paramsProceso:p,solInfo:m,ejecutarAdministraWf:c,isFirstTarea:n,mode:a,tarActual:s,dataPrc:u}):t(C,{})},A=i=>{const{ejecutarAdministraWf:c,paramsProceso:p,tarActual:n}=i,a=i.dataPrc;f.useEffect(()=>{y.getData(a,["sol"]).then(o=>{o.sol!==void 0&&(r("SolNumDoc",o.sol.SolNumDoc),r("SolNumDoc",o.sol.SolNumDoc),r("SolCuit",o.sol.SolCuit),r("SolSex",o.sol.SolSex),r("SolNom",o.sol.SolNom),r("SolApe",o.sol.SolApe),r("SolFchNac",o.sol.SolFchNac),r("SolNivEst",o.sol.SolNivEst),r("SolNac",o.sol.SolNac),r("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"},N={id:"DmnAbr",name:"SolEstCiv",text:"DmnDet",tabla:"dmn",where:"DmnFilt = 'ESTCIV'",type:"supercombobox"},{control:e,handleSubmit:x,formState:E,setValue:r}=h({mode:"onChange",defaultValues:{SolNumDoc:"",SolCuit:"",SolApe:"",SolNom:"",SolFchNac:"",SolSex:"",SolNivEst:"",SolNac:"",SolEstCiv:""}});return t(v,{children:b("form",{onSubmit:x(o=>{F.guardar("Sol",{iprId:a,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:[b("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"10px"},children:[t(l,{required:!0,control:e,name:"SolNumDoc",type:"number",label:"Número de documento"}),t(l,{required:!0,control:e,name:"SolCuit",type:"number",label:"CUIT"}),t(l,{required:!0,control:e,name:"SolApe",type:"text",label:"Apellido"}),t(l,{required:!0,control:e,name:"SolNom",type:"text",label:"Nombre"}),t(l,{required:!0,control:e,name:"SolFchNac",type:"date",label:"Fecha de Nacimiento"}),t(l,{required:!0,control:e,name:"SolSex",type:"supercombobox",label:"Sexo",iField:s}),t(l,{required:!0,control:e,name:"SolNivEst",type:"supercombobox",label:"Nivel de estudio",iField:u}),t(l,{required:!0,control:e,name:"SolNac",type:"supercombobox",label:"Nacionalidad",iField:m}),t(l,{required:!0,control:e,name:"SolEstCiv",type:"supercombobox",label:"Estado civil",iField:N})]}),i.mode!=="history"&&t("div",{style:{display:"flex",justifyContent:"end",marginTop:"10px"},children:t(D,{sx:{marginLeft:"10px"},color:"secondary",type:"submit",variant:"contained",children:"Continuar"})})]})})};export{eo as default};
