690513:0920 Refactor Workflow module: Lint error #01
CI / CD Pipeline / build (push) Failing after 10m44s
CI / CD Pipeline / deploy (push) Has been skipped

This commit is contained in:
2026-05-13 09:20:49 +07:00
parent e218fc826c
commit 5537d20152
299 changed files with 27326 additions and 2501 deletions
@@ -9,7 +9,7 @@ import { Delegation } from '../entities/delegation.entity';
export class CircularDetectionService {
constructor(
@InjectRepository(Delegation)
private readonly delegationRepo: Repository<Delegation>,
private readonly delegationRepo: Repository<Delegation>
) {}
/**
@@ -24,7 +24,7 @@ export class CircularDetectionService {
async wouldCreateCircle(
proposedFrom: number,
proposedTo: number,
today: Date = new Date(),
today: Date = new Date()
): Promise<boolean> {
// ถ้า A→B และ proposedFrom=B, proposedTo=A → circular ชัดเจน
if (proposedFrom === proposedTo) return true;
@@ -57,7 +57,7 @@ export class CircularDetectionService {
current: number,
target: number,
graph: Map<number, number[]>,
visited: Set<number>,
visited: Set<number>
): boolean {
if (current === target) return true;
if (visited.has(current)) return false;