|
|
|
@@ -8,7 +8,7 @@ import { |
|
|
|
TableRow, |
|
|
|
Typography, |
|
|
|
} from "@mui/material"; |
|
|
|
import { HasChildren } from "@types"; |
|
|
|
import { Dictionary, HasChildren } from "@types"; |
|
|
|
import { |
|
|
|
getChangePlanOrderParams, |
|
|
|
orderChangePlan, |
|
|
|
@@ -66,12 +66,12 @@ export default function ChangPaymentIntervalOrder() { |
|
|
|
|
|
|
|
const [mode, setMode] = useState<"input" | "confirm" | "done">("input"); |
|
|
|
|
|
|
|
const [plans, setPlans] = useState<string[]>([]); |
|
|
|
const [plans, setPlans] = useState<Dictionary>({}); |
|
|
|
|
|
|
|
const planOptions: SelectOptionProps[] = useMemo(() => { |
|
|
|
return plans.map((planName) => ({ |
|
|
|
return Object.keys(plans).map((planName) => ({ |
|
|
|
value: planName, |
|
|
|
label: planName, |
|
|
|
label: plans[planName], |
|
|
|
})); |
|
|
|
}, [plans]); |
|
|
|
|
|
|
|
@@ -155,7 +155,7 @@ export default function ChangPaymentIntervalOrder() { |
|
|
|
<TableCell> |
|
|
|
<TextFieldEx |
|
|
|
multiline |
|
|
|
value={form.getValues("plan_name")} |
|
|
|
value={plans[form.getValues("plan_name")]} |
|
|
|
readOnly |
|
|
|
fullWidth |
|
|
|
/> |
|
|
|
|