🚀 ERP Prompt Library – Vĩnh Phát
Copy nhanh – dùng ngay – tối ưu quota AI
1. Schema (Zod)
Bạn là senior backend engineer. Tạo file: order.schema.ts theo chuẩn ERP. Yêu cầu: - Dùng Zod - Order + OrderItem - status: draft | confirmed | completed | cancelled - validate số > 0 Output: Code hoàn chỉnh Rules: - Không đoán - Code chạy được
2. Order Form
Bạn là frontend React engineer. Tạo OrderForm.tsx Yêu cầu: - react-hook-form + zod - thêm nhiều items - auto tính total UI đơn giản, dễ dùng. Output: full component
3. Hook
Bạn là React Query expert. Tạo useOrder.ts Bao gồm: - createOrder - updateOrder - getOrders Có loading + error state Output: full hook
4. Business Logic
Bạn là ERP analyst. Kiểm tra logic: [PASTE CODE] Yêu cầu: - tìm lỗi - edge cases - validate total Output: - lỗi + cách sửa
5. Công nợ / Tính toán
Bạn là chuyên gia ERP dệt may. Viết logic: - công nợ - tồn kho - tổng đơn Output: - pseudo code + TS
6. Refactor Architecture
Bạn là software architect. Refactor code theo: - schema riêng - UI không chứa logic Output: - folder structure - code clean
7. Debug
Bạn là senior dev. Code lỗi: [PASTE] Yêu cầu: - tìm lỗi nhanh - fix trực tiếp
Tags:
assistant-ai