Doctor Patient Edit Form Update 2

This commit is contained in:
Sir Blob
2025-01-25 14:04:53 -05:00
parent 271aa34dc4
commit a0c1c33bda
3 changed files with 10 additions and 10 deletions

View File

@@ -11,6 +11,11 @@ const compat = new FlatCompat({
const eslintConfig = [
...compat.extends("next/core-web-vitals", "next/typescript"),
{
rules: {
'@typescript-eslint/no-explicit-any': 'off',
},
},
];
export default eslintConfig;

View File

@@ -9,15 +9,10 @@ import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
export function PersonForm({ person }: any) {
export function PersonForm({ person }: { person: { email: string, name: string, medications: any[], diagnoses: string[] } }) {
const [medications, setMedications] = useState(person.medications || [])
async function onSubmit(event: React.FormEvent<HTMLFormElement>) {
event.preventDefault()
}
const [diagnoses, setDiagnoses] = useState(person.diagnoses || [])
const handleDiagnosesChange = (event: React.ChangeEvent<HTMLInputElement>) => {
@@ -58,7 +53,7 @@ export function PersonForm({ person }: any) {
<div className="mb-4">
<Label>Medications:</Label>
<br />
{medications.map((medication: any, index: number) => (
{medications.map((medication: { name: string, dosage: string, frequency:string }, index: number) => (
<div key={index} className="mb-2 grid grid-cols-3 gap-2">
<Input
type="text"

View File

@@ -8,7 +8,7 @@ import { Label } from '@/components/ui/label';
import { Card, CardHeader, CardContent } from '@/components/ui/card';
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible"
import { ChevronDown, ChevronUp } from "lucide-react"
import { ChevronDown } from "lucide-react"
import { PersonForm } from './PatientForm';