|
|
@@ -8,6 +8,8 @@ import { |
|
|
|
Typography, Button, Grid |
|
|
|
}from '@mui/material'; |
|
|
|
|
|
|
|
import Checkbox from '@mui/material/Checkbox'; |
|
|
|
|
|
|
|
import MainCard from "../../components/MainCard"; |
|
|
|
|
|
|
|
import * as React from "react"; |
|
|
@@ -76,6 +78,18 @@ const ManageOrgUserPage = () => { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const setPrimaryUser=(params)=>{ |
|
|
|
HttpUtils.get( |
|
|
|
{ |
|
|
|
url: (!params.row.primaryUser?UrlUtils.GET_SET_PRIMARY_USER:UrlUtils.GET_SET_UN_PRIMARY_USER)+"/"+params.row.id, |
|
|
|
onSuccess:function(){ |
|
|
|
loadData(); |
|
|
|
} |
|
|
|
} |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const columns = [ |
|
|
|
{ |
|
|
@@ -122,8 +136,8 @@ const ManageOrgUserPage = () => { |
|
|
|
field: 'lastApply', |
|
|
|
headerName: getHeader('最後提交申請日期'), |
|
|
|
flex: 1, |
|
|
|
valueGetter:(params)=>{ |
|
|
|
return DateUtils.datetimeStr(params.value); |
|
|
|
valueGetter:()=>{ |
|
|
|
return "--"; |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
@@ -135,6 +149,22 @@ const ManageOrgUserPage = () => { |
|
|
|
getActions: (params) => { |
|
|
|
return [getStatus(params)] |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: 'primaryUser', |
|
|
|
field: 'primaryUser', |
|
|
|
type: 'bool', |
|
|
|
headerName: getHeader('Primary'), |
|
|
|
flex: 1, |
|
|
|
renderCell: (params) => { |
|
|
|
console.log(params); |
|
|
|
return ( |
|
|
|
<Checkbox |
|
|
|
onClick={()=>{setPrimaryUser(params)}} |
|
|
|
checked={params.row.primaryUser} |
|
|
|
/> |
|
|
|
); |
|
|
|
}, |
|
|
|
} |
|
|
|
]; |
|
|
|
|
|
|
|