diff options
Diffstat (limited to 'components/bidding/manage/bidding-items-editor.tsx')
| -rw-r--r-- | components/bidding/manage/bidding-items-editor.tsx | 49 |
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 |
