init commit,
This commit is contained in:
24
03_source/frontend/src/pages/dashboard/product/details.tsx
Normal file
24
03_source/frontend/src/pages/dashboard/product/details.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
import { useParams } from 'src/routes/hooks';
|
||||
|
||||
import { CONFIG } from 'src/global-config';
|
||||
import { useGetProduct } from 'src/actions/product';
|
||||
|
||||
import { ProductDetailsView } from 'src/sections/product/view';
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
const metadata = { title: `Product details | Dashboard - ${CONFIG.appName}` };
|
||||
|
||||
export default function Page() {
|
||||
const { id = '' } = useParams();
|
||||
|
||||
const { product, productLoading, productError } = useGetProduct(id);
|
||||
|
||||
return (
|
||||
<>
|
||||
<title>{metadata.title}</title>
|
||||
|
||||
<ProductDetailsView product={product} loading={productLoading} error={productError} />
|
||||
</>
|
||||
);
|
||||
}
|
24
03_source/frontend/src/pages/dashboard/product/edit.tsx
Normal file
24
03_source/frontend/src/pages/dashboard/product/edit.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
import { useParams } from 'src/routes/hooks';
|
||||
|
||||
import { CONFIG } from 'src/global-config';
|
||||
import { useGetProduct } from 'src/actions/product';
|
||||
|
||||
import { ProductEditView } from 'src/sections/product/view';
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
const metadata = { title: `Product edit | Dashboard - ${CONFIG.appName}` };
|
||||
|
||||
export default function Page() {
|
||||
const { id = '' } = useParams();
|
||||
|
||||
const { product } = useGetProduct(id);
|
||||
|
||||
return (
|
||||
<>
|
||||
<title>{metadata.title}</title>
|
||||
|
||||
<ProductEditView product={product} />
|
||||
</>
|
||||
);
|
||||
}
|
17
03_source/frontend/src/pages/dashboard/product/list.tsx
Normal file
17
03_source/frontend/src/pages/dashboard/product/list.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import { CONFIG } from 'src/global-config';
|
||||
|
||||
import { ProductListView } from 'src/sections/product/view';
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
const metadata = { title: `Product list | Dashboard - ${CONFIG.appName}` };
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<>
|
||||
<title>{metadata.title}</title>
|
||||
|
||||
<ProductListView />
|
||||
</>
|
||||
);
|
||||
}
|
17
03_source/frontend/src/pages/dashboard/product/new.tsx
Normal file
17
03_source/frontend/src/pages/dashboard/product/new.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import { CONFIG } from 'src/global-config';
|
||||
|
||||
import { ProductCreateView } from 'src/sections/product/view';
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
const metadata = { title: `Create a new product | Dashboard - ${CONFIG.appName}` };
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<>
|
||||
<title>{metadata.title}</title>
|
||||
|
||||
<ProductCreateView />
|
||||
</>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user