Image genartiona dn temaplte design redesign
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user