feat/approval-0702 (#1266)
Reviewed-on: daoyoucloud/tachybase#1266 Co-authored-by: bai.zixv <bai.zixv@foxmail.com> Co-committed-by: bai.zixv <bai.zixv@foxmail.com>
This commit is contained in:
parent
0d8bbba1da
commit
37103eac50
@ -32,6 +32,7 @@ export function useSubmit() {
|
||||
data: form.values,
|
||||
status: contextApprovalStatus,
|
||||
schemaFormId: workflow.config.applyForm,
|
||||
summaryConfig: workflow.config.summary,
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -6,7 +6,7 @@ import { useHandleRefresh } from '../../common/useHandleRefresh';
|
||||
|
||||
// 撤回
|
||||
export function useWithdrawAction() {
|
||||
const { refreshTable } = useHandleRefresh(100);
|
||||
const { refreshTable } = useHandleRefresh();
|
||||
|
||||
const field = useField();
|
||||
const approval = useApproval();
|
||||
|
@ -76,8 +76,7 @@ const approvals = {
|
||||
return actions.create(context, next);
|
||||
},
|
||||
async update(context, next) {
|
||||
const { collectionName, data, status, schemaFormId } = context.action.params.values ?? {};
|
||||
|
||||
const { collectionName, data, status, schemaFormId, summaryConfig } = context.action.params.values ?? {};
|
||||
const [dataSourceName, cName] = parseCollectionName(collectionName);
|
||||
const dataSource = context.app.dataSourceManager.dataSources.get(dataSourceName);
|
||||
const collection = dataSource.collectionManager.getCollection(cName);
|
||||
@ -98,11 +97,18 @@ const approvals = {
|
||||
values: data,
|
||||
updateAssociationValues,
|
||||
});
|
||||
|
||||
const summary = getSummary({
|
||||
summaryConfig,
|
||||
data: data,
|
||||
});
|
||||
|
||||
context.action.mergeParams({
|
||||
values: {
|
||||
status: status ?? APPROVAL_STATUS.SUBMITTED,
|
||||
data: target.toJSON(),
|
||||
applicantRoleName: context.state.currentRole,
|
||||
summary,
|
||||
},
|
||||
});
|
||||
return actions.update(context, next);
|
||||
|
Loading…
Reference in New Issue
Block a user