feat: add disabled submit functionality to OcrDialog and enhance request list handling
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s
This commit is contained in:
parent
088f829146
commit
7679c076a7
3 changed files with 36 additions and 3 deletions
|
|
@ -52,25 +52,38 @@ function responsiblePerson(quotation: QuotationFull) {
|
|||
workflowTemplateStepId: string;
|
||||
}[] = [];
|
||||
|
||||
const userIds = new Set<string>();
|
||||
const groupKeys = new Set<string>();
|
||||
|
||||
for (const v of productServiceList) {
|
||||
const tempStep = v.service?.workflow?.step;
|
||||
|
||||
if (tempStep) {
|
||||
tempStep.forEach((lhs) => {
|
||||
for (const rhs of lhs.responsiblePerson) {
|
||||
tempPerson.push(rhs.user);
|
||||
if (!userIds.has(rhs.user.id)) {
|
||||
userIds.add(rhs.user.id);
|
||||
tempPerson.push(rhs.user);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
tempStep.forEach((lhs) => {
|
||||
const newGroup = lhs.responsibleGroup as unknown as {
|
||||
group: string;
|
||||
id: string;
|
||||
workflowTemplateStepId: string;
|
||||
}[];
|
||||
|
||||
for (const rhs of newGroup) {
|
||||
tempGroup.push(rhs);
|
||||
const key = `${rhs.group}-${rhs.id}-${rhs.workflowTemplateStepId}`;
|
||||
if (!groupKeys.has(key)) {
|
||||
groupKeys.add(key);
|
||||
tempGroup.push(rhs);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return { user: tempPerson, group: tempGroup };
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue