Compare commits
25 Commits
73158a1972
...
ee34ef0905
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee34ef0905 | ||
|
|
46552fdd55 | ||
|
|
fa9df55856 | ||
|
|
2f8fc09027 | ||
|
|
18724e135b | ||
|
|
a6a221faf5 | ||
|
|
be582a6474 | ||
|
|
b4fd590eda | ||
|
|
553db7194a | ||
|
|
aba0d25cbd | ||
|
|
9a62c214a5 | ||
|
|
83d75ad499 | ||
|
|
10fcded48f | ||
|
|
ff8e003ef5 | ||
|
|
4a755d5d03 | ||
|
|
6e485484fb | ||
|
|
3af699c468 | ||
|
|
d3a868da68 | ||
|
|
0c3b5f50ad | ||
|
|
60c3ddf43c | ||
|
|
69abdd6562 | ||
|
|
1efb97e4c9 | ||
|
|
e8c4bd7bd1 | ||
|
|
00cbac1292 | ||
|
|
016094fa34 |
@@ -7,4 +7,5 @@ Disallow: /_next/
|
|||||||
Disallow: /admin/
|
Disallow: /admin/
|
||||||
|
|
||||||
# Sitemap location
|
# Sitemap location
|
||||||
Sitemap: https://antiplagiat.uz/sitemap.xml
|
Sitemap: https://antiplagiat.uz/sitemap.xml
|
||||||
|
# enjoy
|
||||||
|
|||||||
106
public/llms.txt
Normal file
106
public/llms.txt
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
# AntiPlagiat.uz — AI uchun sayt ma'lumotlari (llms.txt)
|
||||||
|
# Standart: https://llmstxt.org
|
||||||
|
# Yangilangan: 2026-04-12
|
||||||
|
|
||||||
|
# ═══════════════════════════════════════════════════════════
|
||||||
|
# SAYT HAQIDA / ABOUT THE SITE
|
||||||
|
# ═══════════════════════════════════════════════════════════
|
||||||
|
|
||||||
|
> AntiPlagiat.uz — O'zbekistonning akademik plagiat tekshiruvi platformasi.
|
||||||
|
> Dissertatsiya, kurs ishi va ilmiy maqolalarni onlayn tekshiring.
|
||||||
|
> Natija daqiqalar ichida tayyor bo'ladi. Rasmiy sertifikat beriladi.
|
||||||
|
|
||||||
|
**Sayt nomi:** AntiPlagiat.uz
|
||||||
|
**Egalik qiluvchi:** Pedagok.uz
|
||||||
|
**Manzil:** https://anti-plagiat.uz
|
||||||
|
**Kanon manzil:** https://antiplagiat.uz
|
||||||
|
**Kategoriya:** Ta'lim / Academic integrity / Plagiarism detection
|
||||||
|
**Til:** O'zbek (uz), Rus (ru), Ingliz (en)
|
||||||
|
**Mamlakatlar:** O'zbekiston va MDH
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Asosiy xizmatlar / Core Services
|
||||||
|
|
||||||
|
AntiPlagiat.uz quyidagi xizmatlarni taqdim etadi:
|
||||||
|
|
||||||
|
1. **Plagiat tekshiruvi** — PDF, DOC, DOCX, TXT formatdagi hujjatlarni plagiatga tekshirish. Maks fayl hajmi: 20 MB. Natija foiz ko'rinishida beriladi.
|
||||||
|
2. **SI (Sun'iy Intellekt) detektor** — Matnning sun'iy intellekt tomonidan yozilganligini aniqlash. AI generatsiya ehtimolini foizda ko'rsatadi.
|
||||||
|
3. **Rasmiy sertifikat** — Orijinallik tasdiqlangan hujjatlar uchun rasmiy sertifikat beriladi.
|
||||||
|
4. **Batafsil hisobot** — O'xshashlik manbalari, mos keladigan so'zlar, AI tahlili ballari ko'rsatiladi.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Texnik ma'lumotlar / Technical Details
|
||||||
|
|
||||||
|
- **Framework:** Next.js (React, App Router)
|
||||||
|
- **Lokalizatsiya:** /uz, /ru, /en yo'llar orqali
|
||||||
|
- **To'lov tizimi:** Payme (SSL himoyalangan)
|
||||||
|
- **Qo'llab-quvvatlangan formatlar:** PDF, DOC, DOCX, TXT
|
||||||
|
- **Maksimal fayl:** 20 MB
|
||||||
|
- **Aniqlik darajasi:** 98.7%
|
||||||
|
- **Tekshirilgan hujjatlar:** 50,000+
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Sahifalar tuzilishi / Site Structure
|
||||||
|
|
||||||
|
### Ommaviy sahifalar (Public pages)
|
||||||
|
|
||||||
|
| URL | Maqsad |
|
||||||
|
|----------------------------------|-------------------------------------|
|
||||||
|
| /uz | Bosh sahifa (O'zbek) |
|
||||||
|
| /ru | Bosh sahifa (Rus) |
|
||||||
|
| /en | Bosh sahifa (Ingliz) |
|
||||||
|
| /uz/plagiat | Plagiat tekshiruvi (autentifikatsiya)|
|
||||||
|
| /ru/plagiat | Plagiat tekshiruvi (Rus) |
|
||||||
|
| /en/plagiat | Plagiarism check (English) |
|
||||||
|
| /uz/si | SI detektor (O'zbek) |
|
||||||
|
| /ru/si | SI detektor (Rus) |
|
||||||
|
| /en/si | AI Content detector (English) |
|
||||||
|
| /uz/history | Tekshiruv tarixi |
|
||||||
|
| /uz/cabinet | Shaxsiy kabinet (dashboard) |
|
||||||
|
|
||||||
|
### Dinamik sahifalar
|
||||||
|
|
||||||
|
| URL shakli | Maqsad |
|
||||||
|
|----------------------------------|-------------------------------------|
|
||||||
|
| /uz/{id} | Muayyan tekshiruv natijasi |
|
||||||
|
| /ru/{id} | Tekshiruv natijasi (Rus) |
|
||||||
|
| /en/{id} | Check result (English) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Foydalanuvchilar / Target Audience
|
||||||
|
|
||||||
|
- Talabalara: kurs ishlari, dissertatsiyalar, referatlar uchun
|
||||||
|
- O'qituvchilar: talabalar ishlarini tekshirish uchun
|
||||||
|
- Ilmiy xodimlar: maqolalar va tadqiqotlarni tekshirish uchun
|
||||||
|
- Muassasalar: akademik halollik nazorati uchun
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Aloqa / Contact
|
||||||
|
|
||||||
|
- **Veb-sayt:** https://anti-plagiat.uz
|
||||||
|
- **Twitter/X:** @antiplagiatuz
|
||||||
|
- **Egalik kompaniya:** Pedagok.uz
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Litsenziya va foydalanish / Usage
|
||||||
|
|
||||||
|
AntiPlagiat.uz kontenti faqat ma'lumot maqsadida foydalanilishi mumkin.
|
||||||
|
Foydalanuvchilar ma'lumotlari maxfiy saqlanadi va tahlil tugagach o'chiriladi.
|
||||||
|
Xizmat O'zbekiston qonunchiligiga muvofiq ishlaydi.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Crawling yo'riqnomasi / Crawling Guidelines
|
||||||
|
|
||||||
|
AI botlar va qidiruv tizimlari uchun:
|
||||||
|
- robots.txt: https://anti-plagiat.uz/robots.txt
|
||||||
|
- sitemap.xml: https://anti-plagiat.uz/sitemap.xml
|
||||||
|
- Foydalanuvchi ma'lumotlarini (cabinet, history, individual check results) crawl qilmang
|
||||||
|
- API (/api/*) yo'llarini crawl qilmang
|
||||||
|
- Preferred crawl delay: 2 soniya
|
||||||
112
public/robots.txt
Normal file
112
public/robots.txt
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
# robots.txt — anti-plagiat.uz
|
||||||
|
# Yangilangan: 2026-04-12
|
||||||
|
|
||||||
|
# ─── Umumiy qoidalar (barcha botlar) ───────────────────────────────────────
|
||||||
|
User-agent: *
|
||||||
|
Allow: /
|
||||||
|
Allow: /uz/
|
||||||
|
Allow: /ru/
|
||||||
|
Allow: /en/
|
||||||
|
Allow: /uz/plagiat
|
||||||
|
Allow: /ru/plagiat
|
||||||
|
Allow: /en/plagiat
|
||||||
|
Allow: /uz/si
|
||||||
|
Allow: /ru/si
|
||||||
|
Allow: /en/si
|
||||||
|
|
||||||
|
# API va autentifikatsiya marshrutlarini bloklash
|
||||||
|
Disallow: /api/
|
||||||
|
Disallow: /_next/
|
||||||
|
Disallow: /uz/cabinet/
|
||||||
|
Disallow: /ru/cabinet/
|
||||||
|
Disallow: /en/cabinet/
|
||||||
|
|
||||||
|
# Crawl tezligi (ortiqcha yuklanmasin)
|
||||||
|
Crawl-delay: 2
|
||||||
|
|
||||||
|
# ─── Google ───────────────────────────────────────────────────────────────
|
||||||
|
User-agent: Googlebot
|
||||||
|
Allow: /
|
||||||
|
Disallow: /api/
|
||||||
|
Disallow: /_next/
|
||||||
|
Crawl-delay: 1
|
||||||
|
|
||||||
|
User-agent: Googlebot-Image
|
||||||
|
Disallow: /
|
||||||
|
|
||||||
|
# ─── Bing ─────────────────────────────────────────────────────────────────
|
||||||
|
User-agent: Bingbot
|
||||||
|
Allow: /
|
||||||
|
Disallow: /api/
|
||||||
|
Disallow: /_next/
|
||||||
|
Crawl-delay: 2
|
||||||
|
|
||||||
|
# ─── AI Crawler agentlari ─────────────────────────────────────────────────
|
||||||
|
# GPT / OpenAI
|
||||||
|
User-agent: GPTBot
|
||||||
|
Allow: /
|
||||||
|
Allow: /uz/
|
||||||
|
Allow: /ru/
|
||||||
|
Allow: /en/
|
||||||
|
Disallow: /api/
|
||||||
|
Disallow: /_next/
|
||||||
|
Disallow: /resources/media/
|
||||||
|
|
||||||
|
# Claude (Anthropic)
|
||||||
|
User-agent: ClaudeBot
|
||||||
|
Allow: /
|
||||||
|
Allow: /uz/
|
||||||
|
Allow: /ru/
|
||||||
|
Allow: /en/
|
||||||
|
Disallow: /api/
|
||||||
|
Disallow: /_next/
|
||||||
|
|
||||||
|
# Perplexity
|
||||||
|
User-agent: PerplexityBot
|
||||||
|
Allow: /
|
||||||
|
Disallow: /api/
|
||||||
|
Disallow: /_next/
|
||||||
|
|
||||||
|
# Meta AI
|
||||||
|
User-agent: Meta-ExternalAgent
|
||||||
|
Allow: /
|
||||||
|
Disallow: /api/
|
||||||
|
Disallow: /_next/
|
||||||
|
|
||||||
|
# Gemini / Google AI
|
||||||
|
User-agent: Google-Extended
|
||||||
|
Allow: /
|
||||||
|
Disallow: /api/
|
||||||
|
Disallow: /_next/
|
||||||
|
|
||||||
|
# Cohere
|
||||||
|
User-agent: cohere-ai
|
||||||
|
Allow: /
|
||||||
|
Disallow: /api/
|
||||||
|
Disallow: /_next/
|
||||||
|
|
||||||
|
# Common Crawl (AI training ma'lumotlar to'plami)
|
||||||
|
User-agent: CCBot
|
||||||
|
Allow: /
|
||||||
|
Disallow: /api/
|
||||||
|
Disallow: /_next/
|
||||||
|
Disallow: /resources/media/
|
||||||
|
|
||||||
|
# ─── Noxush botlar ────────────────────────────────────────────────────────
|
||||||
|
User-agent: MJ12bot
|
||||||
|
Disallow: /
|
||||||
|
|
||||||
|
User-agent: DotBot
|
||||||
|
Disallow: /
|
||||||
|
|
||||||
|
User-agent: AhrefsBot
|
||||||
|
Disallow: /
|
||||||
|
|
||||||
|
User-agent: SemrushBot
|
||||||
|
Disallow: /
|
||||||
|
|
||||||
|
# ─── Sitemap manzili ──────────────────────────────────────────────────────
|
||||||
|
Sitemap: https://anti-plagiat.uz/sitemap.xml
|
||||||
|
|
||||||
|
# ─── AI ma'lumot fayli ────────────────────────────────────────────────────
|
||||||
|
# AI modellar uchun: https://anti-plagiat.uz/llms.txt
|
||||||
@@ -1,84 +1,191 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||||
|
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
|
<!-- ============================== -->
|
||||||
|
<!-- Bosh sahifalar / Home pages -->
|
||||||
|
<!-- ============================== -->
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>https://anti-plagiat.uz/uz</loc>
|
<loc>https://anti-plagiat.uz/uz</loc>
|
||||||
<lastmod>2026-04-06</lastmod>
|
<lastmod>2026-04-12</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
<priority>1.0</priority>
|
<priority>1.0</priority>
|
||||||
<xhtml:link rel="alternate" hreflang="uz" href="https://anti-plagiat.uz/uz"/>
|
<xhtml:link rel="alternate" hreflang="uz" href="https://anti-plagiat.uz/uz" />
|
||||||
<xhtml:link rel="alternate" hreflang="ru" href="https://anti-plagiat.uz/ru"/>
|
<xhtml:link rel="alternate" hreflang="ru" href="https://anti-plagiat.uz/ru" />
|
||||||
<xhtml:link rel="alternate" hreflang="en" href="https://anti-plagiat.uz/en"/>
|
<xhtml:link rel="alternate" hreflang="en" href="https://anti-plagiat.uz/en" />
|
||||||
</url>
|
<xhtml:link rel="alternate" hreflang="x-default" href="https://anti-plagiat.uz/ru" />
|
||||||
<url>
|
|
||||||
<loc>https://anti-plagiat.uz/uz/plagat</loc>
|
|
||||||
<lastmod>2026-04-06</lastmod>
|
|
||||||
<changefreq>weekly</changefreq>
|
|
||||||
<priority>0.8</priority>
|
|
||||||
<xhtml:link rel="alternate" hreflang="uz" href="https://anti-plagiat.uz/uz/plagat"/>
|
|
||||||
<xhtml:link rel="alternate" hreflang="ru" href="https://anti-plagiat.uz/ru/plagat"/>
|
|
||||||
<xhtml:link rel="alternate" hreflang="en" href="https://anti-plagiat.uz/en/plagat"/>
|
|
||||||
</url>
|
|
||||||
<url>
|
|
||||||
<loc>https://anti-plagiat.uz/uz/cabinet</loc>
|
|
||||||
<lastmod>2026-04-06</lastmod>
|
|
||||||
<changefreq>weekly</changefreq>
|
|
||||||
<priority>0.7</priority>
|
|
||||||
<xhtml:link rel="alternate" hreflang="uz" href="https://anti-plagiat.uz/uz/cabinet"/>
|
|
||||||
<xhtml:link rel="alternate" hreflang="ru" href="https://anti-plagiat.uz/ru/cabinet"/>
|
|
||||||
<xhtml:link rel="alternate" hreflang="en" href="https://anti-plagiat.uz/en/cabinet"/>
|
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>https://anti-plagiat.uz/ru</loc>
|
<loc>https://anti-plagiat.uz/ru</loc>
|
||||||
<lastmod>2026-04-06</lastmod>
|
<lastmod>2026-04-12</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
<priority>1.0</priority>
|
<priority>1.0</priority>
|
||||||
<xhtml:link rel="alternate" hreflang="uz" href="https://anti-plagiat.uz/uz"/>
|
<xhtml:link rel="alternate" hreflang="uz" href="https://anti-plagiat.uz/uz" />
|
||||||
<xhtml:link rel="alternate" hreflang="ru" href="https://anti-plagiat.uz/ru"/>
|
<xhtml:link rel="alternate" hreflang="ru" href="https://anti-plagiat.uz/ru" />
|
||||||
<xhtml:link rel="alternate" hreflang="en" href="https://anti-plagiat.uz/en"/>
|
<xhtml:link rel="alternate" hreflang="en" href="https://anti-plagiat.uz/en" />
|
||||||
</url>
|
<xhtml:link rel="alternate" hreflang="x-default" href="https://anti-plagiat.uz/ru" />
|
||||||
<url>
|
|
||||||
<loc>https://anti-plagiat.uz/ru/plagat</loc>
|
|
||||||
<lastmod>2026-04-06</lastmod>
|
|
||||||
<changefreq>weekly</changefreq>
|
|
||||||
<priority>0.8</priority>
|
|
||||||
<xhtml:link rel="alternate" hreflang="uz" href="https://anti-plagiat.uz/uz/plagat"/>
|
|
||||||
<xhtml:link rel="alternate" hreflang="ru" href="https://anti-plagiat.uz/ru/plagat"/>
|
|
||||||
<xhtml:link rel="alternate" hreflang="en" href="https://anti-plagiat.uz/en/plagat"/>
|
|
||||||
</url>
|
|
||||||
<url>
|
|
||||||
<loc>https://anti-plagiat.uz/ru/cabinet</loc>
|
|
||||||
<lastmod>2026-04-06</lastmod>
|
|
||||||
<changefreq>weekly</changefreq>
|
|
||||||
<priority>0.7</priority>
|
|
||||||
<xhtml:link rel="alternate" hreflang="uz" href="https://anti-plagiat.uz/uz/cabinet"/>
|
|
||||||
<xhtml:link rel="alternate" hreflang="ru" href="https://anti-plagiat.uz/ru/cabinet"/>
|
|
||||||
<xhtml:link rel="alternate" hreflang="en" href="https://anti-plagiat.uz/en/cabinet"/>
|
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>https://anti-plagiat.uz/en</loc>
|
<loc>https://anti-plagiat.uz/en</loc>
|
||||||
<lastmod>2026-04-06</lastmod>
|
<lastmod>2026-04-12</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
<priority>1.0</priority>
|
<priority>1.0</priority>
|
||||||
<xhtml:link rel="alternate" hreflang="uz" href="https://anti-plagiat.uz/uz"/>
|
<xhtml:link rel="alternate" hreflang="uz" href="https://anti-plagiat.uz/uz" />
|
||||||
<xhtml:link rel="alternate" hreflang="ru" href="https://anti-plagiat.uz/ru"/>
|
<xhtml:link rel="alternate" hreflang="ru" href="https://anti-plagiat.uz/ru" />
|
||||||
<xhtml:link rel="alternate" hreflang="en" href="https://anti-plagiat.uz/en"/>
|
<xhtml:link rel="alternate" hreflang="en" href="https://anti-plagiat.uz/en" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="x-default" href="https://anti-plagiat.uz/ru" />
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
|
<!-- ============================== -->
|
||||||
|
<!-- Plagiat tekshiruvi sahifalari -->
|
||||||
|
<!-- ============================== -->
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>https://anti-plagiat.uz/en/plagat</loc>
|
<loc>https://anti-plagiat.uz/uz/plagiat</loc>
|
||||||
<lastmod>2026-04-06</lastmod>
|
<lastmod>2026-04-12</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>0.9</priority>
|
||||||
|
<xhtml:link rel="alternate" hreflang="uz" href="https://anti-plagiat.uz/uz/plagiat" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="ru" href="https://anti-plagiat.uz/ru/plagiat" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="en" href="https://anti-plagiat.uz/en/plagiat" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="x-default" href="https://anti-plagiat.uz/ru/plagiat" />
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>https://anti-plagiat.uz/ru/plagiat</loc>
|
||||||
|
<lastmod>2026-04-12</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>0.9</priority>
|
||||||
|
<xhtml:link rel="alternate" hreflang="uz" href="https://anti-plagiat.uz/uz/plagiat" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="ru" href="https://anti-plagiat.uz/ru/plagiat" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="en" href="https://anti-plagiat.uz/en/plagiat" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="x-default" href="https://anti-plagiat.uz/ru/plagiat" />
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>https://anti-plagiat.uz/en/plagiat</loc>
|
||||||
|
<lastmod>2026-04-12</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>0.9</priority>
|
||||||
|
<xhtml:link rel="alternate" hreflang="uz" href="https://anti-plagiat.uz/uz/plagiat" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="ru" href="https://anti-plagiat.uz/ru/plagiat" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="en" href="https://anti-plagiat.uz/en/plagiat" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="x-default" href="https://anti-plagiat.uz/ru/plagiat" />
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<!-- ============================== -->
|
||||||
|
<!-- SI Detektor sahifalari -->
|
||||||
|
<!-- ============================== -->
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>https://anti-plagiat.uz/uz/si</loc>
|
||||||
|
<lastmod>2026-04-12</lastmod>
|
||||||
<changefreq>weekly</changefreq>
|
<changefreq>weekly</changefreq>
|
||||||
<priority>0.8</priority>
|
<priority>0.8</priority>
|
||||||
<xhtml:link rel="alternate" hreflang="uz" href="https://anti-plagiat.uz/uz/plagat"/>
|
<xhtml:link rel="alternate" hreflang="uz" href="https://anti-plagiat.uz/uz/si" />
|
||||||
<xhtml:link rel="alternate" hreflang="ru" href="https://anti-plagiat.uz/ru/plagat"/>
|
<xhtml:link rel="alternate" hreflang="ru" href="https://anti-plagiat.uz/ru/si" />
|
||||||
<xhtml:link rel="alternate" hreflang="en" href="https://anti-plagiat.uz/en/plagat"/>
|
<xhtml:link rel="alternate" hreflang="en" href="https://anti-plagiat.uz/en/si" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="x-default" href="https://anti-plagiat.uz/ru/si" />
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>https://anti-plagiat.uz/ru/si</loc>
|
||||||
|
<lastmod>2026-04-12</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>0.8</priority>
|
||||||
|
<xhtml:link rel="alternate" hreflang="uz" href="https://anti-plagiat.uz/uz/si" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="ru" href="https://anti-plagiat.uz/ru/si" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="en" href="https://anti-plagiat.uz/en/si" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="x-default" href="https://anti-plagiat.uz/ru/si" />
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>https://anti-plagiat.uz/en/si</loc>
|
||||||
|
<lastmod>2026-04-12</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>0.8</priority>
|
||||||
|
<xhtml:link rel="alternate" hreflang="uz" href="https://anti-plagiat.uz/uz/si" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="ru" href="https://anti-plagiat.uz/ru/si" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="en" href="https://anti-plagiat.uz/en/si" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="x-default" href="https://anti-plagiat.uz/ru/si" />
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<!-- ============================== -->
|
||||||
|
<!-- Tekshiruv tarixi sahifalari -->
|
||||||
|
<!-- ============================== -->
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>https://anti-plagiat.uz/uz/history</loc>
|
||||||
|
<lastmod>2026-04-12</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>0.6</priority>
|
||||||
|
<xhtml:link rel="alternate" hreflang="uz" href="https://anti-plagiat.uz/uz/history" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="ru" href="https://anti-plagiat.uz/ru/history" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="en" href="https://anti-plagiat.uz/en/history" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="x-default" href="https://anti-plagiat.uz/ru/history" />
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>https://anti-plagiat.uz/ru/history</loc>
|
||||||
|
<lastmod>2026-04-12</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>0.6</priority>
|
||||||
|
<xhtml:link rel="alternate" hreflang="uz" href="https://anti-plagiat.uz/uz/history" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="ru" href="https://anti-plagiat.uz/ru/history" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="en" href="https://anti-plagiat.uz/en/history" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="x-default" href="https://anti-plagiat.uz/ru/history" />
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>https://anti-plagiat.uz/en/history</loc>
|
||||||
|
<lastmod>2026-04-12</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>0.6</priority>
|
||||||
|
<xhtml:link rel="alternate" hreflang="uz" href="https://anti-plagiat.uz/uz/history" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="ru" href="https://anti-plagiat.uz/ru/history" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="en" href="https://anti-plagiat.uz/en/history" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="x-default" href="https://anti-plagiat.uz/ru/history" />
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<!-- ============================== -->
|
||||||
|
<!-- Shaxsiy kabinet sahifalari -->
|
||||||
|
<!-- (noindex - autentifikatsiya) -->
|
||||||
|
<!-- ============================== -->
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>https://anti-plagiat.uz/uz/cabinet</loc>
|
||||||
|
<lastmod>2026-04-12</lastmod>
|
||||||
|
<changefreq>monthly</changefreq>
|
||||||
|
<priority>0.4</priority>
|
||||||
|
<xhtml:link rel="alternate" hreflang="uz" href="https://anti-plagiat.uz/uz/cabinet" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="ru" href="https://anti-plagiat.uz/ru/cabinet" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="en" href="https://anti-plagiat.uz/en/cabinet" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="x-default" href="https://anti-plagiat.uz/ru/cabinet" />
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>https://anti-plagiat.uz/ru/cabinet</loc>
|
||||||
|
<lastmod>2026-04-12</lastmod>
|
||||||
|
<changefreq>monthly</changefreq>
|
||||||
|
<priority>0.4</priority>
|
||||||
|
<xhtml:link rel="alternate" hreflang="uz" href="https://anti-plagiat.uz/uz/cabinet" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="ru" href="https://anti-plagiat.uz/ru/cabinet" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="en" href="https://anti-plagiat.uz/en/cabinet" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="x-default" href="https://anti-plagiat.uz/ru/cabinet" />
|
||||||
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>https://anti-plagiat.uz/en/cabinet</loc>
|
<loc>https://anti-plagiat.uz/en/cabinet</loc>
|
||||||
<lastmod>2026-04-06</lastmod>
|
<lastmod>2026-04-12</lastmod>
|
||||||
<changefreq>weekly</changefreq>
|
<changefreq>monthly</changefreq>
|
||||||
<priority>0.7</priority>
|
<priority>0.4</priority>
|
||||||
<xhtml:link rel="alternate" hreflang="uz" href="https://anti-plagiat.uz/uz/cabinet"/>
|
<xhtml:link rel="alternate" hreflang="uz" href="https://anti-plagiat.uz/uz/cabinet" />
|
||||||
<xhtml:link rel="alternate" hreflang="ru" href="https://anti-plagiat.uz/ru/cabinet"/>
|
<xhtml:link rel="alternate" hreflang="ru" href="https://anti-plagiat.uz/ru/cabinet" />
|
||||||
<xhtml:link rel="alternate" hreflang="en" href="https://anti-plagiat.uz/en/cabinet"/>
|
<xhtml:link rel="alternate" hreflang="en" href="https://anti-plagiat.uz/en/cabinet" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="x-default" href="https://anti-plagiat.uz/ru/cabinet" />
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
</urlset>
|
</urlset>
|
||||||
|
|||||||
@@ -23,4 +23,5 @@ export interface PaymentModalProps {
|
|||||||
price: PriceCalculate;
|
price: PriceCalculate;
|
||||||
onConfirmPayment: () => void;
|
onConfirmPayment: () => void;
|
||||||
isLoading: boolean;
|
isLoading: boolean;
|
||||||
|
hasSertificate: boolean;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ export const PaymentModal: React.FC<PaymentModalProps> = ({
|
|||||||
price,
|
price,
|
||||||
onConfirmPayment,
|
onConfirmPayment,
|
||||||
isLoading,
|
isLoading,
|
||||||
|
hasSertificate,
|
||||||
}) => {
|
}) => {
|
||||||
const dialogRef = useRef<HTMLDivElement>(null);
|
const dialogRef = useRef<HTMLDivElement>(null);
|
||||||
const status = isLoading ? 'loading' : 'idle';
|
const status = isLoading ? 'loading' : 'idle';
|
||||||
@@ -144,18 +145,20 @@ export const PaymentModal: React.FC<PaymentModalProps> = ({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Certificate badge */}
|
{/* Certificate badge */}
|
||||||
<div className="flex items-center gap-2 text-sm text-emerald-700 bg-emerald-50 border border-emerald-100 rounded-lg px-3.5 py-2.5">
|
{hasSertificate && (
|
||||||
<svg
|
<div className="flex items-center gap-2 text-sm text-emerald-700 bg-emerald-50 border border-emerald-100 rounded-lg px-3.5 py-2.5">
|
||||||
width="15"
|
<svg
|
||||||
height="15"
|
width="15"
|
||||||
viewBox="0 0 24 24"
|
height="15"
|
||||||
fill="currentColor"
|
viewBox="0 0 24 24"
|
||||||
className="shrink-0"
|
fill="currentColor"
|
||||||
>
|
className="shrink-0"
|
||||||
<path d="M12 1l2.753 5.527 6.247.907-4.5 4.385 1.063 6.181L12 15.027l-5.563 2.973 1.063-6.181L3 7.434l6.247-.907z" />
|
>
|
||||||
</svg>
|
<path d="M12 1l2.753 5.527 6.247.907-4.5 4.385 1.063 6.181L12 15.027l-5.563 2.973 1.063-6.181L3 7.434l6.247-.907z" />
|
||||||
<span>{t('certificateIncluded')}</span>
|
</svg>
|
||||||
</div>
|
<span>{t('certificateIncluded')}</span>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* Payment method label */}
|
{/* Payment method label */}
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -43,9 +43,9 @@ export function useCertificateModal({
|
|||||||
|
|
||||||
const certificateMutation = useMutation({
|
const certificateMutation = useMutation({
|
||||||
mutationFn: (payload: CertificatePayload) =>
|
mutationFn: (payload: CertificatePayload) =>
|
||||||
apiRequest('POST', links.sertifikat(document_id), payload).then(
|
apiRequest<ArrayBuffer>('POST', links.sertifikat(document_id), payload, {
|
||||||
(res) => res.data as ArrayBuffer,
|
responseType: 'arraybuffer',
|
||||||
),
|
}).then((res) => res.data),
|
||||||
onSuccess: (data: ArrayBuffer) => {
|
onSuccess: (data: ArrayBuffer) => {
|
||||||
if (data) {
|
if (data) {
|
||||||
const blob = new Blob([data], { type: 'application/pdf' });
|
const blob = new Blob([data], { type: 'application/pdf' });
|
||||||
@@ -54,7 +54,7 @@ export function useCertificateModal({
|
|||||||
a.href = objectUrl;
|
a.href = objectUrl;
|
||||||
a.download = `certificate-${document_id}.pdf`;
|
a.download = `certificate-${document_id}.pdf`;
|
||||||
a.click();
|
a.click();
|
||||||
URL.revokeObjectURL(objectUrl);
|
setTimeout(() => URL.revokeObjectURL(objectUrl), 1000);
|
||||||
}
|
}
|
||||||
setSuccess(true);
|
setSuccess(true);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ import { SEO_DATA, type SupportedLocale } from '../config/seo.config';
|
|||||||
|
|
||||||
// ─── Site-wide constants ───────────────────────────────────────────────────────
|
// ─── Site-wide constants ───────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
export const SERTIFICATE_PRICE = 20600;
|
||||||
|
export const PLAGIAT_SERVICE_FEE = 20600;
|
||||||
|
|
||||||
const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? 'https://antiplagiat.uz';
|
const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? 'https://antiplagiat.uz';
|
||||||
const OG_IMAGE_URL = `${SITE_URL}/og-image.png`; // 1200×630 px recommended
|
const OG_IMAGE_URL = `${SITE_URL}/og-image.png`; // 1200×630 px recommended
|
||||||
const TWITTER_HANDLE = '@antiplagiatuz'; // update or remove if unused
|
const TWITTER_HANDLE = '@antiplagiatuz'; // update or remove if unused
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ function extractErrorMessage(error: AxiosError): string {
|
|||||||
// ─── Constants ─────────────────────────────────────────────────────────────────
|
// ─── Constants ─────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
// const baseUrl = process.env.NEXT_PUBLIC_API_BASE_URL;
|
// const baseUrl = process.env.NEXT_PUBLIC_API_BASE_URL;
|
||||||
const baseUrl = 'https://dev-api.anti-plagiat.uz/api/v1';
|
const baseUrl = 'https://api.anti-plagiat.uz/api/v1';
|
||||||
const DEFAULT_LOCALE = 'uz'; // fallback locale for redirect
|
const DEFAULT_LOCALE = 'uz'; // fallback locale for redirect
|
||||||
|
|
||||||
// ─── Token helpers ─────────────────────────────────────────────────────────────
|
// ─── Token helpers ─────────────────────────────────────────────────────────────
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
export const links = {
|
export const links = {
|
||||||
login: '/users/login/',
|
login: '/users/login/',
|
||||||
register: '/users/register/',
|
register: '/users/register/',
|
||||||
plagiarismCheck: '/shared/document/',
|
plagiarismCheck: '/shared/documents/',
|
||||||
history: '/shared/documents/list/',
|
history: '/shared/documents/list/',
|
||||||
detail: (id: number) => `/shared/documents/${id}/`,
|
detail: (id: number) => `/shared/documents/${id}/`,
|
||||||
payment: (order_id: number) => `/users/payme/link/${order_id}/`,
|
payment: (order_id: number) => `/users/payme/link/${order_id}/`,
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ function NavigationMenu({
|
|||||||
data-slot="navigation-menu"
|
data-slot="navigation-menu"
|
||||||
data-viewport={viewport}
|
data-viewport={viewport}
|
||||||
className={cn(
|
className={cn(
|
||||||
'group/navigation-menu relative flex max-w-max flex-1 items-center justify-center',
|
' relative flex max-w-max flex-1 items-center justify-center',
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
|||||||
12
src/shared/zustand/cabinetNav.ts
Normal file
12
src/shared/zustand/cabinetNav.ts
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import { CabinetSection } from '@/widgets/cabinet/lib/types';
|
||||||
|
import { create } from 'zustand';
|
||||||
|
|
||||||
|
type CabinetNavZustand = {
|
||||||
|
navItem: CabinetSection;
|
||||||
|
setNavItem: (item: CabinetSection) => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const useCabinetNav = create<CabinetNavZustand>((set) => ({
|
||||||
|
navItem: 'dashboard',
|
||||||
|
setNavItem: (item: CabinetSection) => set({ navItem: item }),
|
||||||
|
}));
|
||||||
@@ -1,14 +1,43 @@
|
|||||||
'use client';
|
'use client';
|
||||||
import { useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
import { useCabinetNav } from '@/shared/zustand/cabinetNav';
|
||||||
import type { CabinetSection } from '../types';
|
import type { CabinetSection } from '../types';
|
||||||
|
|
||||||
|
const VALID_SECTIONS: CabinetSection[] = [
|
||||||
|
'dashboard',
|
||||||
|
'plagiat',
|
||||||
|
'si',
|
||||||
|
'payments',
|
||||||
|
'profile',
|
||||||
|
];
|
||||||
|
|
||||||
export const useCabinet = () => {
|
export const useCabinet = () => {
|
||||||
|
const { navItem, setNavItem } = useCabinetNav();
|
||||||
|
const navItemZustrand = useCabinetNav((state) => state.navItem);
|
||||||
|
const [isSidebarOpen, setIsSidebarOpen] = useState(false);
|
||||||
const [activeSection, setActiveSection] =
|
const [activeSection, setActiveSection] =
|
||||||
useState<CabinetSection>('dashboard');
|
useState<CabinetSection>('dashboard');
|
||||||
const [isSidebarOpen, setIsSidebarOpen] = useState(false);
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (navItemZustrand) {
|
||||||
|
const activeSection: CabinetSection = VALID_SECTIONS.includes(
|
||||||
|
navItemZustrand as CabinetSection,
|
||||||
|
)
|
||||||
|
? (navItemZustrand as CabinetSection)
|
||||||
|
: 'dashboard';
|
||||||
|
setActiveSection(activeSection);
|
||||||
|
} else {
|
||||||
|
const activeSection: CabinetSection = VALID_SECTIONS.includes(
|
||||||
|
navItem as CabinetSection,
|
||||||
|
)
|
||||||
|
? (navItem as CabinetSection)
|
||||||
|
: 'dashboard';
|
||||||
|
setActiveSection(activeSection);
|
||||||
|
}
|
||||||
|
}, [navItemZustrand]);
|
||||||
|
|
||||||
const navigate = (section: CabinetSection) => {
|
const navigate = (section: CabinetSection) => {
|
||||||
setActiveSection(section);
|
setNavItem(section);
|
||||||
setIsSidebarOpen(false);
|
setIsSidebarOpen(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
'use client';
|
'use client';
|
||||||
import React, { useState } from 'react';
|
import React from 'react';
|
||||||
import { Clock, XCircle, ReceiptText } from 'lucide-react';
|
import { Clock, XCircle, ReceiptText } from 'lucide-react';
|
||||||
import { useMutation, useQuery } from '@tanstack/react-query';
|
import { useQuery } from '@tanstack/react-query';
|
||||||
import { useTranslations } from 'next-intl';
|
import { useTranslations } from 'next-intl';
|
||||||
import { apiRequest } from '@/shared/request/apiRequest';
|
import { apiRequest } from '@/shared/request/apiRequest';
|
||||||
import { links } from '@/shared/request/links';
|
import { links } from '@/shared/request/links';
|
||||||
import PaymentStatus from '@/widgets/detail/paidStatus';
|
import PaymentStatus from '@/widgets/detail/paidStatus';
|
||||||
import { toast } from 'react-toastify';
|
// import { toast } from 'react-toastify';
|
||||||
import { PaymentModal } from '@/features/modals/paymentModal/ui/Paymentmodal';
|
// import { PaymentModal } from '@/features/modals/paymentModal/ui/Paymentmodal';
|
||||||
|
|
||||||
// ─── Types ─────────────────────────────────────────────────────────────────────
|
// ─── Types ─────────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ function formatPrice(price: string) {
|
|||||||
|
|
||||||
export function PaymentsTable() {
|
export function PaymentsTable() {
|
||||||
const t = useTranslations('Cabinet');
|
const t = useTranslations('Cabinet');
|
||||||
const [isPaymentOpen, setIsPaymentOpen] = useState(false);
|
// const [isPaymentOpen, setIsPaymentOpen] = useState(false);
|
||||||
const { data, isLoading } = useQuery({
|
const { data, isLoading } = useQuery({
|
||||||
queryKey: ['pay_history'],
|
queryKey: ['pay_history'],
|
||||||
queryFn: (): Promise<Inspection[]> =>
|
queryFn: (): Promise<Inspection[]> =>
|
||||||
@@ -47,29 +47,29 @@ export function PaymentsTable() {
|
|||||||
),
|
),
|
||||||
});
|
});
|
||||||
|
|
||||||
const payment = useMutation({
|
// const payment = useMutation({
|
||||||
mutationKey: ['payload'],
|
// mutationKey: ['payload'],
|
||||||
mutationFn: ({ order_id }: { order_id: number }) =>
|
// mutationFn: ({ order_id }: { order_id: number }) =>
|
||||||
apiRequest<{ payment_link: string }>('POST', links.payment(order_id)),
|
// apiRequest<{ payment_link: string }>('POST', links.payment(order_id)),
|
||||||
onSuccess: (res) => {
|
// onSuccess: (res) => {
|
||||||
window.open(res.data.payment_link, '_self');
|
// window.open(res.data.payment_link, '_self');
|
||||||
setIsPaymentOpen(false);
|
// // setIsPaymentOpen(false);
|
||||||
},
|
// },
|
||||||
onError: (err) => {
|
// onError: (err) => {
|
||||||
const message =
|
// const message =
|
||||||
err instanceof Error ? err.message : 'An unexpected error occurred.';
|
// err instanceof Error ? err.message : 'An unexpected error occurred.';
|
||||||
toast.error(message);
|
// toast.error(message);
|
||||||
setIsPaymentOpen(false);
|
// // setIsPaymentOpen(false);
|
||||||
},
|
// },
|
||||||
});
|
// });
|
||||||
|
|
||||||
const handleSubmit = ({ document_id }: { document_id: number }) => {
|
// const handleSubmit = ({ document_id }: { document_id: number }) => {
|
||||||
if (document_id === 0) {
|
// if (document_id === 0) {
|
||||||
toast.error('Id not found');
|
// toast.error('Id not found');
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
payment.mutate({ order_id: document_id });
|
// payment.mutate({ order_id: document_id });
|
||||||
};
|
// };
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -116,7 +116,7 @@ export function PaymentsTable() {
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody className="divide-y divide-slate-50">
|
<tbody className="divide-y divide-slate-50">
|
||||||
{data.map((row) => {
|
{data.map((row) => {
|
||||||
const service_fee = row.total_price + row.discount;
|
// const service_fee = row.total_price + row.discount;
|
||||||
return (
|
return (
|
||||||
<tr
|
<tr
|
||||||
key={row.id}
|
key={row.id}
|
||||||
@@ -145,14 +145,7 @@ export function PaymentsTable() {
|
|||||||
</td>
|
</td>
|
||||||
<td className="px-5 py-3.5">
|
<td className="px-5 py-3.5">
|
||||||
{row.state ? (
|
{row.state ? (
|
||||||
<span
|
<span className="inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg text-xs font-medium text-emerald-600 bg-emerald-50">
|
||||||
onClick={() => {
|
|
||||||
if (row.state === 'unpaid') {
|
|
||||||
setIsPaymentOpen(true);
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
className="inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg text-xs font-medium text-emerald-600 bg-emerald-50"
|
|
||||||
>
|
|
||||||
<PaymentStatus status={row.state} />
|
<PaymentStatus status={row.state} />
|
||||||
</span>
|
</span>
|
||||||
) : (
|
) : (
|
||||||
@@ -162,7 +155,7 @@ export function PaymentsTable() {
|
|||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</td>
|
</td>
|
||||||
<PaymentModal
|
{/* <PaymentModal
|
||||||
isOpen={isPaymentOpen}
|
isOpen={isPaymentOpen}
|
||||||
onClose={() => setIsPaymentOpen(false)}
|
onClose={() => setIsPaymentOpen(false)}
|
||||||
price={{
|
price={{
|
||||||
@@ -174,7 +167,7 @@ export function PaymentsTable() {
|
|||||||
handleSubmit({ document_id: 0 });
|
handleSubmit({ document_id: 0 });
|
||||||
}}
|
}}
|
||||||
isLoading={payment.isPending}
|
isLoading={payment.isPending}
|
||||||
/>
|
/> */}
|
||||||
</tr>
|
</tr>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import PaymentStatus from './paidStatus';
|
|||||||
import Sertifikat from '@/features/modals/sertificateModal/sertifikat';
|
import Sertifikat from '@/features/modals/sertificateModal/sertifikat';
|
||||||
|
|
||||||
// ── Types ────────────────────────────────────────────────────────────────────
|
// ── Types ────────────────────────────────────────────────────────────────────
|
||||||
const baseUrl = 'https://dev-api.anti-plagiat.uz/api/v1';
|
const baseUrl = 'https://api.anti-plagiat.uz/api/v1';
|
||||||
interface AnalyzeText {
|
interface AnalyzeText {
|
||||||
[key: string]: number | string;
|
[key: string]: number | string;
|
||||||
}
|
}
|
||||||
@@ -399,10 +399,25 @@ export default function DocumentDetailPage({ id }: { id: number }) {
|
|||||||
<PaymentStatus status={doc.state} />
|
<PaymentStatus status={doc.state} />
|
||||||
<Sertifikat document_id={Number(id)} />
|
<Sertifikat document_id={Number(id)} />
|
||||||
{doc.file && (
|
{doc.file && (
|
||||||
<a
|
<button
|
||||||
href={`${baseUrl}${doc.file}`}
|
onClick={async () => {
|
||||||
target="_blank"
|
const url = `${baseUrl}/shared/documents/${doc.id}/download`;
|
||||||
rel="noopener noreferrer"
|
const res = await apiRequest<ArrayBuffer>(
|
||||||
|
'GET',
|
||||||
|
url,
|
||||||
|
undefined,
|
||||||
|
{ responseType: 'arraybuffer', baseURL: baseUrl },
|
||||||
|
);
|
||||||
|
const blob = new Blob([res.data], {
|
||||||
|
type: 'application/pdf',
|
||||||
|
});
|
||||||
|
const objectUrl = URL.createObjectURL(blob);
|
||||||
|
const a = document.createElement('a');
|
||||||
|
a.href = objectUrl;
|
||||||
|
a.download = `document-${id}.pdf`;
|
||||||
|
a.click();
|
||||||
|
setTimeout(() => URL.revokeObjectURL(objectUrl), 1000);
|
||||||
|
}}
|
||||||
className="inline-flex items-center gap-2 px-4 py-2 rounded-lg bg-slate-900 text-white text-xs font-semibold hover:bg-slate-700 transition-colors"
|
className="inline-flex items-center gap-2 px-4 py-2 rounded-lg bg-slate-900 text-white text-xs font-semibold hover:bg-slate-700 transition-colors"
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
@@ -419,7 +434,7 @@ export default function DocumentDetailPage({ id }: { id: number }) {
|
|||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
{t('downloadPdf')}
|
{t('downloadPdf')}
|
||||||
</a>
|
</button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -486,7 +501,7 @@ export default function DocumentDetailPage({ id }: { id: number }) {
|
|||||||
<div className="bg-white rounded-2xl border border-slate-100 shadow-sm p-8">
|
<div className="bg-white rounded-2xl border border-slate-100 shadow-sm p-8">
|
||||||
<div className="flex flex-wrap justify-around gap-8">
|
<div className="flex flex-wrap justify-around gap-8">
|
||||||
<ScoreRing
|
<ScoreRing
|
||||||
value={res.ai}
|
value={res.originality}
|
||||||
label={t('scoreOriginality')}
|
label={t('scoreOriginality')}
|
||||||
color="#10b981"
|
color="#10b981"
|
||||||
/>
|
/>
|
||||||
@@ -502,7 +517,7 @@ export default function DocumentDetailPage({ id }: { id: number }) {
|
|||||||
color="#6366f1"
|
color="#6366f1"
|
||||||
/>
|
/>
|
||||||
<ScoreRing
|
<ScoreRing
|
||||||
value={res.originality}
|
value={res.ai}
|
||||||
label={t('scoreAiContent')}
|
label={t('scoreAiContent')}
|
||||||
color="#ef4444"
|
color="#ef4444"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import { apiRequest } from '@/shared/request/apiRequest';
|
|||||||
import { links } from '@/shared/request/links';
|
import { links } from '@/shared/request/links';
|
||||||
import { toast } from 'react-toastify';
|
import { toast } from 'react-toastify';
|
||||||
import { PaymentModal } from '@/features/modals/paymentModal/ui/Paymentmodal';
|
import { PaymentModal } from '@/features/modals/paymentModal/ui/Paymentmodal';
|
||||||
|
import { PLAGIAT_SERVICE_FEE, SERTIFICATE_PRICE } from '@/shared/lib/metadata';
|
||||||
|
|
||||||
// ─── State badge ───────────────────────────────────────────────────────────────
|
// ─── State badge ───────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
@@ -48,7 +49,7 @@ export const HistoryTableRow: React.FC<
|
|||||||
const payment = useMutation({
|
const payment = useMutation({
|
||||||
mutationKey: ['payment', item.order_id],
|
mutationKey: ['payment', item.order_id],
|
||||||
mutationFn: ({ order_id }: { order_id: number }) =>
|
mutationFn: ({ order_id }: { order_id: number }) =>
|
||||||
apiRequest<{ payment_link: string }>('POST', links.payment(order_id)),
|
apiRequest<{ payment_link: string }>('POST', links.demo_pay(order_id)),
|
||||||
onSuccess: (res) => {
|
onSuccess: (res) => {
|
||||||
window.open(res.data.payment_link, '_self');
|
window.open(res.data.payment_link, '_self');
|
||||||
setIsPaymentOpen(false);
|
setIsPaymentOpen(false);
|
||||||
@@ -60,8 +61,9 @@ export const HistoryTableRow: React.FC<
|
|||||||
});
|
});
|
||||||
|
|
||||||
const price = item.price_calculation ?? {
|
const price = item.price_calculation ?? {
|
||||||
service_fee: 41200,
|
service_fee: item.state === 'unpaid' ? PLAGIAT_SERVICE_FEE : 0,
|
||||||
discount: 0,
|
discount: 0,
|
||||||
|
certificate: item.certificate ? SERTIFICATE_PRICE : 0,
|
||||||
total_price: 41200,
|
total_price: 41200,
|
||||||
currency: 'UZS',
|
currency: 'UZS',
|
||||||
};
|
};
|
||||||
@@ -142,6 +144,7 @@ export const HistoryTableRow: React.FC<
|
|||||||
payment.mutate({ order_id: Number(item.order_id) })
|
payment.mutate({ order_id: Number(item.order_id) })
|
||||||
}
|
}
|
||||||
isLoading={payment.isPending}
|
isLoading={payment.isPending}
|
||||||
|
hasSertificate={item.certificate}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,26 +1,5 @@
|
|||||||
import { MenuItem } from './model';
|
|
||||||
import { LanguageRoutes } from '@/shared/config/i18n/types';
|
import { LanguageRoutes } from '@/shared/config/i18n/types';
|
||||||
|
|
||||||
const getMenu = (t: (key: string) => string): MenuItem[] => [
|
|
||||||
{ title: t('aboutSite'), url: '/about' },
|
|
||||||
// {
|
|
||||||
// title: 'Products',
|
|
||||||
// url: '#',
|
|
||||||
// items: [
|
|
||||||
// {
|
|
||||||
// title: 'Blog',
|
|
||||||
// description: 'The latest industry news, updates, and info',
|
|
||||||
// icon: Book,
|
|
||||||
// url: '#',
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
title: t('contact'),
|
|
||||||
url: '/contact',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
const languages: { name: string; key: LanguageRoutes }[] = [
|
const languages: { name: string; key: LanguageRoutes }[] = [
|
||||||
{
|
{
|
||||||
name: "O'zbekcha",
|
name: "O'zbekcha",
|
||||||
@@ -36,4 +15,4 @@ const languages: { name: string; key: LanguageRoutes }[] = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export { getMenu, languages };
|
export { languages };
|
||||||
|
|||||||
@@ -4,4 +4,5 @@ export interface MenuItem {
|
|||||||
description?: string;
|
description?: string;
|
||||||
icon?: React.ComponentType<{ className?: string }>;
|
icon?: React.ComponentType<{ className?: string }>;
|
||||||
items?: MenuItem[];
|
items?: MenuItem[];
|
||||||
|
key: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
'use client';
|
||||||
|
import { usePathname } from 'next/navigation';
|
||||||
import { MenuItem } from '../lib/model';
|
import { MenuItem } from '../lib/model';
|
||||||
|
|
||||||
const SubMenuLink = ({
|
const SubMenuLink = ({
|
||||||
@@ -7,11 +9,17 @@ const SubMenuLink = ({
|
|||||||
item: MenuItem;
|
item: MenuItem;
|
||||||
logOut?: () => void;
|
logOut?: () => void;
|
||||||
}) => {
|
}) => {
|
||||||
|
const pathname = usePathname();
|
||||||
|
const isCabinet = pathname.includes('/cabinet');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<a
|
<a
|
||||||
className="flex flex-row gap-4 rounded-md p-3 leading-none no-underline transition-colors outline-none select-none hover:bg-muted hover:text-accent-foreground"
|
className="flex flex-row gap-4 rounded-md p-3 leading-none no-underline transition-colors outline-none select-none hover:bg-muted hover:text-accent-foreground"
|
||||||
href={item.url}
|
href={isCabinet && item.url === '/cabinet' ? undefined : item.url}
|
||||||
onClick={() => {
|
onClick={(e) => {
|
||||||
|
if (isCabinet && item.url === '/cabinet') {
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
if (logOut) {
|
if (logOut) {
|
||||||
logOut();
|
logOut();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,37 +2,70 @@
|
|||||||
import { Link } from '@/shared/config/i18n/navigation';
|
import { Link } from '@/shared/config/i18n/navigation';
|
||||||
import { Button } from '@/shared/ui/button';
|
import { Button } from '@/shared/ui/button';
|
||||||
import {
|
import {
|
||||||
NavigationMenu,
|
DropdownMenu,
|
||||||
NavigationMenuContent,
|
DropdownMenuContent,
|
||||||
NavigationMenuItem,
|
DropdownMenuItem,
|
||||||
NavigationMenuLink,
|
DropdownMenuTrigger,
|
||||||
NavigationMenuList,
|
} from '@/shared/ui/dropdown-menu';
|
||||||
NavigationMenuTrigger,
|
|
||||||
} from '@/shared/ui/navigation-menu';
|
|
||||||
import SubMenuLink from './SubMenuLink';
|
import SubMenuLink from './SubMenuLink';
|
||||||
import { ChangeLang } from './ChangeLang';
|
import { ChangeLang } from './ChangeLang';
|
||||||
import { useLoginModal, useRegisterModal } from '@/shared/zustand/auth';
|
import { useLoginModal, useRegisterModal } from '@/shared/zustand/auth';
|
||||||
import { useTranslations } from 'next-intl';
|
import { useTranslations } from 'next-intl';
|
||||||
import { useUserPlagiatStore } from '@/shared/zustand/user';
|
import { useUserPlagiatStore } from '@/shared/zustand/user';
|
||||||
import { LogOut, User } from 'lucide-react';
|
import {
|
||||||
|
ChevronDown,
|
||||||
|
LogOut,
|
||||||
|
User,
|
||||||
|
LayoutDashboard,
|
||||||
|
FileSearch,
|
||||||
|
BrainCircuit,
|
||||||
|
CreditCard,
|
||||||
|
} from 'lucide-react';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
import { useCabinetNav } from '@/shared/zustand/cabinetNav';
|
||||||
|
|
||||||
function AuthButtons() {
|
function AuthButtons() {
|
||||||
const t = useTranslations('Navbar');
|
const t = useTranslations('Navbar');
|
||||||
|
const t_cab = useTranslations('Cabinet');
|
||||||
|
const setNavItem = useCabinetNav((state) => state.setNavItem);
|
||||||
const [localUser, setLocalUser] = useState<{
|
const [localUser, setLocalUser] = useState<{
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
surname: string;
|
surname: string;
|
||||||
} | null>(null);
|
} | null>(null);
|
||||||
|
const [open, setOpen] = useState(false);
|
||||||
const auth = {
|
const auth = {
|
||||||
login: { title: t('login'), url: '#' },
|
login: { title: t('login'), url: '#' },
|
||||||
signup: { title: t('signup'), url: '#' },
|
signup: { title: t('signup'), url: '#' },
|
||||||
};
|
};
|
||||||
|
|
||||||
const userItem = [
|
const userItem = [
|
||||||
{ title: t('profile'), url: '/cabinet', icon: User },
|
{ title: t('profile'), url: '/cabinet', icon: User, key: 'profile' },
|
||||||
{ title: t('logout'), url: '/', icon: LogOut },
|
{
|
||||||
|
url: '/cabinet',
|
||||||
|
title: t_cab('dashboard'),
|
||||||
|
icon: LayoutDashboard,
|
||||||
|
key: 'dashboard',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
url: '/cabinet',
|
||||||
|
title: t_cab('plagiat'),
|
||||||
|
icon: FileSearch,
|
||||||
|
key: 'plagiat',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
url: '/cabinet',
|
||||||
|
title: t_cab('siNav'),
|
||||||
|
icon: BrainCircuit,
|
||||||
|
key: 'si',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
url: '/cabinet',
|
||||||
|
title: t_cab('payments'),
|
||||||
|
icon: CreditCard,
|
||||||
|
key: 'payments',
|
||||||
|
},
|
||||||
|
{ title: t('logout'), url: '/', icon: LogOut, key: 'logout' },
|
||||||
];
|
];
|
||||||
|
|
||||||
const toggleLoginModal = useLoginModal((state) => state.toggleLoginModal);
|
const toggleLoginModal = useLoginModal((state) => state.toggleLoginModal);
|
||||||
@@ -51,7 +84,6 @@ function AuthButtons() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const data = localStorage.getItem('user');
|
const data = localStorage.getItem('user');
|
||||||
|
|
||||||
if (data) {
|
if (data) {
|
||||||
setLocalUser(JSON.parse(data));
|
setLocalUser(JSON.parse(data));
|
||||||
} else {
|
} else {
|
||||||
@@ -65,33 +97,31 @@ function AuthButtons() {
|
|||||||
<div className="sm:flex hidden">
|
<div className="sm:flex hidden">
|
||||||
<ChangeLang />
|
<ChangeLang />
|
||||||
</div>
|
</div>
|
||||||
<NavigationMenu viewport={true}>
|
<DropdownMenu open={open} onOpenChange={setOpen}>
|
||||||
<NavigationMenuList>
|
<DropdownMenuTrigger className="inline-flex items-center gap-1 text-lg font-medium outline-none">
|
||||||
<NavigationMenuItem>
|
{localUser.name}
|
||||||
<NavigationMenuTrigger className="text-lg">
|
<ChevronDown className="size-4" />
|
||||||
{localUser.name}
|
</DropdownMenuTrigger>
|
||||||
</NavigationMenuTrigger>
|
<DropdownMenuContent className="">
|
||||||
<NavigationMenuContent className="bg-popover text-popover-foreground">
|
{userItem.map((subItem) => (
|
||||||
{userItem.map((subItem) => (
|
<DropdownMenuItem key={subItem.title} asChild>
|
||||||
<NavigationMenuLink
|
<SubMenuLink
|
||||||
asChild
|
logOut={() => {
|
||||||
key={subItem.title}
|
setOpen(false);
|
||||||
className="w-80"
|
if (subItem.url !== '/cabinet') {
|
||||||
>
|
clearTokens();
|
||||||
<SubMenuLink
|
} else {
|
||||||
logOut={() => {
|
setNavItem(
|
||||||
if (subItem.url !== '/cabinet') {
|
subItem.key as import('@/widgets/cabinet/lib/types').CabinetSection,
|
||||||
clearTokens();
|
);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
item={subItem}
|
item={subItem}
|
||||||
/>
|
/>
|
||||||
</NavigationMenuLink>
|
</DropdownMenuItem>
|
||||||
))}
|
))}
|
||||||
</NavigationMenuContent>
|
</DropdownMenuContent>
|
||||||
</NavigationMenuItem>
|
</DropdownMenu>
|
||||||
</NavigationMenuList>
|
|
||||||
</NavigationMenu>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { Accordion } from '@/shared/ui/accordion';
|
|
||||||
import { Button } from '@/shared/ui/button';
|
import { Button } from '@/shared/ui/button';
|
||||||
import {
|
import {
|
||||||
Sheet,
|
Sheet,
|
||||||
@@ -8,8 +7,6 @@ import {
|
|||||||
SheetTrigger,
|
SheetTrigger,
|
||||||
} from '@/shared/ui/sheet';
|
} from '@/shared/ui/sheet';
|
||||||
import { Menu } from 'lucide-react';
|
import { Menu } from 'lucide-react';
|
||||||
import { getMenu } from '../lib/data';
|
|
||||||
import RenderMobileMenuItem from './RenderMobileMenuItem';
|
|
||||||
import { ChangeLang } from './ChangeLang';
|
import { ChangeLang } from './ChangeLang';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { AuthButtons } from './authButtons';
|
import { AuthButtons } from './authButtons';
|
||||||
@@ -19,7 +16,6 @@ import Image from 'next/image';
|
|||||||
|
|
||||||
const Navbar = () => {
|
const Navbar = () => {
|
||||||
const t = useTranslations('Navbar');
|
const t = useTranslations('Navbar');
|
||||||
const menu = getMenu(t);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="py-1 flex items-center justify-center w-full ">
|
<section className="py-1 flex items-center justify-center w-full ">
|
||||||
@@ -72,13 +68,6 @@ const Navbar = () => {
|
|||||||
</SheetTitle>
|
</SheetTitle>
|
||||||
</SheetHeader>
|
</SheetHeader>
|
||||||
<div className="flex flex-col gap-6 p-4">
|
<div className="flex flex-col gap-6 p-4">
|
||||||
<Accordion
|
|
||||||
type="single"
|
|
||||||
collapsible
|
|
||||||
className="flex w-full flex-col gap-4"
|
|
||||||
>
|
|
||||||
{menu.map((item) => RenderMobileMenuItem(item))}
|
|
||||||
</Accordion>
|
|
||||||
<AuthButtons />
|
<AuthButtons />
|
||||||
</div>
|
</div>
|
||||||
</SheetContent>
|
</SheetContent>
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ import { useMutation } from '@tanstack/react-query';
|
|||||||
import { links } from '@/shared/request/links';
|
import { links } from '@/shared/request/links';
|
||||||
import { apiRequest } from '@/shared/request/apiRequest';
|
import { apiRequest } from '@/shared/request/apiRequest';
|
||||||
import { PriceCalculate } from '@/features/modals/paymentModal/lib/types';
|
import { PriceCalculate } from '@/features/modals/paymentModal/lib/types';
|
||||||
|
import { SERTIFICATE_PRICE, PLAGIAT_SERVICE_FEE } from '@/shared/lib/metadata';
|
||||||
|
// import { fromTheme } from 'tailwind-merge';
|
||||||
|
|
||||||
// ─── Initial States ──────────────────────────────────────────────────────────
|
// ─── Initial States ──────────────────────────────────────────────────────────
|
||||||
|
|
||||||
@@ -25,7 +27,8 @@ const INITIAL_FORM: PlagiarismFormState = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const PRICE: PriceCalculate = {
|
const PRICE: PriceCalculate = {
|
||||||
service_fee: 0,
|
service_fee: PLAGIAT_SERVICE_FEE,
|
||||||
|
certificate: SERTIFICATE_PRICE,
|
||||||
discount: 0,
|
discount: 0,
|
||||||
total_price: 0,
|
total_price: 0,
|
||||||
};
|
};
|
||||||
@@ -71,8 +74,8 @@ export function usePlagiarismForm() {
|
|||||||
const priceInfo: PriceCalculate = {
|
const priceInfo: PriceCalculate = {
|
||||||
total_price: resdata?.total_price || 0,
|
total_price: resdata?.total_price || 0,
|
||||||
discount: resdata?.discount || 0,
|
discount: resdata?.discount || 0,
|
||||||
certificate: resdata?.certificate || 0,
|
certificate: form.certificate ? SERTIFICATE_PRICE : 0,
|
||||||
service_fee: resdata?.service_fee || 0,
|
service_fee: PLAGIAT_SERVICE_FEE,
|
||||||
};
|
};
|
||||||
setPrices(priceInfo);
|
setPrices(priceInfo);
|
||||||
console.log('order_id:', resdata.id);
|
console.log('order_id:', resdata.id);
|
||||||
|
|||||||
@@ -209,6 +209,7 @@ export function PlagiarismCheckForm() {
|
|||||||
price={prices}
|
price={prices}
|
||||||
onConfirmPayment={handleSubmit}
|
onConfirmPayment={handleSubmit}
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
|
hasSertificate={!!form.certificate}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user