Browse Source

update communication by comment activity

pull/2/head
bnu 2 years ago
parent
commit
293dc501ea
  1. 42
      src/views/DashboardProject/chatDashboard.js
  2. 5
      src/views/DashboardProject/index.js

42
src/views/DashboardProject/chatDashboard.js

@ -1,37 +1,35 @@
import React from 'react'; import React from 'react';
const ChatDashboard = () => { const ChatDashboard = (props) => {
const { dataParams } = props;
const renderComment = (items) => {
return items.map((item, idx) => {
return ( return (
<div style={{ margin: '0 5px' }} className="box-header-dashboard-project"> <div className="chat-content" key={idx}>
<div style={{ display: 'flex', justifyContent: 'center' }}>
<div style={{ marginBottom: '5px', fontSize: '0.8rem', fontWeight: '500' }}>Minutes of Meeting</div>
</div>
<div className='chat'>
<div className="chat-content">
<div className='chat-body'> <div className='chat-body'>
<div className='chat-header'> <div className='chat-header'>
Robert William {item.comment_by}
</div> </div>
<div className='chat-body-content'> <div className='chat-body-content'>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore Read More... {item.comment}
</div> </div>
<div className='chat-footer'> <div className='chat-footer'>
14/01/22 14:21 {item.comment_created}
</div>
</div>
</div>
<div className="chat-content">
<div className='chat-body'>
<div className='chat-header'>
Jennifer lawrence
</div>
<div className='chat-body-content'>
Curabitur lobortis tellus nibh, at tincidunt turpis viverra at. Integer aliquam in quam eu fringilla. Nullam eu mauris Read More...
</div> </div>
<div className='chat-footer'>
14/01/22 10:20
</div> </div>
</div> </div>
)
})
}
return (
<div style={{ margin: '0 5px' }} className="box-header-dashboard-project">
<div style={{ display: 'flex', justifyContent: 'center' }}>
<div style={{ marginBottom: '5px', fontSize: '0.8rem', fontWeight: '500' }}>COMMUNICATION</div>
</div> </div>
<div className='chat'>
{renderComment(dataParams)}
</div> </div>
</div> </div>
); );

5
src/views/DashboardProject/index.js

@ -54,6 +54,7 @@ const DashboardProject = () => {
const [PROJECTNAME, SET_PROJECTNAME] = useState([]) const [PROJECTNAME, SET_PROJECTNAME] = useState([])
const [CURRENCYSYMBOL, SET_CURRENCYSYMBOL] = useState([]) const [CURRENCYSYMBOL, SET_CURRENCYSYMBOL] = useState([])
const [BUDGETHEALTH, SET_BUDGETHEALTH] = useState([]) const [BUDGETHEALTH, SET_BUDGETHEALTH] = useState([])
const [COMMENT, SET_COMMENT] = useState([])
@ -83,6 +84,7 @@ const DashboardProject = () => {
SET_BUDGETHEALTH(resData.budget_health) SET_BUDGETHEALTH(resData.budget_health)
SET_ACWP(resData.actualCost) SET_ACWP(resData.actualCost)
SET_PROGRESS(resData.progress) SET_PROGRESS(resData.progress)
SET_COMMENT(resData.comment)
} }
useEffect(() => { useEffect(() => {
@ -237,7 +239,8 @@ const DashboardProject = () => {
</div> */} </div> */}
</Col> </Col>
<Col span={5}> <Col span={5}>
<ChatDashboard /> <ChatDashboard
dataParams = {COMMENT}/>
</Col> </Col>
</Row> </Row>
</div> </div>

Loading…
Cancel
Save