feat: add per-patient Local folder in Documents page backed by Cloud Storage

- Documents page shows a "Local Folder" card for each selected patient
  with an "Open in Cloud Storage" button that deep-links to their folder
- Cloud Storage page reads ?folderId URL param on mount and auto-opens
  the folder panel for seamless navigation from Documents
- Backend: GET /api/cloud-storage/patient-folder/:patientId endpoint
  that idempotently gets or creates a top-level CloudFolder per patient
- CloudFolder schema gains optional patientId field linked to Patient
- Disk directories for cloud storage folders now use the folder's name
  (e.g. "Xiaohui Wang/") instead of the opaque "folder-{id}/" path

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
ff
2026-06-05 23:01:56 -04:00
parent 2457e12b5c
commit d5bc96ff39
158 changed files with 1539 additions and 130 deletions

View File

@@ -1,7 +1,7 @@
{
"version": "1.0",
"generatorVersion": "1.0.0",
"generatedAt": "2026-06-05T20:31:36.056Z",
"generatedAt": "2026-06-06T02:32:44.464Z",
"outputPath": "/home/ff/Desktop/DentalManagementMH06/packages/db/shared",
"files": [
"schemas/enums/TransactionIsolationLevel.schema.ts",
@@ -680,6 +680,7 @@
"schemas/objects/CronJobLogMinOrderByAggregateInput.schema.ts",
"schemas/objects/CronJobLogSumOrderByAggregateInput.schema.ts",
"schemas/objects/CloudFolderNullableScalarRelationFilter.schema.ts",
"schemas/objects/PatientNullableScalarRelationFilter.schema.ts",
"schemas/objects/CloudFolderUserIdParentIdNameCompoundUniqueInput.schema.ts",
"schemas/objects/CloudFolderCountOrderByAggregateInput.schema.ts",
"schemas/objects/CloudFolderAvgOrderByAggregateInput.schema.ts",
@@ -864,6 +865,7 @@
"schemas/objects/CommunicationCreateNestedManyWithoutPatientInput.schema.ts",
"schemas/objects/PatientDocumentCreateNestedManyWithoutPatientInput.schema.ts",
"schemas/objects/PatientConversationCreateNestedOneWithoutPatientInput.schema.ts",
"schemas/objects/CloudFolderCreateNestedManyWithoutPatientInput.schema.ts",
"schemas/objects/AppointmentUncheckedCreateNestedManyWithoutPatientInput.schema.ts",
"schemas/objects/AppointmentProcedureUncheckedCreateNestedManyWithoutPatientInput.schema.ts",
"schemas/objects/ClaimUncheckedCreateNestedManyWithoutPatientInput.schema.ts",
@@ -872,6 +874,7 @@
"schemas/objects/CommunicationUncheckedCreateNestedManyWithoutPatientInput.schema.ts",
"schemas/objects/PatientDocumentUncheckedCreateNestedManyWithoutPatientInput.schema.ts",
"schemas/objects/PatientConversationUncheckedCreateNestedOneWithoutPatientInput.schema.ts",
"schemas/objects/CloudFolderUncheckedCreateNestedManyWithoutPatientInput.schema.ts",
"schemas/objects/NullableDateTimeFieldUpdateOperationsInput.schema.ts",
"schemas/objects/NullableStringFieldUpdateOperationsInput.schema.ts",
"schemas/objects/EnumPatientStatusFieldUpdateOperationsInput.schema.ts",
@@ -885,6 +888,7 @@
"schemas/objects/CommunicationUpdateManyWithoutPatientNestedInput.schema.ts",
"schemas/objects/PatientDocumentUpdateManyWithoutPatientNestedInput.schema.ts",
"schemas/objects/PatientConversationUpdateOneWithoutPatientNestedInput.schema.ts",
"schemas/objects/CloudFolderUpdateManyWithoutPatientNestedInput.schema.ts",
"schemas/objects/AppointmentUncheckedUpdateManyWithoutPatientNestedInput.schema.ts",
"schemas/objects/AppointmentProcedureUncheckedUpdateManyWithoutPatientNestedInput.schema.ts",
"schemas/objects/ClaimUncheckedUpdateManyWithoutPatientNestedInput.schema.ts",
@@ -893,6 +897,7 @@
"schemas/objects/CommunicationUncheckedUpdateManyWithoutPatientNestedInput.schema.ts",
"schemas/objects/PatientDocumentUncheckedUpdateManyWithoutPatientNestedInput.schema.ts",
"schemas/objects/PatientConversationUncheckedUpdateOneWithoutPatientNestedInput.schema.ts",
"schemas/objects/CloudFolderUncheckedUpdateManyWithoutPatientNestedInput.schema.ts",
"schemas/objects/PatientCreateNestedOneWithoutAppointmentsInput.schema.ts",
"schemas/objects/UserCreateNestedOneWithoutAppointmentsInput.schema.ts",
"schemas/objects/StaffCreateNestedOneWithoutAppointmentsInput.schema.ts",
@@ -1036,12 +1041,14 @@
"schemas/objects/CloudFolderCreateNestedOneWithoutChildrenInput.schema.ts",
"schemas/objects/CloudFolderCreateNestedManyWithoutParentInput.schema.ts",
"schemas/objects/UserCreateNestedOneWithoutCloudFoldersInput.schema.ts",
"schemas/objects/PatientCreateNestedOneWithoutCloudFoldersInput.schema.ts",
"schemas/objects/CloudFileCreateNestedManyWithoutFolderInput.schema.ts",
"schemas/objects/CloudFolderUncheckedCreateNestedManyWithoutParentInput.schema.ts",
"schemas/objects/CloudFileUncheckedCreateNestedManyWithoutFolderInput.schema.ts",
"schemas/objects/CloudFolderUpdateOneWithoutChildrenNestedInput.schema.ts",
"schemas/objects/CloudFolderUpdateManyWithoutParentNestedInput.schema.ts",
"schemas/objects/UserUpdateOneRequiredWithoutCloudFoldersNestedInput.schema.ts",
"schemas/objects/PatientUpdateOneWithoutCloudFoldersNestedInput.schema.ts",
"schemas/objects/CloudFileUpdateManyWithoutFolderNestedInput.schema.ts",
"schemas/objects/CloudFolderUncheckedUpdateManyWithoutParentNestedInput.schema.ts",
"schemas/objects/CloudFileUncheckedUpdateManyWithoutFolderNestedInput.schema.ts",
@@ -1338,6 +1345,10 @@
"schemas/objects/PatientConversationCreateWithoutPatientInput.schema.ts",
"schemas/objects/PatientConversationUncheckedCreateWithoutPatientInput.schema.ts",
"schemas/objects/PatientConversationCreateOrConnectWithoutPatientInput.schema.ts",
"schemas/objects/CloudFolderCreateWithoutPatientInput.schema.ts",
"schemas/objects/CloudFolderUncheckedCreateWithoutPatientInput.schema.ts",
"schemas/objects/CloudFolderCreateOrConnectWithoutPatientInput.schema.ts",
"schemas/objects/CloudFolderCreateManyPatientInputEnvelope.schema.ts",
"schemas/objects/UserUpsertWithoutPatientsInput.schema.ts",
"schemas/objects/UserUpdateToOneWithWhereWithoutPatientsInput.schema.ts",
"schemas/objects/UserUpdateWithoutPatientsInput.schema.ts",
@@ -1370,6 +1381,9 @@
"schemas/objects/PatientConversationUpdateToOneWithWhereWithoutPatientInput.schema.ts",
"schemas/objects/PatientConversationUpdateWithoutPatientInput.schema.ts",
"schemas/objects/PatientConversationUncheckedUpdateWithoutPatientInput.schema.ts",
"schemas/objects/CloudFolderUpsertWithWhereUniqueWithoutPatientInput.schema.ts",
"schemas/objects/CloudFolderUpdateWithWhereUniqueWithoutPatientInput.schema.ts",
"schemas/objects/CloudFolderUpdateManyWithWhereWithoutPatientInput.schema.ts",
"schemas/objects/PatientCreateWithoutAppointmentsInput.schema.ts",
"schemas/objects/PatientUncheckedCreateWithoutAppointmentsInput.schema.ts",
"schemas/objects/PatientCreateOrConnectWithoutAppointmentsInput.schema.ts",
@@ -1716,6 +1730,9 @@
"schemas/objects/UserCreateWithoutCloudFoldersInput.schema.ts",
"schemas/objects/UserUncheckedCreateWithoutCloudFoldersInput.schema.ts",
"schemas/objects/UserCreateOrConnectWithoutCloudFoldersInput.schema.ts",
"schemas/objects/PatientCreateWithoutCloudFoldersInput.schema.ts",
"schemas/objects/PatientUncheckedCreateWithoutCloudFoldersInput.schema.ts",
"schemas/objects/PatientCreateOrConnectWithoutCloudFoldersInput.schema.ts",
"schemas/objects/CloudFileCreateWithoutFolderInput.schema.ts",
"schemas/objects/CloudFileUncheckedCreateWithoutFolderInput.schema.ts",
"schemas/objects/CloudFileCreateOrConnectWithoutFolderInput.schema.ts",
@@ -1731,6 +1748,10 @@
"schemas/objects/UserUpdateToOneWithWhereWithoutCloudFoldersInput.schema.ts",
"schemas/objects/UserUpdateWithoutCloudFoldersInput.schema.ts",
"schemas/objects/UserUncheckedUpdateWithoutCloudFoldersInput.schema.ts",
"schemas/objects/PatientUpsertWithoutCloudFoldersInput.schema.ts",
"schemas/objects/PatientUpdateToOneWithWhereWithoutCloudFoldersInput.schema.ts",
"schemas/objects/PatientUpdateWithoutCloudFoldersInput.schema.ts",
"schemas/objects/PatientUncheckedUpdateWithoutCloudFoldersInput.schema.ts",
"schemas/objects/CloudFileUpsertWithWhereUniqueWithoutFolderInput.schema.ts",
"schemas/objects/CloudFileUpdateWithWhereUniqueWithoutFolderInput.schema.ts",
"schemas/objects/CloudFileUpdateManyWithWhereWithoutFolderInput.schema.ts",
@@ -1939,6 +1960,7 @@
"schemas/objects/PaymentCreateManyPatientInput.schema.ts",
"schemas/objects/CommunicationCreateManyPatientInput.schema.ts",
"schemas/objects/PatientDocumentCreateManyPatientInput.schema.ts",
"schemas/objects/CloudFolderCreateManyPatientInput.schema.ts",
"schemas/objects/AppointmentUpdateWithoutPatientInput.schema.ts",
"schemas/objects/AppointmentUncheckedUpdateWithoutPatientInput.schema.ts",
"schemas/objects/AppointmentUncheckedUpdateManyWithoutPatientInput.schema.ts",
@@ -1960,6 +1982,9 @@
"schemas/objects/PatientDocumentUpdateWithoutPatientInput.schema.ts",
"schemas/objects/PatientDocumentUncheckedUpdateWithoutPatientInput.schema.ts",
"schemas/objects/PatientDocumentUncheckedUpdateManyWithoutPatientInput.schema.ts",
"schemas/objects/CloudFolderUpdateWithoutPatientInput.schema.ts",
"schemas/objects/CloudFolderUncheckedUpdateWithoutPatientInput.schema.ts",
"schemas/objects/CloudFolderUncheckedUpdateManyWithoutPatientInput.schema.ts",
"schemas/objects/AppointmentProcedureCreateManyAppointmentInput.schema.ts",
"schemas/objects/ClaimCreateManyAppointmentInput.schema.ts",
"schemas/objects/AppointmentFileCreateManyAppointmentInput.schema.ts",
@@ -2247,6 +2272,7 @@
"schemas/objects/PatientCountOutputTypeCountPaymentArgs.schema.ts",
"schemas/objects/PatientCountOutputTypeCountCommunicationsArgs.schema.ts",
"schemas/objects/PatientCountOutputTypeCountDocumentsArgs.schema.ts",
"schemas/objects/PatientCountOutputTypeCountCloudFoldersArgs.schema.ts",
"schemas/objects/AppointmentCountOutputTypeArgs.schema.ts",
"schemas/objects/AppointmentCountOutputTypeCountProceduresArgs.schema.ts",
"schemas/objects/AppointmentCountOutputTypeCountClaimsArgs.schema.ts",