30 Commits

Author SHA1 Message Date
Dương Cầm
ea3d0a19cf fix: add icon preview to badge selector, hide displayBadges from view 2026-02-05 00:02:56 +07:00
Dương Cầm
420b18cebf feat: expand badge system & fix location image display
- Add centralized BADGE_ICONS_MAP and BADGE_COLORS_MAP to options.ts
- Implement dynamic badge UI in SmartAddForm (Add Item)
- Update ItemDetailDialog (Edit Item) to use centralized config
- Update InventoryManager to support new badge icons
- Display location image in detail header
- Fix capacity badge missing icon/color
- Fix location edit not loading existing image
2026-02-04 23:53:40 +07:00
Dương Cầm
88ab5914c5 fix: sửa 10 files lint errors - thay any bằng proper types, fix React hooks patterns 2026-02-04 20:09:50 +07:00
Dương Cầm
95240d1c9f feat: chế độ xem mặc định + custom spec badges trên card 2026-02-04 19:57:13 +07:00
Dương Cầm
19cf5dc8be feat: 4 tính năng mới - filter vị trí, ảnh vị trí, toggle thumbnail, warranty stats 2026-02-04 19:30:19 +07:00
Dương Cầm
30af9bd49e Cải tiến form: Thêm status Hư hỏng, checkbox Không bảo hành, ẩn field Other nếu trống
- Thêm status 'Damaged' (Hư hỏng) vào SmartAddForm và ItemDetailDialog
- Thêm checkbox 'Không bảo hành' vào SmartAddForm
- Ẩn field 'Other' trong ViewMode nếu giá trị trống
- Cập nhật màu badge: orange-500 cho Damaged
2026-02-04 19:14:09 +07:00
Dương Cầm
36db0f70e2 Tính năng: Tự động resize và convert ảnh sang WebP khi upload
- Thêm src/lib/imageUtils.ts với optimizeImage()
- Resize ảnh về tối đa 800x800px, convert sang WebP
- Giảm dung lượng 70-90% so với ảnh gốc
- Áp dụng cho SmartAddForm và ItemDetailDialog
- Backup không bị ảnh hưởng (ảnh đã optimize lưu trong DB)
2026-02-02 22:34:39 +07:00
Dương Cầm
acc2a06098 🚀 Tối ưu performance: chuyển side effects sang non-blocking pattern
- lendItem, returnItem, bulkLendItems: fire-and-forget cho logActivity và triggerWebhooks
- createItem, updateItem, bulkMoveItems: áp dụng tương tự
- Fix lint errors trong next.config.ts và prisma/seed.ts
- Giảm response time từ ~4s xuống <1s
2026-01-30 23:47:10 +07:00
Dương Cầm
745953bfd8 fix: Cleanup duplicate code in SmartAddForm 2026-01-25 15:00:04 +07:00
Dương Cầm
8a008be293 fix: Improve Edit Mode Specs filtering 2026-01-25 14:43:59 +07:00
Dương Cầm
67a3141129 refactor: Update Item Detail UI (Split Layout & Dynamic Specs Fix) 2026-01-25 14:43:36 +07:00
Dương Cầm
df300b2cef fix: Sửa lỗi hiển thị tên thiết bị bị cắt trên Mobile (Remove line-clamp) 2026-01-25 12:22:41 +07:00
Dương Cầm
b096989684 fix: Thêm import useEffect (Hotfix v1.6.1) 2026-01-25 12:04:50 +07:00
Dương Cầm
7b8bb102df fix: Tự động mở chi tiết sản phẩm khi có tham số ?item=ID (Hỗ trợ QR Scan) 2026-01-25 12:04:25 +07:00
Dương Cầm
7c4850b9ce fix: Sửa lỗi QR Code Routing & Scanner (+Regex for path) 2026-01-25 11:51:28 +07:00
Dương Cầm
f7d1cd6fd3 feat: Cải thiện UI Mobile Dialog, thêm thời gian sử dụng và sửa lỗi ESLint
## UI/UX
- Sửa layout Dialog chi tiết trên Mobile (tránh rớt chữ Bluetooth/Receiver)
- Thêm logic tính toán thời gian sử dụng (⏱️ X năm Y tháng)
- Thêm break-words/break-all cho các trường text dài

## Code Quality
- Sửa lỗi ESLint và TypeScript trong src/app/actions.ts
- Loại bỏ các any type không an toàn
- Cải thiện xử lý lỗi (unknown type + instanceof Error)
2026-01-25 11:00:51 +07:00
Dương Cầm
65bf9c74ea feat: Cải thiện UI Dark Mode, Mobile và sửa lỗi mất dữ liệu Docker
## Thay đổi chính:

### UI/UX
- Sửa lỗi Dark Mode trong LocationManager và SmartAddForm
- Tối ưu Header, InventoryManager và UserMenu cho Mobile
- Cải thiện độ tương phản và layout responsive

### Sửa lỗi ESLint
- Sửa lỗi truy cập biến trước khai báo trong settings/page.tsx
- Thay thế any type bằng kiểu cụ thể
- Xóa import không sử dụng

### Docker & Database
- Bổ sung .dockerignore loại trừ file SQLite
- Cập nhật db.ts bắt buộc DATABASE_URL trong production
- Thêm document hướng dẫn triển khai Docker

### Tài liệu
- Thêm docs/DOCKER_DEPLOYMENT.md
2026-01-25 10:35:32 +07:00
Duong
b12e6337ee fix: ui updates and prevent data loss on docker update 2026-01-25 02:37:25 +07:00
Duong
2bd292676c feat: fix db.ts to respect DATABASE_URL for Docker, add Other icon, fix mobile tabs CSS, fix chart warnings 2026-01-25 01:52:26 +07:00
duongcamcute
d4e145040d fix: stop tracking db file, fix warranty date format, add serial number input 2026-01-24 23:09:32 +07:00
duongcamcute
911b121707 refactor: replace prompt with SpecInput UI, fix security vulnerabilities in actions/api 2026-01-24 22:42:18 +07:00
duongcamcute
bd61c2c610 Release v1.2.0: Add Unsorted Stats, Security Fixes & Docker CI/CD 2026-01-24 21:08:18 +07:00
AI Assistant
6d0aef4163 feat: enhance admin security, add img delete, optimize docker 2026-01-16 18:00:48 +07:00
AI Assistant
3572e0176d chore(release): bump version to 1.1.0, cleanup logs, update docker guide 2026-01-16 17:13:04 +07:00
AI Assistant
24bab61550 style: redesign item card to overlay status and fix layout overflow 2026-01-16 13:42:38 +07:00
AI Assistant
e20136e193 style: harden ui with whitespace-nowrap for tags and buttons 2026-01-16 13:39:00 +07:00
AI Assistant
1fad410879 fix(ui): prevent status badge wrap and improve location text layout 2026-01-16 13:37:24 +07:00
AI Assistant
4a8912a629 chore: cleanup scripts and update project configuration 2026-01-16 10:37:43 +07:00
duongcamcute
b1374d0656 Update: Sync latest user changes (UI & Logic) 2026-01-16 00:29:07 +07:00
duongcamcute
2aa145a517 Initial commit 2026-01-15 23:07:09 +07:00