> For the complete documentation index, see [llms.txt](https://docs.automaktab.uz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.automaktab.uz/toliq-funksional-xarita/talabalar.md).

# Talabalar — To'liq Imkoniyatlar

## Ro'yxat (StudentsPage)

### Ko'rinish

* **Desktop:** DataTable (column-config-driven, sortable, striped)
* **Mobile:** DataCard grid (2-column fields, `md:hidden`)

### Filtrlar (URL-persisted)

| Filter           | Type     | Details                                  |
| ---------------- | -------- | ---------------------------------------- |
| Kurs turi        | Tabs     | tezkor / avto\_maktab                    |
| Filial           | Select   | cross-tenant only (owner/dev)            |
| Operator         | Select   | owner/manager only                       |
| Guruh            | Select   | all / no\_group / has\_group             |
| Sana oralig'i    | Calendar | range mode, max today, 2 oy              |
| Qidiruv          | Input    | debounced 300ms, server-side             |
| Holat            | Select   | active / completed / dropped / suspended |
| Qarzdorlik       | Toggle   | faqat qarzdorlar                         |
| Tavsiya beruvchi | Select   | user yoki student                        |

### Saralash (client-side, URL-persisted)

* first\_name, last\_name, total\_price, debt, created\_at
* Toggle direction (asc/desc)

### Ustunlar

**Tezkor:** ism, telefon, debt, guruh, natija, sana, amallar **Avto\_maktab:** ism, telefon, initial\_payment, second\_payment, third\_payment, debt, guruh, completion\_date, o83, contract\_number, natija, sana, amallar

### Amallar

* ✅ Yaratish (quick modal yoki detailed wizard)
* ✏️ Tahrirlash (modal)
* 🗑️ O'chirish (confirm dialog)
* 📥 Excel export (fetchAllStudents → xlsx)
* 👁️ Detail sahifaga o'tish (view transition)

***

## Yaratish — Quick Modal (StudentModal)

### Mode 1: Quick Create

* Fields: ism, familiya, telefon, kurs turi, narx, to'lov, guruh, filial, operator, izoh
* Course auto-select: 1 ta active kurs bo'lsa auto-filled
* Duplicate detection: name+phone tekshirish
* Save & add another

### Mode 2: Detailed Wizard (AddStudentDialog)

**Step 1 — Shaxsiy ma'lumotlar:**

* Ism\*, Familiya\*, Telefon\* (+998 format)
* Passport seria (2 harf), Passport raqam (7 raqam)
* Tug'ilgan sana\*, Jins (erkak/ayol)
* Manzil\* (min 5 belgi)

**Step 2 — Kurs va Ro'yxatga olish:**

* Filial\*, Kurs\* (auto-price), Guruh
* Boshlanish sanasi\*, Tugash sanasi (auto from course duration)
* Ma'lumot manbai (7 options + "other")
* Tavsiya: student yoki xodim

**Step 3 — To'lov va Tasdiqlash:**

* To'lov turi (naqd/karta/ko'chirma)
* Summa\*, To'lov usuli\*, To'lov sanasi\*
* Shartnoma imzolandi\* (majburiy)
* Xulosa kartasi

### Edit Mode (StudentModal)

* 5 tab: Ma'lumot, To'lovlar, Imtihonlar, Davomat, Guruh tarixi
* Extra payment field (additive)
* Disabled fields: total\_price, payment\_method, initial\_payment, debt

***

## Tafsilot (StudentDetailPage)

### 5 Tab

| Tab          | Content                                                                                                                        | Komponent            |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------ | -------------------- |
| Ma'lumot     | 12 field (phone, branch, group, course, price, debt, payment\_method, has\_document, amount\_paid, operator, notes, referrals) | Definition list      |
| To'lovlar    | Ledger table + add/edit/delete                                                                                                 | PaymentModal         |
| Imtihonlar   | Exam history + record new                                                                                                      | StudentExamsTab      |
| Davomat      | Attendance history table                                                                                                       | useAttendanceHistory |
| Guruh tarixi | Audit log filter (owner/manager/dev)                                                                                           | useAuditLogs         |

### Header

* Full name, phone, branch, group
* Debt badge (red/green), course type badge
* Edit button

### Deep-link

* `?tab=payments` → direct to payments tab
* Referrals count → `/students?referred_by_student_id=`

***

## O'chirish

* ConfirmDialog → DELETE /students/:id
* Invalidates: students, payments, dashboard caches

***

## Excel Export

* Button → fetchAllStudents() → paginated fetch (100/page)
* xlsx library → translated column headers → download .xlsx
* Current filters apply to export


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.automaktab.uz/toliq-funksional-xarita/talabalar.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
