feat(agenda): Replace textarea with select in Documents and attachments
This commit is contained in:
parent
5d00ffb508
commit
7b0406f815
@ -327,9 +327,10 @@ export default function DoutoresPage() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="secondary"
|
||||||
onClick={handleClickBuscar}
|
onClick={handleBuscarServidor}
|
||||||
disabled={loading || !search.trim()}
|
disabled={loading}
|
||||||
|
className="hover:bg-primary hover:text-white"
|
||||||
>
|
>
|
||||||
Buscar
|
Buscar
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@ -204,7 +204,7 @@ export default function PacientesPage() {
|
|||||||
onKeyDown={(e) => e.key === "Enter" && handleBuscarServidor()}
|
onKeyDown={(e) => e.key === "Enter" && handleBuscarServidor()}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<Button variant="secondary" onClick={handleBuscarServidor}>Buscar</Button>
|
<Button variant="secondary" onClick={handleBuscarServidor} className="hover:bg-primary hover:text-white">Buscar</Button>
|
||||||
<Button onClick={handleAdd}>
|
<Button onClick={handleAdd}>
|
||||||
<Plus className="mr-2 h-4 w-4" />
|
<Plus className="mr-2 h-4 w-4" />
|
||||||
Novo paciente
|
Novo paciente
|
||||||
|
|||||||
@ -43,7 +43,7 @@ export default function NovoAgendamentoPage() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
router.back();
|
router.push("/calendar");
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -21,6 +21,15 @@ export default function FinanceiroPage() {
|
|||||||
const isPr = pathname?.startsWith("/procedimento");
|
const isPr = pathname?.startsWith("/procedimento");
|
||||||
const isFi = pathname?.startsWith("/financeiro");
|
const isFi = pathname?.startsWith("/financeiro");
|
||||||
|
|
||||||
|
const handleSave = () => {
|
||||||
|
// Lógica de salvar será implementada
|
||||||
|
console.log("Salvando informações financeiras...");
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleCancel = () => {
|
||||||
|
router.push("/calendar");
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-full min-h-screen flex flex-col bg-background">
|
<div className="w-full min-h-screen flex flex-col bg-background">
|
||||||
{/* HEADER */}
|
{/* HEADER */}
|
||||||
@ -142,7 +151,7 @@ export default function FinanceiroPage() {
|
|||||||
</main>
|
</main>
|
||||||
|
|
||||||
{/* RODAPÉ FIXO */}
|
{/* RODAPÉ FIXO */}
|
||||||
<FooterAgenda />
|
<FooterAgenda onSave={handleSave} onCancel={handleCancel} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -20,6 +20,16 @@ export default function ProcedimentoPage() {
|
|||||||
const isAg = pathname?.startsWith("/agendamento");
|
const isAg = pathname?.startsWith("/agendamento");
|
||||||
const isPr = pathname?.startsWith("/procedimento");
|
const isPr = pathname?.startsWith("/procedimento");
|
||||||
const isFi = pathname?.startsWith("/financeiro");
|
const isFi = pathname?.startsWith("/financeiro");
|
||||||
|
|
||||||
|
const handleSave = () => {
|
||||||
|
// Lógica de salvar será implementada
|
||||||
|
console.log("Salvando procedimentos...");
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleCancel = () => {
|
||||||
|
router.push("/calendar");
|
||||||
|
};
|
||||||
|
|
||||||
const tab = (active: boolean, extra = "") =>
|
const tab = (active: boolean, extra = "") =>
|
||||||
`px-4 py-1.5 text-[13px] border ${
|
`px-4 py-1.5 text-[13px] border ${
|
||||||
active
|
active
|
||||||
@ -83,7 +93,7 @@ export default function ProcedimentoPage() {
|
|||||||
</main>
|
</main>
|
||||||
|
|
||||||
{/* RODAPÉ FIXO */}
|
{/* RODAPÉ FIXO */}
|
||||||
<FooterAgenda />
|
<FooterAgenda onSave={handleSave} onCancel={handleCancel} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -60,8 +60,8 @@ export default function HeaderAgenda() {
|
|||||||
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
aria-label="Histórico"
|
aria-label="Voltar para Calendário"
|
||||||
onClick={() => router.back()}
|
onClick={() => router.push("/calendar")}
|
||||||
className="inline-flex h-8 w-8 items-center justify-center rounded-md border border-border bg-background text-muted-foreground hover:bg-primary hover:text-white hover:border-primary transition-colors"
|
className="inline-flex h-8 w-8 items-center justify-center rounded-md border border-border bg-background text-muted-foreground hover:bg-primary hover:text-white hover:border-primary transition-colors"
|
||||||
>
|
>
|
||||||
<RotateCcw className="h-4 w-4" />
|
<RotateCcw className="h-4 w-4" />
|
||||||
|
|||||||
@ -134,13 +134,30 @@ export function CalendarRegistrationForm({ formData, onFormChange }: CalendarReg
|
|||||||
className="flex items-center justify-between cursor-pointer"
|
className="flex items-center justify-between cursor-pointer"
|
||||||
onClick={() => setIsAdditionalInfoOpen(!isAdditionalInfoOpen)}
|
onClick={() => setIsAdditionalInfoOpen(!isAdditionalInfoOpen)}
|
||||||
>
|
>
|
||||||
<Label className="text-sm font-medium cursor-pointer">Informações adicionais</Label>
|
<div className="flex items-center gap-2">
|
||||||
<ChevronDown className={`h-4 w-4 text-muted-foreground transition-transform duration-200 ${isAdditionalInfoOpen ? 'rotate-180' : ''}`} />
|
<Label className="text-sm font-medium cursor-pointer text-primary m-0">Informações adicionais</Label>
|
||||||
|
<ChevronDown className={`h-4 w-4 text-primary transition-transform duration-200 ${isAdditionalInfoOpen ? 'rotate-180' : ''}`} />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{isAdditionalInfoOpen && (
|
{isAdditionalInfoOpen && (
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label className="text-[13px]">Documentos e anexos</Label>
|
<div className="relative">
|
||||||
<Textarea name="documentos" rows={5} className="text-[13px] resize-none rounded-md transition-colors hover:bg-muted/30" value={formData.documentos || ''} onChange={handleChange} />
|
<select
|
||||||
|
name="documentos"
|
||||||
|
className="h-11 w-full rounded-md border border-gray-300 dark:border-input bg-background text-foreground pr-8 pl-3 text-[13px] appearance-none transition-colors hover:bg-muted/30 hover:border-gray-400"
|
||||||
|
value={formData.documentos || ''}
|
||||||
|
onChange={handleChange}
|
||||||
|
>
|
||||||
|
<option value="" disabled>
|
||||||
|
Documentos e anexos
|
||||||
|
</option>
|
||||||
|
<option value="identidade">Identidade / CPF</option>
|
||||||
|
<option value="comprovante_residencia">Comprovante de residência</option>
|
||||||
|
<option value="guias">Guias / Encaminhamentos</option>
|
||||||
|
<option value="outros">Outros</option>
|
||||||
|
</select>
|
||||||
|
<ChevronDown className="pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-primary" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -132,6 +132,8 @@ const initial: FormData = {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// AgendaEditor removido - restaurando o textarea original abaixo
|
||||||
|
|
||||||
export function DoctorRegistrationForm({
|
export function DoctorRegistrationForm({
|
||||||
open = true,
|
open = true,
|
||||||
onOpenChange,
|
onOpenChange,
|
||||||
@ -466,10 +468,10 @@ if (missingFields.length > 0) {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor="photo" className="cursor-pointer">
|
<Label htmlFor="photo" className="cursor-pointer rounded-md transition-colors">
|
||||||
<Button type="button" variant="outline" asChild>
|
<Button type="button" variant="ghost" asChild className="bg-primary text-primary-foreground border-transparent hover:bg-primary">
|
||||||
<span>
|
<span>
|
||||||
<Upload className="mr-2 h-4 w-4" /> Carregar Foto
|
<Upload className="mr-2 h-4 w-4 text-primary-foreground" /> Carregar Foto
|
||||||
</span>
|
</span>
|
||||||
</Button>
|
</Button>
|
||||||
</Label>
|
</Label>
|
||||||
@ -526,9 +528,9 @@ if (missingFields.length > 0) {
|
|||||||
<Label>Currículo</Label>
|
<Label>Currículo</Label>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Label htmlFor="curriculo-input" className="cursor-pointer">
|
<Label htmlFor="curriculo-input" className="cursor-pointer">
|
||||||
<Button type="button" variant="outline" asChild>
|
<Button type="button" variant="ghost" asChild className="bg-primary text-primary-foreground border-transparent hover:bg-primary">
|
||||||
<span>
|
<span>
|
||||||
<Upload className="mr-2 h-4 w-4" />
|
<Upload className="mr-2 h-4 w-4 text-primary-foreground" />
|
||||||
Anexar PDF ou DOC
|
Anexar PDF ou DOC
|
||||||
</span>
|
</span>
|
||||||
</Button>
|
</Button>
|
||||||
@ -540,7 +542,7 @@ if (missingFields.length > 0) {
|
|||||||
onChange={(e) => setField("curriculo", e.target.files?.[0] || null)}
|
onChange={(e) => setField("curriculo", e.target.files?.[0] || null)}
|
||||||
accept=".pdf,.doc,.docx"
|
accept=".pdf,.doc,.docx"
|
||||||
/>
|
/>
|
||||||
{form.curriculo && <span className="text-sm text-muted-foreground">{form.curriculo.name}</span>}
|
{form.curriculo && <span className="text-sm text-primary-foreground">{form.curriculo.name}</span>}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -644,7 +646,7 @@ if (missingFields.length > 0) {
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
<Button type="button" variant="outline" onClick={addFormacao}>
|
<Button type="button" onClick={addFormacao}>
|
||||||
Adicionar Formação
|
Adicionar Formação
|
||||||
</Button>
|
</Button>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
@ -752,17 +754,7 @@ if (missingFields.length > 0) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="space-y-2">
|
{/* Agenda/Horário removido conforme solicitado */}
|
||||||
<Label>Agenda/Horário</Label>
|
|
||||||
// Dentro do form, apenas exiba o campo se precisar dele visualmente, mas não envie
|
|
||||||
<textarea
|
|
||||||
value={form.agenda_horario}
|
|
||||||
onChange={(e) => setField("agenda_horario", e.target.value)}
|
|
||||||
placeholder="Descreva os dias e horários de atendimento"
|
|
||||||
disabled={true} // Torne o campo apenas visual, sem enviar
|
|
||||||
/>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<Label>Dados Bancários</Label>
|
<Label>Dados Bancários</Label>
|
||||||
@ -902,10 +894,10 @@ if (missingFields.length > 0) {
|
|||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label>Adicionar anexos</Label>
|
<Label>Adicionar anexos</Label>
|
||||||
<div className="border-2 border-dashed rounded-lg p-4">
|
<div className="border-2 border-dashed rounded-lg p-4">
|
||||||
<Label htmlFor="anexos" className="cursor-pointer block w-full">
|
<Label htmlFor="anexos" className="cursor-pointer block w-full rounded-md p-4 bg-primary text-primary-foreground">
|
||||||
<div className="flex flex-col items-center justify-center text-center">
|
<div className="flex flex-col items-center justify-center text-center">
|
||||||
<Upload className="h-7 w-7 mb-2" />
|
<Upload className="h-7 w-7 mb-2 text-primary-foreground" />
|
||||||
<p className="text-sm text-muted-foreground">Clique para adicionar documentos (PDF, imagens, etc.)</p>
|
<p className="text-sm text-primary-foreground">Clique para adicionar documentos (PDF, imagens, etc.)</p>
|
||||||
</div>
|
</div>
|
||||||
</Label>
|
</Label>
|
||||||
<Input id="anexos" type="file" multiple className="hidden" onChange={addLocalAnexos} />
|
<Input id="anexos" type="file" multiple className="hidden" onChange={addLocalAnexos} />
|
||||||
|
|||||||
@ -359,10 +359,10 @@ export function PatientRegistrationForm({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor="photo" className="cursor-pointer">
|
<Label htmlFor="photo" className="cursor-pointer rounded-md transition-colors">
|
||||||
<Button type="button" variant="outline" asChild>
|
<Button type="button" variant="ghost" asChild className="bg-primary text-primary-foreground border-transparent hover:bg-primary">
|
||||||
<span>
|
<span>
|
||||||
<Upload className="mr-2 h-4 w-4" /> Carregar Foto
|
<Upload className="mr-2 h-4 w-4 text-primary-foreground" /> Carregar Foto
|
||||||
</span>
|
</span>
|
||||||
</Button>
|
</Button>
|
||||||
</Label>
|
</Label>
|
||||||
@ -550,10 +550,10 @@ export function PatientRegistrationForm({
|
|||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label>Adicionar anexos</Label>
|
<Label>Adicionar anexos</Label>
|
||||||
<div className="border-2 border-dashed rounded-lg p-4">
|
<div className="border-2 border-dashed rounded-lg p-4">
|
||||||
<Label htmlFor="anexos" className="cursor-pointer block w-full">
|
<Label htmlFor="anexos" className="cursor-pointer block w-full rounded-md p-4 bg-primary text-primary-foreground">
|
||||||
<div className="flex flex-col items-center justify-center text-center">
|
<div className="flex flex-col items-center justify-center text-center">
|
||||||
<Upload className="h-7 w-7 mb-2" />
|
<Upload className="h-7 w-7 mb-2 text-primary-foreground" />
|
||||||
<p className="text-sm text-muted-foreground">Clique para adicionar documentos (PDF, imagens, etc.)</p>
|
<p className="text-sm text-primary-foreground">Clique para adicionar documentos (PDF, imagens, etc.)</p>
|
||||||
</div>
|
</div>
|
||||||
</Label>
|
</Label>
|
||||||
<Input id="anexos" type="file" multiple className="hidden" onChange={addLocalAnexos} />
|
<Input id="anexos" type="file" multiple className="hidden" onChange={addLocalAnexos} />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user