Merge pull request '나머지 위젯들도 샤드시옌처리(주석처리된 위젯)' (#165) from lhj into main

Reviewed-on: http://39.117.244.52:3000/kjs/ERP-node/pulls/165
This commit is contained in:
hjlee 2025-10-29 18:04:47 +09:00
commit c6a51279d6
11 changed files with 38 additions and 38 deletions

View File

@ -163,14 +163,14 @@ export default function BookingAlertWidget({ element }: BookingAlertWidgetProps)
<div className="flex items-center gap-2">
<h3 className="text-lg font-bold text-foreground">{element?.customTitle || "예약 요청 알림"}</h3>
{newCount > 0 && (
<span className="flex h-6 w-6 items-center justify-center rounded-full bg-destructive text-xs font-bold text-white">
<span className="flex h-6 w-6 items-center justify-center rounded-full bg-destructive text-xs font-bold text-primary-foreground">
{newCount}
</span>
)}
</div>
<button
onClick={fetchBookings}
className="rounded-lg bg-primary px-3 py-1.5 text-sm text-white transition-colors hover:bg-primary/90"
className="rounded-lg bg-primary px-3 py-1.5 text-sm text-primary-foreground transition-colors hover:bg-primary/90"
>
🔄
</button>
@ -183,7 +183,7 @@ export default function BookingAlertWidget({ element }: BookingAlertWidgetProps)
key={f}
onClick={() => setFilter(f)}
className={`rounded px-3 py-1 text-xs font-medium transition-colors ${
filter === f ? "bg-primary text-white" : "bg-muted text-foreground hover:bg-muted"
filter === f ? "bg-primary text-primary-foreground" : "bg-muted text-foreground hover:bg-muted"
}`}
>
{f === "pending" ? "대기중" : f === "accepted" ? "수락됨" : "전체"}
@ -213,7 +213,7 @@ export default function BookingAlertWidget({ element }: BookingAlertWidgetProps)
{/* NEW 뱃지 */}
{isNew(booking.createdAt) && booking.status === "pending" && (
<div className="absolute -right-2 -top-2 animate-bounce">
<span className="flex h-12 w-12 items-center justify-center rounded-full bg-destructive text-xs font-bold text-white shadow-lg">
<span className="flex h-12 w-12 items-center justify-center rounded-full bg-destructive text-xs font-bold text-primary-foreground shadow-lg">
🆕
</span>
</div>
@ -245,14 +245,14 @@ export default function BookingAlertWidget({ element }: BookingAlertWidgetProps)
<div className="flex gap-1">
<button
onClick={() => handleAccept(booking.id)}
className="flex items-center gap-1 rounded bg-success px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-success/90"
className="flex items-center gap-1 rounded bg-success px-3 py-1.5 text-sm font-medium text-primary-foreground transition-colors hover:bg-success/90"
>
<Check className="h-4 w-4" />
</button>
<button
onClick={() => handleReject(booking.id)}
className="flex items-center gap-1 rounded bg-destructive px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-destructive/90"
className="flex items-center gap-1 rounded bg-destructive px-3 py-1.5 text-sm font-medium text-primary-foreground transition-colors hover:bg-destructive/90"
>
<X className="h-4 w-4" />

View File

@ -217,7 +217,7 @@ export default function CalculatorWidget({ element, className = '' }: Calculator
<Button
variant="default"
onClick={() => handleOperation('÷')}
className="h-full text-xs sm:text-base bg-primary hover:bg-primary/90 text-white font-semibold select-none"
className="h-full text-xs sm:text-base bg-primary hover:bg-primary/90 text-primary-foreground font-semibold select-none"
>
÷
</Button>
@ -247,7 +247,7 @@ export default function CalculatorWidget({ element, className = '' }: Calculator
<Button
variant="default"
onClick={() => handleOperation('×')}
className="h-full text-xs sm:text-base bg-primary hover:bg-primary/90 text-white font-semibold select-none"
className="h-full text-xs sm:text-base bg-primary hover:bg-primary/90 text-primary-foreground font-semibold select-none"
>
×
</Button>
@ -277,7 +277,7 @@ export default function CalculatorWidget({ element, className = '' }: Calculator
<Button
variant="default"
onClick={() => handleOperation('-')}
className="h-full text-xs sm:text-base bg-primary hover:bg-primary/90 text-white font-semibold select-none"
className="h-full text-xs sm:text-base bg-primary hover:bg-primary/90 text-primary-foreground font-semibold select-none"
>
-
</Button>
@ -307,7 +307,7 @@ export default function CalculatorWidget({ element, className = '' }: Calculator
<Button
variant="default"
onClick={() => handleOperation('+')}
className="h-full text-xs sm:text-base bg-primary hover:bg-primary/90 text-white font-semibold select-none"
className="h-full text-xs sm:text-base bg-primary hover:bg-primary/90 text-primary-foreground font-semibold select-none"
>
+
</Button>
@ -330,7 +330,7 @@ export default function CalculatorWidget({ element, className = '' }: Calculator
<Button
variant="default"
onClick={handleEquals}
className="h-full text-xs sm:text-base bg-success hover:bg-success/90 text-white font-semibold select-none"
className="h-full text-xs sm:text-base bg-success hover:bg-success/90 text-primary-foreground font-semibold select-none"
>
=
</Button>

View File

@ -603,7 +603,7 @@ export default function CustomStatsWidget({ element, refreshInterval = 60000 }:
indigo: { bg: "bg-primary/10", text: "text-primary" },
green: { bg: "bg-success/10", text: "text-success" },
blue: { bg: "bg-primary/10", text: "text-primary" },
purple: { bg: "bg-purple-500/10", text: "text-purple-500" },
purple: { bg: "bg-primary/10", text: "text-primary" },
orange: { bg: "bg-warning/10", text: "text-warning" },
yellow: { bg: "bg-warning/10", text: "text-warning" },
cyan: { bg: "bg-primary/10", text: "text-primary" },
@ -634,7 +634,7 @@ export default function CustomStatsWidget({ element, refreshInterval = 60000 }:
{!element?.dataSource?.query && <div className="mt-2 text-xs text-muted-foreground"> </div>}
<button
onClick={loadData}
className="mt-3 rounded-lg bg-primary px-4 py-2 text-sm text-white hover:bg-primary/90"
className="mt-3 rounded-lg bg-primary px-4 py-2 text-sm text-primary-foreground hover:bg-primary/90"
>
</button>
@ -772,7 +772,7 @@ export default function CustomStatsWidget({ element, refreshInterval = 60000 }:
<div className="mt-6 flex gap-2">
<button
onClick={handleApplySettings}
className="flex-1 rounded-lg bg-primary py-2 text-white hover:bg-primary/90"
className="flex-1 rounded-lg bg-primary py-2 text-primary-foreground hover:bg-primary/90"
>
({selectedStats.length} )
</button>

View File

@ -133,7 +133,7 @@ export default function DocumentWidget({ element }: DocumentWidgetProps) {
<div className="border-b border-border bg-background px-4 py-3">
<div className="mb-3 flex items-center justify-between">
<h3 className="text-lg font-bold text-foreground">{element?.customTitle || "문서 관리"}</h3>
<button className="rounded-lg bg-primary px-3 py-1.5 text-sm text-white transition-colors hover:bg-primary/90">
<button className="rounded-lg bg-primary px-3 py-1.5 text-sm text-primary-foreground transition-colors hover:bg-primary/90">
+
</button>
</div>
@ -177,7 +177,7 @@ export default function DocumentWidget({ element }: DocumentWidgetProps) {
key={f}
onClick={() => setFilter(f)}
className={`rounded px-3 py-1 text-xs font-medium transition-colors ${
filter === f ? "bg-primary text-white" : "bg-muted text-foreground hover:bg-muted"
filter === f ? "bg-primary text-primary-foreground" : "bg-muted text-foreground hover:bg-muted"
}`}
>
{f === "all" ? "전체" : f}
@ -232,7 +232,7 @@ export default function DocumentWidget({ element }: DocumentWidgetProps) {
{/* 다운로드 버튼 */}
<button
onClick={() => handleDownload(doc)}
className="flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-lg bg-primary text-white transition-colors hover:bg-primary/90"
className="flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-lg bg-primary text-primary-foreground transition-colors hover:bg-primary/90"
title="다운로드"
>
<Download className="h-4 w-4" />

View File

@ -120,7 +120,7 @@ export default function MaintenanceWidget() {
<div className="border-b border-border bg-background px-4 py-3">
<div className="mb-3 flex items-center justify-between">
<h3 className="text-lg font-bold text-foreground">🔧 </h3>
<button className="rounded-lg bg-primary px-3 py-1.5 text-sm text-white transition-colors hover:bg-primary/90">
<button className="rounded-lg bg-primary px-3 py-1.5 text-sm text-primary-foreground transition-colors hover:bg-primary/90">
+
</button>
</div>
@ -152,7 +152,7 @@ export default function MaintenanceWidget() {
key={f}
onClick={() => setFilter(f)}
className={`rounded px-3 py-1 text-xs font-medium transition-colors ${
filter === f ? "bg-primary text-white" : "bg-muted text-foreground hover:bg-muted"
filter === f ? "bg-primary text-primary-foreground" : "bg-muted text-foreground hover:bg-muted"
}`}
>
{f === "all" ? "전체" : f === "scheduled" ? "예정" : f === "in_progress" ? "진행중" : "지연"}
@ -218,7 +218,7 @@ export default function MaintenanceWidget() {
{/* 액션 버튼 */}
{schedule.status === "scheduled" && (
<div className="mt-3 flex gap-2">
<button className="flex-1 rounded bg-primary px-3 py-1.5 text-xs font-medium text-white hover:bg-primary/90">
<button className="flex-1 rounded bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90">
</button>
<button className="flex-1 rounded bg-muted px-3 py-1.5 text-xs font-medium text-foreground hover:bg-muted/90">
@ -228,7 +228,7 @@ export default function MaintenanceWidget() {
)}
{schedule.status === "in_progress" && (
<div className="mt-3">
<button className="w-full rounded bg-success px-3 py-1.5 text-xs font-medium text-white hover:bg-success/90">
<button className="w-full rounded bg-success px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-success/90">
<Check className="mr-1 inline h-3 w-3" />
</button>

View File

@ -270,7 +270,7 @@ export default function StatusSummaryWidget({
red: { border: "border-destructive", dot: "bg-destructive", text: "text-destructive" },
yellow: { border: "border-warning", dot: "bg-warning", text: "text-warning" },
orange: { border: "border-warning", dot: "bg-warning", text: "text-warning" },
purple: { border: "border-purple-500", dot: "bg-purple-500/100", text: "text-purple-500" },
purple: { border: "border-primary", dot: "bg-primary", text: "text-primary" },
gray: { border: "border-border", dot: "bg-muted-foreground", text: "text-muted-foreground" },
};

View File

@ -572,7 +572,7 @@ export default function TaskWidget({ element }: TaskWidgetProps) {
</div>
<button
onClick={() => setShowAddForm(!showAddForm)}
className="flex items-center gap-1 rounded-lg bg-primary px-3 py-1.5 text-sm text-white transition-colors hover:bg-primary/90"
className="flex items-center gap-1 rounded-lg bg-primary px-3 py-1.5 text-sm text-primary-foreground transition-colors hover:bg-primary/90"
>
<Plus className="h-4 w-4" />
@ -610,7 +610,7 @@ export default function TaskWidget({ element }: TaskWidgetProps) {
key={f}
onClick={() => setFilter(f)}
className={`rounded px-3 py-1 text-xs font-medium transition-colors ${
filter === f ? "bg-primary text-white" : "bg-muted text-foreground hover:bg-muted"
filter === f ? "bg-primary text-primary-foreground" : "bg-muted text-foreground hover:bg-muted"
}`}
>
{f === "all" ? "전체" : f === "pending" ? "대기" : f === "in_progress" ? "진행중" : "완료"}
@ -672,7 +672,7 @@ export default function TaskWidget({ element }: TaskWidgetProps) {
<div className="flex gap-2">
<button
onClick={handleAddTask}
className="flex-1 rounded bg-primary px-4 py-2 text-sm text-white hover:bg-primary/90"
className="flex-1 rounded bg-primary px-4 py-2 text-sm text-primary-foreground hover:bg-primary/90"
>
</button>

View File

@ -349,7 +349,7 @@ export default function TodoWidget({ element }: TodoWidgetProps) {
{/* 추가 버튼 - 항상 표시 */}
<button
onClick={() => setShowAddForm(!showAddForm)}
className="flex items-center gap-1 rounded-lg bg-primary px-3 py-1.5 text-sm text-white transition-colors hover:bg-primary/90"
className="flex items-center gap-1 rounded-lg bg-primary px-3 py-1.5 text-sm text-primary-foreground transition-colors hover:bg-primary/90"
title="할 일 추가"
>
<Plus className="h-4 w-4" />
@ -391,7 +391,7 @@ export default function TodoWidget({ element }: TodoWidgetProps) {
onClick={() => setFilter(f)}
className={`rounded px-3 py-1 text-xs font-medium transition-colors ${
filter === f
? "bg-primary text-white"
? "bg-primary text-primary-foreground"
: "bg-muted text-foreground hover:bg-muted"
}`}
>
@ -454,7 +454,7 @@ export default function TodoWidget({ element }: TodoWidgetProps) {
<div className="flex gap-2">
<button
onClick={handleAddTodo}
className="flex-1 rounded bg-primary px-4 py-2 text-sm text-white hover:bg-primary/90"
className="flex-1 rounded bg-primary px-4 py-2 text-sm text-primary-foreground hover:bg-primary/90"
>
</button>

View File

@ -265,7 +265,7 @@ export default function TransportStatsWidget({ element, refreshInterval = 60000
{!element?.dataSource?.query && <div className="mt-2 text-xs text-muted-foreground"> </div>}
<button
onClick={loadData}
className="mt-3 rounded-lg bg-primary px-4 py-2 text-sm text-white hover:bg-primary/90"
className="mt-3 rounded-lg bg-primary px-4 py-2 text-sm text-primary-foreground hover:bg-primary/90"
>
</button>
@ -305,9 +305,9 @@ export default function TransportStatsWidget({ element, refreshInterval = 60000
</div>
{/* 정시 도착률 */}
<div className="rounded-lg border bg-purple-500/10 p-4 text-center">
<div className="rounded-lg border bg-primary/10 p-4 text-center">
<div className="text-sm text-foreground"> </div>
<div className="mt-2 text-3xl font-bold text-purple-500">
<div className="mt-2 text-3xl font-bold text-primary">
{stats.on_time_rate.toFixed(1)}
<span className="ml-1 text-lg">%</span>
</div>

View File

@ -111,7 +111,7 @@ export default function VehicleListWidget({ element, refreshInterval = 30000 }:
<button
onClick={() => setSelectedStatus("all")}
className={`rounded-md px-3 py-1 text-xs font-medium whitespace-nowrap transition-colors ${
selectedStatus === "all" ? "bg-gray-900 text-white" : "bg-background text-foreground hover:bg-muted"
selectedStatus === "all" ? "bg-primary text-primary-foreground" : "bg-background text-foreground hover:bg-muted"
}`}
>
({vehicles.length})
@ -119,7 +119,7 @@ export default function VehicleListWidget({ element, refreshInterval = 30000 }:
<button
onClick={() => setSelectedStatus("active")}
className={`rounded-md px-3 py-1 text-xs font-medium whitespace-nowrap transition-colors ${
selectedStatus === "active" ? "bg-success text-white" : "bg-background text-foreground hover:bg-muted"
selectedStatus === "active" ? "bg-success text-primary-foreground" : "bg-background text-foreground hover:bg-muted"
}`}
>
({vehicles.filter((v) => v.status?.toLowerCase() === "active").length})
@ -127,7 +127,7 @@ export default function VehicleListWidget({ element, refreshInterval = 30000 }:
<button
onClick={() => setSelectedStatus("inactive")}
className={`rounded-md px-3 py-1 text-xs font-medium whitespace-nowrap transition-colors ${
selectedStatus === "inactive" ? "bg-warning/100 text-white" : "bg-background text-foreground hover:bg-muted"
selectedStatus === "inactive" ? "bg-warning text-primary-foreground" : "bg-background text-foreground hover:bg-muted"
}`}
>
({vehicles.filter((v) => v.status?.toLowerCase() === "inactive").length})
@ -135,7 +135,7 @@ export default function VehicleListWidget({ element, refreshInterval = 30000 }:
<button
onClick={() => setSelectedStatus("maintenance")}
className={`rounded-md px-3 py-1 text-xs font-medium whitespace-nowrap transition-colors ${
selectedStatus === "maintenance" ? "bg-warning text-white" : "bg-background text-foreground hover:bg-muted"
selectedStatus === "maintenance" ? "bg-warning text-primary-foreground" : "bg-background text-foreground hover:bg-muted"
}`}
>
({vehicles.filter((v) => v.status?.toLowerCase() === "maintenance").length})
@ -143,7 +143,7 @@ export default function VehicleListWidget({ element, refreshInterval = 30000 }:
<button
onClick={() => setSelectedStatus("warning")}
className={`rounded-md px-3 py-1 text-xs font-medium whitespace-nowrap transition-colors ${
selectedStatus === "warning" ? "bg-destructive text-white" : "bg-background text-foreground hover:bg-muted"
selectedStatus === "warning" ? "bg-destructive text-primary-foreground" : "bg-background text-foreground hover:bg-muted"
}`}
>
({vehicles.filter((v) => v.status?.toLowerCase() === "warning").length})

View File

@ -95,7 +95,7 @@ export default function WorkHistoryWidget({ element, refreshInterval = 60000 }:
{!element.dataSource?.query && <div className="mt-2 text-xs text-muted-foreground"> </div>}
<button
onClick={loadData}
className="mt-3 rounded-lg bg-primary px-4 py-2 text-sm text-white hover:bg-primary/90"
className="mt-3 rounded-lg bg-primary px-4 py-2 text-sm text-primary-foreground hover:bg-primary/90"
>
</button>
@ -134,7 +134,7 @@ export default function WorkHistoryWidget({ element, refreshInterval = 60000 }:
<button
onClick={loadData}
className="ml-auto rounded bg-primary px-3 py-1 text-sm text-white hover:bg-primary/90"
className="ml-auto rounded bg-primary px-3 py-1 text-sm text-primary-foreground hover:bg-primary/90"
>
🔄
</button>