diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-10-01 06:26:44 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-10-01 06:26:44 +0000 |
| commit | d689608ca2a54cab2cd12a12f0b6007a1be39ab2 (patch) | |
| tree | bb93e630c18b3028322f7f7aee87547e893f5df7 /lib/tbe-last | |
| parent | 7021eca8f53e398f55f775c6dc431bca9670fabe (diff) | |
(대표님, 최겸) 구매 견적 첨부파일 type 오류 수정, 문서확정, short list 기능 수정
Diffstat (limited to 'lib/tbe-last')
| -rw-r--r-- | lib/tbe-last/service.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/tbe-last/service.ts b/lib/tbe-last/service.ts index b69ab71c..da0a5a4c 100644 --- a/lib/tbe-last/service.ts +++ b/lib/tbe-last/service.ts @@ -6,7 +6,7 @@ import db from "@/db/db"; import { and, desc, asc, eq, sql, or, isNull, isNotNull, ne, inArray } from "drizzle-orm"; import { tbeLastView, tbeDocumentsView } from "@/db/schema"; import { rfqPrItems } from "@/db/schema/rfqLast"; -import { rfqLastTbeDocumentReviews, rfqLastTbePdftronComments, rfqLastTbeVendorDocuments,rfqLastTbeSessions } from "@/db/schema"; +import {rfqLastDetails, rfqLastTbeDocumentReviews, rfqLastTbePdftronComments, rfqLastTbeVendorDocuments,rfqLastTbeSessions } from "@/db/schema"; import { filterColumns } from "@/lib/filter-columns"; import { GetTBELastSchema } from "./validations"; import { getServerSession } from "next-auth" @@ -49,7 +49,11 @@ export async function getAllTBELast(input: GetTBELastSchema) { } // 최종 WHERE - const finalWhere = and(advancedWhere, globalWhere, ne(tbeLastView.status,"생성중")); + const whereConditions = [advancedWhere, ne(tbeLastView.sessionStatus,"생성중")]; + if (globalWhere) { + whereConditions.push(globalWhere); + } + const finalWhere = and(...whereConditions); // 정렬 const orderBy = input.sort?.length |
