diff --git a/src/components/RemsInterface/RemsInterface.css b/src/components/RemsInterface/RemsInterface.css index 7fba33a5..05425e8e 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,40 @@ body { to { transform:rotate(360deg); } +} + + +/* ETASU styling */ +.resource-entry-hover{ + display:none; + padding-top:25px; + padding-left:25px;; +} + +.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; + 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 6180a34a..be166c10 100644 --- a/src/components/RemsInterface/RemsInterface.jsx +++ b/src/components/RemsInterface/RemsInterface.jsx @@ -50,22 +50,52 @@ export default class RemsInterface extends Component { return options; } - 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]} + unfurlJson(jsonData) { + console.log(jsonData); + return jsonData.metRequirements.map(metReq => { + console.log(metReq); + return ( +
+
+
+
{metReq.requirement.name}
+
{metReq.completed ? "✅" : "❌"}
+
{metReq.requirement.description}
+
- ) - }); + { + metReq.childMetRequirements.map(subMetReq => +
+
+
{subMetReq.requirement.name}
+
{subMetReq.completed ? "✅" : "❌"}
+
{subMetReq.requirement.description}
+
+
+ ) + } +
+ ) + }); + } - - } + // 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 +187,7 @@ export default class RemsInterface extends Component {
- + {this.state.remsAdminResponse?.data?.case_number ? {this.state.viewResponse ? -
+
{this.unfurlJson(this.state.remsAdminResponse?.data, 0)}
: