Add mini-slider API and wire the homepage projects carousel.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
const CARDS = [
|
||||
{ id: "stat-categories", endpoint: "/api/v1/admin/categories", listKey: "categories" },
|
||||
{ id: "stat-banners", endpoint: "/api/v1/admin/banner", listKey: "banners" },
|
||||
{ id: "stat-mini-sliders", endpoint: "/api/v1/admin/mini-slider", listKey: "miniSliders" },
|
||||
{ id: "stat-static", endpoint: "/api/v1/admin/static", listKey: "statics" },
|
||||
{ id: "stat-currency", endpoint: "/api/v1/admin/currency", listKey: "currencies" },
|
||||
];
|
||||
|
||||
@@ -117,6 +117,27 @@
|
||||
}),
|
||||
},
|
||||
|
||||
"mini-sliders": {
|
||||
title: "Mini sliders",
|
||||
endpoint: "/api/v1/admin/mini-slider",
|
||||
listKey: "miniSliders",
|
||||
searchable: true,
|
||||
columns: [
|
||||
{ key: "Id", label: "ID", type: "id", sortKey: "id" },
|
||||
{ key: "imagePath", label: "Image", type: "image" },
|
||||
{ key: "title", label: "Title", type: "lang" },
|
||||
{ key: "createdAt", label: "Created", type: "date", sortKey: "createdAt" },
|
||||
],
|
||||
fields: [
|
||||
{ name: "title", label: "Title", type: "lang", required: true },
|
||||
{ name: "imagePath", label: "Image", type: "image", required: true },
|
||||
],
|
||||
buildPayload: (values) => ({
|
||||
title: values.title,
|
||||
imagePath: values.imagePath,
|
||||
}),
|
||||
},
|
||||
|
||||
news: {
|
||||
title: "News",
|
||||
endpoint: "/api/v1/admin/news",
|
||||
|
||||
Reference in New Issue
Block a user