diff --git a/src/pages/cardDepartment/cardPinsView/index.tsx b/src/pages/cardDepartment/cardPinsView/index.tsx
index 61ac8cc..be93ccc 100644
--- a/src/pages/cardDepartment/cardPinsView/index.tsx
+++ b/src/pages/cardDepartment/cardPinsView/index.tsx
@@ -1,4 +1,4 @@
-import { useParams, useNavigate, Link } from 'react-router-dom'
+import { useParams, useNavigate } from 'react-router-dom'
import { useTranslation } from 'react-i18next'
import { useCardPin, useDeleteCardPin } from '@/features/cardPins/hooks/useCardPins'
import type { CardPinStatus } from '@/features/cardPins/api/cardPinApi'
diff --git a/src/pages/cardDepartment/cardRequisitesView/index.tsx b/src/pages/cardDepartment/cardRequisitesView/index.tsx
index 2001bba..b449b30 100644
--- a/src/pages/cardDepartment/cardRequisitesView/index.tsx
+++ b/src/pages/cardDepartment/cardRequisitesView/index.tsx
@@ -78,7 +78,7 @@ function PassportImageRow({ label, url }: { label: string; url?: string }) {
className="flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors w-fit"
>
- {('Download', 'Göçürip al')}
+ {( 'Göçürip al')}
>
) : (
diff --git a/src/pages/internationalPayments/sberPayments/index.tsx b/src/pages/internationalPayments/sberPayments/index.tsx
new file mode 100644
index 0000000..d3141b7
--- /dev/null
+++ b/src/pages/internationalPayments/sberPayments/index.tsx
@@ -0,0 +1,312 @@
+
+import { useState, useMemo } from 'react'
+import { format } from 'date-fns'
+import { Eye, Edit, ArrowUpDown, Trash2 } from 'lucide-react'
+import type { ColumnDef, VisibilityState } from '@tanstack/react-table'
+import { useNavigate } from 'react-router-dom'
+import { DataTable } from '@/components/dataTable'
+import { DataTableToolbar, type ColumnMeta, type FilterField, type ActiveFilter } from '@/components/dataTableToolbar'
+import { StatusBadge, PaidStatusBadge } from '@/features/sberPayments/components/statusBadge'
+import { useSberPaymentOrders, useDeleteSberPayment } from '@/features/sberPayments/hooks/useSberPayments'
+import { WELAYATLAR, STATUSES, type SberPaymentOrder } from '@/features/sberPayments/api/sberPaymentsApi'
+
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from '@/components/ui/select'
+
+// ─── Column Definitions ───────────────────────────────────────────────────────
+
+
+
+// ─── Column Meta for Toolbar ──────────────────────────────────────────────────
+
+const columnMeta: ColumnMeta[] = [
+ { id: 'id', label: 'ID' },
+ { id: 'createdAt', label: 'Doredilen wagty' },
+ { id: 'welayat', label: 'Welayat' },
+ { id: 'sahamca', label: 'Sahamca' },
+ { id: 'firstName', label: 'Ady' },
+ { id: 'lastName', label: 'Familiyasy' },
+ { id: 'phone', label: 'Telefon' },
+ { id: 'status', label: 'Status' },
+ { id: 'paidStatus', label: 'Tolenen (sul ay)' },
+]
+
+// ─── Filter Fields ────────────────────────────────────────────────────────────
+
+const filterFields: FilterField[] = [
+ {
+ id: 'welayat',
+ label: 'Welayat',
+ options: WELAYATLAR.map((w) => ({ value: w, label: w })),
+ },
+ {
+ id: 'status',
+ label: 'Status',
+ options: STATUSES,
+ },
+]
+
+// ─── List Page Component ──────────────────────────────────────────────────────
+
+export default function SberPaymentsListPage() {
+ const navigate = useNavigate()
+ const deleteMutation = useDeleteSberPayment()
+
+ const columns = useMemo
[]>(() => [
+ {
+ accessorKey: 'id',
+ header: ({ column }) => (
+
+ ),
+ cell: ({ row }) => (
+ {row.getValue('id')}
+ ),
+ },
+ {
+ accessorKey: 'createdAt',
+ header: 'Doredilen wagty',
+ cell: ({ row }) => {
+ const date = new Date(row.getValue('createdAt'))
+ return (
+
+
{format(date, 'HH:mm, dd.MM.yyyy')}
+
+ )
+ },
+ },
+ {
+ accessorKey: 'welayat',
+ header: 'Welayat',
+ cell: ({ row }) => {row.getValue('welayat')},
+ },
+ {
+ accessorKey: 'sahamca',
+ header: ({ column }) => (
+
+ ),
+ cell: ({ row }) => (
+ {row.getValue('sahamca')}
+ ),
+ },
+ {
+ accessorKey: 'firstName',
+ header: 'Ady',
+ cell: ({ row }) => {row.getValue('firstName')},
+ },
+ {
+ accessorKey: 'lastName',
+ header: 'Familiyasy',
+ cell: ({ row }) => {row.getValue('lastName')},
+ },
+ {
+ accessorKey: 'phone',
+ header: 'Telefon',
+ cell: ({ row }) => {row.getValue('phone')},
+ },
+ {
+ accessorKey: 'status',
+ header: ({ column }) => (
+
+ ),
+ cell: ({ row }) => ,
+ },
+ {
+ accessorKey: 'paidStatus',
+ header: 'Tolenen (sul ay)',
+ cell: ({ row }) => ,
+ },
+ {
+ id: 'actions',
+ header: '',
+ cell: ({ row }) => {
+ const order = row.original
+
+ return (
+
+
+
+
+
+ )
+ },
+ },
+ ], [navigate, deleteMutation])
+
+ // Pagination state
+ const [page, setPage] = useState(1)
+ const [perPage, setPerPage] = useState(25)
+
+ // Search state
+ const [search, setSearch] = useState('')
+
+ // Filter state
+ const [activeFilters, setActiveFilters] = useState([])
+
+ // Column visibility & order
+ const [columnVisibility, setColumnVisibility] = useState({})
+ const [columnOrder, setColumnOrder] = useState(columnMeta.map((c) => c.id))
+
+ // Month filter
+ const [selectedMonth, setSelectedMonth] = useState('')
+
+ // Get filter values
+ const welayatFilter = activeFilters.find((f) => f.fieldId === 'welayat')?.value ?? ''
+ const statusFilter = activeFilters.find((f) => f.fieldId === 'status')?.value ?? ''
+
+ // Fetch data
+ const { data, isLoading } = useSberPaymentOrders({
+ page,
+ perPage,
+ search,
+ welayat: welayatFilter,
+ status: statusFilter,
+ })
+
+ const handleFilterChange = (fieldId: string, value: string) => {
+ setActiveFilters((prev) => {
+ const existing = prev.find((f) => f.fieldId === fieldId)
+ if (existing) {
+ return prev.map((f) => (f.fieldId === fieldId ? { ...f, value } : f))
+ }
+ return [...prev, { fieldId, value }]
+ })
+ setPage(1)
+ }
+
+ const handleFilterReset = () => {
+ setActiveFilters([])
+ setPage(1)
+ }
+
+ return (
+
+ {/* Month Filter Card */}
+
+
+
+
+
+ {/* Page Title */}
+
+ Sber tolegier (talyplar ucin)
+
+
+ {/* Toolbar */}
+
{
+ setSearch(val)
+ setPage(1)
+ }}
+ searchPlaceholder="Gozlemek"
+ columns={columnMeta}
+ columnVisibility={columnVisibility}
+ onColumnVisibilityChange={setColumnVisibility}
+ columnOrder={columnOrder}
+ onColumnOrderChange={setColumnOrder}
+ filterFields={filterFields}
+ activeFilters={activeFilters}
+ onFilterChange={handleFilterChange}
+ onFilterReset={handleFilterReset}
+ perPage={perPage}
+ onPerPageChange={(val) => {
+ setPerPage(val)
+ setPage(1)
+ }}
+ actionLabel="Sber toleg (talyplar ucin) doredih"
+ onAction={() => navigate('/sber-payments/create')}
+ />
+
+ {/* Data Table */}
+ row.id}
+ currentPage={data?.pagination.currentPage ?? 1}
+ totalPages={data?.pagination.totalPages ?? 1}
+ totalCount={data?.pagination.totalCount ?? 0}
+ onPageChange={setPage}
+ />
+
+ {/* Pagination Info */}
+
+
+ {data?.pagination.currentPage && data?.pagination.perPage && data?.pagination.totalCount
+ ? `${(data.pagination.currentPage - 1) * data.pagination.perPage + 1}-${Math.min(data.pagination.currentPage * data.pagination.perPage, data.pagination.totalCount)} of ${data.pagination.totalCount}`
+ : ''}
+
+
+
+ )
+}
diff --git a/src/pages/internationalPayments/sberPaymentsCreate/index.tsx b/src/pages/internationalPayments/sberPaymentsCreate/index.tsx
new file mode 100644
index 0000000..07a5737
--- /dev/null
+++ b/src/pages/internationalPayments/sberPaymentsCreate/index.tsx
@@ -0,0 +1,14 @@
+'use client'
+
+import { SberPaymentForm } from '@/features/sberPayments/components/sberPaymentsForm'
+
+export default function SberPaymentCreatePage() {
+ return (
+
+
+ Sber toleg (talyplar ucin) doredih
+
+
+
+ )
+}
diff --git a/src/pages/internationalPayments/sberPaymentsEdit/index.tsx b/src/pages/internationalPayments/sberPaymentsEdit/index.tsx
new file mode 100644
index 0000000..1385f0a
--- /dev/null
+++ b/src/pages/internationalPayments/sberPaymentsEdit/index.tsx
@@ -0,0 +1,28 @@
+import { useParams } from 'react-router-dom'
+import { SberPaymentForm } from '@/features/sberPayments/components/sberPaymentsForm'
+import { useSberPaymentOrder } from '@/features/sberPayments/hooks/useSberPayments'
+import { Spinner } from '@/components/ui/spinner'
+
+export default function SberPaymentEditPage() {
+ const params = useParams()
+ const id = params.id as string
+
+ const { data: order, isLoading } = useSberPaymentOrder(id)
+
+ if (isLoading) {
+ return (
+
+
+
+ )
+ }
+
+ return (
+
+
+ Sber toleg (talyplar ucin) uytgetmek: {id}
+
+
+
+ )
+}
diff --git a/src/pages/internationalPayments/sberPaymentsView/index.tsx b/src/pages/internationalPayments/sberPaymentsView/index.tsx
new file mode 100644
index 0000000..1eb8c8b
--- /dev/null
+++ b/src/pages/internationalPayments/sberPaymentsView/index.tsx
@@ -0,0 +1,352 @@
+
+import { format } from 'date-fns'
+import { Trash2, Edit, Search, Download, Clock } from 'lucide-react'
+
+import { useSberPaymentOrder, useDeleteSberPayment } from '@/features/sberPayments/hooks/useSberPayments'
+import { StatusBadge, PaidStatusBadge } from '@/features/sberPayments/components/statusBadge'
+import { Button } from '@/components/ui/button'
+import { Spinner } from '@/components/ui/spinner'
+import { cn } from '@/lib/utils'
+import { useParams, useNavigate } from "react-router-dom";
+
+// ─── Info Row Component ───────────────────────────────────────────────────────
+
+function InfoRow({
+ label,
+ value,
+ highlight = false
+}: {
+ label: string
+ value: React.ReactNode
+ highlight?: boolean
+}) {
+ return (
+
+ {label}
+
+ {value || '—'}
+
+
+ )
+}
+
+// ─── Section Component ────────────────────────────────────────────────────────
+
+function Section({
+ title,
+ children,
+ className
+}: {
+ title: string
+ children: React.ReactNode
+ className?: string
+}) {
+ return (
+
+
{title}
+
+ {children}
+
+
+ )
+}
+
+// ─── Document Item Component ──────────────────────────────────────────────────
+
+function DocumentItem({
+ label,
+ fileName,
+ fileUrl
+}: {
+ label: string
+ fileName: string | null
+ fileUrl: string | null
+}) {
+ return (
+
+
+ {label}
+
+
+ {fileUrl ? (
+
+
+
+
+ {fileName}
+
+
+ ) : (
+
—
+ )}
+
+
+ )
+}
+
+// ─── View Page Component ──────────────────────────────────────────────────────
+
+export default function SberPaymentViewPage() {
+ const params = useParams()
+ const navigate = useNavigate()
+ const id = params.id as string
+
+ const { data: order, isLoading } = useSberPaymentOrder(id)
+ const deleteMutation = useDeleteSberPayment()
+
+ const handleDelete = async () => {
+ if (confirm('Bu tolegi pozmak isleyanizmi?')) {
+ await deleteMutation.mutateAsync(id)
+ navigate('/sber-payments')
+ }
+ }
+
+ if (isLoading) {
+ return (
+
+
+
+ )
+ }
+
+ if (!order) {
+ return (
+
+
Toleg tapylmady
+
+
+ )
+ }
+
+ return (
+
+ {/* Header Actions */}
+
+
+
+
+
+ {/* Status Section */}
+
+
+ {/* Location Section */}
+
+
+ {/* Personal Info Section */}
+
+
+ {/* Payment Info Section */}
+
+
+
+
+
+
+
+
+ Tolegi kabul edijinin maglumatlary
+
+
+
+
Pasport seriyasy
+
{order.passportSeries}
+
+
+
Pasport nomeri
+
{order.passportNumber}
+
+
+
Ady Familiyasy Atasynyn ady
+
{order.fullName}
+
+
+
+
+
+ {/* Documents - Accepted */}
+
+
+ Kabul ediji talyp boyunca resminamalary
+
+
+ {order.documents?.slice(0, 6).map((doc) => (
+
+ ))}
+
+
+
+ {/* Documents - Sent */}
+
+
+ Ugradyjy boyunca resminamalary
+
+
+ {order.documents?.slice(6).map((doc) => (
+
+ )) || (
+
+ Resminamalar yok
+
+ )}
+
+
+
+ {/* Payment History */}
+
+
+
Toleg taryhy
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Berlen kriteriyalara Toleg gabat gelmedi.
+
+
+
+
+
+
+
+
+
+ {/* Activity Log */}
+
+
+
+
+ {/* Table Header */}
+
+ ID
+ Analys ady
+ Kim tarapyndan
+ Analys nysany (Targets)
+ Analys statusy
+ Sene
+
+
+ {/* Table Body */}
+ {order.activityLog?.length ? (
+ order.activityLog.map((log) => (
+
+ {log.id.split('-')[1] ?? '45384'}
+ {log.analysisName}
+ {log.createdBy}
+ {log.target}
+
+
+ {log.status}
+
+
+
+ {format(new Date(log.createdAt), 'dd/MM/yyyy, HH:mm:ss')} GMT+5
+
+
+ ))
+ ) : (
+
+ Ammallar yok
+
+ )}
+
+
+ {/* Pagination */}
+
+ Onki
+ 1-1 of 1
+ Indiki
+
+
+
+ )
+}
diff --git a/src/pages/internationalPayments/visaMasterPayments/index.tsx b/src/pages/internationalPayments/visaMasterPayments/index.tsx
index 0171f17..485faf9 100644
--- a/src/pages/internationalPayments/visaMasterPayments/index.tsx
+++ b/src/pages/internationalPayments/visaMasterPayments/index.tsx
@@ -185,11 +185,17 @@ export default function IntlPaymentsPage() {
]
const columnMeta = columns
- .filter((c) => 'accessorKey' in c)
- .map((c) => ({
- id: ('accessorKey' in c ? String(c.accessorKey) : c.id) as string,
- label: typeof c.header === 'string' ? c.header : String(('accessorKey' in c ? c.accessorKey : '') ?? ''),
- }))
+ .filter((c) => ('accessorKey' in c || 'id' in c) && c.id !== 'actions')
+ .map((c) => {
+ const id = ('accessorKey' in c ? String(c.accessorKey) : c.id) as string
+ const label =
+ typeof c.header === "string"
+ ? c.header
+ : "accessorKey" in c
+ ? String(c.accessorKey)
+ : id;
+ return { id, label };
+ });
return (
diff --git a/src/pages/internationalPayments/visaMasterPaymentsCreate/index.tsx b/src/pages/internationalPayments/visaMasterPaymentsCreate/index.tsx
index e218eb4..d4c3090 100644
--- a/src/pages/internationalPayments/visaMasterPaymentsCreate/index.tsx
+++ b/src/pages/internationalPayments/visaMasterPaymentsCreate/index.tsx
@@ -1,5 +1,5 @@
import { useNavigate } from 'react-router-dom'
-import { IntlPaymentForm } from '@/features/visaMasterPayments/components/IntlPaymentForm'
+import { IntlPaymentForm } from '@/features/visaMasterPayments/components/intlPaymentForm'
import { useCreateIntlPayment } from '@/features/visaMasterPayments/hooks/useVisaMasterPayments'
import type { IntlPaymentCreatePayload } from '@/features/visaMasterPayments/api/visaMasterPaymentsApi'
diff --git a/src/pages/internationalPayments/visaMasterPaymentsEdit/index.tsx b/src/pages/internationalPayments/visaMasterPaymentsEdit/index.tsx
index 803a404..9fb9924 100644
--- a/src/pages/internationalPayments/visaMasterPaymentsEdit/index.tsx
+++ b/src/pages/internationalPayments/visaMasterPaymentsEdit/index.tsx
@@ -1,6 +1,6 @@
import { useParams, useNavigate } from 'react-router-dom'
import { useTranslation } from 'react-i18next'
-import { IntlPaymentForm } from '@/features/visaMasterPayments/components/IntlPaymentForm'
+import { IntlPaymentForm } from '@/features/visaMasterPayments/components/intlPaymentForm'
import { useIntlPayment, useUpdateIntlPayment } from '@/features/visaMasterPayments/hooks/useVisaMasterPayments'
import type { IntlPaymentUpdatePayload } from '@/features/visaMasterPayments/api/visaMasterPaymentsApi'
import { Spinner } from '@/components/ui/spinner'