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

feat(association field):quick add new #1953

Merged
merged 49 commits into from
Jun 15, 2023
Merged

feat(association field):quick add new #1953

merged 49 commits into from
Jun 15, 2023

Conversation

katherinehhh
Copy link
Contributor

@katherinehhh katherinehhh commented May 30, 2023

Note
This is a template for submitting a new feature. Use the bug fix template if you're submitting a bug fix pull request by adding template=bug_fix.md to your pull request URL.

Description (需求描述)

1.关系字段的快速新建:关系字段当字段组件为select时,在原来的弹窗基础上支持快速新建,当搜索的数据不存在时,可以基于搜索内容新建一条数据并选中,允许添加数据的开关改成 select
Add new mode

  • 快捷添加
  • 弹窗添加(原有的新增方式)
    2.Add new 表单操作的改进:表单下的submit按钮支持配置save mode,可配置新建方式,
  • create(默认)
    • 仅新增
  • firstOrCreate
    • 如果数据不存在时新增,存在时不处理
  • updateOrCreate
    • 如果数据不存在时新增,存在则更新
      如果是 firstOrcreate 或 updateOrCreate 需要配置 filterKeys(对应的 find by fields)

Motivation (需求背景)

Explain the reason for adding or modifying this feature.

Key changes (关键改动)

Provide a technically detailed description of the key changes made.

  • Frontend (前端)
    1.FormItem.Designer ,当mode为select时显示Add new mode的配置项,为recordPicker时显示原来的Allow add new配置项
    2.RemoteSelect组件,新增搜素时未查到数据通过dropdownRender显示快捷添加按钮
    3.AssociationSelect 组件,QuickAddContent自定义dropdownRender函数,关系数据新建后实现选中
  • Backend (后端)

Test plan (测试计划)

Suggestions (测试建议)

Provide any suggestions or recommendations for improvements in the testing plan.

Underlying risk (潜在风险)

Identify any potential risks or issues that may arise from the new feature or modification.

Showcase (结果展示)

20230530093833
image

@katherinehhh katherinehhh changed the title Feat/quick add new feat/quick add new May 30, 2023
@katherinehhh katherinehhh changed the title feat/quick add new feat(association field):quick add new May 30, 2023
@chenos
Copy link
Contributor

chenos commented Jun 8, 2023

Link T-39

@height
Copy link

height bot commented Jun 8, 2023

This pull request has been linked to and will mark 4 tasks as "Done" when merged:

@chenos chenos merged commit 70890f2 into main Jun 15, 2023
4 checks passed
@chenos chenos deleted the feat/quick-add-new branch June 15, 2023 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants