You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							49 lines
						
					
					
						
							1016 B
						
					
					
				
			
		
		
	
	
							49 lines
						
					
					
						
							1016 B
						
					
					
				<template>
 | 
						|
  <Card class="course-card">
 | 
						|
    <template #header>
 | 
						|
      <img
 | 
						|
        :src="course.illustrationUrl"
 | 
						|
        :alt="course.title"
 | 
						|
      >
 | 
						|
    </template>
 | 
						|
    <template #title>
 | 
						|
      <router-link
 | 
						|
        :to="{ name: 'CourseHome', params: {id: course._id, course: course}, query: { sid: sessionId } }"
 | 
						|
        class="course-card__home-link"
 | 
						|
      >
 | 
						|
        <span v-if="session">
 | 
						|
          {{ session.name }} -
 | 
						|
        </span>
 | 
						|
        {{ course.title }}
 | 
						|
      </router-link>
 | 
						|
    </template>
 | 
						|
    <template #footer>
 | 
						|
      <TeacherBar :teachers="teachers" />
 | 
						|
    </template>
 | 
						|
  </Card>
 | 
						|
</template>
 | 
						|
 | 
						|
<script setup>
 | 
						|
import Card from 'primevue/card';
 | 
						|
import TeacherBar from '../TeacherBar';
 | 
						|
 | 
						|
// eslint-disable-next-line no-undef
 | 
						|
const props = defineProps(
 | 
						|
  {
 | 
						|
    course: Object,
 | 
						|
    session: Object,
 | 
						|
    sessionId: {
 | 
						|
      type: Number,
 | 
						|
      required: false,
 | 
						|
      default: 0
 | 
						|
    }
 | 
						|
  }
 | 
						|
);
 | 
						|
 | 
						|
const teachers = props.course.users.edges.map(
 | 
						|
  edge => ({
 | 
						|
    id: edge.node.id,
 | 
						|
    ...edge.node.user,
 | 
						|
  })
 | 
						|
);
 | 
						|
</script>
 | 
						|
 |