ENCOA-277, ENCOA-276, ENCOA-282, ENCOA-283
This commit is contained in:
@@ -147,7 +147,8 @@ export const defaultSectionSettings = (module: Module, sectionId: number, part?:
|
||||
focusedExercise: undefined,
|
||||
expandedSubSections: [],
|
||||
levelGenerating: [],
|
||||
levelGenResults: []
|
||||
levelGenResults: [],
|
||||
scriptLoading: false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,7 +157,7 @@ const defaultModuleSettings = (module: Module, minTimer: number): ModuleState =>
|
||||
const state: ModuleState = {
|
||||
examLabel: defaultExamLabel(module),
|
||||
minTimer,
|
||||
difficulty: sample(["easy", "medium", "hard"] as Difficulty[])!,
|
||||
difficulty: sample(["A1", "A2", "B1", "B2", "C1", "C2"] as Difficulty[])!,
|
||||
isPrivate: false,
|
||||
sectionLabels: sectionLabels(module),
|
||||
expandedSections: [1],
|
||||
|
||||
@@ -6,7 +6,7 @@ import { reorderSection } from "../reorder/global";
|
||||
|
||||
export type SectionActions =
|
||||
| { type: 'UPDATE_SECTION_SINGLE_FIELD'; payload: { module: Module; sectionId: number; field: string; value: any } }
|
||||
| { type: 'UPDATE_SECTION_SETTINGS'; payload: { sectionId: number; module: Module; update: Partial<SectionSettings | ReadingSectionSettings>; } }
|
||||
| { type: 'UPDATE_SECTION_SETTINGS'; payload: { sectionId: number; module: Module; update: Partial<SectionSettings>; } }
|
||||
| { type: 'UPDATE_SECTION_STATE'; payload: { sectionId: number; module: Module; update: Partial<Section>; } }
|
||||
| { type: 'REORDER_EXERCISES'; payload: { event: DragEndEvent, module: Module; sectionId: number; } };
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Difficulty, InteractiveSpeakingExercise, LevelPart, ListeningPart, ReadingPart, SpeakingExercise, WritingExercise } from "@/interfaces/exam";
|
||||
import { Difficulty, InteractiveSpeakingExercise, LevelPart, ListeningPart, ReadingPart, Script, SpeakingExercise, WritingExercise } from "@/interfaces/exam";
|
||||
import { Module } from "@/interfaces";
|
||||
import Option from "@/interfaces/option";
|
||||
|
||||
@@ -36,6 +36,9 @@ export interface ListeningSectionSettings extends SectionSettings {
|
||||
isAudioGenerationOpen: boolean;
|
||||
listeningTopic: string;
|
||||
isListeningTopicOpen: boolean;
|
||||
uploadedAudioURL: string | undefined;
|
||||
audioCutURL: string | undefined;
|
||||
useEntireAudioFile: boolean;
|
||||
}
|
||||
|
||||
export interface WritingSectionSettings extends SectionSettings {
|
||||
@@ -90,7 +93,7 @@ export type ExamPart = ListeningPart | ReadingPart | LevelPart;
|
||||
|
||||
export interface SectionState {
|
||||
sectionId: number;
|
||||
settings: SectionSettings | ReadingSectionSettings;
|
||||
settings: SectionSettings;
|
||||
state: Section;
|
||||
expandedSubSections: number[];
|
||||
generating: Generating;
|
||||
@@ -102,6 +105,7 @@ export interface SectionState {
|
||||
speakingSection?: number;
|
||||
readingSection?: number;
|
||||
listeningSection?: number;
|
||||
scriptLoading: boolean;
|
||||
}
|
||||
|
||||
export interface ModuleState {
|
||||
|
||||
Reference in New Issue
Block a user