Skip to content

Commit dd0e7a8

Browse files
committed
feat: add test book
1 parent 0b8b5ce commit dd0e7a8

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed
263 KB
Binary file not shown.

frontend/src/angular/src/app/book-import/book-import.component.ts

+29
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ export class BookImportComponent {
9191
.map((v, index) => chapterFormArray.at(index) as FormGroup)
9292
.map(chapterFg => ({startPage: chapterFg.controls[FormGroupKey.chapterStart].value,
9393
endPage: chapterFg.controls[FormGroupKey.chapterEnd].value } as ChapterPages));
94+
// for testing only
95+
//chapters = this.frankensteinChapters();
9496
formData.append('book', this.bookForm.controls[FormGroupKey.file].value)
9597
formData.append('chapters', JSON.stringify(chapters));
9698

@@ -102,4 +104,31 @@ export class BookImportComponent {
102104
});
103105
}
104106
}
107+
108+
private frankensteinChapters(): ChapterPages[] {
109+
let chapters = [{startPage: 17, endPage: 19} as ChapterPages];
110+
chapters.push({startPage: 20, endPage: 23} as ChapterPages);
111+
chapters.push({startPage: 24, endPage: 28} as ChapterPages);
112+
chapters.push({startPage: 34, endPage: 37} as ChapterPages);
113+
chapters.push({startPage: 38, endPage: 42} as ChapterPages);
114+
chapters.push({startPage: 43, endPage: 48} as ChapterPages);
115+
chapters.push({startPage: 49, endPage: 54} as ChapterPages);
116+
chapters.push({startPage: 55, endPage: 58} as ChapterPages);
117+
chapters.push({startPage: 59, endPage: 62} as ChapterPages);
118+
chapters.push({startPage: 63, endPage: 67} as ChapterPages);
119+
chapters.push({startPage: 68, endPage: 71} as ChapterPages);
120+
chapters.push({startPage: 72, endPage: 75} as ChapterPages);
121+
chapters.push({startPage: 76, endPage: 79} as ChapterPages);
122+
chapters.push({startPage: 80, endPage: 85} as ChapterPages);
123+
chapters.push({startPage: 86, endPage: 91} as ChapterPages);
124+
chapters.push({startPage: 92, endPage: 94} as ChapterPages);
125+
chapters.push({startPage: 95, endPage: 99} as ChapterPages);
126+
chapters.push({startPage: 100, endPage: 104} as ChapterPages);
127+
chapters.push({startPage: 105, endPage: 110} as ChapterPages);
128+
chapters.push({startPage: 111, endPage: 117} as ChapterPages);
129+
chapters.push({startPage: 118, endPage: 123} as ChapterPages);
130+
chapters.push({startPage: 124, endPage: 128} as ChapterPages);
131+
chapters.push({startPage: 129, endPage: 142} as ChapterPages);
132+
return chapters;
133+
}
105134
}

0 commit comments

Comments
 (0)