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
@@ -14,7 +14,10 @@ export function validateDueDate(dueDate: Date): void {
/**
* ตรวจสอบ delegation date range ไม่เกิน 90 วัน
*/
export function validateDelegationDateRange(startDate: Date, endDate: Date): void {
export function validateDelegationDateRange(
startDate: Date,
endDate: Date
): void {
if (endDate <= startDate) {
throw new Error('End date must be after start date');
}
@@ -35,7 +38,7 @@ export function validateTaskCompletionRequirements(
taskStatus: string,
responseCodeId: number | undefined | null,
requiresComments: boolean,
comments: string | undefined | null,
comments: string | undefined | null
): void {
if (taskStatus === 'COMPLETED') {
if (!responseCodeId) {
@@ -54,11 +57,11 @@ export function validateTaskCompletionRequirements(
export function validateVersion(
expectedVersion: number,
actualVersion: number,
entityName: string,
entityName: string
): void {
if (actualVersion !== expectedVersion) {
throw new Error(
`Optimistic lock conflict on ${entityName}: expected version ${expectedVersion}, got ${actualVersion}. Please retry.`,
`Optimistic lock conflict on ${entityName}: expected version ${expectedVersion}, got ${actualVersion}. Please retry.`
);
}
}