Skip to content

Commit

Permalink
Merge pull request #37 from eea/develop
Browse files Browse the repository at this point in the history
fix: publications without date
  • Loading branch information
gabmnic authored Dec 13, 2024
2 parents d8990b9 + fe47409 commit 4b02db7
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 15 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

### [3.1.0](https://github.com/eea/eionet2-dashboard/compare/2.0.0...3.1.0) - 11 December 2024
### [3.1.1](https://github.com/eea/eionet2-dashboard/compare/3.1.0...3.1.1) - 13 December 2024

#### :bug: Bug Fixes

- fix: publications without date [Mihai Nicolae - [`db4854f`](https://github.com/eea/eionet2-dashboard/commit/db4854fd85daa83cbc9c2d03a294a36f0f99affb)]

## [3.1.0](https://github.com/eea/eionet2-dashboard/compare/2.0.0...3.1.0) - 11 December 2024

#### :rocket: New Features

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eionet2-dashboard",
"version": "3.1.0",
"version": "3.1.1",
"description": "",
"author": "",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions tabs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eeacms/eionet2-dashboard",
"version": "3.1.0",
"version": "3.1.1",
"license": "SEE LICENSE IN LICENSE.md",
"description": "MS Teams app for accessing Eionet activity and managing account information.",
"dependencies": {
Expand Down Expand Up @@ -109,4 +109,4 @@
"@azure/core-paging": "1.1.1"
},
"homepage": "."
}
}
26 changes: 15 additions & 11 deletions tabs/src/data/sharepointProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -501,17 +501,21 @@ export async function getPublications() {

if (publications?.value) {
publications.value.forEach((p) => {
const publicationDate = new Date(p.fields.Date_x0028_outpublic_x0029_);
result.push({
id: p.fields.id,
Title: p.fields.Title,
ItemType: p.fields.Item_x0020_type,
ExtraCommsProducts: p.fields.Extra_x0020_comms_x0020_products,
Status: p.fields.Status,
Date: publicationDate,
Link: p.fields.Link?.Url,
IsPast: publicationDate < currentDate,
});
const outDate = p.fields.Date_x0028_outpublic_x0029_;
//ignore publications without date.
if (outDate) {
const publicationDate = new Date(outDate);
result.push({
id: p.fields.id,
Title: p.fields.Title,
ItemType: p.fields.Item_x0020_type,
ExtraCommsProducts: p.fields.Extra_x0020_comms_x0020_products,
Status: p.fields.Status,
Date: publicationDate,
Link: p.fields.Link?.Url,
IsPast: publicationDate < currentDate,
});
}
});
}

Expand Down

0 comments on commit 4b02db7

Please sign in to comment.