From d791b613448feb99e4e7e014321e35d301b1b005 Mon Sep 17 00:00:00 2001 From: Joanne Stephany Date: Fri, 13 Dec 2024 17:00:58 -0300 Subject: [PATCH] feat: ajuste dos cards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Todo: ajustar o tamanho da barra de filtro Todo: ver pq a formattedDate não está sendo usado --- src/Assets/images/ring_card_blue.svg | 8 ++++ src/Assets/images/ring_card_navy_blue.svg | 8 ++++ src/Assets/images/ring_card_orange.svg | 8 ++++ src/Components/Chart/CardQuant/index.tsx | 31 +++++++++++-- src/Pages/InitialPage/index.tsx | 56 ++++++++++++----------- src/Services/Chart/request.tsx | 1 - 6 files changed, 81 insertions(+), 31 deletions(-) create mode 100644 src/Assets/images/ring_card_blue.svg create mode 100644 src/Assets/images/ring_card_navy_blue.svg create mode 100644 src/Assets/images/ring_card_orange.svg diff --git a/src/Assets/images/ring_card_blue.svg b/src/Assets/images/ring_card_blue.svg new file mode 100644 index 0000000..ad29e8c --- /dev/null +++ b/src/Assets/images/ring_card_blue.svg @@ -0,0 +1,8 @@ + + + diff --git a/src/Assets/images/ring_card_navy_blue.svg b/src/Assets/images/ring_card_navy_blue.svg new file mode 100644 index 0000000..840e34b --- /dev/null +++ b/src/Assets/images/ring_card_navy_blue.svg @@ -0,0 +1,8 @@ + + + diff --git a/src/Assets/images/ring_card_orange.svg b/src/Assets/images/ring_card_orange.svg new file mode 100644 index 0000000..7aa2bc5 --- /dev/null +++ b/src/Assets/images/ring_card_orange.svg @@ -0,0 +1,8 @@ + + + diff --git a/src/Components/Chart/CardQuant/index.tsx b/src/Components/Chart/CardQuant/index.tsx index 2930a19..455d61a 100644 --- a/src/Components/Chart/CardQuant/index.tsx +++ b/src/Components/Chart/CardQuant/index.tsx @@ -1,13 +1,36 @@ import styles from "../../../Styles"; import { Column } from "../../../Styles/styles"; +import ring_card_orange from "../../../Assets/images/ring_card_orange.svg"; +import ring_card_blue from "../../../Assets/images/ring_card_blue.svg"; +import ring_card_navy_blue from "../../../Assets/images/ring_card_navy_blue.svg"; + const CardQuant = ({ title, quant, color }: { title: string; quant: number | string, color?: "orange"| "blue"| "navy_blue" }) => { + const ringCardImage = + color === "blue"? ring_card_orange // Usar ring_card_orange se for azul + : color === "navy_blue" ? ring_card_blue // Usar ring_card_blue se for navy_blue + : ring_card_navy_blue; // Usar ring_card_navy_blue se for orange + return ( -
- -

{title}

-

{quant}

+
+ +

{title}

+

{quant}

+ Ring Card
); }; diff --git a/src/Pages/InitialPage/index.tsx b/src/Pages/InitialPage/index.tsx index 3e74bc5..3cd5dd9 100644 --- a/src/Pages/InitialPage/index.tsx +++ b/src/Pages/InitialPage/index.tsx @@ -152,32 +152,36 @@ const InitialPage = () => { title={`Bem vindo, ${propsAplication.user?.name}!`} description="Visualização dos dados gerais do meuBen." > - {propsAplication.user?.role === ROLE.ADMIN && ( - -
- +