update-full

This commit is contained in:
TuanVT
2026-06-06 01:02:07 +07:00
parent 7791e1d6a8
commit d4194d6f12
30 changed files with 1018 additions and 391 deletions
@@ -120,15 +120,29 @@ const DetailConsultation = () => {
type PrescriptionItem =
ConsultationDetail["aggregatedPrescriptionItems"][number];
// const getFileInfo = (file: AttachmentFile | string, index: number) => {
// if (typeof file === "string") {
// return {
// fileName: file.split("/").pop() || `File ${index + 1}`,
// path: file,
// };
// }
// return file;
// };
const getFileInfo = (file: AttachmentFile | string, index: number) => {
if (typeof file === "string") {
return {
fileName: file.split("/").pop() || `File ${index + 1}`,
path: file,
path: `${process.env.NEXT_PUBLIC_IMAGE}${file}`,
};
}
return file;
return {
...file,
path: `${process.env.NEXT_PUBLIC_IMAGE}${file.path}`,
};
};
return (
@@ -282,7 +296,7 @@ const DetailConsultation = () => {
</p>
<p className="text-[15px] font-medium text-[#202939]">
{consultation.createdBy || "---"}
{consultation.createdByName || "---"}
</p>
</div>