From b61c81acf50c1cb5468ffd17cb673f3ddeae1699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pedro=20Zampoli?= Date: Sun, 28 Jul 2024 15:01:08 -0300 Subject: [PATCH 1/5] Rework da Tabela da Lista de CIDs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Foram feitas algumas alterações de Design e adaptabilidade --- pages/lista-cids.vue | 267 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 240 insertions(+), 27 deletions(-) diff --git a/pages/lista-cids.vue b/pages/lista-cids.vue index ee33328..efa6fbc 100644 --- a/pages/lista-cids.vue +++ b/pages/lista-cids.vue @@ -1,6 +1,6 @@ @@ -109,11 +217,11 @@ export default { group: null }, headers: [ - { text: 'Código', value: 'cod', align: 'start' }, - { text: 'Diagnóstico', value: 'diagnostic', align: 'start' }, - { text: 'Observações', value: 'observations', align: 'start' }, - { text: 'Acompanhante', value: 'companion', align: 'start' }, - { text: 'Grupo', value: 'group', align: 'start' } + { text: 'Código', align: 'start', value: 'cod' }, + { text: 'Diagnóstico', align: 'start', value: 'diagnostic' }, + { text: 'Observações', align: 'start', value: 'observations' }, + { text: 'Acompanhante', align: 'start', value: 'companion' }, + { text: 'Grupo', align: 'center', value: 'group' } ], cids: [], dialog: false, @@ -145,6 +253,17 @@ export default { .catch(() => { this.errorMessage = 'Ocorreu um erro ao buscar os CIDs.' }) + }, + methods: { + getColor (group) { + if (group === 'G1') { + return 'red' + } else if (group === 'G2') { + return 'orange' + } else { + return 'blue' + } + } } } @@ -160,7 +279,8 @@ export default { .filters { display: flex; - width: fit-content; + width: 100%; + margin: 0 1.5em 0 1.5em; padding: 0; } @@ -169,16 +289,16 @@ export default { height: 100%; display: flex; align-items: center; + justify-content: center; } .input { padding: 0 15px 0 0; - margin: 0 0 0 0.25em; min-width: 40px; } .button{ - margin: 0 15px 0 0; + margin: 0 0 0 1.5em; } .v-dialog{ @@ -213,14 +333,32 @@ export default { font-size: 3em; } -.table { - width: 75%; - height: min-content; - margin: auto; +.table-card { + width: 85%; + height: 100%; + display: flex; + flex-wrap: wrap; +} + +.upper-container{ + display: flex; + flex-wrap: wrap; + width: 100%; +} + +.table-card-title { + padding-left: 1.5em; } -.v-data-table-header { - text-align: left; +.table-search { + margin-right: 1.5em; +} + +.table { + width: 100%; + height: min-content; + margin: 0 1.5em 1.5em 1.5em; + box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px !important; } .error-message { @@ -228,18 +366,26 @@ export default { width: 60%; } +@media (max-width: 1000px) and (min-width: 601px){ + .table-card { + width: 100%; + } +} + @media (max-width: 600px) { .filters { flex-wrap: wrap; + margin: 0; } .input{ padding: 0; + margin: 0 1.5em; } .button{ - margin: 0 0 1em 0.25em; + margin: 0 1.5em; } .group-button{ - margin: 0em 0em 1em 0.25em; + margin: 0em 1.75em 1em 1.75em; } .v-dialog{ max-width: 85vw !important; @@ -252,7 +398,10 @@ export default { width: 100%; margin: 0.5em 0; } - .table { + .table-search{ + margin-left: 1.75em; + } + .table-card { width: 100%; } .error-message { @@ -260,3 +409,67 @@ export default { } } + + From a792f6d142ac7ddd45b47331beba86fd45396e98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pedro=20Zampoli?= Date: Mon, 29 Jul 2024 23:35:36 -0300 Subject: [PATCH 2/5] Updates QoL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Agora o menu principal fica acima de todos os elementos da tabela (inclusive dos headers que se sobrepunham anteriormente), além disso, foi ajustado o escopo da pesquisa da tabela de cids --- components/SideBar.vue | 6 +++++- pages/lista-cids.vue | 4 +--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/components/SideBar.vue b/components/SideBar.vue index d9f30fa..931fe95 100644 --- a/components/SideBar.vue +++ b/components/SideBar.vue @@ -1,5 +1,5 @@