improvement: users can now comment on a case and it's details and have an option to make it visible for clinics too.

This commit is contained in:
2026-07-07 17:14:31 +03:30
parent cb63ced4e3
commit b2d40b3e97
21 changed files with 467 additions and 269 deletions

View File

@@ -397,7 +397,6 @@ export class TreatmentsService {
clientKey: lc.clientId,
sortOrder: index,
destinationOrganizationId: lc.destinationOrganizationId ?? null,
labComment: lc.labComment?.trim() || null,
},
})
: await tx.labCase.create({
@@ -406,7 +405,6 @@ export class TreatmentsService {
clientKey: lc.clientId,
sortOrder: index,
destinationOrganizationId: lc.destinationOrganizationId ?? null,
labComment: lc.labComment?.trim() || null,
},
});
@@ -675,7 +673,6 @@ export class TreatmentsService {
clientKey: string | null;
sortOrder: number;
destinationOrganizationId: string | null;
labComment: string | null;
sentAt: Date | null;
details: Array<{
treatmentDetailId: string;
@@ -754,7 +751,6 @@ export class TreatmentsService {
clientKey?: string | null;
sortOrder?: number;
destinationOrganizationId?: string | null;
labComment?: string | null;
sentAt?: Date | null;
details?: Array<{
treatmentDetailId: string;
@@ -775,7 +771,6 @@ export class TreatmentsService {
id: lc.id,
clientId: lc.clientKey ?? lc.id,
destinationOrganizationId: lc.destinationOrganizationId ?? null,
labComment: lc.labComment ?? null,
sentAt: lc.sentAt?.toISOString() ?? null,
treatmentDetailIds: lc.details?.map((d) => d.treatmentDetailId) ?? [],
details: (lc.details ?? []).map((d) => ({