Browse Source

update communication by comment activity

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

54
src/views/DashboardProject/chatDashboard.js

@ -1,37 +1,35 @@
import React from 'react';
const ChatDashboard = () => {
const ChatDashboard = (props) => {
const { dataParams } = props;
const renderComment = (items) => {
return items.map((item, idx) => {
return (
<div className="chat-content" key={idx}>
<div className='chat-body'>
<div className='chat-header'>
{item.comment_by}
</div>
<div className='chat-body-content'>
{item.comment}
</div>
<div className='chat-footer'>
{item.comment_created}
</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' }}>Minutes of Meeting</div>
<div style={{ marginBottom: '5px', fontSize: '0.8rem', fontWeight: '500' }}>COMMUNICATION</div>
</div>
<div className='chat'>
<div className="chat-content">
<div className='chat-body'>
<div className='chat-header'>
Robert William
</div>
<div className='chat-body-content'>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore Read More...
</div>
<div className='chat-footer'>
14/01/22 14:21
</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 className='chat-footer'>
14/01/22 10:20
</div>
</div>
</div>
{renderComment(dataParams)}
</div>
</div>
);

5
src/views/DashboardProject/index.js

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

Loading…
Cancel
Save