Merge branch 'main' of https://gitlab.com/thenextgreat/classroomio into notification

This commit is contained in:
Rotimi Best
2023-10-07 02:35:37 +01:00
43 changed files with 3244 additions and 175 deletions
@@ -37,7 +37,7 @@
}
let students: GroupPerson[] = [];
let isStudent: boolean;
let isStudent: boolean = false;
let searchValue = '';
function setAttendance(courseData: CourseData) {
@@ -113,9 +113,9 @@
}
// function for the searchbar
function searchStudents(query: string) {
function searchStudents(query: string, _students: GroupPerson[]) {
const lowercaseQuery = query.toLowerCase();
return students.filter((student) =>
return _students.filter((student) =>
student.profile.fullname.toLowerCase().includes(lowercaseQuery)
);
}
@@ -138,7 +138,6 @@
$: students = isStudent
? $group.people.filter((person) => !!person.profile && person.profile.id === $profile.id)
: $group.people.filter((person) => !!person.profile && person.role_id === ROLE.STUDENT);
$: console.log(students);
</script>
<CourseContainer bind:isStudent>
@@ -180,7 +179,7 @@
</StructuredListRow>
</StructuredListHead>
{#each searchStudents(searchValue) as student}
{#each searchStudents(searchValue, students) as student}
<StructuredListBody>
<StructuredListRow>
<StructuredListCell>
@@ -22,6 +22,7 @@
import Download from 'carbon-icons-svelte/lib/Download.svelte';
import OverflowMenuVertical from 'carbon-icons-svelte/lib/OverflowMenuVertical.svelte';
import { apps } from '$lib/components/Apps/store';
import APPS_CONSTANTS from '$lib/components/Apps/constants';
import IconButton from '$lib/components/IconButton/index.svelte';
import { lesson, lessons } from '$lib/components/Course/components/Lesson/store/lessons';
import { browser } from '$app/environment';
@@ -197,6 +198,11 @@
mode = mode === MODES.edit ? MODES.view : MODES.edit;
}
function handleAppClick(appName) {
$apps.selectedApp = appName;
$apps.open = true;
}
$: path = $page.url?.pathname?.replace(/\/exercises[\/ 0-9 a-z -]*/, '');
$: if (data.courseId && browser) {
@@ -311,6 +317,7 @@
{/if}
<button
class="px-2 my-2 pr-4 border-t-0 border-b-0 border-l-0 border border-gray-300 flex items-center"
on:click={() => handleAppClick(APPS_CONSTANTS.APPS.LIVE_CHAT)}
>
<SendAlt size={24} class="carbon-icon" />
<span class="ml-1">{$lesson.comments}</span>
+3 -5
View File
@@ -75,11 +75,9 @@
});
});
$: {
students = isStudent
? $group.people.filter((person) => !!person.profile && person.profile.id === $profile.id)
: $group.people.filter((person) => !!person.profile && person.role_id === ROLE.STUDENT);
}
$: students = isStudent
? $group.people.filter((person) => !!person.profile && person.profile.id === $profile.id)
: $group.people.filter((person) => !!person.profile && person.role_id === ROLE.STUDENT);
</script>
<CourseContainer bind:isStudent>
@@ -1,5 +1,6 @@
<script>
import OrgSettings from '$lib/components/Org/Settings/index.svelte';
import ViewSiteBtn from '$lib/components/Buttons/VisitOrgSite.svelte';
</script>
<svelte:head>
@@ -10,6 +11,8 @@
<div class="py-10 px-5">
<div class="flex items-center justify-between mb-10">
<h1 class="dark:text-white text-3xl font-bold">Settings</h1>
<ViewSiteBtn />
</div>
<OrgSettings />