fix
This commit is contained in:
parent
3cf32576bc
commit
07dac276b8
|
|
@ -7,6 +7,7 @@ import { AlertTriangle, Check, ChevronLeft, Loader2, Plus } from "lucide-react";
|
|||
import { FMLocal, FMProps } from "../typings";
|
||||
import { editorFormData } from "./ed-data";
|
||||
import { formError } from "./error";
|
||||
import { lang } from "lib/lang";
|
||||
|
||||
export const formInit = (fm: FMLocal, props: FMProps) => {
|
||||
for (const [k, v] of Object.entries(props)) {
|
||||
|
|
@ -289,7 +290,7 @@ export const formInit = (fm: FMLocal, props: FMProps) => {
|
|||
}
|
||||
);
|
||||
} else {
|
||||
toastSuccess({ addNewText: "Add New" });
|
||||
toastSuccess({ addNewText: lang.t("Add New") });
|
||||
}
|
||||
}
|
||||
return success;
|
||||
|
|
|
|||
|
|
@ -93,14 +93,14 @@ export const generateMDForm = async (
|
|||
];
|
||||
|
||||
if (isEditor) {
|
||||
breads.push({ label: "Add New" });
|
||||
breads.push({ label: lang.t("Add New") });
|
||||
} else {
|
||||
if (
|
||||
md.selected &&
|
||||
typeof md.selected === "object"
|
||||
) {
|
||||
if (Object.keys(md.selected).length === 0){
|
||||
breads.push({ label: "Add New" });
|
||||
breads.push({ label: lang.t("Add New") });
|
||||
} else {
|
||||
breads.push({ label: guessLabel(md.selected) || "Detail" });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ export { FieldLoading } from "@/comps/ui/field-loading";
|
|||
export { fetchLinkParams } from "@/comps/form/field/type/TypeLink";
|
||||
export { prasi_gen } from "./gen/prasi_gen";
|
||||
export { guessLabel } from "./utils/guess-label";
|
||||
export { lang } from "@/lang/lang";
|
||||
export { lang } from "lib/lang";
|
||||
|
||||
import __get from "lodash.get";
|
||||
import { sum } from "./utils/sum";
|
||||
|
|
|
|||
Loading…
Reference in New Issue