From c28fa88a80405f170916abf22ed67b8f125859b8 Mon Sep 17 00:00:00 2001 From: Alex Santos Date: Tue, 28 Jun 2022 11:31:28 -0300 Subject: [PATCH 1/3] update --- src/components/administrativeTables/TableView.ts | 6 +++--- src/components/buttons/loginButton/LoginButtonView.ts | 2 +- src/pages/forgotPassword.tsx | 1 + src/pages/index.tsx | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/administrativeTables/TableView.ts b/src/components/administrativeTables/TableView.ts index e0fadf3..0f6b52e 100644 --- a/src/components/administrativeTables/TableView.ts +++ b/src/components/administrativeTables/TableView.ts @@ -20,7 +20,7 @@ export const TableView = styled.main` border-radius: 16px; tr { th { - font-family: 'poppins'; + font-family: 'Poppins'; font-weight: 500; font-size: 16px; color: #6A707E; @@ -28,13 +28,13 @@ export const TableView = styled.main` td { :nth-child(3) { - font-family: 'poppins'; + font-family: 'Poppins'; font-weight: 500; font-size: 16px; color: #6A707E; } :nth-child(4) { - font-family: 'poppins'; + font-family: 'Poppins'; font-weight: 400; font-size: 12px; color: #828282; diff --git a/src/components/buttons/loginButton/LoginButtonView.ts b/src/components/buttons/loginButton/LoginButtonView.ts index f91b815..69553a0 100644 --- a/src/components/buttons/loginButton/LoginButtonView.ts +++ b/src/components/buttons/loginButton/LoginButtonView.ts @@ -11,7 +11,7 @@ export const LoginButtonView = styled.button` background: rgb(2,0,36); background: linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(37,79,127,1) 35%, rgba(136,136,136,1) 100%); - font-family: 'Nunito Sans'; + font-family: 'Poppins'; font-weight: 700; font-size: calc(99.98% + 10px); line-height: 44px; diff --git a/src/pages/forgotPassword.tsx b/src/pages/forgotPassword.tsx index db8c81a..0703298 100644 --- a/src/pages/forgotPassword.tsx +++ b/src/pages/forgotPassword.tsx @@ -64,3 +64,4 @@ export default function ForgotPassword() { ) } + diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 09dd6e2..45a8cfd 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -91,8 +91,8 @@ export default function Home() { useEffect(() => { setValues({ - password: null, - showPassword: false, + password: (''), + showPassword: null, }); setEmail("") }, [rota]) From 843da7c9333430663bf5002c9982df1b66c6ac36 Mon Sep 17 00:00:00 2001 From: Alex Santos Date: Tue, 28 Jun 2022 16:16:04 -0300 Subject: [PATCH 2/3] =?UTF-8?q?=1B[200~?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../administrative/industryInfo/index.tsx | 6 +++--- src/pages/resumoOperacao.tsx | 21 +++++++++++++++++-- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/pages/administrative/industryInfo/index.tsx b/src/pages/administrative/industryInfo/index.tsx index 432fe3d..54b7a39 100644 --- a/src/pages/administrative/industryInfo/index.tsx +++ b/src/pages/administrative/industryInfo/index.tsx @@ -8,7 +8,7 @@ import PageTitle from '../../../components/pageTitle/PageTitle' import { IndustryInfoView } from '../../../styles/layouts/industryInfo/IndustryInfoView' import InputUploadPdf from '../../../components/inputUploadPdf/inputUpload'; import { api } from '../../../services/api' -import PdfThumbnail from 'react-pdf-thumbnail'; +// import PdfThumbnail from 'react-pdf-thumbnail'; import FormData from 'form-data'; @@ -58,12 +58,12 @@ export default function industryInfo({userName}: any) { - PDF Baixado com Sucesso! + PDF enviado com Sucesso! - PDF não baixado! + Falha ao enviar PDF! diff --git a/src/pages/resumoOperacao.tsx b/src/pages/resumoOperacao.tsx index 93c0238..a144c82 100644 --- a/src/pages/resumoOperacao.tsx +++ b/src/pages/resumoOperacao.tsx @@ -36,8 +36,24 @@ 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([csv], {type: "text/csv"}); + + const csv_file = new Blob(["\ufeff",csv], {type: "text/csv"}); const download_link = document.createElement("a"); @@ -63,7 +79,8 @@ export default function ResumoOperacao({tableData, clientsData, userName, client row.push(cols[j].innerText); } - data.push(row.join(",")); + + data.push(row.join(";")); } downloadCSVFile(data.join("\n"), filename); From 2631df84f52ac22f1a6f6857c6e25aa685900be5 Mon Sep 17 00:00:00 2001 From: Alex Santos Date: Tue, 28 Jun 2022 16:37:06 -0300 Subject: [PATCH 3/3] Fixing update --- src/pages/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 53c26d8..d25b0a3 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -70,7 +70,7 @@ export default function Home() { }else{ try { await signIn({email, password}).then((res: any) => { - if (res.response.status === 422 || res.response.status === 401) { + if (res.response.status === 422 || res.response.status === 401 || res.response.status === 500 ) { setOpenSnackError(true) } })