浏览代码

update Grid UI

master
Anna Ho 1年前
父节点
当前提交
20c6696a5a
共有 4 个文件被更改,包括 22 次插入2 次删除
  1. +9
    -2
      src/pages/AuditLog/AuditLogTable.js
  2. +6
    -0
      src/pages/EmailTemplate/Search_GLD/DataGrid.js
  3. +6
    -0
      src/pages/GazetteIssue/DataGrid.js
  4. +1
    -0
      src/pages/Setting/SystemSetting/Table.js

+ 9
- 2
src/pages/AuditLog/AuditLogTable.js 查看文件

@@ -27,6 +27,7 @@ export default function AuditLogTable({recordList}) {
field: 'modified', field: 'modified',
headerName: 'Date', headerName: 'Date',
flex: isMdOrLg ? 1 : undefined, flex: isMdOrLg ? 1 : undefined,
minWidth: 200,
valueGetter:(params)=>{ valueGetter:(params)=>{
return DateUtils.datetimeStr(params?.value); return DateUtils.datetimeStr(params?.value);
} }
@@ -36,36 +37,42 @@ export default function AuditLogTable({recordList}) {
field: 'modifiedByName', field: 'modifiedByName',
headerName: 'Username', headerName: 'Username',
flex: isMdOrLg ? 1 : undefined, flex: isMdOrLg ? 1 : undefined,
minWidth: 80,
}, },
{ {
id: 'tableName', id: 'tableName',
field: 'tableName', field: 'tableName',
headerName: 'Table Name', headerName: 'Table Name',
flex: isMdOrLg ? 1 : undefined, flex: isMdOrLg ? 1 : undefined,
minWidth: 80,
}, },
{ {
id: 'ref', id: 'ref',
field: 'ref', field: 'ref',
headerName: 'Ref', headerName: 'Ref',
flex: isMdOrLg ? 1 : undefined, flex: isMdOrLg ? 1 : undefined,
minWidth: 80,
}, },
{ {
id: 'actionType', id: 'actionType',
field: 'actionType', field: 'actionType',
headerName: 'Action', headerName: 'Action',
flex: isMdOrLg ? 1 : undefined, flex: isMdOrLg ? 1 : undefined,
minWidth: 80,
}, },
{ {
id: 'oldData', id: 'oldData',
field: 'oldData', field: 'oldData',
headerName: 'Old Data', headerName: 'Old Data',
flex: isMdOrLg ? 2 : undefined,
flex: isMdOrLg ? 5 : undefined,
minWidth: 300,
}, },
{ {
id: 'newData', id: 'newData',
field: 'newData', field: 'newData',
headerName: 'New Data', headerName: 'New Data',
flex: isMdOrLg ? 2 : undefined,
flex: isMdOrLg ? 5 : undefined,
minWidth: 300,
}, },
]; ];




+ 6
- 0
src/pages/EmailTemplate/Search_GLD/DataGrid.js 查看文件

@@ -45,36 +45,42 @@ export default function EmailTemplateTable({ recordList }) {
field: 'tempKey', field: 'tempKey',
headerName: 'Key', headerName: 'Key',
flex: 1, flex: 1,
minWidth: 250,
}, },
{ {
id: 'description', id: 'description',
field: 'description', field: 'description',
headerName: 'Description', headerName: 'Description',
flex: 1, flex: 1,
minWidth: 350,
}, },
{ {
id: 'params', id: 'params',
field: 'params', field: 'params',
headerName: 'Parameters', headerName: 'Parameters',
flex: 1, flex: 1,
minWidth: 250,
}, },
{ {
id: 'subjectCht', id: 'subjectCht',
field: 'subjectCht', field: 'subjectCht',
headerName: 'Subject (Cht)', headerName: 'Subject (Cht)',
flex: 1, flex: 1,
minWidth: 400,
}, },
{ {
id: 'subjectChs', id: 'subjectChs',
field: 'subjectChs', field: 'subjectChs',
headerName: 'Subject (Chs)', headerName: 'Subject (Chs)',
flex: 1, flex: 1,
minWidth: 350,
}, },
{ {
id: 'subjectEng', id: 'subjectEng',
field: 'subjectEng', field: 'subjectEng',
headerName: 'Subject (Eng)', headerName: 'Subject (Eng)',
flex: 1, flex: 1,
minWidth: 350,
}, },
]; ];




+ 6
- 0
src/pages/GazetteIssue/DataGrid.js 查看文件

@@ -25,6 +25,7 @@ export default function GazetteIssueTable({ recordList }) {
field: 'issueYear', field: 'issueYear',
headerName: 'Year', headerName: 'Year',
flex: 1, flex: 1,
minWidth: 100,
renderCell: (params) => { renderCell: (params) => {
return <div style={{ margin: 4 }}>{params.row.issueYear}</div> return <div style={{ margin: 4 }}>{params.row.issueYear}</div>
}, },
@@ -34,6 +35,7 @@ export default function GazetteIssueTable({ recordList }) {
field: 'volume', field: 'volume',
headerName: 'Volume', headerName: 'Volume',
flex: 1, flex: 1,
minWidth: 100,
renderCell: (params) => { renderCell: (params) => {
return <div style={{ margin: 4 }}>{params.row.volume}</div> return <div style={{ margin: 4 }}>{params.row.volume}</div>
}, },
@@ -43,6 +45,7 @@ export default function GazetteIssueTable({ recordList }) {
field: 'issueNo', field: 'issueNo',
headerName: 'Issue No', headerName: 'Issue No',
flex: 1, flex: 1,
minWidth: 100,
renderCell: (params) => { renderCell: (params) => {
return <div style={{ margin: 4 }}>{params.row.issueNo}</div> return <div style={{ margin: 4 }}>{params.row.issueNo}</div>
}, },
@@ -52,6 +55,7 @@ export default function GazetteIssueTable({ recordList }) {
field: 'issueDate', field: 'issueDate',
headerName: 'Issue Date', headerName: 'Issue Date',
flex: 2, flex: 2,
minWidth: 150,
renderCell: (params) => { renderCell: (params) => {
let issueDate = params.row.issueDate; let issueDate = params.row.issueDate;
return <div style={{ margin: 4 }}>{dateStr(issueDate)}</div> return <div style={{ margin: 4 }}>{dateStr(issueDate)}</div>
@@ -62,6 +66,7 @@ export default function GazetteIssueTable({ recordList }) {
field: 'closingDate', field: 'closingDate',
headerName: 'Closing Date', headerName: 'Closing Date',
flex: 2, flex: 2,
minWidth: 150,
renderCell: (params) => { renderCell: (params) => {
let closingDate = params.row.closingDate; let closingDate = params.row.closingDate;
return <div style={{ margin: 4 }}>{dateStr(closingDate)}</div> return <div style={{ margin: 4 }}>{dateStr(closingDate)}</div>
@@ -72,6 +77,7 @@ export default function GazetteIssueTable({ recordList }) {
field: 'issueDesc', field: 'issueDesc',
headerName: 'Description', headerName: 'Description',
flex: 2, flex: 2,
minWidth: 200,
}, },
]; ];




+ 1
- 0
src/pages/Setting/SystemSetting/Table.js 查看文件

@@ -42,6 +42,7 @@ const Table = ({onRowClick, dataList}) => {
field: 'value', field: 'value',
headerName: 'Value', headerName: 'Value',
flex: 1, flex: 1,
minWidth: 400,
renderCell:(params)=>{ renderCell:(params)=>{
return <div dangerouslySetInnerHTML={{__html: params.value}} /> return <div dangerouslySetInnerHTML={{__html: params.value}} />
} }


正在加载...
取消
保存