From dea7b3cf6ad69d8f8be5e9e8c4bdff3c0b2733eb Mon Sep 17 00:00:00 2001 From: Sahil Malhotra Date: Mon, 11 Jul 2022 12:57:18 -0400 Subject: [PATCH 1/4] created UI data integration, css styling remains --- .../RemsInterface/RemsInterface.jsx | 54 +++++++++++++------ 1 file changed, 39 insertions(+), 15 deletions(-) diff --git a/src/components/RemsInterface/RemsInterface.jsx b/src/components/RemsInterface/RemsInterface.jsx index 6180a34a..43e608a3 100644 --- a/src/components/RemsInterface/RemsInterface.jsx +++ b/src/components/RemsInterface/RemsInterface.jsx @@ -51,21 +51,45 @@ export default class RemsInterface extends Component { } unfurlJson(jsonData, level) { - var divStyle = { - marginLeft: 20 - }; - if (jsonData) { - return Object.keys(jsonData).map(element => { - var elementKey = `${element}-${level}`; - return ( -
- {element}: {jsonData[element] === null ? "null" : typeof jsonData[element] === "object" ? this.unfurlJson(jsonData[element], level + 1) : jsonData[element]} + console.log(jsonData); + return jsonData.metRequirements.map(metReq => { + console.log(metReq); + return ( +
+
+
{metReq.requirement.name}
+
{metReq.completed ? "✅" : "❌"}
- ) - }); + { + metReq.childMetRequirements.map(subMetReq => +
+
{subMetReq.requirement.name}
+
{subMetReq.completed ? "✅" : "❌"}
+
+ ) + } +
+ ) + }); + } - - } + // if (jsonData) { + // return Object.keys(jsonData).map(element => { + // console.log(element); + // return ( + // //
+ // // {element}: {jsonData[element] === null ? "null" : typeof jsonData[element] === "object" ? this.unfurlJson(jsonData[element], level + 1) : jsonData[element]} + // //
+ //
+ //
+ //
TEST
+ //
+ //
+ // ) + // }); + // } + + // } async sendRemsMessage() { const remsAdminResponse = await axios.post("http://localhost:8090/rems", this.props.specialtyRxBundle, this.getAxiosOptions()); @@ -157,7 +181,7 @@ export default class RemsInterface extends Component {
- + {this.state.remsAdminResponse?.data?.case_number ? {this.state.viewResponse ? -
+
{this.unfurlJson(this.state.remsAdminResponse?.data, 0)}
: From 227d7c0ca266ef9bd1dba7af87790cdc3fb0ec5b Mon Sep 17 00:00:00 2001 From: Sahil Malhotra Date: Tue, 12 Jul 2022 13:17:17 -0400 Subject: [PATCH 2/4] remove unused function paramx --- src/components/RemsInterface/RemsInterface.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/RemsInterface/RemsInterface.jsx b/src/components/RemsInterface/RemsInterface.jsx index 43e608a3..3b5f35a9 100644 --- a/src/components/RemsInterface/RemsInterface.jsx +++ b/src/components/RemsInterface/RemsInterface.jsx @@ -50,7 +50,7 @@ export default class RemsInterface extends Component { return options; } - unfurlJson(jsonData, level) { + unfurlJson(jsonData) { console.log(jsonData); return jsonData.metRequirements.map(metReq => { console.log(metReq); From f94d87d2a6f8beae6c3b4a86538d78afa8ca5053 Mon Sep 17 00:00:00 2001 From: Zach Robin Date: Tue, 12 Jul 2022 11:44:08 -0700 Subject: [PATCH 3/4] Cleaned up css and UI added description as well - still need to add hover --- .../RemsInterface/RemsInterface.css | 40 ++++++++++++++++++- .../RemsInterface/RemsInterface.jsx | 16 +++++--- 2 files changed, 50 insertions(+), 6 deletions(-) diff --git a/src/components/RemsInterface/RemsInterface.css b/src/components/RemsInterface/RemsInterface.css index 7fba33a5..9f253ab4 100644 --- a/src/components/RemsInterface/RemsInterface.css +++ b/src/components/RemsInterface/RemsInterface.css @@ -21,13 +21,16 @@ body { } .resource-entry{ + clear: both; border-left: 4px solid #ffcccb; padding: 5px; border-bottom: 1px solid grey; background-color: #ededed; + padding-top: 20px; + padding-bottom:20px; } - .resource-entry:hover{ + .resource-entry:hover { border-left: 4px solid #ff6663; background-color: #fdfdfd; } @@ -107,4 +110,39 @@ body { to { transform:rotate(360deg); } +} + + +/* ETASU styling */ +.resource-entry-hover{ + padding-top:25px; + padding-left:25px;; +} + +.etasu-container{ + padding-bottom:10px; + padding-left: 10px; + padding-right:10px; +} + +.etasu-container{ + padding-bottom:10px; + padding-left: 10px; + padding-right:10px; +} + +.resource-entry-text{ + font-weight: bold; + float:left; + width:75%; +} + +.resource-entry-icon{ + width:25%; + float:right; + text-align:right; +} + +.resource-child{ + margin-left:35px; } \ No newline at end of file diff --git a/src/components/RemsInterface/RemsInterface.jsx b/src/components/RemsInterface/RemsInterface.jsx index 43e608a3..df539f31 100644 --- a/src/components/RemsInterface/RemsInterface.jsx +++ b/src/components/RemsInterface/RemsInterface.jsx @@ -57,14 +57,20 @@ export default class RemsInterface extends Component { return (
-
{metReq.requirement.name}
-
{metReq.completed ? "✅" : "❌"}
+
+
{metReq.requirement.name}
+
{metReq.completed ? "✅" : "❌"}
+
{metReq.requirement.description}
+
{ metReq.childMetRequirements.map(subMetReq => -
-
{subMetReq.requirement.name}
-
{subMetReq.completed ? "✅" : "❌"}
+
+
+
{subMetReq.requirement.name}
+
{subMetReq.completed ? "✅" : "❌"}
+
{subMetReq.requirement.description}
+
) } From 4691c586944ab160b503caa603acf31b354e91e8 Mon Sep 17 00:00:00 2001 From: Zach Robin Date: Tue, 12 Jul 2022 13:14:26 -0700 Subject: [PATCH 4/4] added hover to reveal description --- src/components/RemsInterface/RemsInterface.css | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/RemsInterface/RemsInterface.css b/src/components/RemsInterface/RemsInterface.css index 9f253ab4..05425e8e 100644 --- a/src/components/RemsInterface/RemsInterface.css +++ b/src/components/RemsInterface/RemsInterface.css @@ -115,6 +115,7 @@ body { /* ETASU styling */ .resource-entry-hover{ + display:none; padding-top:25px; padding-left:25px;; } @@ -125,18 +126,18 @@ body { padding-right:10px; } -.etasu-container{ - padding-bottom:10px; - padding-left: 10px; - padding-right:10px; -} - .resource-entry-text{ font-weight: bold; float:left; width:75%; } +.etasu-container:hover > .resource-entry-hover{ + clear: both; + display: block !important; +} + + .resource-entry-icon{ width:25%; float:right;