blob: 80b831e0379136e37f02e6957e420059b29059ab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
"use server"
import { revalidatePath } from "next/cache"
import {
acceptTechSalesVendorQuotation
} from "./service"
/**
* 기술영업 벤더 견적 승인 (벤더 선택) Server Action
*/
export async function acceptTechSalesVendorQuotationAction(quotationId: number) {
try {
const result = await acceptTechSalesVendorQuotation(quotationId)
if (result.success) {
// 관련 페이지들 재검증
revalidatePath("/evcp/budgetary-tech-sales-ship")
revalidatePath("/partners/techsales")
return { success: true, message: "벤더가 성공적으로 선택되었습니다" }
} else {
return { success: false, error: result.error }
}
} catch (error) {
console.error("벤더 선택 액션 오류:", error)
return {
success: false,
error: error instanceof Error ? error.message : "벤더 선택에 실패했습니다"
}
}
}
|