feat: add community sorting/filtering and quote post input
This commit is contained in:
@@ -15,14 +15,15 @@ import {
|
||||
} from "@/components/ui/select"
|
||||
import { Switch } from "@/components/ui/switch"
|
||||
import { mockShops } from "@/lib/mock-data"
|
||||
import type { Shop } from "@/lib/types"
|
||||
|
||||
export default function ShopRulesPage() {
|
||||
const shop = mockShops[0]
|
||||
|
||||
const [allowMultiShop, setAllowMultiShop] = useState(shop.allowMultiShop)
|
||||
const [allowIndependentOrders, setAllowIndependentOrders] = useState(shop.allowIndependentOrders)
|
||||
const [dispatchMode, setDispatchMode] = useState(shop.dispatchMode)
|
||||
const [commissionType, setCommissionType] = useState(shop.commissionType)
|
||||
const [dispatchMode, setDispatchMode] = useState<Shop["dispatchMode"]>(shop.dispatchMode)
|
||||
const [commissionType, setCommissionType] = useState<Shop["commissionType"]>(shop.commissionType)
|
||||
const [commissionValue, setCommissionValue] = useState(shop.commissionValue.toString())
|
||||
|
||||
const handleSave = () => {
|
||||
@@ -83,7 +84,7 @@ export default function ShopRulesPage() {
|
||||
<Label>派单模式</Label>
|
||||
<Select
|
||||
value={dispatchMode}
|
||||
onValueChange={(v: "manual" | "auto") => setDispatchMode(v)}
|
||||
onValueChange={(v) => setDispatchMode(v as Shop["dispatchMode"])}
|
||||
>
|
||||
<SelectTrigger>
|
||||
<SelectValue />
|
||||
@@ -110,7 +111,7 @@ export default function ShopRulesPage() {
|
||||
<Label>抽成方式</Label>
|
||||
<Select
|
||||
value={commissionType}
|
||||
onValueChange={(v: "fixed" | "percentage") => setCommissionType(v)}
|
||||
onValueChange={(v) => setCommissionType(v as Shop["commissionType"])}
|
||||
>
|
||||
<SelectTrigger>
|
||||
<SelectValue />
|
||||
|
||||
Reference in New Issue
Block a user