diff --git a/src/features/cardRequisites/components/cardRequisiteForm.tsx b/src/features/cardRequisites/components/cardRequisiteForm.tsx index a74d0fe..cf24d81 100644 --- a/src/features/cardRequisites/components/cardRequisiteForm.tsx +++ b/src/features/cardRequisites/components/cardRequisiteForm.tsx @@ -20,6 +20,7 @@ import type { CardRequisiteFormData } from "../schemas/cardRequisite.schema"; import { useInfiniteCardTypes } from "@/features/cardTypes/hooks/useCardTypes"; import { useInfiniteBranches } from "@/features/branches/hooks/useBranches"; import { useInfiniteClients } from "@/features/clients/hooks/useClients"; +import { useWebSelfLock } from "@/features/shared/hooks/useWebSelfLock"; import { resolveLocalizedName } from "@/features/loanOrders/api/loanOrdersApi"; import { getRegionOptions, MONTH_OPTIONS, CARD_YEAR_OPTIONS } from "@/constants"; @@ -135,18 +136,21 @@ interface StepContentProps { set: (k: K, v: CardRequisiteFormData[K]) => void; t: TFunction; initialData?: CardRequisite; + userLocked: boolean; + selfUserId: string; + userName: string; } // ─── Step panels ────────────────────────────────────────────────────────────── -function StepCard({ form, errors, set, t, initialData }: StepContentProps) { +function StepCard({ form, errors, set, t, initialData, userLocked, selfUserId, userName }: StepContentProps) { const [cardTypeSearch, setCardTypeSearch] = useState(""); const [branchSearch, setBranchSearch] = useState(""); const [clientSearch, setClientSearch] = useState(""); const cardTypeQuery = useInfiniteCardTypes(cardTypeSearch); const branchQuery = useInfiniteBranches(branchSearch); - const clientQuery = useInfiniteClients(clientSearch); + const clientQuery = useInfiniteClients(clientSearch, !userLocked); const regionOptions = useMemo(() => getRegionOptions(t, "cardRequisites"), [t]); @@ -180,161 +184,175 @@ function StepCard({ form, errors, set, t, initialData }: StepContentProps) { const clientOptions: InfiniteSelectOption[] = useMemo(() => { const opts: InfiniteSelectOption[] = (clientQuery.data?.pages ?? []) .flatMap((p) => p?.users ?? []) - .map((u) => ({ value: String(u.id), label: u.name || u.username || String(u.id) })); + .map((u) => ({ value: String(u.id), label: u.name || u.username || String(u.id) })) + .filter((o) => !userLocked || o.value === selfUserId); + if (selfUserId && !opts.some((o) => o.value === selfUserId)) { + opts.unshift({ value: selfUserId, label: userName }); + } if (initialData?.user?.id && !opts.some((o) => o.value === String(initialData.user.id))) { opts.unshift({ value: String(initialData.user.id), label: initialData.user.name || String(initialData.user.id) }); } return opts; - }, [clientQuery, initialData]); + }, [clientQuery, initialData, userLocked, selfUserId, userName]); return ( -
- - - set("status", v)} - options={STATUS_OPTIONS} - placeholder={t("loanOrderForm.placeholders.select") || "Saýlaň"} - error={errors.status} - /> - - - set("uniqueId", v)} - placeholder={t("cardRequisiteForm.placeholders.uniqueId") || "Unikal ID..."} - error={errors.uniqueId} - /> - - +
+ {/* ── Sargyt maglumatlary ─────────────────────────────────────── */} +
+

{t("cardRequisiteForm.sections.order") || "Sargyt maglumatlary"}

+ + + set("status", v)} + options={STATUS_OPTIONS} + placeholder={t("loanOrderForm.placeholders.select") || "Saýlaň"} + error={errors.status} + /> + + + set("uniqueId", v)} + placeholder={t("cardRequisiteForm.placeholders.uniqueId") || "Unikal ID..."} + error={errors.uniqueId} + /> + + + set("notes", v)} + placeholder={t("loanOrderForm.placeholders.note") || "Bellik..."} + /> + + +
- - - set("cardTypeId", v)} - options={cardTypeOptions} - placeholder={t("loanOrderForm.placeholders.searchableSelect") || "Saýlamak üçin basyň"} - loading={cardTypeQuery.isLoading} - isLoadingMore={cardTypeQuery.isFetchingNextPage} - hasNextPage={!!cardTypeQuery.hasNextPage} - onLoadMore={() => cardTypeQuery.fetchNextPage()} - searchValue={cardTypeSearch} - onSearchChange={setCardTypeSearch} - error={errors.cardTypeId} - required - /> - - - set("cardNumber", v)} - placeholder="9800 0000 0000 0000" - error={errors.cardNumber} - /> - - + {/* ── Kart maglumatlary ───────────────────────────────────────── */} +
+

{t("cardRequisiteForm.sections.card") || "Kart maglumatlary"}

+ + + set("cardTypeId", v)} + options={cardTypeOptions} + placeholder={t("loanOrderForm.placeholders.searchableSelect") || "Saýlamak üçin basyň"} + loading={cardTypeQuery.isLoading} + isLoadingMore={cardTypeQuery.isFetchingNextPage} + hasNextPage={!!cardTypeQuery.hasNextPage} + onLoadMore={() => cardTypeQuery.fetchNextPage()} + searchValue={cardTypeSearch} + onSearchChange={setCardTypeSearch} + error={errors.cardTypeId} + required + /> + + + set("cardNumber", v)} + placeholder="9800 0000 0000 0000" + error={errors.cardNumber} + /> + + - - - set("cardMonth", v)} - options={MONTH_OPTIONS} - placeholder={t("loanOrderForm.placeholders.searchableSelect") || "Saýlamak üçin basyň"} - error={errors.cardMonth} - /> - - - set("cardYear", v)} - options={CARD_YEAR_OPTIONS} - placeholder={t("loanOrderForm.placeholders.searchableSelect") || "Saýlamak üçin basyň"} - error={errors.cardYear} - /> - - + + + set("cardMonth", v)} + options={MONTH_OPTIONS} + placeholder={t("loanOrderForm.placeholders.searchableSelect") || "Saýlamak üçin basyň"} + error={errors.cardMonth} + /> + + + set("cardYear", v)} + options={CARD_YEAR_OPTIONS} + placeholder={t("loanOrderForm.placeholders.searchableSelect") || "Saýlamak üçin basyň"} + error={errors.cardYear} + /> + + +
- - - { - set("region", v); - set("branchId", ""); - }} - options={regionOptions} - placeholder={t("loanOrderForm.placeholders.searchableSelect") || "Saýlamak üçin basyň"} - error={errors.region} - /> - - - set("branchId", v)} - options={branchOptions} - placeholder={t("loanOrderForm.placeholders.searchableSelect") || "Saýlamak üçin basyň"} - loading={branchQuery.isLoading} - isLoadingMore={branchQuery.isFetchingNextPage} - hasNextPage={!!branchQuery.hasNextPage} - onLoadMore={() => branchQuery.fetchNextPage()} - searchValue={branchSearch} - onSearchChange={setBranchSearch} - disabled={!form.region} - error={errors.branchId} - required - /> - - - - - - set("userId", v)} - options={clientOptions} - placeholder={t("loanOrderForm.placeholders.searchableSelect") || "Saýlamak üçin basyň"} - loading={clientQuery.isLoading} - isLoadingMore={clientQuery.isFetchingNextPage} - hasNextPage={!!clientQuery.hasNextPage} - onLoadMore={() => clientQuery.fetchNextPage()} - searchValue={clientSearch} - onSearchChange={setClientSearch} - error={errors.userId} - required - /> - - - set("notes", v)} - placeholder={t("loanOrderForm.placeholders.note") || "Bellik..."} - /> - - + {/* ── Ýerleşiş & Ulanyjy ──────────────────────────────────────── */} +
+

{t("cardRequisiteForm.sections.location") || "Ýerleşiş & Ulanyjy"}

+ + + { + set("region", v); + set("branchId", ""); + }} + options={regionOptions} + placeholder={t("loanOrderForm.placeholders.searchableSelect") || "Saýlamak üçin basyň"} + error={errors.region} + /> + + + set("branchId", v)} + options={branchOptions} + placeholder={t("loanOrderForm.placeholders.searchableSelect") || "Saýlamak üçin basyň"} + loading={branchQuery.isLoading} + isLoadingMore={branchQuery.isFetchingNextPage} + hasNextPage={!!branchQuery.hasNextPage} + onLoadMore={() => branchQuery.fetchNextPage()} + searchValue={branchSearch} + onSearchChange={setBranchSearch} + disabled={!form.region} + error={errors.branchId} + required + /> + + + set("userId", v)} + options={clientOptions} + placeholder={t("loanOrderForm.placeholders.searchableSelect") || "Saýlamak üçin basyň"} + disabled={userLocked} + loading={clientQuery.isLoading} + isLoadingMore={clientQuery.isFetchingNextPage} + hasNextPage={!!clientQuery.hasNextPage} + onLoadMore={() => clientQuery.fetchNextPage()} + searchValue={clientSearch} + onSearchChange={setClientSearch} + error={errors.userId} + required + /> + + +
); } @@ -480,6 +498,8 @@ export function CardRequisiteForm({ mode, initialData }: CardRequisiteFormProps) const { t, i18n } = useTranslation(); const navigate = useNavigate(); + const { locked: userLocked, userId: selfUserId, userName } = useWebSelfLock(true); + const createMutation = useCreateCardRequisite(); const updateMutation = useUpdateCardRequisite(initialData?.id ?? 0); const isPending = createMutation.isPending || updateMutation.isPending; @@ -492,7 +512,9 @@ export function CardRequisiteForm({ mode, initialData }: CardRequisiteFormProps) clearErrors, setError, } = useForm({ - defaultValues: initialData ? mapInitial(initialData) : DEFAULT_FORM_VALUES, + defaultValues: initialData + ? { ...mapInitial(initialData), ...(userLocked ? { userId: selfUserId } : {}) } + : { ...DEFAULT_FORM_VALUES, userId: selfUserId }, }); const form = watch(); @@ -532,7 +554,10 @@ export function CardRequisiteForm({ mode, initialData }: CardRequisiteFormProps) return { ...fromRHF, ...allSubmittedErrors }; }, [rhfErrors, allSubmittedErrors]); - const stepProps = useMemo(() => ({ form, errors, set, t, initialData }), [form, errors, set, t, initialData]); + const stepProps = useMemo( + () => ({ form, errors, set, t, initialData, userLocked, selfUserId, userName }), + [form, errors, set, t, initialData, userLocked, selfUserId, userName], + ); // ── Navigation ───────────────────────────────────────────────────────────── diff --git a/src/features/loanOrders/components/loanOrderForm.tsx b/src/features/loanOrders/components/loanOrderForm.tsx index 668092f..c56137b 100644 --- a/src/features/loanOrders/components/loanOrderForm.tsx +++ b/src/features/loanOrders/components/loanOrderForm.tsx @@ -206,7 +206,7 @@ function StepStatus({ form, errors, set, t }: StepContentProps) { function StepLoan({ form, errors, set, t, initialData }: StepContentProps & { initialData?: LoanOrder }) { const { i18n } = useTranslation(); - const { data: requiredDocsData } = useGetRequiredDocuments({ page: 1, limit: 100 }); + const { data: requiredDocsData } = useGetRequiredDocuments({ page: 1, limit: 25 }); const [loanTypeSearch, setLoanTypeSearch] = useState(""); const loanTypesQuery = useInfiniteLoanTypes(loanTypeSearch); diff --git a/src/features/loanPaidOffLetters/components/LoanPaidOffLetterForm.tsx b/src/features/loanPaidOffLetters/components/LoanPaidOffLetterForm.tsx index 9141f0a..eafc666 100644 --- a/src/features/loanPaidOffLetters/components/LoanPaidOffLetterForm.tsx +++ b/src/features/loanPaidOffLetters/components/LoanPaidOffLetterForm.tsx @@ -15,7 +15,7 @@ import { StepBarCards, type StepCardItem } from "@/components/stepBarV2"; import { BentoGrid, BentoCard } from "@/components/bento"; import { PASSPORT_SERIES_OPTIONS, getStatusOptions, getRegionOptions, LOAN_PAID_OFF_REGION_CODES } from "@/constants"; import { useInfiniteBranches } from "@/features/shared/hooks/useSharedBranchUsers"; -import { useInfiniteUsers } from "@/features/allUsers/hooks/useAllUsers"; +import { useInfiniteClients } from "@/features/clients/hooks/useClients"; import { useWebSelfLock } from "@/features/shared/hooks/useWebSelfLock"; import type { LocalizedText } from "@/features/branches/api/branchesApi"; @@ -376,10 +376,10 @@ export function LoanPaidOffLetterForm({ mode, initialData }: LoanPaidOffLetterFo // ── User infinite-scroll select ── const [userSearch, setUserSearch] = useState(""); - const usersQuery = useInfiniteUsers(userSearch, !userLocked); + const clientsQuery = useInfiniteClients(userSearch, !userLocked); const userSelectProps: Omit = useMemo(() => { - const opts: InfiniteSelectOption[] = (usersQuery.data?.pages ?? []) + const opts: InfiniteSelectOption[] = (clientsQuery.data?.pages ?? []) .flatMap((p) => p?.users ?? []) .map((u) => { const displayName = [u.firstName, u.lastName].filter(Boolean).join(" ") || u.name || u.username; @@ -404,14 +404,14 @@ export function LoanPaidOffLetterForm({ mode, initialData }: LoanPaidOffLetterFo return { options: opts, - loading: usersQuery.isLoading, - isLoadingMore: usersQuery.isFetchingNextPage, - hasNextPage: !!usersQuery.hasNextPage, - onLoadMore: () => usersQuery.fetchNextPage(), + loading: clientsQuery.isLoading, + isLoadingMore: clientsQuery.isFetchingNextPage, + hasNextPage: !!clientsQuery.hasNextPage, + onLoadMore: () => clientsQuery.fetchNextPage(), searchValue: userSearch, onSearchChange: setUserSearch, }; - }, [usersQuery, userSearch, initialData, userLocked, selfUserId, userName]); + }, [clientsQuery, userSearch, initialData, userLocked, selfUserId, userName]); const { watch, diff --git a/src/features/loanRemaining/components/LoanRemainingForm.tsx b/src/features/loanRemaining/components/LoanRemainingForm.tsx index 1354740..8c3a864 100644 --- a/src/features/loanRemaining/components/LoanRemainingForm.tsx +++ b/src/features/loanRemaining/components/LoanRemainingForm.tsx @@ -171,7 +171,7 @@ export function LoanRemainingForm({ mode, initialData }: LoanRemainingFormProps) required value={watch("userId")} onChange={(v) => setValue("userId", v, { shouldValidate: true })} - placeholder={t("loanRemaining.placeholders.userId", "Ulanyjy saýlaň")} + placeholder={t("Select", "Ulanyjy saýlaň")} error={errMsg(errors.userId?.message)} disabled={isPending || userLocked} {...userSelectProps} diff --git a/src/features/loanTypes/hooks/useLoanTypes.ts b/src/features/loanTypes/hooks/useLoanTypes.ts index 52ba899..245831f 100644 --- a/src/features/loanTypes/hooks/useLoanTypes.ts +++ b/src/features/loanTypes/hooks/useLoanTypes.ts @@ -45,7 +45,7 @@ const LOAN_TYPE_PAGE_SIZE = 25; */ export function useInfiniteLoanTypes(search = "") { const debouncedSearch = useDebouncedValue(search); - const effectiveSearch = normalizeSearch(debouncedSearch); + const effectiveSearch = normalizeSearch(debouncedSearch) || undefined; return useInfiniteQuery({ queryKey: [...loanTypeKeys.all(), "infinite", effectiveSearch] as const, diff --git a/src/features/operators/components/operatorForms.tsx b/src/features/operators/components/operatorForms.tsx index a46b176..24821da 100644 --- a/src/features/operators/components/operatorForms.tsx +++ b/src/features/operators/components/operatorForms.tsx @@ -287,10 +287,10 @@ export function OperatorForm({ mode, initialData }: OperatorFormProps) { {...roleSelect} /> setSelectedBranchId(branchId)} - placeholder={t("users.fields.branchPlaceholder", "Şahamça saýlaň")} + placeholder={t("loanOrderForm.placeholders.select", "Şahamça saýlaň")} disabled={isPending} {...branchSelect} /> diff --git a/src/layouts/DashboardLayout.tsx b/src/layouts/DashboardLayout.tsx index 7980e65..374a927 100644 --- a/src/layouts/DashboardLayout.tsx +++ b/src/layouts/DashboardLayout.tsx @@ -264,7 +264,7 @@ function AppSidebar() { url: "/loan-remaining", }, { - title: t("Certificates", "Güwanamalar"), + title: t("Certificates of loan repayment", "Güwanamalar"), url: "/loan-paid-off-letters", }, ], diff --git a/src/lib/i18n/locales/en.json b/src/lib/i18n/locales/en.json index 45f568c..9aa1ec8 100644 --- a/src/lib/i18n/locales/en.json +++ b/src/lib/i18n/locales/en.json @@ -3,6 +3,21 @@ "(and :count more errors)": "(and :count more errors)", "A fresh verification link has been sent to your email address.": "A fresh verification link has been sent to your email address.", "A Timeout Occurred": "A Timeout Occurred", + "Create card requisite order": "Create card requisite order", + "Edit card requisite": "Edit card requisite", + "Back": "Back", + "Customer": "Customer", + "ID": "ID", + "Unique ID": "Unique ID", + "Balance": "Balance", + "Balance amount": "Balance amount", + "Balance currency": "Balance currency", + "Card expiry": "Card expiry", + "Card last 4": "Card last 4", + "Checked at": "Checked at", + "Expiry": "Expiry", + "Select user": "Select user", + "Updated at": "Updated at", "Accepted": "Accepted", "Activity": "Activity", "Active": "Active", @@ -375,6 +390,7 @@ "common.notFound": "Not found", "common.goBack": "Go back", "common.backToHome": "Go to home", + "common.viewFile": "View file", "errors.pageNotFoundTitle": "Page not found", "errors.pageNotFoundDescription": "The page you are looking for does not exist or has been moved.", "errors.forbidden": "You do not have permission to perform this action.", @@ -385,6 +401,7 @@ "common.no": "No", "loanRemaining.create.title": "New Loan Remaining Balance", "loanRemaining.edit.title": "Edit Loan Remaining Balance", + "loanRemaining.columns.createdAt": "Created at", "loanOrders.title": "Loan Orders", "loanOrders.create": "Create Loan Order", "loanOrders.edit": "Edit Loan Order", @@ -549,7 +566,10 @@ "Guarantor 2 Patronic name": "2nd Guarantor patronymic name", "Guarantor Note": "Guarantor note", "Loan history": "Loan history", + "loanOrderForm.labels.requiredDoc": "Required document", "loanOrderForm.labels.status": "Status", + "loanOrderForm.titles.bornPlace": "Place of birth", + "loanOrderForm.titles.loanCardInfo": "Loan Card Info", "loanOrderForm.labels.loanAmount": "Loan amount", "loanOrderForm.labels.cardExpMonth": "Month", "loanOrderForm.labels.cardExpYear": "Year", @@ -579,6 +599,7 @@ "loanOrderForm.placeholders.residence": "Registered address", "loanOrderForm.placeholders.currentResidence": "Current residence", "loanOrderForm.titles.cardInfo": "Card details", + "loanOrderForm.titles.loanCardExpiry": "Loan card expiry", "loanOrderForm.titles.cardExpiry": "Card expiry", "loanOrderForm.titles.contactMain": "Main", "loanOrderForm.titles.contactAdditional": "Additional", @@ -612,6 +633,7 @@ "common.saving": "Saving...", "common.success.create": "Successfully created", "common.success.save": "Successfully saved", + "common.errors.required": "Field is required", "common.errors.fillRequired": "Please fill required fields", "validation.fixErrors": "Please fix the errors", "cardOrder.step.card": "Card", @@ -706,6 +728,14 @@ "cardRequisiteForm.steps.card.subtitle": "Type & Location", "cardRequisiteForm.steps.personal.subtitle": "Name & Phone", "cardRequisiteForm.steps.passport.subtitle": "Documents", + "cardRequisiteForm.labels.cardNumber": "Card number", + "cardRequisiteForm.labels.status": "Status", + "cardRequisiteForm.labels.uniqueId": "Order ID (Unique ID)", + "cardRequisiteForm.labels.user": "User", + "cardRequisiteForm.placeholders.uniqueId": "Unique ID...", + "cardRequisiteForm.sections.card": "Card details", + "cardRequisiteForm.sections.location": "Location & User", + "cardRequisiteForm.sections.order": "Order details", "cardRequisiteForm.labels.cardType": "Card type", "cardPinForm.steps.card.subtitle": "Type & Location", "cardPinForm.steps.personal.subtitle": "Info", @@ -906,6 +936,12 @@ "branches.sections.basic": "Basic information", "branches.sections.billing": "Billing credentials", "branches.viewTitle": "Branch detail", + "cardBalance.deleteConfirm": "Delete this card balance?", + "cardBalance.deleteDescription": "This action is irreversible. The card balance will be permanently deleted.", + "cardBalance.searchPlaceholder": "Search by passport number", + "cardBalance.status.approved": "Approved", + "cardBalance.status.pending": "Pending", + "cardBalance.status.rejected": "Rejected", "cardBalance.createTitle": "Create card balance", "cardBalance.editTitle": "Edit card balance", "cardBalance.title": "Card balances", @@ -928,10 +964,17 @@ "cardReasons.toast.updateSuccess": "Reason updated", "cardReasons.toast.deleteSuccess": "Reason deleted", "cardReasons.viewTitle": "Reason detail", + "cardRequisites.deleteConfirm": "Delete this requisition?", + "cardRequisites.deleteDescription": "This action is irreversible. The card requisites will be permanently deleted.", + "cardRequisites.searchPlaceholder": "Search", + "cardRequisites.status.approved": "Approved", + "cardRequisites.status.pending": "Pending", + "cardRequisites.status.rejected": "Rejected", "cardRequisites.createTitle": "Create card requisites", "cardRequisites.editTitle": "Edit card requisites", "cardTransactions.createTitle": "Create card transaction", "cardTransactions.editTitle": "Edit card transaction", + "cardTransaction.col.user": "User", "cardTypes.createTitle": "Create card type", "cardTypes.editTitle": "Edit card type", "cardTypes.title": "Card types", @@ -1079,6 +1122,10 @@ "loanOrders.sections.meta": "Main info", "loanOrders.sections.loan": "Loan", "loanOrders.sections.location": "Location", + "loanOrders.sections.guarantor1": "Guarantor 1", + "loanOrders.sections.guarantor2": "Guarantor 2", + "loanOrders.sections.loanCard": "Loan card", + "loanOrders.sections.salaryCard": "Salary card", "loanOrders.sections.card": "Card", "loanOrders.sections.guarantor": "1. Guarantor", "loanOrders.sections.personal": "Personal info", @@ -1093,7 +1140,9 @@ "loanOrders.columns.phone": "Phone", "loanOrders.fields.note": "Note", "loanOrders.fields.loanAmount": "Loan amount", + "Loan card number": "Loan card number", "loanOrders.fields.cardNumber": "Card number", + "Loan card name": "Loan card name", "loanOrders.fields.cardName": "Name on card", "loanOrders.fields.guarantorName": "Guarantor full name", "loanOrders.fields.guarantorPassport": "Passport", @@ -1122,6 +1171,23 @@ "loanOrders.fields.passportPage23": "Pages 2-3", "loanOrders.fields.passportPage89": "Pages 8-9", "loanOrders.fields.passportPage32": "Page 32", + "loanOrders.fields.cardExpiry": "Expiry", + "loanOrders.fields.guarantorCardName": "Name on card", + "loanOrders.fields.guarantorCardNumber": "Card number", + "loanOrders.fields.guarantorFullName": "Full name", + "loanOrders.fields.guarantorNote": "Note", + "loanOrders.fields.guarantorPassportNumber": "Passport number", + "loanOrders.fields.guarantorPassportSerie": "Passport serie", + "loanOrders.fields.loanCardName": "Name on card", + "loanOrders.fields.loanCardNumber": "Card number", + "loanOrders.fields.notes": "Notes", + "loanOrders.fields.passportGivenAt": "Issued at", + "loanOrders.fields.passportSerie": "Passport serie", + "loanOrders.fields.patronicName": "Patronymic", + "loanOrders.fields.satisfiable": "Approved", + "loanOrders.fields.source": "Source", + "loanOrders.fields.uniqueId": "Unique ID", + "loanOrders.fields.updatedAt": "Updated at", "loanOrders.fields.amount": "Amount", "loanOrders.fields.createdBy": "Created by", "loanOrderMobiles.view.title": "Loan order entry", @@ -1172,6 +1238,36 @@ "Passport (pages 2-3)": "Passport (pages 2-3)", "Passport (pages 8-9)": "Passport (pages 8-9)", "cardRequisite.status.pending": "Pending", + "cardRequisite.birthDate": "Date of birth", + "cardRequisite.branch": "Branch", + "cardRequisite.cardExpireMonth": "Card expiry (month)", + "cardRequisite.cardExpireYear": "Card expiry (year)", + "cardRequisite.cardNumber": "Card number", + "cardRequisite.cardSection": "Card", + "cardRequisite.cardType": "Card type", + "cardRequisite.createdAt": "Created at", + "cardRequisite.deleteDesc": "This action cannot be undone. The card requisites will be permanently deleted.", + "cardRequisite.deleteTitle": "Are you sure?", + "cardRequisite.fullName": "Full name", + "cardRequisite.locationSection": "Location", + "cardRequisite.metaSection": "Main info", + "cardRequisite.note": "Note", + "cardRequisite.passportFile1": "Passport (page 1)", + "cardRequisite.passportFile2": "Passport (pages 2-3)", + "cardRequisite.passportFile3": "Passport (pages 8-9)", + "cardRequisite.passportFile4": "Passport (page 32)", + "cardRequisite.passportNumber": "Passport number", + "cardRequisite.passportSection": "Passport", + "cardRequisite.passportSeries": "Passport series", + "cardRequisite.personalSection": "Personal data", + "cardRequisite.phone": "Phone", + "cardRequisite.region": "Region", + "cardRequisite.status": "Status", + "cardRequisite.userEmail": "User email", + "cardRequisite.userName": "User name", + "cardRequisite.userPhone": "User phone", + "cardRequisite.userSection": "User", + "cardRequisite.viewTitle": "Card requisites details", "cardRequisite.status.approved": "Approved", "cardRequisite.status.rejected": "Rejected", "cardPin.viewTitle": "Card PIN envelope detail", @@ -1462,6 +1558,11 @@ "profile.title": "My Profile", "profile.actions.assignRole": "Assign role", "profile.actions.assignPermission": "Assign permission", + "profile.editTitle": "Edit profile", + "profile.sections.account": "Account details", + "profile.sections.actions": "Actions", + "profile.sections.contact": "Contact details", + "profile.sections.org": "Organization details", "profile.actions.assignBranch": "Assign branch", "profile.assign.success": "Assigned successfully", "profile.assign.userLabel": "User (staff)" diff --git a/src/lib/i18n/locales/ru.json b/src/lib/i18n/locales/ru.json index 92ca6c6..180450d 100644 --- a/src/lib/i18n/locales/ru.json +++ b/src/lib/i18n/locales/ru.json @@ -3,6 +3,21 @@ "(and :count more errors)": "(и ещё :count ошибок)", "A fresh verification link has been sent to your email address.": "Новая ссылка подтверждения отправлена на Ваш адрес электронной почты.", "A Timeout Occurred": "Время ожидания истекло", + "Back": "Назад", + "Create card requisite order": "Создать заявку на реквизиты карты", + "Customer": "Клиент", + "Edit card requisite": "Редактировать реквизиты карты", + "Unique ID": "Уникальный ID", + "ID": "ID", + "Balance": "Баланс", + "Balance amount": "Сумма баланса", + "Balance currency": "Валюта баланса", + "Card expiry": "Срок действия карты", + "Card last 4": "Последние 4 цифры карты", + "Checked at": "Проверено", + "Expiry": "Срок действия", + "Select user": "Выберите пользователя", + "Updated at": "Дата обновления", "Accepted": "Принято", "Activity": "Активность", "Active": "Активный", @@ -375,6 +390,7 @@ "common.notFound": "Не найдено", "common.goBack": "Назад", "common.backToHome": "На главную", + "common.viewFile": "Просмотр файла", "errors.pageNotFoundTitle": "Страница не найдена", "errors.pageNotFoundDescription": "Страница, которую вы ищете, не существует или была перемещена.", "errors.forbidden": "У вас нет разрешения на выполнение этого действия.", @@ -385,6 +401,7 @@ "common.no": "Нет", "loanRemaining.create.title": "Новая задолженность по кредиту", "loanRemaining.edit.title": "Изменить задолженность по кредиту", + "loanRemaining.columns.createdAt": "Дата создания", "loanOrders.title": "Заявки на кредит", "loanOrders.create": "Создать заявку на кредит", "loanOrders.edit": "Редактировать заявку на кредит", @@ -549,7 +566,10 @@ "Guarantor 2 Patronic name": "Отчество 2-го поручителя", "Guarantor Note": "Заметка поручителя", "Loan history": "Кредитная история", + "loanOrderForm.labels.requiredDoc": "Требуемый документ", "loanOrderForm.labels.status": "Статус", + "loanOrderForm.titles.bornPlace": "Место рождения", + "loanOrderForm.titles.loanCardInfo": "Карточная информация", "loanOrderForm.labels.loanAmount": "Сумма кредита", "loanOrderForm.labels.cardExpMonth": "Месяц", "loanOrderForm.labels.cardExpYear": "Год", @@ -579,6 +599,7 @@ "loanOrderForm.placeholders.residence": "Адрес прописки", "loanOrderForm.placeholders.currentResidence": "Фактический адрес", "loanOrderForm.titles.cardInfo": "Данные карты", + "loanOrderForm.titles.loanCardExpiry": "Срок действия карты займа", "loanOrderForm.titles.cardExpiry": "Срок карты", "loanOrderForm.titles.contactMain": "Основной", "loanOrderForm.titles.contactAdditional": "Дополнительный", @@ -612,6 +633,7 @@ "common.saving": "Сохранение...", "common.success.create": "Успешно создано", "common.success.save": "Успешно сохранено", + "common.errors.required": "Поле обязательно для заполнения", "common.errors.fillRequired": "Заполните обязательные поля", "validation.fixErrors": "Пожалуйста, исправьте ошибки", "cardOrder.step.card": "Карта", @@ -706,6 +728,14 @@ "cardRequisiteForm.steps.card.subtitle": "Тип и местоположение", "cardRequisiteForm.steps.personal.subtitle": "Имя и телефон", "cardRequisiteForm.steps.passport.subtitle": "Документы", + "cardRequisiteForm.labels.cardNumber": "Номер карты", + "cardRequisiteForm.labels.status": "Статус", + "cardRequisiteForm.labels.uniqueId": "ID заявки (Уникальный ID)", + "cardRequisiteForm.labels.user": "Пользователь", + "cardRequisiteForm.placeholders.uniqueId": "Уникальный ID...", + "cardRequisiteForm.sections.card": "Данные карты", + "cardRequisiteForm.sections.location": "Местоположение & Пользователь", + "cardRequisiteForm.sections.order": "Данные заявки", "cardRequisiteForm.labels.cardType": "Тип карты", "Fix errors": "Пожалуйста, исправьте ошибки", "Personal": "Личные данные", @@ -907,6 +937,12 @@ "branches.sections.basic": "Основная информация", "branches.sections.billing": "Учетные данные биллинга", "branches.viewTitle": "Детали филиала", + "cardBalance.deleteConfirm": "Удалить баланс карты?", + "cardBalance.deleteDescription": "Это действие необратимо. Баланс карты будет удалён безвозвратно.", + "cardBalance.searchPlaceholder": "Поиск по номеру паспорта", + "cardBalance.status.approved": "Одобрено", + "cardBalance.status.pending": "Ожидание", + "cardBalance.status.rejected": "Отклонено", "cardBalance.createTitle": "Создать остаток карты", "cardBalance.editTitle": "Редактировать остаток карты", "cardBalance.title": "Остатки карт", @@ -929,10 +965,17 @@ "cardReasons.toast.updateSuccess": "Причина обновлена", "cardReasons.toast.deleteSuccess": "Причина удалена", "cardReasons.viewTitle": "Детали причины", + "cardRequisites.deleteConfirm": "Удалить эту заявку?", + "cardRequisites.deleteDescription": "Это действие необратимо. Реквизиты карты будут удалены безвозвратно.", + "cardRequisites.searchPlaceholder": "Поиск", + "cardRequisites.status.approved": "Одобрено", + "cardRequisites.status.pending": "Ожидание", + "cardRequisites.status.rejected": "Отклонено", "cardRequisites.createTitle": "Создать реквизиты карты", "cardRequisites.editTitle": "Редактировать реквизиты карты", "cardTransactions.createTitle": "Создать транзакцию карты", "cardTransactions.editTitle": "Редактировать транзакцию карты", + "cardTransaction.col.user": "Пользователь", "cardTypes.createTitle": "Создать тип карты", "cardTypes.editTitle": "Редактировать тип карты", "cardTypes.title": "Типы карт", @@ -1080,6 +1123,10 @@ "loanOrders.sections.meta": "Основная информация", "loanOrders.sections.loan": "Кредит", "loanOrders.sections.location": "Местоположение", + "loanOrders.sections.guarantor1": "Поручитель 1", + "loanOrders.sections.guarantor2": "Поручитель 2", + "loanOrders.sections.loanCard": "Карта кредита", + "loanOrders.sections.salaryCard": "Зарплатная карта", "loanOrders.sections.card": "Карта", "loanOrders.sections.guarantor": "1. Поручитель", "loanOrders.sections.personal": "Личные данные", @@ -1094,7 +1141,9 @@ "loanOrders.columns.phone": "Телефон", "loanOrders.fields.note": "Примечание", "loanOrders.fields.loanAmount": "Сумма кредита", + "Loan card number": "Номер карты займа", "loanOrders.fields.cardNumber": "Номер карты", + "Loan card name": "Название карты займа", "loanOrders.fields.cardName": "Имя на карте", "loanOrders.fields.guarantorName": "Полное имя поручителя", "loanOrders.fields.guarantorPassport": "Паспорт", @@ -1123,6 +1172,23 @@ "loanOrders.fields.passportPage23": "Страницы 2-3", "loanOrders.fields.passportPage89": "Страницы 8-9", "loanOrders.fields.passportPage32": "Страница 32", + "loanOrders.fields.cardExpiry": "Срок действия", + "loanOrders.fields.guarantorCardName": "Имя на карте", + "loanOrders.fields.guarantorCardNumber": "Номер карты", + "loanOrders.fields.guarantorFullName": "Полное имя", + "loanOrders.fields.guarantorNote": "Примечание", + "loanOrders.fields.guarantorPassportNumber": "Номер паспорта", + "loanOrders.fields.guarantorPassportSerie": "Серия паспорта", + "loanOrders.fields.loanCardName": "Имя на карте", + "loanOrders.fields.loanCardNumber": "Номер карты", + "loanOrders.fields.notes": "Примечания", + "loanOrders.fields.passportGivenAt": "Дата выдачи", + "loanOrders.fields.passportSerie": "Серия паспорта", + "loanOrders.fields.patronicName": "Отчество", + "loanOrders.fields.satisfiable": "Одобрено", + "loanOrders.fields.source": "Источник", + "loanOrders.fields.uniqueId": "Уникальный ID", + "loanOrders.fields.updatedAt": "Дата обновления", "loanOrders.fields.amount": "Сумма", "loanOrders.fields.createdBy": "Создано", "loanOrderMobiles.view.title": "Просмотр заявки на кредит", @@ -1173,6 +1239,36 @@ "Passport (pages 2-3)": "Паспорт (страницы 2-3)", "Passport (pages 8-9)": "Паспорт (страницы 8-9)", "cardRequisite.status.pending": "В ожидании", + "cardRequisite.birthDate": "Дата рождения", + "cardRequisite.branch": "Филиал", + "cardRequisite.cardExpireMonth": "Срок действия карты (месяц)", + "cardRequisite.cardExpireYear": "Срок действия карты (год)", + "cardRequisite.cardNumber": "Номер карты", + "cardRequisite.cardSection": "Карта", + "cardRequisite.cardType": "Тип карты", + "cardRequisite.createdAt": "Дата создания", + "cardRequisite.deleteDesc": "Это действие необратимо. Реквизиты карты будут удалены безвозвратно.", + "cardRequisite.deleteTitle": "Вы уверены?", + "cardRequisite.fullName": "Полное имя", + "cardRequisite.locationSection": "Местоположение", + "cardRequisite.metaSection": "Основная информация", + "cardRequisite.note": "Примечание", + "cardRequisite.passportFile1": "Паспорт (стр. 1)", + "cardRequisite.passportFile2": "Паспорт (стр. 2-3)", + "cardRequisite.passportFile3": "Паспорт (стр. 8-9)", + "cardRequisite.passportFile4": "Паспорт (стр. 32)", + "cardRequisite.passportNumber": "Номер паспорта", + "cardRequisite.passportSection": "Паспорт", + "cardRequisite.passportSeries": "Серия паспорта", + "cardRequisite.personalSection": "Личные данные", + "cardRequisite.phone": "Телефон", + "cardRequisite.region": "Регион", + "cardRequisite.status": "Статус", + "cardRequisite.userEmail": "Email пользователя", + "cardRequisite.userName": "Имя пользователя", + "cardRequisite.userPhone": "Телефон пользователя", + "cardRequisite.userSection": "Пользователь", + "cardRequisite.viewTitle": "Детали реквизитов карты", "cardRequisite.status.approved": "Подтверждено", "cardRequisite.status.rejected": "Отклонено", "cardPin.viewTitle": "Детали ПИН-конверта", @@ -1463,6 +1559,11 @@ "profile.title": "Мой профиль", "profile.actions.assignRole": "Назначить роль", "profile.actions.assignPermission": "Назначить разрешение", + "profile.editTitle": "Редактирование профиля", + "profile.sections.account": "Данные аккаунта", + "profile.sections.actions": "Действия", + "profile.sections.contact": "Контактные данные", + "profile.sections.org": "Организационные данные", "profile.actions.assignBranch": "Назначить филиал", "profile.assign.success": "Успешно назначено", "profile.assign.userLabel": "Пользователь (staff)" diff --git a/src/lib/i18n/locales/tk.json b/src/lib/i18n/locales/tk.json index 2a4e6cd..79f81db 100644 --- a/src/lib/i18n/locales/tk.json +++ b/src/lib/i18n/locales/tk.json @@ -3,6 +3,21 @@ "(and :count more errors)": "(we ýene :count ýalňyşlyk)", "A fresh verification link has been sent to your email address.": "E-poçta salgyňyza täze tassyklama baglanyşygy iberildi.", "A Timeout Occurred": "Wagt gutardy", + "Back": "Yza", + "Create card requisite order": "Kart rekwiziti üçin sargyt dörediň", + "Customer": "MÜŞDERI", + "Edit card requisite": "Kart rekwizitini üýtget", + "Unique ID": "Unikal ID", + "ID": "ID", + "Balance": "Galyndy", + "Balance amount": "Galyndy möçberi", + "Balance currency": "Galyndy walýutasy", + "Card expiry": "Kart möhleti", + "Card last 4": "Kart belgisi (soňky 4)", + "Checked at": "Barlan wagty", + "Expiry": "Kart möhleti", + "Select user": "Ulanyjyny saýlaň", + "Updated at": "Täzelenen wagty", "Accepted": "Kabul edildi", "Activity": "Işjeňlik", "Active": "Işjeň", @@ -375,6 +390,7 @@ "common.notFound": "Tapylmady", "common.goBack": "Yza gaýt", "common.backToHome": "Baş sahypa", + "common.viewFile": "Faýla seret", "errors.pageNotFoundTitle": "Sahypa tapylmady", "errors.pageNotFoundDescription": "Gözleýän sahypaňyz ýok ýa-da başga ýere geçirilen bolup biler.", "errors.forbidden": "Bu amaly ýerine ýetirmäge rugsadyňyz ýok.", @@ -385,11 +401,14 @@ "common.no": "Ýok", "loanRemaining.create.title": "Täze karz galyndysy", "loanRemaining.edit.title": "Karz galyndysyny üýtget", + "loanRemaining.columns.createdAt": "Döredilen wagty", "loanOrders.title": "Karz sargytlary", "loanOrders.create": "Karz sargyt dörediň", "loanOrders.edit": "Karz sargydy üýtget", "loanOrders.createDescription": "Ähli meýdanlary dolduryp, ädim-ädim öň geçiň.", "loanOrders.editDescription": "Ähli meýdanlary dolduryp, ädim-ädim öň geçiň.", + "loanOrderForm.titles.bornPlace": "Doglan ýeri", + "loanOrderForm.titles.loanCardInfo": "Karz karty maglumatlary", "loanOrderMobiles.title": "Karz sargytlary", "loanOrderMobiles.editTitle": "Karz sargydy üýtget", "loanOrderMobiles.createTitle": "Karz sargydy dörediň (Mobile)", @@ -548,6 +567,7 @@ "Guarantor 2 Patronic name": "2. Zamunyň atasynyň ady", "Guarantor Note": "Zamun belligi", "Loan history": "Karz taryhy", + "loanOrderForm.labels.requiredDoc": "Gerekli resminat", "loanOrderForm.labels.status": "Status", "loanOrderForm.labels.loanAmount": "Karz möçberi", "loanOrderForm.labels.cardExpMonth": "Aý", @@ -578,6 +598,7 @@ "loanOrderForm.placeholders.residence": "Ýazgy edilen salgy", "loanOrderForm.placeholders.currentResidence": "Häzirki ýaşaýyş ýeri", "loanOrderForm.titles.cardInfo": "Kart maglumatlary", + "loanOrderForm.titles.loanCardExpiry": "Karz kart möhleti", "loanOrderForm.titles.cardExpiry": "Kart möhleti", "loanOrderForm.titles.contactMain": "Esasy", "loanOrderForm.titles.contactAdditional": "Goşmaça", @@ -611,6 +632,7 @@ "common.saving": "Ýüklenilýär...", "common.success.create": "Üstünlikli döredildi", "common.success.save": "Üstünlikli ýatda saklandy", + "common.errors.required": "Meýdança hökmany doldurylmaly", "common.errors.fillRequired": "Hökman doldurylmaly öýjükleri dolduryň", "validation.fixErrors": "Dogry maglumat girizmegiňizi haýyş edýäris.", "cardOrder.step.card": "Kart", @@ -705,6 +727,14 @@ "cardRequisiteForm.steps.card.subtitle": "Görnüş & lokasiýa", "cardRequisiteForm.steps.personal.subtitle": "At & telefon", "cardRequisiteForm.steps.passport.subtitle": "Resminamalar", + "cardRequisiteForm.labels.cardNumber": "Kart belgisi", + "cardRequisiteForm.labels.status": "Statusy", + "cardRequisiteForm.labels.uniqueId": "Sargyt belgisi (Unikal ID)", + "cardRequisiteForm.labels.user": "Ulanyjy", + "cardRequisiteForm.placeholders.uniqueId": "Unikal ID...", + "cardRequisiteForm.sections.card": "Kart maglumatlary", + "cardRequisiteForm.sections.location": "Ýerleşiş & Ulanyjy", + "cardRequisiteForm.sections.order": "Sargyt maglumatlary", "cardRequisiteForm.labels.cardType": "Kart görnüşi", "Fix errors": "Dogry maglumat girizmegiňizi haýyş edýäris.", "Personal": "Şahsy", @@ -904,6 +934,12 @@ "branches.sections.basic": "Esasy maglumatlar", "branches.sections.billing": "Billing maglumatlary", "branches.viewTitle": "Şahamça giňişleýin", + "cardBalance.deleteConfirm": "Bu ýazgy pozulsynmy?", + "cardBalance.deleteDescription": "Bu amal yzyna gaýtarylmaz. Kart galyndysy hemişelik öçüriler.", + "cardBalance.searchPlaceholder": "Pasport belgisi boýunça gözle", + "cardBalance.status.approved": "Tassyklanan", + "cardBalance.status.pending": "Garaşylýar", + "cardBalance.status.rejected": "Ret edilen", "cardBalance.createTitle": "Kart galyndy döretmek", "cardBalance.editTitle": "Kart galyndy üýtgetmek", "cardBalance.title": "Kart galyndylary", @@ -926,10 +962,17 @@ "cardReasons.toast.updateSuccess": "Sebäp täzelendi", "cardReasons.toast.deleteSuccess": "Sebäp öçürildi", "cardReasons.viewTitle": "Sebäp giňişleýin", + "cardRequisites.deleteConfirm": "Bu sargyt pozulsynmy?", + "cardRequisites.deleteDescription": "Bu amal yzyna gaýtarylmaz. Kart rekwiziti hemişelik öçüriler.", + "cardRequisites.searchPlaceholder": "Gözlemek", + "cardRequisites.status.approved": "Tassyklanan", + "cardRequisites.status.pending": "Garaşylýar", + "cardRequisites.status.rejected": "Ret edilen", "cardRequisites.createTitle": "Kart rekwizit döretmek", "cardRequisites.editTitle": "Kart rekwizit üýtgetmek", "cardTransactions.createTitle": "Kart herekedi döretmek", "cardTransactions.editTitle": "Kart herekedi üýtgetmek", + "cardTransaction.col.user": "Ulanyjy", "cardTypes.createTitle": "Kart görnüşi döretmek", "cardTypes.editTitle": "Kart görnüşi üýtgetmek", "cardTypes.title": "Kart görnüşleri", @@ -1077,6 +1120,10 @@ "loanOrders.sections.meta": "Esasy maglumatlar", "loanOrders.sections.loan": "Karz", "loanOrders.sections.location": "Lokasiýa", + "loanOrders.sections.guarantor1": "1-nji zamun", + "loanOrders.sections.guarantor2": "2-nji zamun", + "loanOrders.sections.loanCard": "Karz geçiriljek kartoçka", + "loanOrders.sections.salaryCard": "Zähmet haky kartoçkasy", "loanOrders.sections.card": "Kart", "loanOrders.sections.guarantor": "1. Zamun", "loanOrders.sections.personal": "Şahsy maglumatlar", @@ -1091,7 +1138,9 @@ "loanOrders.columns.phone": "Telefon", "loanOrders.fields.note": "Bellik", "loanOrders.fields.loanAmount": "Karz mukdary", + "Loan card number": "Karz kart belgisi", "loanOrders.fields.cardNumber": "Kart belgisi", + "Loan card name": "Karz kartdaky ady", "loanOrders.fields.cardName": "Kartdaky ady", "loanOrders.fields.guarantorName": "Zamunyň doly ady", "loanOrders.fields.guarantorPassport": "Pasport", @@ -1120,6 +1169,23 @@ "loanOrders.fields.passportPage23": "Sahypa 2-3", "loanOrders.fields.passportPage89": "Sahypa 8-9", "loanOrders.fields.passportPage32": "Sahypa 32", + "loanOrders.fields.cardExpiry": "Möhleti", + "loanOrders.fields.guarantorCardName": "Kartdaky ady", + "loanOrders.fields.guarantorCardNumber": "Karta belgisi", + "loanOrders.fields.guarantorFullName": "Doly ady", + "loanOrders.fields.guarantorNote": "Bellik", + "loanOrders.fields.guarantorPassportNumber": "Pasport belgisi", + "loanOrders.fields.guarantorPassportSerie": "Pasport seriýasy", + "loanOrders.fields.loanCardName": "Kartdaky ady", + "loanOrders.fields.loanCardNumber": "Karta belgisi", + "loanOrders.fields.notes": "Bellik", + "loanOrders.fields.passportGivenAt": "Berlen senesi", + "loanOrders.fields.passportSerie": "Pasport seriýasy", + "loanOrders.fields.patronicName": "Atasynyň ady", + "loanOrders.fields.satisfiable": "Kanagatlandyrylan", + "loanOrders.fields.source": "Çeşme", + "loanOrders.fields.uniqueId": "Ýeke-täk ID", + "loanOrders.fields.updatedAt": "Üýtgedilen wagty", "loanOrders.fields.amount": "Berlik", "loanOrders.fields.createdBy": "Sargyt eden", "loanOrderMobiles.view.title": "Karz sargyt giriş", @@ -1171,6 +1237,36 @@ "Passport (pages 2-3)": "Pasport (2-3-nji sahypa)", "Passport (pages 8-9)": "Pasport (8-9 sahypa)", "cardRequisite.status.pending": "Garaşylýar", + "cardRequisite.birthDate": "Doglan güni", + "cardRequisite.branch": "Şahamça", + "cardRequisite.cardExpireMonth": "Kart Möhleti (aý)", + "cardRequisite.cardExpireYear": "Kart Möhleti (ýyl)", + "cardRequisite.cardNumber": "Kart belgisi", + "cardRequisite.cardSection": "Kart", + "cardRequisite.cardType": "Kart görnüşi", + "cardRequisite.createdAt": "Döredilen wagty", + "cardRequisite.deleteDesc": "Bu amal yzyna dolanyp bolmaz.", + "cardRequisite.deleteTitle": "Pozmak isleýärsiňizmi?", + "cardRequisite.fullName": "Doly ady", + "cardRequisite.locationSection": "Lokasiýa", + "cardRequisite.metaSection": "Esasy maglumatlar", + "cardRequisite.note": "Bellik", + "cardRequisite.passportFile1": "Pasport (sahypa 1)", + "cardRequisite.passportFile2": "Pasport (2-3-nji sahypa)", + "cardRequisite.passportFile3": "Pasport (8-9 sahypa)", + "cardRequisite.passportFile4": "Pasport (32-nji sahypa)", + "cardRequisite.passportNumber": "Pasport belgisi", + "cardRequisite.passportSection": "Pasport", + "cardRequisite.passportSeries": "Pasport seriýasy", + "cardRequisite.personalSection": "Şahsy maglumatlar", + "cardRequisite.phone": "Telefon", + "cardRequisite.region": "Welaýat", + "cardRequisite.status": "Status", + "cardRequisite.userEmail": "Ulanyjy e-poçta", + "cardRequisite.userName": "Ulanyjy ady", + "cardRequisite.userPhone": "Ulanyjy telefon", + "cardRequisite.userSection": "Ulanyjy", + "cardRequisite.viewTitle": "Kart rekwizit giňişleýin", "cardRequisite.status.approved": "Tassyklanan", "cardRequisite.status.rejected": "Ret edilen", "cardPin.viewTitle": "Kart pin bukja giňişleýin", @@ -1461,6 +1557,11 @@ "profile.title": "Meniň profilim", "profile.actions.assignRole": "Rol birikdiriň", "profile.actions.assignPermission": "Rugsat birikdiriň", + "profile.editTitle": "Profili üýtgetmek", + "profile.sections.account": "Hasap maglumatlary", + "profile.sections.actions": "Amallar", + "profile.sections.contact": "Habarlaşmak maglumatlary", + "profile.sections.org": "Guramaçylyk maglumatlary", "profile.actions.assignBranch": "Şahamça birikdiriň", "profile.assign.success": "Üstünlikli birikdirildi", "profile.assign.userLabel": "Ulanyjy (staff)" diff --git a/src/lib/utils/dateUtils.ts b/src/lib/utils/dateUtils.ts index 0eca614..c27d248 100644 --- a/src/lib/utils/dateUtils.ts +++ b/src/lib/utils/dateUtils.ts @@ -41,14 +41,27 @@ export function formatToApiDate(dateStr?: string | Date | null): string { } /** - * Backend'den gelen ISO UTC tarihini formun `` / DateInput'un - * beklediği 'YYYY-MM-DD' formatına çevirir. Örn: '1987-04-08T14:35:00Z' -> '1987-04-08' + * Formun `` / DateInput'un beklediği 'YYYY-MM-DD' olarak çıktı verir. + * Girdi hem ISO UTC ('1987-04-08T14:35:00Z'), hem 'YYYY-MM-DD', hem de display formatı + * 'dd.MM.yyyy' (08.04.1987) olabilir — hepsi 'YYYY-MM-DD'ye çevrilir. */ export function formatFromApiDateInput(isoStr?: string | null): string { if (!isoStr) return ""; const trimmed = isoStr.trim(); if (!trimmed) return ""; + // zaten 'YYYY-MM-DD' + if (/^\d{4}-\d{2}-\d{2}$/.test(trimmed)) return trimmed; + + // display formatı 'dd.MM.yyyy' veya 'd.M.yyyy' + const dmMatch = trimmed.match(/^(\d{1,2})\.(\d{1,2})\.(\d{4})$/); + if (dmMatch) { + const year = dmMatch[3]; + const month = dmMatch[2].padStart(2, "0"); + const day = dmMatch[1].padStart(2, "0"); + return `${year}-${month}-${day}`; + } + const d = new Date(trimmed); if (isNaN(d.getTime())) return trimmed.slice(0, 10); diff --git a/src/pages/profile/index.tsx b/src/pages/profile/index.tsx index 2bda370..428128f 100644 --- a/src/pages/profile/index.tsx +++ b/src/pages/profile/index.tsx @@ -199,13 +199,20 @@ export default function ProfilePage() { {user.role ? ( - - - {user.role.name} - + isAdmin ? ( + + + {user.role.name} + + ) : ( + + + {user.role.name} + + ) ) : ( — )} @@ -214,18 +221,27 @@ export default function ProfilePage() { {branches.length > 0 ? (
- {branches.map((b) => ( - - - - {b.name?.[lang] || b.name?.tm || b.name?.en || b.name?.ru || b.uniqueCode || b.id} + {branches.map((b) => + isAdmin ? ( + + + + {b.name?.[lang] || b.name?.tm || b.name?.en || b.name?.ru || b.uniqueCode || b.id} + + + ) : ( + + + + {b.name?.[lang] || b.name?.tm || b.name?.en || b.name?.ru || b.uniqueCode || b.id} + - - ))} + ), + )}
) : ( — @@ -235,16 +251,23 @@ export default function ProfilePage() { {permissions.length > 0 ? (
- {permissions.map((p) => ( - - - {p.name || p.code || p.id} - - ))} + {permissions.map((p) => + isAdmin ? ( + + + {p.name || p.code || p.id} + + ) : ( + + + {p.name || p.code || p.id} + + ), + )}
) : ( —