chore: release [ci skip]

This commit is contained in:
gitea-actions
2026-05-05 14:49:39 +00:00
parent c2afb3d3b5
commit edbf675997
15 changed files with 452 additions and 316 deletions
+8 -2
View File
@@ -21,7 +21,10 @@ export default function LoginForm() {
return false;
}
if (!PHONE_REGEX.test(phone)) {
setErrors({ phone: "Invalid phone number (e.g. 0987654321)", general: "" });
setErrors({
phone: "Invalid phone number (e.g. 0987654321)",
general: "",
});
return false;
}
return true;
@@ -50,7 +53,10 @@ export default function LoginForm() {
} else if (res.status === 404) {
setErrors({ phone: "", general: "Phone number not registered" });
} else {
setErrors({ phone: "", general: "An error occurred, please try again" });
setErrors({
phone: "",
general: "An error occurred, please try again",
});
}
} catch {
setErrors({ phone: "", general: "Unable to connect, please try again" });
@@ -50,7 +50,9 @@ export default function CategoriesTab() {
<p className="text-foreground truncate font-semibold">
{cat.name}
</p>
<p className="text-xs text-(--color-text-muted)">{count} items</p>
<p className="text-xs text-(--color-text-muted)">
{count} items
</p>
</div>
<div className="flex flex-col gap-1 opacity-0 transition-opacity group-hover:opacity-100">
<button
+12 -6
View File
@@ -76,7 +76,10 @@ export default function MenuItemsTab() {
setSubmitting(true);
setSubmitError(null);
try {
const added = await addManagerMenuItem(newName.trim(), parseFloat(newPrice));
const added = await addManagerMenuItem(
newName.trim(),
parseFloat(newPrice),
);
if (added) setMenuItems((prev) => [...prev, added]);
setNewName("");
setNewPrice("");
@@ -117,7 +120,9 @@ export default function MenuItemsTab() {
return (
<div className="flex flex-col items-center justify-center py-16 text-(--color-text-muted)">
<i className="fa-solid fa-store mb-2 block text-3xl opacity-30"></i>
<p className="text-sm">Quán của bạn chưa đưc khởi tạo trong hệ thống.</p>
<p className="text-sm">
Quán của bạn chưa đưc khởi tạo trong hệ thống.
</p>
</div>
);
}
@@ -127,7 +132,8 @@ export default function MenuItemsTab() {
{/* Toolbar */}
<div className="flex items-center justify-between">
<p className="text-sm text-(--color-text-muted)">
<strong className="text-foreground">{menuItems.length}</strong> món trong menu
<strong className="text-foreground">{menuItems.length}</strong> món
trong menu
</p>
<button
onClick={() => setShowForm(true)}
@@ -206,7 +212,7 @@ export default function MenuItemsTab() {
onChange={(e) => setNewName(e.target.value)}
placeholder="Nhập tên món..."
required
className="text-foreground w-full rounded-xl border border-(--color-border) bg-white px-3 py-2 text-sm outline-none transition focus:border-(--color-primary) focus:ring-2 focus:ring-(--color-primary)/20"
className="text-foreground w-full rounded-xl border border-(--color-border) bg-white px-3 py-2 text-sm transition outline-none focus:border-(--color-primary) focus:ring-2 focus:ring-(--color-primary)/20"
/>
</div>
@@ -222,7 +228,7 @@ export default function MenuItemsTab() {
required
min={0}
step={500}
className="text-foreground w-full rounded-xl border border-(--color-border) bg-white px-3 py-2 text-sm outline-none transition focus:border-(--color-primary) focus:ring-2 focus:ring-(--color-primary)/20"
className="text-foreground w-full rounded-xl border border-(--color-border) bg-white px-3 py-2 text-sm transition outline-none focus:border-(--color-primary) focus:ring-2 focus:ring-(--color-primary)/20"
/>
</div>
@@ -237,7 +243,7 @@ export default function MenuItemsTab() {
<button
type="button"
onClick={closeForm}
className="flex-1 cursor-pointer rounded-xl border border-(--color-border-light) bg-transparent py-2 text-sm font-medium text-(--color-text-secondary) transition hover:bg-background"
className="hover:bg-background flex-1 cursor-pointer rounded-xl border border-(--color-border-light) bg-transparent py-2 text-sm font-medium text-(--color-text-secondary) transition"
>
Hủy
</button>
@@ -178,7 +178,9 @@ export default function MobileShiftView({
</div>
<div className="flex items-center gap-1">
<span className="h-2 w-2 rounded-full bg-green-500"></span>
<span className="text-[10px] text-(--color-text-muted)">Registered</span>
<span className="text-[10px] text-(--color-text-muted)">
Registered
</span>
</div>
<div className="flex items-center gap-1">
<span className="h-2 w-2 rounded-full bg-purple-400"></span>
@@ -188,7 +190,9 @@ export default function MobileShiftView({
</div>
<div className="flex items-center gap-1">
<span className="h-2 w-2 rounded-full bg-red-400"></span>
<span className="text-[10px] text-(--color-text-muted)">Absent</span>
<span className="text-[10px] text-(--color-text-muted)">
Absent
</span>
</div>
</div>
</div>
@@ -199,7 +203,8 @@ export default function MobileShiftView({
{dayOfWeek}, {selectedDateObj.getDate()}/
{selectedDateObj.getMonth() + 1}/{selectedDateObj.getFullYear()}
<span className="ml-2 text-xs font-normal text-(--color-text-muted)">
({selectedShifts.length} shift{selectedShifts.length !== 1 ? "s" : ""})
({selectedShifts.length} shift
{selectedShifts.length !== 1 ? "s" : ""})
</span>
</h3>
+3 -1
View File
@@ -23,7 +23,9 @@ export default function ShopGrid({
return (
<div className="flex flex-col items-center justify-center gap-4 py-24 text-(--color-text-muted)">
<i className="fa-solid fa-store text-5xl opacity-30"></i>
<p className="text-base font-medium">No shops found matching your search</p>
<p className="text-base font-medium">
No shops found matching your search
</p>
</div>
);
}