diff --git a/nextjs/src/app/course/[courseName]/calendar/CalendarWeek.tsx b/nextjs/src/app/course/[courseName]/calendar/CalendarWeek.tsx index ba5ee65..8b9f47d 100644 --- a/nextjs/src/app/course/[courseName]/calendar/CalendarWeek.tsx +++ b/nextjs/src/app/course/[courseName]/calendar/CalendarWeek.tsx @@ -1,6 +1,6 @@ "use client"; import { useLocalCourseSettingsQuery } from "@/hooks/localCourse/localCoursesHooks"; -import { getDateFromStringOrThrow } from "@/models/local/timeUtils"; +import { getDateFromStringOrThrow } from "@/models/local/utils/timeUtils"; import { getWeekNumber } from "./calendarMonthUtils"; import Day from "./day/Day"; diff --git a/nextjs/src/app/course/[courseName]/calendar/CourseCalendar.tsx b/nextjs/src/app/course/[courseName]/calendar/CourseCalendar.tsx index 33429ef..4650487 100644 --- a/nextjs/src/app/course/[courseName]/calendar/CourseCalendar.tsx +++ b/nextjs/src/app/course/[courseName]/calendar/CourseCalendar.tsx @@ -1,5 +1,5 @@ "use client"; -import { getDateFromStringOrThrow } from "@/models/local/timeUtils"; +import { getDateFromStringOrThrow } from "@/models/local/utils/timeUtils"; import { getMonthsBetweenDates } from "./calendarMonthUtils"; import { CalendarMonth } from "./CalendarMonth"; import { useLocalCourseSettingsQuery } from "@/hooks/localCourse/localCoursesHooks"; diff --git a/nextjs/src/app/course/[courseName]/calendar/calendarMonthUtils.ts b/nextjs/src/app/course/[courseName]/calendar/calendarMonthUtils.ts index 256b8a8..aba9d26 100644 --- a/nextjs/src/app/course/[courseName]/calendar/calendarMonthUtils.ts +++ b/nextjs/src/app/course/[courseName]/calendar/calendarMonthUtils.ts @@ -1,7 +1,7 @@ import { dateToMarkdownString, getDateFromStringOrThrow, -} from "@/models/local/timeUtils"; +} from "@/models/local/utils/timeUtils"; export interface CalendarMonthModel { year: number; diff --git a/nextjs/src/app/course/[courseName]/calendar/day/Day.tsx b/nextjs/src/app/course/[courseName]/calendar/day/Day.tsx index d6c3309..8cf2161 100644 --- a/nextjs/src/app/course/[courseName]/calendar/day/Day.tsx +++ b/nextjs/src/app/course/[courseName]/calendar/day/Day.tsx @@ -2,7 +2,7 @@ import { getDateFromStringOrThrow, getDateOnlyMarkdownString, -} from "@/models/local/timeUtils"; +} from "@/models/local/utils/timeUtils"; import { useDraggingContext } from "../../context/drag/draggingContext"; import { useLocalCourseSettingsQuery } from "@/hooks/localCourse/localCoursesHooks"; import { getDayOfWeek } from "@/models/local/localCourseSettings"; diff --git a/nextjs/src/app/course/[courseName]/calendar/day/DayTitle.tsx b/nextjs/src/app/course/[courseName]/calendar/day/DayTitle.tsx index 83b0fac..76766e7 100644 --- a/nextjs/src/app/course/[courseName]/calendar/day/DayTitle.tsx +++ b/nextjs/src/app/course/[courseName]/calendar/day/DayTitle.tsx @@ -5,7 +5,7 @@ import { useCourseContext } from "../../context/courseContext"; import NewItemForm from "../../modules/NewItemForm"; import { DraggableItem } from "../../context/drag/draggingContext"; import { useDragStyleContext } from "../../context/drag/dragStyleContext"; -import { getLectureForDay } from "@/models/local/lectureUtils"; +import { getLectureForDay } from "@/models/local/utils/lectureUtils"; import { useLecturesSuspenseQuery } from "@/hooks/localCourse/lectureHooks"; export function DayTitle({ day, dayAsDate }: { day: string; dayAsDate: Date }) { diff --git a/nextjs/src/app/course/[courseName]/calendar/day/getStatus.tsx b/nextjs/src/app/course/[courseName]/calendar/day/getStatus.tsx index c32d3d7..a60f0a1 100644 --- a/nextjs/src/app/course/[courseName]/calendar/day/getStatus.tsx +++ b/nextjs/src/app/course/[courseName]/calendar/day/getStatus.tsx @@ -8,7 +8,7 @@ import { LocalQuiz } from "@/models/local/quiz/localQuiz"; import { dateToMarkdownString, getDateFromStringOrThrow, -} from "@/models/local/timeUtils"; +} from "@/models/local/utils/timeUtils"; import { markdownToHTMLSafe } from "@/services/htmlMarkdownUtils"; import { htmlIsCloseEnough } from "@/services/utils/htmlIsCloseEnough"; import { ReactNode } from "react"; diff --git a/nextjs/src/app/course/[courseName]/calendar/day/useTodaysItems.tsx b/nextjs/src/app/course/[courseName]/calendar/day/useTodaysItems.tsx index 0bcc630..05dd137 100644 --- a/nextjs/src/app/course/[courseName]/calendar/day/useTodaysItems.tsx +++ b/nextjs/src/app/course/[courseName]/calendar/day/useTodaysItems.tsx @@ -8,7 +8,7 @@ import { LocalQuiz } from "@/models/local/quiz/localQuiz"; import { getDateFromStringOrThrow, getDateOnlyMarkdownString, -} from "@/models/local/timeUtils"; +} from "@/models/local/utils/timeUtils"; import { ReactNode } from "react"; import { useCalendarItemsContext } from "../../context/calendarItemsContext"; import { getStatus } from "./getStatus"; diff --git a/nextjs/src/app/course/[courseName]/context/CalendarItemsContextProvider.tsx b/nextjs/src/app/course/[courseName]/context/CalendarItemsContextProvider.tsx index 42c47e5..95cdc51 100644 --- a/nextjs/src/app/course/[courseName]/context/CalendarItemsContextProvider.tsx +++ b/nextjs/src/app/course/[courseName]/context/CalendarItemsContextProvider.tsx @@ -6,7 +6,7 @@ import { import { getDateFromStringOrThrow, getDateOnlyMarkdownString, -} from "@/models/local/timeUtils"; +} from "@/models/local/utils/timeUtils"; import { useAllCourseDataQuery } from "@/hooks/localCourse/localCourseModuleHooks"; import { trpc } from "@/services/serverFunctions/trpcClient"; diff --git a/nextjs/src/app/course/[courseName]/context/drag/getNewLockDate.ts b/nextjs/src/app/course/[courseName]/context/drag/getNewLockDate.ts index 3e614a1..130f287 100644 --- a/nextjs/src/app/course/[courseName]/context/drag/getNewLockDate.ts +++ b/nextjs/src/app/course/[courseName]/context/drag/getNewLockDate.ts @@ -1,5 +1,5 @@ "use client"; -import { getDateFromStringOrThrow, dateToMarkdownString } from "@/models/local/timeUtils"; +import { getDateFromStringOrThrow, dateToMarkdownString } from "@/models/local/utils/timeUtils"; export function getNewLockDate( diff --git a/nextjs/src/app/course/[courseName]/context/drag/useItemDropOnDay.ts b/nextjs/src/app/course/[courseName]/context/drag/useItemDropOnDay.ts index b213c10..a50adf6 100644 --- a/nextjs/src/app/course/[courseName]/context/drag/useItemDropOnDay.ts +++ b/nextjs/src/app/course/[courseName]/context/drag/useItemDropOnDay.ts @@ -8,18 +8,17 @@ import { useLocalCourseSettingsQuery } from "@/hooks/localCourse/localCoursesHoo import { useUpdatePageMutation } from "@/hooks/localCourse/pageHooks"; import { LocalAssignment } from "@/models/local/assignment/localAssignment"; import { Lecture } from "@/models/local/lecture"; -import { getLectureForDay } from "@/models/local/lectureUtils"; +import { getLectureForDay } from "@/models/local/utils/lectureUtils"; import { LocalCoursePage } from "@/models/local/page/localCoursePage"; import { LocalQuiz } from "@/models/local/quiz/localQuiz"; import { getDateFromStringOrThrow, getDateOnlyMarkdownString, dateToMarkdownString, -} from "@/models/local/timeUtils"; +} from "@/models/local/utils/timeUtils"; import { Dispatch, SetStateAction, useCallback, DragEvent } from "react"; import { DraggableItem } from "./draggingContext"; import { getNewLockDate } from "./getNewLockDate"; -import { trpc } from "@/services/serverFunctions/trpcClient"; import { useUpdateQuizMutation } from "@/hooks/localCourse/quizHooks"; import { useCourseContext } from "../courseContext"; diff --git a/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/EditLectureTitle.tsx b/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/EditLectureTitle.tsx index 1637340..9c7d542 100644 --- a/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/EditLectureTitle.tsx +++ b/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/EditLectureTitle.tsx @@ -1,6 +1,6 @@ import { useLocalCourseSettingsQuery } from "@/hooks/localCourse/localCoursesHooks"; import { getDayOfWeek } from "@/models/local/localCourseSettings"; -import { getDateFromString } from "@/models/local/timeUtils"; +import { getDateFromString } from "@/models/local/utils/timeUtils"; import { getLectureWeekName } from "@/services/fileStorage/utils/lectureUtils"; import { getCourseUrl, getLecturePreviewUrl } from "@/services/urlUtils"; import { useCourseContext } from "../../context/courseContext"; diff --git a/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/page.tsx b/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/page.tsx index 77c3801..e7ca519 100644 --- a/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/page.tsx +++ b/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/page.tsx @@ -2,7 +2,7 @@ import EditLecture from "./EditLecture"; import { getDateFromStringOrThrow, getDateOnlyMarkdownString, -} from "@/models/local/timeUtils"; +} from "@/models/local/utils/timeUtils"; export default async function page({ params, diff --git a/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/preview/page.tsx b/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/preview/page.tsx index 53ad0f6..7332b71 100644 --- a/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/preview/page.tsx +++ b/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/preview/page.tsx @@ -1,7 +1,7 @@ import { getDateFromStringOrThrow, getDateOnlyMarkdownString, -} from "@/models/local/timeUtils"; +} from "@/models/local/utils/timeUtils"; import LecturePreviewPage from "./LecturePreviewPage"; export default async function Page({ diff --git a/nextjs/src/app/course/[courseName]/modules/ExpandableModule.tsx b/nextjs/src/app/course/[courseName]/modules/ExpandableModule.tsx index 92d8e2e..2b95381 100644 --- a/nextjs/src/app/course/[courseName]/modules/ExpandableModule.tsx +++ b/nextjs/src/app/course/[courseName]/modules/ExpandableModule.tsx @@ -5,7 +5,7 @@ import { getDateFromString, getDateFromStringOrThrow, getDateOnlyMarkdownString, -} from "@/models/local/timeUtils"; +} from "@/models/local/utils/timeUtils"; import { Fragment } from "react"; import Modal, { useModal } from "../../../../components/Modal"; import NewItemForm from "./NewItemForm"; diff --git a/nextjs/src/app/course/[courseName]/modules/NewItemForm.tsx b/nextjs/src/app/course/[courseName]/modules/NewItemForm.tsx index e4628c7..d755819 100644 --- a/nextjs/src/app/course/[courseName]/modules/NewItemForm.tsx +++ b/nextjs/src/app/course/[courseName]/modules/NewItemForm.tsx @@ -8,14 +8,15 @@ import { useModuleNamesQuery } from "@/hooks/localCourse/localCourseModuleHooks" import { useLocalCourseSettingsQuery } from "@/hooks/localCourse/localCoursesHooks"; import { useCreatePageMutation } from "@/hooks/localCourse/pageHooks"; import { LocalAssignmentGroup } from "@/models/local/assignment/localAssignmentGroup"; -import { - dateToMarkdownString, - getDateFromString, - getDateFromStringOrThrow, -} from "@/models/local/timeUtils"; + import React, { useState } from "react"; import { useCourseContext } from "../context/courseContext"; import { useCreateQuizMutation } from "@/hooks/localCourse/quizHooks"; +import { + getDateFromString, + dateToMarkdownString, + getDateFromStringOrThrow, +} from "@/models/local/utils/timeUtils"; export default function NewItemForm({ moduleName: defaultModuleName, diff --git a/nextjs/src/app/course/[courseName]/settings/HolidayConfig.tsx b/nextjs/src/app/course/[courseName]/settings/HolidayConfig.tsx index 1fd352a..3bf6e0f 100644 --- a/nextjs/src/app/course/[courseName]/settings/HolidayConfig.tsx +++ b/nextjs/src/app/course/[courseName]/settings/HolidayConfig.tsx @@ -6,12 +6,12 @@ import { useLocalCourseSettingsQuery, useUpdateLocalCourseSettingsMutation, } from "@/hooks/localCourse/localCoursesHooks"; -import { getDateFromString } from "@/models/local/timeUtils"; +import { getDateFromString } from "@/models/local/utils/timeUtils"; import { useEffect, useState } from "react"; import { holidaysToString, parseHolidays, -} from "../../../../models/local/settingsUtils"; +} from "../../../../models/local/utils/settingsUtils"; import { settingsBox } from "./sharedSettings"; const exampleString = `springBreak: diff --git a/nextjs/src/app/course/[courseName]/settings/StartAndEndDate.tsx b/nextjs/src/app/course/[courseName]/settings/StartAndEndDate.tsx index dca93f5..6791aef 100644 --- a/nextjs/src/app/course/[courseName]/settings/StartAndEndDate.tsx +++ b/nextjs/src/app/course/[courseName]/settings/StartAndEndDate.tsx @@ -1,6 +1,6 @@ "use client"; import { useLocalCourseSettingsQuery } from "@/hooks/localCourse/localCoursesHooks"; -import { getDateOnlyMarkdownString } from "@/models/local/timeUtils"; +import { getDateOnlyMarkdownString } from "@/models/local/utils/timeUtils"; import React from "react"; import { settingsBox } from "./sharedSettings"; diff --git a/nextjs/src/app/todaysLectures/OneCourseLectures.tsx b/nextjs/src/app/todaysLectures/OneCourseLectures.tsx index 68e9cf7..ef17e0b 100644 --- a/nextjs/src/app/todaysLectures/OneCourseLectures.tsx +++ b/nextjs/src/app/todaysLectures/OneCourseLectures.tsx @@ -1,11 +1,11 @@ "use client"; -import { getDateOnlyMarkdownString } from "@/models/local/timeUtils"; import { getLecturePreviewUrl } from "@/services/urlUtils"; import Link from "next/link"; import { useCourseContext } from "../course/[courseName]/context/courseContext"; -import { getLectureForDay } from "@/models/local/lectureUtils"; import { useLecturesSuspenseQuery as useLecturesQuery } from "@/hooks/localCourse/lectureHooks"; +import { getLectureForDay } from "@/models/local/utils/lectureUtils"; +import { getDateOnlyMarkdownString } from "@/models/local/utils/timeUtils"; export default function OneCourseLectures() { const { courseName } = useCourseContext(); diff --git a/nextjs/src/app/todaysLectures/TodaysLectures.tsx b/nextjs/src/app/todaysLectures/TodaysLectures.tsx index 3cc9aca..e186ada 100644 --- a/nextjs/src/app/todaysLectures/TodaysLectures.tsx +++ b/nextjs/src/app/todaysLectures/TodaysLectures.tsx @@ -10,7 +10,6 @@ export default function TodaysLectures() { const [allSettings] = useLocalCoursesSettingsQuery(); return (