fix/approval-translate (#994)
修了个翻译错误, 顺便改了一些文件名称,从简写字母开头,改为后缀 Reviewed-on: daoyoucloud/tachybase#994 Co-authored-by: bai.zixv <bai.zixv@foxmail.com> Co-committed-by: bai.zixv <bai.zixv@foxmail.com>
This commit is contained in:
parent
3fbfa50566
commit
1faabf8e59
@ -13,7 +13,7 @@ import {
|
||||
} from '@tachybase/client';
|
||||
import { RecursionField, createForm, useField, useFieldSchema } from '@tachybase/schema';
|
||||
import { Fragment, useContext, useMemo, useRef } from 'react';
|
||||
import { useContextApprovalExecution } from '../usage/approval-block/common/Pd.ApprovalExecution';
|
||||
import { useContextApprovalExecution } from '../usage/approval-block/common/ApprovalExecution.provider';
|
||||
|
||||
export const FormBlockProvider = (props) => {
|
||||
const context = useContextApprovalExecution();
|
||||
|
@ -1,9 +1,9 @@
|
||||
import React from 'react';
|
||||
import { ExtendCollectionsProvider, TableBlockProvider, useRecord } from '@tachybase/client';
|
||||
import { CollectionApprovalTodos } from '../../common/Cn.ApprovalTodos';
|
||||
import { CollectionApprovals } from '../approval-common/Cn.Approvals';
|
||||
import { CollectionFlowNodes } from '../approval-common/Cn.FlowNodes';
|
||||
import { CollectionWorkflows } from '../approval-common/Cn.Workflows';
|
||||
import { CollectionApprovals } from '../approval-common/Approvals.collection';
|
||||
import { CollectionFlowNodes } from '../approval-common/FlowNodes.collection';
|
||||
import { CollectionWorkflows } from '../approval-common/Workflows.collection';
|
||||
|
||||
export function ApprovalBlockDecorator({ children, ...props }) {
|
||||
const {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Plugin } from '@tachybase/client';
|
||||
import PluginKitApprovalCommon from '../approval-common';
|
||||
import PluginKitApprovalCommon from '../approval-common/plugin';
|
||||
import { tval } from '../../locale';
|
||||
import { ViewActionTodos } from './todos/VC.ViewActionTodos';
|
||||
import { ApprovalBlockComponent } from './VC.ApprovalBlock';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { useCurrentUserContext } from '@tachybase/client';
|
||||
import { useContextApprovalExecution } from '../common/Pd.ApprovalExecution';
|
||||
import { useApproval } from '../../approval-common/Pd.ApprovalData';
|
||||
import { useContextApprovalExecution } from '../common/ApprovalExecution.provider';
|
||||
import { useApproval } from '../../approval-common/ApprovalData.provider';
|
||||
import { APPROVAL_STATUS } from '../../../constants';
|
||||
|
||||
export function ActionBarProvider(props) {
|
||||
|
@ -2,7 +2,7 @@ import React, { useContext } from 'react';
|
||||
import { useCurrentUserContext } from '@tachybase/client';
|
||||
import { useFlowContext } from '@tachybase/plugin-workflow/client';
|
||||
import { createContext } from 'react';
|
||||
import { useApproval } from '../../approval-common/Pd.ApprovalData';
|
||||
import { useApproval } from '../../approval-common/ApprovalData.provider';
|
||||
import { APPROVAL_STATUS } from '../../../constants';
|
||||
|
||||
const ContextApprovalStatus = createContext(APPROVAL_STATUS.SUBMITTED);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { useCurrentUserContext } from '@tachybase/client';
|
||||
import { useFlowContext } from '@tachybase/plugin-workflow/client';
|
||||
import { APPROVAL_STATUS } from '../../../constants';
|
||||
import { useApproval } from '../../approval-common/Pd.ApprovalData';
|
||||
import { useApproval } from '../../approval-common/ApprovalData.provider';
|
||||
|
||||
export function WithdrawActionProvider({ children }) {
|
||||
const { data } = useCurrentUserContext();
|
||||
|
@ -13,18 +13,18 @@ import { Result, Spin } from 'antd';
|
||||
import { useContext } from 'react';
|
||||
import { NAMESPACE } from '../../../locale';
|
||||
import { FormBlockProvider } from '../../../common/Pd.FormBlock';
|
||||
import { ContextApprovalExecution } from '../common/Pd.ApprovalExecution';
|
||||
import { ApprovalContext } from '../../approval-common/Pd.ApprovalData';
|
||||
import { ContextWithActionEnabled } from '../../approval-common/Pd.WithActionEnabled';
|
||||
import { ContextApprovalExecution } from '../common/ApprovalExecution.provider';
|
||||
import { ApprovalContext } from '../../approval-common/ApprovalData.provider';
|
||||
import { ContextWithActionEnabled } from '../../approval-common/WithActionEnabled.provider';
|
||||
import { useFormBlockProps } from './hooks/useFormBlockProps';
|
||||
import { useSubmit } from './hooks/useSubmit';
|
||||
import { useWithdrawAction } from './hooks/useWithdrawAction';
|
||||
import { useDestroyAction } from './hooks/useDestroyAction';
|
||||
import { ActionBarProvider } from './Pd.ActionBar';
|
||||
import { WithdrawActionProvider } from './Pd.WithdrawAction';
|
||||
import { SchemaComponentContextProvider } from '../common/Pd.SchemaComponent';
|
||||
import { SchemaComponentContextProvider } from '../common/SchemaComponent.provider';
|
||||
import { ApplyActionStatusProvider } from './Pd.ApplyActionStatus';
|
||||
import { FlowContextProvider } from '../common/Pd.FlowContext';
|
||||
import { FlowContextProvider } from '../common/FlowContext.provider';
|
||||
|
||||
export const ViewActionLaunchContent = () => {
|
||||
const { id } = useRecord();
|
||||
|
@ -16,7 +16,7 @@ import { useSubmit } from './hooks/useSubmit';
|
||||
import { useWithdrawAction } from './hooks/useWithdrawAction';
|
||||
import { ActionBarProvider } from './Pd.ActionBar';
|
||||
import { ApplyActionStatusProvider } from './Pd.ActionStatus';
|
||||
import { FlowContextProvider } from '../../common/Pd.FlowContext';
|
||||
import { FlowContextProvider } from '../../common/FlowContext.provider';
|
||||
import { WithdrawActionProvider } from './Pd.ActionWithdraw';
|
||||
|
||||
// 审批-发起: 发起按钮
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { useAPIClient, useActionContext } from '@tachybase/client';
|
||||
import { useField } from '@tachybase/schema';
|
||||
import { useApproval } from '../../../approval-common/Pd.ApprovalData';
|
||||
import { useApproval } from '../../../approval-common/ApprovalData.provider';
|
||||
import _ from 'lodash';
|
||||
|
||||
export function useDestroyAction() {
|
||||
|
@ -2,8 +2,8 @@ import { useCurrentUserContext } from '@tachybase/client';
|
||||
import { useFlowContext } from '@tachybase/plugin-workflow/client';
|
||||
import { useForm } from '@tachybase/schema';
|
||||
import { useEffect } from 'react';
|
||||
import { useContextApprovalExecution } from '../../common/Pd.ApprovalExecution';
|
||||
import { useApproval } from '../../../approval-common/Pd.ApprovalData';
|
||||
import { useContextApprovalExecution } from '../../common/ApprovalExecution.provider';
|
||||
import { useApproval } from '../../../approval-common/ApprovalData.provider';
|
||||
import { ApprovalStatusEnumDict } from '../../../../constants';
|
||||
|
||||
export function useFormBlockProps() {
|
||||
|
@ -2,7 +2,7 @@ import { useAPIClient, useActionContext } from '@tachybase/client';
|
||||
import { useFlowContext } from '@tachybase/plugin-workflow/client';
|
||||
import { useField, useForm } from '@tachybase/schema';
|
||||
import _ from 'lodash';
|
||||
import { useApproval } from '../../../approval-common/Pd.ApprovalData';
|
||||
import { useApproval } from '../../../approval-common/ApprovalData.provider';
|
||||
import { useContextApprovalStatus } from '../Pd.ApplyActionStatus';
|
||||
|
||||
export function useSubmit() {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { useAPIClient, useActionContext } from '@tachybase/client';
|
||||
import { useField } from '@tachybase/schema';
|
||||
import { useApproval } from '../../../approval-common/Pd.ApprovalData';
|
||||
import { useApproval } from '../../../approval-common/ApprovalData.provider';
|
||||
|
||||
// 撤回
|
||||
export function useWithdrawAction() {
|
||||
|
@ -12,10 +12,10 @@ import _ from 'lodash';
|
||||
import React, { useContext } from 'react';
|
||||
import { FormBlockProvider } from '../../../common/Pd.FormBlock';
|
||||
import { NAMESPACE, useTranslation } from '../../../locale';
|
||||
import { ApprovalContext } from '../../approval-common/Pd.ApprovalData';
|
||||
import { ContextWithActionEnabled } from '../../approval-common/Pd.WithActionEnabled';
|
||||
import { ContextApprovalExecution } from '../common/Pd.ApprovalExecution';
|
||||
import { SchemaComponentContextProvider } from '../common/Pd.SchemaComponent';
|
||||
import { ApprovalContext } from '../../approval-common/ApprovalData.provider';
|
||||
import { ContextWithActionEnabled } from '../../approval-common/WithActionEnabled.provider';
|
||||
import { ContextApprovalExecution } from '../common/ApprovalExecution.provider';
|
||||
import { SchemaComponentContextProvider } from '../common/SchemaComponent.provider';
|
||||
import { ApprovalFormBlockDecorator } from './Dt.ApprovalFormBlock';
|
||||
import { ActionBarProvider } from './Pd.ActionBarProvider';
|
||||
import { ApprovalActionProvider } from './Pd.ApprovalAction';
|
||||
|
@ -3,10 +3,10 @@ import { EXECUTION_STATUS } from '@tachybase/plugin-workflow/client';
|
||||
import { Space, Table } from 'antd';
|
||||
import _ from 'lodash';
|
||||
import React, { useMemo } from 'react';
|
||||
import { useApproval } from './Pd.ApprovalData';
|
||||
import { APPROVAL_ACTION_STATUS, APPROVAL_STATUS } from '../../constants';
|
||||
import { ContextWithActionEnabled } from './Pd.WithActionEnabled';
|
||||
import { tval, usePluginTranslation, useTranslation } from '../../locale';
|
||||
import { lang, usePluginTranslation } from '../../locale';
|
||||
import { useApproval } from './ApprovalData.provider';
|
||||
import { ContextWithActionEnabled } from './WithActionEnabled.provider';
|
||||
import { getAntdTableColumns } from './process-columns/columns';
|
||||
|
||||
// 审批(发起/待办)区块-查看-审批处理
|
||||
@ -58,7 +58,9 @@ function getResults({ approval, currentUser }) {
|
||||
records: [
|
||||
{
|
||||
groupCount: 1,
|
||||
node: { title: tval('Apply') },
|
||||
node: {
|
||||
title: lang('Apply'),
|
||||
},
|
||||
user: {
|
||||
...approval.createdBy,
|
||||
id: approval.createdById,
|
@ -1,6 +1,6 @@
|
||||
import { Plugin } from '@tachybase/client';
|
||||
import { ApprovalDataProvider } from './Pd.ApprovalData';
|
||||
import { ApprovalProcess } from './VC.ApprovalProcess';
|
||||
import { ApprovalDataProvider } from './ApprovalData.provider';
|
||||
import { ApprovalProcess } from './ApprovalProcess.view';
|
||||
|
||||
export default class PluginKitApprovalCommon extends Plugin {
|
||||
async afterAdd() {}
|
@ -1,6 +1,6 @@
|
||||
import { DatePicker, InputReadPretty, RecordProvider, useCurrentUserContext } from '@tachybase/client';
|
||||
import React, { useContext } from 'react';
|
||||
import { ContextWithActionEnabled } from '../Pd.WithActionEnabled';
|
||||
import { ContextWithActionEnabled } from '../WithActionEnabled.provider';
|
||||
import { ViewActionLaunch } from '../../approval-block/launch/VC.ViewActionLaunch';
|
||||
import { ViewActionTodos } from '../../approval-block/todos/VC.ViewActionTodos';
|
||||
|
||||
|
@ -7,10 +7,10 @@ import {
|
||||
useRecord,
|
||||
} from '@tachybase/client';
|
||||
import React, { useMemo } from 'react';
|
||||
import { CollectionApprovals } from '../approval-common/Cn.Approvals';
|
||||
import { CollectionApprovals } from '../approval-common/Approvals.collection';
|
||||
import { CollectionApprovalTodos } from '../../common/Cn.ApprovalTodos';
|
||||
import { CollectionFlowNodes } from '../approval-common/Cn.FlowNodes';
|
||||
import { CollectionWorkflows } from '../approval-common/Cn.Workflows';
|
||||
import { CollectionFlowNodes } from '../approval-common/FlowNodes.collection';
|
||||
import { CollectionWorkflows } from '../approval-common/Workflows.collection';
|
||||
|
||||
export function RecordApprovalsDecorator({ params, children }) {
|
||||
const collection = useCollection_deprecated();
|
@ -3,7 +3,7 @@ import React from 'react';
|
||||
import { ApprovalRecordStatusColumn } from '../approval-common/approval-columns/column.status';
|
||||
import { UserColumn } from '../approval-common/approval-columns/column.user';
|
||||
import { WorkflowColumn } from '../approval-common/approval-columns/column.workflow';
|
||||
import { SchemaRecordApprovals } from './Sm.RecordApprovals';
|
||||
import { SchemaRecordApprovals } from './RecordApprovals.schema';
|
||||
|
||||
// 视图组件,创建区块-相关审批
|
||||
export const RecordApprovals = () => {
|
@ -1,9 +1,9 @@
|
||||
import { Plugin } from '@tachybase/client';
|
||||
import { tval } from '../../locale';
|
||||
import PluginKitApprovalCommon from '../approval-common';
|
||||
import { RecordApprovalsDecorator } from './Dt.RecordApprovals';
|
||||
import { RecordApprovalsInitializer } from './Iz.RecordApprovals';
|
||||
import { RecordApprovals } from './VC.RecordApprovals';
|
||||
import PluginKitApprovalCommon from '../approval-common/plugin';
|
||||
import { RecordApprovalsDecorator } from './RecordApprovals.decorator';
|
||||
import { RecordApprovalsInitializer } from './RecordApprovals.initializer';
|
||||
import { RecordApprovals } from './RecordApprovals.view';
|
||||
|
||||
export default class PluginKitApprovalRecordBlock extends Plugin {
|
||||
async afterAdd() {
|
@ -1,5 +1,5 @@
|
||||
import { Plugin } from '@tachybase/client';
|
||||
import PluginKitApprovalRecordBlock from './approval-record-block';
|
||||
import PluginKitApprovalRecordBlock from './approval-record-block/plugin';
|
||||
import PluginKitApprovalBlock from './approval-block';
|
||||
|
||||
export default class PluginKitApprovalUsage extends Plugin {
|
||||
|
Loading…
Reference in New Issue
Block a user