diff --git a/AoUconnect/AoUconnect.css b/AoUconnect/AoUconnect.css deleted file mode 100644 index 93d41057..00000000 --- a/AoUconnect/AoUconnect.css +++ /dev/null @@ -1,7 +0,0 @@ -body { - color:navy -} - -h2 { - color:maroon -} \ No newline at end of file diff --git a/AoUconnect/AoUconnect.js b/AoUconnect/AoUconnect.js deleted file mode 100644 index 84844f54..00000000 --- a/AoUconnect/AoUconnect.js +++ /dev/null @@ -1,17 +0,0 @@ -console.log('AoUconnect.js started') - -AoUconnect=function(){ // ini - // check env and initialize UI is fitting - // ... -} - -AoUconnect.check=function(el){ - if(el.checked){ - connectEnrolled.innerText='enrolled, thank you!' - connectEnrolled.style.color='green' - }else{ - connectEnrolled.innerText='not enrolled' - connectEnrolled.style.color='orange' - } - //debugger -} diff --git a/AoUconnect/index.html b/AoUconnect/index.html deleted file mode 100644 index d93479ef..00000000 --- a/AoUconnect/index.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - -
-

AoUconnect [code]

-

Exploring cross-AUTH2ed stateless API calls bewteen NIH All-of-Us and DCEG Connect

-
-
-

(while logged in AoU ...)

- also participate in NCI's Connect Cancer Prevention Study? -
(not enrolled) -
-
- -
- - \ No newline at end of file diff --git a/KaiserPrototype/assets/css/dashboard.css b/KaiserPrototype/assets/css/dashboard.css deleted file mode 100644 index e69de29b..00000000 diff --git a/KaiserPrototype/index.html b/KaiserPrototype/index.html deleted file mode 100644 index 2fd10ca8..00000000 --- a/KaiserPrototype/index.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - Kaiser Permanente Participant Facing App Prototype - - -
-

Kaiser Permanente Participant Facing App Prototype

-
- -
-
- -
-
- -
-
- - -
-
- -
-
- -
-
-
- - - -
-
- - -
-
- - -
- -
-
- - \ No newline at end of file diff --git a/README.md b/README.md index 783c2a6a..c7fcad27 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ -# dashboard -hosting dashboard front ends, suggested with a -``` -episphere.github.io/dashboard/foldername -``` -template. See https://episphere.github.io/dashboard for list. +# Study Manager Dashboard + +This repo implements study manager dashboard for Connect project. + +[Here](https://episphere.github.io/studyManagerDashboard/) is the dashboard hosted on GitHub. diff --git a/siteManagerDashboard/assets/css/dashboard.css b/assets/css/dashboard.css similarity index 99% rename from siteManagerDashboard/assets/css/dashboard.css rename to assets/css/dashboard.css index a222a330..6e3d2d89 100644 --- a/siteManagerDashboard/assets/css/dashboard.css +++ b/assets/css/dashboard.css @@ -339,4 +339,8 @@ table { font-size: 1rem; border-radius: .25rem; width: 100px; - } \ No newline at end of file + } + +#appVersion { + font-size: 0.8rem; +} \ No newline at end of file diff --git a/siteManagerDashboard/assets/images/22.png b/assets/images/22.png similarity index 100% rename from siteManagerDashboard/assets/images/22.png rename to assets/images/22.png diff --git a/siteManagerDashboard/assets/images/Connect-Desktop-Thank-You-Acknowledgement-Email-Header.png b/assets/images/Connect-Desktop-Thank-You-Acknowledgement-Email-Header.png similarity index 100% rename from siteManagerDashboard/assets/images/Connect-Desktop-Thank-You-Acknowledgement-Email-Header.png rename to assets/images/Connect-Desktop-Thank-You-Acknowledgement-Email-Header.png diff --git a/siteManagerDashboard/assets/images/Connect-Favicon-96x96.png b/assets/images/Connect-Favicon-96x96.png similarity index 100% rename from siteManagerDashboard/assets/images/Connect-Favicon-96x96.png rename to assets/images/Connect-Favicon-96x96.png diff --git a/siteManagerDashboard/assets/images/anniversary-graphic.png b/assets/images/anniversary-graphic.png similarity index 100% rename from siteManagerDashboard/assets/images/anniversary-graphic.png rename to assets/images/anniversary-graphic.png diff --git a/assets/images/anniversary-spanish-graphic.png b/assets/images/anniversary-spanish-graphic.png new file mode 100644 index 00000000..b4b91076 Binary files /dev/null and b/assets/images/anniversary-spanish-graphic.png differ diff --git a/siteManagerDashboard/assets/images/banner202404.png b/assets/images/banner202404.png similarity index 100% rename from siteManagerDashboard/assets/images/banner202404.png rename to assets/images/banner202404.png diff --git a/siteManagerDashboard/assets/images/bannerfactoid1.jpg b/assets/images/bannerfactoid1.jpg similarity index 100% rename from siteManagerDashboard/assets/images/bannerfactoid1.jpg rename to assets/images/bannerfactoid1.jpg diff --git a/siteManagerDashboard/assets/images/connect.png b/assets/images/connect.png similarity index 100% rename from siteManagerDashboard/assets/images/connect.png rename to assets/images/connect.png diff --git a/siteManagerDashboard/assets/images/connectlogo.png b/assets/images/connectlogo.png similarity index 100% rename from siteManagerDashboard/assets/images/connectlogo.png rename to assets/images/connectlogo.png diff --git a/siteManagerDashboard/assets/images/december-banner.png b/assets/images/december-banner.png similarity index 100% rename from siteManagerDashboard/assets/images/december-banner.png rename to assets/images/december-banner.png diff --git a/siteManagerDashboard/assets/images/did-you-know-sleep-1000px.png b/assets/images/did-you-know-sleep-1000px.png similarity index 100% rename from siteManagerDashboard/assets/images/did-you-know-sleep-1000px.png rename to assets/images/did-you-know-sleep-1000px.png diff --git a/siteManagerDashboard/assets/images/didyouknow202404.png b/assets/images/didyouknow202404.png similarity index 100% rename from siteManagerDashboard/assets/images/didyouknow202404.png rename to assets/images/didyouknow202404.png diff --git a/siteManagerDashboard/assets/images/didyouknowimg.jpg b/assets/images/didyouknowimg.jpg similarity index 100% rename from siteManagerDashboard/assets/images/didyouknowimg.jpg rename to assets/images/didyouknowimg.jpg diff --git a/siteManagerDashboard/assets/images/fallbanner.gif b/assets/images/fallbanner.gif similarity index 100% rename from siteManagerDashboard/assets/images/fallbanner.gif rename to assets/images/fallbanner.gif diff --git a/siteManagerDashboard/assets/images/headshotimg1.jpeg b/assets/images/headshotimg1.jpeg similarity index 100% rename from siteManagerDashboard/assets/images/headshotimg1.jpeg rename to assets/images/headshotimg1.jpeg diff --git a/siteManagerDashboard/assets/images/headshotimg2.jpg b/assets/images/headshotimg2.jpg similarity index 100% rename from siteManagerDashboard/assets/images/headshotimg2.jpg rename to assets/images/headshotimg2.jpg diff --git a/siteManagerDashboard/assets/images/headshotimg202404.jpeg b/assets/images/headshotimg202404.jpeg similarity index 100% rename from siteManagerDashboard/assets/images/headshotimg202404.jpeg rename to assets/images/headshotimg202404.jpeg diff --git a/siteManagerDashboard/assets/images/headshotimg3.jpeg b/assets/images/headshotimg3.jpeg similarity index 100% rename from siteManagerDashboard/assets/images/headshotimg3.jpeg rename to assets/images/headshotimg3.jpeg diff --git a/siteManagerDashboard/assets/images/headshotimg4.jpg b/assets/images/headshotimg4.jpg similarity index 100% rename from siteManagerDashboard/assets/images/headshotimg4.jpg rename to assets/images/headshotimg4.jpg diff --git a/siteManagerDashboard/assets/images/headshotimg5.jpeg b/assets/images/headshotimg5.jpeg similarity index 100% rename from siteManagerDashboard/assets/images/headshotimg5.jpeg rename to assets/images/headshotimg5.jpeg diff --git a/siteManagerDashboard/assets/images/headshotimg6.png b/assets/images/headshotimg6.png similarity index 100% rename from siteManagerDashboard/assets/images/headshotimg6.png rename to assets/images/headshotimg6.png diff --git a/siteManagerDashboard/assets/images/maybanner.gif b/assets/images/maybanner.gif similarity index 100% rename from siteManagerDashboard/assets/images/maybanner.gif rename to assets/images/maybanner.gif diff --git a/siteManagerDashboard/assets/images/oneyear.gif b/assets/images/oneyear.gif similarity index 100% rename from siteManagerDashboard/assets/images/oneyear.gif rename to assets/images/oneyear.gif diff --git a/siteManagerDashboard/assets/images/participants.gif b/assets/images/participants.gif similarity index 100% rename from siteManagerDashboard/assets/images/participants.gif rename to assets/images/participants.gif diff --git a/siteManagerDashboard/assets/images/snow.gif b/assets/images/snow.gif similarity index 100% rename from siteManagerDashboard/assets/images/snow.gif rename to assets/images/snow.gif diff --git a/siteManagerDashboard/assets/images/thankyoubanner.png b/assets/images/thankyoubanner.png similarity index 100% rename from siteManagerDashboard/assets/images/thankyoubanner.png rename to assets/images/thankyoubanner.png diff --git a/boxStreamTest/boxStream.js b/boxStreamTest/boxStream.js deleted file mode 100644 index 835a6f70..00000000 --- a/boxStreamTest/boxStream.js +++ /dev/null @@ -1,32 +0,0 @@ -function loadBox() { - const boxPopup = new BoxSelect() - boxPopup.success(handleStream) - boxPopup.cancel(() => { - console.log("The user clicked cancel or closed the popup"); - }) -} - -async function handleStream(response) { - const fileData = await fetch(response[0].url) - const totalSize = parseInt(fileData.headers.get('Content-Length')) - const reader = fileData.body.getReader() - let dataDoneStreaming = 0 - const streamAndRead = async (numChunks = 0) => { - const chunk = await reader.read() - if (chunk.done) { - return numChunks - } - numChunks += 1 - dataDoneStreaming += chunk.value.length - const streamProgress = Math.round((dataDoneStreaming / totalSize) * 100); - document.getElementById("streamProgress").value = streamProgress - // DO STUFF TO THE STREAMED DATA HERE BEFORE GOING TO GET NEXT CHUNK - return streamAndRead(numChunks) - } - document.getElementById("filename").innerHTML = `Streaming File: ${response[0].name}` - document.getElementById("progressBar").style.display = "block" - const chunkCount = await streamAndRead() - alert(`Done! Total Chunks of Data Streamed: ${chunkCount}`) -} - -window.onload = loadBox \ No newline at end of file diff --git a/boxStreamTest/index.html b/boxStreamTest/index.html deleted file mode 100644 index 19ddeb97..00000000 --- a/boxStreamTest/index.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - -
-

Box Streaming Demo

-
-
-
-
- -
-
-
- - - - \ No newline at end of file diff --git a/config/dev/cloudbuild.yaml b/config/dev/cloudbuild.yaml new file mode 100644 index 00000000..44cadbfe --- /dev/null +++ b/config/dev/cloudbuild.yaml @@ -0,0 +1,3 @@ +steps: +- name: 'gcr.io/cloud-builders/gsutil' + args: ['cp', '-r', '*', 'gs://myconnect_dashboard_dev'] \ No newline at end of file diff --git a/siteManagerDashboard/dev/config.js b/config/dev/config.js similarity index 100% rename from siteManagerDashboard/dev/config.js rename to config/dev/config.js diff --git a/siteManagerDashboard/dev/identityProvider.js b/config/dev/identityProvider.js similarity index 100% rename from siteManagerDashboard/dev/identityProvider.js rename to config/dev/identityProvider.js diff --git a/config/prod/cloudbuild.yaml b/config/prod/cloudbuild.yaml new file mode 100644 index 00000000..fc5038db --- /dev/null +++ b/config/prod/cloudbuild.yaml @@ -0,0 +1,3 @@ +steps: +- name: 'gcr.io/cloud-builders/gsutil' + args: ['cp', '-r', '*', 'gs://myconnect_dashboard_prod'] \ No newline at end of file diff --git a/siteManagerDashboard/prod/config.js b/config/prod/config.js similarity index 100% rename from siteManagerDashboard/prod/config.js rename to config/prod/config.js diff --git a/siteManagerDashboard/prod/identityProvider.js b/config/prod/identityProvider.js similarity index 100% rename from siteManagerDashboard/prod/identityProvider.js rename to config/prod/identityProvider.js diff --git a/config/stage/cloudbuild.yaml b/config/stage/cloudbuild.yaml new file mode 100644 index 00000000..5c4f9c36 --- /dev/null +++ b/config/stage/cloudbuild.yaml @@ -0,0 +1,3 @@ +steps: +- name: 'gcr.io/cloud-builders/gsutil' + args: ['cp', '-r', '*', 'gs://myconnect_dashboard_stage'] \ No newline at end of file diff --git a/siteManagerDashboard/stage/config.js b/config/stage/config.js similarity index 100% rename from siteManagerDashboard/stage/config.js rename to config/stage/config.js diff --git a/siteManagerDashboard/stage/identityProvider.js b/config/stage/identityProvider.js similarity index 100% rename from siteManagerDashboard/stage/identityProvider.js rename to config/stage/identityProvider.js diff --git a/connect.png b/connect.png deleted file mode 100644 index 2285d07b..00000000 Binary files a/connect.png and /dev/null differ diff --git a/connectFlower.png b/connectFlower.png deleted file mode 100644 index 9381aa5a..00000000 Binary files a/connectFlower.png and /dev/null differ diff --git a/connectFrog.json b/connectFrog.json deleted file mode 100644 index ca08eee8..00000000 --- a/connectFrog.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "@id":"https://github.com/FrogGirl1123", - "@context":"https://dceg.cancer.gov/research/who-we-study/cohorts/connect", - "url": "episphere.github.io/dashboard/connectFrog.json", - "id": "frog123", - "edit_at":"https://github.com/episphere/dashboard/edit/master/connectFrog.json", - "vers": "remember github also keeps one or two", - "description":"who is Dr. Frog Girl", - "lala":"lele", - "notes": "note how governance is managed at the dereferencing level, not UI", - "edit":"https://github.com/episphere/dashboard/edit/master/connectFrog.json", - "type":"input", - "@fun":"function(x){return prompt('who is Dr Frog Girl?')}" -} diff --git a/dashboard.css b/dashboard.css deleted file mode 100644 index 0196559a..00000000 --- a/dashboard.css +++ /dev/null @@ -1,8 +0,0 @@ -body { - color:navy; - font-family:sans-serif -} - -h2 { - color:maroon -} \ No newline at end of file diff --git a/dashboard.js b/dashboard.js deleted file mode 100644 index e69de29b..00000000 diff --git a/fileUpload/index.html b/fileUpload/index.html deleted file mode 100644 index 0e9087d1..00000000 --- a/fileUpload/index.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - Document - - -
- -

- -

- -
-
- -

- Maximum file size: 10 mb
- - - \ No newline at end of file diff --git a/fileUpload/index.js b/fileUpload/index.js deleted file mode 100644 index a9ff06a8..00000000 --- a/fileUpload/index.js +++ /dev/null @@ -1,29 +0,0 @@ -window.onload = () => { - const form = document.getElementById('uploadForm'); - form.addEventListener('submit', async e => { - e.preventDefault(); - const span = document.getElementById('responseMessage'); - span.innerHTML = 'Uploading'; - const formData = new FormData(); - const fileField = document.getElementById("fileRecords"); - const siteKey = document.getElementById("siteKey").value; - formData.append('file', fileField.files[0]); - - const response = await fetch('https://us-central1-nih-nci-dceg-episphere-dev.cloudfunctions.net/uploadHealthRecords', { - method: 'POST', - body: formData, - headers: { - Authorization:"Bearer "+siteKey - } - }); - const responseJson = await response.json(); - if(responseJson.code === 200) { - span.innerHTML = 'File uploaded!'; - span.style.color = 'green'; - } - else { - span.innerHTML = `${responseJson.message}` - span.style.color = 'red'; - } - }) -} \ No newline at end of file diff --git a/siteManagerDashboard/forms/Consent/BSWH_consent_V0.02.pdf b/forms/Consent/BSWH_consent_V0.02.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/BSWH_consent_V0.02.pdf rename to forms/Consent/BSWH_consent_V0.02.pdf diff --git a/forms/Consent/BSWH_consent_V0.02_Span.pdf b/forms/Consent/BSWH_consent_V0.02_Span.pdf new file mode 100644 index 00000000..252cccb5 Binary files /dev/null and b/forms/Consent/BSWH_consent_V0.02_Span.pdf differ diff --git a/siteManagerDashboard/forms/Consent/HFHS_consent_V0.02.pdf b/forms/Consent/HFHS_consent_V0.02.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/HFHS_consent_V0.02.pdf rename to forms/Consent/HFHS_consent_V0.02.pdf diff --git a/siteManagerDashboard/forms/Consent/HFHS_consent_V0.03.pdf b/forms/Consent/HFHS_consent_V0.03.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/HFHS_consent_V0.03.pdf rename to forms/Consent/HFHS_consent_V0.03.pdf diff --git a/forms/Consent/HFHS_consent_V0.03_Span.pdf b/forms/Consent/HFHS_consent_V0.03_Span.pdf new file mode 100644 index 00000000..55646476 Binary files /dev/null and b/forms/Consent/HFHS_consent_V0.03_Span.pdf differ diff --git a/siteManagerDashboard/forms/Consent/HFHS_consent_V1.0.pdf b/forms/Consent/HFHS_consent_V1.0.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/HFHS_consent_V1.0.pdf rename to forms/Consent/HFHS_consent_V1.0.pdf diff --git a/siteManagerDashboard/forms/Consent/HP_consent_V0.02.pdf b/forms/Consent/HP_consent_V0.02.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/HP_consent_V0.02.pdf rename to forms/Consent/HP_consent_V0.02.pdf diff --git a/siteManagerDashboard/forms/Consent/HP_consent_V0.04.pdf b/forms/Consent/HP_consent_V0.04.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/HP_consent_V0.04.pdf rename to forms/Consent/HP_consent_V0.04.pdf diff --git a/siteManagerDashboard/forms/Consent/HP_consent_V0.05.pdf b/forms/Consent/HP_consent_V0.05.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/HP_consent_V0.05.pdf rename to forms/Consent/HP_consent_V0.05.pdf diff --git a/forms/Consent/HP_consent_V0.05_Span.pdf b/forms/Consent/HP_consent_V0.05_Span.pdf new file mode 100644 index 00000000..6e131a6a Binary files /dev/null and b/forms/Consent/HP_consent_V0.05_Span.pdf differ diff --git a/siteManagerDashboard/forms/Consent/HP_consent_V1.0.pdf b/forms/Consent/HP_consent_V1.0.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/HP_consent_V1.0.pdf rename to forms/Consent/HP_consent_V1.0.pdf diff --git a/siteManagerDashboard/forms/Consent/KPCO_consent_V0.02.pdf b/forms/Consent/KPCO_consent_V0.02.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/KPCO_consent_V0.02.pdf rename to forms/Consent/KPCO_consent_V0.02.pdf diff --git a/siteManagerDashboard/forms/Consent/KPCO_consent_V0.03.pdf b/forms/Consent/KPCO_consent_V0.03.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/KPCO_consent_V0.03.pdf rename to forms/Consent/KPCO_consent_V0.03.pdf diff --git a/siteManagerDashboard/forms/Consent/Sanford_consent_V0.03_Span.pdf b/forms/Consent/KPCO_consent_V0.03_Span.pdf similarity index 64% rename from siteManagerDashboard/forms/Consent/Sanford_consent_V0.03_Span.pdf rename to forms/Consent/KPCO_consent_V0.03_Span.pdf index a72652a5..0aa59a17 100644 Binary files a/siteManagerDashboard/forms/Consent/Sanford_consent_V0.03_Span.pdf and b/forms/Consent/KPCO_consent_V0.03_Span.pdf differ diff --git a/siteManagerDashboard/forms/Consent/KPCO_consent_V1.0.pdf b/forms/Consent/KPCO_consent_V1.0.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/KPCO_consent_V1.0.pdf rename to forms/Consent/KPCO_consent_V1.0.pdf diff --git a/siteManagerDashboard/forms/Consent/KPGA_consent_V0.02.pdf b/forms/Consent/KPGA_consent_V0.02.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/KPGA_consent_V0.02.pdf rename to forms/Consent/KPGA_consent_V0.02.pdf diff --git a/siteManagerDashboard/forms/Consent/KPGA_consent_V0.03.pdf b/forms/Consent/KPGA_consent_V0.03.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/KPGA_consent_V0.03.pdf rename to forms/Consent/KPGA_consent_V0.03.pdf diff --git a/siteManagerDashboard/forms/Consent/KPGA_consent_V0.04.pdf b/forms/Consent/KPGA_consent_V0.04.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/KPGA_consent_V0.04.pdf rename to forms/Consent/KPGA_consent_V0.04.pdf diff --git a/forms/Consent/KPGA_consent_V0.04_Span.pdf b/forms/Consent/KPGA_consent_V0.04_Span.pdf new file mode 100644 index 00000000..93b21f9e Binary files /dev/null and b/forms/Consent/KPGA_consent_V0.04_Span.pdf differ diff --git a/siteManagerDashboard/forms/Consent/KPGA_consent_V1.0.pdf b/forms/Consent/KPGA_consent_V1.0.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/KPGA_consent_V1.0.pdf rename to forms/Consent/KPGA_consent_V1.0.pdf diff --git a/siteManagerDashboard/forms/Consent/KPHI_consent_V0.02.pdf b/forms/Consent/KPHI_consent_V0.02.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/KPHI_consent_V0.02.pdf rename to forms/Consent/KPHI_consent_V0.02.pdf diff --git a/siteManagerDashboard/forms/Consent/KPHI_consent_V0.03.pdf b/forms/Consent/KPHI_consent_V0.03.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/KPHI_consent_V0.03.pdf rename to forms/Consent/KPHI_consent_V0.03.pdf diff --git a/siteManagerDashboard/forms/Consent/KPHI_consent_V0.03_Span.pdf b/forms/Consent/KPHI_consent_V0.03_Span.pdf similarity index 71% rename from siteManagerDashboard/forms/Consent/KPHI_consent_V0.03_Span.pdf rename to forms/Consent/KPHI_consent_V0.03_Span.pdf index 1a87492f..cdc65c25 100644 Binary files a/siteManagerDashboard/forms/Consent/KPHI_consent_V0.03_Span.pdf and b/forms/Consent/KPHI_consent_V0.03_Span.pdf differ diff --git a/siteManagerDashboard/forms/Consent/KPHI_consent_V1.0.pdf b/forms/Consent/KPHI_consent_V1.0.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/KPHI_consent_V1.0.pdf rename to forms/Consent/KPHI_consent_V1.0.pdf diff --git a/siteManagerDashboard/forms/Consent/KPNW_consent_V0.02.pdf b/forms/Consent/KPNW_consent_V0.02.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/KPNW_consent_V0.02.pdf rename to forms/Consent/KPNW_consent_V0.02.pdf diff --git a/siteManagerDashboard/forms/Consent/KPNW_consent_V0.03.pdf b/forms/Consent/KPNW_consent_V0.03.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/KPNW_consent_V0.03.pdf rename to forms/Consent/KPNW_consent_V0.03.pdf diff --git a/forms/Consent/KPNW_consent_V0.03_Span.pdf b/forms/Consent/KPNW_consent_V0.03_Span.pdf new file mode 100644 index 00000000..bd0ae65b Binary files /dev/null and b/forms/Consent/KPNW_consent_V0.03_Span.pdf differ diff --git a/siteManagerDashboard/forms/Consent/KPNW_consent_V1.0.pdf b/forms/Consent/KPNW_consent_V1.0.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/KPNW_consent_V1.0.pdf rename to forms/Consent/KPNW_consent_V1.0.pdf diff --git a/siteManagerDashboard/forms/Consent/MFC_consent_V0.02.pdf b/forms/Consent/MFC_consent_V0.02.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/MFC_consent_V0.02.pdf rename to forms/Consent/MFC_consent_V0.02.pdf diff --git a/siteManagerDashboard/forms/Consent/MFC_consent_V0.03.pdf b/forms/Consent/MFC_consent_V0.03.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/MFC_consent_V0.03.pdf rename to forms/Consent/MFC_consent_V0.03.pdf diff --git a/forms/Consent/MFC_consent_V0.03_Span.pdf b/forms/Consent/MFC_consent_V0.03_Span.pdf new file mode 100644 index 00000000..0e0a4089 Binary files /dev/null and b/forms/Consent/MFC_consent_V0.03_Span.pdf differ diff --git a/siteManagerDashboard/forms/Consent/MFC_consent_V1.0.pdf b/forms/Consent/MFC_consent_V1.0.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/MFC_consent_V1.0.pdf rename to forms/Consent/MFC_consent_V1.0.pdf diff --git a/siteManagerDashboard/forms/Consent/NCI_consent_V0.02.pdf b/forms/Consent/NCI_consent_V0.02.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/NCI_consent_V0.02.pdf rename to forms/Consent/NCI_consent_V0.02.pdf diff --git a/siteManagerDashboard/forms/Consent/NCI_consent_V0.05.pdf b/forms/Consent/NCI_consent_V0.05.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/NCI_consent_V0.05.pdf rename to forms/Consent/NCI_consent_V0.05.pdf diff --git a/forms/Consent/NCI_consent_V0.05_Span.pdf b/forms/Consent/NCI_consent_V0.05_Span.pdf new file mode 100644 index 00000000..62f8d0cc Binary files /dev/null and b/forms/Consent/NCI_consent_V0.05_Span.pdf differ diff --git a/siteManagerDashboard/forms/Consent/NCI_consent_V1.0.pdf b/forms/Consent/NCI_consent_V1.0.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/NCI_consent_V1.0.pdf rename to forms/Consent/NCI_consent_V1.0.pdf diff --git a/siteManagerDashboard/forms/Consent/Sanford_consent_V0.02.pdf b/forms/Consent/Sanford_consent_V0.02.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/Sanford_consent_V0.02.pdf rename to forms/Consent/Sanford_consent_V0.02.pdf diff --git a/siteManagerDashboard/forms/Consent/Sanford_consent_V0.03.pdf b/forms/Consent/Sanford_consent_V0.03.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/Sanford_consent_V0.03.pdf rename to forms/Consent/Sanford_consent_V0.03.pdf diff --git a/forms/Consent/Sanford_consent_V0.03_Span.pdf b/forms/Consent/Sanford_consent_V0.03_Span.pdf new file mode 100644 index 00000000..678252a5 Binary files /dev/null and b/forms/Consent/Sanford_consent_V0.03_Span.pdf differ diff --git a/siteManagerDashboard/forms/Consent/Sanford_consent_V1.0.pdf b/forms/Consent/Sanford_consent_V1.0.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/Sanford_consent_V1.0.pdf rename to forms/Consent/Sanford_consent_V1.0.pdf diff --git a/siteManagerDashboard/forms/Consent/UCM_consent_V0.02.pdf b/forms/Consent/UCM_consent_V0.02.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/UCM_consent_V0.02.pdf rename to forms/Consent/UCM_consent_V0.02.pdf diff --git a/siteManagerDashboard/forms/Consent/UCM_consent_V0.04.pdf b/forms/Consent/UCM_consent_V0.04.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/UCM_consent_V0.04.pdf rename to forms/Consent/UCM_consent_V0.04.pdf diff --git a/siteManagerDashboard/forms/Consent/UCM_consent_V0.05.pdf b/forms/Consent/UCM_consent_V0.05.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/UCM_consent_V0.05.pdf rename to forms/Consent/UCM_consent_V0.05.pdf diff --git a/forms/Consent/UCM_consent_V0.05_Span.pdf b/forms/Consent/UCM_consent_V0.05_Span.pdf new file mode 100644 index 00000000..610d226c Binary files /dev/null and b/forms/Consent/UCM_consent_V0.05_Span.pdf differ diff --git a/siteManagerDashboard/forms/Consent/UCM_consent_V1.0.pdf b/forms/Consent/UCM_consent_V1.0.pdf similarity index 100% rename from siteManagerDashboard/forms/Consent/UCM_consent_V1.0.pdf rename to forms/Consent/UCM_consent_V1.0.pdf diff --git a/siteManagerDashboard/forms/Data Destruction/Data_Destruction_V1.0.pdf b/forms/Data Destruction/Data_Destruction_V1.0.pdf similarity index 100% rename from siteManagerDashboard/forms/Data Destruction/Data_Destruction_V1.0.pdf rename to forms/Data Destruction/Data_Destruction_V1.0.pdf diff --git a/forms/Data Destruction/Data_Destruction_V1.0_Span.pdf b/forms/Data Destruction/Data_Destruction_V1.0_Span.pdf new file mode 100644 index 00000000..e2fb09f3 Binary files /dev/null and b/forms/Data Destruction/Data_Destruction_V1.0_Span.pdf differ diff --git a/siteManagerDashboard/forms/HIPAA Revocation/HIPAA_Revocation_V1.0.pdf b/forms/HIPAA Revocation/HIPAA_Revocation_V1.0.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA Revocation/HIPAA_Revocation_V1.0.pdf rename to forms/HIPAA Revocation/HIPAA_Revocation_V1.0.pdf diff --git a/forms/HIPAA Revocation/HIPAA_Revocation_V1.0_Span.pdf b/forms/HIPAA Revocation/HIPAA_Revocation_V1.0_Span.pdf new file mode 100644 index 00000000..4bc3faa9 Binary files /dev/null and b/forms/HIPAA Revocation/HIPAA_Revocation_V1.0_Span.pdf differ diff --git a/siteManagerDashboard/forms/HIPAA/BSWH_HIPAA_V0.01.pdf b/forms/HIPAA/BSWH_HIPAA_V0.01.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/BSWH_HIPAA_V0.01.pdf rename to forms/HIPAA/BSWH_HIPAA_V0.01.pdf diff --git a/siteManagerDashboard/forms/HIPAA/BSWH_HIPAA_V0.01_Span.pdf b/forms/HIPAA/BSWH_HIPAA_V0.01_Span.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/BSWH_HIPAA_V0.01_Span.pdf rename to forms/HIPAA/BSWH_HIPAA_V0.01_Span.pdf diff --git a/siteManagerDashboard/forms/HIPAA/HFHS_HIPAA_V0.02.pdf b/forms/HIPAA/HFHS_HIPAA_V0.02.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/HFHS_HIPAA_V0.02.pdf rename to forms/HIPAA/HFHS_HIPAA_V0.02.pdf diff --git a/siteManagerDashboard/forms/HIPAA/HFHS_HIPAA_V0.02_Span.pdf b/forms/HIPAA/HFHS_HIPAA_V0.02_Span.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/HFHS_HIPAA_V0.02_Span.pdf rename to forms/HIPAA/HFHS_HIPAA_V0.02_Span.pdf diff --git a/siteManagerDashboard/forms/HIPAA/HFHS_HIPAA_V1.0.pdf b/forms/HIPAA/HFHS_HIPAA_V1.0.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/HFHS_HIPAA_V1.0.pdf rename to forms/HIPAA/HFHS_HIPAA_V1.0.pdf diff --git a/siteManagerDashboard/forms/HIPAA/HP_HIPAA_V0.02.pdf b/forms/HIPAA/HP_HIPAA_V0.02.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/HP_HIPAA_V0.02.pdf rename to forms/HIPAA/HP_HIPAA_V0.02.pdf diff --git a/siteManagerDashboard/forms/HIPAA/HP_HIPAA_V0.03.pdf b/forms/HIPAA/HP_HIPAA_V0.03.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/HP_HIPAA_V0.03.pdf rename to forms/HIPAA/HP_HIPAA_V0.03.pdf diff --git a/siteManagerDashboard/forms/HIPAA/HP_HIPAA_V0.03_Span.pdf b/forms/HIPAA/HP_HIPAA_V0.03_Span.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/HP_HIPAA_V0.03_Span.pdf rename to forms/HIPAA/HP_HIPAA_V0.03_Span.pdf diff --git a/siteManagerDashboard/forms/HIPAA/HP_HIPAA_V1.0.pdf b/forms/HIPAA/HP_HIPAA_V1.0.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/HP_HIPAA_V1.0.pdf rename to forms/HIPAA/HP_HIPAA_V1.0.pdf diff --git a/siteManagerDashboard/forms/HIPAA/KPCO_HIPAA_V0.02.pdf b/forms/HIPAA/KPCO_HIPAA_V0.02.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/KPCO_HIPAA_V0.02.pdf rename to forms/HIPAA/KPCO_HIPAA_V0.02.pdf diff --git a/siteManagerDashboard/forms/HIPAA/KPCO_HIPAA_V0.02_Span.pdf b/forms/HIPAA/KPCO_HIPAA_V0.02_Span.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/KPCO_HIPAA_V0.02_Span.pdf rename to forms/HIPAA/KPCO_HIPAA_V0.02_Span.pdf diff --git a/siteManagerDashboard/forms/HIPAA/KPCO_HIPAA_V1.0.pdf b/forms/HIPAA/KPCO_HIPAA_V1.0.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/KPCO_HIPAA_V1.0.pdf rename to forms/HIPAA/KPCO_HIPAA_V1.0.pdf diff --git a/siteManagerDashboard/forms/HIPAA/KPGA_HIPAA_V0.02.pdf b/forms/HIPAA/KPGA_HIPAA_V0.02.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/KPGA_HIPAA_V0.02.pdf rename to forms/HIPAA/KPGA_HIPAA_V0.02.pdf diff --git a/siteManagerDashboard/forms/HIPAA/KPGA_HIPAA_V0.03.pdf b/forms/HIPAA/KPGA_HIPAA_V0.03.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/KPGA_HIPAA_V0.03.pdf rename to forms/HIPAA/KPGA_HIPAA_V0.03.pdf diff --git a/siteManagerDashboard/forms/HIPAA/KPGA_HIPAA_V0.03_Span.pdf b/forms/HIPAA/KPGA_HIPAA_V0.03_Span.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/KPGA_HIPAA_V0.03_Span.pdf rename to forms/HIPAA/KPGA_HIPAA_V0.03_Span.pdf diff --git a/siteManagerDashboard/forms/HIPAA/KPGA_HIPAA_V1.0.pdf b/forms/HIPAA/KPGA_HIPAA_V1.0.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/KPGA_HIPAA_V1.0.pdf rename to forms/HIPAA/KPGA_HIPAA_V1.0.pdf diff --git a/siteManagerDashboard/forms/HIPAA/KPHI_HIPAA_V0.02.pdf b/forms/HIPAA/KPHI_HIPAA_V0.02.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/KPHI_HIPAA_V0.02.pdf rename to forms/HIPAA/KPHI_HIPAA_V0.02.pdf diff --git a/siteManagerDashboard/forms/HIPAA/KPHI_HIPAA_V0.02_Span.pdf b/forms/HIPAA/KPHI_HIPAA_V0.02_Span.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/KPHI_HIPAA_V0.02_Span.pdf rename to forms/HIPAA/KPHI_HIPAA_V0.02_Span.pdf diff --git a/siteManagerDashboard/forms/HIPAA/KPHI_HIPAA_V1.0.pdf b/forms/HIPAA/KPHI_HIPAA_V1.0.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/KPHI_HIPAA_V1.0.pdf rename to forms/HIPAA/KPHI_HIPAA_V1.0.pdf diff --git a/siteManagerDashboard/forms/HIPAA/KPNW_HIPAA_V0.02.pdf b/forms/HIPAA/KPNW_HIPAA_V0.02.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/KPNW_HIPAA_V0.02.pdf rename to forms/HIPAA/KPNW_HIPAA_V0.02.pdf diff --git a/siteManagerDashboard/forms/HIPAA/KPNW_HIPAA_V0.02_Span.pdf b/forms/HIPAA/KPNW_HIPAA_V0.02_Span.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/KPNW_HIPAA_V0.02_Span.pdf rename to forms/HIPAA/KPNW_HIPAA_V0.02_Span.pdf diff --git a/siteManagerDashboard/forms/HIPAA/KPNW_HIPAA_V1.0.pdf b/forms/HIPAA/KPNW_HIPAA_V1.0.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/KPNW_HIPAA_V1.0.pdf rename to forms/HIPAA/KPNW_HIPAA_V1.0.pdf diff --git a/siteManagerDashboard/forms/HIPAA/MFC_HIPAA_V0.02.pdf b/forms/HIPAA/MFC_HIPAA_V0.02.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/MFC_HIPAA_V0.02.pdf rename to forms/HIPAA/MFC_HIPAA_V0.02.pdf diff --git a/siteManagerDashboard/forms/HIPAA/MFC_HIPAA_V0.02_Span.pdf b/forms/HIPAA/MFC_HIPAA_V0.02_Span.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/MFC_HIPAA_V0.02_Span.pdf rename to forms/HIPAA/MFC_HIPAA_V0.02_Span.pdf diff --git a/siteManagerDashboard/forms/HIPAA/MFC_HIPAA_V1.0.pdf b/forms/HIPAA/MFC_HIPAA_V1.0.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/MFC_HIPAA_V1.0.pdf rename to forms/HIPAA/MFC_HIPAA_V1.0.pdf diff --git a/siteManagerDashboard/forms/HIPAA/NCI_HIPAA_V0.02.pdf b/forms/HIPAA/NCI_HIPAA_V0.02.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/NCI_HIPAA_V0.02.pdf rename to forms/HIPAA/NCI_HIPAA_V0.02.pdf diff --git a/siteManagerDashboard/forms/HIPAA/NCI_HIPAA_V0.02_Span.pdf b/forms/HIPAA/NCI_HIPAA_V0.02_Span.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/NCI_HIPAA_V0.02_Span.pdf rename to forms/HIPAA/NCI_HIPAA_V0.02_Span.pdf diff --git a/siteManagerDashboard/forms/HIPAA/NCI_HIPAA_V1.0.pdf b/forms/HIPAA/NCI_HIPAA_V1.0.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/NCI_HIPAA_V1.0.pdf rename to forms/HIPAA/NCI_HIPAA_V1.0.pdf diff --git a/siteManagerDashboard/forms/HIPAA/Sanford_HIPAA_V0.02.pdf b/forms/HIPAA/Sanford_HIPAA_V0.02.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/Sanford_HIPAA_V0.02.pdf rename to forms/HIPAA/Sanford_HIPAA_V0.02.pdf diff --git a/siteManagerDashboard/forms/HIPAA/Sanford_HIPAA_V0.02_Span.pdf b/forms/HIPAA/Sanford_HIPAA_V0.02_Span.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/Sanford_HIPAA_V0.02_Span.pdf rename to forms/HIPAA/Sanford_HIPAA_V0.02_Span.pdf diff --git a/siteManagerDashboard/forms/HIPAA/Sanford_HIPAA_V1.0.pdf b/forms/HIPAA/Sanford_HIPAA_V1.0.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/Sanford_HIPAA_V1.0.pdf rename to forms/HIPAA/Sanford_HIPAA_V1.0.pdf diff --git a/siteManagerDashboard/forms/HIPAA/UCM_HIPAA_V0.02.pdf b/forms/HIPAA/UCM_HIPAA_V0.02.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/UCM_HIPAA_V0.02.pdf rename to forms/HIPAA/UCM_HIPAA_V0.02.pdf diff --git a/siteManagerDashboard/forms/HIPAA/UCM_HIPAA_V0.02_Span.pdf b/forms/HIPAA/UCM_HIPAA_V0.02_Span.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/UCM_HIPAA_V0.02_Span.pdf rename to forms/HIPAA/UCM_HIPAA_V0.02_Span.pdf diff --git a/siteManagerDashboard/forms/HIPAA/UCM_HIPAA_V1.0.pdf b/forms/HIPAA/UCM_HIPAA_V1.0.pdf similarity index 100% rename from siteManagerDashboard/forms/HIPAA/UCM_HIPAA_V1.0.pdf rename to forms/HIPAA/UCM_HIPAA_V1.0.pdf diff --git a/index.html b/index.html index 17c2103b..76289d5f 100644 --- a/index.html +++ b/index.html @@ -1,63 +1,105 @@ - - + + + + + + + Site Study Manager Dashboard + + + + + -

EpiSphere Dashboards

+ -

-Dashboards for multiple Episphere projects. -Code at github.com/episphere/dashboard. -To make experimenting with shared libraries easier, the different dashboards are developed in subdirectories of the dashboard repository. -This is just an idea, it makes sense for more formal team-based development to fall back to the conventional gitflow model. -

- -

Connect

-
  • -recruitConnect_1 -- Jonas testing Praful's Connect API at https://episphere-connect.herokuapp.com. -
  • -

    -
  • -recruitConnect_2 -- Bhaumik testing Praful's Connect API at https://episphere-connect.herokuapp.com. -
  • -

    -
  • -recruitSite -- Jonas testing use of new tracking API (Aug 2019)from site's perspective -
  • -

    -
  • -recruitParticipant -- Jonas testing approaches to participant recruitment, with and without token, site id etc. -
  • -

    -
  • -siteManagerDashboard -- Bhaumik testing use of new tracking API (Aug 2019)from site's perspective -
  • -

    -
  • -PWA Connect App -- Participant facing PWA Connect App. -
  • -

    -
  • -Participant-facing Web App -- Developing the participant-facing eligibility/consent portal. -
  • -

    -
  • -AoUconnect -- Jonas experimenting with cross OAUTHed calls between NIH All-of-Us and DCEG Connect. -
  • -

    -
  • -File upload -- Upload pathology reports to google cloud storage. -
  • - + + + + + + +
    +
    + +
    +
    +
    +
    +
    + + + + + + + + + + + + + + \ No newline at end of file diff --git a/siteManagerDashboard/index.js b/index.js similarity index 96% rename from siteManagerDashboard/index.js rename to index.js index 6275a1af..8f4d7320 100644 --- a/siteManagerDashboard/index.js +++ b/index.js @@ -1,29 +1,48 @@ -import { renderParticipantLookup } from './participantLookup.js'; -import { renderNavBarLinks, dashboardNavBarLinks, renderLogin, removeActiveClass } from './navigationBar.js'; -import { renderTable, filterdata, renderData, addEventFilterData, activeColumns, dropdownTriggerAllParticipants, renderLookupSiteDropdown, reMapFilters } from './participantCommons.js'; -import { renderParticipantDetails } from './participantDetails.js'; -import { renderParticipantSummary } from './participantSummary.js'; -import { renderParticipantMessages } from './participantMessages.js'; -import { renderDataCorrectionsToolPage } from './dataCorrectionsTool.js'; -import { renderSiteMessages } from './siteMessages.js'; -import { renderParticipantWithdrawal } from './participantWithdrawal.js'; -import { createNotificationSchema, editNotificationSchema } from './notifications/storeNotifications.js'; -import { renderRetrieveNotificationSchema, showDraftSchemas } from './notifications/retrieveNotifications.js'; -import { internalNavigatorHandler, getIdToken, userLoggedIn, baseAPI, urls } from './utils.js'; -import fieldMapping from './fieldToConceptIdMapping.js'; -import { nameToKeyObj } from './idsToName.js'; -import { renderAllCharts } from './participantChartsRender.js'; -import { firebaseConfig as devFirebaseConfig } from "./dev/config.js"; -import { firebaseConfig as stageFirebaseConfig } from "./stage/config.js"; -import { firebaseConfig as prodFirebaseConfig } from "./prod/config.js"; -import { SSOConfig as devSSOConfig} from './dev/identityProvider.js'; -import { SSOConfig as stageSSOConfig} from './stage/identityProvider.js'; -import { SSOConfig as prodSSOConfig} from './prod/identityProvider.js'; -import { appState } from './stateManager.js'; +import { renderParticipantLookup } from './src/participantLookup.js'; +import { renderNavBarLinks, dashboardNavBarLinks, renderLogin, removeActiveClass } from './src/navigationBar.js'; +import { renderTable, filterdata, renderData, addEventFilterData, activeColumns, dropdownTriggerAllParticipants, renderLookupSiteDropdown, reMapFilters } from './src/participantCommons.js'; +import { renderParticipantDetails } from './src/participantDetails.js'; +import { renderParticipantSummary } from './src/participantSummary.js'; +import { renderParticipantMessages } from './src/participantMessages.js'; +import { renderDataCorrectionsToolPage } from './src/dataCorrectionsTool.js'; +import { renderSiteMessages } from './src/siteMessages.js'; +import { renderParticipantWithdrawal } from './src/participantWithdrawal.js'; +import { createNotificationSchema, editNotificationSchema } from './src/storeNotifications.js'; +import { renderRetrieveNotificationSchema, showDraftSchemas } from './src/retrieveNotifications.js'; +import { internalNavigatorHandler, getIdToken, userLoggedIn, baseAPI, urls } from './src/utils.js'; +import fieldMapping from './src/fieldToConceptIdMapping.js'; +import { nameToKeyObj } from './src/idsToName.js'; +import { renderAllCharts } from './src/participantChartsRender.js'; +import { firebaseConfig as devFirebaseConfig } from "./config/dev/config.js"; +import { firebaseConfig as stageFirebaseConfig } from "./config/stage/config.js"; +import { firebaseConfig as prodFirebaseConfig } from "./config/prod/config.js"; +import { SSOConfig as devSSOConfig} from './config/dev/identityProvider.js'; +import { SSOConfig as stageSSOConfig} from './config/stage/identityProvider.js'; +import { SSOConfig as prodSSOConfig} from './config/prod/identityProvider.js'; +import { appState } from './src/stateManager.js'; let saveFlag = false; let counter = 0; +if ("serviceWorker" in navigator) { + navigator.serviceWorker.register("./serviceWorker.js").catch((error) => { + console.error("Service worker registration failed.", error); + return; + }); + + navigator.serviceWorker.ready.then(() => { + if (navigator.serviceWorker.controller) { + navigator.serviceWorker.controller.postMessage({ action: "getAppVersion" }); + } + }); + + navigator.serviceWorker.addEventListener("message", (event) => { + if (event.data.action === "sendAppVersion") { + document.getElementById("appVersion").textContent = event.data.payload; + } + }); +} + const datadogConfig = { clientToken: 'pubcb2a7770dcbc09aaf1da459c45ecff65', applicationId: '571977b4-ca80-4a04-b8fe-5d5148508afd', diff --git a/mrn/index.html b/mrn/index.html deleted file mode 100644 index 73adedc7..00000000 --- a/mrn/index.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - -
    -

    MRN [code]

    -

    The MRN trajectory, as defined by Allen Malone

    -
    - ... -
    -
    - issue #29 -
    - - \ No newline at end of file diff --git a/mrn/mrn.css b/mrn/mrn.css deleted file mode 100644 index 93d41057..00000000 --- a/mrn/mrn.css +++ /dev/null @@ -1,7 +0,0 @@ -body { - color:navy -} - -h2 { - color:maroon -} \ No newline at end of file diff --git a/mrn/mrn.js b/mrn/mrn.js deleted file mode 100644 index e3603ac4..00000000 --- a/mrn/mrn.js +++ /dev/null @@ -1 +0,0 @@ -console.log('mrn.js started') diff --git a/mrn/praf/index.html b/mrn/praf/index.html deleted file mode 100644 index 9d9413d9..00000000 --- a/mrn/praf/index.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - Kaiser MRN Test Dashboard - - - - - - -
    -

    Kaiser Permanente Test MRN Portal

    -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    - - -
    - -
    -
    -
    -
    -
    -
    - - - \ No newline at end of file diff --git a/mrn/praf/kpTest.js b/mrn/praf/kpTest.js deleted file mode 100644 index 5bf186bb..00000000 --- a/mrn/praf/kpTest.js +++ /dev/null @@ -1,69 +0,0 @@ -function createTokenAtBackend() { - const requestURL = `https://us-central1-nih-nci-dceg-episphere-dev.cloudfunctions.net/getKey` - const request = fetch(requestURL).then((response) => { - return response.json().then(jsonResp => { - jsonResp["expires"] = new Date(response.headers.get("expires")) - return jsonResp - }) - }).catch((err) => { - console.log(err) - }) - return request - } - - function submit(token, access_token) { - const formInput = { - token - } - formInput["kpFName"] = document.getElementById("kpFName").value - formInput["kpLName"] = document.getElementById("kpLName").value - formInput["kpMRN"] = document.getElementById("kpMRN").value - formInput["kpSite"] = document.getElementById("kpSite").value - const requestURL = `https://us-central1-nih-nci-dceg-episphere-dev.cloudfunctions.net/recruit/submit` - const request = fetch(requestURL, { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - "Authorization": `Bearer ${access_token}` - }, - body: JSON.stringify(formInput) - }).then(response => { - return response.json() - }).catch((err) => { - console.log(err) - }) - return request - } - - function showToken(token) { - const p1 = document.createElement("p") - p1.className = "h3" - const tokenText = document.createTextNode(`Token created: ${token}`) - p1.appendChild(tokenText) - document.getElementById("showToken").appendChild(p1) - const p2 = document.createElement("p") - p2.className = "h5" - const linkText = document.createTextNode(`Check the participant data at: `) - p2.appendChild(linkText) - const a = document.createElement("a") - const siteCode = document.getElementById("kpSite").value - const href = `https://episphere.github.io/dashboard/recruitParticipant/#token=${token}&siteCode=${siteCode}` - a.href = href - a.target = "_blank" - const linkString = document.createTextNode(href) - a.appendChild(linkString) - const lineBreak = document.createElement("br") - p2.appendChild(lineBreak) - p2.appendChild(a) - document.getElementById("showURL").appendChild(p2) - } - - async function getToken() { - const { - access_token, - token, - expires - } = await createTokenAtBackend() - await submit(token, access_token) - showToken(token) - } \ No newline at end of file diff --git a/newsletter/anniversary-spanish.html b/newsletter/anniversary-spanish.html new file mode 100644 index 00000000..920fd57d --- /dev/null +++ b/newsletter/anniversary-spanish.html @@ -0,0 +1,128 @@ + + + + + + + + + + Plantilla de mensaje de correo electrónico HTML + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    +

    Ver en navegador +

    +
    +
    + + + +

    +
    + + + + +
    +

    +
    +
    +

    ¡Es su aniversario en Connect!

    +
    + + +
    +

    + Durante el último año, sus aportes a Connect nos han ayudado a comenzar a desarrollar un recurso de investigación sobre cómo prevenir el cáncer. Su participación continua nos ayudará a crecer y utilizar dicho recurso para explorar las causas del cáncer y descubrir la mejor manera de prevenirlo.

    Agradecemos su compromiso en lo que respecta a su colaboración con nosotros para el futuro de la prevención del cáncer y lo alentamos a que + corra la voz. ¡Esperamos que forme parte de la comunidad de Connect durante muchos años más! +
    +

    +
    +

    +
    + + + + +
    +

    +
    +
    + + + + +
    +

    Estudio Connect para la Prevención del Cáncer

    + Instituto Nacional del Cáncer | Institutos Nacionales de Salud | + Departamento de Salud y Servicios Humanos de EE. UU. | USA.gov +
    + + + + +
    +

    Connect for Cancer Prevention Study, el logotipo de Connect for Cancer Prevention Study y Connect today. Prevent cancer tomorrow son marcas comerciales del Departamento de Salud y Servicios Humanos (HHS, por sus siglas en inglés) de EE. UU.®

    +
    +
    + + + \ No newline at end of file diff --git a/newsletter/anniversary.html b/newsletter/anniversary.html index cabbbd01..71848c5d 100644 --- a/newsletter/anniversary.html +++ b/newsletter/anniversary.html @@ -24,7 +24,7 @@

    - View in browser

    @@ -36,7 +36,7 @@

    diff --git a/newsletter/aprilnewsletter.html b/newsletter/aprilnewsletter.html index 636f3e0a..786fae1a 100644 --- a/newsletter/aprilnewsletter.html +++ b/newsletter/aprilnewsletter.html @@ -18,7 +18,7 @@ @@ -27,7 +27,7 @@
    -

    View in browser +

    View in browser

    @@ -227,7 +227,7 @@
    - +

    April 2024

    @@ -174,7 +174,7 @@
    - +
    diff --git a/newsletter/decembernewsletter.html b/newsletter/decembernewsletter.html index 616e7449..902a1368 100644 --- a/newsletter/decembernewsletter.html +++ b/newsletter/decembernewsletter.html @@ -42,7 +42,7 @@ @@ -51,7 +51,7 @@
    -

    View in browser +

    View in browser

    - +
    @@ -201,7 +201,7 @@
    - +
    diff --git a/newsletter/fallnewsletter.html b/newsletter/fallnewsletter.html index 49967600..1bd84a37 100644 --- a/newsletter/fallnewsletter.html +++ b/newsletter/fallnewsletter.html @@ -119,7 +119,7 @@
    - +
    @@ -283,7 +283,7 @@ diff --git a/newsletter/index.html b/newsletter/index.html index 399af3eb..271775d5 100644 --- a/newsletter/index.html +++ b/newsletter/index.html @@ -34,9 +34,6 @@
    -
    - @@ -108,11 +100,6 @@
    @@ -45,7 +42,7 @@
    - +
    @@ -79,12 +76,7 @@
    - - +
    -
    @@ -129,28 +116,19 @@
    -
    - +
    -
    @@ -166,11 +144,6 @@ -
    -
    @@ -195,7 +168,7 @@
    - +
    @@ -247,9 +220,6 @@
    \ No newline at end of file diff --git a/newsletter/maynewsletter.html b/newsletter/maynewsletter.html index 95b332db..3566bc70 100644 --- a/newsletter/maynewsletter.html +++ b/newsletter/maynewsletter.html @@ -120,7 +120,7 @@
    - +
    @@ -157,10 +157,10 @@
    - +
    @@ -286,7 +286,7 @@
    -
    diff --git a/newsletter/thankyou.html b/newsletter/thankyou.html index 222f902a..ce47578a 100644 --- a/newsletter/thankyou.html +++ b/newsletter/thankyou.html @@ -25,7 +25,7 @@ border: 0; } .landingImg:hover { - content: url(https://github.com/episphere/dashboard/blob/dev/siteManagerDashboard/assets/images/participants.gif?raw=true) + content: url(https://github.com/episphere/studyManagerDashboard/blob/dev/assets/images/participants.gif?raw=true) } .wrapper { width: 100%; @@ -99,7 +99,7 @@ diff --git a/notificationSpecs/index.html b/notificationSpecs/index.html deleted file mode 100644 index 984f9146..00000000 --- a/notificationSpecs/index.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - Notification Specification - - - -
    -
    -
    - - -
    - -
    - - -
    - -
    - - -
    - -
    - -   -   -   -
    - -
    -
    -
    - -
    -
    - -
    - -
    -
    -
    -
    - -
    - -
    - - -
    - -
    - -
    -
    - -
    - -
    -
    - -
    - -
    -
    - -
    - -
    -
    - -
    - - - - -
    - -
    - -
    - - -
    - - - - - - - \ No newline at end of file diff --git a/notificationSpecs/index.js b/notificationSpecs/index.js deleted file mode 100644 index aa227728..00000000 --- a/notificationSpecs/index.js +++ /dev/null @@ -1,207 +0,0 @@ -window.onload = () => { - init(); -} - -const init = async () => { - const concepts = await getConcepts(); - addEventMoreCondition(concepts); - conceptDropdown(concepts, 'condition-key'); - conceptDropdown(concepts, 'condition-value'); - conceptDropdown(concepts, 'email-concept'); - conceptDropdown(concepts, 'first-name-concept'); - conceptDropdown(concepts, 'preferred-name-concept'); - conceptDropdown(concepts, 'primary-field'); - conceptDropdown(concepts, 'phone-concept'); - addEventNotificationCheckbox(); - formSubmit(); -} - -const formSubmit = () => { - const form = document.getElementById('configForm'); - form.addEventListener('submit', e => { - e.preventDefault(); - const obj = {}; - obj['attempt'] = document.getElementById('attempt').value.trim(); - obj['description'] = document.getElementById('description').value.trim(); - obj['category'] = document.getElementById('category').value.trim(); - obj['notificationType'] = Array.from(document.getElementsByName('notification-checkbox')).filter(dt => dt.checked).map(dt => dt.dataset.type); - obj['emailField'] = document.getElementById('emailconcept0').value; - obj['firstNameField'] = document.getElementById('firstnameconcept0').value; - if(document.getElementById('preferrednameconcept0').value) obj['preferredNameField'] = document.getElementById('preferrednameconcept0').value; - obj['phoneField'] = document.getElementById('phoneconcept0').value; - obj['primaryField'] = document.getElementById('primaryfield0').value; - obj['time'] = {} - obj['time']['day'] = parseInt(document.getElementById('days').value); - obj['time']['hour'] = parseInt(document.getElementById('hours').value); - obj['time']['minute'] = parseInt(document.getElementById('minutes').value); - - if(document.getElementById('emailSubject')) { - obj['email'] = {}; - obj['email']['subject'] = document.getElementById('emailSubject').value; - obj['email']['body'] = document.getElementById('emailBody').value.replace(/\n/g, '
    '); - } - - if(document.getElementById('smsBody')) { - obj['sms'] = {}; - obj['sms']['body'] = document.getElementById('smsBody').value; - } - - if(document.getElementById('pushSubject')) { - obj['push'] = {}; - obj['push']['subject'] = document.getElementById('pushSubject').value; - obj['push']['body'] = document.getElementById('pushBody').value; - } - - obj['conditions'] = {}; - - Array.from(document.getElementsByName('condition-key')).forEach((e, i) => { - obj['conditions'][e.value] = {}; - obj['conditions'][e.value][Array.from(document.getElementsByName('condition-operator'))[i].value] = parseInt(Array.from(document.getElementsByName('condition-value'))[i].value) - }) - - downloadObjectAsJson(obj, 'notification_specification') - }) -} - -const addEventMoreCondition = (concepts) => { - const btn = document.getElementById('addConditions'); - btn.addEventListener('click', () => { - const conditionNo = parseInt(btn.dataset.condition); - const conditionDiv = document.getElementById('conditionsDiv'); - const div = document.createElement('div'); - div.classList = ['row form-group']; - div.innerHTML = ` - -
    ${getDataListTemplate(concepts, `conditionkey${conditionNo}`, 'condition-key')}
    - -
    ${getDataListTemplate(concepts, `conditionvalue${conditionNo}`, 'condition-value')}
    - ` - conditionDiv.appendChild(div); - btn.dataset.condition = conditionNo + 1; - }); -} - -const getConcepts = async () => { - return await (await fetch('https://raw.githubusercontent.com/episphere/conceptGithubActions/master/jsons/varToConcept.json')).json() -} - -const conceptDropdown = (concepts, name) => { - const elements = document.getElementsByClassName(name); - Array.from(elements).forEach((ele, i) => { - ele.innerHTML = getDataListTemplate(concepts, `${name.replace(/-/g, '')}${i}`, name); - }) -} - -const getDataListTemplate = (concepts, id, name) => { - let template = ``; - template += `` - for(let key in concepts) { - template += `` - } - template += `` - return template; -} - -const addEventNotificationCheckbox = () => { - const chkbs = document.getElementsByName('notification-checkbox'); - Array.from(chkbs).forEach(box => { - box.addEventListener('click', () => { - const checked = Array.from(chkbs).filter(cb => cb.checked).map(dt => dt.dataset.type); - renderDivs(checked); - }) - }) -} - -const renderDivs = (array) => { - if(array.includes('email')){ - let template = ` -
    -
    -
    Email
    -
    - - -
    -
    - - -
    -
    -
    -
    - ` - document.getElementById('emailDiv').innerHTML = template - } - else document.getElementById('emailDiv').innerHTML = ''; - - if(array.includes('sms')){ - let template = ` -
    -
    -
    SMS
    0/160 characters -
    - - -
    -
    -
    - ` - document.getElementById('smsDiv').innerHTML = template - } - else document.getElementById('smsDiv').innerHTML = ''; - - if(array.includes('push')){ - let template = ` -
    -
    -
    Push notification
    -
    - - -
    -
    - - -
    -
    -
    - ` - document.getElementById('pushDiv').innerHTML = template; - } - else document.getElementById('pushDiv').innerHTML = ''; - - const emailBody = document.getElementById('emailBody'); - if(emailBody) addEmailPreview(emailBody); - - addEventSMSCharacterCount(); -} - -const addEventSMSCharacterCount = () => { - if(document.getElementById('smsBody')){ - document.getElementById('smsBody').addEventListener('keyup', () => { - document.getElementById('characterCounts').innerHTML = `${document.getElementById('smsBody').value.length}/160 characters`; - }) - } -} - -const addEmailPreview = (emailBody) => { - const converter = new showdown.Converter() - emailBody.addEventListener('keyup', () => { - const text = emailBody.value; - const html = converter.makeHtml(text); - document.getElementById('emailBodyPreview').innerHTML = html; - }) -} - -const downloadObjectAsJson = (exportObj, exportName) => { - const dataStr = "data:text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(exportObj)); - const downloadAnchorNode = document.createElement('a'); - downloadAnchorNode.setAttribute("href", dataStr); - downloadAnchorNode.setAttribute("download", exportName + ".json"); - document.body.appendChild(downloadAnchorNode); - downloadAnchorNode.click(); - downloadAnchorNode.remove(); -} \ No newline at end of file diff --git a/pwaConnectApp/README.md b/pwaConnectApp/README.md deleted file mode 100644 index beb6103d..00000000 --- a/pwaConnectApp/README.md +++ /dev/null @@ -1,2 +0,0 @@ -"# PWA" -https://episphere.github.io/dashboard/pwaConnectApp/ diff --git a/pwaConnectApp/app.js b/pwaConnectApp/app.js deleted file mode 100644 index 7087ca6b..00000000 --- a/pwaConnectApp/app.js +++ /dev/null @@ -1,455 +0,0 @@ -let auth = ''; - -window.onload = () => { - const config = firebaseConfig(); - !firebase.apps.length ? firebase.initializeApp(config) : firebase.app(); - auth = firebase.auth(); - router(); - main(); -} - -window.onhashchange = () => { - document.getElementById('navbarNavAltMarkup').classList.remove('show'); - router(); -} - -const api = 'https://us-central1-nih-nci-dceg-episphere-dev.cloudfunctions.net/'; - -const main = () => { - if('serviceWorker' in navigator){ - try { - navigator.serviceWorker.register('./serviceWorker.js'); - } - catch (error) { - console.log(error); - } - } -} - -const router = () => { - const hash = decodeURIComponent(window.location.hash); - const index = hash.indexOf('?'); - const parameters = index !== -1 ? getparameters(hash.slice(index+1, hash.length)) : {}; - if(parameters.token){ - if(localStorage.connectApp){ - localStorage.connectApp = JSON.stringify(JSON.parse(localStorage.connectApp).token = parameters.token); - } - else{ - let obj = {}; - obj["token"] = parameters.token; - localStorage.connectApp = JSON.stringify(obj); - } - } - else{ - getKey(); - } - toggleNavBar(); - const route = index !== -1 ? hash.slice(0, index) : hash || '#'; - if(route === '#') homePage(); - else if(route === '#eligibility_screener') eligibilityScreener(); - else if(route === '#eligible') eligibleParticipant(); - else if(route === '#ineligible') ineligible(); - else if(route === '#ineligible_site') ineligible_site(); - else if(route === '#sign_in') signIn(); - else if (route === '#profile') accountCreated(); - else if (route === '#sign_out') signOut(); - else window.location.hash = '#'; -} - -const homePage = () => { - const mainContent = document.getElementById('root'); - mainContent.innerHTML = ` -

    Welcome to Connect Cohort Study!

    -
    -
    -
    -
    - -
    -
    - -
    -
    - -
    -
    -
    -
    - -
    -
    - -
    -
    -
    -
    -
    -
    -
    - Advancing Cancer Research -

    - - The Connect Study wants to better understand: -
      -
    • What causes cancer,
    • -
    • Ways to prevent cancer, and
    • -
    • How to improve early detection of cancer.
    • -
    -
    -
    -
    - Why should I join Connect? -

    - - Being a part of Connect means you are contributing to the future of cancer prevention for our families and communities.
    - With your help, Connect will be one of the largest and most important cancer studies in the United States. -
    -
    -
    - Who can join Connect? -

    - -
      -
    • Men and women between the ages of 40 and 65
    • -
    • Current (patients/members) of participating sites
    • -
    • No previous history of cancer (other than non-melanoma skin cancer)
    • -
    -
    -
    -
    - Share connect -

    - -
    -
    - `; - // removeActiveClass('nav-link', 'active'); - // document.getElementById('home').classList.add('active'); -} - -const sites = () => { - return { - 1: 'Health Partners', - 2: 'Henry Ford Health System', - 3: 'Kaiser Permanente Colorado', - 4: 'Kaiser Permanente Georgia', - 5: 'Kaiser Permanente Hawaii', - 6: 'Kaiser Permanente Northwest', - 7: 'Marshfield Clinic', - 8: 'Sanford Health', - 9: 'University of Chicago Medicine', - 10: 'Baylor Scott & White Health', - 13: 'Natiocal Cancer Institute', - 88: 'None of these' - } -} - -const eligibilityScreener = () => { - const mainContent = document.getElementById('root'); - mainContent.innerHTML = ` -
    -

    Please fill out this form to determine your eligibility for Connect.


    - -
    -
    - -
    -
    - -
    -
    - - -
    -
    - -
    -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    -

    -
    - `; -} - -const eligibleParticipant = () => { - const mainContent = document.getElementById('root'); - mainContent.innerHTML = ` -
    -

    You are eligible! Thank you for joining Connect.

    - -
    - `; -} - -const eligibilityQuestionnaire = () => { - let formData = {}; - formData["RcrtES_AgeQualify_v1r0"] = document.getElementById('radio1').checked ? 1 : document.getElementById('radio2').checked ? 0 : 0; - formData["RcrtES_CancerHist_v1r0"] = document.getElementById('radio3').checked ? 1 : document.getElementById('radio4').checked ? 0 : 0; - formData["RcrtES_Site_v1r0"] = parseInt(document.getElementById('RcrtES_Site_v1r0').value); - formData["RcrtES_Aware_v1r0"] = {}; - formData["RcrtES_Aware_v1r0"]["RcrtES_Aware_v1r0_phys"] = document.getElementById('checkbox1').checked ? 1 : 0; - formData["RcrtES_Aware_v1r0"]["RcrtES_Aware_v1r0_Email"] = document.getElementById('checkbox2').checked ? 1 : 0; - formData["RcrtES_Aware_v1r0"]["RcrtES_Aware_v1r0_Post"] = document.getElementById('checkbox3').checked ? 1 : 0; - formData["RcrtES_Aware_v1r0"]["RcrtES_Aware_v1r0_News"] = document.getElementById('checkbox4').checked ? 1 : 0; - formData["RcrtES_Aware_v1r0"]["RcrtES_Aware_v1r0_Social"] = document.getElementById('checkbox5').checked ? 1 : 0; - formData["RcrtES_Aware_v1r0"]["RcrtES_Aware_v1r0_Invite"] = document.getElementById('checkbox6').checked ? 1 : 0; - formData["RcrtES_Aware_v1r0"]["RcrtES_Aware_v1r0_Family"] = document.getElementById('checkbox7').checked ? 1 : 0; - formData["RcrtES_Aware_v1r0"]["RcrtES_Aware_v1r0_Member"] = document.getElementById('checkbox8').checked ? 1 : 0; - formData["RcrtES_Aware_v1r0"]["RcrtES_Aware_v1r0_Poster"] = document.getElementById('checkbox9').checked ? 1 : 0; - formData["RcrtES_Aware_v1r0"]["RcrtES_Aware_v1r0_Table"] = document.getElementById('checkbox10').checked ? 1 : 0; - formData["RcrtES_Aware_v1r0"]["RcrtES_Aware_v1r0_Other"] = document.getElementById('checkbox11').checked ? 1 : 0; - - localStorage.eligibilityQuestionnaire = JSON.stringify(formData); - if(formData.RcrtES_AgeQualify_v1r0 === 1 && formData.RcrtES_CancerHist_v1r0 === 0 && formData.RcrtES_Site_v1r0 !== 88){ - storeResponse(formData); - window.location.hash = '#eligible'; - } - else if(formData.RcrtES_AgeQualify_v1r0 === 1 && formData.RcrtES_CancerHist_v1r0 === 0 && formData.RcrtES_Site_v1r0 === 88){ - window.location.hash = "#ineligible_site"; - } - else{ - window.location.hash = '#ineligible'; - } -} - -const ineligible = () => { - const mainContent = document.getElementById('root'); - mainContent.innerHTML = ` -

    Thank you for your interest, but you are not eligible for the Connect study.

    -

    Would you like us to let ${ localStorage.eligibilityQuestionnaire ? sites()[JSON.parse(localStorage.eligibilityQuestionnaire).RcrtES_Site_v1r0] : ''} know that you are not eligible? We will not use this information for any other purpose.

    - -

    - - `; -} - -const ineligibleSite = () => { - const mainContent = document.getElementById('root'); - mainContent.innerHTML = ` -

    Thank you for your interest, but you are not eligible for the Connect study as the study is only being conducted through these institutions at this time.

    -

    Please check back in the future as we add more study sites. If you have any questions, please contact the Connect help desk.

    - `; -} - -const getparameters = (query) => { - const array = query.split('&'); - let obj = {}; - array.forEach(value => { - obj[value.split('=')[0]] = value.split('=')[1]; - }); - return obj; -} - -const getKey = async () => { - const response = await fetch(api+'getKey'); - const data = await response.json(); - if(data.code === 200) { - let obj = { access_token: data.access_token, token: data.token }; - localStorage.connectApp = JSON.stringify(obj); - } -} - -const storeResponse = async (formData) => { - formData.token = JSON.parse(localStorage.connectApp).token; - const response = await fetch(api+'recruit/submit', - { - method: 'POST', - headers:{ - Authorization:"Bearer "+JSON.parse(localStorage.connectApp).access_token, - 'Content-Type': 'application/json', - }, - body: JSON.stringify(formData) - }); -} - -const signIn = () => { - // removeActiveClass('nav-link', 'active'); - // document.getElementById('signIn').classList.add('active'); - - document.getElementById('root').innerHTML = ''; - const ui = firebaseui.auth.AuthUI.getInstance() || new firebaseui.auth.AuthUI(firebase.auth()); - ui.start('#root', signInConfig()); - auth.onAuthStateChanged(user => { - if(user){ - document.getElementById('navbarNavAltMarkup').innerHTML = userNavBar(); - } - else{ - document.getElementById('navbarNavAltMarkup').innerHTML = homeNavBar(); - } - }); -} - -const signInConfig = () => { - return { - signInSuccessUrl: '#profile', - signInOptions: [ - firebase.auth.GoogleAuthProvider.PROVIDER_ID, - firebase.auth.GithubAuthProvider.PROVIDER_ID, - { - provider:firebase.auth.EmailAuthProvider.PROVIDER_ID, - signInMethod: firebase.auth.EmailAuthProvider.EMAIL_LINK_SIGN_IN_METHOD, - forceSameDevice: true, - }, - firebase.auth.PhoneAuthProvider.PROVIDER_ID - ] - } -} - -const accountCreated = () => { - auth.onAuthStateChanged(user => { - if(user){ - const mainContent = document.getElementById('root'); - mainContent.innerHTML = `
    ${JSON.stringify(user, null, 3)}
    `; - } - else{ - window.location.hash = '#'; - } - }); - // removeActiveClass('nav-link', 'active'); - // document.getElementById('profile').classList.add('active'); -} - -const signOut = () => { - // removeActiveClass('nav-link', 'active'); - // document.getElementById('signOut').classList.add('active'); - firebase.auth().signOut(); - window.location.hash = '#'; -} - -const firebaseConfig = () => { - return { - apiKey: "AIzaSyDe3Ewzl4x7hEX30EiQJ0tvXBtzd2Hghiw", - authDomain: "nih-nci-dceg-episphere-dev.firebaseapp.com", - projectId: "nih-nci-dceg-episphere-dev", - storageBucket: "nih-nci-dceg-episphere-dev.appspot.com", - messagingSenderId: "1061219778575", - appId: "1:1061219778575:web:c9f40bbc7ec2cdccc5637a" - }; -} - -const userNavBar = () => { - return ` - - - - `; -} - -const homeNavBar = () => { - return ` - - - `; -} - -const toggleNavBar = () => { - auth.onAuthStateChanged(user => { - if(user){ - document.getElementById('navbarNavAltMarkup').innerHTML = userNavBar(); - document.getElementById('joinNow') ? document.getElementById('joinNow').innerHTML = joinNowBtn(false) : ``; - } - else{ - document.getElementById('navbarNavAltMarkup').innerHTML = homeNavBar(); - document.getElementById('joinNow') ? document.getElementById('joinNow').innerHTML = joinNowBtn(true) : ``; - } - }); -} - -const checkSession = () => { - const user = firebase.auth().currentUser; - return user ? true : false; -} - -const joinNowBtn = (bool) => { - if(bool){ - return `What causes and prevents cancer? Help researchers answer this question for future generations -
    Join Now` - } - else { - return `Thanks for joining Connect Cohort Study!` - } -} - -const removeActiveClass = (className, activeClass) => { - let fileIconElement = document.getElementsByClassName(className); - Array.from(fileIconElement).forEach(elm => { - elm.classList.remove(activeClass); - }); -} diff --git a/pwaConnectApp/css/style.css b/pwaConnectApp/css/style.css deleted file mode 100644 index 0d3a6ed7..00000000 --- a/pwaConnectApp/css/style.css +++ /dev/null @@ -1,91 +0,0 @@ -.required { - color: red; -} - -.container { - min-height: calc(100vh - 65px); - padding-top: 5rem; -} - -#root { - height: 100%; -} - -.landing-page-images { - height: 100%; - width: 100%; -} - -.row { - padding: .5rem; -} - -.images-col { - padding-left: 0px !important; - padding-right: 0px !important; -} - -.join-now-col { - text-align: center; - background-color: #c01414; - color: #ffffff; - padding: 0px !important; -} - -.join-now-btn { - background-color: transparent !important; - border-color: #ffffff !important; - margin-bottom: 0.25rem; - margin-top: 0.5rem; - color: #ffffff !important; -} - -.eligibility-form { - margin: 0 0.5rem; -} - -.join-now-heading { - white-space: normal; - font-size: 1.5vw; -} - -.images-grid { - padding: 0px !important; -} - -.images-row { - padding: 0px !important; - margin: 0px !important; -} - -.active { - color: #000000 !important; -} - -.nav-item { - color: rgba(0,0,0,.5) !important; -} - -.bar-code { - text-align: center; -} - -.heading { - color: #c01414; - font-size: 1rem; - font-weight: bold; -} - -.description { - font-size: 0.8rem; -} - -.bar-code-image { - max-width: 150px; - max-height: 150px; -} - -.change-pointer:hover { - cursor: pointer !important; - color: #007bff !important; -} \ No newline at end of file diff --git a/pwaConnectApp/images/1.jpg b/pwaConnectApp/images/1.jpg deleted file mode 100644 index 43298f54..00000000 Binary files a/pwaConnectApp/images/1.jpg and /dev/null differ diff --git a/pwaConnectApp/images/2.jpg b/pwaConnectApp/images/2.jpg deleted file mode 100644 index f1af0a64..00000000 Binary files a/pwaConnectApp/images/2.jpg and /dev/null differ diff --git a/pwaConnectApp/images/3.jpg b/pwaConnectApp/images/3.jpg deleted file mode 100644 index 221e7d82..00000000 Binary files a/pwaConnectApp/images/3.jpg and /dev/null differ diff --git a/pwaConnectApp/images/4.jpg b/pwaConnectApp/images/4.jpg deleted file mode 100644 index a632957b..00000000 Binary files a/pwaConnectApp/images/4.jpg and /dev/null differ diff --git a/pwaConnectApp/images/5.jpg b/pwaConnectApp/images/5.jpg deleted file mode 100644 index 234e0bef..00000000 Binary files a/pwaConnectApp/images/5.jpg and /dev/null differ diff --git a/pwaConnectApp/images/connect.png b/pwaConnectApp/images/connect.png deleted file mode 100644 index 2285d07b..00000000 Binary files a/pwaConnectApp/images/connect.png and /dev/null differ diff --git a/pwaConnectApp/images/connectApp.png b/pwaConnectApp/images/connectApp.png deleted file mode 100644 index 2ae63953..00000000 Binary files a/pwaConnectApp/images/connectApp.png and /dev/null differ diff --git a/pwaConnectApp/images/icons/icon-128x128.png b/pwaConnectApp/images/icons/icon-128x128.png deleted file mode 100644 index 7912a6a3..00000000 Binary files a/pwaConnectApp/images/icons/icon-128x128.png and /dev/null differ diff --git a/pwaConnectApp/images/icons/icon-144x144.png b/pwaConnectApp/images/icons/icon-144x144.png deleted file mode 100644 index 31e67405..00000000 Binary files a/pwaConnectApp/images/icons/icon-144x144.png and /dev/null differ diff --git a/pwaConnectApp/images/icons/icon-152x152.png b/pwaConnectApp/images/icons/icon-152x152.png deleted file mode 100644 index 48ad529d..00000000 Binary files a/pwaConnectApp/images/icons/icon-152x152.png and /dev/null differ diff --git a/pwaConnectApp/images/icons/icon-192x192.png b/pwaConnectApp/images/icons/icon-192x192.png deleted file mode 100644 index fbb4ba0f..00000000 Binary files a/pwaConnectApp/images/icons/icon-192x192.png and /dev/null differ diff --git a/pwaConnectApp/images/icons/icon-384x384.png b/pwaConnectApp/images/icons/icon-384x384.png deleted file mode 100644 index b61d0e87..00000000 Binary files a/pwaConnectApp/images/icons/icon-384x384.png and /dev/null differ diff --git a/pwaConnectApp/images/icons/icon-512x512.png b/pwaConnectApp/images/icons/icon-512x512.png deleted file mode 100644 index c557f5ee..00000000 Binary files a/pwaConnectApp/images/icons/icon-512x512.png and /dev/null differ diff --git a/pwaConnectApp/images/icons/icon-72x72.png b/pwaConnectApp/images/icons/icon-72x72.png deleted file mode 100644 index 75b9ac53..00000000 Binary files a/pwaConnectApp/images/icons/icon-72x72.png and /dev/null differ diff --git a/pwaConnectApp/images/icons/icon-96x96.png b/pwaConnectApp/images/icons/icon-96x96.png deleted file mode 100644 index 42b9a5ec..00000000 Binary files a/pwaConnectApp/images/icons/icon-96x96.png and /dev/null differ diff --git a/pwaConnectApp/index.html b/pwaConnectApp/index.html deleted file mode 100644 index ef388905..00000000 --- a/pwaConnectApp/index.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - Connect App - - - - - - - - - - -
    - -
    -
    -
    -
    - - - - - - - - - \ No newline at end of file diff --git a/pwaConnectApp/manifest.json b/pwaConnectApp/manifest.json deleted file mode 100644 index 5bc92a3d..00000000 --- a/pwaConnectApp/manifest.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "Connect App", - "short_name": "Connect", - "theme_color": "#cd2f5a", - "background_color": "#ffffff", - "display": "standalone", - "start_url": "/dashboard/pwaConnectApp/", - "icons": [ - { - "src": "images/icons/icon-72x72.png", - "sizes": "72x72", - "type": "image/png" - }, - { - "src": "images/icons/icon-96x96.png", - "sizes": "96x96", - "type": "image/png" - }, - { - "src": "images/icons/icon-128x128.png", - "sizes": "128x128", - "type": "image/png" - }, - { - "src": "images/icons/icon-144x144.png", - "sizes": "144x144", - "type": "image/png" - }, - { - "src": "images/icons/icon-152x152.png", - "sizes": "152x152", - "type": "image/png" - }, - { - "src": "images/icons/icon-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "images/icons/icon-384x384.png", - "sizes": "384x384", - "type": "image/png" - }, - { - "src": "images/icons/icon-512x512.png", - "sizes": "512x512", - "type": "image/png" - } - ], - "splash_pages": null -} \ No newline at end of file diff --git a/pwaConnectApp/serviceWorker.js b/pwaConnectApp/serviceWorker.js deleted file mode 100644 index 5e47e971..00000000 --- a/pwaConnectApp/serviceWorker.js +++ /dev/null @@ -1,45 +0,0 @@ -const cacheName = 'connect-app'; - -const staticAssets = [ - '/', - '/index.html', - '/app.js', - '/css/style.css', - '/images/*' -]; - -self.addEventListener('install', async function () { - const cache = await caches.open(cacheName); - cache.addAll(staticAssets); -}); - -self.addEventListener('activate', event => { - event.waitUntil(self.clients.claim()); -}); - -self.addEventListener('fetch', event => { - const request = event.request; - const url = new URL(request.url); - if (url.origin === location.origin) { - event.respondWith(cacheFirst(request)); - } else { - event.respondWith(networkFirst(request)); - } -}); - -async function cacheFirst(request) { - const cachedResponse = await caches.match(request); - return cachedResponse || fetch(request); -} - -async function networkFirst(request) { - const dynamicCache = await caches.open('connect-app'); - try { - const networkResponse = await fetch(request); - dynamicCache.put(request, networkResponse.clone()); - return networkResponse; - } catch (err) { - const cachedResponse = await dynamicCache.match(request); - return cachedResponse || await caches.match('./fallback.json'); - } -} \ No newline at end of file diff --git a/recruitConnect_1/index.html b/recruitConnect_1/index.html deleted file mode 100644 index 12047409..00000000 --- a/recruitConnect_1/index.html +++ /dev/null @@ -1,3 +0,0 @@ - - -
    diff --git a/recruitConnect_1/recruitConnect.css b/recruitConnect_1/recruitConnect.css deleted file mode 100644 index 8e79b145..00000000 --- a/recruitConnect_1/recruitConnect.css +++ /dev/null @@ -1,14 +0,0 @@ -body { - color:navy; - font-family:sans-serif -} -h2 { - color:blueviolet -} -button { - border-radius: 15px; - color:blue -} -td { - font-family:inherit -} \ No newline at end of file diff --git a/recruitConnect_1/recruitConnect.js b/recruitConnect_1/recruitConnect.js deleted file mode 100644 index 309229d6..00000000 --- a/recruitConnect_1/recruitConnect.js +++ /dev/null @@ -1,83 +0,0 @@ -console.log('recruitConnect.js loaded') - -recruit={} -recruit.gitIcon=document.createElement('span').innerHTML='' -recruit.ui=function(div){ // build user interface if - recruit.div=div||document.getElementById('recruitmentDiv') - if(recruit.div){ // if a target div exists, build - if(!localStorage.recruit){localStorage.recruit='{}'} - recruit.store=JSON.parse(localStorage.recruit) - recruit.store.key=recruit.store.key||'' - // login UI, borrowing stored key is available - recruit.div.innerHTML=` - - -
    Recruitment Dashboard - - - -
    -

    Site Key: save

    -
    - ` - //connectKey.click() - } -} - -recruit.api='https://episphere-connect.herokuapp.com' - -recruit.withKey=function(){ - recruit.dash=recruit.div.querySelector('#recruitDash') - // login with key and display dashboard - recruit.key=recruit.div.querySelector('#key').value - if(recruit.div.querySelector('#checkSave').checked){ // store key for future sessions if requested - let st=JSON.parse(localStorage.recruit) - st.key=recruit.key - localStorage.recruit=JSON.stringify(st) - } - recruit.dash=recruit.div.querySelector('#recruitDash') // <-- this is where the dynamic interaction happens - recruit.dashLogin() -} - -recruit.dashLogin=async function(){ // build the dashboard after logged with key - // check that key is valid - try { - let files = await (await fetch(`${recruit.api}/files`,{ - headers:{ - "Authorization":`Bearer ${recruit.key}` - } - })).json() - recruit.dashUI(files) - } catch(e){ - recruit.dash.innerHTML='

    login failed - invalid key?

    ' - setTimeout(function(){ - location.reload() - },1000) - } -} - -recruit.dashUI=async function(files){ - let h = '' - h += `
    ${JSON.stringify(files,null,3)}
    ` - h += '
    -
    - @@ -131,13 +131,13 @@
    -
    ' - h += '
    ...
    ' - recruit.dash.innerHTML=h - // file list - h='' - h += `

    File submissions (${files.result.length})

    ` - h += `

    ` - fileList.innerHTML=h - numFiles.onclick=function(){ - h='' - files.result.forEach(f=>{ - debugger - }) - - - } - numFiles.onclick() - -} - - -window.onload=_=>{recruit.ui()} \ No newline at end of file diff --git a/recruitConnect_1/sanford.csv b/recruitConnect_1/sanford.csv deleted file mode 100644 index 7fa1c2a0..00000000 --- a/recruitConnect_1/sanford.csv +++ /dev/null @@ -1,4 +0,0 @@ -Data Sent by Sites via Connect API,,,,,,,,,Created by DCEG Connect,,,, -Site ID,Sub-site ID,Site-Specific Participant ID,Age,Sex,Race,Ethnicity,Total # Contact Attempts,Recruitment Type,Connect Event ID,Connect Event Time Stamp,Connect Submission ID,Connect QC Status,Connect Batch Status -SNF,Fargo,11910010001,11,F,White,white,1,Targeted,1000,11:00:00 AM,131,Fail,Rejected -SNF,Sioux Falls,11910010002,44,M,Native American/Alaskan Native,Hispanic,10,Self Referral ,1000,11:00:00 AM,131,Pass,Rejected \ No newline at end of file diff --git a/recruitConnect_1/sanfordClean.csv b/recruitConnect_1/sanfordClean.csv deleted file mode 100644 index e516fb72..00000000 --- a/recruitConnect_1/sanfordClean.csv +++ /dev/null @@ -1,3 +0,0 @@ -Site ID,Sub-site ID,Site-Specific Participant ID,Age,Sex,Race,Ethnicity,Total # Contact Attempts,Recruitment Type,Connect Event ID,Connect Event Time Stamp,Connect Submission ID,Connect QC Status,Connect Batch Status -SNF,Fargo,11910010001,11,F,White,white,1,Targeted,1000,11:00:00 AM,131,Fail,Rejected -SNF,Sioux Falls,11910010002,44,M,Native American/Alaskan Native,Hispanic,10,Self Referral ,1000,11:00:00 AM,131,Pass,Rejected \ No newline at end of file diff --git a/recruitConnect_2/components/siteSpecificLogos.js b/recruitConnect_2/components/siteSpecificLogos.js deleted file mode 100644 index 2aa70c9c..00000000 --- a/recruitConnect_2/components/siteSpecificLogos.js +++ /dev/null @@ -1,8 +0,0 @@ -export function template(site_logo) { - return ` -
    -
    -
    -
    - `; -} \ No newline at end of file diff --git a/recruitConnect_2/components/table.js b/recruitConnect_2/components/table.js deleted file mode 100644 index bfc344be..00000000 --- a/recruitConnect_2/components/table.js +++ /dev/null @@ -1,58 +0,0 @@ -export function table(files) { - return ` - - - - - - - - - - - - - ${files.result.map((value) => ` - - - - - - - - - `.trim()).join('')} - -
    Submission IDSubmission File NameSubmission Time StampVersionView SubmissionDownload Submission
    ${value.id}${value.submissionFileName}${new Date(value.submissionTimestamp).toLocaleString()}${value.version}
    - `; -} - - -export function submissionTable(data){ - return `
    - - - ${data.map((value) => ` - - - - `.trim()).join('')} - - - - - -
    ${value.id}
    `; -} - -const getObjectKeys = (data) => { - let keys = []; - data.forEach((dt, index) => { - if(index === 0) { - for(let key in dt){ - keys.push(key); - } - } - }); - return keys; -} \ No newline at end of file diff --git a/recruitConnect_2/images/Chicago_Logo.png b/recruitConnect_2/images/Chicago_Logo.png deleted file mode 100644 index 649e5228..00000000 Binary files a/recruitConnect_2/images/Chicago_Logo.png and /dev/null differ diff --git a/recruitConnect_2/images/HP_Logo_png.png b/recruitConnect_2/images/HP_Logo_png.png deleted file mode 100644 index 3886a5c5..00000000 Binary files a/recruitConnect_2/images/HP_Logo_png.png and /dev/null differ diff --git a/recruitConnect_2/images/Henry_Ford_Logo.png b/recruitConnect_2/images/Henry_Ford_Logo.png deleted file mode 100644 index f97dd185..00000000 Binary files a/recruitConnect_2/images/Henry_Ford_Logo.png and /dev/null differ diff --git a/recruitConnect_2/images/Kaiser_Logo.png b/recruitConnect_2/images/Kaiser_Logo.png deleted file mode 100644 index a8e49b24..00000000 Binary files a/recruitConnect_2/images/Kaiser_Logo.png and /dev/null differ diff --git a/recruitConnect_2/images/Marshfield_Logo.png b/recruitConnect_2/images/Marshfield_Logo.png deleted file mode 100644 index 2a7be325..00000000 Binary files a/recruitConnect_2/images/Marshfield_Logo.png and /dev/null differ diff --git a/recruitConnect_2/images/Norc_Logo.png b/recruitConnect_2/images/Norc_Logo.png deleted file mode 100644 index 3ea4be65..00000000 Binary files a/recruitConnect_2/images/Norc_Logo.png and /dev/null differ diff --git a/recruitConnect_2/images/Sanford_Logo.png b/recruitConnect_2/images/Sanford_Logo.png deleted file mode 100644 index e1f169e7..00000000 Binary files a/recruitConnect_2/images/Sanford_Logo.png and /dev/null differ diff --git a/recruitConnect_2/images/nci_logo.jpg b/recruitConnect_2/images/nci_logo.jpg deleted file mode 100644 index 0ec5a503..00000000 Binary files a/recruitConnect_2/images/nci_logo.jpg and /dev/null differ diff --git a/recruitConnect_2/index.html b/recruitConnect_2/index.html deleted file mode 100644 index 1ee09771..00000000 --- a/recruitConnect_2/index.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - -
    -
    -
    -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    -
    -
    - - -
    - -
    -
    -
    -

    -


    -
    -
    -
    -
    - - \ No newline at end of file diff --git a/recruitConnect_2/recruitConnect.css b/recruitConnect_2/recruitConnect.css deleted file mode 100644 index 504ea0ee..00000000 --- a/recruitConnect_2/recruitConnect.css +++ /dev/null @@ -1,43 +0,0 @@ -body { - color:navy; - font-family:sans-serif -} -h2 { - color:blueviolet -} -button { - border-radius: 15px; - color:blue -} -td { - font-family:inherit -} -.col{ - padding: 30px 0 30px 0; -} -.row-first { - padding-top: 60px; -} -.no-wrap { - white-space: nowrap; -} -img{ - height: 80px; - width: 180px; -} -.td-align { - text-align: center; -} -.active { - color: #253648; -} -.fas:hover { - color: #253648; -} -.site-specific-logo { - height: 100px; - width: 280px; -} -.align-right { - text-align: right; -} diff --git a/recruitConnect_2/recruitConnect.js b/recruitConnect_2/recruitConnect.js deleted file mode 100644 index b81a77c6..00000000 --- a/recruitConnect_2/recruitConnect.js +++ /dev/null @@ -1,215 +0,0 @@ -import { table } from './components/table.js' -import { template } from './components/siteSpecificLogos.js'; - -let recruit={} -recruit.gitIcon=document.createElement('span').innerHTML='' -recruit.ui=function(div){ // build user interface if - recruit.div=div||document.getElementById('recruitmentDiv') - if(recruit.div){ // if a target div exists, build - if(!localStorage.recruit){localStorage.recruit='{}'} - recruit.store=JSON.parse(localStorage.recruit) - recruit.store.key=recruit.store.key||'' - // login UI, borrowing stored key is available - recruit.div.innerHTML=` - - -
    Connect Dashboard - - - -
    -

    Site Key:   -   - save

    -
    - `; - document.getElementById('connectKey').addEventListener('click', withKey); - } -} - -recruit.api=location.origin.indexOf('localhost') !== -1 ? 'http://localhost:3000' : 'https://episphere-connect.herokuapp.com'; - -const withKey=function(){ - let siteInfoElement = document.getElementById('siteInfo'); - siteInfoElement.innerHTML = ''; - recruit.dash=recruit.div.querySelector('#recruitDash') - // login with key and display dashboard - recruit.key=recruit.div.querySelector('#key').value - if(recruit.div.querySelector('#checkSave').checked){ // store key for future sessions if requested - let st=JSON.parse(localStorage.recruit) - st.key=recruit.key - localStorage.recruit=JSON.stringify(st) - } - recruit.dash=recruit.div.querySelector('#recruitDash') // <-- this is where the dynamic interaction happens - recruit.dashLogin() -} - -recruit.dashLogin=async function(){ // build the dashboard after logged with key - // check that key is valid - try { - let files = await (await fetch(`${recruit.api}/files`,{ - headers:{ - "Authorization":`Bearer ${recruit.key}` - } - })).json(); - let siteLogoPath = ''; - if(recruit.key === 'FHYFHORxImxG6nlbfpfj'){ - siteLogoPath = './images/Chicago_Logo.png'; - } - else if(recruit.key === 'AaJSCDZqGLqIxYxsjiob'){ - siteLogoPath = './images/HP_Logo_png.png'; - } - else if(recruit.key === 'lSP3Sz6FnyfV7imOlvjF'){ - siteLogoPath = './images/Henry_Ford_Logo.png'; - } - else if(recruit.key === 'Rd69wieaphftOeTRiQJQ'){ - siteLogoPath = './images/Kaiser_Logo.png'; - } - else if(recruit.key === 'dZD798U6AJU7cphyKc7H'){ - siteLogoPath = './images/Marshfield_Logo.png'; - } - else if(recruit.key === 'oXAG9rlxKEUChnarQqtj'){ - siteLogoPath = './images/Norc_Logo.png'; - } - else if(recruit.key === 'ac6i1hk9tMH4oNZO3KJM'){ - siteLogoPath = './images/Sanford_Logo.png'; - } - else{ - siteLogoPath = './images/nci_logo.jpg'; - } - document.getElementById('siteSpecificLogos').innerHTML = template(siteLogoPath) - recruit.dashUI(files) - } catch(e){ - recruit.dash.innerHTML='

    login failed - invalid key?

    ' - setTimeout(function(){ - location.reload() - },1000) - } -} - -recruit.dashUI=async function(files){ - document.getElementById('recruitDash').hidden=true; - let fileList = document.getElementById('fileList'); - if(files.result.length !== 0){ - fileList.innerHTML=table(files); - } - else{ - fileList.innerHTML = 'No Submission Found!'; - } - - let viewSubmissionElement = document.getElementsByClassName('viewSubmission'); - let downloadSubmissionElement = document.getElementsByClassName('downloadSubmission'); - - Array.from(viewSubmissionElement).forEach(element => { - element.addEventListener('click', () => { - removeActiveClass('viewSubmission'); - element.classList.add('active'); - const submissionId = element.dataset.submissionId; - const result = getSubmissionData(submissionId); - result.then(data => { - let finalData = preProcessData(data); - displayTable(finalData); - }); - }); - }); - - Array.from(downloadSubmissionElement).forEach(element => { - element.addEventListener('click', () => { - removeActiveClass('downloadSubmission'); - element.classList.add('active'); - const submissionId = element.dataset.submissionId; - const result = getSubmissionData(submissionId); - result.then(data => { - const csv = convertToCSV(preProcessData(data)); - downloadCSVFile(csv); - }); - }); - }); -} - -const getSubmissionData = async (submissionId) => { - let files = await (await fetch(`${recruit.api}/files/${submissionId}`,{ - headers:{ - "Authorization":`Bearer ${recruit.key}` - } - })).json(); - return files.result; -} - -const removeActiveClass = (className) => { - let fileIconElement = document.getElementsByClassName(className); - Array.from(fileIconElement).forEach(elm => { - elm.classList.remove('active'); - }); -} - -const preProcessData = data => { - data.forEach(obj => { - for (let key in obj){ - if(key === 'Connect_ID'){ - obj['Connect_ID (Internal)'] = obj[key]; - obj[key] = generateHumanReadableID(); - } - } - }); - return data; -} - -const generateHumanReadableID = () => { - let ID = Math.floor(100000000000 + Math.random() * 900000000000).toString(); - if(ID.indexOf('0') !== 0) return ID; -} - -const displayTable = (tableData) => { - var table = new Tabulator('#viewSubmission', { - data:tableData, - layout:"fitColumns", - autoColumns:true, - height:"600px", - pagination:"local", - paginationSize:30, - paginationSizeSelector:[30, 40, 50, 60], - movableColumns:true, - }); -}; - -function convertToCSV(objArray) { - var array = typeof objArray != 'object' ? JSON.parse(objArray) : objArray; - var str = ''; - - for (var i = 0; i < array.length; i++) { - var header = ''; - var line = ''; - if(i === 0){ - const tmp_arr = Object.keys(array[i]); - tmp_arr.forEach((h, index) => { - if(index !== 0) header += ','; - header += h; - }) - header += '\n'; - } - - for (var index in array[i]) { - if (line != '') line += ',' - line += array[i][index]; - } - - str += header+line + '\r\n'; - } - return str; -}; - -function downloadCSVFile(csv){ - let csvData = new Blob([csv], { type: 'data:text/csv;charset=utf-8,' }); - let csvUrl = URL.createObjectURL(csvData); - let link = document.createElement('a'); - link.href = csvUrl; - link.target = '_blank'; - link.download = 'submission_data.csv'; - link.style.visibility = 'hidden'; - document.body.appendChild(link); - link.click(); - document.body.removeChild(link); -} - -window.onload=_=>{recruit.ui()} \ No newline at end of file diff --git a/recruitParticipant/Screenshot 2019-08-12 09.16.42.png b/recruitParticipant/Screenshot 2019-08-12 09.16.42.png deleted file mode 100644 index 6a9612be..00000000 Binary files a/recruitParticipant/Screenshot 2019-08-12 09.16.42.png and /dev/null differ diff --git a/recruitParticipant/index.html b/recruitParticipant/index.html deleted file mode 100644 index b6d997ee..00000000 --- a/recruitParticipant/index.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - -
    diff --git a/recruitParticipant/recruitParticipant.css b/recruitParticipant/recruitParticipant.css deleted file mode 100644 index 915c382a..00000000 --- a/recruitParticipant/recruitParticipant.css +++ /dev/null @@ -1,22 +0,0 @@ -body { - color:navy; - font-family:sans-serif -} -h2 { - color:blueviolet -} -h3 { - color:maroon; - font-family:sans-serif -} -button { - border-radius: 15px; - color:blue -} -td { - font-family:inherit -} -th { - font-family:inherit; - color:maroon -} diff --git a/recruitParticipant/recruitParticipant.js b/recruitParticipant/recruitParticipant.js deleted file mode 100644 index d1052285..00000000 --- a/recruitParticipant/recruitParticipant.js +++ /dev/null @@ -1,343 +0,0 @@ -console.log('recruitConnect.js loaded') - -recruit={} -recruit.gitIcon=document.createElement('span').innerHTML='' -recruit.parms={} -// Site data from https://us-central1-nih-nci-dceg-episphere-dev.cloudfunctions.net/getSiteDetails -// At some point this will be an asynchrnous call to a jsonfile or to the data service above -//recruit.sitesData=(await recruit.getLazyJSON('https://us-central1-nih-nci-dceg-episphere-dev.cloudfunctions.net/getSiteDetails')).data -//recruit.sitesData=(await recruit.getLazyJSON('https://us-central1-nih-nci-dceg-episphere-dev.cloudfunctions.net/getSiteDetails')).data -recruit.ui=async function(div){ // build user interface if - recruit.div=div||document.getElementById('recruitmentDiv') - if(recruit.div){ // if a target div exists, build - if(!localStorage.recruit){localStorage.recruit='{}'} - recruit.store=JSON.parse(localStorage.recruit) - recruit.store.key=recruit.store.key||'' - // login UI, borrowing stored key is available - recruit.div.innerHTML=` - - -
    Participant Recruitment (towards an App) - - - -

    Use something with the form https://episphere.github.io/dashboard/recruitParticipant/#siteCode={siteCode}&token={participantToken} for an example of a tokenized trajectory. The code accomodates search and hash (try the same link with # instead of ?), or a combination of the two. The preference for the hash is that it can be wiped from the URL and from prying eyes. If the page is then reloaded, or returned to later, the latest version of teh parameters, whicever they may be, is retrieved. Give it a try.

    -
    -

    @ App

    -
    -
    -
    - - ` - // check parameters in location.search - if(location.search.length>2){ - location.search.slice(1).split('&').forEach(pp=>{ - pp = pp.split('=') - recruit.parms[pp[0]]=pp[1] - //debugger - }) - } - // check parameters in location.hash <-- note hash happens after search to we get precedence in parameter defenitions passed by hash - if(location.hash.length>2){ - location.hash.slice(1).split('&').forEach(pp=>{ - pp = pp.split('=') - recruit.parms[pp[0]]=pp[1] - //debugger - }) - } - // update localStorage - let parms={} - if(localStorage.recruitParms){parms=JSON.parse(localStorage.recruitParms)} - Object.keys(recruit.parms).forEach(p=>{ - parms[p]=recruit.parms[p] - }) - localStorage.recruitParms=JSON.stringify(parms) - recruit.parms=parms - - // clean hash - location.hash='' - - // report parameters - const liParms=document.createElement('li') - recruitDash.appendChild(liParms) - liParms.innerHTML=`Parameters:
    ${JSON.stringify(recruit.parms,null,3)}
    ` - - const liSite=document.createElement('li') - liSite.innerHTML='Select Site: ' - recruitDash.appendChild(liSite) - - const liToken=document.createElement('li') - recruitDash.appendChild(liToken) - liToken.innerHTML='Token: ' - - // update parms - function updateParms(){ - liParms.innerHTML=`Parameters:
    ${JSON.stringify(recruit.parms,null,3)}
    ` - localStorage.recruitParms=JSON.stringify(recruit.parms) - } - recruit.updateParms=updateParms - - - // Site selection/claim - recruit.getLazyJSON('https://us-central1-nih-nci-dceg-episphere-dev.cloudfunctions.net/getSiteDetails',24*60*60*1000).then(x=>{ - recruit.sitesData=[] - x.data.forEach(d=>{ // making sure siteCode is the array index - recruit.sitesData[d.siteCode]=d - }) - recruit.selectSite=document.createElement('select') - liSite.appendChild(recruit.selectSite) - recruit.sitesData.forEach((s,i)=>{ - let op = document.createElement('option') - op.innerText=s.siteName - op.value=s.siteCode - op.i=i - recruit.selectSite.appendChild(op) - }) - recruit.selectSite.value=recruit.parms.siteCode - recruit.selectSite.onchange=function(){ - recruit.parms.siteCode=this.selectedOptions[0].value - updateParms() - } - }) - - // Token - if(recruit.parms.token){ - inputToken.value=recruit.parms.token - } - generateToken.onclick=async function(){ - tks = await (await fetch('https://us-central1-nih-nci-dceg-episphere-dev.cloudfunctions.net/getKey')).json() - recruit.parms.token=inputToken.value=tks.token - recruit.parms.access_token=tks.access_token - updateParms() - } - showToken.onclick=function(){ - inputToken.type="text" - setTimeout(function(){ - inputToken.type="password" - },5000) - } - validateToken.onclick=async function(){ - assTk = await (await fetch('https://us-central1-nih-nci-dceg-episphere-dev.cloudfunctions.net/validateToken?token='+inputToken.value)).json() - if(assTk.message){ - recruit.parms.access_token=validateToken.innerText=assTk.message - validateToken.style.color='red' - }else{ - recruit.parms.access_token=assTk.access_token||'bearer_'+Math.random().toString().slice(2) - validateToken.innerText='valid' - validateToken.style.color='green' - recruit.educate() - } - updateParms() - } - - inputToken.onkeyup=async function(evt){ - if(evt.keyCode==13){ - recruit.parms.token=this.value - updateParms() - } - - //debugger - } - - - - //

    Participant Key: save

    - //

    If you are a new user you can also

    - - //connectKey.click() - - resetLocal.onclick=function(){ - delete localStorage.recruitParms - location.reload() - } - } -} - -recruit.educate=function(id){ - id=id||'msg' - let div = document.getElementById('msg') - div.innerHTML=` -
    -

    @ Connect

    -

    This is your profile record stored at NCI. Note the App knows more about you than NCI does, and that is the point: a participant centered governance model where the participant stays in control.

    -
    -
    -

    -
    -

    @ Participants

    -

    - You could expose this to participants being recruited in a number of ways: -

      -
    1. Generic targeted recruitment (the prototype all others map back to):
      - ${location.origin+location.pathname}#token=${recruit.parms.token}&siteCode=${recruit.parms.siteCode} -
    2. -
    3. Targeted recruitment with token only (under dev):
      - ${location.origin+location.pathname}#${recruit.parms.token} -
    4. -
    5. Site specific recruitment:
      - ${location.origin+location.pathname}#siteCode=${recruit.parms.siteCode} -
    6. -
    7. Customized site specific recruitment - you could host it with a redirect with these parameters, or we could hosted for you as something like (your content would direct participant to the parameters in #1):
      - ${location.origin+location.pathname}/${recruit.selectSite.selectedOptions[0].innerText.replace(/\s/g,'')} -
    8. -
    9. temporary link (1 hr default expiration) without participant token for data entry:
      - ${location.origin+location.pathname}#access_token=${recruit.parms.access_token} -
    10. -
    11. to provoke conversation about tokenization trajectories:
      - ${location.origin+location.pathname}#onlyAppKnows=secret@email.com -
    12. - -
    - - - ` - recruit.reccord={} - recruit.reccordUI() - -} - - -recruit.api='https://us-central1-nih-nci-dceg-episphere-dev.cloudfunctions.net' - -recruit.getToken=async function(){ - return (await fetch(recruit.api+'/getKey')).json() -} - -recruit.getUserProfile=async function(){ - return await(await fetch(`${recruit.api}/getUserProfile`,{ - headers:{ - //'Content-Type': 'application/json', - 'Authorization': 'Bearer '+ recruit.parms.access_token - } - })).json() -} -recruit.reccordUI=async function(id){ - id=id||'participantProfile' // default div - let div=document.getElementById(id) - let doc = await recruit.getUserProfile() - recruit.parms.atConnect=doc.data // <--- the record (doc) is linked to the parameter structure - // default parameters - recruit.parms.atConnect.created_at=recruit.parms.atConnect.created_at||Date() - recruit.parms.atConnect.siteCode=recruit.parms.atConnect.siteCode||recruit.parms.siteCode - recruit.parms.atConnect.siteName=recruit.parms.atConnect.siteName||recruit.sitesData[parseInt(recruit.parms.siteCode)].siteName - recruit.updateParms() // <-- update local parameters with a personal device in mind. - recruit.profileTable=document.createElement('table') - recruit.profileTable.style.backgroundColor='silver' - div.appendChild(recruit.profileTable) - let rows=[] - // rows[0]=['Parm','current','new'] - Object.keys(recruit.parms.atConnect).forEach(p=>{ - rows.push([p,recruit.parms.atConnect[p],``]) - }) - - //let hd=document.createElement('theader');recruit.profileTable.appendChild(hd) - let htr=document.createElement('tr');recruit.profileTable.appendChild(htr) - let th1=document.createElement('th');htr.appendChild(th1) - th1.innerHTML='Parameter' - let th2=document.createElement('th');htr.appendChild(th2) - th2.innerHTML='Value' - let th3=document.createElement('th');htr.appendChild(th3) - th3.innerHTML='Change' - // fill table - recruit.tabulateProfile() - // add field - let divNewField = document.createElement('div') - divNewField.innerHTML='Add new field: ' - div.appendChild(divNewField) - - //debugger - let bt = document.createElement('button') - bt.innerText='Submit to Connect@NCI/DCEG' - bt.style.backgroundColor='yellow' - div.appendChild(bt) - bt.onclick=recruit.submit -} - -recruit.submit=async function(){ - this.innerText="Submitted to Connect@NCI/DCEG" - this.style.backgroundColor='orange' - let parms_atConnect = recruit.parms.atConnect - parms_atConnect.token=recruit.parms.token - let res = await (await fetch(recruit.api+'/recruit/submit',{ - method:'post', - //mode:'cors', - //credentials: 'include', - //cache: 'no-cache', - body:JSON.stringify(parms_atConnect), - headers:{ - 'Content-Type': 'application/json', - 'Authorization': 'Bearer '+ recruit.parms.access_token - } - - })).json() - //debugger - let that=this - - setTimeout(_=>{ - that.innerText="Submit to Connect@NCI/DCEG" - that.style.backgroundColor='yellow' - },500) - -} - -recruit.tabulateProfile=function(){ - recruit.profileTable.innerHTML='' - Object.keys(recruit.parms.atConnect).forEach(p=>{ - let tr = document.createElement('tr');recruit.profileTable.appendChild(tr) - let td1 = document.createElement('td');tr.appendChild(td1) - td1.innerHTML=p;td1.style.color='green' - let td2 = document.createElement('td');tr.appendChild(td2) - td2.innerHTML=`` - let td3 = document.createElement('td');tr.appendChild(td3) - td3.innerHTML=` ` - }) -} - -recruit.updateInput=function(that){ - let p = that.parentElement.parentElement.firstChild.textContent // parameter name - recruit.parms.atConnect[p]=that.value - recruit.updateParms() - //debugger -} - -recruit.addNewField=function(that){ - let newParmName=that.parentElement.querySelector('input').value - let msgEl = that.parentElement.querySelector('#newFieldMsg') - if(newParmName.length==0){ - msgEl.innerHTML=' field name missing' - } - if(recruit.parms.atConnect[newParmName]){ - msgEl.innerHTML=' field already exists' - } - if(msgEl.innerHTML.length==0){ - recruit.parms.atConnect[newParmName]='' - recruit.tabulateProfile() - recruit.updateParms() - } - - setTimeout(_=>{ - msgEl.innerHTML='' - },1000) - //debugger -} - -recruit.getLazyJSON = async function(url,tw){ // lazily cashing url call within time window - tw = tw || 10000 // default time window in miliseconds - let cash = localStorage.lazyJSON || '{}' - cash = JSON.parse(cash) - async function getCash(url){ // note cash is being passed by scope - cash[url] = await (await fetch(url)).json() - cash[url].retrieved_at=Date.now() - localStorage.lazyJSON=JSON.stringify(cash) // update - return cash[url] // for now good reason except debugging - } - if(!cash[url]){await getCash(url)} // first call to this url - if((Date.now()-cash[url].retrieved_at)>tw){await getCash(url)} // updatign stale value - return cash[url] -} - - -window.onload=_=>{recruit.ui()} - - -// a comment illustrating the code update in the workshop \ No newline at end of file diff --git a/recruitSite/index.html b/recruitSite/index.html deleted file mode 100644 index 7bad7eba..00000000 --- a/recruitSite/index.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - -
    diff --git a/recruitSite/recruitSite.css b/recruitSite/recruitSite.css deleted file mode 100644 index f5ed8f3c..00000000 --- a/recruitSite/recruitSite.css +++ /dev/null @@ -1,14 +0,0 @@ -body { - color:navy; - font-family:sans-serif -} -h2 { - color:blueviolet -} -button { - border-radius: 15px; - color:blue -} -td { - font-family:inherit -} diff --git a/recruitSite/recruitSite.js b/recruitSite/recruitSite.js deleted file mode 100644 index 484e3d85..00000000 --- a/recruitSite/recruitSite.js +++ /dev/null @@ -1,85 +0,0 @@ -console.log('recruitConnect.js loaded') - -recruit={} -recruit.gitIcon=document.createElement('span').innerHTML='' -recruit.ui=function(div){ // build user interface if - recruit.div=div||document.getElementById('recruitmentDiv') - if(recruit.div){ // if a target div exists, build - if(!localStorage.recruit){localStorage.recruit='{}'} - recruit.store=JSON.parse(localStorage.recruit) - recruit.store.key=recruit.store.key||'' - // login UI, borrowing stored key is available - recruit.div.innerHTML=` - - -
    Site Dashboard - - - -
    -

    Site Key: save

    -

    If you are a new user you can also

    -
    - ` - //connectKey.click() - - - - } -} - -recruit.api='https://us-central1-nih-nci-dceg-episphere-dev.cloudfunctions.net' - -recruit.withKey= async function(){ - recruit.dash=recruit.div.querySelector('#recruitDash') - // login with key and display dashboard - recruit.key=recruit.div.querySelector('#key').value - if(recruit.div.querySelector('#checkSave').checked){ // store key for future sessions if requested - let st=JSON.parse(localStorage.recruit) - st.key=recruit.key - localStorage.recruit=JSON.stringify(st) - } - recruit.dash=recruit.div.querySelector('#recruitDash') // <-- this is where the dynamic interaction happens - recruit.div.querySelector('#newKeyP').innerHTML='validating key ...' - const res = await (await fetch(`${recruit.api}/validateToken?token=${recruit.key}`)).json() - recruit.dash.innerHTML=`
    ${JSON.stringify(res,null,3)}
    ` -} - -recruit.generateKey=async function(){ - recruit.dash=recruit.div.querySelector('#recruitDash') - let res = await (await fetch(`${recruit.api}/getKey`)).json() - recruit.div.querySelector('#key').value=res.token - recruit.div.querySelector('#newKeyP').innerHTML=`Your Site Key is ${res.token}. Please store it somewhere safe, you'll need it to start new sessions. This new key was also filled above, so you can now click on the connect button to start a session. If you check the save box, this key will also be stored in this machine and will be filled automatically. Do not use this option in devices that are not under your control at all times` -} - -recruit.dashUI=async function(files){ - let h = '' - h += `
    ${JSON.stringify(files,null,3)}
    ` - h += '' - h += '
    ...
    ' - recruit.dash.innerHTML=h - // file list - h='' - h += `

    File submissions (${files.result.length})

    ` - h += `

    ` - fileList.innerHTML=h - numFiles.onclick=function(){ - h='' - files.result.forEach(f=>{ - debugger - }) - - - } - numFiles.onclick() - -} - -recruit.selectSite=function(i){ - i = i||recruit.parms.site - let el= document.createElement('select') - -} - - -window.onload=_=>{recruit.ui()} \ No newline at end of file diff --git a/serviceWorker.js b/serviceWorker.js new file mode 100644 index 00000000..a13136f4 --- /dev/null +++ b/serviceWorker.js @@ -0,0 +1,51 @@ +importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js'); + +const appVersion = "v24.7.0"; +workbox.setConfig({ debug: false }); +const { registerRoute } = workbox.routing; +const { CacheFirst, NetworkFirst } = workbox.strategies; +const { ExpirationPlugin } = workbox.expiration; + +const cacheNameMapper = { + "static-cache": `static-cache-${appVersion}`, + "images-cache": `images-cache-${appVersion}`, +}; + +const currCacheNameArray = Object.values(cacheNameMapper); + +registerRoute(/\.(?:js|css|html|pdf)$/, new NetworkFirst({ cacheName: cacheNameMapper["static-cache"] })); +registerRoute(/\.(?:png|jpg|jpeg|svg|gif|ico)$/, + new CacheFirst({ + cacheName: cacheNameMapper["images-cache"], + plugins: [ + new ExpirationPlugin({ + maxEntries: 30, + maxAgeSeconds: 7 * 24 * 60 * 60, + }) + ] + }) +); + +self.addEventListener("install", () => { + self.skipWaiting(); + }); + + self.addEventListener("activate", (event) => { + event.waitUntil( + caches.keys().then((cacheNames) => { + return Promise.all( + cacheNames.map((cacheName) => { + if (!currCacheNameArray.includes(cacheName)) { + return caches.delete(cacheName); + } + }) + ); + }) + ); +}); + +self.addEventListener("message", (event) => { + if (event.data.action === "getAppVersion") { + event.source.postMessage({ action: "sendAppVersion", payload: appVersion }); + } +}); \ No newline at end of file diff --git a/siteManagerDashboard/dev/cloudbuild.yaml b/siteManagerDashboard/dev/cloudbuild.yaml deleted file mode 100644 index b476e166..00000000 --- a/siteManagerDashboard/dev/cloudbuild.yaml +++ /dev/null @@ -1,3 +0,0 @@ -steps: -- name: 'gcr.io/cloud-builders/gsutil' - args: ['cp', '-r', 'siteManagerDashboard/*', 'gs://myconnect_dashboard_dev'] \ No newline at end of file diff --git a/siteManagerDashboard/forms/Consent/BSWH_consent_V0.02_Span.pdf b/siteManagerDashboard/forms/Consent/BSWH_consent_V0.02_Span.pdf deleted file mode 100644 index 3c1fad53..00000000 Binary files a/siteManagerDashboard/forms/Consent/BSWH_consent_V0.02_Span.pdf and /dev/null differ diff --git a/siteManagerDashboard/forms/Consent/HFHS_consent_V0.03_Span.pdf b/siteManagerDashboard/forms/Consent/HFHS_consent_V0.03_Span.pdf deleted file mode 100644 index 8a263064..00000000 Binary files a/siteManagerDashboard/forms/Consent/HFHS_consent_V0.03_Span.pdf and /dev/null differ diff --git a/siteManagerDashboard/forms/Consent/HP_consent_V0.05_Span.pdf b/siteManagerDashboard/forms/Consent/HP_consent_V0.05_Span.pdf deleted file mode 100644 index 16eaa8b0..00000000 Binary files a/siteManagerDashboard/forms/Consent/HP_consent_V0.05_Span.pdf and /dev/null differ diff --git a/siteManagerDashboard/forms/Consent/KPCO_consent_V0.03_Span.pdf b/siteManagerDashboard/forms/Consent/KPCO_consent_V0.03_Span.pdf deleted file mode 100644 index 6eac27ec..00000000 Binary files a/siteManagerDashboard/forms/Consent/KPCO_consent_V0.03_Span.pdf and /dev/null differ diff --git a/siteManagerDashboard/forms/Consent/KPGA_consent_V0.04_Span.pdf b/siteManagerDashboard/forms/Consent/KPGA_consent_V0.04_Span.pdf deleted file mode 100644 index b4a7fc1e..00000000 Binary files a/siteManagerDashboard/forms/Consent/KPGA_consent_V0.04_Span.pdf and /dev/null differ diff --git a/siteManagerDashboard/forms/Consent/KPNW_consent_V0.03_Span.pdf b/siteManagerDashboard/forms/Consent/KPNW_consent_V0.03_Span.pdf deleted file mode 100644 index 6eac27ec..00000000 Binary files a/siteManagerDashboard/forms/Consent/KPNW_consent_V0.03_Span.pdf and /dev/null differ diff --git a/siteManagerDashboard/forms/Consent/MFC_consent_V0.03_Span.pdf b/siteManagerDashboard/forms/Consent/MFC_consent_V0.03_Span.pdf deleted file mode 100644 index b33a7869..00000000 Binary files a/siteManagerDashboard/forms/Consent/MFC_consent_V0.03_Span.pdf and /dev/null differ diff --git a/siteManagerDashboard/forms/Consent/NCI_consent_V0.05_Span.pdf b/siteManagerDashboard/forms/Consent/NCI_consent_V0.05_Span.pdf deleted file mode 100644 index 2634c18f..00000000 Binary files a/siteManagerDashboard/forms/Consent/NCI_consent_V0.05_Span.pdf and /dev/null differ diff --git a/siteManagerDashboard/forms/Consent/UCM_consent_V0.05_Span.pdf b/siteManagerDashboard/forms/Consent/UCM_consent_V0.05_Span.pdf deleted file mode 100644 index 1ff711b8..00000000 Binary files a/siteManagerDashboard/forms/Consent/UCM_consent_V0.05_Span.pdf and /dev/null differ diff --git a/siteManagerDashboard/forms/Data Destruction/Data_Destruction_V1.0_Span.pdf b/siteManagerDashboard/forms/Data Destruction/Data_Destruction_V1.0_Span.pdf deleted file mode 100644 index f85b8cc2..00000000 Binary files a/siteManagerDashboard/forms/Data Destruction/Data_Destruction_V1.0_Span.pdf and /dev/null differ diff --git a/siteManagerDashboard/forms/HIPAA Revocation/HIPAA_Revocation_V1.0_Span.pdf b/siteManagerDashboard/forms/HIPAA Revocation/HIPAA_Revocation_V1.0_Span.pdf deleted file mode 100644 index e13ff19b..00000000 Binary files a/siteManagerDashboard/forms/HIPAA Revocation/HIPAA_Revocation_V1.0_Span.pdf and /dev/null differ diff --git a/siteManagerDashboard/index.html b/siteManagerDashboard/index.html deleted file mode 100644 index a7251b65..00000000 --- a/siteManagerDashboard/index.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - Site Study Manager Dashboard - - - - - - - - - - - - - - -
    -
    - -
    -
    -
    -
    -
    - - - - - - - - - - - - - - \ No newline at end of file diff --git a/siteManagerDashboard/prod/cloudbuild.yaml b/siteManagerDashboard/prod/cloudbuild.yaml deleted file mode 100644 index 80ff1a1b..00000000 --- a/siteManagerDashboard/prod/cloudbuild.yaml +++ /dev/null @@ -1,3 +0,0 @@ -steps: -- name: 'gcr.io/cloud-builders/gsutil' - args: ['cp', '-r', 'siteManagerDashboard/*', 'gs://myconnect_dashboard_prod'] \ No newline at end of file diff --git a/siteManagerDashboard/stage/cloudbuild.yaml b/siteManagerDashboard/stage/cloudbuild.yaml deleted file mode 100644 index efb52478..00000000 --- a/siteManagerDashboard/stage/cloudbuild.yaml +++ /dev/null @@ -1,3 +0,0 @@ -steps: -- name: 'gcr.io/cloud-builders/gsutil' - args: ['cp', '-r', 'siteManagerDashboard/*', 'gs://myconnect_dashboard_stage'] \ No newline at end of file diff --git a/soccerDashboard/index.html b/soccerDashboard/index.html deleted file mode 100644 index 0af8a2da..00000000 --- a/soccerDashboard/index.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - SOCcer dashboard - - - -

    SOCcer Status

    -
    -
    -
    Development Soccer API
    -
    -
    -
    - is soccer up? - - - -
    -
    -
    -
    -
    -
    - -
    -
    Staging Soccer API
    -
    -
    -
    - is soccer up? - - - -
    -
    -
    -
    -
    -
    - -
    -
    Production Soccer API
    -
    -
    -
    - is soccer up? - - - -
    -
    -
    -
    -
    -
    -
    - - - diff --git a/soccerDashboard/soccerDashboard.css b/soccerDashboard/soccerDashboard.css deleted file mode 100644 index 40bf03d9..00000000 --- a/soccerDashboard/soccerDashboard.css +++ /dev/null @@ -1,25 +0,0 @@ -body { - margin: 40px; -} - -.dashboard { - display: grid; - grid-gap: 10px; - background-color: floralwhite; - grid-template-columns: auto auto auto; -} - -.view { - background-color: black; - color: white; - padding: 10px; - border-radius: 10px; - min-height: 150px; - min-width: 300px; - margin: 10px; -} - -.center { - margin: 10 auto; - text-align: center; -} diff --git a/siteManagerDashboard/dataCorrectionsTool.js b/src/dataCorrectionsTool.js similarity index 100% rename from siteManagerDashboard/dataCorrectionsTool.js rename to src/dataCorrectionsTool.js diff --git a/siteManagerDashboard/fieldToConceptIdMapping.js b/src/fieldToConceptIdMapping.js similarity index 100% rename from siteManagerDashboard/fieldToConceptIdMapping.js rename to src/fieldToConceptIdMapping.js diff --git a/siteManagerDashboard/idsToName.js b/src/idsToName.js similarity index 100% rename from siteManagerDashboard/idsToName.js rename to src/idsToName.js diff --git a/siteManagerDashboard/navigationBar.js b/src/navigationBar.js similarity index 100% rename from siteManagerDashboard/navigationBar.js rename to src/navigationBar.js diff --git a/siteManagerDashboard/participantChartsRender.js b/src/participantChartsRender.js similarity index 100% rename from siteManagerDashboard/participantChartsRender.js rename to src/participantChartsRender.js diff --git a/siteManagerDashboard/participantCommons.js b/src/participantCommons.js similarity index 99% rename from siteManagerDashboard/participantCommons.js rename to src/participantCommons.js index 8f382cdc..ad6e320f 100644 --- a/siteManagerDashboard/participantCommons.js +++ b/src/participantCommons.js @@ -1,5 +1,5 @@ import { renderParticipantDetails } from './participantDetails.js'; -import { animation, clearLocalStorage } from './index.js'; +import { animation, clearLocalStorage } from '../index.js'; import fieldMapping from './fieldToConceptIdMapping.js'; import { getIdToken, getDataAttributes, showAnimation, hideAnimation, baseAPI, urls } from './utils.js'; import { appState } from './stateManager.js'; diff --git a/siteManagerDashboard/participantDetails.js b/src/participantDetails.js similarity index 100% rename from siteManagerDashboard/participantDetails.js rename to src/participantDetails.js diff --git a/siteManagerDashboard/participantDetailsHelpers.js b/src/participantDetailsHelpers.js similarity index 100% rename from siteManagerDashboard/participantDetailsHelpers.js rename to src/participantDetailsHelpers.js diff --git a/siteManagerDashboard/participantHeader.js b/src/participantHeader.js similarity index 100% rename from siteManagerDashboard/participantHeader.js rename to src/participantHeader.js diff --git a/siteManagerDashboard/participantLookup.js b/src/participantLookup.js similarity index 100% rename from siteManagerDashboard/participantLookup.js rename to src/participantLookup.js diff --git a/siteManagerDashboard/participantMessages.js b/src/participantMessages.js similarity index 100% rename from siteManagerDashboard/participantMessages.js rename to src/participantMessages.js diff --git a/siteManagerDashboard/participantSummary.js b/src/participantSummary.js similarity index 100% rename from siteManagerDashboard/participantSummary.js rename to src/participantSummary.js diff --git a/siteManagerDashboard/participantSummaryRow.js b/src/participantSummaryRow.js similarity index 100% rename from siteManagerDashboard/participantSummaryRow.js rename to src/participantSummaryRow.js diff --git a/siteManagerDashboard/participantWithdrawal.js b/src/participantWithdrawal.js similarity index 100% rename from siteManagerDashboard/participantWithdrawal.js rename to src/participantWithdrawal.js diff --git a/siteManagerDashboard/participantWithdrawalForm.js b/src/participantWithdrawalForm.js similarity index 100% rename from siteManagerDashboard/participantWithdrawalForm.js rename to src/participantWithdrawalForm.js diff --git a/siteManagerDashboard/participantWithdrawalRender.js b/src/participantWithdrawalRender.js similarity index 100% rename from siteManagerDashboard/participantWithdrawalRender.js rename to src/participantWithdrawalRender.js diff --git a/siteManagerDashboard/notifications/retrieveNotifications.js b/src/retrieveNotifications.js similarity index 98% rename from siteManagerDashboard/notifications/retrieveNotifications.js rename to src/retrieveNotifications.js index 007237c4..24098947 100644 --- a/siteManagerDashboard/notifications/retrieveNotifications.js +++ b/src/retrieveNotifications.js @@ -1,7 +1,7 @@ -import { dashboardNavBarLinks, removeActiveClass } from '../navigationBar.js'; -import { getIdToken, showAnimation, hideAnimation, baseAPI } from '../utils.js'; +import { dashboardNavBarLinks, removeActiveClass } from './navigationBar.js'; +import { getIdToken, showAnimation, hideAnimation, baseAPI } from './utils.js'; import { getSchemaHtmlStr, handleEmailPreview } from './storeNotifications.js'; -import { appState } from '../stateManager.js'; +import { appState } from './stateManager.js'; export const renderRetrieveNotificationSchema = async (showDrafts = false) => { const isParent = localStorage.getItem("isParent"); diff --git a/siteManagerDashboard/siteMessages.js b/src/siteMessages.js similarity index 100% rename from siteManagerDashboard/siteMessages.js rename to src/siteMessages.js diff --git a/siteManagerDashboard/stateManager.js b/src/stateManager.js similarity index 100% rename from siteManagerDashboard/stateManager.js rename to src/stateManager.js diff --git a/siteManagerDashboard/notifications/storeNotifications.js b/src/storeNotifications.js similarity index 99% rename from siteManagerDashboard/notifications/storeNotifications.js rename to src/storeNotifications.js index b5f67f9d..fd685137 100644 --- a/siteManagerDashboard/notifications/storeNotifications.js +++ b/src/storeNotifications.js @@ -1,6 +1,6 @@ -import { dashboardNavBarLinks, removeActiveClass } from '../navigationBar.js'; -import { showAnimation, hideAnimation, baseAPI, getIdToken, triggerNotificationBanner } from '../utils.js'; -import { appState } from '../stateManager.js'; +import { dashboardNavBarLinks, removeActiveClass } from './navigationBar.js'; +import { showAnimation, hideAnimation, baseAPI, getIdToken, triggerNotificationBanner } from './utils.js'; +import { appState } from './stateManager.js'; const converter = new showdown.Converter(); const newsletterCategories = ["newsletter", "eNewsletter", "anniversaryNewsletter"]; diff --git a/siteManagerDashboard/utils.js b/src/utils.js similarity index 97% rename from siteManagerDashboard/utils.js rename to src/utils.js index f8627ded..16f22d56 100644 --- a/siteManagerDashboard/utils.js +++ b/src/utils.js @@ -155,7 +155,7 @@ export const pdfCoordinatesMap = { 'V0.04': [{x: 90, y: 402}, {x0: 90, y0: 362}, {x1: 110, y1: 322}], 'V0.05': { 'Eng': [{x: 90, y: 402}, {x0: 90, y0: 362}, {x1: 110, y1: 322}], - 'Span': [{x: 90, y: 402}, {x0: 90, y0: 362}, {x1: 110, y1: 322}] + 'Span': [{x: 105, y: 392}, {x0: 105, y0: 352}, {x1: 105, y1: 312}] }, 'V1.0': [{x: 90, y: 420}, {x0: 90, y0: 380}, {x1: 110, y1: 340}] }, @@ -163,7 +163,7 @@ export const pdfCoordinatesMap = { 'V0.02': [{x: 110, y: 380}, {x0: 110, y0: 340}, {x1: 115, y1: 300}], 'V0.03': { 'Eng': [{x: 90, y: 410}, {x0: 90, y0: 370}, {x1: 110, y1: 330}], - 'Span': [{x: 90, y: 410}, {x0: 90, y0: 370}, {x1: 110, y1: 330}] + 'Span': [{x: 105, y: 410}, {x0: 105, y0: 370}, {x1: 105, y1: 330}] }, 'V1.0': [{x: 110, y: 380}, {x0: 110, y0: 340}, {x1: 115, y1: 300}], }, @@ -204,7 +204,7 @@ export const pdfCoordinatesMap = { 'V0.02': [{x: 110, y: 425}, {x0: 110, y0: 385}, {x1: 115, y1: 345}], 'V0.03': { 'Eng': [{x: 110, y: 405}, {x0: 110, y0: 365}, {x1: 115, y1: 325}], - 'Span': [{x: 110, y: 405}, {x0: 110, y0: 365}, {x1: 115, y1: 325}] + 'Span': [{x: 110, y: 395}, {x0: 110, y0: 355}, {x1: 110, y1: 315}] }, 'V1.0': [{x: 110, y: 420}, {x0: 110, y0: 380}, {x1: 115, y1: 345}] }, @@ -212,7 +212,7 @@ export const pdfCoordinatesMap = { 'V0.02': [{x: 120, y: 407}, {x0: 105, y0: 365}, {x1: 110, y1: 325}], 'V0.03': { 'Eng': [{x: 120, y: 730}, {x0: 120, y0: 690}, {x1: 120, y1: 655}], - 'Span': [{x: 120, y: 730}, {x0: 120, y0: 690}, {x1: 120, y1: 655}] + 'Span': [{x: 120, y: 200}, {x0: 120, y0: 160}, {x1: 120, y1: 125}] }, 'V1.0': [{x: 120, y: 407}, {x0: 120, y0: 367}, {x1: 120, y1: 330}] },