-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from Marvell-Consulting/feat/tasklist
SW-88: Add initial version of the tasklist page
- Loading branch information
Showing
11 changed files
with
296 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { sortBy, last } from 'lodash'; | ||
|
||
import { DatasetDTO, ImportDTO, RevisionDTO } from '../dtos2/dataset-dto'; | ||
|
||
export const getLatestRevision = (dataset: DatasetDTO): RevisionDTO | undefined => { | ||
return last(sortBy(dataset.revisions, 'revision_index')); | ||
}; | ||
|
||
export const getLatestImport = (revision: RevisionDTO): ImportDTO | undefined => { | ||
return last(sortBy(revision.imports, 'uploaded_at')); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { DatasetDTO } from '../dtos2/dataset-dto'; | ||
|
||
export const singleLangDataset = (lang: string, dataset: DatasetDTO) => { | ||
return { | ||
...dataset, | ||
datasetInfo: dataset.datasetInfo?.find((info) => info.language === lang), | ||
dimensions: dataset.dimensions?.map((dimension) => { | ||
return { | ||
...dimension, | ||
dimensionInfo: dimension.dimensionInfo?.find((info) => info.language === lang) | ||
}; | ||
}) | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<%- include("../partials/header"); %> | ||
|
||
<div class="govuk-width-container app-width-container"> | ||
<!-- <a href="#" class="govuk-back-link">Back</a> --> | ||
<main class="govuk-main-wrapper" id="main-content" role="main"> | ||
<h1 class="govuk-heading-xl"><%- t('errors.not_found') %></h1> | ||
</main> | ||
</div> | ||
|
||
<%- include("../partials/footer"); %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
<%- include("../partials/header"); %> | ||
|
||
<div class="govuk-width-container"> | ||
<main class="govuk-main-wrapper " id="main-content" role="main"> | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<h2 class="region-subhead"><%= t('publish.tasklist.heading') %></h2> | ||
<h1 class="govuk-heading-l" style="margin-bottom: 15px;"><%= dataset?.datasetInfo?.title %></h1> | ||
</div> | ||
</div> | ||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<h2 class="govuk-heading-m"><%= t('publish.tasklist.data.subheading') %></h2> | ||
<ul class="govuk-task-list"> | ||
<li class="govuk-task-list__item govuk-task-list__item--with-link"> | ||
<div class="govuk-task-list__name-and-hint"> | ||
<a class="govuk-link govuk-task-list__link" href="#"> | ||
<%= t('publish.tasklist.data.datatable') %> | ||
</a> | ||
</div> | ||
</li> | ||
<% dataset?.dimensions.forEach(function(dimension) { %> | ||
<li class="govuk-task-list__item govuk-task-list__item--with-link"> | ||
<div class="govuk-task-list__name-and-hint"> | ||
<a class="govuk-link govuk-task-list__link" href="<%= sourcesUrl %>"><%=dimension?.dimensionInfo?.name %></a> | ||
</div> | ||
</li> | ||
<% }); %> | ||
</ul> | ||
<h2 class="govuk-heading-m govuk-!-margin-top-5"><%= t('publish.tasklist.metadata.subheading') %></h2> | ||
<ul class="govuk-task-list"> | ||
<li class="govuk-task-list__item govuk-task-list__item--with-link"> | ||
<div class="govuk-task-list__name-and-hint"> | ||
<a class="govuk-link govuk-task-list__link" href="metadata-title.html" aria-describedby="prepare-application-3-status"> | ||
<%= t('publish.tasklist.metadata.title') %> | ||
</a> | ||
</div> | ||
</li> | ||
<li class="govuk-task-list__item govuk-task-list__item--with-link"> | ||
<div class="govuk-task-list__name-and-hint"> | ||
<a class="govuk-link govuk-task-list__link" href="metadata-summary.html" aria-describedby="prepare-application-3-status"> | ||
<%= t('publish.tasklist.metadata.summary') %> | ||
</a> | ||
</div> | ||
</li> | ||
<li class="govuk-task-list__item govuk-task-list__item--with-link"> | ||
<div class="govuk-task-list__name-and-hint"> | ||
<a class="govuk-link govuk-task-list__link" href="metadata-collection.html"> | ||
<%= t('publish.tasklist.metadata.data_collection') %> | ||
</a> | ||
</div> | ||
</li> | ||
<li class="govuk-task-list__item govuk-task-list__item--with-link"> | ||
<div class="govuk-task-list__name-and-hint"> | ||
<a class="govuk-link govuk-task-list__link" href="metadata-quality.html"> | ||
<%= t('publish.tasklist.metadata.statistical_quality') %> | ||
</a> | ||
</div> | ||
</li> | ||
<li class="govuk-task-list__item govuk-task-list__item--with-link"> | ||
<div class="govuk-task-list__name-and-hint"> | ||
<a class="govuk-link govuk-task-list__link" href="metadata-data-source-more" aria-describedby="prepare-application-4-status"> | ||
<%= t('publish.tasklist.metadata.data_sources') %> | ||
</a> | ||
</div> | ||
</li> | ||
<li class="govuk-task-list__item govuk-task-list__item--with-link"> | ||
<div class="govuk-task-list__name-and-hint"> | ||
<a class="govuk-link govuk-task-list__link" href="metadata-reports-more.html" aria-describedby="prepare-application-5-status"> | ||
<%= t('publish.tasklist.metadata.related_reports') %> | ||
</a> | ||
</div> | ||
</li> | ||
<li class="govuk-task-list__item govuk-task-list__item--with-link"> | ||
<div class="govuk-task-list__name-and-hint"> | ||
<a class="govuk-link govuk-task-list__link" href="metadata-frequency.html" aria-describedby="prepare-application-5-status"> | ||
<%= t('publish.tasklist.metadata.update_frequency') %> | ||
</a> | ||
</div> | ||
</li> | ||
<li class="govuk-task-list__item govuk-task-list__item--with-link"> | ||
<div class="govuk-task-list__name-and-hint"> | ||
<a class="govuk-link govuk-task-list__link" href="metadata-designation.html" aria-describedby="prepare-application-5-status"> | ||
<%= t('publish.tasklist.metadata.designation') %> | ||
</a> | ||
</div> | ||
</li> | ||
<li class="govuk-task-list__item govuk-task-list__item--with-link"> | ||
<div class="govuk-task-list__name-and-hint"> | ||
<a class="govuk-link govuk-task-list__link" href="metadata-topics.html" aria-describedby="prepare-application-5-status"> | ||
<%= t('publish.tasklist.metadata.relevant_topics') %> | ||
</a> | ||
</div> | ||
</li> | ||
</ul> | ||
<h2 class="govuk-heading-m govuk-!-margin-top-5"><%= t('publish.tasklist.publishing.subheading') %></h2> | ||
<ul class="govuk-task-list"> | ||
<li class="govuk-task-list__item govuk-task-list__item--with-link"> | ||
<div class="govuk-task-list__name-and-hint"> | ||
<a class="govuk-link govuk-task-list__link" href="schedule" aria-describedby="prepare-application-5-status"> | ||
<%= t('publish.tasklist.publishing.when') %> | ||
</a> | ||
</div> | ||
</li> | ||
<li class="govuk-task-list__item govuk-task-list__item--with-link"> | ||
<div class="govuk-task-list__name-and-hint"> | ||
<a class="govuk-link govuk-task-list__link" href="schedule" aria-describedby="prepare-application-5-status"> | ||
<%= t('publish.tasklist.publishing.export') %> | ||
</a> | ||
</div> | ||
</li> | ||
<li class="govuk-task-list__item govuk-task-list__item--with-link"> | ||
<div class="govuk-task-list__name-and-hint"> | ||
<a class="govuk-link govuk-task-list__link" href="schedule" aria-describedby="prepare-application-5-status"> | ||
<%= t('publish.tasklist.publishing.import') %> | ||
</a> | ||
</div> | ||
</li> | ||
<li class="govuk-task-list__item govuk-task-list__item--with-link"> | ||
<div class="govuk-task-list__name-and-hint"> | ||
<a class="govuk-link govuk-task-list__link" href="schedule" aria-describedby="prepare-application-5-status"> | ||
<%= t('publish.tasklist.publishing.submit') %> | ||
</a> | ||
</div> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</main> | ||
</div> | ||
<style> | ||
.region-subhead { | ||
color: #aa1111; | ||
font-family: Arial, Helvetica, sans-serif; | ||
font-size: 14px; | ||
letter-spacing: 0.08em; | ||
line-height: 20px; | ||
text-transform: uppercase; | ||
} | ||
</style> | ||
<%- include("../partials/footer"); %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.