This commit is contained in:
Alex Santos 2022-06-28 17:20:07 -03:00
parent 2631df84f5
commit 891d7acab5
3 changed files with 1 additions and 65 deletions

View File

@ -9,7 +9,7 @@ interface PageTitleInterface {
export default function PageTitle({ title, subtitle }: PageTitleInterface) {
return (
<PageTitleView>
<h1>{title}</h1>
<h1 style={{fontSize:'2em'}} >{title}</h1>
<p>{subtitle}</p>
</PageTitleView>
)

View File

@ -36,53 +36,27 @@ export default function ResumoOperacao({tableData, clientsData, userName, client
setUnidade(event.target.value);
};
function stringToBytes(text) {
const length = text.length;
const result = new Uint8Array(length);
for (let i = 0; i < length; i++) {
const code = text.charCodeAt(i);
const byte = code > 255 ? 32 : code;
result[i] = byte;
}
return result;
}
// const originalString = 'ååå';
// const bytes = stringToBytes(originalString);
// const blob = new Blob([bytes.buffer], { type: 'text/plain; charset=ISO-8859-1' });
function downloadCSVFile(csv, filename) {
const csv_file = new Blob(["\ufeff",csv], {type: "text/csv"});
const download_link = document.createElement("a");
download_link.download = filename;
download_link.href = window.URL.createObjectURL(csv_file);
download_link.style.display = "none";
document.body.appendChild(download_link);
download_link.click();
}
function htmlToCSV(html, filename) {
const data = [];
const rows = document.querySelectorAll("table tr");
for (let i = 0; i < rows.length; i++) {
const row = [], cols: any = rows[i].querySelectorAll("td, th");
for (let j = 0; j < cols.length; j++) {
row.push(cols[j].innerText);
}
data.push(row.join(";"));
}
downloadCSVFile(data.join("\n"), filename);
}
@ -123,7 +97,6 @@ export default function ResumoOperacao({tableData, clientsData, userName, client
</Head>
<Header name={userName} />
<PageTitle title='Resumo de Operações' subtitle='Operações detalhadas' />
<h3>Filtrar por Unidade e/ou Mês</h3>
<div className='select'>
<FormControl fullWidth>

View File

@ -3,7 +3,6 @@ import styled from "styled-components";
export const IndustryInfoView = styled.main`
display: flex;
flex-direction: column;
width: 100%;
.title {
@ -13,17 +12,12 @@ export const IndustryInfoView = styled.main`
button{
height: 70px;
width: 30%;
cursor: pointer;
background: #254F7F;
border-radius: 8px;
border-style: none;
font-family: 'Poppins';
font-size: 90%;
color: #FFFFFF;
}
@ -50,36 +44,5 @@ export const IndustryInfoView = styled.main`
border: 1px solid black;
border-radius: 6px;
}
label {
}
/* .inputTeste{
display: flex;
align-items: center;
width: 50%;
height: 50px;
background: white;
border-radius:10px;
}
input[type="file"] {
display: block;
}
label {
display: flex;
justify-content: flex-start;
padding: 2px 10px;
width: 200px;
background-color: #333;
color: #FFF;
text-transform: uppercase;
text-align: center;
display: block;
margin-top: 10px;
cursor: pointer;
} */
`