????

Your IP : 216.73.216.234


Current Path : C:/inetpub/vhost/qlhncn.gdtsolutions.vn/www/assets/
Upload File :
Current File : C:/inetpub/vhost/qlhncn.gdtsolutions.vn/www/assets/Detail-53224979.js

import{r as s,Y as ne,W as V,P as i,T as Ee,h as G,j as n,x as _e,m as fe,l as Ne,aC as Ve}from"./index-63f91612.js";import{T as Ln,B as J,v as ee,I as en}from"./reactstrap.modern-db56c8a4.js";import{g as Bn,B as Pn,M as nn,C as be,e as _n}from"./FormControl-1241e33f.js";import{T as qn}from"./TabsBasic-696a6c3d.js";import{c as Hn,t as Oe}from"./function-f31ac6e8.js";import{F as Y}from"./FontAwesome4-d45b4e7a.js";import{B as In}from"./Button-414de42d.js";import"./DataSelect-e63eac9d.js";import"./ButtonClose-c34d5952.js";import{I as Mn}from"./InputNumber-bbb3e938.js";import"./InputTime-7fc0744c.js";import{d as $n,c as on,a as Gn,u as Le,r as On,T as ge}from"./Typography-fdb2b74a.js";import{k as Fn,o as zn,q as An,f as tn,j as _,c as M,l as Xn,t as Kn,h as Fe,r as Se,v as Un,w as Wn,x as Yn,y as ze,a as le,b as ae,g as ie,s as W,d as re,u as Qn,z as Jn,A as qe,m as Q,B as Ae,C as Zn,T as ei,D as ni}from"./styled-0cf6ddbb.js";import{T as ii}from"./TransitionGroup-0c42f737.js";import{G as $}from"./Grid-d17e1e7c.js";import{T as oi}from"./index-6567181e.js";const ti=["className","component"];function si(e={}){const{themeId:o,defaultTheme:t,defaultClassName:l="MuiBox-root",generateClassName:r}=e,u=Fn("div",{shouldForwardProp:c=>c!=="theme"&&c!=="sx"&&c!=="as"})(zn);return s.forwardRef(function(p,d){const m=An(t),v=tn(p),{className:j,component:S="div"}=v,N=ne(v,ti);return _.jsx(u,V({as:S,ref:d,className:M(j,r?r(l):l),theme:o&&m[o]||m},N))})}const li=$n(),ce=li;function ai(e){const{prototype:o={}}=e;return!!o.isReactComponent}function ri(e,o,t,l,r){const u=e[o],h=r||o;if(u==null||typeof window>"u")return null;let c;return typeof u=="function"&&!ai(u)&&(c="Did you accidentally provide a plain function component instead?"),c!==void 0?new Error(`Invalid ${l} \`${h}\` supplied to \`${t}\`. Expected an element type that can hold a ref. ${c} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const sn=on(i.elementType,ri);function pe(e){const o=s.useRef(e);return Gn(()=>{o.current=e}),s.useRef((...t)=>(0,o.current)(...t)).current}const Xe={};function ui(e,o){const t=s.useRef(Xe);return t.current===Xe&&(t.current=e(o)),t}const ci=[];function hi(e){s.useEffect(e,ci)}class xe{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new xe}start(o,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},o)}}function ln(){const e=ui(xe.create).current;return hi(e.disposeEffect),e}let De=!0,Be=!1;const di=new xe,mi={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function gi(e){const{type:o,tagName:t}=e;return!!(t==="INPUT"&&mi[o]&&!e.readOnly||t==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function pi(e){e.metaKey||e.altKey||e.ctrlKey||(De=!0)}function Re(){De=!1}function fi(){this.visibilityState==="hidden"&&Be&&(De=!0)}function Ni(e){e.addEventListener("keydown",pi,!0),e.addEventListener("mousedown",Re,!0),e.addEventListener("pointerdown",Re,!0),e.addEventListener("touchstart",Re,!0),e.addEventListener("visibilitychange",fi,!0)}function bi(e){const{target:o}=e;try{return o.matches(":focus-visible")}catch{}return De||gi(o)}function xi(){const e=s.useCallback(r=>{r!=null&&Ni(r.ownerDocument)},[]),o=s.useRef(!1);function t(){return o.current?(Be=!0,di.start(100,()=>{Be=!1}),o.current=!1,!0):!1}function l(r){return bi(r)?(o.current=!0,!0):!1}return{isFocusVisibleRef:o,onFocus:l,onBlur:t,ref:e}}const Di=["component","direction","spacing","divider","children","className","useFlexGap"],vi=Xn(),ji=ce("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,o)=>o.root});function Ti(e){return Kn({props:e,name:"MuiStack",defaultTheme:vi})}function ki(e,o){const t=s.Children.toArray(e).filter(Boolean);return t.reduce((l,r,u)=>(l.push(r),u<t.length-1&&l.push(s.cloneElement(o,{key:`separator-${u}`})),l),[])}const Ci=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],wi=({ownerState:e,theme:o})=>{let t=V({display:"flex",flexDirection:"column"},Fe({theme:o},Se({values:e.direction,breakpoints:o.breakpoints.values}),l=>({flexDirection:l})));if(e.spacing){const l=Un(o),r=Object.keys(o.breakpoints.values).reduce((p,d)=>((typeof e.spacing=="object"&&e.spacing[d]!=null||typeof e.direction=="object"&&e.direction[d]!=null)&&(p[d]=!0),p),{}),u=Se({values:e.direction,base:r}),h=Se({values:e.spacing,base:r});typeof u=="object"&&Object.keys(u).forEach((p,d,m)=>{if(!u[p]){const j=d>0?u[m[d-1]]:"column";u[p]=j}}),t=Wn(t,Fe({theme:o},h,(p,d)=>e.useFlexGap?{gap:ze(l,p)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Ci(d?u[d]:e.direction)}`]:ze(l,p)}}))}return t=Yn(o.breakpoints,t),t};function yi(e={}){const{createStyledComponent:o=ji,useThemeProps:t=Ti,componentName:l="MuiStack"}=e,r=()=>le({root:["root"]},p=>ae(l,p),{}),u=o(wi),h=s.forwardRef(function(p,d){const m=t(p),v=tn(m),{component:j="div",direction:S="column",spacing:N=0,divider:T,children:E,className:R,useFlexGap:q=!1}=v,f=ne(v,Di),x={direction:S,spacing:N,useFlexGap:q},a=r();return _.jsx(u,V({as:j,ownerState:x,ref:d,className:M(a.root,R)},f,{children:T?ki(E,T):E}))});return h.propTypes={children:i.node,direction:i.oneOfType([i.oneOf(["column-reverse","column","row-reverse","row"]),i.arrayOf(i.oneOf(["column-reverse","column","row-reverse","row"])),i.object]),divider:i.node,spacing:i.oneOfType([i.arrayOf(i.oneOfType([i.number,i.string])),i.number,i.object,i.string]),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])},h}const an=yi();an.propTypes={children:i.node,component:i.elementType,direction:i.oneOfType([i.oneOf(["column-reverse","column","row-reverse","row"]),i.arrayOf(i.oneOf(["column-reverse","column","row-reverse","row"])),i.object]),divider:i.node,spacing:i.oneOfType([i.arrayOf(i.oneOfType([i.number,i.string])),i.number,i.object,i.string]),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),useFlexGap:i.bool};const se=an;function Ke(e,o){var t,l;const{timeout:r,easing:u,style:h={}}=e;return{duration:(t=h.transitionDuration)!=null?t:typeof r=="number"?r:r[o.mode]||0,easing:(l=h.transitionTimingFunction)!=null?l:typeof u=="object"?u[o.mode]:u,delay:h.transitionDelay}}function Si(e){return ae("MuiCollapse",e)}ie("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const Ri=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],Ei=e=>{const{orientation:o,classes:t}=e,l={root:["root",`${o}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${o}`],wrapperInner:["wrapperInner",`${o}`]};return le(l,Si,t)},Vi=W("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,o[t.orientation],t.state==="entered"&&o.entered,t.state==="exited"&&!t.in&&t.collapsedSize==="0px"&&o.hidden]}})(({theme:e,ownerState:o})=>V({height:0,overflow:"hidden",transition:e.transitions.create("height")},o.orientation==="horizontal"&&{height:"auto",width:0,transition:e.transitions.create("width")},o.state==="entered"&&V({height:"auto",overflow:"visible"},o.orientation==="horizontal"&&{width:"auto"}),o.state==="exited"&&!o.in&&o.collapsedSize==="0px"&&{visibility:"hidden"})),Li=W("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,o)=>o.wrapper})(({ownerState:e})=>V({display:"flex",width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),Bi=W("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,o)=>o.wrapperInner})(({ownerState:e})=>V({width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),He=s.forwardRef(function(o,t){const l=re({props:o,name:"MuiCollapse"}),{addEndListener:r,children:u,className:h,collapsedSize:c="0px",component:p,easing:d,in:m,onEnter:v,onEntered:j,onEntering:S,onExit:N,onExited:T,onExiting:E,orientation:R="vertical",style:q,timeout:f=Jn.standard,TransitionComponent:x=Ln}=l,a=ne(l,Ri),D=V({},l,{orientation:R,collapsedSize:c}),g=Ei(D),y=Qn(),C=ln(),b=s.useRef(null),B=s.useRef(),L=typeof c=="number"?`${c}px`:c,P=R==="horizontal",H=P?"width":"height",I=s.useRef(null),X=Le(t,I),z=w=>A=>{if(w){const K=I.current;A===void 0?w(K):w(K,A)}},O=()=>b.current?b.current[P?"clientWidth":"clientHeight"]:0,je=z((w,A)=>{b.current&&P&&(b.current.style.position="absolute"),w.style[H]=L,v&&v(w,A)}),he=z((w,A)=>{const K=O();b.current&&P&&(b.current.style.position="");const{duration:F,easing:te}=Ke({style:q,timeout:f,easing:d},{mode:"enter"});if(f==="auto"){const de=y.transitions.getAutoHeightDuration(K);w.style.transitionDuration=`${de}ms`,B.current=de}else w.style.transitionDuration=typeof F=="string"?F:`${F}ms`;w.style[H]=`${K}px`,w.style.transitionTimingFunction=te,S&&S(w,A)}),Te=z((w,A)=>{w.style[H]="auto",j&&j(w,A)}),ke=z(w=>{w.style[H]=`${O()}px`,N&&N(w)}),Ce=z(T),Z=z(w=>{const A=O(),{duration:K,easing:F}=Ke({style:q,timeout:f,easing:d},{mode:"exit"});if(f==="auto"){const te=y.transitions.getAutoHeightDuration(A);w.style.transitionDuration=`${te}ms`,B.current=te}else w.style.transitionDuration=typeof K=="string"?K:`${K}ms`;w.style[H]=L,w.style.transitionTimingFunction=F,E&&E(w)}),oe=w=>{f==="auto"&&C.start(B.current||0,w),r&&r(I.current,w)};return _.jsx(x,V({in:m,onEnter:je,onEntered:Te,onEntering:he,onExit:ke,onExited:Ce,onExiting:Z,addEndListener:oe,nodeRef:I,timeout:f==="auto"?null:f},a,{children:(w,A)=>_.jsx(Vi,V({as:p,className:M(g.root,h,{entered:g.entered,exited:!m&&L==="0px"&&g.hidden}[w]),style:V({[P?"minWidth":"minHeight"]:L},q),ref:X},A,{ownerState:V({},D,{state:w}),children:_.jsx(Li,{ownerState:V({},D,{state:w}),className:g.wrapper,ref:b,children:_.jsx(Bi,{ownerState:V({},D,{state:w}),className:g.wrapperInner,children:u})})}))}))});He.propTypes={addEndListener:i.func,children:i.node,classes:i.object,className:i.string,collapsedSize:i.oneOfType([i.number,i.string]),component:sn,easing:i.oneOfType([i.shape({enter:i.string,exit:i.string}),i.string]),in:i.bool,onEnter:i.func,onEntered:i.func,onEntering:i.func,onExit:i.func,onExited:i.func,onExiting:i.func,orientation:i.oneOf(["horizontal","vertical"]),style:i.object,sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),timeout:i.oneOfType([i.oneOf(["auto"]),i.number,i.shape({appear:i.number,enter:i.number,exit:i.number})])};He.muiSupportAuto=!0;const rn=He;function un(e){const{className:o,classes:t,pulsate:l=!1,rippleX:r,rippleY:u,rippleSize:h,in:c,onExited:p,timeout:d}=e,[m,v]=s.useState(!1),j=M(o,t.ripple,t.rippleVisible,l&&t.ripplePulsate),S={width:h,height:h,top:-(h/2)+u,left:-(h/2)+r},N=M(t.child,m&&t.childLeaving,l&&t.childPulsate);return!c&&!m&&v(!0),s.useEffect(()=>{if(!c&&p!=null){const T=setTimeout(p,d);return()=>{clearTimeout(T)}}},[p,c,d]),_.jsx("span",{className:j,style:S,children:_.jsx("span",{className:N})})}un.propTypes={classes:i.object.isRequired,className:i.string,in:i.bool,onExited:i.func,pulsate:i.bool,rippleSize:i.number,rippleX:i.number,rippleY:i.number,timeout:i.number.isRequired};const Pi=ie("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),U=Pi,_i=["center","classes","className"];let ve=e=>e,Ue,We,Ye,Qe;const Pe=550,qi=80,Hi=qe(Ue||(Ue=ve`
  0% {
    transform: scale(0);
    opacity: 0.1;
  }

  100% {
    transform: scale(1);
    opacity: 0.3;
  }
`)),Ii=qe(We||(We=ve`
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
`)),Mi=qe(Ye||(Ye=ve`
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.92);
  }

  100% {
    transform: scale(1);
  }
`)),$i=W("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Gi=W(un,{name:"MuiTouchRipple",slot:"Ripple"})(Qe||(Qe=ve`
  opacity: 0;
  position: absolute;

  &.${0} {
    opacity: 0.3;
    transform: scale(1);
    animation-name: ${0};
    animation-duration: ${0}ms;
    animation-timing-function: ${0};
  }

  &.${0} {
    animation-duration: ${0}ms;
  }

  & .${0} {
    opacity: 1;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: currentColor;
  }

  & .${0} {
    opacity: 0;
    animation-name: ${0};
    animation-duration: ${0}ms;
    animation-timing-function: ${0};
  }

  & .${0} {
    position: absolute;
    /* @noflip */
    left: 0px;
    top: 0;
    animation-name: ${0};
    animation-duration: 2500ms;
    animation-timing-function: ${0};
    animation-iteration-count: infinite;
    animation-delay: 200ms;
  }
`),U.rippleVisible,Hi,Pe,({theme:e})=>e.transitions.easing.easeInOut,U.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,U.child,U.childLeaving,Ii,Pe,({theme:e})=>e.transitions.easing.easeInOut,U.childPulsate,Mi,({theme:e})=>e.transitions.easing.easeInOut),cn=s.forwardRef(function(o,t){const l=re({props:o,name:"MuiTouchRipple"}),{center:r=!1,classes:u={},className:h}=l,c=ne(l,_i),[p,d]=s.useState([]),m=s.useRef(0),v=s.useRef(null);s.useEffect(()=>{v.current&&(v.current(),v.current=null)},[p]);const j=s.useRef(!1),S=ln(),N=s.useRef(null),T=s.useRef(null),E=s.useCallback(x=>{const{pulsate:a,rippleX:D,rippleY:g,rippleSize:y,cb:C}=x;d(b=>[...b,_.jsx(Gi,{classes:{ripple:M(u.ripple,U.ripple),rippleVisible:M(u.rippleVisible,U.rippleVisible),ripplePulsate:M(u.ripplePulsate,U.ripplePulsate),child:M(u.child,U.child),childLeaving:M(u.childLeaving,U.childLeaving),childPulsate:M(u.childPulsate,U.childPulsate)},timeout:Pe,pulsate:a,rippleX:D,rippleY:g,rippleSize:y},m.current)]),m.current+=1,v.current=C},[u]),R=s.useCallback((x={},a={},D=()=>{})=>{const{pulsate:g=!1,center:y=r||a.pulsate,fakeElement:C=!1}=a;if((x==null?void 0:x.type)==="mousedown"&&j.current){j.current=!1;return}(x==null?void 0:x.type)==="touchstart"&&(j.current=!0);const b=C?null:T.current,B=b?b.getBoundingClientRect():{width:0,height:0,left:0,top:0};let L,P,H;if(y||x===void 0||x.clientX===0&&x.clientY===0||!x.clientX&&!x.touches)L=Math.round(B.width/2),P=Math.round(B.height/2);else{const{clientX:I,clientY:X}=x.touches&&x.touches.length>0?x.touches[0]:x;L=Math.round(I-B.left),P=Math.round(X-B.top)}if(y)H=Math.sqrt((2*B.width**2+B.height**2)/3),H%2===0&&(H+=1);else{const I=Math.max(Math.abs((b?b.clientWidth:0)-L),L)*2+2,X=Math.max(Math.abs((b?b.clientHeight:0)-P),P)*2+2;H=Math.sqrt(I**2+X**2)}x!=null&&x.touches?N.current===null&&(N.current=()=>{E({pulsate:g,rippleX:L,rippleY:P,rippleSize:H,cb:D})},S.start(qi,()=>{N.current&&(N.current(),N.current=null)})):E({pulsate:g,rippleX:L,rippleY:P,rippleSize:H,cb:D})},[r,E,S]),q=s.useCallback(()=>{R({},{pulsate:!0})},[R]),f=s.useCallback((x,a)=>{if(S.clear(),(x==null?void 0:x.type)==="touchend"&&N.current){N.current(),N.current=null,S.start(0,()=>{f(x,a)});return}N.current=null,d(D=>D.length>0?D.slice(1):D),v.current=a},[S]);return s.useImperativeHandle(t,()=>({pulsate:q,start:R,stop:f}),[q,R,f]),_.jsx($i,V({className:M(U.root,u.root,h),ref:T},c,{children:_.jsx(ii,{component:null,exit:!0,children:p})}))});cn.propTypes={center:i.bool,classes:i.object,className:i.string};const Oi=cn;function Fi(e){return ae("MuiButtonBase",e)}const zi=ie("MuiButtonBase",["root","disabled","focusVisible"]),Ai=zi,Xi=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],Ki=e=>{const{disabled:o,focusVisible:t,focusVisibleClassName:l,classes:r}=e,h=le({root:["root",o&&"disabled",t&&"focusVisible"]},Fi,r);return t&&l&&(h.root+=` ${l}`),h},Ui=W("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,o)=>o.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Ai.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),hn=s.forwardRef(function(o,t){const l=re({props:o,name:"MuiButtonBase"}),{action:r,centerRipple:u=!1,children:h,className:c,component:p="button",disabled:d=!1,disableRipple:m=!1,disableTouchRipple:v=!1,focusRipple:j=!1,LinkComponent:S="a",onBlur:N,onClick:T,onContextMenu:E,onDragLeave:R,onFocus:q,onFocusVisible:f,onKeyDown:x,onKeyUp:a,onMouseDown:D,onMouseLeave:g,onMouseUp:y,onTouchEnd:C,onTouchMove:b,onTouchStart:B,tabIndex:L=0,TouchRippleProps:P,touchRippleRef:H,type:I}=l,X=ne(l,Xi),z=s.useRef(null),O=s.useRef(null),je=Le(O,H),{isFocusVisibleRef:he,onFocus:Te,onBlur:ke,ref:Ce}=xi(),[Z,oe]=s.useState(!1);d&&Z&&oe(!1),s.useImperativeHandle(r,()=>({focusVisible:()=>{oe(!0),z.current.focus()}}),[]);const[w,A]=s.useState(!1);s.useEffect(()=>{A(!0)},[]);const K=w&&!m&&!d;s.useEffect(()=>{Z&&j&&!m&&w&&O.current.pulsate()},[m,j,Z,w]);function F(k,$e,Vn=v){return pe(Ge=>($e&&$e(Ge),!Vn&&O.current&&O.current[k](Ge),!0))}const te=F("start",D),de=F("stop",E),xn=F("stop",R),Dn=F("stop",y),vn=F("stop",k=>{Z&&k.preventDefault(),g&&g(k)}),jn=F("start",B),Tn=F("stop",C),kn=F("stop",b),Cn=F("stop",k=>{ke(k),he.current===!1&&oe(!1),N&&N(k)},!1),wn=pe(k=>{z.current||(z.current=k.currentTarget),Te(k),he.current===!0&&(oe(!0),f&&f(k)),q&&q(k)}),we=()=>{const k=z.current;return p&&p!=="button"&&!(k.tagName==="A"&&k.href)},ye=s.useRef(!1),yn=pe(k=>{j&&!ye.current&&Z&&O.current&&k.key===" "&&(ye.current=!0,O.current.stop(k,()=>{O.current.start(k)})),k.target===k.currentTarget&&we()&&k.key===" "&&k.preventDefault(),x&&x(k),k.target===k.currentTarget&&we()&&k.key==="Enter"&&!d&&(k.preventDefault(),T&&T(k))}),Sn=pe(k=>{j&&k.key===" "&&O.current&&Z&&!k.defaultPrevented&&(ye.current=!1,O.current.stop(k,()=>{O.current.pulsate(k)})),a&&a(k),T&&k.target===k.currentTarget&&we()&&k.key===" "&&!k.defaultPrevented&&T(k)});let me=p;me==="button"&&(X.href||X.to)&&(me=S);const ue={};me==="button"?(ue.type=I===void 0?"button":I,ue.disabled=d):(!X.href&&!X.to&&(ue.role="button"),d&&(ue["aria-disabled"]=d));const Rn=Le(t,Ce,z);s.useEffect(()=>{K&&!O.current&&console.error(["MUI: The `component` prop provided to ButtonBase is invalid.","Please make sure the children prop is rendered in this custom component."].join(`
`))},[K]);const Me=V({},l,{centerRipple:u,component:p,disabled:d,disableRipple:m,disableTouchRipple:v,focusRipple:j,tabIndex:L,focusVisible:Z}),En=Ki(Me);return _.jsxs(Ui,V({as:me,className:M(En.root,c),ownerState:Me,onBlur:Cn,onClick:T,onContextMenu:de,onFocus:wn,onKeyDown:yn,onKeyUp:Sn,onMouseDown:te,onMouseLeave:vn,onMouseUp:Dn,onDragLeave:xn,onTouchEnd:Tn,onTouchMove:kn,onTouchStart:jn,ref:Rn,tabIndex:d?-1:L,type:I},ue,X,{children:[h,K?_.jsx(Oi,V({ref:je,center:u},P)):null]}))});hn.propTypes={action:On,centerRipple:i.bool,children:i.node,classes:i.object,className:i.string,component:sn,disabled:i.bool,disableRipple:i.bool,disableTouchRipple:i.bool,focusRipple:i.bool,focusVisibleClassName:i.string,href:i.any,LinkComponent:i.elementType,onBlur:i.func,onClick:i.func,onContextMenu:i.func,onDragLeave:i.func,onFocus:i.func,onFocusVisible:i.func,onKeyDown:i.func,onKeyUp:i.func,onMouseDown:i.func,onMouseLeave:i.func,onMouseUp:i.func,onTouchEnd:i.func,onTouchMove:i.func,onTouchStart:i.func,sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),tabIndex:i.number,TouchRippleProps:i.object,touchRippleRef:i.oneOfType([i.func,i.shape({current:i.shape({pulsate:i.func.isRequired,start:i.func.isRequired,stop:i.func.isRequired})})]),type:i.oneOfType([i.oneOf(["button","reset","submit"]),i.string])};const Wi=hn;function Yi(e){return ae("MuiIconButton",e)}const Qi=ie("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),Ji=Qi,Zi=["edge","children","className","color","disabled","disableFocusRipple","size"],eo=e=>{const{classes:o,disabled:t,color:l,edge:r,size:u}=e,h={root:["root",t&&"disabled",l!=="default"&&`color${Q(l)}`,r&&`edge${Q(r)}`,`size${Q(u)}`]};return le(h,Yi,o)},no=W(Wi,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,t.color!=="default"&&o[`color${Q(t.color)}`],t.edge&&o[`edge${Q(t.edge)}`],o[`size${Q(t.size)}`]]}})(({theme:e,ownerState:o})=>V({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!o.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Ae(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},o.edge==="start"&&{marginLeft:o.size==="small"?-3:-12},o.edge==="end"&&{marginRight:o.size==="small"?-3:-12}),({theme:e,ownerState:o})=>{var t;const l=(t=(e.vars||e).palette)==null?void 0:t[o.color];return V({},o.color==="inherit"&&{color:"inherit"},o.color!=="inherit"&&o.color!=="default"&&V({color:l==null?void 0:l.main},!o.disableRipple&&{"&:hover":V({},l&&{backgroundColor:e.vars?`rgba(${l.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ae(l.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),o.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},o.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${Ji.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),dn=s.forwardRef(function(o,t){const l=re({props:o,name:"MuiIconButton"}),{edge:r=!1,children:u,className:h,color:c="default",disabled:p=!1,disableFocusRipple:d=!1,size:m="medium"}=l,v=ne(l,Zi),j=V({},l,{edge:r,color:c,disabled:p,disableFocusRipple:d,size:m}),S=eo(j);return _.jsx(no,V({className:M(S.root,h),centerRipple:!0,focusRipple:!d,disabled:p,ref:t},v,{ownerState:j,children:u}))});dn.propTypes={children:on(i.node,e=>s.Children.toArray(e.children).some(t=>s.isValidElement(t)&&t.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
`)):null),classes:i.object,className:i.string,color:i.oneOfType([i.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),i.string]),disabled:i.bool,disableFocusRipple:i.bool,disableRipple:i.bool,edge:i.oneOf(["end","start",!1]),size:i.oneOfType([i.oneOf(["small","medium","large"]),i.string]),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])};const mn=dn,io=ie("MuiBox",["root"]),oo=io,to=Zn(),gn=si({themeId:ei,defaultTheme:to,defaultClassName:oo.root,generateClassName:ni.generate});gn.propTypes={children:i.node,component:i.elementType,sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])};const pn=gn;function so(e){return ae("MuiCardHeader",e)}const lo=ie("MuiCardHeader",["root","avatar","action","content","title","subheader"]),Je=lo,ao=["action","avatar","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"],ro=e=>{const{classes:o}=e;return le({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},so,o)},uo=W("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,o)=>V({[`& .${Je.title}`]:o.title,[`& .${Je.subheader}`]:o.subheader},o.root)})({display:"flex",alignItems:"center",padding:16}),co=W("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(e,o)=>o.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),ho=W("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(e,o)=>o.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),mo=W("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(e,o)=>o.content})({flex:"1 1 auto"}),fn=s.forwardRef(function(o,t){const l=re({props:o,name:"MuiCardHeader"}),{action:r,avatar:u,className:h,component:c="div",disableTypography:p=!1,subheader:d,subheaderTypographyProps:m,title:v,titleTypographyProps:j}=l,S=ne(l,ao),N=V({},l,{component:c,disableTypography:p}),T=ro(N);let E=v;E!=null&&E.type!==ge&&!p&&(E=_.jsx(ge,V({variant:u?"body2":"h5",className:T.title,component:"span",display:"block"},j,{children:E})));let R=d;return R!=null&&R.type!==ge&&!p&&(R=_.jsx(ge,V({variant:u?"body2":"body1",className:T.subheader,color:"text.secondary",component:"span",display:"block"},m,{children:R}))),_.jsxs(uo,V({className:M(T.root,h),as:c,ref:t,ownerState:N},S,{children:[u&&_.jsx(co,{className:T.avatar,ownerState:N,children:u}),_.jsxs(mo,{className:T.content,ownerState:N,children:[E,R]}),r&&_.jsx(ho,{className:T.action,ownerState:N,children:r})]}))});fn.propTypes={action:i.node,avatar:i.node,children:i.node,classes:i.object,className:i.string,component:i.elementType,disableTypography:i.bool,subheader:i.node,subheaderTypographyProps:i.object,sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),title:i.node,titleTypographyProps:i.object};const Nn=fn;function go(e){return ae("MuiIcon",e)}ie("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const po=["baseClassName","className","color","component","fontSize"],fo=e=>{const{color:o,fontSize:t,classes:l}=e,r={root:["root",o!=="inherit"&&`color${Q(o)}`,`fontSize${Q(t)}`]};return le(r,go,l)},No=W("span",{name:"MuiIcon",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,t.color!=="inherit"&&o[`color${Q(t.color)}`],o[`fontSize${Q(t.fontSize)}`]]}})(({theme:e,ownerState:o})=>({userSelect:"none",width:"1em",height:"1em",overflow:"hidden",display:"inline-block",textAlign:"center",flexShrink:0,fontSize:{inherit:"inherit",small:e.typography.pxToRem(20),medium:e.typography.pxToRem(24),large:e.typography.pxToRem(36)}[o.fontSize],color:{primary:(e.vars||e).palette.primary.main,secondary:(e.vars||e).palette.secondary.main,info:(e.vars||e).palette.info.main,success:(e.vars||e).palette.success.main,warning:(e.vars||e).palette.warning.main,action:(e.vars||e).palette.action.active,error:(e.vars||e).palette.error.main,disabled:(e.vars||e).palette.action.disabled,inherit:void 0}[o.color]})),Ie=s.forwardRef(function(o,t){const l=re({props:o,name:"MuiIcon"}),{baseClassName:r="material-icons",className:u,color:h="inherit",component:c="span",fontSize:p="medium"}=l,d=ne(l,po),m=V({},l,{baseClassName:r,color:h,component:c,fontSize:p}),v=fo(m);return _.jsx(No,V({as:c,className:M(r,"notranslate",v.root,u),ownerState:m,"aria-hidden":!0,ref:t},d))});Ie.propTypes={baseClassName:i.string,children:i.node,classes:i.object,className:i.string,color:i.oneOfType([i.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),i.string]),component:i.elementType,fontSize:i.oneOfType([i.oneOf(["inherit","large","medium","small"]),i.string]),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])};Ie.muiName="Icon";const bn=Ie,bo=[{tabName:"Thông tin chung",ratio:3},{title:"Tháng rà soát",field:"ThangRaSoat",type:"textbox"},{title:"Năm rà soát",field:"NamRaSoat",type:"textbox"},{title:"Thôn xóm",field:"Thon_Id",type:"input-thon-xom"},{title:"Mã hộ",field:"MaHo",type:"textbox"},{title:"Phân loại hộ theo kết quả rà soát năm trước kì rà soát",field:"PhanLoaiGiaDinh",type:"textbox"},{title:"Khu vực",field:"TenKhuVuc",type:"textbox"},{title:"Nguyên nhân tăng hộ nghèo",field:"NguyenNhanTangHoNgheo",type:"checkbox"},{title:"Nguyên nhân giảm hộ nghèo",field:"NguyenNhanGiamNgheo",type:"checkbox"},{tabName:"Chủ hộ",ratio:1,hidden:!0},{title:"Chủ hộ",field:"ChuHo_Id",type:"danh-sach-cong-dan",required:!0}],xo=[{title:"Id",field:"Id",hidden:"true",dataID:!0,table:!0,notEdit:!0},{tabName:"Thông tin chung",ratio:3},{title:"Năm rà soát",field:"NamRaSoat",type:"select-year",table:!0,required:!0,disabled:!0},{title:"Tháng rà soát",field:"ThangRaSoat",type:"select-month",table:!0,required:!0,disabled:!0},{title:"Thôn xóm",field:"Thon_Id",type:"input-thon-xom",required:!0},{title:"Đơn vị",field:"SYS_DonVi.ParentID",table:!0,hidden:"true"},{title:"Mã hộ",field:"MaHo",table:!0},{title:"Phân loại hộ",field:"DM_PhanLoaiHo.Name",table:!0},{title:"Họ tên chủ hộ",field:"HNCN_CongDan.HoVaTen",table:!0},{title:"CCCD/CMND",field:"HNCN_CongDan.SoCCCD",table:!0},{title:"Phường Xã",field:"ThonXom.PhuongXa.TenPhuongXa",table:!0},{title:"Thôn xóm",field:"ThonXom.Ten",table:!0},{title:"Khu vực",field:"DM_KhuVuc.Name",table:!0},{title:"Tổng điểm B1",field:"TongDiemPhieuB1",table:!0},{title:"Tổng điểm B2",field:"TongDiemPhieuB2",table:!0},{title:"Phân loại hộ theo kết quả rà soát năm trước kì rà soát",field:"PhanLoaiGiaDinh_Id",type:"data-select",required:!0,searchable:!0,dataSelect:{url:"DM_PhanLoaiHo",value_field:"Id",text_field:"Name",placeholder:"Chọn Phân loại hộ"}},{title:"Khu vực",field:"KhuVuc_Id",type:"data-select",required:!0,valueDefault:Ee.KhuVuc_Id,disabled:!0,dataSelect:{url:"DM_KhuVuc",value_field:"Id",text_field:"Name",placeholder:"Chọn Khu vực",disabled:!0}},{title:"Nguyên nhân tăng hộ nghèo",field:"NguyenNhanTangHoNgheo",type:"checkbox"},{title:"Nguyên nhân giảm hộ nghèo",field:"NguyenNhanGiamNgheo",type:"checkbox"},{tabName:"Chủ hộ",ratio:1,hidden:!0},{title:"Chủ hộ",field:"ChuHo_Id",type:"danh-sach-cong-dan",required:!0}],Do=()=>{var o,t;let e=[{title:"Thôn xóm",field:"Thon_Id",type:"data-select",dataSelect:{url:"ThonXoms",value_field:"Id",text_field:"Ten",placeholder:"Chọn Thôn/Xóm",where:`MaPhuongXa eq '${(o=Ee)==null?void 0:o.MaPhuongXa}'`}}];return Bn?[{field:"ThonXom/MaPhuongXa",type:"data-select",dataSelect:{url:"PhuongXas",where:`MaQuanHuyen eq '${(t=Ee)==null?void 0:t.MaQuanHuyen}'`,value_field:"MaPhuongXa",text_field:"TenPhuongXa",placeholder:"Chọn Phường/Xã"}},{field:"Thon_Id",type:"data-select",dataSelect:{url:"ThonXoms",value_field:"Id",text_field:"Ten",placeholder:"Chọn Thôn/Xóm"},dependent:{name:"ThonXom/MaPhuongXa",fieldWhere:"MaPhuongXa"}}]:e},vo=[{title:"Mã hộ",field:"MaHo",type:"textbox"},{title:"Họ tên chủ hộ",field:"HNCN_CongDan/HoVaTen",type:"textbox"},{title:"CCCD/CMND",field:"HNCN_CongDan/SoCCCD",type:"textbox"}],nt=vo.concat(Do()),jo=s.forwardRef(({Id:e,columns:o,children:t,title:l,url:r,apiGetData:u,isPadding:h},c)=>{let p=o.filter(S=>S.type||S.tabName),d=Hn(p)||[];const[m,v]=s.useState();s.useImperativeHandle(c,()=>({loadData(){j()}}));const j=s.useCallback(()=>{let S=u||`${r}(${e})${Oe(o)?`?$expand=${Oe(o)}`:""}`;G(S,"GET",null,{odata:!u}).then(N=>{v(N)})},[e,u,o,r]);return s.useEffect(()=>{j()},[j]),n.jsxDEV(n.Fragment,{children:n.jsxDEV("div",{children:n.jsxDEV("div",{className:h?"":"form-detail-custom",children:[n.jsxDEV("div",{className:"d-flex align-items-start justify-content-between hidden-by-formcontrol",children:n.jsxDEV("div",{children:n.jsxDEV("div",{className:"d-flex align-items-center gap-4",children:l!==!1&&n.jsxDEV("h3",{className:"fw-bold mb-0",children:["Thông tin chi tiết ",l||""]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/components/TableAutoCustom/Custom/FormDetailAutoCustom.jsx",lineNumber:37,columnNumber:37},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/components/TableAutoCustom/Custom/FormDetailAutoCustom.jsx",lineNumber:36,columnNumber:15},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/components/TableAutoCustom/Custom/FormDetailAutoCustom.jsx",lineNumber:35,columnNumber:13},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/components/TableAutoCustom/Custom/FormDetailAutoCustom.jsx",lineNumber:34,columnNumber:11},globalThis),m&&n.jsxDEV(Pn,{listFormControl:d,title:l,data:m,children:t},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/components/TableAutoCustom/Custom/FormDetailAutoCustom.jsx",lineNumber:41,columnNumber:20},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/components/TableAutoCustom/Custom/FormDetailAutoCustom.jsx",lineNumber:33,columnNumber:9},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/components/TableAutoCustom/Custom/FormDetailAutoCustom.jsx",lineNumber:32,columnNumber:7},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/components/TableAutoCustom/Custom/FormDetailAutoCustom.jsx",lineNumber:31,columnNumber:5},globalThis)});const To=({value:e,getData:o})=>{const[t,l]=s.useState(e),[r,u]=s.useState(null),h=s.useCallback(c=>{c&&G(`PhieuB1Ext/CheckMaHo?MaHo=${c}`,"GET",null,{odata:!1}).then(p=>{Object.keys(p).length?(o(p),u(!0)):(o({MaHo:t}),u(!1))}).catch(()=>{o({MaHo:t}),u(!1)})},[o,t]);return s.useEffect(()=>{e&&h(e),e&&l(e)},[e]),n.jsxDEV(n.Fragment,{children:[n.jsxDEV("div",{className:"outline-input-search-maho",children:[n.jsxDEV(Mn,{onChange:c=>{l(c.target.value),o(null)},onKeyPress:c=>{c.charCode===13&&h(t)},value:t,placeholder:'Hãy nhập đầy đủ Mã hộ gia đình và nhấn "Enter", Hệ thống sẽ tự động kiểm tra...'},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Component/InputSearchMaHo.jsx",lineNumber:41,columnNumber:9},globalThis),n.jsxDEV(In,{onClick:()=>h(t),className:"btn-form-search-maho",children:[n.jsxDEV(Y,{fa:"search"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Component/InputSearchMaHo.jsx",lineNumber:55,columnNumber:11},globalThis)," Kiểm tra"]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Component/InputSearchMaHo.jsx",lineNumber:54,columnNumber:9},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Component/InputSearchMaHo.jsx",lineNumber:40,columnNumber:7},globalThis),r!==null&&t&&n.jsxDEV(n.Fragment,{children:n.jsxDEV("h6",{className:"my-4",children:r===!1?`Mã hộ "${t}" chưa được khởi tạo, Bạn đang trong quá trình Thêm mới!`:`Mã hộ "${t}" đã được thêm vào hệ thống. Toàn bộ thông tin đang được lấy từ lần trước đó và bạn có thể chỉnh sửa.`},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Component/InputSearchMaHo.jsx",lineNumber:60,columnNumber:11},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Component/InputSearchMaHo.jsx",lineNumber:59,columnNumber:9},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Component/InputSearchMaHo.jsx",lineNumber:39,columnNumber:5},globalThis)},ko=({Id:e,reload:o})=>{const[t,l]=s.useState(null),r=s.useMemo(()=>{let u=JSON.parse(JSON.stringify(xo)),h=u.findIndex(c=>(c==null?void 0:c.field)==="ChuHo_Id");return u[h].disabled=!0,u},[]);return n.jsxDEV(n.Fragment,{children:[n.jsxDEV("div",{className:"d-flex",children:[n.jsxDEV("div",{className:"d-flex align-items-center gap-2",children:[n.jsxDEV(Y,{fa:"superpowers"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/editB1.jsx",lineNumber:22,columnNumber:11},globalThis),n.jsxDEV("h6",{className:"mb-0",children:"Cập nhật Thông tin chung"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/editB1.jsx",lineNumber:23,columnNumber:11},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/editB1.jsx",lineNumber:21,columnNumber:9},globalThis),n.jsxDEV(J,{style:{background:"linear-gradient(90deg, rgba(38,206,255,1) 0%, rgba(0,154,170,1) 100%)"},className:"ms-auto fw-bold d-flex align-items-center gap-2",onClick:()=>l(e),children:[n.jsxDEV(Y,{style:{marginTop:"0.2rem"},fa:"pencil-square-o"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/editB1.jsx",lineNumber:30,columnNumber:11},globalThis),"Cập nhật"]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/editB1.jsx",lineNumber:25,columnNumber:9},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/editB1.jsx",lineNumber:20,columnNumber:7},globalThis),(t||t===0)&&n.jsxDEV(Co,{columns:r,open:t||t===0,close:()=>l(null),Id:t!==!0?t:null,reload:()=>{o()}},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/editB1.jsx",lineNumber:35,columnNumber:9},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/editB1.jsx",lineNumber:19,columnNumber:5},globalThis)},Co=({open:e,close:o,columns:t,reload:l,Id:r,getId:u})=>{const[h,c]=s.useState(null),[p,d]=s.useState("");return n.jsxDEV(n.Fragment,{children:n.jsxDEV(nn,{columns:t,open:e,close:o,Id:r,fieldID:"Id",title:"Phiếu B1",apiUrl:"PhieuB1Ext/AddPhieuB1",url:"PhieuB1Ext/AddPhieuB1",apiGetData:`PhieuB1Ext/GetPhieuB1?Id=${r}`,afterSaving:()=>{l()},defaultValue:h,addValue:r?{Id:r}:null,hidden:h===null,getFullData:m=>d(m==null?void 0:m.MaHo),getId:m=>u&&u(m),children:[{title:"Kiểm tra Mã hộ",position:"top",component:n.jsxDEV(n.Fragment,{children:n.jsxDEV(To,{value:p,onChange:m=>d(m),getData:m=>c(m)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/editB1.jsx",lineNumber:81,columnNumber:17},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/editB1.jsx",lineNumber:80,columnNumber:15},globalThis)}]},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/editB1.jsx",lineNumber:57,columnNumber:7},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/editB1.jsx",lineNumber:56,columnNumber:5},globalThis)},wo=ce(e=>{const{expand:o,...t}=e;return n.jsxDEV(mn,{...t},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:15,columnNumber:10},globalThis)})(({theme:e,expand:o})=>({transform:o?"rotate(0deg)":"rotate(180deg)",marginLeft:"auto"}));s.memo(s.forwardRef(({children:e,title:o},t)=>{const[l,r]=s.useState(!1),u=s.useCallback(()=>{r(c=>!c)},[]);s.useImperativeHandle(t,()=>({handleExpandClick:u}),[u]);const h=ce(Nn)(({theme:c})=>({"& .MuiCardHeader-title":{color:"#1976d2",fontSize:"small",fontWeight:"500",padding:0},padding:5}));return n.jsxDEV(pn,{marginBottom:1,bgcolor:"aliceblue",borderRadius:"0.5rem",boxShadow:"0px 5px 5px -3px rgba(0, 0, 0, 0.06), 0px 0px 0px 1px rgba(0, 0, 0, 0.042), 0px 3px 14px 2px rgba(0, 0, 0, 0.036)",children:[n.jsxDEV(h,{title:n.jsxDEV(se,{direction:"row",justifyContent:"flex-start",children:[n.jsxDEV(se,{alignItems:"center",direction:"row",justifyContent:"flex-start",children:[n.jsxDEV(wo,{expand:l,onClick:u,"aria-label":"show more",children:n.jsxDEV(bn,{children:"expand_more"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:58,columnNumber:19},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:57,columnNumber:17},globalThis),n.jsxDEV("h6",{onClick:u,style:{color:"#4872b5",cursor:"pointer"},children:o},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:60,columnNumber:17},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:56,columnNumber:15},globalThis),n.jsxDEV(se,{alignItems:"center",direction:"row",justifyContent:"flex-start"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:64,columnNumber:15},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:55,columnNumber:13},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:53,columnNumber:9},globalThis),n.jsxDEV(rn,{in:l,timeout:"auto",children:e},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:68,columnNumber:9},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:47,columnNumber:7},globalThis)}));function yo({Id:e,disabled:o}){const[t,l]=s.useState({}),[r,u]=s.useState([]),[h,c]=s.useState({}),[p,d]=s.useState({}),[m,v]=s.useState(!1);function j(f){return["Khác","ghi theo KW","Ghi rõ theo m2"].includes(f.Name)}const S=(f,x,a)=>{c(D=>{var y;const g={...D};return g[f]={...g[f]||{},[x]:!((y=g[f])!=null&&y[x])},g})},N=s.useCallback(f=>{G(`HNCN_PhieuB1_ThongTinVeHoGiaDinh?$filter=PhieuB1_Id eq (${f})&$expand=DM_ThongTinVeHoGiaDinh,HNCN_PhieuB1_ThongTinVeHoGiaDinh_GhiRo`,"GET",null,{odata:!0}).then(({value:x})=>{x.forEach(a=>{c(D=>{var y;const g={...D};return g[a.DM_ThongTinVeHoGiaDinh.NhomThongTinVeHoGiaDinh_Id]={...g[a.DM_ThongTinVeHoGiaDinh.NhomThongTinVeHoGiaDinh_Id]||{},[a.ThongTinVeHoGiaDinh_Id]:!((y=g[a.DM_ThongTinVeHoGiaDinh.NhomThongTinVeHoGiaDinh_Id])!=null&&y[a.ThongTinVeHoGiaDinh_Id])},g}),d(D=>{var g;return{...D,[`${a.DM_ThongTinVeHoGiaDinh.NhomThongTinVeHoGiaDinh_Id}-${a.ThongTinVeHoGiaDinh_Id}`]:(g=a.HNCN_PhieuB1_ThongTinVeHoGiaDinh_GhiRo[0])==null?void 0:g.GhiRo}})})}).catch(()=>{})},[]),T=s.useCallback(f=>{c({}),N(f)},[N]),E=s.useCallback(()=>{if(m){_e("Cập nhật thông tin hộ gia đình","").then(f=>{f.isConfirmed&&G(`PhieuB1Ext/Add_B1_ThongTinHoGiaDinh?PhieuB1_Id=${e}`,"POST",JSON.stringify(t),{odata:!1}).then(({value:x})=>{fe("Cập nhật thành công","Thông báo"),v(a=>!a)}).catch(()=>{Ne("Cập nhật thất bại","Thông báo")})});return}v(f=>!f)},[e,t,m]);s.useEffect(()=>{const x=r.map(a=>{const D={};return D[a.Id]=a.DM_ThongTinVeHoGiaDinh.map((g,y)=>{var C,b;return{Id:g.Id,Name:g.Name,isChecked:((C=h[a.Id])==null?void 0:C[g.Id])||!1,Value:j(g)?p[`${a.Id}-${g.Id}`]:((b=h[a.Id])==null?void 0:b[g.Id])||!1}}),D}).flatMap(a=>Object.values(a)[0]).filter(a=>a.isChecked).map(a=>({ThongTinHoGD_Id:a.Id,IsGhiRo:!!j(a),GhiRo:j(a)&&a.Value?a.Value:""}));l(x)},[h,r,p]);const R=s.useCallback(()=>{G("DM_NhomThongTinVeHoGiaDinh?$expand=DM_ThongTinVeHoGiaDinh","GET",null,{odata:!0}).then(({value:f})=>{u(f)}).catch(()=>{this.setState({isSkeleton:!1})})},[]),q=f=>{const x=Math.ceil(f.length/2+2),a=f.slice(0,x),D=f.slice(x),g=(y,C)=>y.map((b,B)=>(console.log(b),n.jsxDEV(n.Fragment,{children:[n.jsxDEV("tr",{children:[n.jsxDEV("td",{style:{width:"90%",color:"#4872b5",fontWeight:"bold"},children:[Ve(C+B+1),".",b.Name]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:213,columnNumber:17},this),n.jsxDEV("td",{style:{width:"10%"}},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:216,columnNumber:17},this)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:212,columnNumber:15},this),b.DM_ThongTinVeHoGiaDinh.map((L,P)=>{var H,I;return n.jsxDEV("tr",{children:[j(L)?(H=h[b.Id])!=null&&H[L.Id]?n.jsxDEV("td",{style:{padding:1},children:n.jsxDEV(en,{value:p[`${b.Id}-${L.Id}`]||"",onChange:X=>d(z=>({...z,[`${b.Id}-${L.Id}`]:X.target.value})),placeholder:L.Name},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:235,columnNumber:25},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:234,columnNumber:23},this):n.jsxDEV("td",{style:{width:"90%"},children:L.Name},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:247,columnNumber:23},this):n.jsxDEV("td",{style:{width:"90%"},children:L.Name},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:250,columnNumber:21},this),n.jsxDEV("td",{style:{width:"10%",textAlign:"center"},children:n.jsxDEV(be,{name:b.Name,value:b.Name,label:"",checked:((I=h[b.Id])==null?void 0:I[L.Id])||!1,onChange:()=>m&&S(b.Id,L.Id)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:253,columnNumber:21},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:252,columnNumber:19},this)]},P,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:231,columnNumber:17},this)})]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:211,columnNumber:13},this)));return n.jsxDEV(n.Fragment,{children:[n.jsxDEV("td",{style:{width:"50%"},children:n.jsxDEV(ee,{bordered:!0,children:n.jsxDEV("tbody",{children:g(a,0)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:273,columnNumber:13},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:272,columnNumber:11},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:271,columnNumber:9},this),n.jsxDEV("td",{children:n.jsxDEV(ee,{bordered:!0,children:n.jsxDEV("tbody",{children:g(D,x)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:278,columnNumber:13},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:277,columnNumber:11},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:276,columnNumber:9},this)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:270,columnNumber:7},this)};return s.useEffect(()=>{R(),N(e)},[e,R,N]),n.jsxDEV(n.Fragment,{children:e&&n.jsxDEV($,{container:!0,children:[!o&&n.jsxDEV($,{container:!0,paddingY:1,paddingBottom:2,lg:12,md:12,justifyContent:"flex-end",children:[m&&n.jsxDEV($,{paddingX:1,children:n.jsxDEV(J,{style:{background:"none",color:"#657383",fontWeight:400,outline:"none",border:"none"},className:"ms-auto d-flex align-items-center gap-2",onClick:()=>{v(!1),T(e)},children:[n.jsxDEV(Y,{style:{marginTop:"0.2rem"},fa:"arrow-left"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:306,columnNumber:21},this),"Quay lại"]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:298,columnNumber:19},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:297,columnNumber:17},this),n.jsxDEV($,{children:n.jsxDEV(J,{style:{background:m?"linear-gradient(-20deg, #00cdac 0%, #8ddad5 100%)":"linear-gradient(90deg, rgba(38,206,255,1) 0%, rgba(0,154,170,1) 100%)"},className:"ms-auto fw-bold d-flex align-items-center gap-2",onClick:()=>{E()},children:[n.jsxDEV(Y,{style:{marginTop:"0.2rem"},fa:"pencil-square-o"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:323,columnNumber:19},this),m?"Lưu dữ liệu":"Cập nhật"]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:312,columnNumber:17},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:311,columnNumber:15},this)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:295,columnNumber:13},this),n.jsxDEV($,{container:!0,lg:12,md:12,children:n.jsxDEV(ee,{children:n.jsxDEV("tbody",{children:q(r)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:331,columnNumber:15},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:330,columnNumber:13},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:329,columnNumber:11},this)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:293,columnNumber:9},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThongTinHoGD/index.jsx",lineNumber:291,columnNumber:5},this)}const Ze=[{title:"Id",field:"Id",hidden:"true",dataID:!0,table:!0,notEdit:!0},{title:"Họ và Tên",field:"HNCN_CongDan.HoVaTen",table:!0},{tabName:"Thành viên (Chọn từ danh sách công dân)",ratio:1,hidden:!0},{title:"Công dân",field:"ThanhVien_Id",type:"danh-sach-cong-dan",required:!0},{tabName:"Thông tin chung",ratio:4,hidden:!0},{title:"Quan hệ với chủ hộ",field:"QuanHeVoiChuHo_Id",type:"data-select",required:!0,table:!0,dataSelect:{url:"DM_QuanHeVoiChuHo",value_field:"Id",text_field:"Name",placeholder:"Chọn Quan hệ với chủ hộ"}},{field:"QuanHeVoiChuHo_Id",hidden:!0,table:!0},{title:"Ngày/Tháng/Năm Sinh",field:"HNCN_CongDan.NgaySinh",table:!0,render:e=>{var o,t,l;return`${((o=e==null?void 0:e.HNCN_CongDan)==null?void 0:o.NgaySinh)||"??"}/${((t=e==null?void 0:e.HNCN_CongDan)==null?void 0:t.ThangSinh)||"??"}/${((l=e==null?void 0:e.HNCN_CongDan)==null?void 0:l.NamSinh)||"????"}`}},{title:"Ngày/Tháng/Năm Sinh",field:"HNCN_CongDan.ThangSinh",table:!0,hidden:!0},{title:"Ngày/Tháng/Năm Sinh",field:"HNCN_CongDan.NamSinh",table:!0,hidden:!0},{title:"Số CCCD/CMND",field:"HNCN_CongDan.SoCCCD",table:!0},{title:"Dân tộc",field:"HNCN_CongDan.DM_DanToc.Name",table:!0},{title:"Chiều cao (cm)",field:"ChieuCao",type:"number",table:!0},{title:"Cân nặng (kg)",field:"CanNang",type:"number",table:!0},{title:"Tình trạng đi học",field:"TinhTrangDiHoc_Id",type:"data-select",dataSelect:{url:"DM_TinhTrangDiHoc",value_field:"Id",text_field:"Name",placeholder:"Chọn Tình trạng đi học"}},{title:"Cấp học",field:"CapHoc_Id",type:"data-select",dataSelect:{url:"DM_CapHoc",value_field:"Id",text_field:"Name",placeholder:"Chọn Cấp học"}},{title:"Trình độ văn hóa",field:"TrinhDoVanHoa_Id",type:"data-select",dataSelect:{url:"DM_TrinhDoVanHoa",value_field:"Id",text_field:"Name",placeholder:"Chọn Trình độ văn hóa"}},{title:"Trình độ đào tạo",field:"TrinhDoDaoTao_Id",type:"data-select",dataSelect:{url:"DM_TrinhDoDaoTao",value_field:"Id",text_field:"Name",placeholder:"Chọn Trình độ đào tạo"}},{title:"Bảo hiểm y tế",field:"BaoHiemYTe_Id",type:"data-select",table:!0,dataSelect:{url:"DM_BaoHiemYTe",value_field:"Id",text_field:"Name",placeholder:"Chọn Bảo hiểm y tế"}},{title:"Sử dụng Internet",field:"SuDungInternet_Id",table:!0,type:"data-select",dataSelect:{url:"DM_SuDungInternet",value_field:"Id",text_field:"Name",placeholder:"Chọn Sử dụng Internet"}},{title:"Đang hưởng trợ cấp XH",field:"DangHuongTroCapXH_Id",type:"data-select",table:!0,dataSelect:{url:"DM_HuongTroCap",value_field:"Id",text_field:"Name",placeholder:"Chọn Đang hưởng trợ cấp XH"}},{title:"Loại việc làm",field:"LoaiViecLam_Id",type:"data-select",table:!0,dataSelect:{url:"DM_LoaiViecLam",value_field:"Id",text_field:"Name",placeholder:"Chọn Loại việc làm"}},{title:"Việc làm",field:"ViecLam_Id",type:"data-select",table:!0,dataSelect:{url:"DM_ViecLam",value_field:"Id",text_field:"Name",placeholder:"Chọn Việc làm"}},{title:"Việc làm công ăn lương",field:"ViecLamCongAnLuong_Id",type:"data-select",table:!0,dataSelect:{url:"DM_ViecLamCongAnLuong",value_field:"Id",text_field:"Name",placeholder:"Chọn Việc làm công ăn lương"}},{title:"Hưởng lương hưu",field:"HuongLuongHuu_Id",type:"data-select",table:!0,dataSelect:{url:"DM_HuongLuongHuu",value_field:"Id",text_field:"Name",placeholder:"Chọn Hưởng lương hưu"}},{title:"Người bị bệnh hiểm nghèo",field:"BenhHiemNgheo_Id",type:"data-select",dataSelect:{url:"DM_BenhHiemNgheo",value_field:"Id",text_field:"Name",placeholder:"Chọn Bệnh hiểm nghèo"}}],So=({Id:e,disabled:o})=>{const[t,l]=s.useState(null),r=s.useRef(),u=s.useMemo(()=>{let h=[...Ze],c=h.findIndex(d=>d.field==="QuanHeVoiChuHo_Id"),p=h.findIndex(d=>d.field==="ThanhVien_Id");return h[c].disabled=(t==null?void 0:t.QuanHeVoiChuHo_Id)===1,h[c].dataSelect.where=(t==null?void 0:t.QuanHeVoiChuHo_Id)===1?"":"Id ne 1",h[p].disabled=(t==null?void 0:t.QuanHeVoiChuHo_Id)===1,h},[t==null?void 0:t.QuanHeVoiChuHo_Id]);return n.jsxDEV(n.Fragment,{children:e&&n.jsxDEV(n.Fragment,{children:[n.jsxDEV(oi,{ref:r,url:"HNCN_PhieuB1_ThongTinVeThanhVien",where:`PhieuB1_Id eq ${e}`,addValue:{PhieuB1_Id:e},columns:Ze,isAdd:!o,isDelete:!o,isEdit:!o,onEdit:h=>l(h)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThanhVien/index.jsx",lineNumber:24,columnNumber:11},globalThis),(t==null?void 0:t.Id)&&n.jsxDEV(n.Fragment,{children:n.jsxDEV(nn,{columns:u,open:t==null?void 0:t.Id,close:()=>l(null),afterSaving:()=>{var h;r!=null&&r.current&&((h=r==null?void 0:r.current)==null||h.reloadTable())},Id:t==null?void 0:t.Id,url:"HNCN_PhieuB1_ThongTinVeThanhVien"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThanhVien/index.jsx",lineNumber:37,columnNumber:15},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThanhVien/index.jsx",lineNumber:36,columnNumber:13},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThanhVien/index.jsx",lineNumber:23,columnNumber:9},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ThanhVien/index.jsx",lineNumber:21,columnNumber:5},globalThis)},Ro=ce(e=>{const{expand:o,...t}=e;return n.jsxDEV(mn,{...t},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:15,columnNumber:10},globalThis)})(({theme:e,expand:o})=>({transform:o?"rotate(0deg)":"rotate(180deg)",marginLeft:"auto"}));s.memo(s.forwardRef(({children:e,title:o},t)=>{const[l,r]=s.useState(!1),u=s.useCallback(()=>{r(c=>!c)},[]);s.useImperativeHandle(t,()=>({handleExpandClick:u}),[u]);const h=ce(Nn)(({theme:c})=>({"& .MuiCardHeader-title":{color:"#1976d2",fontSize:"small",fontWeight:"500",padding:0},padding:5}));return n.jsxDEV(pn,{marginBottom:1,bgcolor:"aliceblue",borderRadius:"0.5rem",boxShadow:"0px 5px 5px -3px rgba(0, 0, 0, 0.06), 0px 0px 0px 1px rgba(0, 0, 0, 0.042), 0px 3px 14px 2px rgba(0, 0, 0, 0.036)",children:[n.jsxDEV(h,{title:n.jsxDEV(se,{direction:"row",justifyContent:"flex-start",children:[n.jsxDEV(se,{alignItems:"center",direction:"row",justifyContent:"flex-start",children:[n.jsxDEV(Ro,{expand:l,onClick:u,"aria-label":"show more",children:n.jsxDEV(bn,{children:"expand_more"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:58,columnNumber:19},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:57,columnNumber:17},globalThis),n.jsxDEV("h6",{onClick:u,style:{color:"#4872b5",cursor:"pointer"},children:o},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:60,columnNumber:17},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:56,columnNumber:15},globalThis),n.jsxDEV(se,{alignItems:"center",direction:"row",justifyContent:"flex-start"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:64,columnNumber:15},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:55,columnNumber:13},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:53,columnNumber:9},globalThis),n.jsxDEV(rn,{in:l,timeout:"auto",children:e},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:68,columnNumber:9},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:47,columnNumber:7},globalThis)}));function Eo({Id:e,disabled:o}){const[t,l]=s.useState({}),[r,u]=s.useState([]),[h,c]=s.useState({}),[p,d]=s.useState({}),[m,v]=s.useState(!1);function j(f){return["Khác","ghi theo KW","Nguyên nhân khác (Ghi rõ)"].includes(f.Name)}const S=f=>{c(x=>{var D,g;const a={...x};return a[f]={...((D=a[f])==null?void 0:D[f])||{},[f]:!((g=a[f])!=null&&g[f])},a})},N=s.useCallback(f=>{G(`HNCN_PhieuB1_NguyenNhanNgheo?$filter=PhieuB1_Id eq (${f})&$expand=DM_NguyenNhanNgheo`,"GET",null,{odata:!0}).then(({value:x})=>{x.forEach(a=>{c(D=>{const g={...D};return g[a.DM_NguyenNhanNgheo.Id]={...g[a.DM_NguyenNhanNgheo.Id]||{},[a.DM_NguyenNhanNgheo.Id]:!g[a.DM_NguyenNhanNgheo.Id]},g}),d(D=>({...D,[`${a.NguyenNhan_Id}-${a.NguyenNhan_Id}`]:a==null?void 0:a.GhiRo}))})}).catch(()=>{})},[]),T=s.useCallback(f=>{c({}),N(f)},[N]),E=s.useCallback(()=>{if(m){_e("Cập nhật thông tin hộ gia đình","").then(f=>{f.isConfirmed&&G(`PhieuB1Ext/Add_B1_NguyenNhanNgheo?PhieuB1_Id=${e}`,"POST",JSON.stringify(t),{odata:!1}).then(({value:x})=>{fe("Cập nhật thành công","Thông báo"),v(a=>!a)}).catch(()=>{Ne("Cập nhật thất bại","Thông báo")})});return}v(f=>!f)},[e,t,m]);s.useEffect(()=>{const x=r.map(a=>{var g,y;const D={};return D[a.Id]={Id:a.Id,Name:a.Name,isChecked:((g=h[a.Id])==null?void 0:g[a.Id])||!1,Value:j(a)?p[`${a.Id}-${a.Id}`]:((y=h[a.Id])==null?void 0:y[a.Id])||!1},D}).flatMap(a=>Object.values(a)[0]).filter(a=>a.isChecked).map(a=>({NguyenNhanNgheo_Id:a.Id,IsGhiRo:!!j(a),GhiRo:j(a)&&a.Value?a.Value:""}));l(x)},[h,r,p]);const R=s.useCallback(()=>{G("DM_NguyenNhanNgheo","GET",null,{odata:!0}).then(({value:f})=>{u(f)}).catch(()=>{this.setState({isSkeleton:!1})})},[]),q=s.useCallback(f=>{const x=Math.ceil(f.length/2),a=f.slice(0,x),D=f.slice(x),g=(y,C)=>y.map((b,B)=>{var L,P;return n.jsxDEV(n.Fragment,{children:n.jsxDEV("tr",{children:[j(b)?(L=h[b.Id])!=null&&L[b.Id]?n.jsxDEV("td",{style:{padding:1},children:n.jsxDEV(en,{value:p[`${b.Id}-${b.Id}`]||"",onChange:H=>d(I=>({...I,[`${b.Id}-${b.Id}`]:H.target.value})),placeholder:""},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:207,columnNumber:21},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:206,columnNumber:19},this):n.jsxDEV("td",{style:{width:"90%"},children:[Ve(C+B+1),".",b.Name]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:219,columnNumber:19},this):n.jsxDEV("td",{style:{width:"90%"},children:[Ve(C+B+1),".",b.Name]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:224,columnNumber:17},this),n.jsxDEV("td",{style:{width:"10%"},children:n.jsxDEV(be,{name:b.Name,value:b.Name,label:"",checked:((P=h[b.Id])==null?void 0:P[b.Id])||!1,onChange:()=>m&&S(b.Id)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:229,columnNumber:17},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:228,columnNumber:15},this)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:203,columnNumber:13},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:202,columnNumber:11},this)});return n.jsxDEV(n.Fragment,{children:[n.jsxDEV("td",{style:{width:"50%"},children:n.jsxDEV(ee,{bordered:!0,children:n.jsxDEV("tbody",{children:g(a,0)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:246,columnNumber:15},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:245,columnNumber:13},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:244,columnNumber:11},this),n.jsxDEV("td",{children:n.jsxDEV(ee,{bordered:!0,children:n.jsxDEV("tbody",{children:g(D,x)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:251,columnNumber:15},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:250,columnNumber:13},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:249,columnNumber:11},this)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:243,columnNumber:9},this)},[h,m,p]);return s.useEffect(()=>{R(),N(e)},[e,R,N]),n.jsxDEV(n.Fragment,{children:e&&n.jsxDEV($,{container:!0,children:[!o&&n.jsxDEV($,{container:!0,paddingY:1,paddingBottom:2,lg:12,md:12,justifyContent:"flex-end",children:[m&&n.jsxDEV($,{paddingX:1,children:n.jsxDEV(J,{style:{background:"none",color:"#657383",fontWeight:400,outline:"none",border:"none"},className:"ms-auto d-flex align-items-center gap-2",onClick:()=>{v(!1),T(e)},children:[n.jsxDEV(Y,{style:{marginTop:"0.2rem"},fa:"arrow-left"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:282,columnNumber:21},this),"Quay lại"]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:273,columnNumber:19},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:272,columnNumber:17},this),n.jsxDEV($,{paddingX:1,children:n.jsxDEV(J,{style:{background:m?"linear-gradient(-20deg, #00cdac 0%, #8ddad5 100%)":"linear-gradient(90deg, rgba(38,206,255,1) 0%, rgba(0,154,170,1) 100%)"},className:"ms-auto fw-bold d-flex align-items-center gap-2",onClick:()=>{E()},children:[n.jsxDEV(Y,{style:{marginTop:"0.2rem"},fa:"pencil-square-o"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:299,columnNumber:19},this),m?"Lưu dữ liệu":"Cập nhật"]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:288,columnNumber:17},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:287,columnNumber:15},this)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:270,columnNumber:13},this),n.jsxDEV($,{container:!0,lg:12,md:12,children:n.jsxDEV(ee,{children:n.jsxDEV("tbody",{children:q(r)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:307,columnNumber:15},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:306,columnNumber:13},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:305,columnNumber:11},this)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:268,columnNumber:9},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/NguyenNhanNgheo/index.jsx",lineNumber:266,columnNumber:5},this)}const Vo=({Id:e,disabled:o,data:t})=>{var r;const l=s.useRef();return n.jsxDEV(n.Fragment,{children:n.jsxDEV(jo,{title:!1,apiGetData:`PhieuB1Ext/GetPhieuB1?Id=${e}`,Id:e,ref:l,columns:bo,children:[{position:"top",component:o?!1:n.jsxDEV(n.Fragment,{children:n.jsxDEV(ko,{Id:e,reload:(r=l==null?void 0:l.current)==null?void 0:r.loadData},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/B1.jsx",lineNumber:26,columnNumber:17},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/B1.jsx",lineNumber:25,columnNumber:15},globalThis)},{title:"Thông tin hộ gia đình",component:n.jsxDEV(n.Fragment,{children:n.jsxDEV(yo,{Id:e,disabled:o},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/B1.jsx",lineNumber:36,columnNumber:17},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/B1.jsx",lineNumber:35,columnNumber:15},globalThis)},{title:"Nguyên nhân nghèo",hidden:![1,2].includes(t.PhanLoaiGiaDinh_Id),component:n.jsxDEV(n.Fragment,{children:n.jsxDEV(Eo,{Id:e,disabled:o},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/B1.jsx",lineNumber:45,columnNumber:17},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/B1.jsx",lineNumber:44,columnNumber:15},globalThis)},{title:"Danh sách thành viên",component:n.jsxDEV(n.Fragment,{children:n.jsxDEV(So,{Id:e,disabled:o},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/B1.jsx",lineNumber:53,columnNumber:17},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/B1.jsx",lineNumber:52,columnNumber:15},globalThis)}]},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/B1.jsx",lineNumber:14,columnNumber:7},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/B1.jsx",lineNumber:13,columnNumber:5},globalThis)};function Lo({Id:e,disabled:o}){const[t,l]=s.useState({}),[r,u]=s.useState([]),[h,c]=s.useState({}),[p,d]=s.useState({}),[m,v]=s.useState(!1),[j,S]=s.useState(0);function N(a){return["Khác","ghi theo KW","Ghi rõ theo m2"].includes(a.Name)}const T=(a,D,g)=>{c(y=>{var b;const C={...y};return C[a]={...C[a]||{},[D]:!((b=C[a])!=null&&b[D])},C})},E=s.useCallback(a=>{G(`HNCN_PhieuB1?$filter=Id eq (${a})&$expand=HNCN_PhieuB2_ChiTieuNhuCauXaHoiCoBan/DM_ChiTieuNhuCauXaHoiCoBan`,"GET",null,{odata:!0}).then(({value:D})=>{D.forEach(g=>{S(g.HNCN_PhieuB2_ChiTieuNhuCauXaHoiCoBan.length*10),g.HNCN_PhieuB2_ChiTieuNhuCauXaHoiCoBan.forEach(y=>{c(C=>{var B;const b={...C};return b[y.DM_ChiTieuNhuCauXaHoiCoBan.Parent_Id]={...b[y.DM_ChiTieuNhuCauXaHoiCoBan.Parent_Id]||{},[y.DM_ChiTieuNhuCauXaHoiCoBan.Id]:!((B=b[y.DM_ChiTieuNhuCauXaHoiCoBan.Parent_Id])!=null&&B[y.DM_ChiTieuNhuCauXaHoiCoBan.Id])},b})})})}).catch(()=>{})},[]),R=s.useCallback(a=>{G(`HNCN_PhieuB1?$filter=Id eq (${a})&$expand=HNCN_PhieuB2_ChiTieuNhuCauXaHoiCoBan/DM_ChiTieuNhuCauXaHoiCoBan`,"GET",null,{odata:!0}).then(({value:D})=>{D.forEach(g=>{S(g.HNCN_PhieuB2_ChiTieuNhuCauXaHoiCoBan.length*10)})}).catch(()=>{})},[]),q=s.useCallback(()=>{if(m){_e("Cập nhật chỉ tiêu nhu cầu của hộ gia đình!","").then(a=>{a.isConfirmed&&G(`Add_B2_ChiTieuNhuCauCoBan?PhieuB1_Id=${e}`,"POST",JSON.stringify(t),{odata:!1}).then(({value:D})=>{fe("Cập nhật thành công","Thông báo"),v(g=>!g),R(e)}).catch(()=>{Ne("Cập nhật thất bại","Thông báo")})});return}v(a=>!a)},[e,t,R,m]);s.useEffect(()=>{const D=r.map(g=>{const y={};return y[g.Id]=g.DM_ChiTieuNhuCauXaHoiCoBan.map(C=>{var b,B;return{Id:C.Id,Name:C.Name,isChecked:((b=h[g.Id])==null?void 0:b[C.Id])||!1,Value:N(C)?p[`${g.Id}-${C.Id}`]:((B=h[g.Id])==null?void 0:B[C.Id])||!1}}),y}).flatMap(g=>Object.values(g)[0]).filter(g=>g.isChecked).map(g=>({ChiTieuNhuCau_Id:g.Id}));l(D)},[h,r,p]);const f=s.useCallback(()=>{G("DM_NhomChiTieuNhuCauXaHoiCoBan?$expand=DM_ChiTieuNhuCauXaHoiCoBan","GET",null,{odata:!0}).then(({value:a})=>{u(a)}).catch(()=>{this.setState({isSkeleton:!1})})},[]),x=a=>{const D=(g,y)=>g.map((C,b)=>n.jsxDEV(n.Fragment,{children:[n.jsxDEV("tr",{children:[n.jsxDEV("td",{style:{width:"5%",color:"#4872b5",fontWeight:"bold",textAlign:"center"},children:b+1},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:151,columnNumber:13},this),n.jsxDEV("td",{style:{color:"#4872b5",fontWeight:"bold"},children:C.Name},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:152,columnNumber:13},this),n.jsxDEV("td",{},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:153,columnNumber:13},this)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:150,columnNumber:11},this),C.DM_ChiTieuNhuCauXaHoiCoBan.map((B,L)=>{var P;return n.jsxDEV("tr",{children:[n.jsxDEV("td",{style:{width:"5%",textAlign:"center"},children:[b+1,".",L+1]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:157,columnNumber:15},this),n.jsxDEV("td",{style:{width:"85%"},children:B.Name},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:160,columnNumber:15},this),n.jsxDEV("td",{style:{width:"10%",textAlign:"center"},children:n.jsxDEV(be,{name:C.Name,value:C.Name,label:"",checked:((P=h[C.Id])==null?void 0:P[B.Id])||!1,onChange:()=>m&&T(C.Id,B.Id)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:162,columnNumber:17},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:161,columnNumber:15},this)]},L,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:156,columnNumber:13},this)})]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:149,columnNumber:9},this));return n.jsxDEV(n.Fragment,{children:n.jsxDEV("td",{children:n.jsxDEV(ee,{bordered:!0,children:[n.jsxDEV("thead",{children:n.jsxDEV("tr",{children:[n.jsxDEV("th",{style:{textAlign:"center",fontSize:14,fontWeight:"bold"},children:"STT"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:182,columnNumber:17},this),n.jsxDEV("th",{style:{fontSize:14,fontWeight:"bold"},children:"CHỈ TIÊU"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:183,columnNumber:17},this),n.jsxDEV("th",{style:{fontSize:14,fontWeight:"bold"},children:"TRẢ LỜI"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:184,columnNumber:17},this)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:181,columnNumber:15},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:180,columnNumber:13},this),n.jsxDEV("tbody",{children:n.jsxDEV(n.Fragment,{children:[D(r),n.jsxDEV("tr",{children:[n.jsxDEV("td",{style:{width:"5%",color:"#4872b5",fontWeight:"bold",textAlign:"center"}},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:191,columnNumber:19},this),n.jsxDEV("td",{style:{color:"#4872b5",fontWeight:"bold"},children:"Tổng điểm"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:192,columnNumber:19},this),n.jsxDEV("td",{style:{color:"#4872b5",textAlign:"center"},children:j},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:193,columnNumber:19},this)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:190,columnNumber:17},this)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:188,columnNumber:15},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:187,columnNumber:13},this)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:179,columnNumber:11},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:178,columnNumber:9},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:177,columnNumber:7},this)};return s.useEffect(()=>{f(),E(e)},[e,f,E]),n.jsxDEV(n.Fragment,{children:e&&n.jsxDEV($,{container:!0,children:n.jsxDEV($,{justifyContent:"center",container:!0,lg:12,md:12,children:n.jsxDEV(ee,{style:{width:"900px"},children:[n.jsxDEV("p",{style:{fontWeight:"bold",fontSize:16},children:"Mẫu số 3.2. Phiếu B2 - Thông tin hộ gia đình về các chỉ tiêu nhu cầu xã hội cơ bản"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:214,columnNumber:15},this),!o&&n.jsxDEV($,{container:!0,paddingY:1,paddingBottom:2,lg:12,md:12,justifyContent:"flex-end",children:[m&&n.jsxDEV($,{container:!0,lg:2,md:2,children:n.jsxDEV(J,{style:{background:"none",color:"#657383",fontWeight:400,outline:"none",border:"none"},className:"ms-auto d-flex align-items-center gap-2",onClick:()=>{v(!1),f()},children:[n.jsxDEV(Y,{style:{marginTop:"0.2rem"},fa:"arrow-left"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:229,columnNumber:25},this),"Quay lại"]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:221,columnNumber:23},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:220,columnNumber:21},this),n.jsxDEV($,{paddingX:1,children:n.jsxDEV(J,{style:{background:m?"linear-gradient(-20deg, #00cdac 0%, #8ddad5 100%)":"linear-gradient(90deg, rgba(38,206,255,1) 0%, rgba(0,154,170,1) 100%)"},className:"ms-auto fw-bold d-flex align-items-center gap-2",onClick:()=>{q()},children:[n.jsxDEV(Y,{style:{marginTop:"0.2rem"},fa:"pencil-square-o"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:246,columnNumber:23},this),m?"Lưu dữ liệu":"Cập nhật"]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:235,columnNumber:21},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:234,columnNumber:19},this)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:218,columnNumber:17},this),n.jsxDEV("tbody",{children:x()},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:252,columnNumber:15},this)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:213,columnNumber:13},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:212,columnNumber:11},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:211,columnNumber:9},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/ChiTieuNhuCau/index.jsx",lineNumber:209,columnNumber:5},this)}const Bo=({Id:e,disabled:o})=>n.jsxDEV($,{paddingX:4,paddingY:2,children:n.jsxDEV(Lo,{Id:e,disabled:o},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/B2.jsx",lineNumber:7,columnNumber:7},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/B2.jsx",lineNumber:6,columnNumber:5},globalThis),Po=(e,o,t)=>o.length===0?e:e.map(l=>{const r={...l};return r[`DM_DacTrungHo_${t}`]=r[`DM_DacTrungHo_${t}`].map(u=>{const h=o.find(c=>c[`DacTrungHo_${t}_Id`]===u.Id);return h?{...u,Diem:h.Diem}:u}),r}),_o=({Id:e,url:o,disabled:t})=>{const[l,r]=s.useState([]),[u,h]=s.useState([]),[c,p]=s.useState({listInit:[],open:!1});let d=`DacTrungHo_${o}_Id`;const m=s.useCallback(()=>{o&&G(`DM_NhomDacTrungHo_${o}?$expand=DM_DacTrungHo_${o}`).then(N=>{r(N.value),e&&G(`HNCN_PhieuB1_DacTrungHo_${o}?$filter=PhieuB1_Id eq ${e}`).then(T=>{h(T.value),p({listInit:T.value,open:!1})})})},[e,o]);s.useEffect(()=>{m()},[m]);const v=N=>{h(T=>T.filter(E=>E[d]!==N))},j=(N,T)=>{let E=u.find(R=>R[d]===N);!E&&T!==!1&&h(R=>[...R,{[d]:N,Diem:T}]),E&&T===!1&&v(N),E&&T!==!1&&h(R=>[...R.filter(q=>q[d]!==N),{[d]:N,Diem:T}])},S=()=>{G(`PhieuB1Ext/Add_B1_DacTrungHo?PhieuB1_Id=${e}&IsThanhThi=${o==="ThanhThi"}`,"POST",JSON.stringify(u.map(N=>({DacTrungHo_Id:N[d],Diem:N.Diem}))),{odata:!1}).then(N=>{fe(N),m()}).catch(N=>{Ne(N)})};return n.jsxDEV(n.Fragment,{children:n.jsxDEV("div",{className:"p-5 d-flex justify-content-center",children:n.jsxDEV("div",{style:{maxWidth:"900px"},children:[!t&&n.jsxDEV("div",{className:"d-flex justify-content-end gap-3 align-items-center",children:[(c==null?void 0:c.open)&&n.jsxDEV(J,{style:{all:"unset",cursor:"pointer"},className:"ms-auto d-flex gap-2",onClick:()=>{p(N=>({...N,open:!1})),h(c==null?void 0:c.listInit)},children:[n.jsxDEV(Y,{style:{marginTop:"0.2rem"},fa:"arrow-left"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:79,columnNumber:19},globalThis),"Quay lại"]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:71,columnNumber:17},globalThis),n.jsxDEV(J,{style:{background:c!=null&&c.open?"linear-gradient(-20deg, #00cdac 0%, #8ddad5 100%)":"linear-gradient(90deg, rgba(38,206,255,1) 0%, rgba(0,154,170,1) 100%)"},className:"fw-bold d-flex align-items-center gap-2",onClick:()=>{if(c.open){S();return}p(N=>({...N,open:!0}))},children:[n.jsxDEV(Y,{style:{marginTop:"0.2rem"},fa:"pencil-square-o"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:98,columnNumber:17},globalThis),c!=null&&c.open?"Lưu dữ liệu":"Cập nhật"]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:83,columnNumber:15},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:69,columnNumber:13},globalThis),Po(l,u,o).map((N,T)=>n.jsxDEV(n.Fragment,{children:n.jsxDEV(qo,{data:N,i:T+1,url:o,onChange:(E,R)=>j(E,R),isEdit:c==null?void 0:c.open,removeItem:v},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:106,columnNumber:17},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:105,columnNumber:15},globalThis))]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:67,columnNumber:9},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:66,columnNumber:7},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:65,columnNumber:5},globalThis)},qo=({data:e,i:o,url:t,onChange:l,isEdit:r,removeItem:u})=>{const h=(c,p)=>{e[`DM_DacTrungHo_${t}`].find(d=>d.Diem||d.Diem===0)&&u(e[`DM_DacTrungHo_${t}`].find(d=>d.Diem||d.Diem===0).Id),l(c,p)};return n.jsxDEV(n.Fragment,{children:[n.jsxDEV("h6",{className:"mt-4 mb-3",style:{color:"#0057b7"},children:[o,". ",e==null?void 0:e.Name]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:135,columnNumber:7},globalThis),n.jsxDEV(ee,{bordered:!0,children:[n.jsxDEV("thead",{children:n.jsxDEV("tr",{children:[n.jsxDEV("th",{style:{textAlign:"center",fontSize:14,fontWeight:"bold"},children:"STT"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:141,columnNumber:13},globalThis),n.jsxDEV("th",{style:{fontSize:14,fontWeight:"bold",textAlign:"center"},children:"TÊN ĐẶC TRUNG"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:142,columnNumber:13},globalThis),n.jsxDEV("th",{style:{fontSize:14,fontWeight:"bold",textAlign:"center"},children:"MỨC ĐIỂM"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:143,columnNumber:13},globalThis),n.jsxDEV("th",{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:144,columnNumber:13},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:140,columnNumber:11},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:139,columnNumber:9},globalThis),n.jsxDEV("tbody",{children:n.jsxDEV(n.Fragment,{children:e[`DM_DacTrungHo_${t}`].map((c,p)=>n.jsxDEV(n.Fragment,{children:n.jsxDEV(Ho,{data:c,stt:`${o}.${p+1}`,onChange:(d,m)=>h(d,m),isEdit:r},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:152,columnNumber:19},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:151,columnNumber:17},globalThis))},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:148,columnNumber:11},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:147,columnNumber:9},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:138,columnNumber:7},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:134,columnNumber:5},globalThis)},Ho=({data:e,stt:o,onChange:t,isEdit:l})=>n.jsxDEV(n.Fragment,{children:n.jsxDEV("tr",{children:[n.jsxDEV("td",{style:{width:"5%",textAlign:"center"},children:o},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:172,columnNumber:9},globalThis),n.jsxDEV("td",{children:e==null?void 0:e.Name},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:173,columnNumber:9},globalThis),n.jsxDEV("td",{className:"fw-bold text-center",style:{width:"10rem"},children:e==null?void 0:e.MucDiem},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:174,columnNumber:9},globalThis),n.jsxDEV("td",{className:"text-center",style:{width:"10rem"},children:n.jsxDEV(be,{onChange:r=>{l&&t(e==null?void 0:e.Id,r&&(e==null?void 0:e.MucDiem))},checked:!!(e!=null&&e.Diem)||(e==null?void 0:e.Diem)===0},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:178,columnNumber:11},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:177,columnNumber:9},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:171,columnNumber:7},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Phieu34or37.jsx",lineNumber:170,columnNumber:5},globalThis),it=({open:e,close:o,Id:t,disabled:l})=>{const[r,u]=s.useState({table:null,title:""}),[h,c]=s.useState({});return s.useEffect(()=>{t&&G(`HNCN_PhieuB1(${t})?$expand=DM_KhuVuc`).then(p=>{var m;c(p);let d=(m=p==null?void 0:p.DM_KhuVuc)==null?void 0:m.Code.split(" ");u({table:d[0],title:d[1]})})},[t]),n.jsxDEV(n.Fragment,{children:n.jsxDEV(_n,{open:e,onClose:o,children:[n.jsxDEV("div",{style:{display:"flex",position:"fixed",background:"linear-gradient(90deg, rgba(0,78,122,1) 0%, rgba(0,142,222,1) 100%)",height:"3.5rem",top:0,right:0,zIndex:1500,left:0,alignItems:"center",justifyContent:"space-between",padding:"0 2rem",boxShadow:"rgba(0, 0, 0, 0.24) 0px 3px 8px"},children:[n.jsxDEV("div",{className:"d-flex",children:n.jsxDEV("h5",{className:"mb-0 fw-bold text-white",children:n.jsxDEV("strong",{children:"THÔNG TIN CHI TIẾT"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Detail.jsx",lineNumber:43,columnNumber:15},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Detail.jsx",lineNumber:42,columnNumber:13},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Detail.jsx",lineNumber:41,columnNumber:11},globalThis),n.jsxDEV(J,{onClick:o,style:{boxShadow:"none"},className:"btn-close"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Detail.jsx",lineNumber:46,columnNumber:11},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Detail.jsx",lineNumber:25,columnNumber:9},globalThis),n.jsxDEV("div",{style:{marginTop:"3.5rem"},children:n.jsxDEV(qn,{data:[{TabName:"Phiếu B1",TabContent:n.jsxDEV(n.Fragment,{children:n.jsxDEV(Vo,{Id:t,disabled:l,data:h},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Detail.jsx",lineNumber:55,columnNumber:21},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Detail.jsx",lineNumber:54,columnNumber:19},globalThis)},{TabName:"Phiếu B2",TabContent:n.jsxDEV(n.Fragment,{children:n.jsxDEV(Bo,{Id:t,disabled:l},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Detail.jsx",lineNumber:63,columnNumber:21},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Detail.jsx",lineNumber:62,columnNumber:19},globalThis)},{TabName:`Phiếu ${r.title}`,TabContent:n.jsxDEV(n.Fragment,{children:n.jsxDEV(_o,{Id:t,url:r.table,disabled:l},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Detail.jsx",lineNumber:71,columnNumber:21},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Detail.jsx",lineNumber:70,columnNumber:19},globalThis)}]},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Detail.jsx",lineNumber:49,columnNumber:11},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Detail.jsx",lineNumber:48,columnNumber:9},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Detail.jsx",lineNumber:24,columnNumber:7},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DuLieuRaSot/PhieuB1/Detail/Detail.jsx",lineNumber:23,columnNumber:5},globalThis)};export{it as D,jo as F,Co as M,xo as c,nt as l};