Hello,
we're using the schedule element for our current project.
In terms of logic, we do have project leaders and projects. A project leader can have many projects, while a project always can only have one project leader.
So far I am able to show the projects as resources and the project leaders as resource group parents.
I want to show different appointments both on project and project leader layer and wondered if this is possible.
Please have a look at the following image.
This is my code, where I define my appointments...
It seems like the appointments on project-layer are not being shown, tough I have defined them in my code.
Thank you in advance.
Greetings,
Julian
Hi Julian,
We have prepared a sample to render appointments on the parent and the child resources. To render an appointment in the child row, you need to define both parent & child id like the below code.
export
let
timelineResourceData: Record<string, any>[] = [
{
Id:
1,
Subject:
'Projektphase 1',
// Description: 'Meeting to discuss business goal of 2018.',
StartTime:
new
Date(2022, 4, 5, 0, 0),
EndTime:
new
Date(2022, 4, 20, 0, 0),
ProjektleiterId:
1,
ProjekteId:
4
}, {
Id:
2,
Subject:
'Projektleiterphase 1',
// Description: 'Meeting to discuss business goal of 2018.',
StartTime:
new
Date(2022, 4, 5, 0, 0),
EndTime:
new
Date(2022, 4, 20, 0, 0),
ProjektleiterId:
1,
}, {
Id:
3,
Subject:
'Projektleiterphase 2',
// Description: 'Knowledge sharing on JSP topics.',
StartTime:
new
Date(2022, 4, 5, 0, 0),
EndTime:
new
Date(2022, 4, 20, 0, 0),
ProjektleiterId:
2,
}, {
Id:
4,
Subject:
'Projektphase 2',
// Description: 'Planning tasks for sprint.',
StartTime:
new
Date(2022, 4, 5, 0, 0),
EndTime:
new
Date(2022, 4, 20, 0, 0),
ProjektleiterId:
2,
ProjekteId:
7
}
];
Sample: https://stackblitz.com/edit/angular-hgxora?file=app.component.ts
Output:
|
|
Kindly try the above sample and let us know if this meets your requirement.
Regards,
Ruksar Moosa Sait
Hi Ruksar,
thank you very much for your answer.
It's working now, but if I click a cell on the parent resource row, the create appointment dialog doesn't appear.
Is there a way to get this working?
Thanks in advance.
Regards,
Julian
Hi Julian,
Thanks for the update.
It is not possible to create or edit an appointment at the Parent level of the resources as it is our default behavior. Let us know If you need further assistance.
Regards,
Ruksar Moosa Sait