diff --git a/app/(main)/manager-signup/page.tsx b/app/(main)/manager-signup/page.tsx index 91356aa..f7d50c0 100644 --- a/app/(main)/manager-signup/page.tsx +++ b/app/(main)/manager-signup/page.tsx @@ -151,7 +151,7 @@ export default function ManagerSignupPage() { href="/login" className="flex w-full items-center justify-center rounded-xl border-2 border-(--color-primary) bg-white py-3 font-semibold text-(--color-primary) no-underline transition-all duration-150 hover:bg-(--color-primary) hover:text-white" > - Quay lại đăng nhập + Back to login )} @@ -164,10 +164,10 @@ export default function ManagerSignupPage() {

- Không thể kết nối + Unable to connect

- Không thể kiểm tra trạng thái đăng ký. Vui lòng thử lại. + Unable to check registration status. Please try again.

- Quay lại đăng nhập + Back to login )} @@ -202,15 +202,15 @@ export default function ManagerSignupPage() { {[ { id: "name", - label: "Họ tên", + label: "Full name", icon: "fa-user", - placeholder: "Nguyễn Văn A", + placeholder: "John Doe", field: "name" as const, type: "text", }, { id: "phone", - label: "Số điện thoại", + label: "Phone number", icon: "fa-phone", placeholder: "0987654321", field: "phone" as const, @@ -218,15 +218,15 @@ export default function ManagerSignupPage() { }, { id: "password", - label: "Mật khẩu", + label: "Password", icon: "fa-lock", - placeholder: "Ít nhất 6 ký tự", + placeholder: "At least 6 characters", field: "password" as const, type: "password", }, { id: "eateryName", - label: "Tên nhà hàng", + label: "Restaurant name", icon: "fa-store", placeholder: "Coffee & More", field: "eateryName" as const, @@ -280,18 +280,17 @@ export default function ManagerSignupPage() { > {isLoading ? ( <> - Đang xử - lý... + Processing... ) : ( - "Đăng ký" + "Register" )} - Đã có tài khoản? Đăng nhập + Already have an account? Sign in diff --git a/app/(main)/payment/page.tsx b/app/(main)/payment/page.tsx index 60d77ef..b9337d3 100644 --- a/app/(main)/payment/page.tsx +++ b/app/(main)/payment/page.tsx @@ -41,13 +41,13 @@ export default function PaymentPage() {

- Trang thanh toán + Payment

{items?.length === 0 ? (
- Chưa có sản phẩm nào trong giỏ hàng. + Your cart is empty.
) : (
@@ -102,7 +102,7 @@ export default function PaymentPage() { @@ -114,12 +114,12 @@ export default function PaymentPage() { setQuantity(id, Number(e.target.value)) } className="h-8 w-16 rounded-lg border border-(--color-border) bg-transparent text-center" - title="Nhập số lượng" + title="Enter quantity" /> @@ -131,7 +131,7 @@ export default function PaymentPage() { variant="danger" size="md" style="payment" - aria-label={`Xóa ${name} khỏi giỏ hàng`} + aria-label={`Remove ${name} from cart`} > Delete product diff --git a/app/(manager)/manager/create-staff/page.tsx b/app/(manager)/manager/create-staff/page.tsx index 1b696d8..367a963 100644 --- a/app/(manager)/manager/create-staff/page.tsx +++ b/app/(manager)/manager/create-staff/page.tsx @@ -27,13 +27,13 @@ export default function CreateStaffPage() { const validate = () => { const next = { name: "", phone: "", password: "", submit: "" }; - if (!form.name.trim()) next.name = "Vui lòng nhập họ tên"; - if (!form.phone.trim()) next.phone = "Vui lòng nhập số điện thoại"; + if (!form.name.trim()) next.name = "Please enter full name"; + if (!form.phone.trim()) next.phone = "Please enter phone number"; else if (!validatePhone(form.phone)) - next.phone = "Số điện thoại không hợp lệ (vd: 0987654321)"; - if (!form.password.trim()) next.password = "Vui lòng nhập mật khẩu"; + next.phone = "Invalid phone number (e.g. 0987654321)"; + if (!form.password.trim()) next.password = "Please enter password"; else if (form.password.length < 6) - next.password = "Mật khẩu phải có ít nhất 6 ký tự"; + next.password = "Password must be at least 6 characters"; setErrors(next); return !next.name && !next.phone && !next.password; }; @@ -55,17 +55,17 @@ export default function CreateStaffPage() { } else { const errorCode = (await res.text().catch(() => "")).trim(); const errorMap: Record = { - ExistedUser: "Số điện thoại đã được đăng ký", - InvalidPhoneNumber: "Số điện thoại không hợp lệ", - InvalidManager: "Không tìm thấy tài khoản manager", + ExistedUser: "Phone number already registered", + InvalidPhoneNumber: "Invalid phone number", + InvalidManager: "Manager account not found", }; setErrors({ ...errors, - submit: errorMap[errorCode] ?? "Đã có lỗi xảy ra, vui lòng thử lại", + submit: errorMap[errorCode] ?? "An error occurred, please try again", }); } } catch { - setErrors({ ...errors, submit: "Không thể kết nối, vui lòng thử lại" }); + setErrors({ ...errors, submit: "Unable to connect, please try again" }); } finally { setIsLoading(false); } @@ -79,10 +79,10 @@ export default function CreateStaffPage() {

- Tạo tài khoản nhân viên + Create Staff Account

- Thêm nhân viên mới cho nhà hàng + Add a new staff member to the restaurant

@@ -90,15 +90,15 @@ export default function CreateStaffPage() { {[ { id: "name", - label: "Họ tên", + label: "Full name", icon: "fa-user", - placeholder: "Nguyễn Văn A", + placeholder: "John Doe", field: "name" as const, type: "text", }, { id: "phone", - label: "Số điện thoại", + label: "Phone number", icon: "fa-phone", placeholder: "0987654321", field: "phone" as const, @@ -106,9 +106,9 @@ export default function CreateStaffPage() { }, { id: "password", - label: "Mật khẩu", + label: "Password", icon: "fa-lock", - placeholder: "Ít nhất 6 ký tự", + placeholder: "At least 6 characters", field: "password" as const, type: "password", }, @@ -160,18 +160,17 @@ export default function CreateStaffPage() { > {isLoading ? ( <> - Đang xử - lý... + Processing... ) : ( - "Tạo tài khoản" + "Create account" )} - Quay lại Dashboard + Back to Dashboard diff --git a/app/(staff)/staff/schedule/page.tsx b/app/(staff)/staff/schedule/page.tsx index 7b07d6a..7e17b67 100644 --- a/app/(staff)/staff/schedule/page.tsx +++ b/app/(staff)/staff/schedule/page.tsx @@ -96,7 +96,7 @@ export default function StaffSchedulePage() { @@ -242,12 +242,12 @@ export default function StaffSchedulePage() { {/* Title */}

- {isManager ? "Quản lý ca làm" : "Đăng ký ca làm"} + {isManager ? "Manage Shifts" : "Register Shifts"}

{view === "week" - ? `Tuần: ${weekLabel}` - : `Tháng: ${MONTH_NAMES[currentDate.getMonth()]} ${currentDate.getFullYear()}`} + ? `Week: ${weekLabel}` + : `Month: ${MONTH_NAMES[currentDate.getMonth()]} ${currentDate.getFullYear()}`}

@@ -263,7 +263,7 @@ export default function StaffSchedulePage() { : "bg-transparent text-(--color-text-secondary)" }`} > - Tuần + Week @@ -293,7 +293,7 @@ export default function StaffSchedulePage() { onClick={goToToday} className="cursor-pointer rounded-lg border border-(--color-border-light) bg-white px-3 py-1.5 text-xs font-semibold text-(--color-text-secondary) transition hover:border-(--color-primary)/30 hover:bg-(--color-primary)/5 hover:text-(--color-primary)" > - Hôm nay + Today )} @@ -373,7 +373,7 @@ export default function StaffSchedulePage() { {/* FAB for mobile manager */} {isManager && ( diff --git a/components/organisms/manager/ProductModal.tsx b/components/organisms/manager/ProductModal.tsx index e552a44..7b15f28 100644 --- a/components/organisms/manager/ProductModal.tsx +++ b/components/organisms/manager/ProductModal.tsx @@ -39,7 +39,7 @@ export default function ProductModal({ }); if (!res.ok) { - throw new Error("Upload ảnh thất bại."); + throw new Error("Image upload failed."); } const raw = await res.text(); @@ -54,12 +54,12 @@ export default function ProductModal({ } if (!filename) { - throw new Error("Không nhận được filename ảnh từ server."); + throw new Error("No image filename received from server."); } setForm((prev) => ({ ...prev, imageUrl: filename })); } catch (error: any) { - setUploadError(error?.message || "Không thể upload ảnh."); + setUploadError(error?.message || "Unable to upload image."); } finally { setUploading(false); } @@ -93,11 +93,11 @@ export default function ProductModal({

- {isEdit ? "Chỉnh sửa món" : "Thêm món mới"} + {isEdit ? "Edit item" : "Add new item"}