????
Current Path : C:/inetpub/vhost/quypctt.nextform.vn/www/assets/ |
Current File : C:/inetpub/vhost/quypctt.nextform.vn/www/assets/Index-48340f7a.js |
var c=Object.defineProperty;var d=(n,t,e)=>t in n?c(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var s=(n,t,e)=>(d(n,typeof t!="symbol"?t+"":t,e),e);import{r as D,h,l as u,T as i,j as r,x as C,R as m}from"./index-3ac6b886.js";import{D as f}from"./DataTable-4f7de56a.js";import{C as I}from"./CreateDV-7919c476.js";import"./useTheme-cc71593c.js";import"./OdataUtils-69f581ff.js";import"./DialogCustomize-f58e33cd.js";import"./Button-d32d698a.js";import"./utils-1da25c48.js";import"./withStyles-be05542d.js";import"./capitalize-2c2e3657.js";import"./classCallCheck-22a738c0.js";import"./Transition-41b94a89.js";const x=[{field:"ID",dataID:!0,type:"string",hidden:!0},{title:"Mã đơn vị",field:"MaDonVi",type:"string",dataCheck:!0,searchable:!0,defaultSort:"asc"},{title:"Tên đơn vị",field:"TenDonVi",type:"string",dataCheck:!0,searchable:!0},{field:"ParentID",hidden:!0}],a=m.createRef(),o=()=>a.current&&a.current.onQueryChange();class k extends D.Component{constructor(e){super(e);s(this,"onDeleteField",e=>{h(`DonVis('${e.ID}')`,"PATCH",JSON.stringify({ParentID:null})).then(()=>o()).catch(()=>u(`Không thể xóa đơn vị ${e.TenDonVi}`))});this.state={openCreateDV:!1}}render(){const e=[];return e.push(`ParentID eq '${i.IDDonVi}'`),r.jsx("div",{children:r.jsxs("div",{className:"bg-white p-3",children:[r.jsx(f,{tableRef:a,title:"DANH SÁCH ĐƠN VỊ GỬI BÁO CÁO",url:"DonVis",columns:x,where:e.join(" and "),selectType:"withColumns",onAdd:{disabled:!1,onClick:l=>this.setState({openCreateDV:!0,ID:null})},onDelete:{onClick:(l,p)=>C("","Xác nhận xóa!").then(()=>{this.onDeleteField(p)})}}),r.jsx(I,{ID:i.IDDonVi,open:this.state.openCreateDV,onClose:()=>this.setState({openCreateDV:!1}),reloadList:o})]})})}}export{k as default};