# Danh sach man hinh (Screens)

## Tong quan

AutoShopee Kit co **37 route** va **41 file Vue** trong thu muc `src/app/views/`. Mot so file Vue khong co route rieng ma duoc su dung nhu component con ben trong cac view khac.

Tat ca man hinh su dung mot trong hai layout:
- **Popup Layout** (`isPopupLayout: true`) -- hien thi trong popup cua extension
- **Single Layout** (`isSingleLayout: true`) -- hien thi trang rieng (tab moi)

---

## 1. Dang nhap / Xac thuc (Login)

| Route | Ten route | File Vue | Mo ta | Ghi chu |
|-------|-----------|----------|-------|---------|
| `/login` | -- | -- | Redirect den `/login/popup` hoac `/login/index` tuy theo mode | -- |
| `/login/popup` | `LoginPopup` | `src/app/views/Login/Popup.vue` | Form dang nhap hien thi trong popup extension | Popup layout |
| `/login/index` | `LoginIndex` | `src/app/views/Login/Index.vue` | Form dang nhap hien thi trang rieng | Single layout |

---

## 2. Shopee

### 2.1. Tab chinh

| Route | Ten route | File Vue | Mo ta | Ghi chu |
|-------|-----------|----------|-------|---------|
| `/` | -- | -- | Redirect den `/shopee/tab/all` | -- |
| `/shopee/tab/all` | `ShopeeTabAll` | `src/app/views/Shopee/Tab/All.vue` | Trang chinh cua Shopee, hien thi danh sach cac tinh nang | Popup layout |

### 2.2. Product (San pham)

| Route | Ten route | File Vue | Mo ta | Ghi chu |
|-------|-----------|----------|-------|---------|
| `/shopee/product/clone` | `ShopeeProductClone` | `src/app/views/Shopee/Product/Clone.vue` | Clone san pham Shopee tu link/ID | Yeu cau query `productId` va `shopId` |
| `/shopee/product/image/view` | `ShopeeProductImage` | `src/app/views/Shopee/Product/Image.vue` | Xem va tai hinh anh san pham Shopee | Single layout |
| `/shopee/product/review` | `ShopeeReviewIndex` | `src/app/views/Shopee/Product/Review/Index.vue` | Trang chinh quan ly danh gia san pham | Single layout |
| `/shopee/product/review/get` | `ShopeeReviewGet` | `src/app/views/Shopee/Product/Review/Get.vue` | Thu thap danh gia san pham tu Shopee | Yeu cau query `productId` va `shopId` |

### 2.3. Seller > Shop

| Route | Ten route | File Vue | Mo ta | Ghi chu |
|-------|-----------|----------|-------|---------|
| `/shopee/seller/shop/info` | `ShopeeShopIndex` | `src/app/views/Shopee/Seller/Shop/Info.vue` | Xem thong tin shop Shopee da ket noi | Single layout |

### 2.4. Seller > Product (Quan ly san pham)

| Route | Ten route | File Vue | Mo ta | Ghi chu |
|-------|-----------|----------|-------|---------|
| `/shopee/seller/product/manager` | `ShopeeSellerProduct` | `src/app/views/Shopee/Seller/Product/Manager.vue` | Quan ly san pham cua shop Shopee | Single layout |

### 2.5. Seller > Auto (Tu dong hoa)

| Route | Ten route | File Vue | Mo ta | Ghi chu |
|-------|-----------|----------|-------|---------|
| `/shopee/seller/auto/dashboard` | `ShopeeAutoDashboard` | `src/app/views/Shopee/Seller/Auto/Dashboard.vue` | Tong quan cac tinh nang tu dong hoa cua shop | Single layout |
| `/shopee/seller/auto/reply-rating` | `ShopeeAutoReplyRating` | `src/app/views/Shopee/Seller/Auto/ReplyRating.vue` | Tu dong tra loi danh gia cua nguoi mua | Single layout |
| `/shopee/seller/auto/push-product` | `ShopeeAutoPushProduct` | `src/app/views/Shopee/Seller/Auto/PushProduct.vue` | Tu dong day san pham len top | Single layout |
| `/shopee/seller/auto/rating-order` | `ShopeeAutoRatingOrder` | `src/app/views/Shopee/Seller/Auto/RatingOrder.vue` | Tu dong danh gia don hang da nhan | Single layout |
| `/shopee/seller/auto/send-message` | `ShopeeAutoSendMessage` | `src/app/views/Shopee/Seller/Auto/SendMessage/Index.vue` | Danh sach chien dich gui tin nhan tu dong | Single layout |
| `/shopee/seller/auto/send-message/send/:id` | `ShopeeAutoSendMessageSend` | `src/app/views/Shopee/Seller/Auto/SendMessage/Send.vue` | Thuc hien gui tin nhan cho chien dich cu the | Yeu cau param `id` dang UUID |
| `/shopee/seller/auto/send-message/collect/:id` | `ShopeeAutoSendMessageCollect` | `src/app/views/Shopee/Seller/Auto/SendMessage/Collect.vue` | Thu thap danh sach nguoi nhan cho chien dich | Yeu cau param `id` dang UUID |

**File khong co route rieng:**

| File Vue | Mo ta |
|----------|-------|
| `src/app/views/Shopee/Seller/Auto/SendMessage/Direct.vue` | Component gui tin nhan truc tiep theo username, duoc su dung ben trong cac view SendMessage |

### 2.6. Seller > Flash Sale

| Route | Ten route | File Vue | Mo ta | Ghi chu |
|-------|-----------|----------|-------|---------|
| `/shopee/seller/flashsale` | `ShopeeFlashSaleIndex` | `src/app/views/Shopee/Seller/FlashSale/Index.vue` | Danh sach cac chien dich Flash Sale | Single layout |
| `/shopee/seller/flashsale/create` | `ShopeeFlashSaleCreate` | `src/app/views/Shopee/Seller/FlashSale/Create.vue` | Tao chien dich Flash Sale moi | Single layout |
| `/shopee/seller/flashsale/clone/:id` | `ShopeeFlashSaleClone` | `src/app/views/Shopee/Seller/FlashSale/Clone.vue` | Clone chien dich Flash Sale tu ID co san | Yeu cau param `id` dang so |

### 2.7. Seller > Ads (Quang cao)

| Route | Ten route | File Vue | Mo ta | Ghi chu |
|-------|-----------|----------|-------|---------|
| `/shopee/seller/ads` | `ShopeeAdsIndex` | `src/app/views/Shopee/Seller/Ads/Index.vue` | Danh sach chien dich quang cao Shopee | Single layout |
| `/shopee/seller/ads/:id` | `ShopeeAdsId` | `src/app/views/Shopee/Seller/Ads/Detail.vue` | Chi tiet mot chien dich quang cao cu the | Yeu cau param `id` dang so |

### 2.8. Seller > Keyword (Tu khoa)

| Route | Ten route | File Vue | Mo ta | Ghi chu |
|-------|-----------|----------|-------|---------|
| `/shopee/seller/keyword` | `ShopeeKeywordIndex` | `src/app/views/Shopee/Seller/Keyword/Index.vue` | Danh sach tu khoa dang theo doi | Single layout |
| `/shopee/seller/keyword/Research` | `ShopeeKeywordResearch` | `src/app/views/Shopee/Seller/Keyword/Research.vue` | Nghien cuu va phan tich tu khoa moi | Single layout |
| `/shopee/seller/keyword/:id` | `ShopeeKeywordId` | `src/app/views/Shopee/Seller/Keyword/Detail.vue` | Chi tiet va thong ke cua mot tu khoa cu the | Yeu cau param `id` dang so |

### 2.9. Spy (Theo doi doi thu)

| Route | Ten route | File Vue | Mo ta | Ghi chu |
|-------|-----------|----------|-------|---------|
| `/shopee/spy/dashboard` | `ShopeeProductList` | `src/app/views/Shopee/Spy/Dashboard.vue` | Tong quan tinh nang theo doi doi thu tren Shopee | Single layout |
| `/shopee/spy/category/:id` | `ShopeeSpyCategoryId` | `src/app/views/Shopee/Spy/Category.vue` | Theo doi san pham theo danh muc cu the | Yeu cau param `id` dang so |
| `/shopee/spy/shop/:id` | `ShopeeSpyShop` | `src/app/views/Shopee/Spy/Shop.vue` | Theo doi thong tin va san pham cua mot shop | Yeu cau param `id` dang so |
| `/shopee/spy/product` | `ShopeeSpyProduct` | `src/app/views/Shopee/Spy/Product.vue` | Theo doi chi tiet mot san pham cu the | Yeu cau query `productId` va `shopId` |
| `/shopee/spy/market` | `ShopeeSpyMarket` | `src/app/views/Shopee/Spy/Market.vue` | Phan tich thi truong tong the tren Shopee | Single layout |

---

## 3. TikTok

| Route | Ten route | File Vue | Mo ta | Ghi chu |
|-------|-----------|----------|-------|---------|
| `/tiktok/product/clone/:id` | `TiktokProductClone` | `src/app/views/Tiktok/Product/Clone.vue` | Clone san pham TikTok tu ID | Yeu cau param `id` dang so, Popup layout |
| `/tiktok/spy/market` | `TiktokSpyMarket` | `src/app/views/Tiktok/Spy/Market.vue` | Phan tich thi truong TikTok Shop | Single layout |
| `/tiktok/spy/category/:id` | `TiktokSpyCategory` | `src/app/views/Tiktok/Spy/Category.vue` | Theo doi san pham TikTok theo danh muc | Yeu cau param `id` dang so |

---

## 4. Printer (In don hang)

| Route | Ten route | File Vue | Mo ta | Ghi chu |
|-------|-----------|----------|-------|---------|
| `/printer/index` | `PrinterIndex` | `src/app/views/Printer/Index.vue` | Trang in don hang chinh, hien thi danh sach don can in | Yeu cau query `from`, `shopId`, `jobId` |
| `/printer/config` | `PrinterConfig` | `src/app/views/Printer/Config.vue` | Cau hinh may in va dinh dang PDF | Single layout |
| `/printer/popup` | `PrinterPopup` | `src/app/views/Printer/Popup.vue` | Popup nhanh de in don hang | Yeu cau query `from`, `shopId`, `jobId` |
| `/printer/log` | `PdfLog` | `src/app/views/PdfLog/Index.vue` | Lich su cac lan in don hang (PDF log) | Single layout |

---

## 5. Cai dat (Settings)

| Route | Ten route | File Vue | Mo ta | Ghi chu |
|-------|-----------|----------|-------|---------|
| `/setting` | -- | -- | Redirect den `/setting/poup` hoac `/setting/index` tuy theo mode | -- |
| `/setting/poup` | `SettingPopup` | `src/app/views/Setting/Popup.vue` | Cai dat extension trong popup | Popup layout |
| `/setting/index` | `SettingIndex` | `src/app/views/Setting/Index.vue` | Cai dat extension trang rieng | Single layout |

---

## 6. Trang he thong

| Route | Ten route | File Vue | Mo ta | Ghi chu |
|-------|-----------|----------|-------|---------|
| `/app` | -- | `src/app/views/Single/App.vue` | Trang app chinh khi mo extension | Popup layout |
| `/:pathMatch(.*)*` | `NotFound` | `src/app/views/Single/404.vue` | Trang 404 khi truy cap route khong ton tai | Single layout |

---

## 7. File Vue khong co route

Cac file Vue ton tai trong `src/app/views/` nhung khong duoc dang ky truc tiep trong router. Chung duoc su dung nhu component con hoac import dong trong cac view khac.

| File Vue | Mo ta |
|----------|-------|
| `src/app/views/Shopee/Seller/Auto/SendMessage/Direct.vue` | Component gui tin nhan truc tiep theo username |
| `src/app/views/Shopee/Shop/Index.vue` | Component hien thi thong tin shop Shopee (su dung ben trong cac view khac) |

---

## Dieu huong va Validation

### Route Guards

Router su dung cac validator trong `src/app/router/validator.js`:

| Validator | Dieu kien | Su dung cho |
|-----------|-----------|-------------|
| `paramIdNumber` | Param `id` phai la so nguyen | Spy Category, Spy Shop, Flash Sale Clone, Ads Detail, Keyword Detail, TikTok routes |
| `paramUuid` | Param `id` phai la UUID hop le | SendMessage Send, SendMessage Collect |
| `shopeeProductShopId` | Query phai co `productId` va `shopId` (deu la so) | Product Clone, Review Get, Spy Product |
| `printerPdf` | Neu `from=shopee` thi phai co `shopId` va `jobId` | Printer Index, Printer Popup |

### Redirect mac dinh

| Tu | Den | Dieu kien |
|----|-----|-----------|
| `/` | `/shopee/tab/all` | Luon luon |
| `/login` | `/login/popup` hoac `/login/index` | Tuy theo popup mode |
| `/setting` | `/setting/poup` hoac `/setting/index` | Tuy theo popup mode |

---

## Entry Points

Extension co 2 entry point chinh:

| Entry | File | Mo ta |
|-------|------|-------|
| **Popup** | `src/popup/main.js` | Khoi tao Vue app day du (Router, Vuex, Pinia, i18n, plugins) cho popup extension |
| **Options** | `src/options/main.js` | Khoi tao Vue app don gian cho trang options/settings |

Popup entry point tai toan bo ung dung Vue voi day du routing, trong khi Options page chi mount mot component don gian.
