From bb233dca10c11b99927446cae5a5567bccfd7190 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?REBUILD=20=E4=BC=81=E4=B8=9A=E7=AE=A1=E7=90=86=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F?= <42044143+getrebuild@users.noreply.github.com> Date: Mon, 11 Dec 2023 11:37:45 +0800 Subject: [PATCH] fix: RbAlertBox dismiss (#692) * fix: RbAlertBox dismiss * be: AutoApproval --- @rbv | 2 +- README.md | 6 +++--- pom.xml | 2 +- src/main/java/com/rebuild/core/Application.java | 4 ++-- .../core/service/trigger/impl/AutoApproval.java | 10 +++++++++- src/main/resources/web/assets/css/rb-page.css | 4 ---- src/main/resources/web/assets/js/rb-components.js | 6 +++--- .../resources/web/assets/js/rb-datalist.common.js | 4 +--- src/main/resources/web/assets/js/rb-page.js | 4 ++-- .../web/assets/js/trigger/trigger-design.js | 12 +----------- 10 files changed, 23 insertions(+), 31 deletions(-) diff --git a/@rbv b/@rbv index a4de177b8..a207cc6fb 160000 --- a/@rbv +++ b/@rbv @@ -1 +1 @@ -Subproject commit a4de177b845e1ae7d47881be646aff468d9e09fc +Subproject commit a207cc6fbf3d074b656b22025cb1eec27583be6e diff --git a/README.md b/README.md index 877290ff1..f9d990a4c 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,9 @@ ## 项目特色 -**_REBUILD 通过创新的业务流程引擎帮助你快速搭建各类企业管理系统,全图形化配置无需了解技术。_** +**_相较于同类产品,REBUILD 更侧重于业务需求实现,而非基础的技术框架或项目启动模板。_** -REBUILD 侧重于业务需求实现,而非基础技术框架或项目启动模板,通过 REBUILD 可以真正实现零代码快速搭建!无需编程、无需编译代码,甚至无需了解任何技术。 +「开放式设计」是 REBUILD 的重要设计理念。得益于研发团队成熟的 B 端产品经验,我们实现了对企业日常各类需求的可配置化管理。全图形化系统设计搭建,所见即所得。 更多详情介绍 [https://getrebuild.com/](https://getrebuild.com/) @@ -89,7 +89,7 @@ REBUILD 对于开发环境的要求非常简单,由于使用 Java 开发,因 ## 授权 License -REBUILD 使用 GPL-3.0 开源许可和商业授权双重授权协议,使用将被视为你自愿承诺接受 [协议](https://getrebuild.com/legal/service-terms) 之所有条款。 +REBUILD 使用 GPL-3.0 开源许可和商业授权双重授权协议,使用将被视为你自愿承诺接受 [用户服务协议](https://getrebuild.com/legal/service-terms) 之所有条款。 REBUILD uses the GPL-3.0 open source license and commercial license dual license agreement. Use will be deemed your voluntary commitment to accept all terms of the [Agreement](https://getrebuild.com/legal/service-terms). diff --git a/pom.xml b/pom.xml index 60b15af23..c7fb9cf0c 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.rebuild rebuild - 3.5.0-beta4 + 3.5.0 rebuild Building your business-systems freely! https://getrebuild.com/ diff --git a/src/main/java/com/rebuild/core/Application.java b/src/main/java/com/rebuild/core/Application.java index eac62f4aa..03807d6b3 100644 --- a/src/main/java/com/rebuild/core/Application.java +++ b/src/main/java/com/rebuild/core/Application.java @@ -74,11 +74,11 @@ public class Application implements ApplicationListener /** * Rebuild Version */ - public static final String VER = "3.5.0-beta4"; + public static final String VER = "3.5.0"; /** * Rebuild Build [MAJOR]{1}[MINOR]{2}[PATCH]{2}[BUILD]{2} */ - public static final int BUILD = 3050004; + public static final int BUILD = 3050005; static { // Driver for DB diff --git a/src/main/java/com/rebuild/core/service/trigger/impl/AutoApproval.java b/src/main/java/com/rebuild/core/service/trigger/impl/AutoApproval.java index 9081a123f..feededcb1 100644 --- a/src/main/java/com/rebuild/core/service/trigger/impl/AutoApproval.java +++ b/src/main/java/com/rebuild/core/service/trigger/impl/AutoApproval.java @@ -13,6 +13,8 @@ import com.rebuild.core.UserContextHolder; import com.rebuild.core.metadata.MetadataHelper; import com.rebuild.core.privileges.UserService; +import com.rebuild.core.service.approval.ApprovalHelper; +import com.rebuild.core.service.approval.ApprovalState; import com.rebuild.core.service.approval.ApprovalStepService; import com.rebuild.core.service.general.OperatingContext; import com.rebuild.core.service.trigger.ActionContext; @@ -68,7 +70,13 @@ public Object execute(OperatingContext operatingContext) throws TriggerException return FLAG_LAZY; } - ID recordId = operatingContext.getFixedRecordId(); + final ID recordId = operatingContext.getFixedRecordId(); + + ApprovalState currentState = ApprovalHelper.getApprovalState(recordId); + if (currentState == ApprovalState.PROCESSING || currentState == ApprovalState.APPROVED) { + return TriggerResult.wran("Ignored state"); + } + String useApproval = ((JSONObject) actionContext.getActionContent()).getString("useApproval"); // 优先使用当前用户 diff --git a/src/main/resources/web/assets/css/rb-page.css b/src/main/resources/web/assets/css/rb-page.css index 2fd332966..7cdc6a75e 100644 --- a/src/main/resources/web/assets/css/rb-page.css +++ b/src/main/resources/web/assets/css/rb-page.css @@ -5372,10 +5372,6 @@ div.dataTables_wrapper.compact div.dataTables_oper .btn-space { border-radius: 6px; } -.alert-mb-0 > .alert { - margin-bottom: 0; -} - .datetimepicker table tr .disabled, .datetimepicker table tr .disabled:hover { color: #b3b3b3 !important; diff --git a/src/main/resources/web/assets/js/rb-components.js b/src/main/resources/web/assets/js/rb-components.js index b696c4687..3ef3f918e 100644 --- a/src/main/resources/web/assets/js/rb-components.js +++ b/src/main/resources/web/assets/js/rb-components.js @@ -446,12 +446,12 @@ class RbAlertBox extends React.Component { if (!icon) icon = type === 'success' ? 'check' : type === 'danger' ? 'close-circle-o' : 'info-outline' return ( -
(this._element = c)}> +
(this._element = c)}>
- this._handleClose()} title={$L('关闭')}> + this._handleClose()} title={$L('关闭')} data-dismiss="alert">
{props.message || 'INMESSAGE'}
@@ -461,7 +461,7 @@ class RbAlertBox extends React.Component { } _handleClose() { - $unmount($(this._element).parent(), 10, true) + // $unmount($(this._element).parent(), 10, true) typeof this.props.onClose === 'function' && this.props.onClose() } } diff --git a/src/main/resources/web/assets/js/rb-datalist.common.js b/src/main/resources/web/assets/js/rb-datalist.common.js index d00049946..be755e888 100644 --- a/src/main/resources/web/assets/js/rb-datalist.common.js +++ b/src/main/resources/web/assets/js/rb-datalist.common.js @@ -634,9 +634,7 @@ class BatchApprove extends BatchOperator {