????
Current Path : C:/inetpub/vhost/xaydung.gdtsolutions.vn/build/static/js/ |
Current File : C:/inetpub/vhost/xaydung.gdtsolutions.vn/build/static/js/5918.f9135db2.chunk.js |
"use strict";(self.webpackChunk_qlxd_frontend=self.webpackChunk_qlxd_frontend||[]).push([[5918],{6455:(e,n,t)=>{t.d(n,{A:()=>f});var a=t(82210),l=t(71516),o=t(60803),r=t(34211),s=t(24021),i=t(46881),d=t(57136),u=t(35065),c=t(14658),p=t(27662),g=t(6058);const h=e=>new Date(e).getTime(),m=(e,n)=>n.findIndex((n=>((e,n)=>{const t=h(e.TuNgay)>=h(n.TuNgay)&&h(e.TuNgay)<=h(n.DenNgay),a=h(e.DenNgay)>=h(n.TuNgay)&&h(e.DenNgay)<=h(n.DenNgay);return t||a})(e,n)));function f(e){let{open:n,onCancel:t,lstDotLuong:h,onReloadTable:f,dotLuong:x}=e;const[y,v]=(0,a.useState)(null),[C,b]=(0,a.useState)(null),[D,j]=(0,a.useState)(null),[A,N]=(0,a.useState)([]),[S,w]=(0,a.useState)((new Date).getFullYear()),T=()=>{v(null),b(null),j(null)},R=(0,a.useCallback)((e=>{const n=h.filter((n=>n.Id!==e.Id));N(n)}),[h]);(0,a.useEffect)((()=>{n&&(x?(v(x.Dot),b(x.TuNgay),j(x.DenNgay),R(x)):(N(h),T()))}),[x,h,n,R]);const I=(0,a.useCallback)((e=>{const n=e.target.value;v(+n<0?"":n)}),[]);return(0,g.jsx)("div",{className:"index-tao-dot-luong",children:(0,g.jsxs)(l.A,{onClose:t,"aria-labelledby":"simple-dialog-title",open:n,disableBackdropClick:!0,disableEscapeKeyDown:!0,maxWidth:"sm",children:[(0,g.jsx)(o.A,{style:{padding:"5px 24px",border:"1px solid #ccc"},id:"simple-dialog-title",children:x?"C\u1eadp nh\u1eadt \u0111\u1ee3t l\u01b0\u01a1ng":"T\u1ea1o m\u1edbi \u0111\u1ee3t l\u01b0\u01a1ng"}),(0,g.jsxs)(r.A,{children:[(0,g.jsxs)("div",{style:{paddingBottom:"5px",minWidth:"250px"},children:[(0,g.jsxs)("div",{className:"d-flex align-items-center justify-content-between",children:[(0,g.jsx)("span",{children:"\u0110\u1ee3t:"})," ",(0,g.jsx)("span",{style:{fontSize:10,color:"red"},children:"Vui l\xf2ng kh\xf4ng nh\u1eadp s\u1ed1 \xe2m"})]}),(0,g.jsx)(s.A,{min:"0",type:"number",name:"tenDotLuong",id:"tenDotLuong",placeholder:"Nh\u1eadp \u0111\u1ee3t l\u01b0\u01a1ng...",value:y,onChange:e=>I(e)})]}),(0,g.jsxs)("div",{style:{paddingBottom:"5px"},children:[(0,g.jsx)("span",{children:"N\u0103m:"}),(0,g.jsx)(p.A,{value:S,onChange:e=>(e=>{w(e),b(null),j(null)})(e.value)})]}),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("div",{style:{paddingBottom:"5px"},children:[(0,g.jsx)("span",{children:"T\u1eeb ng\xe0y:"}),(0,g.jsx)(d.A,{value:C,onChange:e=>{b(e)},placeholder:"Ch\u1ecdn th\u1eddi gian",name:"tuNgay",minDate:new Date(`${S}/1/1`),maxDate:new Date(`${S}/12/31`)})]}),(0,g.jsxs)("div",{style:{paddingBottom:"5px"},children:[(0,g.jsx)("span",{children:"\u0110\u1ebfn ng\xe0y:"}),(0,g.jsx)(d.A,{value:D,onChange:e=>{j(e)},placeholder:"Ch\u1ecdn th\u1eddi gian",name:"denNgay",minDate:new Date(`${S}/1/1`),maxDate:new Date(`${S}/12/31`)})]})]}),(0,g.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",paddingTop:"10px"},children:[(0,g.jsx)(i.A,{style:{marginRight:10},color:"primary",onClick:()=>{const e=A.findIndex((e=>e.Dot===+y&&new Date(e.TuNgay).getFullYear()===new Date(C).getFullYear())),n=m({TuNgay:C,DenNgay:D},A);if(-1!==e)return(0,u.AB)("\u0110\u1ee3t \u0111\xe3 b\u1ecb tr\xf9ng, vui l\xf2ng ki\u1ec3m tra l\u1ea1i!");if(-1!==n)return(0,u.AB)("\u0110\xe3 b\u1ecb tr\xf9ng th\u1eddi gian v\u1edbi \u0111\u1ee3t kh\xe1c. Vui l\xf2ng ch\u1ecdn l\u1ea1i th\u1eddi gian!");if(C>D)return(0,u.AB)("Th\u1eddi gian \u0111\xe3 ch\u1ecdn ch\u01b0a \u0111\xfang \u0111\xfang, vui l\xf2ng th\u1eed l\u1ea1i!");const a={Dot:+y,TuNgay:C,DenNgay:D,Nam:+S};x?c.hU.edit(x.Id,a).then((()=>{(0,u.nw)("C\u1eadp nh\u1eadt \u0111\u1ee3t l\u01b0\u01a1ng th\xe0nh c\xf4ng!"),f(),t()})):c.hU.add(a).then((()=>{(0,u.nw)("T\u1ea1o \u0111\u1ee3t l\u01b0\u01a1ng th\xe0nh c\xf4ng!"),f(),t()}))},children:"X\xe1c nh\u1eadn"}),(0,g.jsx)(i.A,{onClick:()=>{T(),t()},children:"H\u1ee7y"})]})]})]})})}},19541:(e,n,t)=>{t.r(n),t.d(n,{default:()=>d});var a=t(82210),l=t(68940),o=t(14658),r=t(6455),s=t(6058);const i=[{title:"Id",field:"Id",type:"numeric",dataID:!0,editable:"never",hidden:!0},{title:"\u0110\u1ee3t l\u01b0\u01a1ng th\u1ee9",field:"Dot",type:"numeric",cellStyle:{textAlign:"center"},defaultSort:"asc",sortMulti:"asc"},{title:"N\u0103m",field:"Nam",type:"numeric",cellStyle:{textAlign:"center"},defaultSort:"asc",sortMulti:"asc"},{title:"T\u1eeb ng\xe0y",field:"TuNgay",type:"date"},{title:"\u0110\u1ebfn ng\xe0y",field:"DenNgay",type:"date"}];function d(){const e=(0,a.useRef)(),n=(0,a.useCallback)((()=>e.current&&e.current.onQueryChange()),[]),t=[];t.push("Status eq true");const[d,u]=(0,a.useState)(!1),[c,p]=(0,a.useState)([]),[g,h]=(0,a.useState)([]),m=(0,a.useCallback)((()=>{o.hU.getAll("?$select=Id,TuNgay,DenNgay,Dot").then((e=>{let{value:n}=e;p(n)}))}),[]),f=e=>{u(!0),h(e)};return(0,a.useEffect)((()=>{m()}),[m]),(0,s.jsxs)("div",{children:[(0,s.jsx)(l.A,{tableRef:e,title:"Danh m\u1ee5c \u0111\u1ee3t l\u01b0\u01a1ng",url:"GDTCores/DotLuongs",columns:i,where:t,selectType:"withColumns",onAdd:{onClick:()=>{f()}},onEdit:{onClick:(e,n)=>{f(n)}},onDelete:{},search:!1}),(0,s.jsx)(r.A,{open:d,onCancel:()=>u(!1),onReloadTable:n,lstDotLuong:c,dotLuong:g})]})}},27662:(e,n,t)=>{t.d(n,{A:()=>s});var a=t(82210),l=t(48895),o=t(6058);class r extends a.Component{render(){const{value:e,onChange:n}=this.props,t=(()=>{const e=(new Date).getFullYear();let n=[];for(var t=e-3;t<=e+3;t++)n.push({value:t,label:`N\u0103m ${t}`});return n})(),a=e||"";return(0,o.jsx)(l.A,{value:a,onChange:n,options:t,valueRef:"value",labelRef:"label",placeholder:"Ch\u1ecdn n\u0103m"})}}r.defaultProps={placeholder:"Ch\u1ecdn..."};const s=r},40370:(e,n,t)=>{var a;t.d(n,{A:()=>c});var l=new Uint8Array(16);function o(){if(!a&&!(a="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!==typeof msCrypto&&"function"===typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return a(l)}const r=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const s=function(e){return"string"===typeof e&&r.test(e)};for(var i=[],d=0;d<256;++d)i.push((d+256).toString(16).substr(1));const u=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=(i[e[n+0]]+i[e[n+1]]+i[e[n+2]]+i[e[n+3]]+"-"+i[e[n+4]]+i[e[n+5]]+"-"+i[e[n+6]]+i[e[n+7]]+"-"+i[e[n+8]]+i[e[n+9]]+"-"+i[e[n+10]]+i[e[n+11]]+i[e[n+12]]+i[e[n+13]]+i[e[n+14]]+i[e[n+15]]).toLowerCase();if(!s(t))throw TypeError("Stringified UUID is invalid");return t};const c=function(e,n,t){var a=(e=e||{}).random||(e.rng||o)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,n){t=t||0;for(var l=0;l<16;++l)n[t+l]=a[l];return n}return u(a)}},48895:(e,n,t)=>{t.d(n,{A:()=>s});var a=t(82210),l=t(61316),o=t(6058);class r extends a.Component{render(){const{name:e,disabled:n,options:t,placeholder:a,onChange:r,valueRef:s,labelRef:i,value:d,onMenuScrollToBottom:u,isLoading:c,onInputChange:p,onMenuOpen:g,onMenuClose:h,isClearable:m,menuPlacement:f}=this.props,x=(y=t)&&y.map((e=>(e.value=e[s],e.label=e[i],e)));var y;const v=null===d||""===d?null:x.filter((e=>e.value===d));return(0,o.jsx)(l.A,{menuPlacement:f,isDisabled:n,className:"basic-single",name:e,value:v,defaultValue:v,isClearable:m,isSearchable:!0,options:x,placeholder:a,onChange:(e,n)=>r(e,n),onMenuScrollToBottom:u,isLoading:c,onInputChange:p,onMenuOpen:g,onMenuClose:h})}}r.defaultProps={placeholder:"Ch\u1ecdn..."};const s=r},60803:(e,n,t)=>{t.d(n,{A:()=>u});var a=t(30226),l=t(35007),o=t(82210),r=t(30628),s=t(86953),i=t(36467),d=o.forwardRef((function(e,n){var t=e.children,s=e.classes,d=e.className,u=e.disableTypography,c=void 0!==u&&u,p=(0,l.A)(e,["children","classes","className","disableTypography"]);return o.createElement("div",(0,a.A)({className:(0,r.A)(s.root,d),ref:n},p),c?t:o.createElement(i.A,{component:"h2",variant:"h6"},t))}));const u=(0,s.A)({root:{margin:0,padding:"16px 24px",flex:"0 0 auto"}},{name:"MuiDialogTitle"})(d)},61316:(e,n,t)=>{t.d(n,{A:()=>x});var a=t(82210),l=t(29083),o=t(98991),r=t(5774),s=t(6058);const i=e=>(0,s.jsx)("div",{className:"spinner-border-sm spinner-border text-danger"}),d={multiValueLabel:e=>({...e,padding:"0px 0px 0px 6px",fontSize:13}),menuPortal:e=>({...e,zIndex:9999}),control:e=>({...e,backgroundColor:"white",minHeight:"38px",fontSize:"0.76563rem",lineHeight:"1.5",cursor:"pointer",borderRadius:"0.2rem"}),menu:e=>({...e,zIndex:2300}),option:e=>({...e,fontSize:"0.76563rem",cursor:"pointer"}),input:e=>({...e,position:"unset"}),placeholder:e=>({...e,marginLeft:5,marginRight:5}),singleValue:(e,n)=>{let{data:t}=n;return{...e,marginTop:1,transform:"inherit",top:"unset"}},container:e=>({...e,width:"100%"}),valueContainer:e=>({...e,padding:"2px 8px"})},u=e=>(0,s.jsx)(i,{...e}),c=e=>(0,s.jsx)(l.F.IndicatorsContainer,{...e,getStyles:()=>({display:"flex",height:"100%"})}),p=e=>{const{innerProps:{ref:n,...t}}=e;return(0,s.jsx)("div",{...t,ref:n,style:{color:"rgb(204, 204, 204)",transition:"color 150ms ease 0s",boxSizing:"border-box"},children:(0,s.jsx)(r.A,{fa:"times",style:{marginTop:2,padding:"5px 5px 5px 5px",verticalAlign:"bottom"}})})},g=e=>{let{innerProps:n}=e;return(0,s.jsx)("span",{...n,style:{alignSelf:"stretch",width:1,backgroundColor:"rgb(204, 204, 204)",marginTop:2,marginBottom:2,marginRight:5,marginLeft:5}})},h=e=>(0,s.jsx)(l.F.DropdownIndicator,{...e,getStyles:()=>({color:"hsl(0,0%,80%)"}),children:(0,s.jsx)(r.A,{fa:"angle-down",style:{marginTop:2,padding:"5px 9px 5px 5px"}})}),m=e=>(0,s.jsx)(l.F.MenuList,{...e,getStyles:()=>({maxHeight:300,zIndex:1021,overflowY:"auto"}),children:e.children});class f extends a.Component{constructor(e){super(e),this.state={valueRequire:null},this.RefReactSelect=a.createRef()}render(){const{placeholder:e,noOptionsMessage:n,loadingMessage:t,required:l,isDisabled:r,menuPlacement:i,...f}=this.props,{valueRequire:x}=this.state;return(0,s.jsxs)(a.Fragment,{children:[(0,s.jsx)(o.Ay,{...f,ref:this.RefReactSelect,classNamePrefix:"select",styles:d,placeholder:e,noOptionsMessage:n,loadingMessage:t,isDisabled:r,components:{IndicatorsContainer:c,ClearIndicator:p,IndicatorSeparator:g,DropdownIndicator:h,LoadingIndicator:u,MenuList:m},onChange:e=>{this.props.onChange(e),this.setState({valueRequire:e?e.name:null})},menuPortalTarget:document.body,menuPosition:"absolute",menuPlacement:i||"auto"}),(0,s.jsx)("input",{readOnly:!0,name:"requireInput",type:"text",tabIndex:1,autoComplete:"off",style:{opacity:0,height:0,position:"absolute"},value:x||"",onFocus:()=>{this.RefReactSelect.current&&this.RefReactSelect.current.focus()}})]})}}f.defaultProps={placeholder:"Ch\u1ecdn...",isDisabled:!1,noOptionsMessage:()=>"Kh\xf4ng c\xf3 l\u1ef1a ch\u1ecdn",loadingMessage:()=>"\u0110ang t\u1ea3i"};const x=f},78188:(e,n,t)=>{function a(e){return e&&e.ownerDocument||document}t.d(n,{A:()=>a})},78794:(e,n,t)=>{function a(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return n.reduce((function(e,n){return null==n?e:function(){for(var t=arguments.length,a=new Array(t),l=0;l<t;l++)a[l]=arguments[l];e.apply(this,a),n.apply(this,a)}}),(function(){}))}t.d(n,{A:()=>a})}}]); //# sourceMappingURL=5918.f9135db2.chunk.js.map