date fixed
This commit is contained in:
@@ -99,11 +99,11 @@ export default function ClaimEditModal({
|
|||||||
<div className="mt-2 space-y-2">
|
<div className="mt-2 space-y-2">
|
||||||
<p>
|
<p>
|
||||||
<span className="text-gray-500">Date of Birth:</span>{" "}
|
<span className="text-gray-500">Date of Birth:</span>{" "}
|
||||||
{new Date(claim.dateOfBirth).toLocaleDateString()}
|
{formatDateToHumanReadable(claim.dateOfBirth)}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<span className="text-gray-500">Service Date:</span>{" "}
|
<span className="text-gray-500">Service Date:</span>{" "}
|
||||||
{new Date(claim.serviceDate).toLocaleDateString()}
|
{formatDateToHumanReadable(claim.serviceDate)}
|
||||||
</p>
|
</p>
|
||||||
<div>
|
<div>
|
||||||
<span className="text-gray-500">Status:</span>
|
<span className="text-gray-500">Status:</span>
|
||||||
@@ -199,7 +199,7 @@ export default function ClaimEditModal({
|
|||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<span className="text-gray-500">Procedure Date:</span>{" "}
|
<span className="text-gray-500">Procedure Date:</span>{" "}
|
||||||
{new Date(line.procedureDate).toLocaleDateString()}
|
{formatDateToHumanReadable(line.procedureDate)}
|
||||||
</p>
|
</p>
|
||||||
{line.oralCavityArea && (
|
{line.oralCavityArea && (
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -77,11 +77,11 @@ export default function ClaimViewModal({
|
|||||||
<div className="mt-2 space-y-2">
|
<div className="mt-2 space-y-2">
|
||||||
<p>
|
<p>
|
||||||
<span className="text-gray-500">Date of Birth:</span>{" "}
|
<span className="text-gray-500">Date of Birth:</span>{" "}
|
||||||
{new Date(claim.dateOfBirth).toLocaleDateString()}
|
{formatDateToHumanReadable(claim.dateOfBirth)}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<span className="text-gray-500">Service Date:</span>{" "}
|
<span className="text-gray-500">Service Date:</span>{" "}
|
||||||
{new Date(claim.serviceDate).toLocaleDateString()}
|
{formatDateToHumanReadable(claim.serviceDate)}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<span className="text-gray-500">Status:</span>{" "}
|
<span className="text-gray-500">Status:</span>{" "}
|
||||||
@@ -179,7 +179,7 @@ export default function ClaimViewModal({
|
|||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<span className="text-gray-500">Procedure Date:</span>{" "}
|
<span className="text-gray-500">Procedure Date:</span>{" "}
|
||||||
{new Date(line.procedureDate).toLocaleDateString()}
|
{formatDateToHumanReadable(line.procedureCode)}
|
||||||
</p>
|
</p>
|
||||||
{line.oralCavityArea && (
|
{line.oralCavityArea && (
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -9,7 +9,13 @@ import ClaimsRecentTable from "./claims-recent-table";
|
|||||||
import { PatientTable } from "../patients/patient-table";
|
import { PatientTable } from "../patients/patient-table";
|
||||||
import { PatientUncheckedCreateInputObjectSchema } from "@repo/db/usedSchemas";
|
import { PatientUncheckedCreateInputObjectSchema } from "@repo/db/usedSchemas";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
import { Card, CardDescription, CardHeader, CardTitle } from "../ui/card";
|
import {
|
||||||
|
Card,
|
||||||
|
CardContent,
|
||||||
|
CardDescription,
|
||||||
|
CardHeader,
|
||||||
|
CardTitle,
|
||||||
|
} from "../ui/card";
|
||||||
|
|
||||||
const PatientSchema = (
|
const PatientSchema = (
|
||||||
PatientUncheckedCreateInputObjectSchema as unknown as z.ZodObject<any>
|
PatientUncheckedCreateInputObjectSchema as unknown as z.ZodObject<any>
|
||||||
@@ -28,6 +34,9 @@ export default function ClaimsOfPatientModal() {
|
|||||||
setSelectedPatient(patient);
|
setSelectedPatient(patient);
|
||||||
setClaimsPage(1);
|
setClaimsPage(1);
|
||||||
setIsModalOpen(true);
|
setIsModalOpen(true);
|
||||||
|
} else {
|
||||||
|
setSelectedPatient(null);
|
||||||
|
setIsModalOpen(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -36,7 +45,7 @@ export default function ClaimsOfPatientModal() {
|
|||||||
{/* Claims Section */}
|
{/* Claims Section */}
|
||||||
{selectedPatient && (
|
{selectedPatient && (
|
||||||
<Card>
|
<Card>
|
||||||
<CardHeader className="pb-4">
|
<CardHeader>
|
||||||
<CardTitle>
|
<CardTitle>
|
||||||
Claims for {selectedPatient.firstName} {selectedPatient.lastName}
|
Claims for {selectedPatient.firstName} {selectedPatient.lastName}
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
@@ -44,7 +53,7 @@ export default function ClaimsOfPatientModal() {
|
|||||||
Displaying recent claims for the selected patient.
|
Displaying recent claims for the selected patient.
|
||||||
</CardDescription>
|
</CardDescription>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<div className="p-4">
|
<CardContent>
|
||||||
<ClaimsRecentTable
|
<ClaimsRecentTable
|
||||||
patientId={selectedPatient.id}
|
patientId={selectedPatient.id}
|
||||||
allowView
|
allowView
|
||||||
@@ -52,25 +61,25 @@ export default function ClaimsOfPatientModal() {
|
|||||||
allowDelete
|
allowDelete
|
||||||
onPageChange={setClaimsPage}
|
onPageChange={setClaimsPage}
|
||||||
/>
|
/>
|
||||||
</div>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Patients Section */}
|
{/* Patients Section */}
|
||||||
<Card>
|
<Card>
|
||||||
<CardHeader className="pb-4">
|
<CardHeader>
|
||||||
<CardTitle>Patients</CardTitle>
|
<CardTitle>Patient Records</CardTitle>
|
||||||
<CardDescription>
|
<CardDescription>
|
||||||
Select a patient to view their recent claims.
|
View and manage all patient information
|
||||||
</CardDescription>
|
</CardDescription>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<div className="p-4">
|
<CardContent>
|
||||||
<PatientTable
|
<PatientTable
|
||||||
allowView
|
allowView
|
||||||
allowCheckbox
|
allowCheckbox
|
||||||
onSelectPatient={handleSelectPatient}
|
onSelectPatient={handleSelectPatient}
|
||||||
/>
|
/>
|
||||||
</div>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -39,9 +39,7 @@ import { useAuth } from "@/hooks/use-auth";
|
|||||||
import LoadingScreen from "@/components/ui/LoadingScreen";
|
import LoadingScreen from "@/components/ui/LoadingScreen";
|
||||||
import { Checkbox } from "@/components/ui/checkbox";
|
import { Checkbox } from "@/components/ui/checkbox";
|
||||||
import { Avatar, AvatarFallback } from "@/components/ui/avatar";
|
import { Avatar, AvatarFallback } from "@/components/ui/avatar";
|
||||||
import { cn } from "@/lib/utils";
|
|
||||||
import { formatDateToHumanReadable } from "@/utils/dateUtils";
|
import { formatDateToHumanReadable } from "@/utils/dateUtils";
|
||||||
import { Card, CardHeader, CardTitle } from "@/components/ui/card";
|
|
||||||
import ClaimViewModal from "./claim-view-modal";
|
import ClaimViewModal from "./claim-view-modal";
|
||||||
import ClaimEditModal from "./claim-edit-modal";
|
import ClaimEditModal from "./claim-edit-modal";
|
||||||
|
|
||||||
@@ -319,10 +317,6 @@ export default function ClaimsRecentTable({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card className="mt-8">
|
|
||||||
<CardHeader className="pb-8">
|
|
||||||
<CardTitle>Recently Submitted Claims</CardTitle>
|
|
||||||
</CardHeader>
|
|
||||||
<div className="bg-white shadow rounded-lg overflow-hidden">
|
<div className="bg-white shadow rounded-lg overflow-hidden">
|
||||||
<div className="overflow-x-auto">
|
<div className="overflow-x-auto">
|
||||||
<Table>
|
<Table>
|
||||||
@@ -581,6 +575,5 @@ export default function ClaimsRecentTable({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -537,9 +537,7 @@ export function PatientTable({
|
|||||||
<div className="mt-2 space-y-2">
|
<div className="mt-2 space-y-2">
|
||||||
<p>
|
<p>
|
||||||
<span className="text-gray-500">Date of Birth:</span>{" "}
|
<span className="text-gray-500">Date of Birth:</span>{" "}
|
||||||
{new Date(
|
{formatDateToHumanReadable(currentPatient.dateOfBirth)}
|
||||||
currentPatient.dateOfBirth
|
|
||||||
).toLocaleDateString()}
|
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<span className="text-gray-500">Gender:</span>{" "}
|
<span className="text-gray-500">Gender:</span>{" "}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { useState, useEffect, useMemo } from "react";
|
|||||||
import { useMutation, useQuery } from "@tanstack/react-query";
|
import { useMutation, useQuery } from "@tanstack/react-query";
|
||||||
import { TopAppBar } from "@/components/layout/top-app-bar";
|
import { TopAppBar } from "@/components/layout/top-app-bar";
|
||||||
import { Sidebar } from "@/components/layout/sidebar";
|
import { Sidebar } from "@/components/layout/sidebar";
|
||||||
import { Card, CardHeader, CardTitle, CardContent } from "@/components/ui/card";
|
import { Card, CardHeader, CardTitle, CardContent, CardDescription } from "@/components/ui/card";
|
||||||
import { ClaimForm } from "@/components/claims/claim-form";
|
import { ClaimForm } from "@/components/claims/claim-form";
|
||||||
import { useToast } from "@/hooks/use-toast";
|
import { useToast } from "@/hooks/use-toast";
|
||||||
import { useAuth } from "@/hooks/use-auth";
|
import { useAuth } from "@/hooks/use-auth";
|
||||||
@@ -704,11 +704,21 @@ export default function ClaimsPage() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Recent Claims Section */}
|
{/* Recent Claims Section */}
|
||||||
|
<Card>
|
||||||
|
<CardHeader>
|
||||||
|
<CardTitle>Recently Submitted Claims</CardTitle>
|
||||||
|
<CardDescription>
|
||||||
|
View and manage all recent claims information
|
||||||
|
</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
<ClaimsRecentTable
|
<ClaimsRecentTable
|
||||||
allowEdit={true}
|
allowEdit={true}
|
||||||
allowView={true}
|
allowView={true}
|
||||||
allowDelete={true}
|
allowDelete={true}
|
||||||
/>
|
/>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
|
||||||
{/* Recent Claims by Patients */}
|
{/* Recent Claims by Patients */}
|
||||||
<ClaimsOfPatientModal />
|
<ClaimsOfPatientModal />
|
||||||
|
|||||||
Reference in New Issue
Block a user