diff --git a/app/commission/page.tsx b/app/commission/page.tsx index 6af8c8b..c5ed252 100644 --- a/app/commission/page.tsx +++ b/app/commission/page.tsx @@ -19,7 +19,7 @@ async function CommissionContent() { if (!availability.isOpen) return
{availability.closureMessage}
- }> + }> ดูคำขอของฉันเข้าสู่ระบบหรือสมัครสมาชิกเพื่อบันทึกคำขอ ติดตามผล และพูดคุยกับทีมงาน
ยังไม่มีข้อมูลตัวละครสำหรับสร้างคำขอ
; return
สแกน QR ด้วยแอปธนาคาร หรือบันทึก QR แล้วเลือกรูปในแอปธนาคารบนมือถือเครื่องนี้
ยอดชำระ ฿{amount} ใช้มือถือเครื่องนี้ชำระเงิน: บันทึก QR แล้วเลือกรูปในแอปธนาคาร โอนเงินแล้วอัปโหลดรูปสลิปเพื่อยืนยัน {request.teams.length} ทีม - {request.weapons.reduce((sum, set) => sum + set.weaponKeys.filter(Boolean).length, 0)} อาวุธ - {request.constellations.reduce((sum, set) => sum + set.levels.length, 0)} ระดับกลุ่มดาว รวมค่าบริการพื้นฐาน ฿100
diff --git a/components/admin/constellation-image-generator.tsx b/components/admin/constellation-image-generator.tsx
index a6bb491..1458689 100644
--- a/components/admin/constellation-image-generator.tsx
+++ b/components/admin/constellation-image-generator.tsx
@@ -33,7 +33,7 @@ import {
EmptyTitle,
} from "@/components/ui/empty";
import { Field, FieldGroup, FieldLabel } from "@/components/ui/field";
-import { Input } from "@/components/ui/input";
+import { ClearableInput as Input } from "@/components/admin/ui/clearable-input";
import { Switch } from "@/components/ui/switch";
import { Textarea } from "@/components/ui/textarea";
import { isValidPercent } from "@/lib/guides/percent-input";
diff --git a/components/admin/create-guide-flow.tsx b/components/admin/create-guide-flow.tsx
index 993c851..47f166d 100644
--- a/components/admin/create-guide-flow.tsx
+++ b/components/admin/create-guide-flow.tsx
@@ -14,7 +14,8 @@ import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card";
import { Field, FieldDescription, FieldGroup, FieldLabel } from "@/components/ui/field";
-import { InputGroup, InputGroupAddon, InputGroupInput } from "@/components/ui/input-group";
+import { InputGroup, InputGroupAddon } from "@/components/ui/input-group";
+import { ClearableInputGroupInput as InputGroupInput } from "@/components/admin/ui/clearable-input";
import { Spinner } from "@/components/ui/spinner";
import { Textarea } from "@/components/ui/textarea";
import { characterRarityGradientClass } from "@/lib/catalog/rarity";
diff --git a/components/admin/extra-sheet-editor.tsx b/components/admin/extra-sheet-editor.tsx
index 5ecb6d3..83b2e66 100644
--- a/components/admin/extra-sheet-editor.tsx
+++ b/components/admin/extra-sheet-editor.tsx
@@ -82,7 +82,7 @@ import {
DialogTitle,
} from "@/components/ui/dialog";
import { Field, FieldGroup, FieldLabel } from "@/components/ui/field";
-import { Input } from "@/components/ui/input";
+import { ClearableInput as Input } from "@/components/admin/ui/clearable-input";
import {
InputGroup,
InputGroupAddon,
diff --git a/components/admin/glossary-manager.tsx b/components/admin/glossary-manager.tsx
index 1df0166..a611bc2 100644
--- a/components/admin/glossary-manager.tsx
+++ b/components/admin/glossary-manager.tsx
@@ -14,7 +14,7 @@ import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
import { Field, FieldGroup, FieldLabel } from "@/components/ui/field";
-import { Input } from "@/components/ui/input";
+import { ClearableInput as Input } from "@/components/admin/ui/clearable-input";
import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "@/components/ui/pagination";
import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
import { Spinner } from "@/components/ui/spinner";
diff --git a/components/admin/guide-extra-controls.tsx b/components/admin/guide-extra-controls.tsx
index d67bf48..8acacc0 100644
--- a/components/admin/guide-extra-controls.tsx
+++ b/components/admin/guide-extra-controls.tsx
@@ -35,7 +35,7 @@ import {
DialogTitle,
} from "@/components/ui/dialog";
import { Field, FieldGroup, FieldLabel } from "@/components/ui/field";
-import { Input } from "@/components/ui/input";
+import { ClearableInput as Input } from "@/components/admin/ui/clearable-input";
import { Spinner } from "@/components/ui/spinner";
import { cn } from "@/lib/utils";
diff --git a/components/admin/guide-overview-form.tsx b/components/admin/guide-overview-form.tsx
index 8e2e776..90571a4 100644
--- a/components/admin/guide-overview-form.tsx
+++ b/components/admin/guide-overview-form.tsx
@@ -27,7 +27,7 @@ import {
FieldGroup,
FieldLabel,
} from "@/components/ui/field";
-import { Input } from "@/components/ui/input";
+import { ClearableInput as Input } from "@/components/admin/ui/clearable-input";
import {
Combobox,
ComboboxContent,
diff --git a/components/admin/guide-section-editor.tsx b/components/admin/guide-section-editor.tsx
index 644061d..8f8190f 100644
--- a/components/admin/guide-section-editor.tsx
+++ b/components/admin/guide-section-editor.tsx
@@ -119,7 +119,7 @@ import {
FieldLegend,
FieldSet,
} from "@/components/ui/field";
-import { Input } from "@/components/ui/input";
+import { ClearableInput as Input } from "@/components/admin/ui/clearable-input";
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
import {
Select,
diff --git a/components/admin/overview-image-generator.tsx b/components/admin/overview-image-generator.tsx
index 8f3b6d8..bf41fa8 100644
--- a/components/admin/overview-image-generator.tsx
+++ b/components/admin/overview-image-generator.tsx
@@ -81,7 +81,7 @@ import {
DialogHeader,
DialogTitle,
} from "@/components/ui/dialog";
-import { Input } from "@/components/ui/input";
+import { ClearableInput as Input } from "@/components/admin/ui/clearable-input";
import {
Popover,
PopoverContent,
diff --git a/components/admin/structured-dashboard.tsx b/components/admin/structured-dashboard.tsx
index 7cfea74..0077773 100644
--- a/components/admin/structured-dashboard.tsx
+++ b/components/admin/structured-dashboard.tsx
@@ -47,8 +47,8 @@ import {
import {
InputGroup,
InputGroupAddon,
- InputGroupInput,
} from "@/components/ui/input-group";
+import { ClearableInputGroupInput as InputGroupInput } from "@/components/admin/ui/clearable-input";
import { Spinner } from "@/components/ui/spinner";
import { useAdminPresence } from "@/hooks/use-presence";
import type { CatalogSyncJob } from "@/lib/catalog/sync";
diff --git a/components/admin/team-image-generator.tsx b/components/admin/team-image-generator.tsx
index 89ae194..d6fda24 100644
--- a/components/admin/team-image-generator.tsx
+++ b/components/admin/team-image-generator.tsx
@@ -13,7 +13,7 @@ import { Button } from "@/components/ui/button";
import { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "@/components/ui/empty";
import { Field, FieldGroup, FieldLabel } from "@/components/ui/field";
-import { Input } from "@/components/ui/input";
+import { ClearableInput as Input } from "@/components/admin/ui/clearable-input";
import { Textarea } from "@/components/ui/textarea";
import { supportsWeaponType } from "@/lib/catalog/lunaris";
diff --git a/components/admin/ui/clearable-input.tsx b/components/admin/ui/clearable-input.tsx
new file mode 100644
index 0000000..c612aa6
--- /dev/null
+++ b/components/admin/ui/clearable-input.tsx
@@ -0,0 +1,55 @@
+"use client";
+
+import { useRef, useState, type ComponentProps } from "react";
+import { XIcon } from "lucide-react";
+
+import { Input } from "@/components/ui/input";
+import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "@/components/ui/input-group";
+
+export function ClearableInput({ className, ...props }: ComponentProps
- }>บันทึก QR สำหรับชำระเงิน
+ }>บันทึก QR สำหรับชำระเงิน
฿{amountBaht}