diff --git a/src/app/[lang]/(dashboard)/(private)/apps/inventory/products/ingredients/[id]/detail/page.tsx b/src/app/[lang]/(dashboard)/(private)/apps/inventory/products/ingredients/[id]/detail/page.tsx new file mode 100644 index 0000000..6ede982 --- /dev/null +++ b/src/app/[lang]/(dashboard)/(private)/apps/inventory/products/ingredients/[id]/detail/page.tsx @@ -0,0 +1,7 @@ +import IngredientDetail from '@/views/apps/ecommerce/products/ingredient/detail' + +const IngredientDetailPage = () => { + return +} + +export default IngredientDetailPage diff --git a/src/views/apps/ecommerce/products/ingredient/ProductIngredientTable.tsx b/src/views/apps/ecommerce/products/ingredient/ProductIngredientTable.tsx index 5f9c063..052c9e5 100644 --- a/src/views/apps/ecommerce/products/ingredient/ProductIngredientTable.tsx +++ b/src/views/apps/ecommerce/products/ingredient/ProductIngredientTable.tsx @@ -38,6 +38,10 @@ import AddProductIngredientDrawer from './AddProductIngredientDrawer' import { useIngredientsMutation } from '../../../../../services/mutations/ingredients' import { useDispatch } from 'react-redux' import { setIngredient } from '../../../../../redux-store/slices/ingredient' +import Link from 'next/link' +import { getLocalizedUrl } from '@/utils/i18n' +import { Locale } from '@/configs/i18n' +import { useParams } from 'next/navigation' declare module '@tanstack/table-core' { interface FilterFns { @@ -110,6 +114,8 @@ const ProductIngredientTable = () => { const [openConfirm, setOpenConfirm] = useState(false) const [search, setSearch] = useState('') + const { lang: locale } = useParams() + // Fetch products with pagination and search const { data, isLoading, error, isFetching } = useIngredients({ page: currentPage, @@ -166,14 +172,23 @@ const ProductIngredientTable = () => { columnHelper.accessor('name', { header: 'Name', cell: ({ row }) => ( -
- {/* */} -
- - {row.original.name || '-'} - -
-
+ ) }), columnHelper.accessor('cost', { @@ -396,7 +411,10 @@ const ProductIngredientTable = () => { /> - setAddIngredientOpen(!addIngredientOpen)} /> + setAddIngredientOpen(!addIngredientOpen)} + /> { + return ( + + + + Tepung Terigu + + + + } + subheader={ +
+
+ + Cost: {formatCurrency(5000)} + +
+
+ } + /> +
+ ) +} + +export default IngredientDetailInfo diff --git a/src/views/apps/ecommerce/products/ingredient/detail/IngredientDetailUnit.tsx b/src/views/apps/ecommerce/products/ingredient/detail/IngredientDetailUnit.tsx new file mode 100644 index 0000000..823b0d2 --- /dev/null +++ b/src/views/apps/ecommerce/products/ingredient/detail/IngredientDetailUnit.tsx @@ -0,0 +1,38 @@ +import React from 'react' +import { Card, CardContent, CardHeader, Typography, Button, Box, Stack } from '@mui/material' + +const IngredientDetailUnit = () => { + return ( + + + + + + + Satuan Dasar + + + : Pcs + + + + + + + + ) +} + +export default IngredientDetailUnit diff --git a/src/views/apps/ecommerce/products/ingredient/detail/index.tsx b/src/views/apps/ecommerce/products/ingredient/detail/index.tsx new file mode 100644 index 0000000..88c1d81 --- /dev/null +++ b/src/views/apps/ecommerce/products/ingredient/detail/index.tsx @@ -0,0 +1,18 @@ +import Grid from '@mui/material/Grid2' +import IngredientDetailInfo from './IngredientDetailInfo' +import IngredientDetailUnit from './IngredientDetailUnit' + +const IngredientDetail = () => { + return ( + + + + + + + + + ) +} + +export default IngredientDetail