diff --git a/src/components/SearchComponent/SearchComponent.tsx b/src/components/SearchComponent/SearchComponent.tsx index 4c19055..943d0d0 100644 --- a/src/components/SearchComponent/SearchComponent.tsx +++ b/src/components/SearchComponent/SearchComponent.tsx @@ -216,6 +216,17 @@ const SearchComponent: React.FC = ({ searchOptions, setSea placeholder="担当教員名" /> +
+

+ + setSearchOptions({ ...searchOptions, subjectCode: e.target.value })} + placeholder="例: CC2(教育学部第二類)" + /> +
diff --git a/src/components/TableView/TableView.tsx b/src/components/TableView/TableView.tsx index dc2283a..7b49931 100644 --- a/src/components/TableView/TableView.tsx +++ b/src/components/TableView/TableView.tsx @@ -20,7 +20,7 @@ function TableView({ searchOptions }: TableViewProps) { const [isTableRaw, setIsTableRaw] = useState(false); - const defaultMaxNumberOfSubjectsToShow = 100; + const defaultMaxNumberOfSubjectsToShow = 1000; const [maxNumberOfSubjectsToShow, setMaxNumberOfSubjectsToShow] = useState(defaultMaxNumberOfSubjectsToShow); const handleMaxSubjectsChange = (event: React.ChangeEvent) => { const value = parseInt(event.target.value, 10); diff --git a/src/components/Timetable/Timetable.css b/src/components/Timetable/Timetable.css index d593da6..e2e29fa 100644 --- a/src/components/Timetable/Timetable.css +++ b/src/components/Timetable/Timetable.css @@ -17,15 +17,17 @@ /* より具体的なセレクタを使用 */ /* TODO: !importantの使用をやめる */ .term-selected { - background-color: #4CAF50 !important; + /* background-color: #4CAF50 !important; */ + background-color: var(--momiji-color) !important; color: white !important; } .class-objects>div { position: absolute; font-size: 0.5em; - border-color: #ccc; - border-style: solid; + border-radius: 5px; + border: 1px solid rgba(220, 220, 220, 0.4); + box-sizing: border-box; } @@ -55,7 +57,8 @@ bottom: 10px; right: 10px; border: 1px solid #ccc; - opacity: 0.85; + opacity: 0.95; + background-color: #ccc; } .timetable-window .toggle-button { diff --git a/src/components/Timetable/Timetable.tsx b/src/components/Timetable/Timetable.tsx index 6560869..079921c 100644 --- a/src/components/Timetable/Timetable.tsx +++ b/src/components/Timetable/Timetable.tsx @@ -115,10 +115,10 @@ const Timetable = () => {
@@ -136,11 +136,11 @@ const Timetable = () => {
{subject2Map[subjectCode]["授業科目名"]} diff --git a/src/search/index.ts b/src/search/index.ts index 17a8a81..39cc435 100644 --- a/src/search/index.ts +++ b/src/search/index.ts @@ -46,7 +46,8 @@ export const initialSearchOptions: SearchOptions = { courseType: "学部", language: "指定なし", rishuNenji: "指定なし", - rishuNenjiFilter: "以下" + rishuNenjiFilter: "以下", + subjectCode: "", }; // 検索条件で絞り込んだ科目のリスト(講義コードのリスト)を返す @@ -69,7 +70,8 @@ function matchesSearchOptions(subject: Subject2, searchOptions: SearchOptions, b matchesBookmark(subject, searchOptions, bookmarkedSubjects) && matchesCourseType(subject, searchOptions) && matchesLanguage(subject, searchOptions) && - matchesRishuNenji(subject, searchOptions); + matchesRishuNenji(subject, searchOptions) && + matchesSubjectCode(subject, searchOptions); } @@ -169,3 +171,7 @@ function matchesRishuNenji(subject: Subject2, searchOptions: SearchOptions): boo searchOptions.rishuNenjiFilter === "以下" && subject["履修年次"] <= searchOptions.rishuNenji || searchOptions.rishuNenjiFilter === "のみ" && subject["履修年次"] == searchOptions.rishuNenji; } + +function matchesSubjectCode(subject: Subject2, searchOptions: SearchOptions): boolean { + return subject["講義コード"].startsWith(searchOptions.subjectCode); +} \ No newline at end of file diff --git a/src/types/search.ts b/src/types/search.ts index a56a11d..bb678dc 100644 --- a/src/types/search.ts +++ b/src/types/search.ts @@ -30,4 +30,5 @@ export interface SearchOptions { language: Language | "指定なし" rishuNenji: number | "指定なし" rishuNenjiFilter: "以下" | "のみ" + subjectCode: string }