tooltip added

parent 7d693d05
...@@ -40,11 +40,11 @@ function Accordion({ title, data ,handleAddActivity,open,handleAccordian}) { ...@@ -40,11 +40,11 @@ function Accordion({ title, data ,handleAddActivity,open,handleAccordian}) {
handleAccordian(title) handleAccordian(title)
} }
const headers = [ const headers = [
{ title: "Activity Name", id: "aName", width: "25%" }, { title: "Activity Name", id: "aName"},
{ title: "Date", id: "recorded_date", width: "20%", render: (value) => moment(value).format('DD-MM-YYYY') }, { title: "Date", id: "recorded_date", render: (value) => moment(value).format('DD-MM-YYYY') },
{title: "Rated By", id: "ratedBy", width: "25%"}, {title: "Rated By", id: "ratedBy"},
{ title: "Score", id: "score", width: "10%", render: (value) => <div className="w-[35px] bg-blue-400 rounded-full text-white font-bold text-center p-[4px]">{value}</div> }, { title: "Score", id: "score", render: (value) => <div className="w-[35px] px-3 bg-blue-400 rounded-full text-white font-bold text-center p-[4px]">{value}</div> },
{ title: "Comments", id: "comments", width: "30%" }, { title: "Comments", id: "comments", render:(value)=><span className="listData" title={value}>{value}</span>},
]; ];
if(loading && title =="Duties")return <Loading/> if(loading && title =="Duties")return <Loading/>
......
...@@ -24,7 +24,7 @@ function Table({headers, data,loading, maxHeight}) { ...@@ -24,7 +24,7 @@ function Table({headers, data,loading, maxHeight}) {
{ {
headers?.map(({render, id}) => ( headers?.map(({render, id}) => (
<td key={`${item.id}_${id}`} className="px-6 py-2 " > <td key={`${item.id}_${id}`} className="px-6 py-2 " >
<span title={(id=="comments")?item[id]:null} className="listData">{render ? render(item[id]) : item[id] === "" ? "NA" : item[id] }</span> {render ? render(item[id]) : item[id] === "" ? "NA" : item[id] }
</td> </td>
)) ))
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment