stuff done
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import AdminPermission from '@/components/(protected)/admin/auth/permission'
|
||||
import {EntityCrudForm} from '@/components/(protected)/admin/entity/crud-form'
|
||||
import ProductCreateEditForm from '@/components/(protected)/admin/product/create-edit-form'
|
||||
import {getProductById} from '@/lib/data/models/product'
|
||||
import {dump} from '@/lib/utils'
|
||||
@@ -21,9 +23,19 @@ export default async function Page({
|
||||
|
||||
switch (method) {
|
||||
case 'create':
|
||||
return <ProductCreateEditForm />
|
||||
return (
|
||||
<>
|
||||
<AdminPermission />
|
||||
<ProductCreateEditForm />
|
||||
</>
|
||||
)
|
||||
case 'update':
|
||||
return <ProductCreateEditForm data={data} />
|
||||
return (
|
||||
<>
|
||||
<AdminPermission />
|
||||
<ProductCreateEditForm data={data} />
|
||||
</>
|
||||
)
|
||||
default:
|
||||
return <div>{dump(slug)}</div>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user