1import{aT as P,r as o,l as _,u as K,a as F,j as e,D as Q,a6 as W,S as X,bz as q,I as G,C as J,b as Y,H as a,cM as Z,cN as ee,aL as te,P as I,d0 as ae,a9 as C,gI as M}from"./chunk-BDew4Xcu.js";import{D as se}from"./chunk-DkBnZ076.js";import{L as oe}from"./chunk-B0nrhSWB.js";import{u as O,B as re,a as le}from"./chunk-jcl64Rzl.js";import{i as ie}from"./nlu-mvc-react-BVgdmyC9.js";import{T as ne}from"./chunk-CxSGRwnS.js";import{T as me}from"./chunk-CrtXMpc9.js";import v from"./chunk-CGw2Yn9O.js";import"./chunk-xS6o38-Q.js";import"./chunk-BXXhG8cZ.js";import"./chunk-B60NATuj.js";import"./chunk-B6c8rLjb.js";import"./chunk-DabME7GG.js";import"./chunk-jGy5q3MD.js";import"./chunk-Di_D3Z-A.js";import"./chunk-BeE-84Ji.js";import"./chunk-CIxQO4La.js";const d=P.ExportFile,z=({type:m="create",id:l="",open:h,onClose:p=()=>{},popup:c=!1,disabled:u=!1})=>{var k,i,S;O({tableName:d});let E=re(m);const[L,D]=o.useState("1"),w=(r,T)=>{D(T)},{data:s}=_({queryKey:[d+m+l],queryFn:async()=>{if(l!=0)return Z({tableName:d,id:l})}}),A=s==null?void 0:s.data,b=(((i=(k=s==null?void 0:s.PermissionModel)==null?void 0:k.ObjTrangThai)==null?void 0:i.length)??0)>0||!!((S=s==null?void 0:s.PermissionModel)!=null&&S.LogHistory),f=K(),x=F(f.breakpoints.down("xl")),y=F(f.breakpoints.down("lg")),g=F(f.breakpoints.down("md"));return e.jsxs(Q,{open:h,onClose:(r,T)=>{T!=="backdropClick"&&p()},maxWidth:"lg",fullWidth:!0,scroll:"body",fullScreen:g,BackdropProps:{onClick:r=>{r.stopPropagation()}},children:[e.jsxs(W,{sx:{px:1,pt:.3,pb:0,marginBottom:"5px !important"},children:[e.jsx(X,{direction:y?"column":"row",spacing:2,sx:{mb:"0px !important",padding:"5px"},alignItems:y?"flex-start":"center",justifyContent:"space-between",children:e.jsx(le,{routerLink:q,backLink:`/Admin/${d}`,tableName:d,lastBreadcrumbText:E})}),e.jsx(G,{size:x?"small":"medium","aria-label":"close",onClick:p,sx:{px:0,position:"absolute",fontSize:"small",right:10,top:0,color:r=>r.palette.grey[500]},children:e.jsx(J,{})})]}),e.jsx(Y,{sx:{mb:0,pt:"0px",pl:"5px",pr:"5px",pb:"5px"},dividers:!0,children:A&&b>0?e.jsx(me,{value:L,handleChangeTab:w,typeForm:m,id:l,openPopup:c,disabled:u,tableName:d,Form:e.jsx(v,{type:m,id:l,open:c,onClose:p,popup:c,disabled:u})}):e.jsx(v,{type:m,id:l,open:h,onClose:p,popup:c,disabled:u})})]})};z.propTypes={type:a.oneOf(["create","edit","view"]),onSubmit:a.func,onClose:a.func,open:a.oneOfType([a.bool,a.string]),popup:a.oneOfType([a.bool,a.string]),id:a.oneOfType([a.number,a.string])};o.memo(ne);const n=P.ExportFile,Fe=({type:m="",trangthaidefault:l=null})=>{const{titleTable:h,typeCreate:p,typeEdit:c,typeView:u}=O({tableName:n}),[E,L]=o.useState(()=>{const t=localStorage.getItem(`${n}rowsPerPage`);return t?parseInt(t,10):ee}),[D,w]=o.useState([0]),[s,A]=o.useState(null),b=te(),[f,x]=o.useState(!1),[y,g]=o.useState(!1),[k,i]=o.useState(!1),[S,r]=o.useState("create"),[T,N]=o.useState(0),B=!0,R=Object.entries(P).map(([t,V])=>({Id:t,Name:V})),{data:j,isLoading:U}=ie({tableName:P.AspNetUser,data:{UseCache:!1}}),$=[{field:"Search",label:"Tìm kiếm chÃnh xác (theo cụm từ)",placeHolder:"Má»i bạn nháºp cụm từ",type:"search",isAdvanced:!0,size:{xs:12,sm:6,md:6}},{field:"SearchKey",label:"Tìm kiếm má» rá»ng (theo từ khóa)",placeHolder:"Má»i bạn nháºp từ khóa",type:"search",isAdvanced:!0,size:{xs:12,sm:6,md:6}},{field:"ExportLogTable",label:"Export Table",keyLabel:"Name",keyValue:"Id",placeHolder:"",type:"autocomplete",datas:R??[],loading:B,size:{xs:12,sm:4,md:4}},{field:"SearchUserName",label:"Ngưá»i dùng",keyLabel:"FullName",keyValue:"UserName",placeHolder:"",type:"autocomplete",datas:(j==null?void 0:j.data)??[],loading:U,size:{xs:12,sm:4,md:4}},{field:["FromDataModifiedDate","ToDataModifiedDate"],label:["Ngà y cáºp nháºt data từ","Ngà y cáºp nháºt data Äến"],placeHolder:"",type:"date-range",size:{xs:12,sm:4,md:4}}],H=[{field:"ExportLogId",label:"Export Id"},{field:"ExportLogTable",label:"Export Table"},{field:"FileUrl",label:"FileUrl"},{field:"DataModifiedDate",label:"Ngà y cáºp nháºt data",valueFormat:t=>t&&C(t).format(M)},{field:"TemplateModifiedDate",label:"Ngà y cáºp nháºt Template",valueFormat:t=>t&&C(t).format(M)},{field:"TemplateName",label:"Tên Template"}];return e.jsxs(e.Fragment,{children:[e.jsx(I,{children:e.jsx(oe,{tableName:n})}),e.jsxs(I,{sx:{mt:.5},children:[e.jsx(se,{titleAddButton:"Thêm má»i",sttLuyKe:!0,reserPage:s,title:h,columns:H,tableName:n,filters:$,disableStatus:!0,disableEditor:!0,defaultRowsPerPage:E,onAddClick:()=>{p?(r("create"),N(0),i(!0),g(!0),x(!1)):b(`/Admin/${n}/Create`)},onEditClick:({Id:t})=>{c?(r("edit"),N(t),i(!0),g(!0),x(!1)):b(`/Admin/${n}/Edit/${t}`)},tableActions:[{title:"Xem chi tiết",isOnTable:!0,permissionType:"view",element:e.jsx(ae,{fontSize:"inherit",color:"info"}),onClick:({Id:t})=>{u?(r("view"),N(t),i(!0),g(!0),x(!0)):b(`/Admin/${n}/View/${t}`)}}]}),e.jsx(z,{type:S,id:T,setSelectId:()=>N(0),open:k,popup:y,onClose:()=>i(!1),disabled:f})]})]})};export{Fe as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.