Add mini-slider API and wire the homepage projects carousel.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-18 15:11:15 +05:00
parent 86b51059f3
commit b33fea4cd7
19 changed files with 563 additions and 28 deletions

View File

@@ -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" },
];

View File

@@ -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",