mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-09 23:49:27 +08:00
Merge branch 'main' into next
This commit is contained in:
commit
2681953c9d
@ -183,7 +183,7 @@ describe('workflow > instructions > manual', () => {
|
|||||||
expect(job.result).toEqual({ f1: { a: 2 }, _: 'resolve' });
|
expect(job.result).toEqual({ f1: { a: 2 }, _: 'resolve' });
|
||||||
});
|
});
|
||||||
|
|
||||||
it('values rejected will not be overrided by action assigned', async () => {
|
it('values rejected will be overrided by action assigned', async () => {
|
||||||
const n1 = await workflow.createNode({
|
const n1 = await workflow.createNode({
|
||||||
type: 'manual',
|
type: 'manual',
|
||||||
config: {
|
config: {
|
||||||
@ -230,7 +230,7 @@ describe('workflow > instructions > manual', () => {
|
|||||||
expect(execution.status).toBe(EXECUTION_STATUS.REJECTED);
|
expect(execution.status).toBe(EXECUTION_STATUS.REJECTED);
|
||||||
const [job] = await execution.getJobs();
|
const [job] = await execution.getJobs();
|
||||||
expect(job.status).toBe(JOB_STATUS.REJECTED);
|
expect(job.status).toBe(JOB_STATUS.REJECTED);
|
||||||
expect(job.result).toEqual({ f1: { a: 1 }, _: 'reject' });
|
expect(job.result).toEqual({ f1: { a: 2 }, _: 'reject' });
|
||||||
});
|
});
|
||||||
|
|
||||||
it('values saved as pending will not be overrided by action assigned', async () => {
|
it('values saved as pending will not be overrided by action assigned', async () => {
|
||||||
|
@ -84,10 +84,9 @@ export async function submit(context: Context, next) {
|
|||||||
|
|
||||||
userJob.set({
|
userJob.set({
|
||||||
status: actionItem.status,
|
status: actionItem.status,
|
||||||
result:
|
result: actionItem.status
|
||||||
actionItem.status > JOB_STATUS.PENDING
|
? { [formKey]: Object.assign(values.result[formKey], presetValues), _: actionKey }
|
||||||
? { [formKey]: Object.assign(values.result[formKey], presetValues), _: actionKey }
|
: Object.assign(userJob.result ?? {}, values.result),
|
||||||
: Object.assign(userJob.result ?? {}, values.result),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const handler = instruction.formTypes.get(forms[formKey].type);
|
const handler = instruction.formTypes.get(forms[formKey].type);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user