Skip to content

Commit 739a7f9

Browse files
authored
Merge branch 'main' into course-page2
2 parents 8fba695 + 637c00f commit 739a7f9

9 files changed

Lines changed: 379 additions & 8 deletions

File tree

my-app/package-lock.json

Lines changed: 263 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

my-app/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
},
1212
"dependencies": {
1313
"@tailwindcss/vite": "^4.0.17",
14+
"autoprefixer": "^10.4.21",
1415
"firebase": "^11.5.0",
1516
"ldrs": "^1.1.6",
1617
"mobx": "^6.13.7",
@@ -19,6 +20,7 @@
1920
"react": "^19.0.0",
2021
"react-dom": "^19.0.0",
2122
"react-router-dom": "^7.4.0",
23+
"reactflow": "^11.11.4",
2224
"tailwindcss": "^4.0.17"
2325
},
2426
"devDependencies": {

my-app/src/model.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ export const model = {
7777
);
7878
this.setCurrentSearch(searchResults);
7979
}
80-
};
80+
};

my-app/src/pages/App.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ function App() {
2727
);
2828
}
2929

30-
export default App;
30+
export default App;

my-app/src/presenters/UploadTranscriptPresenter.jsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const UploadTranscriptPresenter = observer(({ model }) => {
1313
const [fileInputValue, setFileInputValue] = useState(""); // Controls upload field state
1414

1515
async function transcriptScraperFunction(file) {
16-
console.log(file);
16+
//console.log(file);
1717
//const pdfjsLib = window['pdfjsLib'];
1818
//pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.16.105/pdf.worker.min.js';
1919
if (!file) {
@@ -80,7 +80,7 @@ const UploadTranscriptPresenter = observer(({ model }) => {
8080

8181

8282
localStorage.setItem("completedCourses", JSON.stringify(newcodes));
83-
console.log(newcodes);
83+
//console.log(newcodes);
8484

8585
window.dispatchEvent(new Event("completedCourses changed"));
8686
}
@@ -125,7 +125,10 @@ const UploadTranscriptPresenter = observer(({ model }) => {
125125
if (!flagTableDone) {
126126
flagTable = true;
127127
} else {
128-
if (textObjects[i - 2].transform[4] !== 497.66899718999997) {
128+
if ((textObjects[i - 1].transform[4] !== 532.71801758)&&(textObjects[i - 11].transform[4] !== 532.71801758)) {
129+
//if its i-1, the page number is the object directly behind, otherwise if -11 its because theres some filter,
130+
//e.g. utskrift datum, personnummer and others. hopefully this should cover all base (probably doesn't)
131+
//this is a very hardcoded solution to this problem.
129132
//the new table (that is the new found "Kod" / "Code" is not because unexpected page break, therefore we are done transcribing
130133
//KTH courses, these are either uncomplete courses, or courses from other universities
131134
flagTable = false;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import React from 'react';
2+
3+
function PrerequisiteTree(props) {
4+
return (
5+
<div class ="flex ">
6+
7+
</div>
8+
);
9+
}
10+
11+
export default PrerequisiteTree;

0 commit comments

Comments
 (0)