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,7 @@ export class ResponseCodeService {
@InjectRepository(ResponseCode)
private readonly responseCodeRepo: Repository<ResponseCode>,
@InjectRepository(ResponseCodeRule)
private readonly responseCodeRuleRepo: Repository<ResponseCodeRule>,
private readonly responseCodeRuleRepo: Repository<ResponseCodeRule>
) {}
/**
@@ -31,7 +31,9 @@ export class ResponseCodeService {
* ดึง Response Codes ตาม Category (FR-006)
* ใช้สำหรับแสดงผลใน Review page ตามประเภทเอกสาร
*/
async findByCategory(category: ResponseCodeCategory): Promise<ResponseCode[]> {
async findByCategory(
category: ResponseCodeCategory
): Promise<ResponseCode[]> {
return this.responseCodeRepo.find({
where: { category, isActive: true },
order: { code: 'ASC' },
@@ -44,7 +46,7 @@ export class ResponseCodeService {
*/
async findByDocumentType(
documentTypeId: number,
projectId?: number,
projectId?: number
): Promise<ResponseCode[]> {
// ดึง Rules ระดับ Project (ถ้ามี) หรือ Global default
const rules = await this.responseCodeRuleRepo.find({
@@ -64,7 +66,7 @@ export class ResponseCodeService {
}
return Array.from(codeMap.values()).sort((a, b) =>
a.code.localeCompare(b.code),
a.code.localeCompare(b.code)
);
}