Skip to content

Commit

Permalink
Merge pull request #1724 from ClimateWatch-Vizzuality/master-deploy-3…
Browse files Browse the repository at this point in the history
…-2-add-new-third-ndc-column

Release "Compare All Targets" module changes
  • Loading branch information
SARodrigues authored Dec 11, 2024
2 parents 9a5a4e6 + b25a35e commit a1177ce
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ const PreviousSubmissionIcon = ({
tooltipId
}) => {
const iconValue =
submissionIconValue || value.startsWith('Yes')
submissionIconValue || (value.startsWith('Yes')
? 'Yes, enhancement in the revised submission'
: value;
: value);

const icon = icons[white ? 'white' : 'color'][iconValue];
if (!icon) return null;
Expand Down
9 changes: 5 additions & 4 deletions app/javascript/app/data/country-documents.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
export const DOCUMENT_COLUMNS_SLUGS = {
'Pre-2020 Pledge': 'pledges',
// 'Pre-2020 Pledge': 'pledges',
INDC: 'indc',
NDC: 'first_ndc',
'Updated First NDC': 'revised_first_ndc',
'2nd NDC': 'second_ndc',
LTS: 'lts',
'Climate Framework Laws or Policies': 'framework',
'Sectoral Laws or Policies': 'sectoral'
'3rd NDC': 'third_ndc',
LTS: 'lts'
// 'Climate Framework Laws or Policies': 'framework',
// 'Sectoral Laws or Policies': 'sectoral'
};

// Needed for sorting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const cellRenderer = (
}

if (dataKey === 'Share of global GHG emissions') {
return cellData;
return <span className={styles.ghgEmissionsColumn}>{cellData}</span>;
}

switch (cellData) {
Expand Down Expand Up @@ -135,10 +135,10 @@ const CompareAllTable = ({
<Table
data={tableData}
tableHeight={550}
tableWidthOffset={-100}
tableWidthOffset={-82}
parseHtml
titleLinks={titleLinks}
setColumnWidth={() => 115}
setColumnWidth={() => 144}
setRowsHeight={() => 50}
defaultColumns={columns}
theme={compareTableTheme}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,13 @@
height: 30px;
width: 30px;
}

.ghgEmissionsColumn {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
padding-left: 6px;
padding-right: 48px;
}

0 comments on commit a1177ce

Please sign in to comment.