feat/approval-0702 (#1279)
Reviewed-on: daoyoucloud/tachybase#1279 Reviewed-by: sealday <zhanglin@daoyoucloud.com> Co-authored-by: bai.zixv <bai.zixv@foxmail.com> Co-committed-by: bai.zixv <bai.zixv@foxmail.com>
This commit is contained in:
parent
7bfd26a2b3
commit
7036f3216c
@ -124,7 +124,7 @@ export const ViewActionLaunchContent = () => {
|
||||
type: 'void',
|
||||
'x-decorator': 'SchemaComponentContextProvider',
|
||||
'x-decorator-props': {
|
||||
designable: true,
|
||||
designable: false,
|
||||
},
|
||||
'x-component': 'RemoteSchemaComponent',
|
||||
'x-component-props': {
|
||||
|
@ -356,7 +356,6 @@
|
||||
"\"Content-Type\" only support \"application/json\", and no need to specify": "\"Content-Type\" 请求头仅支持 \"application/json\",无需填写",
|
||||
"concat": "连接",
|
||||
"ms": "毫秒",
|
||||
"reSubmit": "重新提交",
|
||||
"Are you sure you want to resubmit it?": "确定生成一份新的提交记录吗?"
|
||||
|
||||
"reSubmit": "需重新提交",
|
||||
"Are you sure you want to resubmit it?": "确定生成一份新的草稿吗?"
|
||||
}
|
||||
|
@ -74,19 +74,17 @@ export default class ApprovalTrigger extends Trigger {
|
||||
}
|
||||
const { approvalId, data, summary, collectionName } = execution.context;
|
||||
|
||||
// NOTE: 因为这里的原本的 data, 在重新提交后再次重新提交, 丢失了审批人之类的多对多关系数据
|
||||
// FIXME: 因为这里的原本的 data, 在重新提交后再次重新提交, 丢失了审批人之类的多对多关系数据
|
||||
// 找不到上下文传递数据的来源在哪里, 因此在这里重新取数据.因为存储的是快照, 这样是有其合理性的.
|
||||
const approval = await this.workflow.db.getRepository('approvals').findOne({
|
||||
filterByTk: approvalId,
|
||||
transaction,
|
||||
});
|
||||
// 不合理, 会导致其他错误出现. 从非审批中心发起的单子, 拿到的是错误的数据.
|
||||
// 现在的问题是, 多次复制后, 丢失了审批人, 等多对多的关联字段.
|
||||
|
||||
const approvalExecution = await this.workflow.db.getRepository('approvalExecutions').create({
|
||||
values: {
|
||||
approvalId,
|
||||
executionId: execution.id,
|
||||
status: execution.status,
|
||||
snapshot: approval?.data || data,
|
||||
snapshot: data,
|
||||
summary,
|
||||
collectionName,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user