From 116539c117925c04973d3c741307b985a7448f15 Mon Sep 17 00:00:00 2001
From: Chris Lawton <chris.lawton@torchbox.com>
Date: Tue, 15 Jan 2019 10:31:21 +0000
Subject: [PATCH] adds some dummy proposal data

---
 .../components/ApplicationDisplay/index.js    | 46 +++++++++++++++++--
 .../components/ApplicationDisplay/styles.scss |  3 ++
 .../app/src/components/DisplayPanel/index.js  | 40 +++++++++++++---
 3 files changed, 80 insertions(+), 9 deletions(-)
 create mode 100644 opentech/static_src/src/app/src/components/ApplicationDisplay/styles.scss

diff --git a/opentech/static_src/src/app/src/components/ApplicationDisplay/index.js b/opentech/static_src/src/app/src/components/ApplicationDisplay/index.js
index bdb5e1f9a..c7847176e 100644
--- a/opentech/static_src/src/app/src/components/ApplicationDisplay/index.js
+++ b/opentech/static_src/src/app/src/components/ApplicationDisplay/index.js
@@ -1,5 +1,45 @@
-import React from 'react';
+import React, {Component} from 'react';
 
-const ApplicationDisplay = () => <div>Application Display</div>
+import './styles.scss'
 
-export default ApplicationDisplay;
+const Meta = ({ question, answer }) => {
+    return (
+        <div>
+            <h5>{question}</h5>
+            <p>{answer}</p>
+        </div>
+    )
+}
+
+const Response = ({question, answer}) => {
+    return (
+        <section>
+            <h4>{question}</h4>
+            <p>{answer}</p>
+        </section>
+    )
+}
+
+export default class ApplicationDisplay extends Component {
+    render() {
+        const { metaResponses, responses } = this.props.submissionData;
+
+        return (
+            <div className="application-display">
+                <h3>Proposal Information</h3>
+
+                <div className="grid grid--proposal-info">
+                    {metaResponses.map(response => (
+                        <Meta question={response.question} answer={response.answer} />
+                    ))}
+                </div>
+
+                <div className="rich-text rich-text--answers">
+                {responses.map(response => (
+                    <Response question={response.question} answer={response.answer} />
+                    ))}
+                </div>
+            </div>
+        )
+    }
+}
diff --git a/opentech/static_src/src/app/src/components/ApplicationDisplay/styles.scss b/opentech/static_src/src/app/src/components/ApplicationDisplay/styles.scss
new file mode 100644
index 000000000..e7d2cac37
--- /dev/null
+++ b/opentech/static_src/src/app/src/components/ApplicationDisplay/styles.scss
@@ -0,0 +1,3 @@
+.application-display {
+    padding: 20px;
+}
diff --git a/opentech/static_src/src/app/src/components/DisplayPanel/index.js b/opentech/static_src/src/app/src/components/DisplayPanel/index.js
index d3d719c4a..e04a9cbd3 100644
--- a/opentech/static_src/src/app/src/components/DisplayPanel/index.js
+++ b/opentech/static_src/src/app/src/components/DisplayPanel/index.js
@@ -3,11 +3,39 @@ import ApplicationDisplay from '@components/ApplicationDisplay'
 import Tabber from '@components/Tabber'
 import './style.scss';
 
-const DisplayPanel = () => (
-    <div className="display-panel">
-        <ApplicationDisplay />
-        <Tabber />
-    </div>
-);
+const DisplayPanel = () => {
+    const data = {
+        metaResponses: [{
+            question: 'Requested Funding',
+            answer: '123',
+        },{
+            question: 'Proposal Duration',
+            answer: '1 month',
+        },{
+            question: 'Legal name',
+            answer: 'Maya Summit'
+        }],
+        responses: [{
+            question: 'Have you ever applied to or received funding as an OTF project?',
+            answer: 'This is a string. Nisi officia ea exercitation anim fugiat ut nulla elit voluptate nostrud aliqua. Incididunt incididunt occaecat esse nostrud. Ad duis do cupidatat et voluptate amet sint sint velit deserunt.'
+        },{
+            question: 'Have you ever applied to or received funding as an OTF project?',
+            answer: '<p>Yes</p><ul><li>one</li><li>two</li></ul>'
+        }, {
+            question: 'Have you ever applied to or received funding as an OTF project?',
+            answer: ['One', 'Two', 'Three', 'Four', 'Five']
+        }, {
+            question: 'Have you ever applied to or received funding as an OTF project?',
+            answer: ['<p>One</p>', '<b>Two</b>']
+        }]
+    }
+
+    return (
+        <div className="display-panel">
+            <ApplicationDisplay submissionData={data} />
+            <Tabber />
+        </div>
+    )
+};
 
 export default DisplayPanel;
-- 
GitLab