????

Your IP : 216.73.216.64


Current Path : C:/inetpub/vhost/gdnn.gdtsolutions.vn/build/assets/
Upload File :
Current File : C:/inetpub/vhost/gdnn.gdtsolutions.vn/build/assets/FormCheckBoxDTUT-b555d270.js

import{r as c,t as m,j as a}from"./index-fa055cb8.js";import{F as p}from"./FormControl-dda7d30a.js";const C=c.forwardRef(({url:l,filter:e,disabled:u},d)=>{const[g,r]=c.useState([]);c.useImperativeHandle(d,()=>({childFunction1(){console.log("child function 1 called")},childFunction2(){console.log("child function 2 called")}}));const t=(n,o)=>(n.forEach(s=>{o.forEach(i=>{s.Id===i.DoiTuongChinhSach_Id&&(s.checked=!0,s.DoiTuong_Id=i.Id)})}),n),h=c.useCallback(()=>{m("QLLD_DM_DoiTuongChinhSach").then(n=>{let o=[];o=n.value.map(s=>({...s,checked:!1})),m(`${l}?$filter=${e==null?void 0:e.field} eq ${e==null?void 0:e.id}`).then(s=>{r(t(o,s.value))})})},[e==null?void 0:e.field,e==null?void 0:e.id,l]);c.useEffect(()=>{h()},[h]);const D=(n,o)=>{let s=n?"POST":"DELETE",i=n?JSON.stringify({[e.field]:e==null?void 0:e.id,DoiTuongChinhSach_Id:o==null?void 0:o.Id}):null,T=n?`${l}`:`${l}(${o==null?void 0:o.DoiTuong_Id})`;m(T,s,i).then(v=>{h()})};return a.jsxDEV(a.Fragment,{children:a.jsxDEV("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr"},children:g.map(n=>a.jsxDEV(a.Fragment,{children:a.jsxDEV("div",{children:a.jsxDEV(p,{data:{type:"checkbox",hiddenlable:!0,title:n.Name,disabled:u},value:n.checked,onChange:(o,s)=>D(s,n)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/gdnn.gdtsolutions.vn/src/views/QuanLyLaoDong/Components/Detail/FormCheckBoxDTUT.jsx",lineNumber:63,columnNumber:17},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/gdnn.gdtsolutions.vn/src/views/QuanLyLaoDong/Components/Detail/FormCheckBoxDTUT.jsx",lineNumber:62,columnNumber:15},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/gdnn.gdtsolutions.vn/src/views/QuanLyLaoDong/Components/Detail/FormCheckBoxDTUT.jsx",lineNumber:61,columnNumber:13},globalThis))},void 0,!1,{fileName:"/home/jenkins/agent/workspace/gdnn.gdtsolutions.vn/src/views/QuanLyLaoDong/Components/Detail/FormCheckBoxDTUT.jsx",lineNumber:58,columnNumber:7},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/gdnn.gdtsolutions.vn/src/views/QuanLyLaoDong/Components/Detail/FormCheckBoxDTUT.jsx",lineNumber:57,columnNumber:5},globalThis)});export{C as F};