feat: check if pair over-shadowed by current worflow pair

This commit is contained in:
karishmas6
2024-06-08 00:39:59 +05:30
parent d4fb263bf5
commit e5e6771985

View File

@@ -554,5 +554,28 @@ export class WorkflowGenerator {
this.socket.emit('workflow', this.workflowRecord);
}
private IsOverShadowingAction = async (pair: WhereWhatPair, page: Page) => {
type possibleOverShadow = {
index: number;
isOverShadowing: boolean;
}
const possibleOverShadow: possibleOverShadow[] = [];
const haveSameUrl = this.workflowRecord.workflow
.filter((p, index) => {
if (p.where.url === pair.where.url) {
possibleOverShadow.push({index: index, isOverShadowing: false});
return true;
} else {
return false;
}
});
return possibleOverShadow;
}
}