Changeset 8d83180
- Timestamp:
- 10/11/22 15:41:16 (2 years ago)
- Branches:
- main
- Children:
- c68150f
- Parents:
- cae16b5
- Files:
-
- 7 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
reactapp/src/App.js
rcae16b5 r8d83180 6 6 import Home from "./Pages/Home"; 7 7 import UserDashboard from "./Pages/UserDashboard"; 8 import Subject from "./Pages/Subject"; 9 import University from "./Pages/University"; 10 import Faculty from "./Pages/Faculty"; 8 11 import { useEffect, useState, useMemo } from "react"; 9 12 import AuthApi from "./api/AuthApi"; … … 11 14 import axios from "./api/axios"; 12 15 import JSOG from "jsog"; 16 import NotFound from "./Pages/NotFound"; 13 17 14 18 export default function App() { … … 77 81 /> 78 82 </Route> 83 <Route path="university/:universityId" element={<University />} /> 84 <Route path="faculty/:facultyId" element={<Faculty />} /> 85 <Route path="subject/:subjectId" element={<Subject />} /> 79 86 <Route path="search" element={<SearchResults />}></Route> 80 87 <Route … … 87 94 ></Route> 88 95 </Route> 96 <Route path="*" element={<NotFound />} /> 89 97 </Routes> 90 98 </BrowserRouter> -
reactapp/src/Components/Styled/Main.style.js
rcae16b5 r8d83180 22 22 color: black; 23 23 `; 24 25 export const CurrentPageNav = styled.div` 26 font-style: italic; 27 font-size: 14px; 28 `; -
reactapp/src/Components/Styled/OpinionCard.style.js
rcae16b5 r8d83180 8 8 margin-bottom: 20px; 9 9 padding: 10px; 10 bo rder: 1px solid black;10 box-shadow: 2px 2px 10px #aaaaaa; 11 11 `; 12 12 -
reactapp/src/Components/Styled/ProfessorCard.style.js
rcae16b5 r8d83180 2 2 3 3 export const ProfessorCard = styled.div` 4 background-color: papayawhip;4 background-color: cornsilk; 5 5 width: auto; 6 6 padding: 10px; 7 7 margin-bottom: 30px; 8 margin-top: 140px;8 margin-top: 40px; 9 9 `; 10 10 -
reactapp/src/Pages/Professor.js
rcae16b5 r8d83180 23 23 import { useNavigate } from "react-router-dom"; 24 24 import axios from "../api/axios"; 25 import { CurrentPageNav } from "../Components/Styled/Main.style"; 25 26 26 27 function Professor(user, userLoaded) { … … 34 35 const [postTitle, setPostTitle] = useState(""); 35 36 const [postContent, setPostContent] = useState(""); 37 const [fetchError, setFetchError] = useState(false); 36 38 37 39 useEffect(() => { … … 47 49 setLoaded(true); 48 50 } catch (error) { 49 console.log("Fetching error", error);51 setFetchError(true); 50 52 } 51 53 }; … … 95 97 return ( 96 98 <div> 99 <CurrentPageNav> 100 »{" "} 101 <a href={"/university/" + professor.faculty.university.universityId}> 102 {professor.faculty.university.universityName} 103 </a>{" "} 104 »{" "} 105 <a href={"/faculty/" + professor.faculty.facultyId}> 106 {professor.faculty.facultyName} 107 </a>{" "} 108 » <a href="#">{professor.professorName}</a> 109 </CurrentPageNav> 97 110 <ProfessorCard> 98 111 <ProfessorCardName>{professor.professorName}</ProfessorCardName> … … 168 181 </div> 169 182 ); 170 } else {183 } else if (!fetchError) { 171 184 return ( 172 185 <div> … … 175 188 </div> 176 189 ); 190 } else { 191 return ( 192 <div style={{ marginTop: "140px" }}> 193 <h1 style={{ textAlign: "center" }}>Страницата не е пронајдена.</h1> 194 </div> 195 ); 177 196 } 178 197 } -
springapp/src/main/java/mk/profesori/springapp/Model/StudyProgramme.java
rcae16b5 r8d83180 16 16 17 17 import com.fasterxml.jackson.annotation.JsonIdentityInfo; 18 import com. fasterxml.jackson.annotation.ObjectIdGenerators;18 import com.voodoodyne.jackson.jsog.JSOGGenerator; 19 19 20 20 @Entity 21 21 @Table(name = "study_programme") 22 @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "studyProgrammeId")22 @JsonIdentityInfo(generator = JSOGGenerator.class) 23 23 public class StudyProgramme { 24 24 -
springapp/src/main/java/mk/profesori/springapp/Model/_Thread.java
rcae16b5 r8d83180 1 1 package mk.profesori.springapp.Model; 2 2 3 import java.time.LocalDateTime; 3 4 import java.util.ArrayList; 4 5 import java.util.List; … … 15 16 public class _Thread extends Post { 16 17 17 @Column(name = "tags") 18 @Column(name = "tags") // unused 18 19 @ElementCollection 19 20 private List<String> tags = new ArrayList<>(); … … 27 28 private Subject targetSubject; 28 29 29 // TODO threadovi 30 /* 31 * public _Thread(String title, String content, List<String> tags, Section 32 * parentSection, Subject targetSubject) { 33 * super(title, content); 34 * this.tags = tags; 35 * this.parentSection = parentSection; 36 * this.targetSubject = targetSubject; 37 * } 38 */ 30 // konstruktor so parent (koga e reply) 31 public _Thread(String title, String content, CustomUserDetails author, LocalDateTime timePosted, 32 LocalDateTime timeLastEdited, 33 Post parent, List<Post> children, Section parentSection, Subject targetSubject) { 34 super(title, content, author, timePosted, timeLastEdited, parent, children); 35 this.parentSection = parentSection; 36 this.targetSubject = targetSubject; 37 } 38 39 // konstruktor bez parent (koga NE e reply) 40 public _Thread(String title, String content, CustomUserDetails author, LocalDateTime timePosted, 41 LocalDateTime timeLastEdited, List<Post> children, Section parentSection, Subject targetSubject) { 42 super(title, content, author, timePosted, timeLastEdited, children); 43 this.parentSection = parentSection; 44 this.targetSubject = targetSubject; 45 } 39 46 40 47 // getters
Note:
See TracChangeset
for help on using the changeset viewer.