summaryrefslogtreecommitdiff
path: root/lib/bidding/list
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bidding/list')
-rw-r--r--lib/bidding/list/biddings-table-columns.tsx30
-rw-r--r--lib/bidding/list/create-bidding-dialog.tsx23
-rw-r--r--lib/bidding/list/edit-bidding-sheet.tsx53
3 files changed, 103 insertions, 3 deletions
diff --git a/lib/bidding/list/biddings-table-columns.tsx b/lib/bidding/list/biddings-table-columns.tsx
index ed9d20e3..5240b134 100644
--- a/lib/bidding/list/biddings-table-columns.tsx
+++ b/lib/bidding/list/biddings-table-columns.tsx
@@ -5,9 +5,10 @@ import { type ColumnDef } from "@tanstack/react-table"
import { Checkbox } from "@/components/ui/checkbox"
import { Badge } from "@/components/ui/badge"
import { Button } from "@/components/ui/button"
-import {
+import {
Eye, Edit, MoreHorizontal, FileText, Users, Calendar,
- Building, Package, DollarSign, Clock, CheckCircle, XCircle
+ Building, Package, DollarSign, Clock, CheckCircle, XCircle,
+ AlertTriangle
} from "lucide-react"
import {
Tooltip,
@@ -136,6 +137,31 @@ export function getBiddingsColumns({ setRowAction }: GetColumnsProps): ColumnDef
meta: { excelHeader: "입찰상태" },
},
+ // ░░░ 긴급여부 ░░░
+ {
+ accessorKey: "isUrgent",
+ header: ({ column }) => <DataTableColumnHeaderSimple column={column} title="긴급여부" />,
+ cell: ({ row }) => {
+ const isUrgent = row.original.isUrgent
+
+ return isUrgent ? (
+ <div className="flex items-center gap-1">
+ <AlertTriangle className="h-4 w-4 text-red-600" />
+ <Badge variant="destructive" className="text-xs">
+ 긴급
+ </Badge>
+ </div>
+ ) : (
+ <div className="flex items-center gap-1">
+ <CheckCircle className="h-4 w-4 text-green-600" />
+ <span className="text-xs text-muted-foreground">일반</span>
+ </div>
+ )
+ },
+ size: 90,
+ meta: { excelHeader: "긴급여부" },
+ },
+
// ░░░ 사전견적 ░░░
{
id: "preQuote",
diff --git a/lib/bidding/list/create-bidding-dialog.tsx b/lib/bidding/list/create-bidding-dialog.tsx
index f21782ff..57cc1002 100644
--- a/lib/bidding/list/create-bidding-dialog.tsx
+++ b/lib/bidding/list/create-bidding-dialog.tsx
@@ -1793,6 +1793,29 @@ export function CreateBiddingDialog() {
<FormField
control={form.control}
+ name="isUrgent"
+ render={({ field }) => (
+ <FormItem className="flex flex-row items-center justify-between rounded-lg border p-4">
+ <div className="space-y-0.5">
+ <FormLabel className="text-base">
+ 긴급 입찰
+ </FormLabel>
+ <FormDescription>
+ 긴급 입찰 여부를 설정합니다
+ </FormDescription>
+ </div>
+ <FormControl>
+ <Switch
+ checked={field.value}
+ onCheckedChange={field.onChange}
+ />
+ </FormControl>
+ </FormItem>
+ )}
+ />
+
+ <FormField
+ control={form.control}
name="remarks"
render={({ field }) => (
<FormItem>
diff --git a/lib/bidding/list/edit-bidding-sheet.tsx b/lib/bidding/list/edit-bidding-sheet.tsx
index 71eeed2b..c76ec2a2 100644
--- a/lib/bidding/list/edit-bidding-sheet.tsx
+++ b/lib/bidding/list/edit-bidding-sheet.tsx
@@ -98,9 +98,11 @@ export function EditBiddingSheet({
budget: "",
targetPrice: "",
finalBidPrice: "",
+
+ isPublic: false,
+ isUrgent: false,
status: "bidding_generated",
- isPublic: false,
managerName: "",
managerEmail: "",
managerPhone: "",
@@ -143,6 +145,7 @@ export function EditBiddingSheet({
status: bidding.status || "bidding_generated",
isPublic: bidding.isPublic || false,
+ isUrgent: bidding.isUrgent || false,
managerName: bidding.managerName || "",
managerEmail: bidding.managerEmail || "",
managerPhone: bidding.managerPhone || "",
@@ -377,6 +380,54 @@ export function EditBiddingSheet({
</FormItem>
)}
/>
+
+ <div className="space-y-3">
+ <FormField
+ control={form.control}
+ name="isPublic"
+ render={({ field }) => (
+ <FormItem className="flex flex-row items-center justify-between rounded-lg border p-3">
+ <div className="space-y-0.5">
+ <FormLabel className="text-sm">
+ 공개 입찰
+ </FormLabel>
+ <FormDescription className="text-xs">
+ 공개 입찰 여부를 설정합니다
+ </FormDescription>
+ </div>
+ <FormControl>
+ <Switch
+ checked={field.value}
+ onCheckedChange={field.onChange}
+ />
+ </FormControl>
+ </FormItem>
+ )}
+ />
+
+ <FormField
+ control={form.control}
+ name="isUrgent"
+ render={({ field }) => (
+ <FormItem className="flex flex-row items-center justify-between rounded-lg border p-3">
+ <div className="space-y-0.5">
+ <FormLabel className="text-sm">
+ 긴급 입찰
+ </FormLabel>
+ <FormDescription className="text-xs">
+ 긴급 입찰 여부를 설정합니다
+ </FormDescription>
+ </div>
+ <FormControl>
+ <Switch
+ checked={field.value}
+ onCheckedChange={field.onChange}
+ />
+ </FormControl>
+ </FormItem>
+ )}
+ />
+ </div>
</CardContent>
</Card>