Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature]:Add support for displaying order number and filtering in order list #280

Merged
merged 3 commits into from
Jun 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
* [] [fix]: 问题修复: 在点击工单概览中被禁用的按钮时,会切换到其他的tab选项卡 <https://github.com/actiontech/sqle-ui/pull/275>
* [] [chore]: 2.2305.0 界面优化 <https://github.com/actiontech/sqle/issues/1508>
* [] [fix]: react-monaco-editor 组件全部添加属性: automaticLayout: true, 解决生产环境下在弹窗里第一次打开时无法输入的问题. <https://github.com/actiontech/sqle-ui/pull/276>
* [] [feature]: 工单列表支持工单号展示以及筛选 <https://github.com/actiontech/sqle-ui/pull/280>
* [] [chore]: 2.2306.0 界面优化 <https://github.com/actiontech/sqle-ui/pull/279>
* [] [chore]: 项目成员界面优化(dms中已移除此页面) <https://github.com/actiontech/sqle-ui/pull/278>
2 changes: 2 additions & 0 deletions src/api/workflow/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ export interface IUpdateWorkflowTemplateV1Return extends IBaseRes {}
export interface IGetWorkflowsV1Params {
filter_subject?: string;

filter_workflow_id?: string;

filter_create_time_from?: string;

filter_create_time_to?: string;
Expand Down
1 change: 1 addition & 0 deletions src/locale/zh-CN/order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export default {
instanceName: '数据源',
passRate: '审核通过率',
taskScore: '审核结果评分',
id: '工单号',
},

status: {
Expand Down
6 changes: 6 additions & 0 deletions src/page/Order/List/OrderListFilterForm/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ describe('Order/List/OrderListFilterForm', () => {
'ant-select-item-option-content'
);
fireEvent.click(taskInstanceNameOption);

fireEvent.input(screen.getByLabelText('order.order.id'), {
target: { value: '1234' },
});
expect(result.current[0].getFieldsValue()).toEqual({
filter_current_step_assignee_user_name: 'user_name1',
filter_create_user_name: undefined,
Expand All @@ -126,6 +130,7 @@ describe('Order/List/OrderListFilterForm', () => {
filter_subject: undefined,
filter_order_createTime: undefined,
filter_order_executeTime: undefined,
filter_workflow_id: '1234',
});

expect(screen.getByText('common.collapse')).toBeInTheDocument();
Expand All @@ -139,6 +144,7 @@ describe('Order/List/OrderListFilterForm', () => {
// filter_current_step_type: 'sql_review',
filter_status: undefined,
filter_task_instance_name: undefined,
filter_workflow_id: '1234',
});

expect(setValueSpy).toBeCalledTimes(1);
Expand Down
15 changes: 12 additions & 3 deletions src/page/Order/List/OrderListFilterForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@ const OrderListFilterForm: React.FC<OrderListFilterFormProps> = (props) => {
</Select>
</Form.Item>
</Col>
<Col {...FilterFormColLayout}>
<Form.Item name="filter_workflow_id" label={t('order.order.id')}>
<Input
placeholder={t('common.form.placeholder.input', {
name: t('order.order.id'),
})}
/>
</Form.Item>
</Col>
<Col {...FilterFormColLayout} hidden={currentCollapse}>
<Form.Item
name="filter_task_instance_name"
Expand Down Expand Up @@ -159,9 +168,9 @@ const OrderListFilterForm: React.FC<OrderListFilterFormProps> = (props) => {

<Col
{...filterFormButtonLayoutFactory(
currentCollapse ? 0 : 12,
currentCollapse ? 16 : 0,
currentCollapse ? 0 : 6
currentCollapse ? 12 : 12,
currentCollapse ? 8 : 0,
currentCollapse ? 18 : 6
)}
className="text-align-right"
>
Expand Down
Loading