edit order workflow
This commit is contained in:
parent
40c6cc32a7
commit
a9e3982217
1 changed files with 5 additions and 4 deletions
|
|
@ -125,7 +125,7 @@ export class WorkflowController extends Controller {
|
|||
);
|
||||
}),
|
||||
);
|
||||
|
||||
let num = 1;
|
||||
const stateOperatorUser = new StateOperatorUser();
|
||||
if (profile) {
|
||||
Object.assign(stateOperatorUser, {
|
||||
|
|
@ -133,7 +133,7 @@ export class WorkflowController extends Controller {
|
|||
profileEmployeeId: profileType != "OFFICER" ? profile.id : null,
|
||||
profileType: profileType,
|
||||
operator: "Owner",
|
||||
order: 1,
|
||||
order: num,
|
||||
workflowId: workflow.id,
|
||||
...meta,
|
||||
});
|
||||
|
|
@ -150,12 +150,13 @@ export class WorkflowController extends Controller {
|
|||
await Promise.all(
|
||||
profileOfficer.map(async (item, i) => {
|
||||
if (item.current_holderId) {
|
||||
num = num + 1;
|
||||
if (item.orgChild1 == null || item.orgChild1.isOfficer == false) {
|
||||
const stateOperatorUser = new StateOperatorUser();
|
||||
Object.assign(stateOperatorUser, {
|
||||
profileId: item.current_holderId,
|
||||
operator: "Officer",
|
||||
order: i + 2,
|
||||
order: num,
|
||||
workflowId: workflow.id,
|
||||
...meta,
|
||||
});
|
||||
|
|
@ -165,7 +166,7 @@ export class WorkflowController extends Controller {
|
|||
Object.assign(stateOperatorUser, {
|
||||
profileId: item.current_holderId,
|
||||
operator: "PersonnelOfficer",
|
||||
order: i + 2,
|
||||
order: num,
|
||||
workflowId: workflow.id,
|
||||
...meta,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue