|
|
@@ -81,14 +81,16 @@ const ManageOrgUserPage = () => { |
|
|
|
if (params.row.locked) { |
|
|
|
return ( |
|
|
|
<> |
|
|
|
{getStatusTag({ color: "#525150", text: "鎖定" })} |
|
|
|
<Button variant="outlined" onClick={() => onActiveClick(params)}>解鎖</Button> |
|
|
|
{getStatusTag({ color: "#525150", text: intl.formatMessage({id: 'locked'}) })} |
|
|
|
<Button variant="outlined" onClick={() => onActiveClick(params)}> |
|
|
|
<FormattedMessage id="unlock" /> |
|
|
|
</Button> |
|
|
|
</> |
|
|
|
) |
|
|
|
} else if (!params.row.verifiedBy) { |
|
|
|
return getStatusTag({ color: "#fca503", text: "待批核" }) |
|
|
|
} else if (params.row.status == "active") { |
|
|
|
return getStatusTag({ color: "#73AD21", text: "生效中" }) |
|
|
|
return getStatusTag({ color: "#fca503", text: intl.formatMessage({id: 'pendingFor'}) }) |
|
|
|
} else if (params.row.status === "active") { |
|
|
|
return getStatusTag({ color: "#73AD21", text: intl.formatMessage({id: 'active'}) }) |
|
|
|
} |
|
|
|
return getStatusTag({ text: params.row.status }) |
|
|
|
} |
|
|
@@ -117,21 +119,21 @@ const ManageOrgUserPage = () => { |
|
|
|
{ |
|
|
|
id: 'username', |
|
|
|
field: 'username', |
|
|
|
headerName: getHeader('登錄名稱'), |
|
|
|
headerName: getHeader(intl.formatMessage({id: 'loginName'})), |
|
|
|
flex: 1, |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
id: 'contactPerson', |
|
|
|
field: 'contactPerson', |
|
|
|
headerName: getHeader('用戶名稱'), |
|
|
|
headerName: getHeader(intl.formatMessage({id: 'userName'})), |
|
|
|
flex: 1, |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
id: 'contactTel', |
|
|
|
field: 'contactTel', |
|
|
|
headerName: getHeader('聯絡電話'), |
|
|
|
headerName: getHeader(intl.formatMessage({id: 'userContactNumber'})), |
|
|
|
flex: 1, |
|
|
|
valueGetter: (params) => { |
|
|
|
let contactTel = JSON.parse(params.value) |
|
|
@@ -141,13 +143,13 @@ const ManageOrgUserPage = () => { |
|
|
|
{ |
|
|
|
id: 'emailBus', |
|
|
|
field: 'emailBus', |
|
|
|
headerName: getHeader('電郵'), |
|
|
|
headerName: getHeader(intl.formatMessage({id: 'userContactEmail'})), |
|
|
|
flex: 1, |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: 'lastLogin', |
|
|
|
field: 'lastLogin', |
|
|
|
headerName: getHeader('最後登入日期'), |
|
|
|
headerName: getHeader(intl.formatMessage({id: 'lastLoginDate'})), |
|
|
|
flex: 1, |
|
|
|
valueGetter: (params) => { |
|
|
|
return DateUtils.datetimeStr(params.value); |
|
|
@@ -156,7 +158,7 @@ const ManageOrgUserPage = () => { |
|
|
|
{ |
|
|
|
id: 'lastApply', |
|
|
|
field: 'lastApply', |
|
|
|
headerName: getHeader('最後提交申請日期'), |
|
|
|
headerName: getHeader(intl.formatMessage({id: 'lastSubmissionDate'})), |
|
|
|
flex: 1, |
|
|
|
valueGetter: () => { |
|
|
|
return "--"; |
|
|
@@ -176,7 +178,7 @@ const ManageOrgUserPage = () => { |
|
|
|
id: 'primaryUser', |
|
|
|
field: 'primaryUser', |
|
|
|
type: 'bool', |
|
|
|
headerName: getHeader('Primary'), |
|
|
|
headerName: getHeader(intl.formatMessage({id: 'primary'})), |
|
|
|
flex: 1, |
|
|
|
renderCell: (params) => { |
|
|
|
console.log(params); |
|
|
|