Skip to content

Commit

Permalink
Update src/views/publish/lookup-table-preview.ejs
Browse files Browse the repository at this point in the history
Co-authored-by: Phil Moorhouse <[email protected]>
  • Loading branch information
j-maynard and wheelsandcogs committed Dec 19, 2024
1 parent 79bd964 commit 7e0fd96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
12 changes: 2 additions & 10 deletions src/controllers/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,10 +324,7 @@ export const uploadLookupTable = async (req: Request, res: Response, next: NextF
logger.error('Something went wrong other than not matching');
logger.error(`Full error JSON: ${JSON.stringify(error, null, 2)}`);
res.redirect(
req.buildUrl(
`/publish/${dataset.id}/dimension-data-chooser/${dimension.id}/`,
req.language
)
req.buildUrl(`/publish/${dataset.id}/dimension-data-chooser/${dimension.id}/`, req.language)
);
return;
}
Expand Down Expand Up @@ -366,12 +363,7 @@ export const lookupReview = async (req: Request, res: Response, next: NextFuncti
case 'goback':
try {
await req.swapi.resetDimension(dataset.id, dimension.id);
res.redirect(
req.buildUrl(
`/publish/${dataset.id}/lookup/${dimension.id}/`,
req.language
)
);
res.redirect(req.buildUrl(`/publish/${dataset.id}/lookup/${dimension.id}/`, req.language));
} catch (err) {
const error = err as ApiException;
logger.error(
Expand Down
6 changes: 1 addition & 5 deletions src/views/publish/lookup-table-preview.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@
<tr class="govuk-table__row">
<% locals.headers.forEach(function(cell, idx) { %>
<th scope="col" class="govuk-table__header">
<% if (cell.name === dimension.joinColumn) { %>
<%= cell.name %>
<% } else { %>
<%= t(`publish.lookup_table_review.column_headers.${cell.name.toLowerCase()}`) %>
<% } %>
<%= cell.name === dimension.joinColumn ? cell.name : t(`publish.lookup_table_review.column_headers.${cell.name.toLowerCase()}`) %>
</th>
<% }); %>
</tr>
Expand Down

0 comments on commit 7e0fd96

Please sign in to comment.