chore: ui improvements on organisation stats #531
This commit is contained in:
@@ -928,7 +928,8 @@
|
|||||||
"recent_enrollments": "Aktuelle Anmeldungen",
|
"recent_enrollments": "Aktuelle Anmeldungen",
|
||||||
"publish_first_course": "Veröffentlichen Sie Ihren ersten Kurs",
|
"publish_first_course": "Veröffentlichen Sie Ihren ersten Kurs",
|
||||||
"publish_first_course_description": "Um Anmeldungen zu verfolgen, veröffentlichen Sie einen Kurs und laden Sie Studierende ein",
|
"publish_first_course_description": "Um Anmeldungen zu verfolgen, veröffentlichen Sie einen Kurs und laden Sie Studierende ein",
|
||||||
"publish_course": "Kurs veröffentlichen"
|
"publish_course": "Kurs veröffentlichen",
|
||||||
|
"student": "Student"
|
||||||
},
|
},
|
||||||
"schedule": {
|
"schedule": {
|
||||||
"title": "Dein Zeitplan",
|
"title": "Dein Zeitplan",
|
||||||
|
|||||||
@@ -458,6 +458,7 @@
|
|||||||
"total_students_description": "Based on student enrollments",
|
"total_students_description": "Based on student enrollments",
|
||||||
"top_courses": "Top Courses",
|
"top_courses": "Top Courses",
|
||||||
"students": "students",
|
"students": "students",
|
||||||
|
"student": "student",
|
||||||
"completion": "completion",
|
"completion": "completion",
|
||||||
"create_first_course": "Create Your First Course",
|
"create_first_course": "Create Your First Course",
|
||||||
"create_first_course_description": "Start creating courses to track course progress",
|
"create_first_course_description": "Start creating courses to track course progress",
|
||||||
|
|||||||
@@ -928,7 +928,8 @@
|
|||||||
"recent_enrollments": "Inscripciones recientes",
|
"recent_enrollments": "Inscripciones recientes",
|
||||||
"publish_first_course": "Publica tu primer curso",
|
"publish_first_course": "Publica tu primer curso",
|
||||||
"publish_first_course_description": "Para realizar un seguimiento de las inscripciones, publicar un curso e invitar a estudiantes",
|
"publish_first_course_description": "Para realizar un seguimiento de las inscripciones, publicar un curso e invitar a estudiantes",
|
||||||
"publish_course": "Publicar curso"
|
"publish_course": "Publicar curso",
|
||||||
|
"student": "alumno"
|
||||||
},
|
},
|
||||||
"schedule": {
|
"schedule": {
|
||||||
"title": "Tu agenda",
|
"title": "Tu agenda",
|
||||||
|
|||||||
@@ -928,7 +928,8 @@
|
|||||||
"recent_enrollments": "Inscriptions récentes",
|
"recent_enrollments": "Inscriptions récentes",
|
||||||
"publish_first_course": "Publiez votre premier cours",
|
"publish_first_course": "Publiez votre premier cours",
|
||||||
"publish_first_course_description": "Pour suivre les inscriptions, publier un cours et inviter des étudiants",
|
"publish_first_course_description": "Pour suivre les inscriptions, publier un cours et inviter des étudiants",
|
||||||
"publish_course": "Publier un cours"
|
"publish_course": "Publier un cours",
|
||||||
|
"student": "étudiant"
|
||||||
},
|
},
|
||||||
"schedule": {
|
"schedule": {
|
||||||
"title": "Votre emploi du temps",
|
"title": "Votre emploi du temps",
|
||||||
|
|||||||
@@ -928,7 +928,8 @@
|
|||||||
"recent_enrollments": "हाल के नामांकन",
|
"recent_enrollments": "हाल के नामांकन",
|
||||||
"publish_first_course": "अपना पहला पाठ्यक्रम प्रकाशित करें",
|
"publish_first_course": "अपना पहला पाठ्यक्रम प्रकाशित करें",
|
||||||
"publish_first_course_description": "नामांकन पर नज़र रखने के लिए, एक पाठ्यक्रम प्रकाशित करें और छात्रों को आमंत्रित करें",
|
"publish_first_course_description": "नामांकन पर नज़र रखने के लिए, एक पाठ्यक्रम प्रकाशित करें और छात्रों को आमंत्रित करें",
|
||||||
"publish_course": "पाठ्यक्रम प्रकाशित करें"
|
"publish_course": "पाठ्यक्रम प्रकाशित करें",
|
||||||
|
"student": "विद्यार्थी"
|
||||||
},
|
},
|
||||||
"schedule": {
|
"schedule": {
|
||||||
"title": "आपका समय - सारणी",
|
"title": "आपका समय - सारणी",
|
||||||
|
|||||||
@@ -928,7 +928,8 @@
|
|||||||
"recent_enrollments": "Inscrições recentes",
|
"recent_enrollments": "Inscrições recentes",
|
||||||
"publish_first_course": "Publique seu primeiro curso",
|
"publish_first_course": "Publique seu primeiro curso",
|
||||||
"publish_first_course_description": "Para rastrear matrículas, publicar um curso e convidar alunos",
|
"publish_first_course_description": "Para rastrear matrículas, publicar um curso e convidar alunos",
|
||||||
"publish_course": "Publicar curso"
|
"publish_course": "Publicar curso",
|
||||||
|
"student": "estudante"
|
||||||
},
|
},
|
||||||
"schedule": {
|
"schedule": {
|
||||||
"title": "Sua programação",
|
"title": "Sua programação",
|
||||||
|
|||||||
@@ -928,7 +928,8 @@
|
|||||||
"recent_enrollments": "Недавние регистрации",
|
"recent_enrollments": "Недавние регистрации",
|
||||||
"publish_first_course": "Опубликуйте свой первый курс",
|
"publish_first_course": "Опубликуйте свой первый курс",
|
||||||
"publish_first_course_description": "Чтобы отслеживать зачисления, опубликуйте курс и пригласите студентов.",
|
"publish_first_course_description": "Чтобы отслеживать зачисления, опубликуйте курс и пригласите студентов.",
|
||||||
"publish_course": "Опубликовать курс"
|
"publish_course": "Опубликовать курс",
|
||||||
|
"student": "студент"
|
||||||
},
|
},
|
||||||
"schedule": {
|
"schedule": {
|
||||||
"title": "Твое расписание",
|
"title": "Твое расписание",
|
||||||
|
|||||||
@@ -928,7 +928,8 @@
|
|||||||
"recent_enrollments": "Đăng ký gần đây",
|
"recent_enrollments": "Đăng ký gần đây",
|
||||||
"publish_first_course": "Xuất bản khóa học đầu tiên của bạn",
|
"publish_first_course": "Xuất bản khóa học đầu tiên của bạn",
|
||||||
"publish_first_course_description": "Để theo dõi việc đăng ký, xuất bản một khóa học và mời sinh viên",
|
"publish_first_course_description": "Để theo dõi việc đăng ký, xuất bản một khóa học và mời sinh viên",
|
||||||
"publish_course": "Xuất bản khóa học"
|
"publish_course": "Xuất bản khóa học",
|
||||||
|
"student": "học sinh"
|
||||||
},
|
},
|
||||||
"schedule": {
|
"schedule": {
|
||||||
"title": "Lịch trình của bạn",
|
"title": "Lịch trình của bạn",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
import { snackbar } from '$lib/components/Snackbar/store';
|
import { snackbar } from '$lib/components/Snackbar/store';
|
||||||
import { calDateDiff } from '$lib/utils/functions/date';
|
import { calDateDiff } from '$lib/utils/functions/date';
|
||||||
import { getAccessToken } from '$lib/utils/functions/supabase';
|
import { getAccessToken } from '$lib/utils/functions/supabase';
|
||||||
import { currentOrg } from '$lib/utils/store/org';
|
import { currentOrg, currentOrgPath } from '$lib/utils/store/org';
|
||||||
import { profile } from '$lib/utils/store/user';
|
import { profile } from '$lib/utils/store/user';
|
||||||
import type { OrganisationAnalytics } from '$lib/utils/types/analytics';
|
import type { OrganisationAnalytics } from '$lib/utils/types/analytics';
|
||||||
import Add from 'carbon-icons-svelte/lib/Add.svelte';
|
import Add from 'carbon-icons-svelte/lib/Add.svelte';
|
||||||
@@ -27,17 +27,12 @@
|
|||||||
import { isMobile } from '$lib/utils/store/useMobile';
|
import { isMobile } from '$lib/utils/store/useMobile';
|
||||||
import { Grid, Link, SkeletonPlaceholder } from 'carbon-components-svelte';
|
import { Grid, Link, SkeletonPlaceholder } from 'carbon-components-svelte';
|
||||||
|
|
||||||
export let data;
|
// export let data;
|
||||||
|
|
||||||
const { orgName } = data;
|
|
||||||
|
|
||||||
let dashAnalytics: OrganisationAnalytics;
|
let dashAnalytics: OrganisationAnalytics;
|
||||||
|
|
||||||
function createCourse() {
|
function createCourse() {
|
||||||
goto(`/org/${orgName}/courses?create=true`);
|
goto(`${$currentOrgPath}/courses?create=true`);
|
||||||
}
|
|
||||||
function publishCourse() {
|
|
||||||
goto(`/org/${orgName}/courses`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchDashAnalytics(orgId: string) {
|
async function fetchDashAnalytics(orgId: string) {
|
||||||
@@ -162,7 +157,7 @@
|
|||||||
</Link>
|
</Link>
|
||||||
<p class="text-muted-foreground text-sm">
|
<p class="text-muted-foreground text-sm">
|
||||||
{course.enrollments}
|
{course.enrollments}
|
||||||
{$t('dashboard.students')}
|
{$t(course.enrollments === 1 ? 'dashboard.student' : 'dashboard.students')}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="ml-auto w-2/6">
|
<div class="ml-auto w-2/6">
|
||||||
@@ -221,7 +216,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<div class="min-h-[45px] space-y-1">
|
<div class="min-h-[45px] space-y-1">
|
||||||
<p class="text-md font-medium leading-none">{enrollment.name}</p>
|
<p class="text-sm font-medium leading-none">{enrollment.name}</p>
|
||||||
<p class="text-muted-foreground text-sm">
|
<p class="text-muted-foreground text-sm">
|
||||||
<span class="italic">
|
<span class="italic">
|
||||||
{calDateDiff(enrollment.date)}
|
{calDateDiff(enrollment.date)}
|
||||||
@@ -230,9 +225,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div class="w-2/4">
|
||||||
<Link href={`/courses/${enrollment.courseId}`}>
|
<Link href={`/courses/${enrollment.courseId}`}>
|
||||||
<p class="text-sm font-medium leading-none">
|
<p class="line-clamp-2 pb-[0.1rem] text-sm font-medium leading-none">
|
||||||
{enrollment.course}
|
{enrollment.course}
|
||||||
</p>
|
</p>
|
||||||
</Link>
|
</Link>
|
||||||
@@ -253,7 +248,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<PrimaryButton
|
<PrimaryButton
|
||||||
variant={VARIANTS.OUTLINED}
|
variant={VARIANTS.OUTLINED}
|
||||||
onClick={publishCourse}
|
onClick={() => goto(`${$currentOrgPath}/courses`)}
|
||||||
label={$t('dashboard.publish_course')}
|
label={$t('dashboard.publish_course')}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user