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