Sms Rehber eklemesi,Mobil uyumluluk ayarları,iletişim sayfası düzenlemeler vb.
This commit is contained in:
@@ -11,6 +11,7 @@ interface ProductData {
|
||||
image_url?: string
|
||||
is_active?: boolean
|
||||
images?: string[]
|
||||
product_code?: string
|
||||
}
|
||||
|
||||
export async function createProduct(data: ProductData) {
|
||||
@@ -24,7 +25,8 @@ export async function createProduct(data: ProductData) {
|
||||
description: data.description,
|
||||
price: data.price,
|
||||
image_url: data.image_url, // Main image (can be first of images)
|
||||
is_active: data.is_active ?? true
|
||||
is_active: data.is_active ?? true,
|
||||
product_code: data.product_code
|
||||
}).select().single()
|
||||
|
||||
if (error) throw error
|
||||
@@ -62,7 +64,8 @@ export async function updateProduct(id: number, data: ProductData) {
|
||||
description: data.description,
|
||||
price: data.price,
|
||||
image_url: data.image_url,
|
||||
is_active: data.is_active
|
||||
is_active: data.is_active,
|
||||
product_code: data.product_code
|
||||
}).eq("id", id)
|
||||
|
||||
if (error) throw error
|
||||
|
||||
@@ -32,7 +32,7 @@ export default async function ProductsPage() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="border rounded-md">
|
||||
<div className="border rounded-md overflow-x-auto">
|
||||
<Table>
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
|
||||
Reference in New Issue
Block a user