-
- 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..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')
@@ -58,7 +59,6 @@ const defaultState = {
metaAuthors: [],
metaDocTitle: "",
metaKeywords: [],
- metaDocFormat: "",
metaDocDescr: "",
metaAgreement: false,
metaUID: "",
@@ -153,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]
@@ -168,7 +168,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 +224,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 +243,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 +262,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 +282,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
@@ -299,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",
@@ -328,7 +321,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 +385,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: [
@@ -441,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',
@@ -491,7 +484,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 (
@@ -603,7 +596,7 @@ class Goal6Contrib extends React.Component {
6.2 Add attachments to any evidence:
- {
@@ -611,7 +604,7 @@ class Goal6Contrib extends React.Component {
this.setState({ Q6_2: value })
}}
readOnly={true}
- />
+ /> */}
@@ -699,23 +692,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..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')
@@ -58,7 +59,6 @@ const defaultState = {
metaAuthors: [],
metaDocTitle: "",
metaKeywords: [],
- metaDocFormat: "",
metaDocDescr: "",
metaAgreement: false,
metaUID: "",
@@ -153,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]
@@ -168,7 +168,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 +224,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 +243,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 +262,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 +282,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
@@ -299,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",
@@ -328,7 +321,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 +385,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: [
@@ -441,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',
@@ -491,7 +484,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 (
@@ -608,7 +601,7 @@ class Goal7Contrib extends React.Component {
7.2 Add attachments to any evidence:
- {
@@ -616,7 +609,7 @@ class Goal7Contrib extends React.Component {
this.setState({ Q7_2: value })
}}
readOnly={true}
- />
+ /> */}
@@ -704,23 +697,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..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')
@@ -58,7 +59,6 @@ const defaultState = {
metaAuthors: [],
metaDocTitle: "",
metaKeywords: [],
- metaDocFormat: "",
metaDocDescr: "",
metaAgreement: false,
metaUID: "",
@@ -153,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]
@@ -168,7 +168,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 +224,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 +243,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 +262,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 +282,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
@@ -299,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",
@@ -328,7 +321,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 +385,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: [
@@ -441,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',
@@ -491,7 +484,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 (
@@ -614,7 +607,7 @@ class Goal8Contrib extends React.Component {
8.2 Add an attachments to any evidence:
- {
@@ -622,7 +615,7 @@ class Goal8Contrib extends React.Component {
this.setState({ Q8_2: value })
}}
readOnly={true}
- />
+ /> */}
@@ -710,23 +703,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..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')
@@ -58,7 +59,6 @@ const defaultState = {
metaAuthors: [],
metaDocTitle: "",
metaKeywords: [],
- metaDocFormat: "",
metaDocDescr: "",
metaAgreement: false,
metaUID: "",
@@ -153,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]
@@ -168,7 +168,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 +224,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 +243,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 +262,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 +282,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
@@ -299,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",
@@ -328,7 +321,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 +385,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: [
@@ -441,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',
@@ -491,7 +484,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 (
@@ -604,7 +597,7 @@ class Goal9Contrib extends React.Component {
9.2 Add attachments to any evidence:
- {
@@ -612,7 +605,7 @@ class Goal9Contrib extends React.Component {
this.setState({ Q9_2: value })
}}
readOnly={true}
- />
+ /> */}
@@ -700,23 +693,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 }) }}
- />
-
-
-
-
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..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'
@@ -15,18 +15,17 @@ import GoalFilter from './Filters/GoalFilter.jsx'
import { apiBaseURL, vmsBaseURL } from '../../../../js/config/serviceURLs.js'
import InstitutionFilter from './Filters/InstitutionFilter.jsx'
import MapViewCore from '../../visualization/Map/MapViewCore.jsx'
-import NCCRD_Preview from './NCCRD_Preview/NCCRD_Preview.jsx'
-import NDMC_Preview from './NDMC_Preview/NDMC_Preview.jsx'
-import SARVA_Preview from './SARVA_Preview/SARVA_Preview.jsx'
-import FundingIGFX from './InfoGraphics/FundingIGFX.jsx'
-import PlansIGFX from './InfoGraphics/PlansIGFX.jsx'
-import GovernmentsIGFX from './InfoGraphics/GovernmentsIGFX.jsx'
-import GHGReductionIGFX from './InfoGraphics/GHGReductionIGFX.jsx'
-import SectorsIGFX from './InfoGraphics/SectorsIGFX.jsx'
+// import NCCRD_Preview from './NCCRD_Preview/NCCRD_Preview.jsx'
+// import NDMC_Preview from './NDMC_Preview/NDMC_Preview.jsx'
+// import SARVA_Preview from './SARVA_Preview/SARVA_Preview.jsx'
+// import FundingIGFX from './InfoGraphics/FundingIGFX.jsx'
+// import PlansIGFX from './InfoGraphics/PlansIGFX.jsx'
+// import GovernmentsIGFX from './InfoGraphics/GovernmentsIGFX.jsx'
+// import GHGReductionIGFX from './InfoGraphics/GHGReductionIGFX.jsx'
+// import SectorsIGFX from './InfoGraphics/SectorsIGFX.jsx'
import GoalDetails from './GoalDetails.jsx'
import { CSVLink } from 'react-csv'
-import { json2csv } from 'json-2-csv';
-
+import { CustomFetch } from '../../../globalFunctions.js';
const mapStateToProps = (state, props) => {
return {}
@@ -143,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) {
@@ -171,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")
@@ -196,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
@@ -220,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
@@ -264,10 +263,10 @@ class Home extends React.Component {
goalData, goalDataUnfiltered, trafficLightFull, mapFullView
} = this.state
- let qData = [{
+ let qData = [{
Id: "",
- Key:"",
- Value:""
+ Key: "",
+ Value: ""
}]
return (
@@ -285,20 +284,26 @@ class Home extends React.Component {
/>