-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/patients pending #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: staging
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for abnmo ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| export default function Page() { | ||
| return <div>Pendentes</div> | ||
| return ( | ||
| <div className='min-h-screen bg-[var(--color-background)] p-8'> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quando precisar usar as cores do nosso design system, pode passar direto. Ex: bg-background
| return ( | ||
| <div className='min-h-screen bg-[var(--color-background)] p-8'> | ||
| <div className='mb-8'> | ||
| <h1 className='text-2xl font-bold text-[var(--color-foreground)]'> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aqui também. Ex: text-foreground.
| <h1 className='text-2xl font-bold text-[var(--color-foreground)]'> | ||
| Documentos Pendentes | ||
| </h1> | ||
| <p className='mt-2 text-[var(--color-foreground-soft)]'> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O mesmo aqui. Ex: text-foreground-soft.
| @@ -1,9 +1,42 @@ | |||
| import type { Metadata } from 'next' | |||
| 'use client' | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Acho que não precisamos do 'use client' aqui.
Como esse arquivo é uma página (Page.tsx), o ideal é que ele seja um Server Component, já que mais pra frente vamos buscar dados diretamente do servidor.
Assim, aproveitamos melhor os recursos de performance e renderização.
| imageUrl: string | ||
| } | ||
|
|
||
| export const PatientRequirementCard: React.FC<PatientRequirementCardProps> = ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aqui podemos ajustar dois pontos para seguir o padrão do projeto:
Evitar o uso de React.FC, já que o TypeScript já infere o tipo de retorno automaticamente.
Utilizar Named Function (export function PatientRequirementCard(...)) em vez de export const ... = () => {}, para manter consistência e melhor legibilidade.
Ficaria algo assim 👇
export function PatientRequirementCard({
title,
createdAt,
status,
imageUrl,
}: PatientRequirementCardProps) {
// ...
}
| }) => { | ||
| const statusColors: Record<string, { bg: string; text: string }> = { | ||
| Pendente: { | ||
| bg: 'bg-[var(--color-warning)]/10', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quando precisar usar as cores do nosso design system, pode passar direto. Ex: bg-warning/10
|
|
||
| return ( | ||
| <div className='rounded-2xl bg-[var(--color-card)] p-4 shadow transition-all hover:shadow-md'> | ||
| <img |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Podemos utilizar o componente <Image /> do Next.js aqui — ele otimiza automaticamente o carregamento e a performance das imagens.
|
|
||
| return ( | ||
| <> | ||
| <button |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aqui podemos utilizar o componente <Button />, que já possui classes e estilos pré-definidos.
Caso seja necessário ajustar a aparência, podemos usar a prop variant para aplicar variações visuais conforme o padrão do projeto.
| {isOpen && ( | ||
| <div className='fixed inset-0 z-50 flex items-center justify-center'> | ||
| <div | ||
| className='bg-opacity-30 fixed inset-0 bg-black' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Devemos priorizar as cores definidas no nosso design system, evitando cores arbitrárias como bg-black.
Isso garante consistência visual e facilita futuras manutenções de tema.
| <div> | ||
| <label className='text-foreground mb-1 block text-sm font-medium'> | ||
| Nome do paciente * | ||
| </label> | ||
| <input | ||
| type='text' | ||
| value={patientName} | ||
| onChange={(e) => setPatientName(e.target.value)} | ||
| className='border-border focus:ring-primary w-full rounded-lg border p-2 text-sm focus:ring-2 focus:outline-none' | ||
| required | ||
| /> | ||
| </div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Devemos priorizar o uso dos componentes pré-definidos do nosso design system, como <Label /> e <Input />.
Isso ajuda a manter a consistência visual e reduz duplicação de estilos no projeto.
| <div className='mt-4 flex justify-end gap-2'> | ||
| <button | ||
| type='button' | ||
| onClick={closeModal} | ||
| className='border-border rounded-lg border px-4 py-2 text-sm transition hover:bg-gray-100' | ||
| > | ||
| Cancelar | ||
| </button> | ||
| <button | ||
| type='submit' | ||
| className='bg-primary text-primary-foreground hover:bg-primary-soft rounded-lg px-4 py-2 font-medium transition' | ||
| > | ||
| Cadastrar | ||
| </button> | ||
| </div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aqui também podemos utilizar o componente <Button/>.
|
@carolinesv-dev Sobre o componente |
Tipo
Descrição
Forneça detalhes sobre esta Pull Request aqui. A descrição deve conter o contexto geral da alteração, seu objetivo e o que foi feito. Escreva de forma simples e direta, facilitando a compreensão de quem irá ler e revisar.
Screenshots / Imagens / Videos
Adicione imagens, vídeos ou outro conteúdo multimídia aqui.
Tarefas ou Issue
Checklist
Instruções para teste
Insira instruções para testes aqui, se necessário.
Dependências
Indique se possui alguma dependência, como incluir nova variável de ambiente, aprovação de outra PR, conclusão ou criação de
endpoint, configuração do servidor, etc.Exemplo:
NOME_DA_ENV=api/exemplo