fix: approval submit (#1292)
Co-authored-by: sealday <sealday@gmail.com> Reviewed-on: https://git.daoyoucloud.com:8443/daoyoucloud/tachybase/pulls/1292
This commit is contained in:
parent
5c591652ec
commit
9e49680b83
@ -23,7 +23,7 @@ export function useCreateSubmit() {
|
|||||||
const { workflow } = useFlowContext();
|
const { workflow } = useFlowContext();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
async run({ approvalStatus }) {
|
async run(args) {
|
||||||
try {
|
try {
|
||||||
from.submit();
|
from.submit();
|
||||||
field.data = field.data || {};
|
field.data = field.data || {};
|
||||||
@ -33,7 +33,7 @@ export function useCreateSubmit() {
|
|||||||
values: {
|
values: {
|
||||||
collectionName: joinCollectionName(collection.dataSource, collection.name),
|
collectionName: joinCollectionName(collection.dataSource, collection.name),
|
||||||
data: _.omit(from.values, [collection.getPrimaryKey()]),
|
data: _.omit(from.values, [collection.getPrimaryKey()]),
|
||||||
status: typeof approvalStatus !== 'undefined' ? approvalStatus : status,
|
status: typeof args?.approvalStatus !== 'undefined' ? args?.approvalStatus : status,
|
||||||
workflowId: workflow.id,
|
workflowId: workflow.id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user