Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. @wire(getCourseData, { studentId: '$recordId' }) studentCourseRelationships;
  2.  
  3. <template>
  4. <lightning-card title="Courses" icon-name="custom:custom14">
  5. <div class="slds-m-around_medium">
  6. <template if:true={studentCourseRelationships.data}>
  7. <p>HEYO</p>
  8. <lightning-accordion allow-multiple-sections-open>
  9. <template for:each={studentCourseRelationships.data} for:item="rel">
  10. <lightning-accordion-section key={rel.Id} name={rel.Name} label={rel.Course__r.Name}>
  11. <p>This is the content area for section A.</p>
  12. <p>Donec vitae tellus egestas, faucibus ipsum ac, imperdiet erat. Nam venenatis non ante at sagittis. Integer vel purus eget nunc semper placerat. Nam tristique quam leo, et posuere enim condimentum quis. Ut sagittis libero id lectus tempor maximus. Nunc ut tincidunt eros, a hendrerit leo. Suspendisse quis fermentum dolor. Nulla euismod consectetur leo, id condimentum nunc consequat quis.</p>
  13. </lightning-accordion-section>
  14. </template>
  15. </lightning-accordion>
  16. </template>
  17. <template if:false={studentCourseRelationships.data}>
  18. <p>Student is not enrolled in any courses</p>
  19. </template>
  20. </div>
  21. </lightning-card>
  22. </template>
  23.  
  24. get hasCourses() {
  25. return (this.studentCourseRelationships.data.length > 0);
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement