From c542fcb91e278d230e0444c06c91ce1e436d60c2 Mon Sep 17 00:00:00 2001
From: andree1985 <30987911+andree1985@users.noreply.github.com>
Date: Tue, 26 Mar 2019 15:09:21 +0200
Subject: [PATCH 01/11] fix: Rebrand NCCIS to NDAO
- Change all relevant text references to NCCIS/CCIS to NDAO
Fixes #63
---
NDAO_Client_React/app/data/footerConfig.js | 2 +-
NDAO_Client_React/app/index.ejs | 2 +-
NDAO_Client_React/app/js/components/navigation/Header.jsx | 4 ++--
NDAO_Client_React/app/js/components/pages/Home/AME_Banner.jsx | 2 +-
NDAO_Client_React/app/js/components/pages/Home/Home.jsx | 2 +-
NDAO_Client_React/app/js/globalFunctions.js | 4 ++--
6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/NDAO_Client_React/app/data/footerConfig.js b/NDAO_Client_React/app/data/footerConfig.js
index 5e20bc0..0e9cef8 100644
--- a/NDAO_Client_React/app/data/footerConfig.js
+++ b/NDAO_Client_React/app/data/footerConfig.js
@@ -5,7 +5,7 @@ export const footerContent = {
{
text: "Technology",
links: [
- { text: "DEA NCCIS uses open source, government funded facilities provided by SAEON. The DST and NRF funds the SAEON Open Data Platform (ODP) and associated portals. Developed by SAEON on behalf of DST, DEA, DRDLR, and other stakeholders." },
+ { text: "DEA NDAO uses open source, government funded facilities provided by SAEON. The DST and NRF funds the SAEON Open Data Platform (ODP) and associated portals. Developed by SAEON on behalf of DST, DEA, DRDLR, and other stakeholders." },
]
},
{
diff --git a/NDAO_Client_React/app/index.ejs b/NDAO_Client_React/app/index.ejs
index b6fb53c..4b7f956 100644
--- a/NDAO_Client_React/app/index.ejs
+++ b/NDAO_Client_React/app/index.ejs
@@ -4,7 +4,7 @@
- NCCIS - National Climate Change Information System
+ NDAO - National Desired Adaptation Outcomes
diff --git a/NDAO_Client_React/app/js/components/navigation/Header.jsx b/NDAO_Client_React/app/js/components/navigation/Header.jsx
index b8beb61..4723010 100644
--- a/NDAO_Client_React/app/js/components/navigation/Header.jsx
+++ b/NDAO_Client_React/app/js/components/navigation/Header.jsx
@@ -32,7 +32,7 @@ class Header extends React.Component {
- NCCIS
+ NDAO
{/* BETA tag */}
@@ -42,7 +42,7 @@ class Header extends React.Component {
- National Climate Change Information System
+ National Desired Adaptation Outcomes
diff --git a/NDAO_Client_React/app/js/components/pages/Home/AME_Banner.jsx b/NDAO_Client_React/app/js/components/pages/Home/AME_Banner.jsx
index 5a79506..0a42538 100644
--- a/NDAO_Client_React/app/js/components/pages/Home/AME_Banner.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Home/AME_Banner.jsx
@@ -27,7 +27,7 @@ class AME_Banner extends React.Component {
- The Department of Environmental Affairs Climate Change Information System (CCIS) was designed to monitor
+ The Department of Environmental Affairs National Desired Adaptation Outcomes (NDAO) was designed to monitor
and track South Africa’s progress on climate change, to that end, nine desired adaptation outcome
goals were developed to establish progress across the country.
diff --git a/NDAO_Client_React/app/js/components/pages/Home/Home.jsx b/NDAO_Client_React/app/js/components/pages/Home/Home.jsx
index 83cc8a7..694cec4 100644
--- a/NDAO_Client_React/app/js/components/pages/Home/Home.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Home/Home.jsx
@@ -289,7 +289,7 @@ class Home extends React.Component {
{
diff --git a/NDAO_Client_React/app/js/globalFunctions.js b/NDAO_Client_React/app/js/globalFunctions.js
index 2638062..1511716 100644
--- a/NDAO_Client_React/app/js/globalFunctions.js
+++ b/NDAO_Client_React/app/js/globalFunctions.js
@@ -73,11 +73,11 @@ export const wait = ms => new Promise((r, j) => setTimeout(r, ms))
//-------------------------//
export function SaveCurrentUrl() {
- CreateCookie("ccis_last_url", document.URL, 1);
+ CreateCookie("ndao_last_url", document.URL, 1);
}
export function ReadLastUrl() {
- return ReadCookie("ccis_last_url")
+ return ReadCookie("ndao_last_url")
}
export function CreateCookie(name, value, days) {
From 5b4b600794161217d4b766900a975853f9e78e98 Mon Sep 17 00:00:00 2001
From: andree1985 <30987911+andree1985@users.noreply.github.com>
Date: Tue, 26 Mar 2019 18:37:30 +0200
Subject: [PATCH 02/11] feat(side-nav): Re-designed SideNav
Re-designed SideNav with Ant.Design's drawer component
Fixes #66
---
.../app/js/components/navigation/SideNav.css | 13 ++
.../app/js/components/navigation/SideNav.jsx | 216 +++++++++++-------
.../app/js/config/serviceURLs.js | 2 +-
3 files changed, 144 insertions(+), 87 deletions(-)
create mode 100644 NDAO_Client_React/app/js/components/navigation/SideNav.css
diff --git a/NDAO_Client_React/app/js/components/navigation/SideNav.css b/NDAO_Client_React/app/js/components/navigation/SideNav.css
new file mode 100644
index 0000000..948cad2
--- /dev/null
+++ b/NDAO_Client_React/app/js/components/navigation/SideNav.css
@@ -0,0 +1,13 @@
+.nav-cat-head {
+ padding-top: 7px;
+ font-size: 15px;
+}
+
+.nav-close-handle {
+ color: black;
+ box-shadow: none;
+ margin-right: 2px;
+ padding: 10px 3px 10px 2px;
+ border: 1px solid black;
+ border-radius: 3px;
+}
\ No newline at end of file
diff --git a/NDAO_Client_React/app/js/components/navigation/SideNav.jsx b/NDAO_Client_React/app/js/components/navigation/SideNav.jsx
index 5b0d5ac..c04cac7 100644
--- a/NDAO_Client_React/app/js/components/navigation/SideNav.jsx
+++ b/NDAO_Client_React/app/js/components/navigation/SideNav.jsx
@@ -2,13 +2,13 @@
import React from 'react'
import { connect } from 'react-redux';
-import {
- SideNav as MSBSideNav, Fa, SideNavItem, SideNavCat, SideNavNav, SideNavLink, Container, Row, Button,
- Modal, ModalBody, ModalHeader, ModalFooter
-} from 'mdbreact'
+import { Fa, Row, Col, Button } from 'mdbreact'
+import { Drawer, Collapse } from 'antd'
+import { DEAGreen } from '../../config/colours.js'
-import '../../../css/mdbreact-sidenav.css'
-import loader from '../../../images/Other/loader.gif'
+import './SideNav.css'
+
+const Panel = Collapse.Panel
const mapStateToProps = (state, props) => {
return {}
@@ -49,7 +49,6 @@ class SideNav extends React.Component {
}
toggleNav(key) {
-
let { navOpen } = this.state
if (navOpen.includes(key)) {
@@ -63,49 +62,56 @@ class SideNav extends React.Component {
}
renderLinks(data, level = 0) {
-
- let { navOpen } = this.state
let links = []
- //let indent = (level > 1 ? 26 * (level - 1) : 0) + "px"
data.forEach(x => {
if (typeof x.children !== 'undefined') {
links.push(
-
+ {x.text}
+
+ }
+ style={{
+ border: 0
+ }}
>
{this.renderLinks(x.children, level + 1)}
-
+
)
}
else {
if (typeof x.link !== 'undefined') {
links.push(
- {
- this.showContent(x.link, x.text, x.window)
- }}
- >
-
- {x.text}
-
+
)
}
else {
links.push(
-
-
- {x.text}
-
+
)
}
}
@@ -115,84 +121,122 @@ class SideNav extends React.Component {
}
closeModal() {
- this.setState({ showContent: false })
- //this.props.toggleSideNav(false)
+ this.setState({ showContent: false, contentLink: "" })
}
showContent(link, title, window) {
-
- if(window === 'blank'){
+ if (window === 'blank') {
var win = open(link, '_blank');
win.focus();
}
- else{
+ else {
this.setState({ showContent: true, contentLink: link, contentTitle: title })
}
-
}
render() {
let { isOpen, data } = this.props
- let { width, height, showContent, contentLink, contentTitle } = this.state
+ let { width, showContent, contentLink, contentTitle } = this.state
- const sideNavWidth = 325
+ const sideNavWidth = width < 325 ? "100%" : 325
return (
<>
-
-
-
-
- {data.logoTop &&
-
- }
-
-
{data.title}
-
-
-
-
- {this.renderLinks(data.nav)}
-
-
+ this.props.toggleSideNav(false)}
+ visible={isOpen}
+ width={sideNavWidth}
+ bodyStyle={{ paddingLeft: 0, paddingRight: 0, overflowX: 'hidden' }}
+ >
+
+
+ {/* Header image */}
+
+ {data.logoTop &&
+
+ }
+
+
+
+
+
+
+ {/* Header text */}
+
+ {data.title}
+
+
+
-
- {data.logoBottom &&
-
+
+
+
+
+
+
+ {/* Links */}
+
+ {this.renderLinks(data.nav)}
+
+
+
+ this.props.toggleSideNav(false)}
+ color=""
+ style={{ backgroundColor: DEAGreen }}
+ >
+
+
+
+
+
+
+
+
+
+
+
+ {/* Footer image */}
+
+ {data.logoBottom &&
+
+ }
+
+
+
+
this.closeModal()}>
+
+ {contentTitle}
+
}
-
-
-
-
- this.closeModal()}
- style={{ width: (width - sideNavWidth - 20) + "px" }}
- size="fluid"
- fullHeight position="right"
- >
- this.closeModal()}>
- {contentTitle}
-
-
+ placement="left"
+ width={width < 1250 ? "100vw" : "80vw"}
+ closable={true}
+ onClose={() => this.closeModal()}
+ visible={showContent}
+ bodyStyle={{ padding: 1, overflowX: 'hidden' }}
+ >
-
-
+
+
>
)
}
diff --git a/NDAO_Client_React/app/js/config/serviceURLs.js b/NDAO_Client_React/app/js/config/serviceURLs.js
index 6d62d05..35be770 100644
--- a/NDAO_Client_React/app/js/config/serviceURLs.js
+++ b/NDAO_Client_React/app/js/config/serviceURLs.js
@@ -10,7 +10,7 @@ let _metadataServiceURL = ''
let _mapServerBaseURL = ''
if (CONSTANTS.DEV) {
- _apiBaseURL = 'http://app01.saeon.ac.za/ccistestapi/odata/' //'https://localhost:44301/odata/'
+ _apiBaseURL = 'https://localhost:44301/odata/'
_siteBaseURL = `${window.location.protocol}//${window.location.hostname}:${window.location.port}/`
_ccrdBaseURL = 'http://app01.saeon.ac.za/nccrdtestapi/odata/' //'http://localhost:62553/odata/'
_ccrdSiteBaseURL = 'http://app01.saeon.ac.za/nccrdtestsite/#/' //'http://localhost:8085/#/'
From c7c063c49645b574701cd940d43448b7a271ed39 Mon Sep 17 00:00:00 2001
From: andree1985 <30987911+andree1985@users.noreply.github.com>
Date: Wed, 27 Mar 2019 10:18:59 +0200
Subject: [PATCH 03/11] feat(side-nav): Re-designed SideNav
#66
---
NDAO_Client_React/app/js/components/navigation/SideNav.jsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/NDAO_Client_React/app/js/components/navigation/SideNav.jsx b/NDAO_Client_React/app/js/components/navigation/SideNav.jsx
index c04cac7..d0f4a57 100644
--- a/NDAO_Client_React/app/js/components/navigation/SideNav.jsx
+++ b/NDAO_Client_React/app/js/components/navigation/SideNav.jsx
@@ -230,7 +230,7 @@ class SideNav extends React.Component {
style={{
padding: 0,
width: "100%",
- height: "91vh",
+ height: "90vh",
border: "none",
}}
src={contentLink}
From 8a058505db72be00f18af4ee264d538f9b2cb7bc Mon Sep 17 00:00:00 2001
From: andree1985 <30987911+andree1985@users.noreply.github.com>
Date: Wed, 27 Mar 2019 15:52:28 +0200
Subject: [PATCH 04/11] feat:(NCCRD modal): Add close button
Add close button
#68
---
.../js/components/layout/HostedContentFrame.jsx | 14 ++++++++++----
NDAO_Client_React/app/js/config/serviceURLs.js | 2 +-
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/NDAO_Client_React/app/js/components/layout/HostedContentFrame.jsx b/NDAO_Client_React/app/js/components/layout/HostedContentFrame.jsx
index ac0da59..cb9938a 100644
--- a/NDAO_Client_React/app/js/components/layout/HostedContentFrame.jsx
+++ b/NDAO_Client_React/app/js/components/layout/HostedContentFrame.jsx
@@ -2,10 +2,11 @@
import React from 'react'
import * as globalFunctions from '../../globalFunctions'
-import { Col, Row, Container, Footer as MDBFooter, Modal, ModalBody, ModalHeader, ModalFooter, MDBBtn } from 'mdbreact'
+import { Modal, ModalBody, ModalHeader, ModalFooter } from 'mdbreact'
import loader from '../../../images/Other/loader.gif'
import { Button } from 'antd';
-import { object } from 'prop-types';
+import { DEAGreen } from '../../config/colours';
+
// Properties:
// - source : Component label
// - width : Width; Default - 100%
@@ -39,12 +40,12 @@ class HostedContentFrame extends React.Component {
source = globalFunctions.fixEmptyValue(source, "http://www.example.com")
width = globalFunctions.fixEmptyValue(width, "100%")
- height = globalFunctions.fixEmptyValue(height, "550px")
+ height = globalFunctions.fixEmptyValue(height, "73vh")
showSource = globalFunctions.fixEmptyValue(showSource, false)
return (
-
+
{title}
@@ -66,6 +67,11 @@ class HostedContentFrame extends React.Component {
source: {source}
+
+
+ Close
+
+
)
diff --git a/NDAO_Client_React/app/js/config/serviceURLs.js b/NDAO_Client_React/app/js/config/serviceURLs.js
index 35be770..6d62d05 100644
--- a/NDAO_Client_React/app/js/config/serviceURLs.js
+++ b/NDAO_Client_React/app/js/config/serviceURLs.js
@@ -10,7 +10,7 @@ let _metadataServiceURL = ''
let _mapServerBaseURL = ''
if (CONSTANTS.DEV) {
- _apiBaseURL = 'https://localhost:44301/odata/'
+ _apiBaseURL = 'http://app01.saeon.ac.za/ccistestapi/odata/' //'https://localhost:44301/odata/'
_siteBaseURL = `${window.location.protocol}//${window.location.hostname}:${window.location.port}/`
_ccrdBaseURL = 'http://app01.saeon.ac.za/nccrdtestapi/odata/' //'http://localhost:62553/odata/'
_ccrdSiteBaseURL = 'http://app01.saeon.ac.za/nccrdtestsite/#/' //'http://localhost:8085/#/'
From 40112b294303c3c69e62fad2c2188f605239b8e1 Mon Sep 17 00:00:00 2001
From: andree1985 <30987911+andree1985@users.noreply.github.com>
Date: Wed, 27 Mar 2019 16:06:08 +0200
Subject: [PATCH 05/11] feat(DAO questions): Remove object-type questions
- Remove object-type questions
#69
---
.../MonitoringEvaluation/Goal1Contrib.jsx | 35 +++----------------
.../MonitoringEvaluation/Goal2Contrib.jsx | 35 +++----------------
.../MonitoringEvaluation/Goal5Contrib.jsx | 35 +++----------------
.../MonitoringEvaluation/Goal6Contrib.jsx | 35 +++----------------
.../MonitoringEvaluation/Goal7Contrib.jsx | 35 +++----------------
.../MonitoringEvaluation/Goal8Contrib.jsx | 35 +++----------------
.../MonitoringEvaluation/Goal9Contrib.jsx | 35 +++----------------
7 files changed, 35 insertions(+), 210 deletions(-)
diff --git a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal1Contrib.jsx b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal1Contrib.jsx
index 174cec1..de067a0 100644
--- a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal1Contrib.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal1Contrib.jsx
@@ -64,7 +64,6 @@ const defaultState = {
metaAuthors: [],
metaDocTitle: "",
metaKeywords: [],
- metaDocFormat: "",
metaDocDescr: "",
metaAgreement: false,
metaUID: "",
@@ -141,7 +140,6 @@ class Goal1Contrib extends React.Component {
metaAuthors: data.Questions.filter(x => x.Key === "DocumentAuthors")[0].Value.split("||"),
metaDocTitle: data.Questions.filter(x => x.Key === "DocumentTitle")[0].Value,
metaKeywords: data.Questions.filter(x => x.Key === "DocumentKeywords")[0].Value.split("||"),
- metaDocFormat: data.Questions.filter(x => x.Key === "DocumentFormat")[0].Value,
metaDocDescr: data.Questions.filter(x => x.Key === "DocumentDescription")[0].Value,
metaAgreement: data.Questions.filter(x => x.Key === "DocumentAgreement")[0].Value === 'true',
metaUID: data.Questions.filter(x => x.Key === "MetaDataUID")[0].Value,
@@ -181,7 +179,7 @@ class Goal1Contrib extends React.Component {
validate() {
let {
- Q1_1, metaAuthors, metaDocTitle, metaKeywords, metaDocFormat, metaDocDescr, metaAgreement
+ Q1_1, metaAuthors, metaDocTitle, metaKeywords, metaDocDescr, metaAgreement
} = this.state
if(_gf.isEmptyValue(Q1_1)){
@@ -204,11 +202,6 @@ class Goal1Contrib extends React.Component {
return false
}
- if(_gf.isEmptyValue(metaDocFormat)){
- this.showMessage("Required", "Document format required - please select the type of document attached?")
- return false
- }
-
if(_gf.isEmptyValue(metaDocDescr)){
this.showMessage("Required", "Document description required - please provide a short abstract description of your document?")
return false
@@ -226,7 +219,7 @@ class Goal1Contrib extends React.Component {
let {
goalId, goalStatus, Q1_1, Q1_3, Q1_4, Q1_5, Q1_6, Q1_7, metaAuthors, metaDocTitle, metaKeywords,
- metaDocFormat, metaDocDescr, metaAgreement, attachmentDetails, metaRegion
+ metaDocDescr, metaAgreement, attachmentDetails, metaRegion
} = this.state
let { user } = this.props
@@ -248,7 +241,6 @@ class Goal1Contrib extends React.Component {
{ Key: "DocumentAuthors", Value: metaAuthors.join("||") },
{ Key: "DocumentTitle", Value: metaDocTitle },
{ Key: "DocumentKeywords", Value: metaKeywords.join("||") },
- { Key: "DocumentFormat", Value: metaDocFormat },
{ Key: "DocumentDescription", Value: metaDocDescr },
{ Key: "DocumentAgreement", Value: metaAgreement.toString() },
{ Key: "MetaDataUID", Value: metaUID }
@@ -286,7 +278,7 @@ class Goal1Contrib extends React.Component {
let {
goalId, Q1_1, Q1_4, metaAuthors, metaDocTitle, metaKeywords,
- metaDocFormat, metaDocDescr, attachmentDetails, metaUID, metaRegion
+ metaDocDescr, attachmentDetails, metaUID, metaRegion
} = this.state
//Get Creators
@@ -350,7 +342,7 @@ class Goal1Contrib extends React.Component {
}
],
resourceType: {
- resourceTypeGeneral: metaDocFormat, //Selected ducument format, eg. Text
+ resourceTypeGeneral: 'Dataset', //Selected ducument format, eg. Text
resourceType: resourceType.toUpperCase() //file extension, eg. PDF
},
formats: [
@@ -542,7 +534,7 @@ class Goal1Contrib extends React.Component {
let {
editing, goalId, goalStatus, showNCCRD, Q1_1, Q1_3, Q1_4, Q1_5, Q1_6, Q1_7,
metaAddAuthorModal, metaAuthors, tmpMetaAuthorName, tmpMetaAuthorEmail,
- tmpMetaAuthorInstitution, metaDocTitle, metaKeywords, metaDocFormat, metaDocDescr, metaAgreement
+ tmpMetaAuthorInstitution, metaDocTitle, metaKeywords, metaDocDescr, metaAgreement
} = this.state
let { user } = this.props
@@ -746,23 +738,6 @@ class Goal1Contrib extends React.Component {
-
-
-
- Please select the type of object you are uploading:
- *
-
- ({ id: item, text: item })}
- value={metaDocFormat}
- placeHolder={"Unspecified"}
- callback={(value) => { this.setState({ metaDocFormat: value.text }) }}
- />
-
-
-
-
diff --git a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal2Contrib.jsx b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal2Contrib.jsx
index a64619e..7d2c4f3 100644
--- a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal2Contrib.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal2Contrib.jsx
@@ -72,7 +72,6 @@ const defaultState = {
metaAuthors: [],
metaDocTitle: "",
metaKeywords: [],
- metaDocFormat: "",
metaDocDescr: "",
metaAgreement: false,
metaUID: "",
@@ -203,7 +202,6 @@ class Goal2Contrib extends React.Component {
metaAuthors: data.Questions.filter(x => x.Key === "DocumentAuthors")[0].Value.split("||"),
metaDocTitle: data.Questions.filter(x => x.Key === "DocumentTitle")[0].Value,
metaKeywords: data.Questions.filter(x => x.Key === "DocumentKeywords")[0].Value.split("||"),
- metaDocFormat: data.Questions.filter(x => x.Key === "DocumentFormat")[0].Value,
metaDocDescr: data.Questions.filter(x => x.Key === "DocumentDescription")[0].Value,
metaAgreement: data.Questions.filter(x => x.Key === "DocumentAgreement")[0].Value === 'true',
metaUID: data.Questions.filter(x => x.Key === "MetaDataUID")[0].Value,
@@ -259,7 +257,7 @@ class Goal2Contrib extends React.Component {
validate() {
- let { Q2_1, Q2_1_A, metaAuthors, metaDocTitle, metaKeywords, metaDocFormat, metaDocDescr, metaAgreement } = this.state
+ let { Q2_1, Q2_1_A, metaAuthors, metaDocTitle, metaKeywords, metaDocDescr, metaAgreement } = this.state
if (Q2_1 === true) {
@@ -283,11 +281,6 @@ class Goal2Contrib extends React.Component {
return false
}
- if (_gf.isEmptyValue(metaDocFormat)) {
- this.showMessage("Required", "Document format required - please select the type of document attached?")
- return false
- }
-
if (_gf.isEmptyValue(metaDocDescr)) {
this.showMessage("Required", "Document description required - please provide a short abstract description of your document?")
return false
@@ -307,7 +300,7 @@ class Goal2Contrib extends React.Component {
let {
goalId, goalStatus, Q2_1, Q2_1_A, Q2_2, Q2_2_A, Q2_2_B, Q2_2_C, Q2_2_D, Q2_3, Q2_4, Q2_5, Q2_6,
- metaAuthors, metaDocTitle, metaKeywords, metaDocFormat, metaDocDescr, metaAgreement,
+ metaAuthors, metaDocTitle, metaKeywords, metaDocDescr, metaAgreement,
attachmentDetails, metaRegion
} = this.state
let { user } = this.props
@@ -333,7 +326,6 @@ class Goal2Contrib extends React.Component {
{ Key: "DocumentAuthors", Value: metaAuthors.join("||") },
{ Key: "DocumentTitle", Value: metaDocTitle },
{ Key: "DocumentKeywords", Value: metaKeywords.join("||") },
- { Key: "DocumentFormat", Value: metaDocFormat },
{ Key: "DocumentDescription", Value: metaDocDescr },
{ Key: "DocumentAgreement", Value: metaAgreement.toString() },
{ Key: "DocumentDetails", Value: JSON.stringify(attachmentDetails) }, //file details as JSON string
@@ -373,7 +365,7 @@ class Goal2Contrib extends React.Component {
let {
goalId, Q2_1_A, metaAuthors, metaDocTitle, metaKeywords,
- metaDocFormat, metaDocDescr, attachmentDetails, metaUID, metaRegion
+ metaDocDescr, attachmentDetails, metaUID, metaRegion
} = this.state
//Get Creators
@@ -437,7 +429,7 @@ class Goal2Contrib extends React.Component {
}
],
resourceType: {
- resourceTypeGeneral: metaDocFormat, //Selected ducument format, eg. Text
+ resourceTypeGeneral: 'Dataset', //Selected ducument format, eg. Text
resourceType: resourceType.toUpperCase() //file extension, eg. PDF
},
formats: [
@@ -536,7 +528,7 @@ class Goal2Contrib extends React.Component {
let {
editing, Q2_1, Q2_1_A, Q2_2, Q2_2_A, Q2_2_B, Q2_2_C, Q2_2_D, Q2_3, Q2_4, Q2_5, Q2_6, goalStatus, goalId,
metaAddAuthorModal, metaAuthors, tmpMetaAuthorName, tmpMetaAuthorEmail,
- tmpMetaAuthorInstitution, metaDocTitle, metaKeywords, metaDocFormat, metaDocDescr, metaAgreement
+ tmpMetaAuthorInstitution, metaDocTitle, metaKeywords, metaDocDescr, metaAgreement
} = this.state
return (
@@ -770,23 +762,6 @@ class Goal2Contrib extends React.Component {
-
-
-
- Please select the type of object you are uploading:
- *
-
- ({ id: item, text: item })}
- value={metaDocFormat}
- placeHolder={"Unspecified"}
- callback={(value) => { this.setState({ metaDocFormat: value.text }) }}
- />
-
-
-
-
diff --git a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal5Contrib.jsx b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal5Contrib.jsx
index 5b7d8e4..7f61db1 100644
--- a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal5Contrib.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal5Contrib.jsx
@@ -67,7 +67,6 @@ const defaultState = {
metaAuthors: [],
metaDocTitle: "",
metaKeywords: [],
- metaDocFormat: "",
metaDocDescr: "",
metaAgreement: false,
metaUID: "",
@@ -182,7 +181,6 @@ class Goal5Contrib extends React.Component {
metaAuthors: data.Questions.filter(x => x.Key === "DocumentAuthors")[0].Value.split("||"),
metaDocTitle: data.Questions.filter(x => x.Key === "DocumentTitle")[0].Value,
metaKeywords: data.Questions.filter(x => x.Key === "DocumentKeywords")[0].Value.split("||"),
- metaDocFormat: data.Questions.filter(x => x.Key === "DocumentFormat")[0].Value,
metaDocDescr: data.Questions.filter(x => x.Key === "DocumentDescription")[0].Value,
metaAgreement: data.Questions.filter(x => x.Key === "DocumentAgreement")[0].Value === 'true',
metaUID: data.Questions.filter(x => x.Key === "MetaDataUID")[0].Value,
@@ -239,7 +237,7 @@ class Goal5Contrib extends React.Component {
validate() {
- let { Q5_2, metaAuthors, metaDocTitle, metaKeywords, metaDocFormat, metaDocDescr, metaAgreement } = this.state
+ let { Q5_2, metaAuthors, metaDocTitle, metaKeywords, metaDocDescr, metaAgreement } = this.state
if (!_gf.isEmptyValue(Q5_2)) {
@@ -258,11 +256,6 @@ class Goal5Contrib extends React.Component {
return false
}
- if (_gf.isEmptyValue(metaDocFormat)) {
- this.showMessage("Required", "Document format required - please select the type of document attached?")
- return false
- }
-
if (_gf.isEmptyValue(metaDocDescr)) {
this.showMessage("Required", "Document description required - please provide a short abstract description of your document?")
return false
@@ -282,7 +275,7 @@ class Goal5Contrib extends React.Component {
let {
goalId, goalStatus, Q5_1, Q5_2, Q5_3, Q5_3_A, Q5_3_B, Q5_3_C, Q5_3_D, Q5_4, Q5_5, Q5_6,
- metaAuthors, metaDocTitle, metaKeywords, metaDocFormat, metaDocDescr, metaAgreement,
+ metaAuthors, metaDocTitle, metaKeywords, metaDocDescr, metaAgreement,
attachmentDetails, metaRegion
} = this.state
let { user } = this.props
@@ -307,7 +300,6 @@ class Goal5Contrib extends React.Component {
{ Key: "DocumentAuthors", Value: metaAuthors.join("||") },
{ Key: "DocumentTitle", Value: metaDocTitle },
{ Key: "DocumentKeywords", Value: metaKeywords.join("||") },
- { Key: "DocumentFormat", Value: metaDocFormat },
{ Key: "DocumentDescription", Value: metaDocDescr },
{ Key: "DocumentAgreement", Value: metaAgreement.toString() },
{ Key: "DocumentDetails", Value: JSON.stringify(attachmentDetails) }, //file details as JSON string
@@ -347,7 +339,7 @@ class Goal5Contrib extends React.Component {
let {
goalId, Q5_2, metaAuthors, metaDocTitle, metaKeywords,
- metaDocFormat, metaDocDescr, attachmentDetails, metaUID, metaRegion
+ metaDocDescr, attachmentDetails, metaUID, metaRegion
} = this.state
//Get Creators
@@ -411,7 +403,7 @@ class Goal5Contrib extends React.Component {
}
],
resourceType: {
- resourceTypeGeneral: metaDocFormat, //Selected ducument format, eg. Text
+ resourceTypeGeneral: 'Dataset', //Selected ducument format, eg. Text
resourceType: resourceType.toUpperCase() //file extension, eg. PDF
},
formats: [
@@ -510,7 +502,7 @@ class Goal5Contrib extends React.Component {
let {
editing, goalStatus, goalId, Q5_1, Q5_2, Q5_3, Q5_3_A, Q5_3_B, Q5_3_C, Q5_3_D, Q5_4, Q5_5, Q5_6,
metaAddAuthorModal, metaAuthors, tmpMetaAuthorName, tmpMetaAuthorEmail,
- tmpMetaAuthorInstitution, metaDocTitle, metaKeywords, metaDocFormat, metaDocDescr, metaAgreement
+ tmpMetaAuthorInstitution, metaDocTitle, metaKeywords, metaDocDescr, metaAgreement
} = this.state
return (
@@ -736,23 +728,6 @@ class Goal5Contrib extends React.Component {
-
-
-
- Please select the type of object you are uploading:
- *
-
- ({ id: item, text: item })}
- value={metaDocFormat}
- placeHolder={"Unspecified"}
- callback={(value) => { this.setState({ metaDocFormat: value.text }) }}
- />
-
-
-
-
diff --git a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal6Contrib.jsx b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal6Contrib.jsx
index 6d2feef..23e63ce 100644
--- a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal6Contrib.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal6Contrib.jsx
@@ -58,7 +58,6 @@ const defaultState = {
metaAuthors: [],
metaDocTitle: "",
metaKeywords: [],
- metaDocFormat: "",
metaDocDescr: "",
metaAgreement: false,
metaUID: "",
@@ -168,7 +167,6 @@ class Goal6Contrib extends React.Component {
metaAuthors: data.Questions.filter(x => x.Key === "DocumentAuthors")[0].Value.split("||"),
metaDocTitle: data.Questions.filter(x => x.Key === "DocumentTitle")[0].Value,
metaKeywords: data.Questions.filter(x => x.Key === "DocumentKeywords")[0].Value.split("||"),
- metaDocFormat: data.Questions.filter(x => x.Key === "DocumentFormat")[0].Value,
metaDocDescr: data.Questions.filter(x => x.Key === "DocumentDescription")[0].Value,
metaAgreement: data.Questions.filter(x => x.Key === "DocumentAgreement")[0].Value === 'true',
metaUID: data.Questions.filter(x => x.Key === "MetaDataUID")[0].Value,
@@ -225,7 +223,7 @@ class Goal6Contrib extends React.Component {
validate() {
- let { Q6_2, metaAuthors, metaDocTitle, metaKeywords, metaDocFormat, metaDocDescr, metaAgreement } = this.state
+ let { Q6_2, metaAuthors, metaDocTitle, metaKeywords, metaDocDescr, metaAgreement } = this.state
if (!_gf.isEmptyValue(Q6_2)) {
@@ -244,11 +242,6 @@ class Goal6Contrib extends React.Component {
return false
}
- if (_gf.isEmptyValue(metaDocFormat)) {
- this.showMessage("Required", "Document format required - please select the type of document attached?")
- return false
- }
-
if (_gf.isEmptyValue(metaDocDescr)) {
this.showMessage("Required", "Document description required - please provide a short abstract description of your document?")
return false
@@ -268,7 +261,7 @@ class Goal6Contrib extends React.Component {
let {
goalId, goalStatus, Q6_1, Q6_2, Q6_3, Q6_4, Q6_5,
- metaAuthors, metaDocTitle, metaKeywords, metaDocFormat, metaDocDescr, metaAgreement,
+ metaAuthors, metaDocTitle, metaKeywords, metaDocDescr, metaAgreement,
attachmentDetails, metaRegion
} = this.state
let { user } = this.props
@@ -288,7 +281,6 @@ class Goal6Contrib extends React.Component {
{ Key: "DocumentAuthors", Value: metaAuthors.join("||") },
{ Key: "DocumentTitle", Value: metaDocTitle },
{ Key: "DocumentKeywords", Value: metaKeywords.join("||") },
- { Key: "DocumentFormat", Value: metaDocFormat },
{ Key: "DocumentDescription", Value: metaDocDescr },
{ Key: "DocumentAgreement", Value: metaAgreement.toString() },
{ Key: "DocumentDetails", Value: JSON.stringify(attachmentDetails) }, //file details as JSON string
@@ -328,7 +320,7 @@ class Goal6Contrib extends React.Component {
let {
goalId, Q6_2, metaAuthors, metaDocTitle, metaKeywords,
- metaDocFormat, metaDocDescr, attachmentDetails, metaUID, metaRegion
+ metaDocDescr, attachmentDetails, metaUID, metaRegion
} = this.state
//Get Creators
@@ -392,7 +384,7 @@ class Goal6Contrib extends React.Component {
}
],
resourceType: {
- resourceTypeGeneral: metaDocFormat, //Selected ducument format, eg. Text
+ resourceTypeGeneral: 'Dataset', //Selected ducument format, eg. Text
resourceType: resourceType.toUpperCase() //file extension, eg. PDF
},
formats: [
@@ -491,7 +483,7 @@ class Goal6Contrib extends React.Component {
let {
editing, goalStatus, goalId, Q6_1, Q6_2, Q6_3, Q6_4, Q6_5,
metaAddAuthorModal, metaAuthors, tmpMetaAuthorName, tmpMetaAuthorEmail,
- tmpMetaAuthorInstitution, metaDocTitle, metaKeywords, metaDocFormat, metaDocDescr, metaAgreement
+ tmpMetaAuthorInstitution, metaDocTitle, metaKeywords, metaDocDescr, metaAgreement
} = this.state
return (
@@ -699,23 +691,6 @@ class Goal6Contrib extends React.Component {
-
-
-
- Please select the type of object you are uploading:
- *
-
- ({ id: item, text: item })}
- value={metaDocFormat}
- placeHolder={"Unspecified"}
- callback={(value) => { this.setState({ metaDocFormat: value.text }) }}
- />
-
-
-
-
diff --git a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal7Contrib.jsx b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal7Contrib.jsx
index 5afd78e..f0a9fc6 100644
--- a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal7Contrib.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal7Contrib.jsx
@@ -58,7 +58,6 @@ const defaultState = {
metaAuthors: [],
metaDocTitle: "",
metaKeywords: [],
- metaDocFormat: "",
metaDocDescr: "",
metaAgreement: false,
metaUID: "",
@@ -168,7 +167,6 @@ class Goal7Contrib extends React.Component {
metaAuthors: data.Questions.filter(x => x.Key === "DocumentAuthors")[0].Value.split("||"),
metaDocTitle: data.Questions.filter(x => x.Key === "DocumentTitle")[0].Value,
metaKeywords: data.Questions.filter(x => x.Key === "DocumentKeywords")[0].Value.split("||"),
- metaDocFormat: data.Questions.filter(x => x.Key === "DocumentFormat")[0].Value,
metaDocDescr: data.Questions.filter(x => x.Key === "DocumentDescription")[0].Value,
metaAgreement: data.Questions.filter(x => x.Key === "DocumentAgreement")[0].Value === 'true',
metaUID: data.Questions.filter(x => x.Key === "MetaDataUID")[0].Value,
@@ -225,7 +223,7 @@ class Goal7Contrib extends React.Component {
validate() {
- let { Q7_2, metaAuthors, metaDocTitle, metaKeywords, metaDocFormat, metaDocDescr, metaAgreement } = this.state
+ let { Q7_2, metaAuthors, metaDocTitle, metaKeywords, metaDocDescr, metaAgreement } = this.state
if (!_gf.isEmptyValue(Q7_2)) {
@@ -244,11 +242,6 @@ class Goal7Contrib extends React.Component {
return false
}
- if (_gf.isEmptyValue(metaDocFormat)) {
- this.showMessage("Required", "Document format required - please select the type of document attached?")
- return false
- }
-
if (_gf.isEmptyValue(metaDocDescr)) {
this.showMessage("Required", "Document description required - please provide a short abstract description of your document?")
return false
@@ -268,7 +261,7 @@ class Goal7Contrib extends React.Component {
let {
goalId, goalStatus, Q7_1, Q7_2, Q7_3, Q7_4, Q7_5,
- metaAuthors, metaDocTitle, metaKeywords, metaDocFormat, metaDocDescr, metaAgreement,
+ metaAuthors, metaDocTitle, metaKeywords, metaDocDescr, metaAgreement,
attachmentDetails, metaRegion
} = this.state
let { user } = this.props
@@ -288,7 +281,6 @@ class Goal7Contrib extends React.Component {
{ Key: "DocumentAuthors", Value: metaAuthors.join("||") },
{ Key: "DocumentTitle", Value: metaDocTitle },
{ Key: "DocumentKeywords", Value: metaKeywords.join("||") },
- { Key: "DocumentFormat", Value: metaDocFormat },
{ Key: "DocumentDescription", Value: metaDocDescr },
{ Key: "DocumentAgreement", Value: metaAgreement.toString() },
{ Key: "DocumentDetails", Value: JSON.stringify(attachmentDetails) }, //file details as JSON string
@@ -328,7 +320,7 @@ class Goal7Contrib extends React.Component {
let {
goalId, Q7_2, metaAuthors, metaDocTitle, metaKeywords,
- metaDocFormat, metaDocDescr, attachmentDetails, metaUID, metaRegion
+ metaDocDescr, attachmentDetails, metaUID, metaRegion
} = this.state
//Get Creators
@@ -392,7 +384,7 @@ class Goal7Contrib extends React.Component {
}
],
resourceType: {
- resourceTypeGeneral: metaDocFormat, //Selected ducument format, eg. Text
+ resourceTypeGeneral: 'Dataset', //Selected ducument format, eg. Text
resourceType: resourceType.toUpperCase() //file extension, eg. PDF
},
formats: [
@@ -491,7 +483,7 @@ class Goal7Contrib extends React.Component {
let {
editing, goalStatus, goalId, Q7_1, Q7_2, Q7_3, Q7_4, Q7_5,
metaAddAuthorModal, metaAuthors, tmpMetaAuthorName, tmpMetaAuthorEmail,
- tmpMetaAuthorInstitution, metaDocTitle, metaKeywords, metaDocFormat, metaDocDescr, metaAgreement
+ tmpMetaAuthorInstitution, metaDocTitle, metaKeywords, metaDocDescr, metaAgreement
} = this.state
return (
@@ -704,23 +696,6 @@ class Goal7Contrib extends React.Component {
-
-
-
- Please select the type of object you are uploading:
- *
-
- ({ id: item, text: item })}
- value={metaDocFormat}
- placeHolder={"Unspecified"}
- callback={(value) => { this.setState({ metaDocFormat: value.text }) }}
- />
-
-
-
-
diff --git a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal8Contrib.jsx b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal8Contrib.jsx
index 04e58a6..3ec0677 100644
--- a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal8Contrib.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal8Contrib.jsx
@@ -58,7 +58,6 @@ const defaultState = {
metaAuthors: [],
metaDocTitle: "",
metaKeywords: [],
- metaDocFormat: "",
metaDocDescr: "",
metaAgreement: false,
metaUID: "",
@@ -168,7 +167,6 @@ class Goal8Contrib extends React.Component {
metaAuthors: data.Questions.filter(x => x.Key === "DocumentAuthors")[0].Value.split("||"),
metaDocTitle: data.Questions.filter(x => x.Key === "DocumentTitle")[0].Value,
metaKeywords: data.Questions.filter(x => x.Key === "DocumentKeywords")[0].Value.split("||"),
- metaDocFormat: data.Questions.filter(x => x.Key === "DocumentFormat")[0].Value,
metaDocDescr: data.Questions.filter(x => x.Key === "DocumentDescription")[0].Value,
metaAgreement: data.Questions.filter(x => x.Key === "DocumentAgreement")[0].Value === 'true',
metaUID: data.Questions.filter(x => x.Key === "MetaDataUID")[0].Value,
@@ -225,7 +223,7 @@ class Goal8Contrib extends React.Component {
validate() {
- let { Q8_2, metaAuthors, metaDocTitle, metaKeywords, metaDocFormat, metaDocDescr, metaAgreement } = this.state
+ let { Q8_2, metaAuthors, metaDocTitle, metaKeywords, metaDocDescr, metaAgreement } = this.state
if (!_gf.isEmptyValue(Q8_2)) {
@@ -244,11 +242,6 @@ class Goal8Contrib extends React.Component {
return false
}
- if (_gf.isEmptyValue(metaDocFormat)) {
- this.showMessage("Required", "Document format required - please select the type of document attached?")
- return false
- }
-
if (_gf.isEmptyValue(metaDocDescr)) {
this.showMessage("Required", "Document description required - please provide a short abstract description of your document?")
return false
@@ -268,7 +261,7 @@ class Goal8Contrib extends React.Component {
let {
goalId, goalStatus, Q8_1, Q8_2, Q8_3, Q8_4, Q8_5,
- metaAuthors, metaDocTitle, metaKeywords, metaDocFormat, metaDocDescr, metaAgreement,
+ metaAuthors, metaDocTitle, metaKeywords, metaDocDescr, metaAgreement,
attachmentDetails, metaRegion
} = this.state
let { user } = this.props
@@ -288,7 +281,6 @@ class Goal8Contrib extends React.Component {
{ Key: "DocumentAuthors", Value: metaAuthors.join("||") },
{ Key: "DocumentTitle", Value: metaDocTitle },
{ Key: "DocumentKeywords", Value: metaKeywords.join("||") },
- { Key: "DocumentFormat", Value: metaDocFormat },
{ Key: "DocumentDescription", Value: metaDocDescr },
{ Key: "DocumentAgreement", Value: metaAgreement.toString() },
{ Key: "DocumentDetails", Value: JSON.stringify(attachmentDetails) }, //file details as JSON string
@@ -328,7 +320,7 @@ class Goal8Contrib extends React.Component {
let {
goalId, Q8_2, metaAuthors, metaDocTitle, metaKeywords,
- metaDocFormat, metaDocDescr, attachmentDetails, metaUID, metaRegion
+ metaDocDescr, attachmentDetails, metaUID, metaRegion
} = this.state
//Get Creators
@@ -392,7 +384,7 @@ class Goal8Contrib extends React.Component {
}
],
resourceType: {
- resourceTypeGeneral: metaDocFormat, //Selected ducument format, eg. Text
+ resourceTypeGeneral: 'Dataset', //Selected ducument format, eg. Text
resourceType: resourceType.toUpperCase() //file extension, eg. PDF
},
formats: [
@@ -491,7 +483,7 @@ class Goal8Contrib extends React.Component {
let {
editing, goalStatus, goalId, Q8_1, Q8_2, Q8_3, Q8_4, Q8_5,
metaAddAuthorModal, metaAuthors, tmpMetaAuthorName, tmpMetaAuthorEmail,
- tmpMetaAuthorInstitution, metaDocTitle, metaKeywords, metaDocFormat, metaDocDescr, metaAgreement
+ tmpMetaAuthorInstitution, metaDocTitle, metaKeywords, metaDocDescr, metaAgreement
} = this.state
return (
@@ -710,23 +702,6 @@ class Goal8Contrib extends React.Component {
-
-
-
- Please select the type of object you are uploading:
- *
-
- ({ id: item, text: item })}
- value={metaDocFormat}
- placeHolder={"Unspecified"}
- callback={(value) => { this.setState({ metaDocFormat: value.text }) }}
- />
-
-
-
-
diff --git a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal9Contrib.jsx b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal9Contrib.jsx
index aa050a4..991ba12 100644
--- a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal9Contrib.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal9Contrib.jsx
@@ -58,7 +58,6 @@ const defaultState = {
metaAuthors: [],
metaDocTitle: "",
metaKeywords: [],
- metaDocFormat: "",
metaDocDescr: "",
metaAgreement: false,
metaUID: "",
@@ -168,7 +167,6 @@ class Goal9Contrib extends React.Component {
metaAuthors: data.Questions.filter(x => x.Key === "DocumentAuthors")[0].Value.split("||"),
metaDocTitle: data.Questions.filter(x => x.Key === "DocumentTitle")[0].Value,
metaKeywords: data.Questions.filter(x => x.Key === "DocumentKeywords")[0].Value.split("||"),
- metaDocFormat: data.Questions.filter(x => x.Key === "DocumentFormat")[0].Value,
metaDocDescr: data.Questions.filter(x => x.Key === "DocumentDescription")[0].Value,
metaAgreement: data.Questions.filter(x => x.Key === "DocumentAgreement")[0].Value === 'true',
metaUID: data.Questions.filter(x => x.Key === "MetaDataUID")[0].Value,
@@ -225,7 +223,7 @@ class Goal9Contrib extends React.Component {
validate() {
- let { Q9_2, metaAuthors, metaDocTitle, metaKeywords, metaDocFormat, metaDocDescr, metaAgreement } = this.state
+ let { Q9_2, metaAuthors, metaDocTitle, metaKeywords, metaDocDescr, metaAgreement } = this.state
if (!_gf.isEmptyValue(Q9_2)) {
@@ -244,11 +242,6 @@ class Goal9Contrib extends React.Component {
return false
}
- if (_gf.isEmptyValue(metaDocFormat)) {
- this.showMessage("Required", "Document format required - please select the type of document attached?")
- return false
- }
-
if (_gf.isEmptyValue(metaDocDescr)) {
this.showMessage("Required", "Document description required - please provide a short abstract description of your document?")
return false
@@ -268,7 +261,7 @@ class Goal9Contrib extends React.Component {
let {
goalId, goalStatus, Q9_1, Q9_2, Q9_3, Q9_4, Q9_5,
- metaAuthors, metaDocTitle, metaKeywords, metaDocFormat, metaDocDescr, metaAgreement,
+ metaAuthors, metaDocTitle, metaKeywords, metaDocDescr, metaAgreement,
attachmentDetails, metaRegion
} = this.state
let { user } = this.props
@@ -288,7 +281,6 @@ class Goal9Contrib extends React.Component {
{ Key: "DocumentAuthors", Value: metaAuthors.join("||") },
{ Key: "DocumentTitle", Value: metaDocTitle },
{ Key: "DocumentKeywords", Value: metaKeywords.join("||") },
- { Key: "DocumentFormat", Value: metaDocFormat },
{ Key: "DocumentDescription", Value: metaDocDescr },
{ Key: "DocumentAgreement", Value: metaAgreement.toString() },
{ Key: "DocumentDetails", Value: JSON.stringify(attachmentDetails) }, //file details as JSON string
@@ -328,7 +320,7 @@ class Goal9Contrib extends React.Component {
let {
goalId, Q9_2, metaAuthors, metaDocTitle, metaKeywords,
- metaDocFormat, metaDocDescr, attachmentDetails, metaUID, metaRegion
+ metaDocDescr, attachmentDetails, metaUID, metaRegion
} = this.state
//Get Creators
@@ -392,7 +384,7 @@ class Goal9Contrib extends React.Component {
}
],
resourceType: {
- resourceTypeGeneral: metaDocFormat, //Selected ducument format, eg. Text
+ resourceTypeGeneral: 'Dataset', //Selected ducument format, eg. Text
resourceType: resourceType.toUpperCase() //file extension, eg. PDF
},
formats: [
@@ -491,7 +483,7 @@ class Goal9Contrib extends React.Component {
let {
editing, goalStatus, goalId, Q9_1, Q9_2, Q9_3, Q9_4, Q9_5,
metaAddAuthorModal, metaAuthors, tmpMetaAuthorName, tmpMetaAuthorEmail,
- tmpMetaAuthorInstitution, metaDocTitle, metaKeywords, metaDocFormat, metaDocDescr, metaAgreement
+ tmpMetaAuthorInstitution, metaDocTitle, metaKeywords, metaDocDescr, metaAgreement
} = this.state
return (
@@ -700,23 +692,6 @@ class Goal9Contrib extends React.Component {
-
-
-
- Please select the type of object you are uploading:
- *
-
- ({ id: item, text: item })}
- value={metaDocFormat}
- placeHolder={"Unspecified"}
- callback={(value) => { this.setState({ metaDocFormat: value.text }) }}
- />
-
-
-
-
From 5f0322c1c08483e653cc8ce0fbff50e1b8c74d72 Mon Sep 17 00:00:00 2001
From: andree1985 <30987911+andree1985@users.noreply.github.com>
Date: Fri, 29 Mar 2019 11:31:57 +0200
Subject: [PATCH 06/11] fix(DAOs): Hide unused input field
Hide "attachemnt URL" text filed.
This field is not need and confused users.
Fixes #70
---
.../pages/Adaptation/MonitoringEvaluation/Goal1Contrib.jsx | 4 ++--
.../pages/Adaptation/MonitoringEvaluation/Goal2Contrib.jsx | 4 ++--
.../pages/Adaptation/MonitoringEvaluation/Goal5Contrib.jsx | 4 ++--
.../pages/Adaptation/MonitoringEvaluation/Goal6Contrib.jsx | 4 ++--
.../pages/Adaptation/MonitoringEvaluation/Goal7Contrib.jsx | 4 ++--
.../pages/Adaptation/MonitoringEvaluation/Goal8Contrib.jsx | 4 ++--
.../pages/Adaptation/MonitoringEvaluation/Goal9Contrib.jsx | 4 ++--
7 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal1Contrib.jsx b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal1Contrib.jsx
index de067a0..5430f0c 100644
--- a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal1Contrib.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal1Contrib.jsx
@@ -645,7 +645,7 @@ class Goal1Contrib extends React.Component {
1.1 Attach your document (see above description):
*
- {
@@ -653,7 +653,7 @@ class Goal1Contrib extends React.Component {
this.setState({ Q1_1: value })
}}
readOnly={true}
- />
+ /> */}
diff --git a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal2Contrib.jsx b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal2Contrib.jsx
index 7d2c4f3..4a9aa45 100644
--- a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal2Contrib.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal2Contrib.jsx
@@ -669,7 +669,7 @@ class Goal2Contrib extends React.Component {
Download Organogram Template
- {
@@ -677,7 +677,7 @@ class Goal2Contrib extends React.Component {
this.setState({ Q2_1_A: value })
}}
readOnly={true}
- />
+ /> */}
diff --git a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal5Contrib.jsx b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal5Contrib.jsx
index 7f61db1..0dc9806 100644
--- a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal5Contrib.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal5Contrib.jsx
@@ -632,7 +632,7 @@ class Goal5Contrib extends React.Component {
5.2 Add attachments to any evidence:
- {
@@ -640,7 +640,7 @@ class Goal5Contrib extends React.Component {
this.setState({ Q5_2: value })
}}
readOnly={true}
- />
+ /> */}
diff --git a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal6Contrib.jsx b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal6Contrib.jsx
index 23e63ce..76ae207 100644
--- a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal6Contrib.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal6Contrib.jsx
@@ -595,7 +595,7 @@ class Goal6Contrib extends React.Component {
6.2 Add attachments to any evidence:
- {
@@ -603,7 +603,7 @@ class Goal6Contrib extends React.Component {
this.setState({ Q6_2: value })
}}
readOnly={true}
- />
+ /> */}
diff --git a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal7Contrib.jsx b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal7Contrib.jsx
index f0a9fc6..b94778a 100644
--- a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal7Contrib.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal7Contrib.jsx
@@ -600,7 +600,7 @@ class Goal7Contrib extends React.Component {
7.2 Add attachments to any evidence:
- {
@@ -608,7 +608,7 @@ class Goal7Contrib extends React.Component {
this.setState({ Q7_2: value })
}}
readOnly={true}
- />
+ /> */}
diff --git a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal8Contrib.jsx b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal8Contrib.jsx
index 3ec0677..08b7daa 100644
--- a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal8Contrib.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal8Contrib.jsx
@@ -606,7 +606,7 @@ class Goal8Contrib extends React.Component {
8.2 Add an attachments to any evidence:
- {
@@ -614,7 +614,7 @@ class Goal8Contrib extends React.Component {
this.setState({ Q8_2: value })
}}
readOnly={true}
- />
+ /> */}
diff --git a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal9Contrib.jsx b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal9Contrib.jsx
index 991ba12..b92b893 100644
--- a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal9Contrib.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal9Contrib.jsx
@@ -596,7 +596,7 @@ class Goal9Contrib extends React.Component {
9.2 Add attachments to any evidence:
- {
@@ -604,7 +604,7 @@ class Goal9Contrib extends React.Component {
this.setState({ Q9_2: value })
}}
readOnly={true}
- />
+ /> */}
From 5cff743c38224611432693db7c20b675d0e4155e Mon Sep 17 00:00:00 2001
From: andree1985 <30987911+andree1985@users.noreply.github.com>
Date: Sat, 30 Mar 2019 10:40:08 +0200
Subject: [PATCH 07/11] feat(content): Remove NCCIS related content
#71
---
.../app/js/components/navigation/Navbar.jsx | 16 +++++-----
.../app/js/components/navigation/SideNav.jsx | 6 ++--
.../app/js/components/pages/Home/Home.jsx | 31 +++++++------------
.../app/js/config/serviceURLs.js | 10 +++---
4 files changed, 26 insertions(+), 37 deletions(-)
diff --git a/NDAO_Client_React/app/js/components/navigation/Navbar.jsx b/NDAO_Client_React/app/js/components/navigation/Navbar.jsx
index 123e82a..cf354cb 100644
--- a/NDAO_Client_React/app/js/components/navigation/Navbar.jsx
+++ b/NDAO_Client_React/app/js/components/navigation/Navbar.jsx
@@ -13,8 +13,6 @@ import NWIS from '../pages/Tools/NWIS.jsx';
import SARVA from '../pages/Tools/SARVA.jsx';
import { data as NavData } from '../../../data/sideNavData'
-const _gf = require('../../globalFunctions')
-
const mapStateToProps = (state, props) => {
let user = state.oidc.user
let { general: { showSideNav } } = state
@@ -143,17 +141,17 @@ class Navbar extends React.Component {
{/* Tools */}
-
+ {/*
Tools
{ window.open("https://south-africa-platform.vizzuality.com/ ", "_blank") }}>
Biennial Update Report (BUR)
- { window.open("https://www.dwa.gov.za/Hydrology/Weekly/Province.aspx", "_blank") /*this.setState({ showDASL: true })*/ }}>
+ { window.open("https://www.dwa.gov.za/Hydrology/Weekly/Province.aspx", "_blank") }}>
Dam And Stream Levels
- { window.open("http://www.letsrespondtoolkit.org/", "_blank") /*this.setState({ showLRT: true })*/ }}>
+ { window.open("http://www.letsrespondtoolkit.org/", "_blank") }}>
Lets Respond Toolkit
{ this.setState({ showNCCRD: true }) }}>
@@ -162,7 +160,7 @@ class Navbar extends React.Component {
{ this.setState({ showNDMC: true }) }}>
National Hazardous Events Database
- { window.open("http://niwis.dws.gov.za/niwis2/", "_blank") /*this.setState({ showNWIS: true })*/ }}>
+ { window.open("http://niwis.dws.gov.za/niwis2/", "_blank") }}>
National Water Information System
{ this.setState({ showSARVA: true }) }}>
@@ -170,7 +168,7 @@ class Navbar extends React.Component {
-
+ */}
@@ -200,9 +198,9 @@ class Navbar extends React.Component {
}
{/* Contact */}
-
+ {/*
Contact
-
+ */}
{/* Login / Logout */}
diff --git a/NDAO_Client_React/app/js/components/navigation/SideNav.jsx b/NDAO_Client_React/app/js/components/navigation/SideNav.jsx
index d0f4a57..770a975 100644
--- a/NDAO_Client_React/app/js/components/navigation/SideNav.jsx
+++ b/NDAO_Client_React/app/js/components/navigation/SideNav.jsx
@@ -86,9 +86,8 @@ class SideNav extends React.Component {
else {
if (typeof x.link !== 'undefined') {
links.push(
-
+
)
diff --git a/NDAO_Client_React/app/js/config/serviceURLs.js b/NDAO_Client_React/app/js/config/serviceURLs.js
index 6d62d05..5cc2a62 100644
--- a/NDAO_Client_React/app/js/config/serviceURLs.js
+++ b/NDAO_Client_React/app/js/config/serviceURLs.js
@@ -10,7 +10,7 @@ let _metadataServiceURL = ''
let _mapServerBaseURL = ''
if (CONSTANTS.DEV) {
- _apiBaseURL = 'http://app01.saeon.ac.za/ccistestapi/odata/' //'https://localhost:44301/odata/'
+ _apiBaseURL = 'http://app01.saeon.ac.za/ndaotestapi/odata/' //'https://localhost:44301/odata/'
_siteBaseURL = `${window.location.protocol}//${window.location.hostname}:${window.location.port}/`
_ccrdBaseURL = 'http://app01.saeon.ac.za/nccrdtestapi/odata/' //'http://localhost:62553/odata/'
_ccrdSiteBaseURL = 'http://app01.saeon.ac.za/nccrdtestsite/#/' //'http://localhost:8085/#/'
@@ -22,8 +22,8 @@ if (CONSTANTS.DEV) {
_mapServerBaseURL = 'http://app01.saeon.ac.za'
}
else if (CONSTANTS.TEST) {
- _apiBaseURL = 'http://app01.saeon.ac.za/ccistestapi/odata/'
- _siteBaseURL = 'http://app01.saeon.ac.za/ccistestsite/'
+ _apiBaseURL = 'http://app01.saeon.ac.za/ndaotestapi/odata/'
+ _siteBaseURL = 'http://app01.saeon.ac.za/ndaotestsite/'
_ccrdBaseURL = 'http://app01.saeon.ac.za/nccrdtestapi/odata/'
_ccrdSiteBaseURL = 'http://app01.saeon.ac.za/nccrdtestsite/#/'
_ndmcBaseURL = 'http://app01.saeon.ac.za/ndmctestapi/odata/'
@@ -34,8 +34,8 @@ else if (CONSTANTS.TEST) {
_mapServerBaseURL = 'http://app01.saeon.ac.za'
}
else if (CONSTANTS.PROD) {
- _apiBaseURL = 'http://app01.saeon.ac.za/ccisapi/odata/'
- _siteBaseURL = 'http://app01.saeon.ac.za/ccissite/'
+ _apiBaseURL = 'http://app01.saeon.ac.za/ndaoapi/odata/'
+ _siteBaseURL = 'http://app01.saeon.ac.za/ndaosite/'
_ccrdBaseURL = 'http://app01.saeon.ac.za/nccrdapi/odata/'
_ccrdSiteBaseURL = 'http://app01.saeon.ac.za/nccrdsite/#/'
_ndmcBaseURL = 'http://app01.saeon.ac.za/ndmcapi/odata/'
From 63c9b540061b0644f252fde07d43b3acbeb20924 Mon Sep 17 00:00:00 2001
From: andree1985 <30987911+andree1985@users.noreply.github.com>
Date: Thu, 4 Apr 2019 13:52:44 +0200
Subject: [PATCH 08/11] feat: Update tree-select to make expansion more obvious
#72
---
.../app/css/antd.tree-select.css | 37 +++++++++++++++++++
.../js/components/input/TreeSelectInput.jsx | 1 +
2 files changed, 38 insertions(+)
create mode 100644 NDAO_Client_React/app/css/antd.tree-select.css
diff --git a/NDAO_Client_React/app/css/antd.tree-select.css b/NDAO_Client_React/app/css/antd.tree-select.css
new file mode 100644
index 0000000..d42cf1b
--- /dev/null
+++ b/NDAO_Client_React/app/css/antd.tree-select.css
@@ -0,0 +1,37 @@
+.ant-select-tree li .ant-select-tree-node-content-wrapper {
+ display: inline-block;
+ width: calc(100% - 22px); /*changed: calc(100% - 24px)*/
+ margin: 0;
+ padding: 3px 5px;
+ color: rgba(0, 0, 0, 0.65);
+ text-decoration: none;
+ border-radius: 2px;
+ cursor: pointer;
+ -webkit-transition: all 0.3s;
+ transition: all 0.3s;
+}
+
+.ant-select-tree li span.ant-select-tree-switcher {
+ position: relative;
+ margin-top: -5px; /*added*/
+ margin-left: -1px; /*added*/
+ margin-right: 2px; /*added*/
+}
+
+:root .ant-select-tree li span.ant-select-tree-switcher.ant-select-tree-switcher_open .ant-select-switcher-icon {
+ font-size: 22px; /*changed: 12px*/
+ color: white; /*added*/
+ background-color: #8EAC85; /*added*/
+ border: 1px solid dimgray; /*added*/
+ border-radius: 2px; /*added*/
+ width: 26px; /*added*/
+}
+
+:root .ant-select-tree li span.ant-select-tree-switcher.ant-select-tree-switcher_close .ant-select-switcher-icon {
+ font-size: 24px; /*changed: 12px*/
+ color: dimgray; /*added*/
+ background-color: #8EAC85; /*added*/
+ border: 1px solid dimgray; /*added*/
+ border-radius: 2px; /*added*/
+ width: 26px; /*added*/
+}
\ No newline at end of file
diff --git a/NDAO_Client_React/app/js/components/input/TreeSelectInput.jsx b/NDAO_Client_React/app/js/components/input/TreeSelectInput.jsx
index bc6edf3..3c317f7 100644
--- a/NDAO_Client_React/app/js/components/input/TreeSelectInput.jsx
+++ b/NDAO_Client_React/app/js/components/input/TreeSelectInput.jsx
@@ -4,6 +4,7 @@ import React from 'react'
import { Tooltip } from 'mdbreact'
import * as globalFunctions from '../../globalFunctions'
import { TreeSelect } from 'antd'
+import '../../../css/antd.tree-select.css'
//AntD Tree-Select
// import TreeSelect from 'antd/lib/tree-select'
From beb2c8b67757d7c81f129f9520dc5c69d5730461 Mon Sep 17 00:00:00 2001
From: dcugh
Date: Mon, 8 Apr 2019 12:49:15 +0200
Subject: [PATCH 09/11] fix(project) make compatible with IE
---
NDAO_Client_React/.babelrc | 6 +-
.../app/js/config/serviceURLs.js | 2 +-
NDAO_Client_React/app/js/globalFunctions.js | 2 +
NDAO_Client_React/app/js/index.jsx | 9 +-
NDAO_Client_React/package-lock.json | 201 +++++++++---------
NDAO_Client_React/package.json | 3 +-
NDAO_Client_React/webpack.config.js | 2 +-
NDAO_Client_React/webpack.dev.config.js | 2 +-
NDAO_Client_React/webpack.test.config.js | 2 +-
9 files changed, 127 insertions(+), 102 deletions(-)
diff --git a/NDAO_Client_React/.babelrc b/NDAO_Client_React/.babelrc
index 1a63eab..ceae405 100644
--- a/NDAO_Client_React/.babelrc
+++ b/NDAO_Client_React/.babelrc
@@ -3,7 +3,11 @@
[
"@babel/preset-env",
{
- "modules": false
+ "modules": false,
+ "useBuiltIns": "entry",
+ "targets": {
+ "ie": "11"
+ }
}
],
"@babel/preset-react"
diff --git a/NDAO_Client_React/app/js/config/serviceURLs.js b/NDAO_Client_React/app/js/config/serviceURLs.js
index 5cc2a62..781616d 100644
--- a/NDAO_Client_React/app/js/config/serviceURLs.js
+++ b/NDAO_Client_React/app/js/config/serviceURLs.js
@@ -10,7 +10,7 @@ let _metadataServiceURL = ''
let _mapServerBaseURL = ''
if (CONSTANTS.DEV) {
- _apiBaseURL = 'http://app01.saeon.ac.za/ndaotestapi/odata/' //'https://localhost:44301/odata/'
+ _apiBaseURL = 'https://localhost:44301/odata/' //'https://localhost:44301/odata/'
_siteBaseURL = `${window.location.protocol}//${window.location.hostname}:${window.location.port}/`
_ccrdBaseURL = 'http://app01.saeon.ac.za/nccrdtestapi/odata/' //'http://localhost:62553/odata/'
_ccrdSiteBaseURL = 'http://app01.saeon.ac.za/nccrdtestsite/#/' //'http://localhost:8085/#/'
diff --git a/NDAO_Client_React/app/js/globalFunctions.js b/NDAO_Client_React/app/js/globalFunctions.js
index 1511716..aeacab7 100644
--- a/NDAO_Client_React/app/js/globalFunctions.js
+++ b/NDAO_Client_React/app/js/globalFunctions.js
@@ -39,11 +39,13 @@ export function readFiltersFromURL(){
export function GetUID() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
+ var crypto = window.crypto || window.msCrypto
var r = crypto.getRandomValues(new Uint8Array(1))[0] % 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
}
+
export function StringToHTML(strVal) {
if (typeof strVal === 'undefined') {
diff --git a/NDAO_Client_React/app/js/index.jsx b/NDAO_Client_React/app/js/index.jsx
index 5e1017e..a3d1062 100644
--- a/NDAO_Client_React/app/js/index.jsx
+++ b/NDAO_Client_React/app/js/index.jsx
@@ -1,8 +1,15 @@
+// IE fixes
+import 'whatwg-fetch'
+import smoothscroll from 'smoothscroll-polyfill'
+
+smoothscroll.polyfill() // kick off the polyfill!
+
+
import React from 'react'
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux'
import store from './store'
-import userManager from './components/authentication/userManager';
+import userManager from './components/authentication/userManager'
import { OidcProvider } from 'redux-oidc'
import App from './App.jsx'
diff --git a/NDAO_Client_React/package-lock.json b/NDAO_Client_React/package-lock.json
index f8c77d5..dcb3b03 100644
--- a/NDAO_Client_React/package-lock.json
+++ b/NDAO_Client_React/package-lock.json
@@ -2148,7 +2148,8 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
- "dev": true
+ "dev": true,
+ "optional": true
},
"assign-symbols": {
"version": "1.0.0",
@@ -4570,6 +4571,7 @@
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz",
"integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=",
"dev": true,
+ "optional": true,
"requires": {
"delayed-stream": "~1.0.0"
}
@@ -5280,7 +5282,8 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
- "dev": true
+ "dev": true,
+ "optional": true
},
"depd": {
"version": "1.1.2",
@@ -5937,7 +5940,8 @@
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
- "dev": true
+ "dev": true,
+ "optional": true
},
"fast-deep-equal": {
"version": "1.1.0",
@@ -6556,7 +6560,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"aproba": {
"version": "1.2.0",
@@ -6577,12 +6582,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -6597,17 +6604,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -6724,7 +6734,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"ini": {
"version": "1.3.5",
@@ -6736,6 +6747,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -6750,6 +6762,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -6757,12 +6770,14 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"minipass": {
"version": "2.2.4",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"safe-buffer": "^5.1.1",
"yallist": "^3.0.0"
@@ -6781,6 +6796,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -6861,7 +6877,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -6873,6 +6890,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"wrappy": "1"
}
@@ -6958,7 +6976,8 @@
"safe-buffer": {
"version": "5.1.1",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -6994,6 +7013,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -7013,6 +7033,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -7056,12 +7077,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"yallist": {
"version": "3.0.2",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
}
}
},
@@ -9321,9 +9344,9 @@
}
},
"luxon": {
- "version": "1.11.3",
- "resolved": "https://registry.npmjs.org/luxon/-/luxon-1.11.3.tgz",
- "integrity": "sha512-/0jMa+JfTRBx1ixsSBs5ZPAQ32H+TPeP9BvgRf0Gi4VxCqhUpRNWagwupy6wA8MckazneKWBLCcwwAH8hkQamg=="
+ "version": "1.12.1",
+ "resolved": "https://registry.npmjs.org/luxon/-/luxon-1.12.1.tgz",
+ "integrity": "sha512-Zv/qJb2X1ESTrlniAViWx2aqGwi2cVpeoZFTbPdPiCu4EsadKsmb/QCH8HQjMUpDZKKJIHKHsJxV5Rwpq47HKQ=="
},
"make-dir": {
"version": "1.3.0",
@@ -9412,23 +9435,21 @@
"requires": {
"@date-io/moment": "0.0.2",
"@fortawesome/fontawesome-free": "^5.7.1",
- "@material-ui/core": "^3.4.0",
- "bootstrap-css-only": "^4.2.1",
+ "@material-ui/core": "^3.9.2",
+ "bootstrap-css-only": "^4.3.1",
"chart.js": "^2.7.3",
"classnames": "^2.2.6",
"material-ui-pickers": "2.0.0",
"moment": "^2.22.2",
- "outy": "^0.1.2",
"perfect-scrollbar": "^1.3.0",
"prop-types": "^15.6.2",
"raf": "^3.4.0",
- "react": "^16.8.1",
- "react-autosuggest": "^9.3.4",
+ "react": "^16.8.6",
"react-chartjs-2": "^2.7.0",
- "react-dom": "^16.8.1",
+ "react-dom": "^16.8.6",
"react-image-lightbox": "5.0.0",
"react-numeric-input": "^2.2.3",
- "react-popper": "^0.7.5",
+ "react-popper": "^1.3.3",
"react-router-dom": "^4.3.1",
"react-scroll": "^1.7.10",
"react-toastify": "^3.2.2",
@@ -9459,25 +9480,68 @@
}
},
"react": {
- "version": "16.8.4",
- "resolved": "https://registry.npmjs.org/react/-/react-16.8.4.tgz",
- "integrity": "sha512-0GQ6gFXfUH7aZcjGVymlPOASTuSjlQL4ZtVC5YKH+3JL6bBLCVO21DknzmaPlI90LN253ojj02nsapy+j7wIjg==",
+ "version": "16.8.6",
+ "resolved": "https://registry.npmjs.org/react/-/react-16.8.6.tgz",
+ "integrity": "sha512-pC0uMkhLaHm11ZSJULfOBqV4tIZkx87ZLvbbQYunNixAAvjnC+snJCg0XQXn9VIsttVsbZP/H/ewzgsd5fxKXw==",
"requires": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
"prop-types": "^15.6.2",
- "scheduler": "^0.13.4"
+ "scheduler": "^0.13.6"
+ },
+ "dependencies": {
+ "scheduler": {
+ "version": "0.13.6",
+ "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.13.6.tgz",
+ "integrity": "sha512-IWnObHt413ucAYKsD9J1QShUKkbKLQQHdxRyw73sw4FN26iWr3DY/H34xGPe4nmL1DwXyWmSWmMrA9TfQbE/XQ==",
+ "requires": {
+ "loose-envify": "^1.1.0",
+ "object-assign": "^4.1.1"
+ }
+ }
}
},
"react-dom": {
- "version": "16.8.4",
- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.8.4.tgz",
- "integrity": "sha512-Ob2wK7XG2tUDt7ps7LtLzGYYB6DXMCLj0G5fO6WeEICtT4/HdpOi7W/xLzZnR6RCG1tYza60nMdqtxzA8FaPJQ==",
+ "version": "16.8.6",
+ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.8.6.tgz",
+ "integrity": "sha512-1nL7PIq9LTL3fthPqwkvr2zY7phIPjYrT0jp4HjyEQrEROnw4dG41VVwi/wfoCneoleqrNX7iAD+pXebJZwrwA==",
"requires": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
"prop-types": "^15.6.2",
- "scheduler": "^0.13.4"
+ "scheduler": "^0.13.6"
+ },
+ "dependencies": {
+ "scheduler": {
+ "version": "0.13.6",
+ "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.13.6.tgz",
+ "integrity": "sha512-IWnObHt413ucAYKsD9J1QShUKkbKLQQHdxRyw73sw4FN26iWr3DY/H34xGPe4nmL1DwXyWmSWmMrA9TfQbE/XQ==",
+ "requires": {
+ "loose-envify": "^1.1.0",
+ "object-assign": "^4.1.1"
+ }
+ }
+ }
+ },
+ "react-popper": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/react-popper/-/react-popper-1.3.3.tgz",
+ "integrity": "sha512-ynMZBPkXONPc5K4P5yFWgZx5JGAUIP3pGGLNs58cfAPgK67olx7fmLp+AdpZ0+GoQ+ieFDa/z4cdV6u7sioH6w==",
+ "requires": {
+ "@babel/runtime": "^7.1.2",
+ "create-react-context": "<=0.2.2",
+ "popper.js": "^1.14.4",
+ "prop-types": "^15.6.1",
+ "typed-styles": "^0.0.7",
+ "warning": "^4.0.2"
+ }
+ },
+ "warning": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz",
+ "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==",
+ "requires": {
+ "loose-envify": "^1.0.0"
}
}
}
@@ -10444,11 +10508,6 @@
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
"dev": true
},
- "outy": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/outy/-/outy-0.1.2.tgz",
- "integrity": "sha1-WY05XkP5LlLZiq3/I7cqPnEotXI="
- },
"p-cancelable": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz",
@@ -12185,26 +12244,6 @@
"prop-types": "^15.6.0"
}
},
- "react-autosuggest": {
- "version": "9.4.3",
- "resolved": "https://registry.npmjs.org/react-autosuggest/-/react-autosuggest-9.4.3.tgz",
- "integrity": "sha512-wFbp5QpgFQRfw9cwKvcgLR8theikOUkv8PFsuLYqI2PUgVlx186Cz8MYt5bLxculi+jxGGUUVt+h0esaBZZouw==",
- "requires": {
- "prop-types": "^15.5.10",
- "react-autowhatever": "^10.1.2",
- "shallow-equal": "^1.0.0"
- }
- },
- "react-autowhatever": {
- "version": "10.2.0",
- "resolved": "https://registry.npmjs.org/react-autowhatever/-/react-autowhatever-10.2.0.tgz",
- "integrity": "sha512-dqHH4uqiJldPMbL8hl/i2HV4E8FMTDEdVlOIbRqYnJi0kTpWseF9fJslk/KS9pGDnm80JkYzVI+nzFjnOG/u+g==",
- "requires": {
- "prop-types": "^15.5.8",
- "react-themeable": "^1.1.0",
- "section-iterator": "^2.0.0"
- }
- },
"react-chartjs-2": {
"version": "2.7.4",
"resolved": "https://registry.npmjs.org/react-chartjs-2/-/react-chartjs-2-2.7.4.tgz",
@@ -12330,15 +12369,6 @@
"resolved": "https://registry.npmjs.org/react-odata/-/react-odata-10.1.0.tgz",
"integrity": "sha1-+kBLlvfo6JZbgZh6xAiKWynIP5s="
},
- "react-popper": {
- "version": "0.7.5",
- "resolved": "https://registry.npmjs.org/react-popper/-/react-popper-0.7.5.tgz",
- "integrity": "sha512-ya9dhhGCf74JTOB2uyksEHhIGw7w9tNZRUJF73lEq2h4H5JT6MBa4PdT4G+sx6fZwq+xKZAL/sVNAIuojPn7Dg==",
- "requires": {
- "popper.js": "^1.12.5",
- "prop-types": "^15.5.10"
- }
- },
"react-redux": {
"version": "5.0.7",
"resolved": "https://registry.npmjs.org/react-redux/-/react-redux-5.0.7.tgz",
@@ -12473,21 +12503,6 @@
"prop-types": "^15.6.0"
}
},
- "react-themeable": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/react-themeable/-/react-themeable-1.1.0.tgz",
- "integrity": "sha1-fURm3ZsrX6dQWHJ4JenxUro3mg4=",
- "requires": {
- "object-assign": "^3.0.0"
- },
- "dependencies": {
- "object-assign": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz",
- "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I="
- }
- }
- },
"react-toastify": {
"version": "3.4.3",
"resolved": "https://registry.npmjs.org/react-toastify/-/react-toastify-3.4.3.tgz",
@@ -13054,15 +13069,6 @@
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
"dev": true
},
- "scheduler": {
- "version": "0.13.4",
- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.13.4.tgz",
- "integrity": "sha512-cvSOlRPxOHs5dAhP9yiS/6IDmVAVxmk33f0CtTJRkmUWcb1Us+t7b1wqdzoC0REw2muC9V5f1L/w5R5uKGaepA==",
- "requires": {
- "loose-envify": "^1.1.0",
- "object-assign": "^4.1.1"
- }
- },
"schema-utils": {
"version": "0.4.7",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz",
@@ -13105,11 +13111,6 @@
"integrity": "sha1-o0a7Gs1CB65wvXwMfKnlZra63bg=",
"dev": true
},
- "section-iterator": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/section-iterator/-/section-iterator-2.0.0.tgz",
- "integrity": "sha1-v0RNev7rlK1Dw5rS+yYVFifMuio="
- },
"select-hose": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz",
@@ -13303,6 +13304,11 @@
"integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=",
"dev": true
},
+ "smoothscroll-polyfill": {
+ "version": "0.4.4",
+ "resolved": "https://registry.npmjs.org/smoothscroll-polyfill/-/smoothscroll-polyfill-0.4.4.tgz",
+ "integrity": "sha512-TK5ZA9U5RqCwMpfoMq/l1mrH0JAR7y7KRvOBx0n2869aLxch+gT9GhN3yUfjiw+d/DiF1mKo14+hd62JyMmoBg=="
+ },
"snapdragon": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
@@ -14514,6 +14520,11 @@
"mime-types": "~2.1.18"
}
},
+ "typed-styles": {
+ "version": "0.0.7",
+ "resolved": "https://registry.npmjs.org/typed-styles/-/typed-styles-0.0.7.tgz",
+ "integrity": "sha512-pzP0PWoZUhsECYjABgCGQlRGL1n7tOHsgwYv3oIiEpJwGhFTuty/YNeduxQYzXXa3Ge5BdT6sHYIQYpl4uJ+5Q=="
+ },
"typedarray": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
diff --git a/NDAO_Client_React/package.json b/NDAO_Client_React/package.json
index a7ba609..a4c786e 100644
--- a/NDAO_Client_React/package.json
+++ b/NDAO_Client_React/package.json
@@ -19,7 +19,7 @@
"font-awesome": "^4.7.0",
"js-file-download": "^0.4.4",
"json-2-csv": "^3.4.1",
- "luxon": "^1.11.3",
+ "luxon": "^1.12.1",
"mdbreact": "git+https://oauth2:TrvzhasQo5h8aod8YSLE@git.mdbootstrap.com/mdb/react/re-pro.git",
"moment": "^2.24.0",
"odata-query": "^5.4.3",
@@ -41,6 +41,7 @@
"react-tooltip": "^3.6.1",
"redux": "^3.7.2",
"redux-oidc": "^3.0.2",
+ "smoothscroll-polyfill": "^0.4.4",
"whatwg-fetch": "^2.0.4"
},
"devDependencies": {
diff --git a/NDAO_Client_React/webpack.config.js b/NDAO_Client_React/webpack.config.js
index 3678f08..94d666d 100644
--- a/NDAO_Client_React/webpack.config.js
+++ b/NDAO_Client_React/webpack.config.js
@@ -51,7 +51,7 @@ module.exports = {
entry: {
app: ["babel-polyfill", './js/index.jsx'],
- silentRenew: ["./silent_renew/silent_renew.js"],
+ silentRenew: ["babel-polyfill", "./silent_renew/silent_renew.js"],
},
output: {
diff --git a/NDAO_Client_React/webpack.dev.config.js b/NDAO_Client_React/webpack.dev.config.js
index 3f5ecf9..79b9f43 100644
--- a/NDAO_Client_React/webpack.dev.config.js
+++ b/NDAO_Client_React/webpack.dev.config.js
@@ -18,7 +18,7 @@ module.exports = {
},
entry: {
app: ["babel-polyfill", './js/index.jsx'],
- silentRenew: ["./silent_renew/silent_renew.js"],
+ silentRenew: ["babel-polyfill", "./silent_renew/silent_renew.js"],
react: [
'react',
'react-dom',
diff --git a/NDAO_Client_React/webpack.test.config.js b/NDAO_Client_React/webpack.test.config.js
index 3aff971..f19c68d 100644
--- a/NDAO_Client_React/webpack.test.config.js
+++ b/NDAO_Client_React/webpack.test.config.js
@@ -51,7 +51,7 @@ module.exports = {
entry: {
app: ["babel-polyfill", './js/index.jsx'],
- silentRenew: ["./silent_renew/silent_renew.js"],
+ silentRenew: ["babel-polyfill", "./silent_renew/silent_renew.js"],
},
output: {
From d9d0524bfae6982725923488c2164913e077b65a Mon Sep 17 00:00:00 2001
From: dcugh
Date: Mon, 8 Apr 2019 13:07:59 +0200
Subject: [PATCH 10/11] fix(project) fix login from localhost
---
NDAO_Client_React/app/js/config/serviceURLs.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/NDAO_Client_React/app/js/config/serviceURLs.js b/NDAO_Client_React/app/js/config/serviceURLs.js
index 781616d..5cc2a62 100644
--- a/NDAO_Client_React/app/js/config/serviceURLs.js
+++ b/NDAO_Client_React/app/js/config/serviceURLs.js
@@ -10,7 +10,7 @@ let _metadataServiceURL = ''
let _mapServerBaseURL = ''
if (CONSTANTS.DEV) {
- _apiBaseURL = 'https://localhost:44301/odata/' //'https://localhost:44301/odata/'
+ _apiBaseURL = 'http://app01.saeon.ac.za/ndaotestapi/odata/' //'https://localhost:44301/odata/'
_siteBaseURL = `${window.location.protocol}//${window.location.hostname}:${window.location.port}/`
_ccrdBaseURL = 'http://app01.saeon.ac.za/nccrdtestapi/odata/' //'http://localhost:62553/odata/'
_ccrdSiteBaseURL = 'http://app01.saeon.ac.za/nccrdtestsite/#/' //'http://localhost:8085/#/'
From 84f6ffd82f10591e2adf0248349fd7fc0b415156 Mon Sep 17 00:00:00 2001
From: andree1985 <30987911+andree1985@users.noreply.github.com>
Date: Wed, 10 Apr 2019 17:22:02 +0200
Subject: [PATCH 11/11] feat(UX): IE copatibility
Make compatible with IE11
#75
---
NDAO_API/NDAO_API/Startup.cs | 12 +-
.../app/js/components/input/FileUpload.jsx | 4 +-
.../Adaptation/MonitoringEvaluation/AME.jsx | 28 +--
.../MonitoringEvaluation/Goal1Contrib.jsx | 9 +-
.../MonitoringEvaluation/Goal2Contrib.jsx | 7 +-
.../MonitoringEvaluation/Goal3Contrib.jsx | 5 +-
.../MonitoringEvaluation/Goal4Contrib.jsx | 5 +-
.../MonitoringEvaluation/Goal5Contrib.jsx | 7 +-
.../MonitoringEvaluation/Goal6Contrib.jsx | 7 +-
.../MonitoringEvaluation/Goal7Contrib.jsx | 7 +-
.../MonitoringEvaluation/Goal8Contrib.jsx | 7 +-
.../MonitoringEvaluation/Goal9Contrib.jsx | 7 +-
.../app/js/components/pages/Home/Home.jsx | 47 ++---
.../Home/InfoGraphics/GHGReductionIGFX.jsx | 3 +-
.../Home/InfoGraphics/GovernmentsIGFX.jsx | 3 +-
.../pages/Home/InfoGraphics/SectorsIGFX.jsx | 3 +-
NDAO_Client_React/app/js/globalFunctions.js | 21 +++
NDAO_Client_React/app/js/index.jsx | 3 +-
NDAO_Client_React/package-lock.json | 162 ++++++++++--------
NDAO_Client_React/package.json | 1 +
20 files changed, 203 insertions(+), 145 deletions(-)
diff --git a/NDAO_API/NDAO_API/Startup.cs b/NDAO_API/NDAO_API/Startup.cs
index d1d0ed9..018b3b0 100644
--- a/NDAO_API/NDAO_API/Startup.cs
+++ b/NDAO_API/NDAO_API/Startup.cs
@@ -39,14 +39,10 @@ public void ConfigureServices(IServiceCollection services)
options.AddPolicy("CORSPolicy",
builder =>
{
- builder.WithOrigins(
- "http://localhost:8085", //NCCRD LOCAL
- "http://localhost:8091", //CCIS LOCAL
- "http://app01.saeon.ac.za/ccis", //CCIS LIVE
- "http://app01.saeon.ac.za/nccrdsite" //NCCRD LIVE
- )
- .AllowAnyHeader()
- .AllowAnyMethod();
+ builder
+ .AllowAnyOrigin()
+ .AllowAnyHeader()
+ .AllowAnyMethod();
});
});
diff --git a/NDAO_Client_React/app/js/components/input/FileUpload.jsx b/NDAO_Client_React/app/js/components/input/FileUpload.jsx
index 905dc69..717a5d5 100644
--- a/NDAO_Client_React/app/js/components/input/FileUpload.jsx
+++ b/NDAO_Client_React/app/js/components/input/FileUpload.jsx
@@ -68,7 +68,7 @@ class FileUpload extends React.Component {
//Remove
try {
- let res = await fetch(apiBaseURL + "RemoveFile", {
+ let res = await globalFunctions.CustomFetch(apiBaseURL + "RemoveFile", {
method: "POST",
headers: {
"Content-Type": "application/json",
@@ -114,7 +114,7 @@ class FileUpload extends React.Component {
//Upload
try {
- let res = await fetch(apiBaseURL + "UploadFile", {
+ let res = await globalFunctions.CustomFetch(apiBaseURL + "UploadFile", {
method: "POST",
headers: {
"Content-Type": "application/json",
diff --git a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/AME.jsx b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/AME.jsx
index a17e298..684f863 100644
--- a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/AME.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/AME.jsx
@@ -185,15 +185,17 @@ class AME extends React.Component {
- {selectedGoal === 1 && }
- {selectedGoal === 2 && }
- {selectedGoal === 3 && }
- {selectedGoal === 4 && }
- {selectedGoal === 5 && }
- {selectedGoal === 6 && }
- {selectedGoal === 7 && }
- {selectedGoal === 8 && }
- {selectedGoal === 9 && }
+
+ {selectedGoal === 1 && }
+ {selectedGoal === 2 && }
+ {selectedGoal === 3 && }
+ {selectedGoal === 4 && }
+ {selectedGoal === 5 && }
+ {selectedGoal === 6 && }
+ {selectedGoal === 7 && }
+ {selectedGoal === 8 && }
+ {selectedGoal === 9 && }
+
@@ -248,10 +250,10 @@ class AME extends React.Component {
{/* Select goal modal */}
- { this.setState({ selectGoalModal: false }) }}
- size="lg"
+ { this.setState({ selectGoalModal: false }) }}
+ size="lg"
centered
>
{ this.setState({ selectGoalModal: false }) }}>
diff --git a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal1Contrib.jsx b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal1Contrib.jsx
index 5430f0c..89a08b0 100644
--- a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal1Contrib.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal1Contrib.jsx
@@ -21,6 +21,7 @@ import { metaDataCredentials } from '../../../../../js/secrets.js'
//Images
import gear from '../../../../../images/Icons/gear.png'
import checklist from '../../../../../images/Icons/checklist.png'
+import { CustomFetch } from '../../../../globalFunctions.js';
const _gf = require('../../../../globalFunctions')
const _sf = require('./SharedFunctions.js')
@@ -122,7 +123,7 @@ class Goal1Contrib extends React.Component {
})
try {
- let res = await fetch(apiBaseURL + `Goals${query}`)
+ let res = await CustomFetch(apiBaseURL + `Goals${query}`)
res = await res.json()
if (res.value && res.value.length > 0) {
@@ -249,7 +250,7 @@ class Goal1Contrib extends React.Component {
//Submit
try {
- let res = await fetch(apiBaseURL + 'Goals', {
+ let res = await CustomFetch(apiBaseURL + 'Goals', {
method: "POST",
headers: {
"Content-Type": "application/json",
@@ -396,7 +397,7 @@ class Goal1Contrib extends React.Component {
}
try {
- let res = await fetch(metadataServiceURL, {
+ let res = await CustomFetch(metadataServiceURL, {
method: "POST",
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
@@ -504,7 +505,7 @@ class Goal1Contrib extends React.Component {
try {
- let res = await fetch(`${ccrdBaseURL}Projects${query}`)
+ let res = await CustomFetch(`${ccrdBaseURL}Projects${query}`)
if (!res.ok) {
//Get response body
diff --git a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal2Contrib.jsx b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal2Contrib.jsx
index 4a9aa45..621f63e 100644
--- a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal2Contrib.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal2Contrib.jsx
@@ -26,6 +26,7 @@ import checklist from '../../../../../images/Icons/checklist.png'
//Content
import OrganogramTemplate from '../../../../../content/OrganogramTemplate.pptx'
+import { CustomFetch } from '../../../../globalFunctions.js';
const _gf = require('../../../../globalFunctions')
const _sf = require('./SharedFunctions.js')
@@ -181,7 +182,7 @@ class Goal2Contrib extends React.Component {
})
try {
- let res = await fetch(apiBaseURL + `Goals${query}`)
+ let res = await CustomFetch(apiBaseURL + `Goals${query}`)
res = await res.json()
if (res.value && res.value.length > 0) {
let data = res.value[0]
@@ -336,7 +337,7 @@ class Goal2Contrib extends React.Component {
//Submit
try {
- let res = await fetch(apiBaseURL + 'Goals', {
+ let res = await CustomFetch(apiBaseURL + 'Goals', {
method: "POST",
headers: {
"Content-Type": "application/json",
@@ -478,7 +479,7 @@ class Goal2Contrib extends React.Component {
}
try {
- let res = await fetch(metadataServiceURL, {
+ let res = await CustomFetch(metadataServiceURL, {
method: "POST",
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
diff --git a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal3Contrib.jsx b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal3Contrib.jsx
index 255fcbd..811742d 100644
--- a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal3Contrib.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal3Contrib.jsx
@@ -17,6 +17,7 @@ import 'antd/lib/slider/style/css'
import gear from '../../../../../images/Icons/gear.png'
import checklist from '../../../../../images/Icons/checklist.png'
+import { CustomFetch } from '../../../../globalFunctions.js';
const _gf = require('../../../../globalFunctions')
@@ -151,7 +152,7 @@ class Goal3Contrib extends React.Component {
})
try {
- let res = await fetch(apiBaseURL + `Goals${query}`)
+ let res = await CustomFetch(apiBaseURL + `Goals${query}`)
res = await res.json()
if (res.value && res.value.length > 0) {
let data = res.value[0]
@@ -223,7 +224,7 @@ class Goal3Contrib extends React.Component {
//Submit
try {
- let res = await fetch(apiBaseURL + 'Goals', {
+ let res = await CustomFetch(apiBaseURL + 'Goals', {
method: "POST",
headers: {
"Content-Type": "application/json",
diff --git a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal4Contrib.jsx b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal4Contrib.jsx
index 23b7ef8..96c2270 100644
--- a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal4Contrib.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal4Contrib.jsx
@@ -17,6 +17,7 @@ import 'antd/lib/slider/style/css'
import gear from '../../../../../images/Icons/gear.png'
import checklist from '../../../../../images/Icons/checklist.png'
+import { CustomFetch } from '../../../../globalFunctions.js';
const _gf = require('../../../../globalFunctions')
@@ -141,7 +142,7 @@ class Goal4Contrib extends React.Component {
})
try {
- let res = await fetch(apiBaseURL + `Goals${query}`)
+ let res = await CustomFetch(apiBaseURL + `Goals${query}`)
res = await res.json()
if (res.value && res.value.length > 0) {
let data = res.value[0]
@@ -211,7 +212,7 @@ class Goal4Contrib extends React.Component {
//Submit
try {
- let res = await fetch(apiBaseURL + 'Goals', {
+ let res = await CustomFetch(apiBaseURL + 'Goals', {
method: "POST",
headers: {
"Content-Type": "application/json",
diff --git a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal5Contrib.jsx b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal5Contrib.jsx
index 0dc9806..4597358 100644
--- a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal5Contrib.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal5Contrib.jsx
@@ -22,6 +22,7 @@ import 'antd/lib/slider/style/css'
import gear from '../../../../../images/Icons/gear.png'
import checklist from '../../../../../images/Icons/checklist.png'
+import { CustomFetch } from '../../../../globalFunctions.js';
const _gf = require('../../../../globalFunctions')
const _sf = require('./SharedFunctions.js')
@@ -161,7 +162,7 @@ class Goal5Contrib extends React.Component {
})
try {
- let res = await fetch(apiBaseURL + `Goals${query}`)
+ let res = await CustomFetch(apiBaseURL + `Goals${query}`)
res = await res.json()
if (res.value && res.value.length > 0) {
let data = res.value[0]
@@ -310,7 +311,7 @@ class Goal5Contrib extends React.Component {
//Submit
try {
- let res = await fetch(apiBaseURL + 'Goals', {
+ let res = await CustomFetch(apiBaseURL + 'Goals', {
method: "POST",
headers: {
"Content-Type": "application/json",
@@ -452,7 +453,7 @@ class Goal5Contrib extends React.Component {
}
try {
- let res = await fetch(metadataServiceURL, {
+ let res = await CustomFetch(metadataServiceURL, {
method: "POST",
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
diff --git a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal6Contrib.jsx b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal6Contrib.jsx
index 76ae207..5138968 100644
--- a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal6Contrib.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal6Contrib.jsx
@@ -18,6 +18,7 @@ import { metaDataCredentials } from '../../../../../js/secrets.js'
import gear from '../../../../../images/Icons/gear.png'
import checklist from '../../../../../images/Icons/checklist.png'
+import { CustomFetch } from '../../../../globalFunctions.js';
const _gf = require('../../../../globalFunctions')
const _sf = require('./SharedFunctions.js')
@@ -152,7 +153,7 @@ class Goal6Contrib extends React.Component {
})
try {
- let res = await fetch(apiBaseURL + `Goals${query}`)
+ let res = await CustomFetch(apiBaseURL + `Goals${query}`)
res = await res.json()
if (res.value && res.value.length > 0) {
let data = res.value[0]
@@ -291,7 +292,7 @@ class Goal6Contrib extends React.Component {
//Submit
try {
- let res = await fetch(apiBaseURL + 'Goals', {
+ let res = await CustomFetch(apiBaseURL + 'Goals', {
method: "POST",
headers: {
"Content-Type": "application/json",
@@ -433,7 +434,7 @@ class Goal6Contrib extends React.Component {
}
try {
- let res = await fetch(metadataServiceURL, {
+ let res = await CustomFetch(metadataServiceURL, {
method: "POST",
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
diff --git a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal7Contrib.jsx b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal7Contrib.jsx
index b94778a..5ccb4f7 100644
--- a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal7Contrib.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal7Contrib.jsx
@@ -18,6 +18,7 @@ import { metaDataCredentials } from '../../../../../js/secrets.js'
import gear from '../../../../../images/Icons/gear.png'
import checklist from '../../../../../images/Icons/checklist.png'
+import { CustomFetch } from '../../../../globalFunctions.js';
const _gf = require('../../../../globalFunctions')
const _sf = require('./SharedFunctions.js')
@@ -152,7 +153,7 @@ class Goal7Contrib extends React.Component {
})
try {
- let res = await fetch(apiBaseURL + `Goals${query}`)
+ let res = await CustomFetch(apiBaseURL + `Goals${query}`)
res = await res.json()
if (res.value && res.value.length > 0) {
let data = res.value[0]
@@ -291,7 +292,7 @@ class Goal7Contrib extends React.Component {
//Submit
try {
- let res = await fetch(apiBaseURL + 'Goals', {
+ let res = await CustomFetch(apiBaseURL + 'Goals', {
method: "POST",
headers: {
"Content-Type": "application/json",
@@ -433,7 +434,7 @@ class Goal7Contrib extends React.Component {
}
try {
- let res = await fetch(metadataServiceURL, {
+ let res = await CustomFetch(metadataServiceURL, {
method: "POST",
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
diff --git a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal8Contrib.jsx b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal8Contrib.jsx
index 08b7daa..7549ca1 100644
--- a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal8Contrib.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal8Contrib.jsx
@@ -18,6 +18,7 @@ import { metaDataCredentials } from '../../../../../js/secrets.js'
import gear from '../../../../../images/Icons/gear.png'
import checklist from '../../../../../images/Icons/checklist.png'
+import { CustomFetch } from '../../../../globalFunctions.js';
const _gf = require('../../../../globalFunctions')
const _sf = require('./SharedFunctions.js')
@@ -152,7 +153,7 @@ class Goal8Contrib extends React.Component {
})
try {
- let res = await fetch(apiBaseURL + `Goals${query}`)
+ let res = await CustomFetch(apiBaseURL + `Goals${query}`)
res = await res.json()
if (res.value && res.value.length > 0) {
let data = res.value[0]
@@ -291,7 +292,7 @@ class Goal8Contrib extends React.Component {
//Submit
try {
- let res = await fetch(apiBaseURL + 'Goals', {
+ let res = await CustomFetch(apiBaseURL + 'Goals', {
method: "POST",
headers: {
"Content-Type": "application/json",
@@ -433,7 +434,7 @@ class Goal8Contrib extends React.Component {
}
try {
- let res = await fetch(metadataServiceURL, {
+ let res = await CustomFetch(metadataServiceURL, {
method: "POST",
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
diff --git a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal9Contrib.jsx b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal9Contrib.jsx
index b92b893..9d457d5 100644
--- a/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal9Contrib.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Adaptation/MonitoringEvaluation/Goal9Contrib.jsx
@@ -18,6 +18,7 @@ import { metaDataCredentials } from '../../../../../js/secrets.js'
import gear from '../../../../../images/Icons/gear.png'
import checklist from '../../../../../images/Icons/checklist.png'
+import { CustomFetch } from '../../../../globalFunctions.js';
const _gf = require('../../../../globalFunctions')
const _sf = require('./SharedFunctions.js')
@@ -152,7 +153,7 @@ class Goal9Contrib extends React.Component {
})
try {
- let res = await fetch(apiBaseURL + `Goals${query}`)
+ let res = await CustomFetch(apiBaseURL + `Goals${query}`)
res = await res.json()
if (res.value && res.value.length > 0) {
let data = res.value[0]
@@ -291,7 +292,7 @@ class Goal9Contrib extends React.Component {
//Submit
try {
- let res = await fetch(apiBaseURL + 'Goals', {
+ let res = await CustomFetch(apiBaseURL + 'Goals', {
method: "POST",
headers: {
"Content-Type": "application/json",
@@ -433,7 +434,7 @@ class Goal9Contrib extends React.Component {
}
try {
- let res = await fetch(metadataServiceURL, {
+ let res = await CustomFetch(metadataServiceURL, {
method: "POST",
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
diff --git a/NDAO_Client_React/app/js/components/pages/Home/Home.jsx b/NDAO_Client_React/app/js/components/pages/Home/Home.jsx
index d685736..9abf053 100644
--- a/NDAO_Client_React/app/js/components/pages/Home/Home.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Home/Home.jsx
@@ -3,7 +3,7 @@
import React from 'react'
import { connect } from 'react-redux'
import { Row, Col, Button, Collapse } from 'mdbreact'
-import { DEAGreen } from "../../../config/colours.js"
+import { DEAGreen, DEAGreenDark } from "../../../config/colours.js"
import AME_Banner from './AME_Banner.jsx'
import AME_Info from './AME_Info.jsx'
import LessInfoBtn from './LessInfoBtn.jsx'
@@ -25,6 +25,7 @@ import MapViewCore from '../../visualization/Map/MapViewCore.jsx'
// import SectorsIGFX from './InfoGraphics/SectorsIGFX.jsx'
import GoalDetails from './GoalDetails.jsx'
import { CSVLink } from 'react-csv'
+import { CustomFetch } from '../../../globalFunctions.js';
const mapStateToProps = (state, props) => {
return {}
@@ -141,7 +142,7 @@ class Home extends React.Component {
setLoading(true)
try {
- let res = await fetch(apiBaseURL +
+ let res = await CustomFetch(apiBaseURL +
`GetFilteredInstitutions(region=${filterRegion},sector=${filterSector})`)
if (res.ok) {
@@ -169,7 +170,7 @@ class Home extends React.Component {
setLoading(true)
try {
- let res = await fetch(apiBaseURL + "Goals/Extensions." +
+ let res = await CustomFetch(apiBaseURL + "Goals/Extensions." +
`GetGoalData(region=${filterRegion},sector=${filterSector},goal=${filterGoal},year=${filterYear},institution='${filterInstitution}')` +
"?$expand=Questions")
@@ -194,7 +195,7 @@ class Home extends React.Component {
setLoading(true)
try {
- let res = await fetch(apiBaseURL + "Goals?$expand=Questions")
+ let res = await CustomFetch(apiBaseURL + "Goals?$expand=Questions")
if (res.ok) {
res = await res.json() //parse response
@@ -218,7 +219,7 @@ class Home extends React.Component {
let parentSet = false
try {
- let res = await fetch(vmsBaseURL + 'Regions/Flat')
+ let res = await CustomFetch(vmsBaseURL + 'Regions/Flat')
if (res.ok) {
res = await res.json() //parse response
@@ -262,10 +263,10 @@ class Home extends React.Component {
goalData, goalDataUnfiltered, trafficLightFull, mapFullView
} = this.state
- let qData = [{
+ let qData = [{
Id: "",
- Key:"",
- Value:""
+ Key: "",
+ Value: ""
}]
return (
@@ -283,20 +284,26 @@ class Home extends React.Component {
/>
-
{
- console.log(this.state.goalData)
- }}
- >
- Download
+ data={[...this.state.goalData]}
+ headers={['Id', 'Type', 'CreateDate', 'CreateUser', 'UpdateDate', 'UpdateUser', 'Status']}
+ filename={"DAO-list.csv"}
+ style={{
+ marginRight: 15,
+ textDecoration: 'none',
+ color: 'white',
+ backgroundColor: DEAGreen,
+ padding: "10px 25px 11px 25px",
+ borderRadius: 2,
+ fontSize: 11,
+ border: "1px solid dimgrey",
+ fontWeight: 400
+ }}
+ asyncOnClick={true}
+ >
+ DOWNLOAD DAO DATA
-
+
{ location.hash = "#/ame/contribute" }}
diff --git a/NDAO_Client_React/app/js/components/pages/Home/InfoGraphics/GHGReductionIGFX.jsx b/NDAO_Client_React/app/js/components/pages/Home/InfoGraphics/GHGReductionIGFX.jsx
index 93bd647..292cc74 100644
--- a/NDAO_Client_React/app/js/components/pages/Home/InfoGraphics/GHGReductionIGFX.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Home/InfoGraphics/GHGReductionIGFX.jsx
@@ -7,6 +7,7 @@ import moment from 'moment'
//images
import ghg_reduction from '../../../../../images/Icons/ghg_reduction.jpg'
+import { CustomFetch } from '../../../../globalFunctions.js';
const mapStateToProps = (state, props) => {
return {}
@@ -71,7 +72,7 @@ class GHGReductionIGFX extends React.Component {
})
try {
- let res = await fetch(ccrdBaseURL + `Projects${query}`)
+ let res = await CustomFetch(ccrdBaseURL + `Projects${query}`)
res = await res.json()
if (res.value) {
diff --git a/NDAO_Client_React/app/js/components/pages/Home/InfoGraphics/GovernmentsIGFX.jsx b/NDAO_Client_React/app/js/components/pages/Home/InfoGraphics/GovernmentsIGFX.jsx
index 210a7a3..bd0119e 100644
--- a/NDAO_Client_React/app/js/components/pages/Home/InfoGraphics/GovernmentsIGFX.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Home/InfoGraphics/GovernmentsIGFX.jsx
@@ -6,6 +6,7 @@ import moment from 'moment'
//images
import governments from '../../../../../images/Icons/governments.jpg'
+import { CustomFetch } from '../../../../globalFunctions.js';
const mapStateToProps = (state, props) => {
return {}
@@ -29,7 +30,7 @@ class GovernmentsIGFX extends React.Component {
//Get Region count
try {
- let res = await fetch(vmsBaseURL + 'Regions/flat')
+ let res = await CustomFetch(vmsBaseURL + 'Regions/flat')
res = await res.json()
if (res.items) {
diff --git a/NDAO_Client_React/app/js/components/pages/Home/InfoGraphics/SectorsIGFX.jsx b/NDAO_Client_React/app/js/components/pages/Home/InfoGraphics/SectorsIGFX.jsx
index c5a4e8f..252d595 100644
--- a/NDAO_Client_React/app/js/components/pages/Home/InfoGraphics/SectorsIGFX.jsx
+++ b/NDAO_Client_React/app/js/components/pages/Home/InfoGraphics/SectorsIGFX.jsx
@@ -6,6 +6,7 @@ import moment from 'moment'
//images
import sectors from '../../../../../images/Icons/sectors.jpg'
+import { CustomFetch } from '../../../../globalFunctions.js';
const mapStateToProps = (state, props) => {
return {}
@@ -29,7 +30,7 @@ class SectorsIGFX extends React.Component {
//Get Sector count
try {
- let res = await fetch(vmsBaseURL + 'Sectors/flat')
+ let res = await CustomFetch(vmsBaseURL + 'Sectors/flat')
res = await res.json()
if (res.items) {
diff --git a/NDAO_Client_React/app/js/globalFunctions.js b/NDAO_Client_React/app/js/globalFunctions.js
index aeacab7..daab697 100644
--- a/NDAO_Client_React/app/js/globalFunctions.js
+++ b/NDAO_Client_React/app/js/globalFunctions.js
@@ -2,6 +2,27 @@ import React from 'react'
import { DEAGreen } from './config/colours.js'
const queryString = require('query-string')
+const fetchDefaults = require("fetch-defaults")
+var apiFetch = fetchDefaults(fetch, {
+ headers: { 'pragma': 'no-cache', 'cache-control': 'no-cache' }
+})
+
+export function CustomFetch(url, options) {
+
+ // Detect IE //
+ let ua = navigator.userAgent;
+ /* MSIE used to detect old browsers and Trident used to newer ones*/
+ let is_ie = ua.indexOf("MSIE ") > -1 || ua.indexOf("Trident/") > -1;
+
+ // Execute relevant fetch
+ if (is_ie) {
+ return apiFetch(url, options)
+ }
+ else {
+ return fetch(url, options)
+ }
+}
+
export function fixEmptyValue(value, defaultValue) {
if (isEmptyValue(value)) {
diff --git a/NDAO_Client_React/app/js/index.jsx b/NDAO_Client_React/app/js/index.jsx
index a3d1062..901d3e4 100644
--- a/NDAO_Client_React/app/js/index.jsx
+++ b/NDAO_Client_React/app/js/index.jsx
@@ -1,9 +1,8 @@
// IE fixes
import 'whatwg-fetch'
import smoothscroll from 'smoothscroll-polyfill'
-
smoothscroll.polyfill() // kick off the polyfill!
-
+// IE fixes
import React from 'react'
import ReactDOM from 'react-dom'
diff --git a/NDAO_Client_React/package-lock.json b/NDAO_Client_React/package-lock.json
index dcb3b03..8193c46 100644
--- a/NDAO_Client_React/package-lock.json
+++ b/NDAO_Client_React/package-lock.json
@@ -2148,8 +2148,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
- "dev": true,
- "optional": true
+ "dev": true
},
"assign-symbols": {
"version": "1.0.0",
@@ -4571,7 +4570,6 @@
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz",
"integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=",
"dev": true,
- "optional": true,
"requires": {
"delayed-stream": "~1.0.0"
}
@@ -5282,8 +5280,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
- "dev": true,
- "optional": true
+ "dev": true
},
"depd": {
"version": "1.1.2",
@@ -5940,8 +5937,7 @@
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
- "dev": true,
- "optional": true
+ "dev": true
},
"fast-deep-equal": {
"version": "1.1.0",
@@ -6287,6 +6283,14 @@
"ua-parser-js": "^0.7.9"
}
},
+ "fetch-defaults": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fetch-defaults/-/fetch-defaults-1.0.0.tgz",
+ "integrity": "sha1-y33ZhqTdNlbjQhYs7m+U5X/iSuc=",
+ "requires": {
+ "oolong": ">= 1.0.0 < 2"
+ }
+ },
"figgy-pudding": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz",
@@ -6560,8 +6564,7 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"aproba": {
"version": "1.2.0",
@@ -6582,14 +6585,12 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -6604,20 +6605,17 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"core-util-is": {
"version": "1.0.2",
@@ -6734,8 +6732,7 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"ini": {
"version": "1.3.5",
@@ -6747,7 +6744,6 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -6762,7 +6758,6 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -6770,14 +6765,12 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"minipass": {
"version": "2.2.4",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"safe-buffer": "^5.1.1",
"yallist": "^3.0.0"
@@ -6796,7 +6789,6 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -6877,8 +6869,7 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"object-assign": {
"version": "4.1.1",
@@ -6890,7 +6881,6 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"wrappy": "1"
}
@@ -6976,8 +6966,7 @@
"safe-buffer": {
"version": "5.1.1",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -7013,7 +7002,6 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -7033,7 +7021,6 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -7077,14 +7064,12 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"yallist": {
"version": "3.0.2",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
}
}
},
@@ -8699,9 +8684,9 @@
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls="
},
"js-yaml": {
- "version": "3.12.0",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz",
- "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==",
+ "version": "3.13.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
+ "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
"dev": true,
"requires": {
"argparse": "^1.0.7",
@@ -9435,21 +9420,23 @@
"requires": {
"@date-io/moment": "0.0.2",
"@fortawesome/fontawesome-free": "^5.7.1",
- "@material-ui/core": "^3.9.2",
- "bootstrap-css-only": "^4.3.1",
+ "@material-ui/core": "^3.4.0",
+ "bootstrap-css-only": "^4.2.1",
"chart.js": "^2.7.3",
"classnames": "^2.2.6",
"material-ui-pickers": "2.0.0",
"moment": "^2.22.2",
+ "outy": "^0.1.2",
"perfect-scrollbar": "^1.3.0",
"prop-types": "^15.6.2",
"raf": "^3.4.0",
- "react": "^16.8.6",
+ "react": "^16.8.1",
+ "react-autosuggest": "^9.3.4",
"react-chartjs-2": "^2.7.0",
- "react-dom": "^16.8.6",
+ "react-dom": "^16.8.1",
"react-image-lightbox": "5.0.0",
"react-numeric-input": "^2.2.3",
- "react-popper": "^1.3.3",
+ "react-popper": "^0.7.5",
"react-router-dom": "^4.3.1",
"react-scroll": "^1.7.10",
"react-toastify": "^3.2.2",
@@ -9522,27 +9509,6 @@
}
}
}
- },
- "react-popper": {
- "version": "1.3.3",
- "resolved": "https://registry.npmjs.org/react-popper/-/react-popper-1.3.3.tgz",
- "integrity": "sha512-ynMZBPkXONPc5K4P5yFWgZx5JGAUIP3pGGLNs58cfAPgK67olx7fmLp+AdpZ0+GoQ+ieFDa/z4cdV6u7sioH6w==",
- "requires": {
- "@babel/runtime": "^7.1.2",
- "create-react-context": "<=0.2.2",
- "popper.js": "^1.14.4",
- "prop-types": "^15.6.1",
- "typed-styles": "^0.0.7",
- "warning": "^4.0.2"
- }
- },
- "warning": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz",
- "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==",
- "requires": {
- "loose-envify": "^1.0.0"
- }
}
}
},
@@ -10341,6 +10307,11 @@
"mimic-fn": "^1.0.0"
}
},
+ "oolong": {
+ "version": "1.15.1",
+ "resolved": "https://registry.npmjs.org/oolong/-/oolong-1.15.1.tgz",
+ "integrity": "sha1-kLrJ585S9gkGqyIo2eKxFfEIbOo="
+ },
"opn": {
"version": "5.4.0",
"resolved": "https://registry.npmjs.org/opn/-/opn-5.4.0.tgz",
@@ -10508,6 +10479,11 @@
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
"dev": true
},
+ "outy": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/outy/-/outy-0.1.2.tgz",
+ "integrity": "sha1-WY05XkP5LlLZiq3/I7cqPnEotXI="
+ },
"p-cancelable": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz",
@@ -12244,6 +12220,26 @@
"prop-types": "^15.6.0"
}
},
+ "react-autosuggest": {
+ "version": "9.4.3",
+ "resolved": "https://registry.npmjs.org/react-autosuggest/-/react-autosuggest-9.4.3.tgz",
+ "integrity": "sha512-wFbp5QpgFQRfw9cwKvcgLR8theikOUkv8PFsuLYqI2PUgVlx186Cz8MYt5bLxculi+jxGGUUVt+h0esaBZZouw==",
+ "requires": {
+ "prop-types": "^15.5.10",
+ "react-autowhatever": "^10.1.2",
+ "shallow-equal": "^1.0.0"
+ }
+ },
+ "react-autowhatever": {
+ "version": "10.2.0",
+ "resolved": "https://registry.npmjs.org/react-autowhatever/-/react-autowhatever-10.2.0.tgz",
+ "integrity": "sha512-dqHH4uqiJldPMbL8hl/i2HV4E8FMTDEdVlOIbRqYnJi0kTpWseF9fJslk/KS9pGDnm80JkYzVI+nzFjnOG/u+g==",
+ "requires": {
+ "prop-types": "^15.5.8",
+ "react-themeable": "^1.1.0",
+ "section-iterator": "^2.0.0"
+ }
+ },
"react-chartjs-2": {
"version": "2.7.4",
"resolved": "https://registry.npmjs.org/react-chartjs-2/-/react-chartjs-2-2.7.4.tgz",
@@ -12369,6 +12365,15 @@
"resolved": "https://registry.npmjs.org/react-odata/-/react-odata-10.1.0.tgz",
"integrity": "sha1-+kBLlvfo6JZbgZh6xAiKWynIP5s="
},
+ "react-popper": {
+ "version": "0.7.5",
+ "resolved": "https://registry.npmjs.org/react-popper/-/react-popper-0.7.5.tgz",
+ "integrity": "sha512-ya9dhhGCf74JTOB2uyksEHhIGw7w9tNZRUJF73lEq2h4H5JT6MBa4PdT4G+sx6fZwq+xKZAL/sVNAIuojPn7Dg==",
+ "requires": {
+ "popper.js": "^1.12.5",
+ "prop-types": "^15.5.10"
+ }
+ },
"react-redux": {
"version": "5.0.7",
"resolved": "https://registry.npmjs.org/react-redux/-/react-redux-5.0.7.tgz",
@@ -12503,6 +12508,21 @@
"prop-types": "^15.6.0"
}
},
+ "react-themeable": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/react-themeable/-/react-themeable-1.1.0.tgz",
+ "integrity": "sha1-fURm3ZsrX6dQWHJ4JenxUro3mg4=",
+ "requires": {
+ "object-assign": "^3.0.0"
+ },
+ "dependencies": {
+ "object-assign": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz",
+ "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I="
+ }
+ }
+ },
"react-toastify": {
"version": "3.4.3",
"resolved": "https://registry.npmjs.org/react-toastify/-/react-toastify-3.4.3.tgz",
@@ -13111,6 +13131,11 @@
"integrity": "sha1-o0a7Gs1CB65wvXwMfKnlZra63bg=",
"dev": true
},
+ "section-iterator": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/section-iterator/-/section-iterator-2.0.0.tgz",
+ "integrity": "sha1-v0RNev7rlK1Dw5rS+yYVFifMuio="
+ },
"select-hose": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz",
@@ -14520,11 +14545,6 @@
"mime-types": "~2.1.18"
}
},
- "typed-styles": {
- "version": "0.0.7",
- "resolved": "https://registry.npmjs.org/typed-styles/-/typed-styles-0.0.7.tgz",
- "integrity": "sha512-pzP0PWoZUhsECYjABgCGQlRGL1n7tOHsgwYv3oIiEpJwGhFTuty/YNeduxQYzXXa3Ge5BdT6sHYIQYpl4uJ+5Q=="
- },
"typedarray": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
diff --git a/NDAO_Client_React/package.json b/NDAO_Client_React/package.json
index a4c786e..9b9924e 100644
--- a/NDAO_Client_React/package.json
+++ b/NDAO_Client_React/package.json
@@ -16,6 +16,7 @@
"bootstrap": "^4.1.3",
"date-fns": "^1.30.1",
"dom-to-image": "^2.6.0",
+ "fetch-defaults": "^1.0.0",
"font-awesome": "^4.7.0",
"js-file-download": "^0.4.4",
"json-2-csv": "^3.4.1",