summaryrefslogtreecommitdiff
path: root/lib/vendor-investigation/table/investigation-table-columns.tsx
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-08-26 01:17:56 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-08-26 01:17:56 +0000
commit12e936c0b45ffa1c8f3c02ff77961212767be9a7 (patch)
tree34f31b9a64c6d30e187c1114530c4d47b95d30a9 /lib/vendor-investigation/table/investigation-table-columns.tsx
parent83f67ed333f0237b434a41d1eceef417c0d48313 (diff)
(대표님) 가입, 기본계약, 벤더
(최겸) 기술영업 아이템 관련
Diffstat (limited to 'lib/vendor-investigation/table/investigation-table-columns.tsx')
-rw-r--r--lib/vendor-investigation/table/investigation-table-columns.tsx29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/vendor-investigation/table/investigation-table-columns.tsx b/lib/vendor-investigation/table/investigation-table-columns.tsx
index 521befa9..a6c1574d 100644
--- a/lib/vendor-investigation/table/investigation-table-columns.tsx
+++ b/lib/vendor-investigation/table/investigation-table-columns.tsx
@@ -26,6 +26,22 @@ interface GetVendorInvestigationsColumnsProps {
openVendorDetailsModal?: (vendorId: number) => void
}
+// Helper function for investigation method variants
+function getMethodVariant(method: string): "default" | "secondary" | "outline" | "destructive" {
+ switch (method) {
+ case "PURCHASE_SELF_EVAL":
+ return "secondary"
+ case "DOCUMENT_EVAL":
+ return "outline"
+ case "PRODUCT_INSPECTION":
+ return "default"
+ case "SITE_VISIT_EVAL":
+ return "destructive"
+ default:
+ return "outline"
+ }
+}
+
export function getColumns({
setRowAction,
openVendorDetailsModal,
@@ -168,6 +184,17 @@ export function getColumns({
)
}
+ // Handle investigation method
+ if (column.id === "investigationMethod") {
+ if (!value) return ""
+
+ return (
+ <Badge variant={getMethodVariant(value as string)}>
+ {formatEnumValue(value as string)}
+ </Badge>
+ )
+ }
+
// Handle evaluation result
if (column.id === "evaluationResult") {
if (!value) return ""
@@ -340,6 +367,8 @@ function getStatusVariant(status: string): "default" | "secondary" | "outline" |
}
}
+
+
function getResultVariant(result: string): "default" | "secondary" | "outline" | "destructive" {
switch (result) {
case "APPROVED":