CLASSROOMIO-T-63: fixed the bug on create course using the query param
CLASSROOMIO-T-63:fixed pretttier config and saved
CLASSROOMIO-T-63:fixed prettier config
CLASSROOMIO-T-63:Fixed the create course function
CLASSROOMIO-T-63:updated the create course function
FIX:CLASROOMIO-T-63([BUG]On Create course click on dashboard){fixed the bug using the query parameter
Co-authored-by: Ifeanyi Nwosu <[email protected]>
Co-authored-by: emmanuel <[email protected]>
Merge-request: CLASSROOMIO-MR-17
Merged-by: Best Admin <[email protected]>
This commit is contained in:
committed by
Space Cloud
co-authored by
Ifeanyi Nwosu
parent
ddfbc17a35
commit
49dc34a660
@@ -4,12 +4,15 @@
|
|||||||
|
|
||||||
export async function preload(page, params) {
|
export async function preload(page, params) {
|
||||||
const parsedUser = JSON.parse(params.user);
|
const parsedUser = JSON.parse(params.user);
|
||||||
|
// if (page.query.create === 'true') {
|
||||||
|
// $createCourseModal.open = true;
|
||||||
|
// }
|
||||||
// if (parsedUser && parsedUser.id) {
|
// if (parsedUser && parsedUser.id) {
|
||||||
// return fetchCourses(parsedUser.id);
|
// return fetchCourses(parsedUser.id);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
page,
|
||||||
allCourses: [],
|
allCourses: [],
|
||||||
organizationId: null,
|
organizationId: null,
|
||||||
cantFetch: true,
|
cantFetch: true,
|
||||||
@@ -31,7 +34,11 @@
|
|||||||
|
|
||||||
export let allCourses = [];
|
export let allCourses = [];
|
||||||
export let cantFetch;
|
export let cantFetch;
|
||||||
|
export let page;
|
||||||
|
|
||||||
|
if (page.query.create === 'true') {
|
||||||
|
$createCourseModal.open = true;
|
||||||
|
}
|
||||||
async function getCourses(userId) {
|
async function getCourses(userId) {
|
||||||
if (process.browser) {
|
if (process.browser) {
|
||||||
if (cantFetch && typeof cantFetch === 'boolean' && !allCourses.length) {
|
if (cantFetch && typeof cantFetch === 'boolean' && !allCourses.length) {
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
import { InlineCalendar, Datepicker } from 'svelte-calendar';
|
import { InlineCalendar, Datepicker } from 'svelte-calendar';
|
||||||
import CheckmarkFilled20 from 'carbon-icons-svelte/lib/CheckmarkFilled20';
|
import CheckmarkFilled20 from 'carbon-icons-svelte/lib/CheckmarkFilled20';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
formatUserUpcomingData,
|
formatUserUpcomingData,
|
||||||
formatDate,
|
formatDate,
|
||||||
|
|||||||
Reference in New Issue
Block a user