Merge branch 'testeA'

pull/1/head
adriano 2022-02-04 12:31:57 -03:00
commit f74ce5549f
2 changed files with 6 additions and 4 deletions

View File

@ -48,7 +48,7 @@ const ExportCSV = (props) => {
return (
<div>
<Button onClick={getTransactionData}>EXPORT CSV</Button>
<Button onClick={getTransactionData}>CSV EXPORT</Button>
<CSVLink
headers={header}
data={dataRow}

View File

@ -11,8 +11,10 @@ const MTable = (props) => {
const [selectedRow, setSelectedRow] = useState(null);
const dataLoad = props.data.map((dt) => { return { ...dt }});
const columnsLoad = props.columns.map((column) => { return { ...column }});
//const dataLoad = props.data.map((dt) => { return { ...dt }});
const dataLoad = props.data.map(({user, ...others})=>({...others, 'user': user ? user : {name: 'Aguardando atendente', email:''}}));
const columnsLoad = props.columns.map((column) => { return { ...column }});
useEffect(() => {
@ -41,7 +43,7 @@ const MTable = (props) => {
render(<Modal data={selectedRow.messages}
hasChild={false}
modal_header={'Chat do atendimento pelo Whatsapp'}
user={selectedRow.user.name}
user={selectedRow.user.name}
clientContactNumber={selectedRow.contact.number}/>)
}