summaryrefslogtreecommitdiff
path: root/lib/vendor-pool/table/vendor-pool-table-columns.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'lib/vendor-pool/table/vendor-pool-table-columns.tsx')
-rw-r--r--lib/vendor-pool/table/vendor-pool-table-columns.tsx40
1 files changed, 3 insertions, 37 deletions
diff --git a/lib/vendor-pool/table/vendor-pool-table-columns.tsx b/lib/vendor-pool/table/vendor-pool-table-columns.tsx
index 897b8b1e..5676250b 100644
--- a/lib/vendor-pool/table/vendor-pool-table-columns.tsx
+++ b/lib/vendor-pool/table/vendor-pool-table-columns.tsx
@@ -19,7 +19,6 @@ interface VendorPoolTableMeta {
onSaveEmptyRow?: (tempId: string) => Promise<void>
onCancelEmptyRow?: (tempId: string) => void
isEmptyRow?: (id: string) => boolean
- onTaxIdChange?: (id: string, taxId: string) => Promise<void>
}
// Vendor Pool 데이터 타입 - 스키마 기반 + 테이블용 추가 필드
@@ -430,6 +429,7 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
id: 0, // 실제로는 vendorId가 있어야 하지만 여기서는 임시로 0 사용
vendorName,
vendorCode: vendorCode || null,
+ taxId: null, // 사업자번호는 vendor-pool에서 관리하지 않음
status: "ACTIVE", // 임시 값
displayText: vendorName + (vendorCode ? ` (${vendorCode})` : "")
} : null
@@ -438,18 +438,16 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
console.log('선택된 협력업체:', vendor)
if (vendor) {
- // 협력업체코드, 협력업체명, 사업자번호 필드 모두 업데이트
+ // 협력업체코드, 협력업체명 필드 업데이트
if (table.options.meta?.onCellUpdate) {
await table.options.meta.onCellUpdate(row.original.id, "vendorCode", vendor.vendorCode || "")
await table.options.meta.onCellUpdate(row.original.id, "vendorName", vendor.vendorName)
- await table.options.meta.onCellUpdate(row.original.id, "taxId", vendor.taxId || "")
}
} else {
// 선택 해제 시 빈 값으로 설정
if (table.options.meta?.onCellUpdate) {
await table.options.meta.onCellUpdate(row.original.id, "vendorCode", "")
await table.options.meta.onCellUpdate(row.original.id, "vendorName", "")
- await table.options.meta.onCellUpdate(row.original.id, "taxId", "")
}
}
}
@@ -532,38 +530,6 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
size: 130,
},
{
- accessorKey: "taxId",
- header: ({ column }) => (
- <DataTableColumnHeaderSimple column={column} title={<span className="text-red-600 font-medium">사업자번호 *</span>} />
- ),
- cell: ({ row, table }) => {
- const value = row.getValue("taxId")
- const onSave = async (newValue: any) => {
- if (table.options.meta?.onCellUpdate) {
- await table.options.meta.onCellUpdate(row.original.id, "taxId", newValue)
- }
- }
-
- const onChange = async (newValue: any) => {
- if (table.options.meta?.onTaxIdChange) {
- await table.options.meta.onTaxIdChange(row.original.id, newValue)
- }
- }
-
- return (
- <EditableCell
- value={value}
- type="text"
- onSave={onSave}
- onChange={onChange}
- placeholder="사업자번호 입력"
- maxLength={50}
- />
- )
- },
- size: 120,
- },
- {
accessorKey: "faTarget",
header: "FA대상",
cell: ({ row, table }) => {
@@ -727,6 +693,7 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
id: 0, // 실제로는 vendorId가 있어야 하지만 여기서는 임시로 0 사용
vendorName: contractSignerName,
vendorCode: contractSignerCode || null,
+ taxId: null, // 사업자번호는 vendor-pool에서 관리하지 않음
status: "ACTIVE", // 임시 값
displayText: contractSignerName + (contractSignerCode ? ` (${contractSignerCode})` : "")
} : null
@@ -736,7 +703,6 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
if (vendor) {
// 계약서명주체코드와 계약서명주체명 필드 업데이트
- // 사업자번호는 협력업체 선택 시에만 업데이트됨 (taxId 필드가 하나만 존재)
if (table.options.meta?.onCellUpdate) {
await table.options.meta.onCellUpdate(row.original.id, "contractSignerCode", vendor.vendorCode || "")
await table.options.meta.onCellUpdate(row.original.id, "contractSignerName", vendor.vendorName)