????

Your IP : 3.148.229.54


Current Path : C:/inetpub/vhost/lantha.gdtsolutions.vn/wwwtest/wwwroot/static/js/
Upload File :
Current File : C:/inetpub/vhost/lantha.gdtsolutions.vn/wwwtest/wwwroot/static/js/5276.e8b1c475.chunk.js

"use strict";(self.webpackChunkgdt=self.webpackChunkgdt||[]).push([[5276],{428:(e,t,n)=>{n.d(t,{A5:()=>h,G5:()=>a,Is:()=>f,UI:()=>s,V$:()=>p,Yv:()=>r,Z5:()=>c,e9:()=>u,gn:()=>o,jB:()=>d,xz:()=>g});n(67116);const a=e=>e.filter((e=>e.dataID))[0],s=e=>a(e).field,o=e=>e&&e.includes("."),i=e=>e.split(".").join("/"),l=(e,t)=>e?t.field:t,r=(e,t,n)=>{const s=a(t);return`${e}(${"guid"===s.type?"guid":""}'${n[s.field]}')`},d=function(e,t,n){return arguments.length>3&&void 0!==arguments[3]&&arguments[3]?`substringof('${n}', ${e})`:`${e} eq ${((e,t)=>"string"===e?`'${t}'`:"datetime"===e?`datetime'${t}'`:"guid"===e?`guid'${t}'`:`${t}`)(t,n)}`},h=(e,t)=>{if(e.filters&&e.filters.length>0){const t=e.filters.filter((e=>e.column.field&&e.column.type)).map((e=>{const t=`${o(e.column.field)?e.column.dataRef?e.column.dataRef[0]:i(e.column.field):e.column.field}`;return d(t,e.column.type,e.value)}));return t&&t.join(" and ")}if(e.search&&e.search.length>=1){const n=t.filter((e=>e.searchable&&e.field&&e.type)).map((t=>{const n=`${o(t.field)?i(t.field):t.field}`;return d(n,t.type,e.search,!0)}));return n&&n.join(" or ")}return""},c=(e,t)=>`$top=${t}&$skip=${e*t}&$inlinecount=allpages`,p=(e,t)=>`&$orderby=${o(e)?i(e):e} ${t}`,u=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e.filter((e=>o(l(t,e))));return 0===n.length?"":`&$expand=${function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=[];return e.forEach(((e,a)=>{let s=l(t,e).split(".").reverse().splice(1).reverse().join("/");0===a?n.push(s):n.some((e=>e===s))||n.push(s)})),n.join(",")}(n,t)}`},f=function(e){const t=function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t?"withColumns"===t?`${e.reduce(((e,t,a,s)=>{let r=l(n,t),d=`${e}`;return o(r)?d+=`${void 0===t.dataRef?"":t.dataRef[0]+","}${i(r)}`:d+=`${r}`,`${d}${a===s.length-1?"":","}`}),"")}`:"":`${e.filter((e=>o(e.field))).reduce(((e,t)=>`${e},${i(l(n,t))}`),"*")}`}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"withColumns",!(arguments.length>2&&void 0!==arguments[2])||arguments[2]);return t?`&$select=${t}`:""},g=function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"withColumns";return`${u(e,n)}${f(e,a,n)}${t?"&$filter="+t:""}`}},9031:(e,t,n)=>{n.d(t,{A:()=>h});n(9950);var a=n(71984),s=n(48738),o=n.n(s),i=n(44414);const l=e=>{const{fa:t,far:n,fab:a,size:s,ariaHidden:l,color:r,style:d}=e,h=a?"fab":n?"far":"fa",c=o()(h,"fa-"+t,"fa-fw",s&&"fa-"+s);return(0,i.jsx)("i",{style:r?{color:r,...d}:d,className:c,"aria-hidden":l})};l.defaultProps={ariaHidden:!0,far:!1,fab:!1};const r=l,d=e=>{const{children:t,...n}=e;return(0,i.jsxs)(a.A,{color:"danger",...n,children:[(0,i.jsx)(r,{fa:"trash"})," ",t]})};d.defaultProps={};const h=d},10077:(e,t,n)=>{n.d(t,{A:()=>x});var a=n(9950),s=n(15255);const o={body:{emptyDataSourceMessage:"Kh\xf4ng c\xf3 d\u1eef li\u1ec7u \u0111\u1ec3 hi\u1ec3n th\u1ecb",addTooltip:"Th\xeam",editTooltip:"S\u1eeda",deleteTooltip:"X\xf3a",editRow:{deleteText:"B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn x\xf3a d\xf2ng n\xe0y kh\xf4ng?",cancelTooltip:"H\u1ee7y",saveTooltip:"L\u01b0u"}},toolbar:{exportTitle:"Xu\u1ea5t file",searchTooltip:"T\xecm ki\u1ebfm",showColumnsTitle:"Hi\u1ec7n c\u1ed9t",addRemoveColumns:"Th\xeam v\xe0 hi\u1ec3n th\u1ecb c\xe1c c\u1ed9t",searchPlaceholder:"T\xecm ki\u1ebfm"},pagination:{labelRowsPerPage:"S\u1ed1 d\xf2ng cho 1 trang",labelRowsSelect:"d\xf2ng",labelDisplayedRows:" {from}-{to} c\u1ee7a {count}",firstTooltip:"Trang \u0111\u1ea7u ti\xean",previousTooltip:"Trang tr\u01b0\u1edbc",nextTooltip:"Trang sau",lastTooltip:"Trang cu\u1ed1i c\xf9ng"},header:{actions:"Thao t\xe1c"}};var i=n(44414);const l=a.lazy((()=>Promise.all([n.e(9818),n.e(8185),n.e(3130),n.e(783),n.e(7930),n.e(7608),n.e(7476),n.e(484),n.e(7925),n.e(5060),n.e(2026),n.e(8190),n.e(537),n.e(1105)]).then(n.bind(n,38671)))),r=a.lazy((()=>Promise.all([n.e(9818),n.e(3130),n.e(783),n.e(7930),n.e(5060),n.e(5897)]).then(n.bind(n,46350)))),d=a.lazy((()=>Promise.all([n.e(9818),n.e(3435)]).then(n.bind(n,33435)))),h={color:"#000",padding:"2px",fontSize:"12px",fontWeight:"bold",textAlign:"center",backgroundColor:"powderblue",borderLeft:"0.5px solid rgb(224, 224, 224)",zIndex:99},c={even:"#FFF",odd:"rgb(247, 248, 255)"},p={fontSize:"12px",borderLeft:"0.5px solid rgba(224, 224, 224, 1)"};class u extends a.Component{render(){const{addMoreRows:e,pageSize:t,search:n,CustumToolbar:a,CustumCell:s,SearchAdvanced:c,onRowClick:u,dataCount:f,rowStyle:g,rowsPerPage:m,page:x,...C}=this.props;return(0,i.jsx)(l,{...C,addMoreRows:e,localization:o,options:{exportButton:!1,search:n,actionsColumnIndex:-1,pageSize:t,headerStyle:h,rowStyle:g},onRowClick:void 0===u?void 0:(e,t)=>u(e,t),components:(()=>{let e={Toolbar:e=>(0,i.jsx)(r,{...e,SearchAdvanced:c}),Cell:e=>(0,i.jsx)(d,{...e,style:p})};return a&&(e.Toolbar=a),s&&(e.Cell=s),e})()})}}u.defaultProps={rowStyle:(e,t,n)=>({backgroundColor:t%2===0?c.even:c.odd}),pageSize:10,search:!0};var f=n(428),g=n(4370),m=n(67116);class x extends a.Component{render(){const{tableRef:e,url:t,title:n,columns:a,pageSize:o,detailPanel:l,where:r,search:d,selectType:h,rowStyle:c,onAdd:p,onEdit:x,onDelete:C,onActions:A,onRowClick:j,SearchAdvanced:v,CustumToolbar:b,CustumCell:T,urlExt:k,unRefresDatatable:w,notCreateUUID:$,messageCustomDetele:y}=this.props,N=e=>a.filter((e=>f.gn(e.field)&&e.dataRef)).map((e=>({column:e,field_split:e.field.split(".")}))).forEach((t=>{delete e[t.field_split[0]]})),S=e=>{let t=a.filter((e=>e.dataCheck));for(var n=0;n<t.length;n++)if(f.gn(t[n].field)&&t[n].dataRef){if(null===e[t[n].dataRef[0]]||void 0===e[t[n].dataRef[0]]||""===e[t[n].field])return(0,m.AB)("Vui l\xf2ng nh\u1eadp d\u1eef li\u1ec7u c\u1ed9t "+t[n].title),!1}else if(void 0===e[t[n].field]||null===e[t[n].field]||""===e[t[n].field])return(0,m.AB)("Vui l\xf2ng nh\u1eadp d\u1eef li\u1ec7u c\u1ed9t "+t[n].title),!1;return!0};return(0,i.jsx)(u,{search:d,pageSize:o,title:n,columns:a,tableRef:e,SearchAdvanced:v,CustumToolbar:b,CustumCell:T,data:e=>k?(0,g.g3)((e=>`${k}${r?"?"+r:"&"}skip=${e.page*e.pageSize}&take=${e.pageSize}`)(e),"GET",null,!1).then((t=>({data:void 0===t.value?[]:t.value,page:e.page,totalCount:Number(t.count)}))):(0,g.g3)((e=>{let n=`${t}?${f.Z5(e.page,e.pageSize)}`;n+=`${f.e9(a)}${f.Is(a,h)}`,e.orderBy&&void 0!==e.orderBy&&e.orderDirection&&""!==e.orderDirection&&(n+=f.V$(e.orderBy.field,e.orderDirection));let s=f.A5(e,a);return n+=s?r?`&$filter=(${s}) and ${r}`:`&$filter=${s}`:r?"&$filter="+r:"",n})(e)).then((t=>({data:void 0===t.value?[]:t.value,page:e.page,totalCount:Number(t["odata.count"])}))),rowStyle:c,detailPanel:l,editable:(()=>{let e={};return p&&void 0===p.onClick&&!1===p.disabled&&(void 0===p.onRowAdd?e.onRowAdd=e=>new Promise(((n,o)=>{let i=f.G5(a);i.type&&"numeric"!==i.type&&($?delete e[f.UI(a)]:i.dataIdCustom||(e[f.UI(a)]=(0,s.A)())),N(e),p.defaultValues&&p.defaultValues.forEach((t=>e[t.field]=t.value)),S(e)?(0,g.g3)(`${t}`,"POST",JSON.stringify(e)).then((e=>n(e))).catch((e=>{e.json().then((e=>(0,m.AB)(e.value))),o(e)})).finally((()=>{this.props.updateCountRadioList&&this.props.updateCountRadioList(),this.props.addCallback&&this.props.addCallback()})):o()})).then((e=>this.props.addCallbackWithResponse&&this.props.addCallbackWithResponse(e))).catch((e=>console.log(e))):e.onRowAdd=e=>p.onRowAdd(e)),x&&void 0===x.onClick&&(x.hidden&&("function"===typeof x.hidden?e.onUpdateHidden=e=>x.hidden(e):e.onUpdateHidden=x.hidden),x.disabled&&(e.isEditable=e=>x.disabled(e)),void 0===x.onRowUpdate?e.onRowUpdate=(e,n)=>new Promise(((s,o)=>{N(e),S(e)?(0,g.g3)(f.Yv(t,a,n),"PATCH",JSON.stringify(e)).then((()=>s())).catch((e=>{e.json().then((e=>(0,m.AB)(e.value))),o(e)})).finally((()=>{this.props.updateCountRadioList&&this.props.updateCountRadioList(),this.props.updateCallback&&this.props.updateCallback()})):o()})):e.onRowUpdate=(e,t)=>x.onRowUpdate(e,t)),C&&void 0===C.onClick&&(C.hidden&&("function"===typeof C.hidden?e.onDeleteHidden=e=>C.hidden(e):e.onDeleteHidden=C.hidden),C.disabled&&(e.isDeletable=e=>C.disabled(e)),void 0===C.onRowDelete?e.onRowDelete=e=>new Promise(((n,s)=>(0,g.g3)(f.Yv(t,a,e),"DELETE").then((()=>{C.messageSuccess?n(null,C.messageSuccess):n("X\xf3a d\u1eef li\u1ec7u th\xe0nh c\xf4ng !")})).catch((e=>{y?(0,m.a3)(y,"Th\xf4ng b\xe1o"):(0,m.a3)("X\xf3a d\u1eef li\u1ec7u kh\xf4ng th\xe0nh c\xf4ng !"),C.messageError?s(e,C.messageError):s("X\xf3a d\u1eef li\u1ec7u th\u1ea5t b\u1ea1i !")})).finally((()=>{this.props.updateCountRadioList&&this.props.updateCountRadioList(),this.props.deleteCallback&&this.props.deleteCallback()})))):e.onRowDelete=e=>C.onRowDelete(e)),e})(),actions:(()=>{let e=[];return A&&A.map((t=>e.push(t))),p&&p.onClick&&(p.icon="add_box",p.tooltip="Th\xeam",p.isAdd=!0,p.isFreeAction=!0,e.push(p)),x&&x.onClick&&(x.icon="edit",x.tooltip="S\u1eeda",x.isEdit=!0,e.push(x)),C&&C.onClick&&(C.icon="delete",C.tooltip="X\xf3a",C.isDelete=!0,e.push(C)),e})(),onRowClick:void 0===j?void 0:(e,t)=>j(e,t)})}}x.defaultProps={title:"",columns:[],pageSize:10,search:!0,tableRef:a.createRef()}},13650:(e,t,n)=>{n.d(t,{$n:()=>a.A,UN:()=>l,f8:()=>d,pf:()=>h.A,WB:()=>j.A,DR:()=>p,a2:()=>x,QB:()=>f});var a=n(71984),s=(n(9950),n(73613)),o=n(44414);const i=e=>{const{children:t,...n}=e;return(0,o.jsxs)(a.A,{color:"success",...n,children:[(0,o.jsx)(s.A,{fa:"plus"})," ",t]})};i.defaultProps={};const l=i,r=e=>{const{children:t,...n}=e;return(0,o.jsxs)(a.A,{color:"danger",...n,children:[(0,o.jsx)(s.A,{fa:"times"})," ",t]})};r.defaultProps={};const d=r;var h=n(33322);const c=e=>{const{children:t,...n}=e;return(0,o.jsxs)(a.A,{color:"primary",...n,children:[(0,o.jsx)(s.A,{fa:"pencil"})," ",t]})};c.defaultProps={};const p=c,u=e=>{const{children:t,...n}=e;return(0,o.jsxs)(a.A,{color:"primary",...n,children:[(0,o.jsx)(s.A,{fa:"floppy-o"})," ",t]})};u.defaultProps={};const f=u;const g=(0,n(86006).Ay)(a.A)`
    padding: 2px 6px;
    font-size: 14px;
`,m=e=>{const{children:t,...n}=e;return(0,o.jsx)(g,{...n,children:(0,o.jsx)(s.A,{fa:e.icon})})};m.defaultProps={color:"primary"};const x=m;var C=n(18849);const A=e=>{const{children:t,...n}=e;return(0,o.jsxs)(C.A,{color:"white",...n,style:{border:"1px solid #c7bfbf"},size:"lg",children:[t," ",(0,o.jsx)(s.A,{fa:"arrow-down"})]})};A.defaultProps={};var j=n(9031)},20390:(e,t,n)=>{n.d(t,{A:()=>u});var a=n(9950),s=n(58195),o=n(14113),i=n(99308),l=n(76152),r=n(23931),d=n(55627),h=n(4370),c=n(35414),p=n(44414);class u extends a.Component{constructor(e){super(e),this.loadData=()=>{this.props.open&&this.props.MaTaiKhoan&&(0,h.Pq)(`TaiKhoans?$filter=MaTaiKhoan eq '${this.props.MaTaiKhoan}'`,"GET",null).then((e=>e.value[0])).then((e=>this.setState({data:e})))},this.state={}}componentDidMount(){this.loadData()}componentDidUpdate(e){this.props.MaTaiKhoan!==e.MaTaiKhoan&&this.loadData()}render(){const{data:e}=this.state;return(0,p.jsxs)(s.A,{isOpen:this.props.open,toggle:this.props.handleClose,children:[(0,p.jsx)(o.A,{toggle:this.props.handleClose,children:"Th\xf4ng tin t\xe0i kho\u1ea3n"}),(0,p.jsx)(i.A,{children:this.state.data&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(l.A,{row:!0,children:[(0,p.jsx)(r.A,{xs:"4",paddingbotton:"0.5rem",children:(0,p.jsx)(d.A,{className:"font-weight-bold",children:"T\xe0i kho\u1ea3n:"})}),(0,p.jsx)(r.A,{xs:"8",children:(0,p.jsx)("span",{children:e.MaTaiKhoan})})]}),(0,p.jsxs)(l.A,{row:!0,children:[(0,p.jsx)(r.A,{xs:"4",children:(0,p.jsx)(d.A,{className:"font-weight-bold",children:"T\xean hi\u1ec3n th\u1ecb:"})}),(0,p.jsx)(r.A,{xs:"8",children:(0,p.jsx)("span",{children:e.TenHienThi})})]}),(0,p.jsxs)(l.A,{row:!0,children:[(0,p.jsx)(r.A,{xs:"4",children:(0,p.jsx)(d.A,{className:"font-weight-bold",children:"S\u1eed d\u1ee5ng:"})}),(0,p.jsx)(r.A,{xs:"8",style:{paddingTop:"auto",paddingBottom:"auto"},children:e.TinhTrangHoatDong?(0,p.jsx)(c.A,{color:"success",children:"\u0110ang s\u1eed d\u1ee5ng"}):(0,p.jsx)(c.A,{color:"danger",children:"\u0110\xe3 kh\xf3a"})})]})]})})]})}}},29933:(e,t,n)=>{n.d(t,{A:()=>j});var a=n(9950),s=n(78854),o=n(9330),i=n(44414);const l=a.forwardRef(((e,t)=>(0,i.jsx)(o.A,{direction:"up",ref:t,...e})));function r(e){const{children:t,onClose:n,open:a,className:o}=e;return(0,i.jsx)(s.A,{className:o,fullScreen:!0,open:a,onClose:n,TransitionComponent:l,children:t})}var d=n(69994),h=n(87092),c=n(29312),p=n(81270),u=n(39886),f=n(33322);const g=(0,d.A)((e=>(0,h.A)({appBar:{position:"relative",backgroundColor:"rgb(3,56,99)"},toolbar:{minHeight:40},title:{marginLeft:e.spacing(2),flex:1}})));function m(e){const t=g(),{renderCustom:n,renderButton:a,title:s,onClose:o}=e;return(0,i.jsx)(c.A,{className:t.appBar,children:(0,i.jsxs)(p.A,{className:t.toolbar,variant:"dense",children:[n,(0,i.jsx)(u.A,{variant:"h6",className:t.title,children:s}),a,(0,i.jsx)(f.A,{onClick:o,children:"\u0110\xf3ng"})]})})}var x=n(77766);function C(e){return(0,i.jsx)(x.A,{style:{backgroundColor:"#eee",paddingTop:20,overflow:"unset"},children:e.children})}function A(e){const{renderCustom:t,renderButton:n,children:s,title:o,onClose:l,open:d,className:h}=e;return(0,a.useEffect)((()=>{}),[d]),(0,i.jsxs)(r,{className:h,open:d,onClose:l,children:[(0,i.jsx)(m,{renderCustom:t,renderButton:n,title:o,onClose:l}),(0,i.jsx)(C,{children:s})]})}const j=a.memo(A)},33322:(e,t,n)=>{n.d(t,{A:()=>l});n(9950);var a=n(71984),s=n(73613),o=n(44414);const i=e=>{const{children:t,...n}=e;return(0,o.jsxs)(a.A,{color:"danger",...n,children:[(0,o.jsx)(s.A,{fa:"times-circle"})," ",t]})};i.defaultProps={};const l=i},35414:(e,t,n)=>{n.d(t,{A:()=>i});n(9950);var a=n(1254),s=n(44414);const o=e=>{const{children:t,style:n,...o}=e;return(0,s.jsx)(a.A,{style:{...n,fontSize:12,whiteSpace:"pre-line"},...o,children:t})};o.defaultProps={};const i=o},38611:(e,t,n)=>{n.d(t,{A:()=>m});var a=n(9950),s=n(70349),o=n(23931),i=n(50651),l=n(75490),r=n(76991),d=n(76152),h=n(55627),c=n(85077),p=n(4370),u=n(29933),f=n(16272),g=n(44414);class m extends a.Component{constructor(e){super(e),this.loadData=e=>{e||(e="web"),this.props.ID?(0,p.Pq)(`PhanQuyen/ListChucNang?MaTaiKhoan=${this.props.ID}&FlatForm=${e}`,"GET",null,!1).then((e=>{this.setState({data:e})})):this.setState({data:[]})},this.handleChange=(e,t)=>{this.loadData(t),this.setState({flatForm:t})},this.handleChangeCheck=(e,t)=>{t?(0,p.Pq)("PhanQuyen/ThemChucNang","POST",JSON.stringify({MaTaiKhoan:this.props.ID,ChucNang_Id:e}),!1):(0,p.Pq)("PhanQuyen/XoaChucNang","POST",JSON.stringify({MaTaiKhoan:this.props.ID,ChucNang_Id:e}),!1)},this.state={data:[],flatForm:"web"}}componentDidMount(){this.loadData()}componentDidUpdate(e){this.props.ID!==e.ID&&this.loadData()}render(){let{data:e}=this.state;return(0,g.jsx)(u.A,{open:this.props.open,title:`PH\xc2N QUY\u1ec0N CHO T\xc0I KHO\u1ea2N: ${this.props.TenHienThi}`,onClose:this.props.onClose,children:(0,g.jsxs)("div",{className:"don-vi-detail",children:[(0,g.jsx)(s.A,{children:(0,g.jsx)(o.A,{md:"6",children:(0,g.jsx)(f.A,{data:{field_name:"FlatForm",title:"Flat form",type:"radio-list",required:!0,data:[{label:"web",value:"web"},{label:"mobile",value:"mobile"}]},value:this.state.flatForm,onChange:this.handleChange})})}),e&&e.map(((e,t)=>(0,g.jsxs)("div",{children:[(0,g.jsxs)(i.A,{children:[(0,g.jsx)(l.A,{children:(0,g.jsx)("b",{children:e.TenNhom})}),(0,g.jsxs)(r.A,{children:[e.ListChucNang&&e.ListChucNang.map(((e,t)=>(0,g.jsx)(d.A,{check:!0,children:(0,g.jsxs)(h.A,{check:!0,children:[(0,g.jsx)(c.A,{type:"checkbox",defaultChecked:e.Checked,onChange:t=>this.handleChangeCheck(e.Id,t.target.checked)})," ",e.TenChucNang]})},e.Id))),e.ListNhom&&e.ListNhom.map(((e,t)=>(0,g.jsxs)("div",{children:[(0,g.jsx)("h6",{children:e.TenNhom}),e.ListChucNang&&e.ListChucNang.map(((e,t)=>(0,g.jsx)(d.A,{check:!0,children:(0,g.jsxs)(h.A,{check:!0,children:[(0,g.jsx)(c.A,{type:"checkbox",defaultChecked:e.Checked,onChange:t=>this.handleChangeCheck(e.Id,t.target.checked)})," ",e.TenChucNang]})},e.Id))),(0,g.jsx)("p",{})]},t)))]})]}),(0,g.jsx)("p",{})]},t)))]})})}}},57736:(e,t,n)=>{n.d(t,{A:()=>r});var a=n(9950),s=n(58195),o=n(14113),i=n(99308),l=n(44414);class r extends a.Component{constructor(e){super(e),this.state={}}render(){const{title:e,open:t,handleClose:n,children:a,maxWidth:r}=this.props;return(0,l.jsxs)(s.A,{size:this.props.size,style:{maxWidth:`${this.props.width}`},isOpen:t,toggle:n,zIndex:9999,className:"modal-"+r,children:[(0,l.jsx)(o.A,{toggle:n,children:e}),(0,l.jsx)(i.A,{children:a})]})}}},57780:(e,t,n)=>{n.d(t,{A:()=>i});n(9950);var a=n(35414),s=n(44414);const o=e=>{const{children:t,isCheck:n,...o}=e;return(0,s.jsx)(a.A,{...o,color:n?"success":"danger",children:t})};o.defaultProps={};const i=o},60150:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(9950),s=n(16272),o=n(85907),i=n(13650),l=n(67116),r=n(4370),d=n(44414),h={mat_khau_moi:{field_name:"mat_khau_moi",title:"M\u1eadt kh\u1ea9u m\u1edbi",type:"password",required:!0,width:150},NhapLaiMatKhau:{field_name:"NhapLaiMatKhau",title:"Nh\u1eadp l\u1ea1i m\u1eadt kh\u1ea9u",type:"password",required:!0,width:150}};class c extends a.Component{constructor(e){super(e),this.setStateData=(e,t)=>{var{data:n}=this.state;n[e]=t,this.setState({data:n})},this.handleChange=(e,t)=>{this.setStateData(e,t)},this.save=()=>{let{data:e}=this.state;this.handleValidate()&&(0,r.Pq)("QuanLyTaiKhoan/CapLaiMatKhau","POST",JSON.stringify(e),!1).then((e=>(0,l.nw)("C\u1ea5p m\u1eadt kh\u1ea9u th\xe0nh c\xf4ng").then((()=>{this.props.reloadList(),this.props.handleClose()})))).catch((e=>(0,l.AB)(e,"TH\xd4NG B\xc1O")))},this.handleValidate=e=>{const t=Object.values(h).filter((e=>!0===e.required));let{data:n}=this.state;for(let a=0;a<t.length;a++){const e=t[a];let s=n[e.field_name];if(null===s||""===s||void 0===s||0===s.length)return(0,l.AB)('Vui l\xf2ng nh\u1eadp "'+e.title+'"'),!1}return n.mat_khau_moi===n.NhapLaiMatKhau||((0,l.AB)("Nh\u1eadp m\u1eadt kh\u1ea9u kh\xf4ng kh\u1edbp"),!1)},this.state={data:{ma_tai_khoan:null,mat_khau_moi:null,NhapLaiMatKhau:null}}}componentDidMount(){this.setStateData("ma_tai_khoan",this.props.ID)}render(){let{data:e}=this.state;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(s.A,{data:h.mat_khau_moi,value:e.mat_khau_moi,onChange:this.handleChange}),(0,d.jsx)(s.A,{data:h.NhapLaiMatKhau,value:e.NhapLaiMatKhau,onChange:this.handleChange}),(0,d.jsxs)(o.A,{children:[(0,d.jsx)(i.QB,{onClick:this.save,children:"L\u01b0u"})," ",(0,d.jsx)(i.$n,{onClick:this.props.handleClose,children:"H\u1ee7y"})]})]})}}},69378:(e,t,n)=>{n.d(t,{A:()=>g});var a=n(9950),s=n(70349),o=n(23931),i=n(52308),l=n(8743),r=n(36640),d=n(51445),h=n(52088),c=n(48738),p=n.n(c),u=n(53744),f=n(44414);const g=e=>{const{OnChangeActiveTab:t,className:n,propsActiveTab:c}=e,[g,m]=(0,a.useState)(0);(0,a.useEffect)((()=>{m(c||0)}),[c]),(0,a.useEffect)((()=>{t&&t(g)}),[g]);const x=e=>{g!==e&&m(e)};return(0,f.jsx)("div",{className:e.IsPageSoQuy?"win10-container page-so-quy":"win10-container",children:(0,f.jsxs)(s.A,{className:n,children:[(0,f.jsx)(o.A,{md:"12",children:(0,f.jsx)(i.A,{tabs:!0,children:e.data&&e.data.map(((t,n)=>{let a=t.MaChucNang;const s=u.oC.filter((e=>e.ma_chuc_nang===a));return a?s[0]&&s[0].access&&(0,f.jsx)(l.A,{children:(0,f.jsx)(r.A,{className:p()({active:g===n}),onClick:()=>{x(n),e.onChangeTab&&e.onChangeTab(n)},children:t.TabName})},n):(0,f.jsx)(l.A,{children:(0,f.jsx)(r.A,{className:p()({active:g===n}),onClick:()=>{x(n),e.onChangeTab&&e.onChangeTab(n)},children:t.TabName})},n)}))})}),(0,f.jsx)(o.A,{md:"12",children:(0,f.jsx)(d.A,{activeTab:g,children:e.data&&e.data.map(((e,t)=>(0,f.jsx)(h.A,{tabId:t,children:g===t&&e.TabContent},t)))})})]})})}}}]);