fix: 修复审批页面标签不是翻译后的 (#1080)
Reviewed-on: daoyoucloud/tachybase#1080 Reviewed-by: sealday <zhanglin@daoyoucloud.com> Co-authored-by: wjh <wwwjh0710@163.com> Co-committed-by: wjh <wwwjh0710@163.com>
This commit is contained in:
parent
8fdd5d4fe9
commit
b53c265264
@ -8,6 +8,7 @@ import { Space, Tag } from 'antd';
|
|||||||
|
|
||||||
import { approvalStatusOptions } from '../../constants';
|
import { approvalStatusOptions } from '../../constants';
|
||||||
import { useContextApprovalExecution } from '../../context/ApprovalExecution';
|
import { useContextApprovalExecution } from '../../context/ApprovalExecution';
|
||||||
|
import { useTranslation } from '../../locale';
|
||||||
|
|
||||||
export function ActionBarProvider(props) {
|
export function ActionBarProvider(props) {
|
||||||
const { status } = useContextApprovalExecution();
|
const { status } = useContextApprovalExecution();
|
||||||
@ -20,12 +21,12 @@ export function ActionBarProvider(props) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const ComponentUserInfo = () => {
|
const ComponentUserInfo = () => {
|
||||||
const compile = useCompile();
|
const { t } = useTranslation();
|
||||||
const { status, updatedAt, user } = useContextApprovalExecution();
|
const { status, updatedAt, user } = useContextApprovalExecution();
|
||||||
const configObj = approvalStatusOptions.find((value) => value.value === status);
|
const configObj = approvalStatusOptions.find((value) => value.value === status);
|
||||||
return (
|
return (
|
||||||
<Space>
|
<Space>
|
||||||
<Tag color={configObj.color}>{compile(configObj.label)}</Tag>
|
<Tag color={configObj.color}>{t(configObj.label)}</Tag>
|
||||||
<time>{str2moment(updatedAt).format('YYYY-MM-DD HH:mm:ss')}</time>
|
<time>{str2moment(updatedAt).format('YYYY-MM-DD HH:mm:ss')}</time>
|
||||||
<Tag>{user.nickname}</Tag>
|
<Tag>{user.nickname}</Tag>
|
||||||
</Space>
|
</Space>
|
||||||
|
Loading…
Reference in New Issue
Block a user