Smart UI Components & Libraries – Grid, Scheduler, Gantt, Kanban for Angular, React, Next.js, Vue, Blazor, JavaScript › Forums › General Discussions › add ressources to doctor's schedule
- This topic has 5 replies, 2 voices, and was last updated 4 years, 6 months ago by
skriaa.
-
AuthorPosts
-
June 17, 2021 at 1:05 pm #101896
skriaa
MemberHello, i’m trying to add my own list of users instead of doctor’s name,
<span style=”text-decoration: underline;”>I declared it as below :</span>
<div>
<div>resources: SchedulerResource[] = []</div>
</div>
<div></div>
<div><span style=”text-decoration: underline;”>and in ngOnInit</span> :</div>
<div></div>
<div>
<div>ngOnInit(): void {</div>
<div> this.userManagementService.allUsersWhereRoleUSER().subscribe((user:any) => {</div>
<div> for (let i = 0; i < user.body.length; i++) {</div>
<div> this.resources.push({</div>
<div> label: ‘Doctors’,</div>
<div> value: ‘doctorId’,</div>
<div> dataSource: [{</div>
<div> label:user.body[i].login,</div>
<div> id:user.body[i].id</div>
<div> }</div>
<div> ]</div>
<div> }); ..</div>
</div>
<div></div>
<div><span style=”text-decoration: underline;”>and as result,</span> it display only the first user’s name knowing that i have 5 users.</div>
<div></div>
<div>thank you.</div>June 17, 2021 at 1:07 pm #101897skriaa
Memberi forgot to mention that i’m using angular demo.
June 17, 2021 at 2:41 pm #101899skriaa
Memberalso i wanted to add that when we add a new doctor ( i test it with this demo https://stackblitz.com/edit/github-eajihb?file=src%2Fapp%2Fapp.component.ts ) the horizontal scrollbar is not showing.
June 17, 2021 at 2:48 pm #101900yavordashew
MemberHi skriaa,
I was able to partially test this use case but I wasn’t able to reproduce the issue as you do.
If it’s possible to create a complete code example of your case in order to be able to give you a solution about.(stackblitz or github repo)
Please, do not hesitate to contact us if you have any additional questions.
Best regards,
Yavor Dashev
Smart UI Team
https://www.htmlelements.com/June 17, 2021 at 4:50 pm #101904skriaa
MemberHello,
here you can find an example, as you can see it doesn’t display the user’s name
https://stackblitz.com/edit/github-eajihb?file=src/app/app.component.ts
thank you.
June 18, 2021 at 9:34 am #101906skriaa
Memberhello, i finally figured out the problem and i solved it.
-
AuthorPosts
- You must be logged in to reply to this topic.