????
Current Path : C:/inetpub/vhost/donthu.gdtsolutions.vn/api/wwwroot/assets/ |
Current File : C:/inetpub/vhost/donthu.gdtsolutions.vn/api/wwwroot/assets/index-DDMUapeQ.js |
var __defProp=Object.defineProperty;var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});import{n as jsxDevRuntimeExports,at as Typography,b as reactExports,B as Box,ac as Stack,I as Icon,q as Paragraph,d0 as hooks,dz as buildQuery,bf as CHECK_ERROR,as as getCurrentDate,aq as Grid,C as Card,bS as Backdrop,aK as CircularProgress,y as Button}from"./index-D8rI6KyB.js";import{F as Form,a as FormControl,N as CardActions,D as DataTable}from"./DataTable-BmTpWB90.js";import{d as default_1}from"./ExpandMore-varQLUte.js";import{C as CardHeaderCustom}from"./DetailForm-BBKecc2c.js";import{T as Tooltip}from"./Tooltip-D7fDAfmq.js";import{C as Collapse}from"./Collapse-D-11qsGz.js";import"./tiny-warning.esm-31WyJMCs.js";import"./TableRow-BtfKIgzM.js";import"./DialogTitle-CTa5Aekk.js";import"./FormGroup-DUU_RWj_.js";import"./ListItemText-CvHh7sMU.js";import"./Autocomplete-84YYJzry.js";import"./Close-Cdty7iT9.js";import"./Popper-eiiT0b8-.js";import"./usePreviousProps-DAxyVMcl.js";import"./Chip-NlZgllFU.js";import"./warning-bpiCeboj.js";import"./TablePagination-CxDlLqje.js";import"./Toolbar-B2nYmttG.js";import"./Badge-KTII1mO_.js";import"./TableContainer-pMfRQ2dq.js";import"./Alert-NVvT_dNm.js";import"./Switch-CbjiYhf1.js";import"./SwitchBase-hAtwNMFo.js";import"./Checkbox-vGtwoe9y.js";import"./AppBar-CNo5z_JO.js";const columns=[{title:"id",field:"id",type:"string",hidden:!0},{title:"Tài khoản",field:"userName",type:"string",dataCheck:!0,dataRef:["id","tiepDanId"],render:data=>jsxDevRuntimeExports.jsxDEV(Tooltip,{arrow:!0,placement:"top-start",title:data.request,children:jsxDevRuntimeExports.jsxDEV(Typography,{noWrap:!0,children:data.userName},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/constants.tsx",lineNumber:19,columnNumber:11},void 0)},"data"+data.id+"user",!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/constants.tsx",lineNumber:18,columnNumber:9},void 0)},{title:"Hành động",field:"summary",type:"string",dataCheck:!0,dataRef:["id","tiepDanId"],render:data=>jsxDevRuntimeExports.jsxDEV(Tooltip,{arrow:!0,placement:"top-start",title:data.request,children:jsxDevRuntimeExports.jsxDEV(Typography,{noWrap:!0,children:data.summary},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/constants.tsx",lineNumber:33,columnNumber:11},void 0)},"data"+data.id+"summary",!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/constants.tsx",lineNumber:32,columnNumber:9},void 0)},{title:"Ip",field:"ipAddress",type:"string",dataCheck:!0,dataRef:["id","tiepDanId"]},{title:"Dữ liệu",field:"request",type:"string",dataCheck:!0,dataRef:["id","tiepDanId"],render:data=>jsxDevRuntimeExports.jsxDEV(Tooltip,{arrow:!0,placement:"top-start",title:data.request,children:jsxDevRuntimeExports.jsxDEV(Typography,{noWrap:!0,children:data.request},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/constants.tsx",lineNumber:54,columnNumber:11},void 0)},"data"+data.id,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/constants.tsx",lineNumber:53,columnNumber:9},void 0)},{title:"Thời gian",field:"atTime",type:"string",dataCheck:!0,dataRef:["id","tiepDanId"]}],formDieuKien={from:{field_name:"from",title:"Từ ngày",type:"datetime",fullLine:!0,isClearable:!0},to:{field_name:"to",title:"Đến ngày",type:"datetime",fullLine:!0,isClearable:!0},userId:{field_name:"userId",title:"Tài khoản",type:"select-async",url:"/api/admin/auth/Accounts",value_field:"id",value_label:"userName",isSearchByQuery:!0,fullLine:!0,isClearable:!0}};var StatusEdit=(StatusEdit2=>(StatusEdit2.EDIT="EDIT",StatusEdit2.SEEN="SEEN",StatusEdit2))(StatusEdit||{});const ExpandForm=reactExports.memo(reactExports.forwardRef(({children,title,id},ref)=>{const[expanded,setExpanded]=reactExports.useState(!0),refChild=reactExports.useRef(),handleExpandClick=reactExports.useCallback(()=>{setExpanded(pre=>!pre)},[]);reactExports.useImperativeHandle(ref,()=>({handleExpandClick}),[handleExpandClick]);const childWithProps=reactExports.isValidElement(children)?reactExports.cloneElement(children,{ref:refChild,id}):children;return jsxDevRuntimeExports.jsxDEV(Box,{width:"100%",marginBottom:1,borderRadius:"0.5rem",bgcolor:"white",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:[jsxDevRuntimeExports.jsxDEV(CardHeaderCustom,{title:jsxDevRuntimeExports.jsxDEV(Stack,{direction:"row",justifyContent:"space-between",children:jsxDevRuntimeExports.jsxDEV(Stack,{alignItems:"center",direction:"row",justifyContent:"flex-start",children:[jsxDevRuntimeExports.jsxDEV(default_1,{expand:expanded,onClick:handleExpandClick,"aria-label":"show more",children:jsxDevRuntimeExports.jsxDEV(Icon,{children:"expand_more"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:75,columnNumber:19},void 0)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:74,columnNumber:17},void 0),jsxDevRuntimeExports.jsxDEV(Paragraph,{children:title},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:77,columnNumber:17},void 0)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:73,columnNumber:15},void 0)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:72,columnNumber:13},void 0)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:70,columnNumber:9},void 0),jsxDevRuntimeExports.jsxDEV(Collapse,{in:expanded,timeout:"auto",children:childWithProps},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:82,columnNumber:9},void 0)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:62,columnNumber:7},void 0)})),Index=__name(()=>{const refExpand=reactExports.useRef(),refForm=reactExports.useRef(),tableRef=reactExports.createRef(),[where,setWhere]=reactExports.useState(null),reloadTable=__name(()=>tableRef.current&&tableRef.current.onQueryChange(),"reloadTable"),handleSubmit=reactExports.useCallback(async dataForm=>{try{const fromStr=dataForm.from?{ge:{type:"raw",value:hooks(dataForm.from).format("YYYY-MM-DDTHH:mm:ss[Z]")}}:{},toStr=dataForm.to?{le:{type:"raw",value:hooks(dataForm.to).format("YYYY-MM-DDTHH:mm:ss[Z]")}}:{},toUserId=dataForm.userId?{eq:{type:"raw",value:dataForm.userId}}:{};let strParam=buildQuery({filter:{atTime:{...fromStr,...toStr},userId:{...toUserId}}});console.log(strParam),strParam=strParam.replace("?$filter=",""),setWhere(strParam)}catch(error){CHECK_ERROR(error)}},[]);reactExports.useEffect(()=>{where!==null&&reloadTable()},[where]);const getInitData=reactExports.useCallback(()=>{const iniData={from:getCurrentDate({}).format()};return Promise.resolve(iniData)},[]);return jsxDevRuntimeExports.jsxDEV(Form,{ref:refForm,onSubmit:handleSubmit,defaultValues:()=>getInitData(),children:jsxDevRuntimeExports.jsxDEV(Grid,{container:!0,xs:12,children:[jsxDevRuntimeExports.jsxDEV(Grid,{container:!0,xs:3,children:jsxDevRuntimeExports.jsxDEV(Card,{sx:{background:"transparent",borderRadius:"0.5rem",boxShadow:"none !important",padding:"0.2rem"},children:[jsxDevRuntimeExports.jsxDEV(Backdrop,{sx:{color:"#fff",zIndex:theme=>theme.zIndex.drawer+1},open:status==="pending",children:jsxDevRuntimeExports.jsxDEV(CircularProgress,{color:"inherit"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:144,columnNumber:15},void 0)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:143,columnNumber:13},void 0),jsxDevRuntimeExports.jsxDEV(ExpandForm,{ref:refExpand,title:"Điều kiện",children:jsxDevRuntimeExports.jsxDEV(Box,{children:[jsxDevRuntimeExports.jsxDEV(Grid,{container:!0,xs:12,children:Object.entries(formDieuKien).map(([key,value],idx)=>jsxDevRuntimeExports.jsxDEV(Grid,{item:!0,xs:12,children:jsxDevRuntimeExports.jsxDEV(FormControl,{data:{...value,name:value.field_name},rules:value.rules,name:value.field_name,inline:!1},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:152,columnNumber:25},void 0)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:151,columnNumber:23},void 0))},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:148,columnNumber:17},void 0),jsxDevRuntimeExports.jsxDEV(CardActions,{children:jsxDevRuntimeExports.jsxDEV(Stack,{direction:"row",justifyContent:"end",width:"100%",children:jsxDevRuntimeExports.jsxDEV(Button,{size:"small",type:"button",onClick:()=>{refForm.current.submit()},variant:"outlined",startIcon:status==="pending"?jsxDevRuntimeExports.jsxDEV(CircularProgress,{size:20},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:174,columnNumber:57},void 0):jsxDevRuntimeExports.jsxDEV(Icon,{children:"search"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:174,columnNumber:90},void 0),disabled:status==="pending",children:"Tìm kiếm"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:167,columnNumber:21},void 0)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:166,columnNumber:19},void 0)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:165,columnNumber:17},void 0)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:147,columnNumber:15},void 0)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:146,columnNumber:13},void 0)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:140,columnNumber:11},void 0)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:139,columnNumber:9},void 0),jsxDevRuntimeExports.jsxDEV(Grid,{container:!0,xs:9,children:jsxDevRuntimeExports.jsxDEV(Card,{sx:{background:"transparent",borderRadius:"0.5rem",boxShadow:"none !important",padding:"0.2rem",width:"100%"},children:jsxDevRuntimeExports.jsxDEV(ExpandForm,{ref:refExpand,title:"Lịch sử thao tác",children:jsxDevRuntimeExports.jsxDEV(Box,{noValidate:!0,component:"form",sx:{height:"auto",display:"flex",flexDirection:"column",width:"auto",m:2},children:jsxDevRuntimeExports.jsxDEV(DataTable,{isFullTextSearch:!0,tableRef,isAuth:!0,url:"/default/auth/LogActions",title:"Lịch sử thao tác",columns,selectType:"withColumns",where,onRowClick:(e,rowData)=>{console.log("adasd")}},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:207,columnNumber:17},void 0)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:196,columnNumber:15},void 0)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:195,columnNumber:13},void 0)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:186,columnNumber:11},void 0)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:185,columnNumber:9},void 0)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:138,columnNumber:7},void 0)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/donthu.gdtsolutions.vn/src/app/views/main/LichSuThaoTac/index.tsx",lineNumber:137,columnNumber:5},void 0)},"Index");export{StatusEdit,Index as default};