Skip to content

Commit

Permalink
🐛 (admin) mark unpublished charts as drafts (#3923)
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamersmann authored Sep 4, 2024
1 parent acf6144 commit c33fc73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions adminSiteClient/ChartRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ export class ChartRow extends React.Component<{
return (
<tr>
<td style={{ minWidth: "140px", width: "12.5%" }}>
{chart.isPublished && (
{chart.isPublished ? (
<a href={`${BAKED_GRAPHER_URL}/${chart.slug}`}>
<img
src={`${BAKED_GRAPHER_EXPORTS_BASE_URL}/${chart.slug}.svg`}
className="chartPreview"
/>
</a>
)}
) : null}
</td>
<td style={{ minWidth: "180px" }}>
{chart.isPublished ? (
Expand Down
2 changes: 1 addition & 1 deletion db/model/Chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,10 +440,10 @@ export const oldChartFieldList = `
chart_configs.full->>"$.type" AS type,
chart_configs.full->>"$.internalNotes" AS internalNotes,
chart_configs.full->>"$.variantName" AS variantName,
chart_configs.full->>"$.isPublished" AS isPublished,
chart_configs.full->>"$.tab" AS tab,
JSON_EXTRACT(chart_configs.full, "$.hasChartTab") = true AS hasChartTab,
JSON_EXTRACT(chart_configs.full, "$.hasMapTab") = true AS hasMapTab,
JSON_EXTRACT(chart_configs.full, "$.isPublished") = true AS isPublished,
charts.lastEditedAt,
charts.lastEditedByUserId,
lastEditedByUser.fullName AS lastEditedBy,
Expand Down

0 comments on commit c33fc73

Please sign in to comment.