fix: add shift management #41

Merged
TakahashiNguyen merged 8 commits from fix-shift-assignment into main 2026-05-14 03:13:09 +00:00
3 changed files with 42 additions and 42 deletions
Showing only changes of commit 427642e08f - Show all commits
+1 -1
View File
@@ -15,7 +15,7 @@ export { ReviewModal } from "./modals";
export type { ReviewModalProps, ConfirmModalProps } from "./modals";
// Shop Grid
export { ShopGrid } from "./shop-grid";
// export { ShopGrid } from "./shop-grid";
export type { ShopGridProps } from "./shop-grid";
// Manager
+40 -40
View File
@@ -1,46 +1,46 @@
"use client";
import { ShopCard } from "@/components/molecules/cards";
import { MOCK_SHOPS } from "@/lib/constants";
// import { ShopCard } from "@/components/molecules/cards";
// import { MOCK_SHOPS } from "@/lib/constants";
import type { ShopGridProps } from "./ShopGrid.types";
// import type { ShopGridProps } from "./ShopGrid.types";
export default function ShopGrid({
searchName = "",
searchAddress = "",
}: ShopGridProps) {
const filtered = MOCK_SHOPS.filter((shop) => {
const matchesName =
searchName.trim() === "" ||
shop.name.toLowerCase().includes(searchName.toLowerCase());
const matchesAddress =
searchAddress.trim() === "" ||
shop.address.toLowerCase().includes(searchAddress.toLowerCase());
return matchesName && matchesAddress;
});
// export default function ShopGrid({
// searchName = "",
// searchAddress = "",
// }: ShopGridProps) {
// const filtered = MOCK_SHOPS.filter((shop) => {
// const matchesName =
// searchName.trim() === "" ||
// shop.name.toLowerCase().includes(searchName.toLowerCase());
// const matchesAddress =
// searchAddress.trim() === "" ||
// shop.address.toLowerCase().includes(searchAddress.toLowerCase());
// return matchesName && matchesAddress;
// });
if (filtered.length === 0) {
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>
</div>
);
}
// if (filtered.length === 0) {
// 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>
// </div>
// );
// }
return (
<div className="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
{filtered.map((shop) => (
<ShopCard
key={shop.id}
id={shop.id}
name={shop.name}
address={shop.address}
image={shop.image}
/>
))}
</div>
);
}
// return (
// <div className="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
// {filtered.map((shop) => (
// <ShopCard
// key={shop.id}
// id={shop.id}
// name={shop.name}
// address={shop.address}
// image={shop.image}
// />
// ))}
// </div>
// );
// }
+1 -1
View File
@@ -1,2 +1,2 @@
export { default as ShopGrid } from "./ShopGrid";
// export { default as ShopGrid } from "./ShopGrid";
export type { ShopGridProps } from "./ShopGrid.types";