diff --git a/TODO.md b/TODO.md index 63862fc..36b7232 100644 --- a/TODO.md +++ b/TODO.md @@ -1,10 +1,12 @@ # TODO - Add image upload field for manager add/update menu item -- [x] Update GraphQL queries/mutations in `lib/manager-context.tsx` to include `imageUrl` +- [x] Update GraphQL queries/mutations in `lib/manager-context.tsx` to include + `imageUrl` - [x] Update `components/organisms/manager/ProductModal.tsx` - [x] Add file input for image selection - [x] Add upload button to call `POST /api/file` - [x] Store returned URL string into `form.imageUrl` - [x] Show upload/loading/error states and image preview -- [x] Update `components/organisms/manager/ProductsTab.tsx` to show image thumbnail in table +- [x] Update `components/organisms/manager/ProductsTab.tsx` to show image + thumbnail in table - [x] Mark TODO progress after each step completed diff --git a/app/(main)/payment/page.tsx b/app/(main)/payment/page.tsx index 13e38d1..f352ec1 100644 --- a/app/(main)/payment/page.tsx +++ b/app/(main)/payment/page.tsx @@ -25,7 +25,8 @@ export default function PaymentPage() { const { products } = useManager(); const findProduct = (id: string): MenuItemEntity => - products.find((i) => i.id == id) ?? ({ + products.find((i) => i.id == id) ?? + ({ name: "Unknown product", description: "", price: 0, diff --git a/k8s.yaml b/k8s.yaml index 8a0745a..9400f38 100644 --- a/k8s.yaml +++ b/k8s.yaml @@ -16,7 +16,7 @@ spec: spec: containers: - name: frontend-container - image: git.demonkernel.io.vn/foodsurf/frontend:1.2.8 + image: git.demonkernel.io.vn/foodsurf/frontend:1.2.9 ports: - containerPort: 3000 resources: diff --git a/lib/cart-context.tsx b/lib/cart-context.tsx index 985870d..1817be2 100644 --- a/lib/cart-context.tsx +++ b/lib/cart-context.tsx @@ -124,11 +124,11 @@ export function CartProvider({ children }: { children: React.ReactNode }) { }; if (error) { - createCartFunc(); + createCartFunc(); } else if (!cartId) { const localCartId = localStorage.getItem(CART_ID); if (localCartId) setCartId(localCartId); - else createCartFunc(); + else createCartFunc(); } }, [eateryData, createCart, data, loading, error]); diff --git a/package-lock.json b/package-lock.json index 833d17a..5a3a6af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "temp", - "version": "1.2.8", + "version": "1.2.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "temp", - "version": "1.2.8", + "version": "1.2.9", "dependencies": { "@apollo/client": "^4.1.9", "@tailwindcss/postcss": "^4.2.4", diff --git a/package.json b/package.json index 6f84ace..092c0af 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "temp", - "version": "1.2.8", + "version": "1.2.9", "private": true, "scripts": { "dev": "next dev",