Image genartiona dn temaplte design redesign

This commit is contained in:
IGNY8 VPS (Salman)
2026-01-10 03:58:02 +00:00
parent ce66dadc00
commit 0c693dc1cc
18 changed files with 1717 additions and 214 deletions

View File

@@ -111,14 +111,17 @@ export const createImagesPageConfig = (
];
// Add in-article image columns dynamically
for (let i = 1; i <= maxImages; i++) {
// Backend uses 0-indexed positions (0, 1, 2, 3)
// Display uses 1-indexed labels (In-Article 1, 2, 3, 4)
for (let i = 0; i < maxImages; i++) {
const displayIndex = i + 1; // 1-indexed for display
columns.push({
key: `in_article_${i}`,
label: `In-Article ${i}`,
key: `in_article_${displayIndex}`,
label: `In-Article ${displayIndex}`,
sortable: false,
width: '150px',
render: (_value: any, row: ContentImagesGroup) => {
const image = row.in_article_images.find(img => img.position === i);
const image = row.in_article_images.find(img => img.position === i); // 0-indexed position
return (
<ContentImageCell
image={image || null}