diff --git a/frontend/src/components/hooks/useProjects.tsx b/frontend/src/components/hooks/useProjects.tsx index 5c61a794..629b778c 100644 --- a/frontend/src/components/hooks/useProjects.tsx +++ b/frontend/src/components/hooks/useProjects.tsx @@ -126,6 +126,7 @@ export function mapToProjectMonth(confacState: ProjectMonthResolverState, projec consultant, client, partner: project.partner && confacState.clients.find(c => project.partner && c._id === project.partner.clientId), + endCustomer: !!project.endCustomer?.clientId ? confacState.clients.find(c=> c._id === project.endCustomer!.clientId): undefined, invoice: invoice || confacState.invoices.find(i => i.projectMonth && i.projectMonth.projectMonthId === projectMonth._id), }; diff --git a/frontend/src/components/project/controls/ProjectMonthModal.tsx b/frontend/src/components/project/controls/ProjectMonthModal.tsx index 0505f5ea..d6f2a5f8 100644 --- a/frontend/src/components/project/controls/ProjectMonthModal.tsx +++ b/frontend/src/components/project/controls/ProjectMonthModal.tsx @@ -75,7 +75,7 @@ export const ProjectMonthModal = ({onClose, projectMonth}: ProjectMonthModalProp
- +
{fullProjectMonth.client.name} @@ -88,6 +88,13 @@ export const ProjectMonthModal = ({onClose, projectMonth}: ProjectMonthModalProp )}
+ {fullProjectMonth.endCustomer && +
+
+
{fullProjectMonth.endCustomer.name}
+
+ } + ); diff --git a/frontend/src/components/project/models/FullProjectMonthModel.ts b/frontend/src/components/project/models/FullProjectMonthModel.ts index 175d442a..90efd8f9 100644 --- a/frontend/src/components/project/models/FullProjectMonthModel.ts +++ b/frontend/src/components/project/models/FullProjectMonthModel.ts @@ -20,6 +20,7 @@ export class FullProjectMonthModel { consultant: ConsultantModel; client: ClientModel; partner?: ClientModel; + endCustomer?: ClientModel; invoice?: InvoiceModel; constructor(json: IFullProjectMonthModel) { @@ -28,6 +29,7 @@ export class FullProjectMonthModel { this.consultant = json.consultant; this.client = json.client; this.partner = json.partner; + this.endCustomer = json.endCustomer; this.invoice = json.invoice; } } @@ -40,5 +42,6 @@ export interface IFullProjectMonthModel { consultant: ConsultantModel; client: ClientModel; partner?: ClientModel; + endCustomer?: ClientModel; invoice?: InvoiceModel; }