> 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/davomat.md).

# Davomat va Jadval — To'liq Imkoniyatlar

## Darslar (AttendancePage)

### Lesson Cards Grid

* Date, title, type dot (theory=amber, practice=blue)
* Group, teacher, attendance status chip

### Create Lesson

* Dialog with react-hook-form + zod validation
* Fields: title, date, lessonType (theory/practice), groupId
* Unsaved changes guard

### Delete Lesson

* ConfirmDialog → DELETE /lessons/:id

### Pagination

* 50 per page, numbered pagination

***

## Davomat Paneli (AttendanceDrawer)

### Slide-in Sheet

* Lesson info: date, group, lesson type
* Student roster with status toggles

### Status Options

| Status    | Color    | Icon    |
| --------- | -------- | ------- |
| Kelgan    | ✅ Yashil | present |
| Kelmagan  | ❌ Qizil  | absent  |
| Kechikkan | ⏰ Sariq  | late    |
| Uzrli     | 📝 Ko'k  | excused |

### Summary Bar

* Count per status (present/absent/late/excused)
* Visual cards row

### Batch Save

* POST /attendance/batch
* Invalidates: lessonKeys.all + lesson detail

***

## Jadval (SchedulePage)

### Tab 1: Calendar View

* Week navigation (prev/next/today)
* Monday start week
* 7-column grid with day headers
* Lesson cards: time, group, teacher, type, status
* Click lesson → AttendanceDrawer

### Tab 2: Templates

**Template list:** group name, day, time, type **Create template:** group, dayOfWeek (1-7), startTime, endTime, lessonType **Delete template:** confirm dialog **Generate lessons:** weeks range (1-12), optional group filter

***

## Darslar Oqimi

```
Template → Generate → Lesson → AttendanceDrawer → Batch save
  (create)   (POST /schedule/generate)   (click)   (POST /attendance/batch)
```

***

## Cache Strategy

| Action           | Invalidates                       |
| ---------------- | --------------------------------- |
| Create lesson    | lessonKeys.all                    |
| Delete lesson    | lessonKeys.all                    |
| Batch attendance | lessonKeys.all + lesson detail    |
| Create template  | scheduleKeys.all                  |
| Delete template  | scheduleKeys.all                  |
| Generate lessons | scheduleKeys.all + lessonKeys.all |


---

# 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/davomat.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.
