I'll start by exploring the project structure.
Tailwind v4 with a clean slate. Let me grab real construction site photos for the gallery.
Tailwind v4, clean project. I'll build a full Vietnamese construction daily-site-report app. Starting with the foundation files: types, utilities, seed data, and icons.
Now the seed data with realistic Vietnamese site records, the UI primitive library, and global styles.
Now the reusable UI primitive library (cards, badges, buttons, inputs, modal, progress).
Now the header/overview components plus a stats helper.
Now the three data-table sections: work items/quantities, manpower, and equipment.
Now the photo gallery with upload/lightbox, and the issues tracker.
Now the issues section with a full add/edit form and severity workflow.
Now the sticky summary rail and the printable A4 report preview.
Finally, the main App that wires everything together with state, autosave, and scroll-spy.
Build passes. Let me fix the CSS @import ordering warning by loading the font from index.html instead.
Build is clean. Here's what I created:
📋 Nhật ký & Báo cáo ngày công trường (SiteLog)
A complete, working Vietnamese construction daily-site-report application.
Structure
- TopBar — sticky dark header with hazard-stripe accent, project/date, scroll-spy tab nav (Tổng quan → Vấn đề), and actions: Lưu nháp, Xem trước & In, Gửi duyệt, khôi phục dữ liệu mẫu.
- Thông tin báo cáo — ngày (date picker + "Thứ ba, ngày…"), ca làm việc, giờ bắt đầu/kết thúc, nhiệt độ, thời tiết sáng/chiều (chọn bằng chip có icon nắng/mây/mưa), người lập, TVGS, nhận xét chung, kế hoạch ngày kế tiếp.
- Bộ lọc khu vực — chips (Block A – Tầng 5, Block B – Móng, Hạ tầng…) lọc đồng thời toàn bộ các mục và cập nhật số liệu thống kê.
- KPI strip — 5 thẻ: đầu việc, % đạt kế hoạch khối lượng, nhân lực/giờ công, thiết bị hoạt động, vấn đề chưa đóng.
Các mục nghiệp vụ (đều chỉnh sửa trực tiếp được)
| Mục | Nội dung |
|---|
| Công việc & khối lượng | Bảng inline-edit: mã, hạng mục, ĐVT, KL kế hoạch/thực hiện, % đạt KH (màu theo ngưỡng), thanh lũy kế/hợp đồng, trạng thái, ghi chú + dòng tổng cộng |
| Nhân lực | Thẻ theo tổ đội với stepper +/− số người, giờ/người, giờ công tự tính, nhà thầu, khu vực + biểu đồ cơ cấu nhân lực |
| Thiết bị | Bảng máy móc: mã, số lượng, giờ hoạt động, giờ máy, tình trạng (Hoạt động/Chờ việc/Bảo trì/Hỏng) + tổng hợp theo trạng thái |
| Hình ảnh | Lưới ảnh hiện trường (ảnh thật), kéo-thả/tải ảnh từ thiết bị, chú thích + gắn thẻ (Tiến độ/Chất lượng/An toàn…), lightbox phóng to, xóa ảnh |
| Vấn đề phát sinh | Thẻ có viền màu theo mức độ, tab Tất cả/Chưa đóng/Đã xử lý, đổi trạng thái 1 chạm, modal thêm/sửa đầy đủ (phân loại, mức độ, phụ trách, hạn, biện pháp xử lý) |
Thêm
- Thanh tóm tắt dính bên phải: vòng tròn % đạt kế hoạch, chỉ số nhanh, checklist mức độ hoàn thiện báo cáo, khối ký duyệt (Người lập / TVGS / CĐT).
- Bản in A4 (
window.print() với CSS @page): đầy đủ 6 phần I–VI, bảng biểu viền, lưới ảnh và ô chữ ký — xuất PDF được ngay.
- Tự động lưu vào localStorage, toast thông báo, giao diện responsive.
Files built: src/types.ts, src/lib/utils.ts, src/components/icons.tsx, src/data/seed.ts, src/index.css, src/components/ui.tsx, src/lib/stats.ts, src/components/TopBar.tsx, src/components/OverviewSection.tsx, src/components/WorkSection.tsx, src/components/LaborSection.tsx, src/components/EquipmentSection.tsx, src/components/PhotoSection.tsx, src/components/IssueSection.tsx, src/components/SummaryRail.tsx, src/components/PrintPreview.tsx, src/App.tsx, index.html