diff --git a/backend/src/api/serializers.py b/backend/src/api/serializers.py index 906a7bf..aec894b 100644 --- a/backend/src/api/serializers.py +++ b/backend/src/api/serializers.py @@ -34,8 +34,7 @@ class Meta: class TicketSerializer(serializers.ModelSerializer): - professor = serializers.PrimaryKeyRelatedField( - queryset=Professor.prof.all()) + professor = serializers.PrimaryKeyRelatedField(queryset=Professor.prof.all()) course = serializers.PrimaryKeyRelatedField(queryset=Course.generic.all()) issue = serializers.PrimaryKeyRelatedField(queryset=Issues.generic.all()) # student = serializers.PrimaryKeyRelatedField( diff --git a/backend/src/api/views.py b/backend/src/api/views.py index 3c0e5c6..0a8eea4 100644 --- a/backend/src/api/views.py +++ b/backend/src/api/views.py @@ -21,8 +21,8 @@ MessageSerializer, ProfessorSerializer, SectionSerializer, - TicketSerializer, TicketGetSerializer, + TicketSerializer, UserSerializer, ) @@ -418,8 +418,7 @@ def get(self, request): sections = sections.filter(professor__in=query) if first_name := querystring.get("first-name"): - query = Professor.prof.filter( - first_name=first_name.capitalize()) + query = Professor.prof.filter(first_name=first_name.capitalize()) sections = sections.filter(professor__in=query) if modality := querystring.get("modality"): @@ -459,8 +458,7 @@ def get(self, request): if querystring: if department := querystring.get("department"): - courses = courses.filter( - course_department=self.sanitize(department)) + courses = courses.filter(course_department=self.sanitize(department)) if name := querystring.get("name"): courses = courses.filter(course_name=name) @@ -472,8 +470,7 @@ def get(self, request): courses = courses.filter(course_id=course_id) if course_id_contains := querystring.get("course-id-contains"): - courses = courses.filter( - course_id__contains=course_id_contains) + courses = courses.filter(course_id__contains=course_id_contains) if greater_than_code := querystring.get("higher-than"): courses = courses.filter(course_id__gt=greater_than_code) @@ -514,8 +511,7 @@ def get(self, request): if querystring: if department := querystring.get("department"): - users = users.filter( - course_department=self.sanitize(department)) + users = users.filter(course_department=self.sanitize(department)) if name := querystring.get("name"): users = users.filter(name=name) @@ -579,8 +575,7 @@ def get(self, request): if querystring: if department := querystring.get("department"): - users = users.filter( - course_department=self.sanitize(department)) + users = users.filter(course_department=self.sanitize(department)) if name := querystring.get("name"): users = users.filter(name=name) @@ -739,8 +734,7 @@ def get(self, request): query_string = self.get_querystring(request=request) if query_string: if professor_name := query_string.get("professor"): - professors = professors.filter( - full_name=self.sanitize(professor_name)) + professors = professors.filter(full_name=self.sanitize(professor_name)) if professor_id := query_string.get("id"): professors = professors.filter(professor_id=professor_id) if professor_first_name := query_string.get("first-name"): diff --git a/frontend-ts/.eslintignore b/frontend-ts/.eslintignore index c9c0913..198c793 100644 --- a/frontend-ts/.eslintignore +++ b/frontend-ts/.eslintignore @@ -1,3 +1,5 @@ # This is a typescript project. The only files that are JS files are # the test files from Jest **/*.js +*.js +js diff --git a/frontend-ts/.eslintrc.cjs b/frontend-ts/.eslintrc.cjs index 3b83286..63cd8d1 100644 --- a/frontend-ts/.eslintrc.cjs +++ b/frontend-ts/.eslintrc.cjs @@ -7,7 +7,7 @@ module.exports = { "plugin:@typescript-eslint/recommended", "plugin:react-hooks/recommended", ], - ignorePatterns: ["dist", ".eslintrc.cjs"], + ignorePatterns: ["dist", ".eslintrc.cjs", "*.js", "**/*.js", "data/"], parser: "@typescript-eslint/parser", plugins: ["react-refresh"], rules: { diff --git a/frontend-ts/.prettierignore b/frontend-ts/.prettierignore index 5963433..0cb528f 100644 --- a/frontend-ts/.prettierignore +++ b/frontend-ts/.prettierignore @@ -1,2 +1,5 @@ # Ignore useless json formatting **/*.json +# Ignore js files +**/*.js +*.js diff --git a/frontend-ts/index.html b/frontend-ts/index.html index 4bb23cd..4a61806 100644 --- a/frontend-ts/index.html +++ b/frontend-ts/index.html @@ -1,18 +1,16 @@ +
+ + + + + +