summaryrefslogtreecommitdiff
path: root/components/bidding/manage/bidding-items-editor.tsx
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-11-18 10:30:31 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-11-18 10:30:31 +0000
commitc4f5472b961afb237dc819f9dd3f42a7b8f71075 (patch)
treea1c0d00e46a005ff472bf1125e739bae73b0a53e /components/bidding/manage/bidding-items-editor.tsx
parent1d1f6010704a1d655b3007887db0fe3ac866177a (diff)
(최겸) 구매 입찰 수정, 입찰초대 결재 등록, 재입찰, 차수증가, 폐찰, 유찰취소 로직 수정, readonly 추가 등
Diffstat (limited to 'components/bidding/manage/bidding-items-editor.tsx')
-rw-r--r--components/bidding/manage/bidding-items-editor.tsx49
1 files changed, 26 insertions, 23 deletions
diff --git a/components/bidding/manage/bidding-items-editor.tsx b/components/bidding/manage/bidding-items-editor.tsx
index dc0aaeec..38113dfa 100644
--- a/components/bidding/manage/bidding-items-editor.tsx
+++ b/components/bidding/manage/bidding-items-editor.tsx
@@ -76,6 +76,7 @@ interface PRItemInfo {
interface BiddingItemsEditorProps {
biddingId: number
+ readonly?: boolean
}
import { removeBiddingItem, addPRItemForBidding, getBiddingById, getBiddingConditions } from '@/lib/bidding/service'
@@ -84,7 +85,7 @@ import { ProcurementItemSelectorDialogSingle } from '@/components/common/selecto
import { Textarea } from '@/components/ui/textarea'
import { Label } from '@/components/ui/label'
-export function BiddingItemsEditor({ biddingId }: BiddingItemsEditorProps) {
+export function BiddingItemsEditor({ biddingId, readonly = false }: BiddingItemsEditorProps) {
const { data: session } = useSession()
const [items, setItems] = React.useState<PRItemInfo[]>([])
const [isLoading, setIsLoading] = React.useState(false)
@@ -620,7 +621,7 @@ export function BiddingItemsEditor({ biddingId }: BiddingItemsEditorProps) {
/>
</td>
<td className="border-r px-3 py-2">
- {biddingType === 'equipment' ? (
+ {biddingType !== 'equipment' ? (
<ProcurementItemSelectorDialogSingle
triggerLabel={item.materialGroupNumber || "품목 선택"}
triggerVariant="outline"
@@ -642,8 +643,8 @@ export function BiddingItemsEditor({ biddingId }: BiddingItemsEditorProps) {
})
}
}}
- title="품목 선택"
- description="품목을 검색하고 선택해주세요."
+ title="1회성 품목 선택"
+ description="1회성 품목을 검색하고 선택해주세요."
/>
) : (
<MaterialGroupSelectorDialogSingle
@@ -1149,25 +1150,27 @@ export function BiddingItemsEditor({ biddingId }: BiddingItemsEditorProps) {
</Card>
{/* 액션 버튼 */}
- <div className="flex justify-end gap-4">
- <Button
- onClick={handleSave}
- disabled={isSubmitting}
- className="min-w-[120px]"
- >
- {isSubmitting ? (
- <>
- <RefreshCw className="w-4 h-4 mr-2 animate-spin" />
- 저장 중...
- </>
- ) : (
- <>
- <Save className="w-4 h-4 mr-2" />
- 저장
- </>
- )}
- </Button>
- </div>
+ {!readonly && (
+ <div className="flex justify-end gap-4">
+ <Button
+ onClick={handleSave}
+ disabled={isSubmitting}
+ className="min-w-[120px]"
+ >
+ {isSubmitting ? (
+ <>
+ <RefreshCw className="w-4 h-4 mr-2 animate-spin" />
+ 저장 중...
+ </>
+ ) : (
+ <>
+ <Save className="w-4 h-4 mr-2" />
+ 저장
+ </>
+ )}
+ </Button>
+ </div>
+ )}
{/* 사전견적용 일반견적 생성 다이얼로그 */}
<CreatePreQuoteRfqDialog