From bf717a7020799a894ca46054a2c7c057f2534a35 Mon Sep 17 00:00:00 2001
From: Nutthapat Pongtanyavichai <59821765+leomotors@users.noreply.github.com>
Date: Fri, 7 Jun 2024 22:34:32 +0700
Subject: [PATCH 1/2] enable 2567
---
apps/web/src/common/constants/terms.ts | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/apps/web/src/common/constants/terms.ts b/apps/web/src/common/constants/terms.ts
index 6b2ac8161..4a925f231 100644
--- a/apps/web/src/common/constants/terms.ts
+++ b/apps/web/src/common/constants/terms.ts
@@ -5,6 +5,9 @@ interface TermOption {
}
export const termOptions: TermOption[] = [
+ { academicYear: '2567', semester: '3', label: '2567/ฤดูร้อน' },
+ { academicYear: '2567', semester: '2', label: '2567/2' },
+ { academicYear: '2567', semester: '1', label: '2567/1' },
{ academicYear: '2566', semester: '3', label: '2566/ฤดูร้อน' },
{ academicYear: '2566', semester: '2', label: '2566/2' },
{ academicYear: '2566', semester: '1', label: '2566/1' },
@@ -16,4 +19,4 @@ export const termOptions: TermOption[] = [
{ academicYear: '2564', semester: '1', label: '2564/1' },
]
-export const tempHardCodedCurrentTerm = termOptions[1]
+export const tempHardCodedCurrentTerm = termOptions[2]
From 40572a3a11d1535846b0daf2356692a36753eb03 Mon Sep 17 00:00:00 2001
From: Nutthapat Pongtanyavichai <59821765+leomotors@users.noreply.github.com>
Date: Sat, 8 Jun 2024 21:54:48 +0700
Subject: [PATCH 2/2] feat: 2567 warning
---
.changeset/dull-schools-doubt.md | 5 +++++
.../TopBar/components/AnnouncementBar/announcements.ts | 9 +++++++++
apps/web/src/common/components/TopBar/index.tsx | 3 ++-
3 files changed, 16 insertions(+), 1 deletion(-)
create mode 100644 .changeset/dull-schools-doubt.md
diff --git a/.changeset/dull-schools-doubt.md b/.changeset/dull-schools-doubt.md
new file mode 100644
index 000000000..c7d86bc15
--- /dev/null
+++ b/.changeset/dull-schools-doubt.md
@@ -0,0 +1,5 @@
+---
+"web": minor
+---
+
+feat: enable 2567 with warnings
diff --git a/apps/web/src/common/components/TopBar/components/AnnouncementBar/announcements.ts b/apps/web/src/common/components/TopBar/components/AnnouncementBar/announcements.ts
index 3c2ea782d..13d8b0c60 100644
--- a/apps/web/src/common/components/TopBar/components/AnnouncementBar/announcements.ts
+++ b/apps/web/src/common/components/TopBar/components/AnnouncementBar/announcements.ts
@@ -18,3 +18,12 @@ export function getNotRegChulaWarning(): AnnouncementItem {
severity: 'warning',
}
}
+
+export function term67Issue(): AnnouncementItem {
+ return {
+ id: 'term_67_issue',
+ label:
+ 'ข้อมูลของปีการศึกษา 2567 จะยังมีไม่ครบ เนื่องจากปัญหาของการเชื่อมต่อระหว่าง CU Get Reg กับเว็บไซต์ของทะเบียนจุฬาฯ ขออภัยในความไม่สะดวก',
+ severity: 'error',
+ }
+}
diff --git a/apps/web/src/common/components/TopBar/index.tsx b/apps/web/src/common/components/TopBar/index.tsx
index 34dde74ac..c12d5ae97 100644
--- a/apps/web/src/common/components/TopBar/index.tsx
+++ b/apps/web/src/common/components/TopBar/index.tsx
@@ -1,7 +1,7 @@
import { useRouter } from 'next/router'
import { AnnouncementBar } from './components/AnnouncementBar'
-import { getAnnouncement1, getNotRegChulaWarning } from './components/AnnouncementBar/announcements'
+import { getAnnouncement1, getNotRegChulaWarning, term67Issue } from './components/AnnouncementBar/announcements'
import { ConfigBar } from './components/ConfigBar'
import { ConfigBarLayout } from './components/ConfigBar/styled'
import { NavBar } from './components/NavBar'
@@ -13,6 +13,7 @@ export function AnnouncementSection() {
<>
+
>
)
}