594 lines
21 KiB
TypeScript
594 lines
21 KiB
TypeScript
import { useState, useCallback, useMemo } from "react";
|
|
import { useNavigate } from "react-router-dom";
|
|
import { useTranslation } from "react-i18next";
|
|
import type { TFunction } from "i18next";
|
|
import { useForm, type PathValue } from "react-hook-form";
|
|
import { toast } from "sonner";
|
|
import { User, FileText, Wallet, MapPin } from "lucide-react";
|
|
import type { LucideIcon } from "lucide-react";
|
|
|
|
import { FormInput, type SelectOption } from "@/components/formInput";
|
|
import { FormActions } from "@/components/formActions";
|
|
import { InfiniteSelect, type InfiniteSelectOption, type InfiniteSelectProps } from "@/components/infiniteSelect";
|
|
import { DocumentUpload } from "@/components/documentUpload";
|
|
import { StepBarCards, type StepCardItem } from "@/components/stepBarV2";
|
|
import { BentoGrid, BentoCard } from "@/components/bento";
|
|
import { PASSPORT_SERIES_OPTIONS, getStatusOptions } from "@/constants";
|
|
import { useInfiniteBranches } from "@/features/shared/hooks/useSharedBranchUsers";
|
|
import { useInfiniteUsers } from "@/features/allUsers/hooks/useAllUsers";
|
|
import type { LocalizedText } from "@/features/branches/api/branchesApi";
|
|
|
|
import { useCreateLoanPaidOffLetter, useUpdateLoanPaidOffLetter } from "../hooks/useLoanPaidOffLetters";
|
|
import type { LoanPaidOffLetter } from "../api/loanPaidOffLettersApi";
|
|
import {
|
|
validateStep,
|
|
type LoanPaidOffLetterFormData,
|
|
DEFAULT_FORM_VALUES,
|
|
buildPayload,
|
|
mapInitial,
|
|
} from "../schemas/loanPaidOffLetter.schema";
|
|
|
|
// ─── Types ────────────────────────────────────────────────────────────────────
|
|
|
|
type FormMode = "create" | "edit";
|
|
|
|
interface LoanPaidOffLetterFormProps {
|
|
mode: FormMode;
|
|
initialData?: LoanPaidOffLetter;
|
|
}
|
|
|
|
type FlatErrors = Partial<Record<keyof LoanPaidOffLetterFormData, string>>;
|
|
|
|
function flattenErrors(errors: Record<string, { message?: string } | undefined>): FlatErrors {
|
|
const result: FlatErrors = {};
|
|
for (const key of Object.keys(errors)) {
|
|
const msg = errors[key]?.message;
|
|
if (msg) result[key as keyof LoanPaidOffLetterFormData] = msg;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
function resolveLocalizedName(name: LocalizedText | string | undefined | null, lang = "en"): string {
|
|
if (!name) return "";
|
|
if (typeof name === "string") return name;
|
|
return name[lang as keyof LocalizedText] ?? name.tm ?? name.en ?? name.ru ?? "";
|
|
}
|
|
|
|
// ─── Static options ───────────────────────────────────────────────────────────
|
|
|
|
const REGION_CODES = ["AG", "AH", "BA", "DA", "LE", "MA"] as const;
|
|
|
|
// ─── Step definitions ─────────────────────────────────────────────────────────
|
|
|
|
interface StepDef {
|
|
id: string;
|
|
titleKey: string;
|
|
titleFallback: string;
|
|
subtitleKey: string;
|
|
subtitleFallback: string;
|
|
icon: LucideIcon;
|
|
validate: (form: LoanPaidOffLetterFormData) => FlatErrors;
|
|
}
|
|
|
|
const STEPS: StepDef[] = [
|
|
{
|
|
id: "customer",
|
|
titleKey: "loanPaidOffLetters.sections.customer",
|
|
titleFallback: "Müşderi maglumatlary",
|
|
subtitleKey: "loanPaidOffLetters.steps.customer.subtitle",
|
|
subtitleFallback: "At, familiýa, senesi, telefon",
|
|
icon: User,
|
|
validate: (form) => validateStep(0, form),
|
|
},
|
|
{
|
|
id: "passport",
|
|
titleKey: "loanPaidOffLetters.sections.passport",
|
|
titleFallback: "Pasport",
|
|
subtitleKey: "loanPaidOffLetters.steps.passport.subtitle",
|
|
subtitleFallback: "Seriýa we belgisi",
|
|
icon: FileText,
|
|
validate: (form) => validateStep(1, form),
|
|
},
|
|
{
|
|
id: "loan",
|
|
titleKey: "loanPaidOffLetters.sections.loan",
|
|
titleFallback: "Karz maglumatlary",
|
|
subtitleKey: "loanPaidOffLetters.steps.loan.subtitle",
|
|
subtitleFallback: "Şertnama, senesi, möçberi",
|
|
icon: Wallet,
|
|
validate: (form) => validateStep(2, form),
|
|
},
|
|
{
|
|
id: "location",
|
|
titleKey: "loanPaidOffLetters.sections.additional",
|
|
titleFallback: "Lokasiýa we Status",
|
|
subtitleKey: "loanPaidOffLetters.steps.additional.subtitle",
|
|
subtitleFallback: "Sebit, şahamça, status",
|
|
icon: MapPin,
|
|
validate: (form) => validateStep(3, form),
|
|
},
|
|
];
|
|
|
|
// ─── Step components ──────────────────────────────────────────────────────────
|
|
|
|
interface StepContentProps {
|
|
form: LoanPaidOffLetterFormData;
|
|
errors: FlatErrors;
|
|
set: <K extends keyof LoanPaidOffLetterFormData>(k: K) => (v: string) => void;
|
|
t: TFunction;
|
|
}
|
|
|
|
function StepCustomer({ form, errors, set, t }: StepContentProps) {
|
|
return (
|
|
<BentoGrid cols={2}>
|
|
<BentoCard span="full">
|
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
<FormInput
|
|
type="text"
|
|
label={t("loanPaidOffLetters.fields.customerName", "Ady")}
|
|
value={form.customerName}
|
|
onChange={set("customerName")}
|
|
error={errors.customerName}
|
|
required
|
|
/>
|
|
<FormInput
|
|
type="text"
|
|
label={t("loanPaidOffLetters.fields.customerSurname", "Familiýasy")}
|
|
value={form.customerSurname}
|
|
onChange={set("customerSurname")}
|
|
error={errors.customerSurname}
|
|
required
|
|
/>
|
|
<FormInput
|
|
type="text"
|
|
label={t("loanPaidOffLetters.fields.customerPatronicName", "Atasynyň ady")}
|
|
value={form.customerPatronicName ?? ""}
|
|
onChange={set("customerPatronicName")}
|
|
/>
|
|
<FormInput
|
|
type="date"
|
|
label={t("loanPaidOffLetters.fields.bornAt", "Doglan senesi")}
|
|
value={form.bornAt}
|
|
onChange={set("bornAt")}
|
|
error={errors.bornAt}
|
|
required
|
|
/>
|
|
<FormInput
|
|
type="phone"
|
|
label={t("loanPaidOffLetters.fields.phone", "Telefon")}
|
|
value={form.phone}
|
|
onChange={set("phone")}
|
|
error={errors.phone}
|
|
required
|
|
/>
|
|
</div>
|
|
</BentoCard>
|
|
</BentoGrid>
|
|
);
|
|
}
|
|
|
|
function StepPassport({ form, errors, set, t }: StepContentProps) {
|
|
return (
|
|
<BentoGrid cols={2}>
|
|
<BentoCard span="full">
|
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
<FormInput
|
|
type="select"
|
|
label={t("loanPaidOffLetters.fields.passportSerie", "Pasport seriýasy")}
|
|
value={form.passportSerie}
|
|
onChange={set("passportSerie")}
|
|
options={PASSPORT_SERIES_OPTIONS}
|
|
placeholder="I-AŞ"
|
|
error={errors.passportSerie}
|
|
required
|
|
/>
|
|
<FormInput
|
|
type="text"
|
|
label={t("loanPaidOffLetters.fields.passportId", "Pasport belgisi")}
|
|
value={form.passportId}
|
|
onChange={set("passportId")}
|
|
placeholder="101010"
|
|
error={errors.passportId}
|
|
required
|
|
/>
|
|
</div>
|
|
</BentoCard>
|
|
</BentoGrid>
|
|
);
|
|
}
|
|
|
|
function StepLoan({ form, errors, set, t }: StepContentProps) {
|
|
return (
|
|
<BentoGrid cols={2}>
|
|
<BentoCard span="full">
|
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
<FormInput
|
|
type="text"
|
|
label={t("loanPaidOffLetters.fields.loanContractNumber", "Karz şertnamasy belgisi")}
|
|
value={form.loanContractNumber}
|
|
onChange={set("loanContractNumber")}
|
|
error={errors.loanContractNumber}
|
|
required
|
|
/>
|
|
<FormInput
|
|
type="date"
|
|
label={t("loanPaidOffLetters.fields.loanContractDate", "Karz şertnamasy senesi")}
|
|
value={form.loanContractDate}
|
|
onChange={set("loanContractDate")}
|
|
error={errors.loanContractDate}
|
|
required
|
|
/>
|
|
<FormInput
|
|
type="number"
|
|
label={t("loanPaidOffLetters.fields.loanAmount", "Karz möçberi")}
|
|
value={form.loanAmount}
|
|
onChange={set("loanAmount")}
|
|
error={errors.loanAmount}
|
|
required
|
|
/>
|
|
<FormInput
|
|
type="text"
|
|
label={t("loanPaidOffLetters.fields.loanReason", "Karz sebäbi")}
|
|
value={form.loanReason ?? ""}
|
|
onChange={set("loanReason")}
|
|
/>
|
|
</div>
|
|
</BentoCard>
|
|
</BentoGrid>
|
|
);
|
|
}
|
|
|
|
function StepLocation({
|
|
form,
|
|
errors,
|
|
set,
|
|
t,
|
|
regionOptions,
|
|
statusOptions,
|
|
branchSelectProps,
|
|
userSelectProps,
|
|
}: StepContentProps & {
|
|
regionOptions: SelectOption[];
|
|
statusOptions: SelectOption[];
|
|
branchSelectProps: Omit<InfiniteSelectProps, "label" | "required" | "placeholder">;
|
|
userSelectProps: Omit<InfiniteSelectProps, "label" | "required" | "placeholder">;
|
|
}) {
|
|
return (
|
|
<BentoGrid cols={2}>
|
|
<BentoCard>
|
|
<div className="flex flex-col gap-4">
|
|
<FormInput
|
|
type="select"
|
|
label={t("loanPaidOffLetters.fields.region", "Sebit")}
|
|
value={form.region}
|
|
onChange={set("region")}
|
|
options={regionOptions}
|
|
error={errors.region}
|
|
required
|
|
/>
|
|
<InfiniteSelect
|
|
label={t("loanPaidOffLetters.fields.branchId", "Şahamça")}
|
|
value={form.branchId}
|
|
onChange={set("branchId")}
|
|
error={errors.branchId}
|
|
required
|
|
placeholder={t("loanPaidOffLetters.placeholders.branch", "Şahamça saýlaň")}
|
|
{...branchSelectProps}
|
|
/>
|
|
<InfiniteSelect
|
|
label={t("loanPaidOffLetters.fields.userId", "Ulanyjy")}
|
|
value={form.userId ?? ""}
|
|
onChange={set("userId")}
|
|
error={errors.userId}
|
|
placeholder={t("loanPaidOffLetters.placeholders.user", "Ulanyjy saýlaň")}
|
|
{...userSelectProps}
|
|
/>
|
|
<FormInput
|
|
type="select"
|
|
label={t("loanPaidOffLetters.fields.status", "Status")}
|
|
value={form.status}
|
|
onChange={set("status")}
|
|
options={statusOptions}
|
|
error={errors.status}
|
|
required
|
|
/>
|
|
</div>
|
|
</BentoCard>
|
|
|
|
<BentoCard>
|
|
<div className="flex flex-col gap-4">
|
|
<FormInput
|
|
type="text"
|
|
label={t("loanPaidOffLetters.fields.uniqueId", "Unikal ID")}
|
|
value={form.uniqueId ?? ""}
|
|
onChange={set("uniqueId")}
|
|
placeholder="LPL-2026-0001"
|
|
/>
|
|
<DocumentUpload
|
|
label={t("loanPaidOffLetters.fields.loanFile", "Faýl")}
|
|
value={form.loanFile ?? ""}
|
|
onChange={set("loanFile")}
|
|
error={errors.loanFile}
|
|
accept=".pdf,.doc,.docx,image/*"
|
|
/>
|
|
<FormInput
|
|
type="textarea"
|
|
label={t("loanPaidOffLetters.fields.notes", "Bellikler")}
|
|
value={form.notes ?? ""}
|
|
onChange={set("notes")}
|
|
rows={3}
|
|
/>
|
|
</div>
|
|
</BentoCard>
|
|
</BentoGrid>
|
|
);
|
|
}
|
|
|
|
// ─── LoanPaidOffLetterForm ────────────────────────────────────────────────────
|
|
|
|
export function LoanPaidOffLetterForm({ mode, initialData }: LoanPaidOffLetterFormProps) {
|
|
const { t, i18n } = useTranslation();
|
|
const navigate = useNavigate();
|
|
|
|
const createMutation = useCreateLoanPaidOffLetter();
|
|
const updateMutation = useUpdateLoanPaidOffLetter(initialData?.id ?? 0);
|
|
const isPending = createMutation.isPending || updateMutation.isPending;
|
|
|
|
const [currentStep, setCurrentStep] = useState(0);
|
|
const [visited, setVisited] = useState<Set<number>>(() => (mode === "edit" ? new Set(STEPS.map((_, i) => i)) : new Set<number>([0])));
|
|
const [submittedSteps, setSubmittedSteps] = useState<Set<number>>(() => new Set());
|
|
|
|
// ── Branch infinite-scroll select ──
|
|
const [branchSearch, setBranchSearch] = useState("");
|
|
const branchQuery = useInfiniteBranches(branchSearch);
|
|
|
|
const branchSelectProps: Omit<InfiniteSelectProps, "label" | "required" | "placeholder"> = useMemo(() => {
|
|
const lang = i18n.language ?? "en";
|
|
const opts: InfiniteSelectOption[] = (branchQuery.data?.pages ?? [])
|
|
.flatMap((p) => p?.branches ?? [])
|
|
.map((b) => ({
|
|
value: String(b.id),
|
|
label: resolveLocalizedName(b.name, lang) || b.uniqueCode || String(b.id),
|
|
}));
|
|
|
|
if (initialData?.branch?.id) {
|
|
const bId = String(initialData.branch.id);
|
|
if (!opts.some((o) => o.value === bId)) {
|
|
const initialBranchName = resolveLocalizedName(initialData.branch.name, lang) || bId;
|
|
opts.unshift({ value: bId, label: initialBranchName });
|
|
}
|
|
}
|
|
|
|
return {
|
|
options: opts,
|
|
loading: branchQuery.isLoading,
|
|
isLoadingMore: branchQuery.isFetchingNextPage,
|
|
hasNextPage: !!branchQuery.hasNextPage,
|
|
onLoadMore: () => branchQuery.fetchNextPage(),
|
|
searchValue: branchSearch,
|
|
onSearchChange: setBranchSearch,
|
|
};
|
|
}, [branchQuery, branchSearch, i18n.language, initialData]);
|
|
|
|
// ── User infinite-scroll select ──
|
|
const [userSearch, setUserSearch] = useState("");
|
|
const usersQuery = useInfiniteUsers(userSearch);
|
|
|
|
const userSelectProps: Omit<InfiniteSelectProps, "label" | "required" | "placeholder"> = useMemo(() => {
|
|
const opts: InfiniteSelectOption[] = (usersQuery.data?.pages ?? [])
|
|
.flatMap((p) => p?.users ?? [])
|
|
.map((u) => {
|
|
const displayName = [u.firstName, u.lastName].filter(Boolean).join(" ") || u.name || u.username;
|
|
return {
|
|
value: String(u.id),
|
|
label: `${displayName}${u.phone ? ` (${u.phone})` : ""}`,
|
|
};
|
|
});
|
|
|
|
if (initialData?.user?.id) {
|
|
const uId = String(initialData.user.id);
|
|
if (!opts.some((o) => o.value === uId)) {
|
|
const initialUserName = initialData.user.name || uId;
|
|
opts.unshift({ value: uId, label: initialUserName });
|
|
}
|
|
}
|
|
|
|
return {
|
|
options: opts,
|
|
loading: usersQuery.isLoading,
|
|
isLoadingMore: usersQuery.isFetchingNextPage,
|
|
hasNextPage: !!usersQuery.hasNextPage,
|
|
onLoadMore: () => usersQuery.fetchNextPage(),
|
|
searchValue: userSearch,
|
|
onSearchChange: setUserSearch,
|
|
};
|
|
}, [usersQuery, userSearch, initialData]);
|
|
|
|
const {
|
|
watch,
|
|
setValue,
|
|
formState: { errors: rhfErrors },
|
|
clearErrors,
|
|
setError,
|
|
getValues,
|
|
} = useForm<LoanPaidOffLetterFormData>({
|
|
defaultValues: initialData ? { ...DEFAULT_FORM_VALUES, ...mapInitial(initialData) } : DEFAULT_FORM_VALUES,
|
|
});
|
|
|
|
const form = watch();
|
|
const errors = useMemo(() => flattenErrors(rhfErrors as Record<string, { message?: string } | undefined>), [rhfErrors]);
|
|
|
|
const set = useCallback(
|
|
<K extends keyof LoanPaidOffLetterFormData>(key: K) =>
|
|
(value: string) => {
|
|
setValue(key, value as PathValue<LoanPaidOffLetterFormData, K>);
|
|
clearErrors(key);
|
|
},
|
|
[setValue, clearErrors],
|
|
);
|
|
|
|
const statusOptions = useMemo<SelectOption[]>(() => getStatusOptions(t, "loanPaidOffLetters.status"), [t]);
|
|
|
|
const regionOptions = useMemo<SelectOption[]>(
|
|
() =>
|
|
REGION_CODES.map((code) => ({
|
|
value: code,
|
|
label: t(`loanPaidOffLetters.regions.${code}`, code),
|
|
})),
|
|
[t],
|
|
);
|
|
|
|
// ── Step validation state ───────────────────────────────────────────────────
|
|
|
|
const stepsWithErrors = useMemo(() => {
|
|
const set = new Set<number>();
|
|
STEPS.forEach((step, i) => {
|
|
if (visited.has(i) || submittedSteps.has(i)) {
|
|
const stepErrs = step.validate(form);
|
|
if (Object.keys(stepErrs).length > 0) set.add(i);
|
|
}
|
|
});
|
|
return set;
|
|
}, [form, visited, submittedSteps]);
|
|
|
|
const markVisited = (idx: number) => setVisited((prev) => new Set([...prev, idx]));
|
|
|
|
// ── Step Navigation ─────────────────────────────────────────────────────────
|
|
|
|
const handleNext = () => {
|
|
markVisited(currentStep);
|
|
setSubmittedSteps((prev) => new Set([...prev, currentStep]));
|
|
|
|
const stepErrs = STEPS[currentStep].validate(form);
|
|
if (Object.keys(stepErrs).length > 0) {
|
|
Object.entries(stepErrs).forEach(([key, msg]) => {
|
|
setError(key as keyof LoanPaidOffLetterFormData, { type: "manual", message: msg });
|
|
});
|
|
toast.error(t("common.errors.fillRequired", "Hökman doldurylmaly öýjükleri dolduryň"));
|
|
return;
|
|
}
|
|
|
|
if (currentStep < STEPS.length - 1) {
|
|
setCurrentStep(currentStep + 1);
|
|
window.scrollTo({ top: 0, behavior: "smooth" });
|
|
}
|
|
};
|
|
|
|
const handleBack = () => {
|
|
if (currentStep > 0) {
|
|
markVisited(currentStep);
|
|
setCurrentStep(currentStep - 1);
|
|
window.scrollTo({ top: 0, behavior: "smooth" });
|
|
}
|
|
};
|
|
|
|
const handleGoTo = (i: number) => {
|
|
markVisited(currentStep);
|
|
setCurrentStep(i);
|
|
window.scrollTo({ top: 0, behavior: "smooth" });
|
|
};
|
|
|
|
// ── Submit ──────────────────────────────────────────────────────────────────
|
|
|
|
const doSubmit = async () => {
|
|
setVisited(new Set(STEPS.map((_, i) => i)));
|
|
setSubmittedSteps(new Set(STEPS.map((_, i) => i)));
|
|
|
|
const allErrors: FlatErrors = {};
|
|
for (const step of STEPS) Object.assign(allErrors, step.validate(form));
|
|
|
|
if (Object.keys(allErrors).length > 0) {
|
|
Object.entries(allErrors).forEach(([key, msg]) => {
|
|
setError(key as keyof LoanPaidOffLetterFormData, { type: "manual", message: msg });
|
|
});
|
|
toast.error(t("common.errors.fillRequired", "Hökman doldurylmaly öýjükleri dolduryň"));
|
|
for (let i = 0; i < STEPS.length; i++) {
|
|
if (Object.keys(STEPS[i].validate(form)).length > 0) {
|
|
setCurrentStep(i);
|
|
break;
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
|
|
const payload = buildPayload(getValues());
|
|
|
|
if (mode === "create") {
|
|
const result = await createMutation.mutateAsync(payload);
|
|
navigate(`/loan-paid-off-letters/${result.id}`);
|
|
} else {
|
|
await updateMutation.mutateAsync(payload);
|
|
navigate(`/loan-paid-off-letters/${initialData!.id}`);
|
|
}
|
|
};
|
|
|
|
// ── StepBar items ───────────────────────────────────────────────────────────
|
|
|
|
const stepBarItems: StepCardItem[] = STEPS.map((s, i) => {
|
|
const isActive = i === currentStep;
|
|
const hasErrors = stepsWithErrors.has(i);
|
|
const isDone = visited.has(i) && !hasErrors;
|
|
return {
|
|
id: s.id,
|
|
title: t(s.titleKey, s.titleFallback),
|
|
subtitle: t(s.subtitleKey, s.subtitleFallback),
|
|
icon: s.icon,
|
|
status: isActive ? "active" : hasErrors ? "error" : isDone ? "done" : "idle",
|
|
};
|
|
});
|
|
|
|
const isLastStep = currentStep === STEPS.length - 1;
|
|
|
|
const stepProps = { form, errors, set, t };
|
|
|
|
return (
|
|
<div className="flex flex-col gap-5">
|
|
{/* Page Header */}
|
|
<div>
|
|
<h1 className="text-xl font-semibold text-foreground">
|
|
{mode === "create"
|
|
? t("loanPaidOffLetters.createTitle", "Karzyň ýapylandygy barada güwanama almak dörediň")
|
|
: t("loanPaidOffLetters.editTitle", "Karzyň ýapylandygy barada güwanama almak üýtgetmek")}
|
|
</h1>
|
|
<p className="text-sm text-muted-foreground mt-1">
|
|
{t("loanPaidOffLetters.stepDescription", "Ähli meýdanlary dolduryp, ädim-ädim öň geçiň.")}
|
|
</p>
|
|
</div>
|
|
|
|
{/* Step Bar */}
|
|
<div className="bg-card border border-border rounded-xl p-3 overflow-x-auto">
|
|
<StepBarCards steps={stepBarItems} onGoTo={handleGoTo} />
|
|
</div>
|
|
|
|
{/* Step Panels */}
|
|
{currentStep === 0 && <StepCustomer {...stepProps} />}
|
|
{currentStep === 1 && <StepPassport {...stepProps} />}
|
|
{currentStep === 2 && <StepLoan {...stepProps} />}
|
|
{currentStep === 3 && (
|
|
<StepLocation
|
|
{...stepProps}
|
|
regionOptions={regionOptions}
|
|
statusOptions={statusOptions}
|
|
branchSelectProps={branchSelectProps}
|
|
userSelectProps={userSelectProps}
|
|
/>
|
|
)}
|
|
|
|
{/* Form Actions */}
|
|
<FormActions
|
|
isPending={isPending}
|
|
onCancel={currentStep === 0 ? () => navigate("/loan-paid-off-letters") : undefined}
|
|
onPrev={currentStep > 0 ? handleBack : undefined}
|
|
onNext={!isLastStep ? handleNext : undefined}
|
|
showSubmit={isLastStep}
|
|
onSubmit={isLastStep ? doSubmit : undefined}
|
|
submitLabel={mode === "create" ? t("common.create", "Döret") : t("common.save", "Ýatda sakla")}
|
|
loadingLabel={t("common.loading", "Ýüklenilýär...")}
|
|
cancelLabel={t("common.cancel", "Ýatyr")}
|
|
prevLabel={t("common.back", "Yza")}
|
|
nextLabel={t("common.next", "Indiki")}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|