diff --git a/.github/workflows/or-test.yml b/.github/workflows/or-test.yml index 98c6298..2707999 100644 --- a/.github/workflows/or-test.yml +++ b/.github/workflows/or-test.yml @@ -1,38 +1,38 @@ name: OR test on: - push: - branches: ['main', 'develop'] - pull_request: - types: [opened, synchronize] + push: + branches: ["main", "develop"] + pull_request: + types: [opened, synchronize] jobs: - build: - name: Build and Test - timeout-minutes: 15 - runs-on: ubuntu-latest - - steps: - - name: Check out code - uses: actions/checkout@v4 - with: - fetch-depth: 2 - - - uses: pnpm/action-setup@v3 - with: - version: 8 - - - name: Setup Node.js environment - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'pnpm' - - - name: Install dependencies - run: pnpm install - - - name: Build - run: pnpm --filter="./packages/*" --filter=or68 build - - - name: Test - run: pnpm --filter=or68 test + build: + name: Build and Test + timeout-minutes: 15 + runs-on: ubuntu-latest + + steps: + - name: Check out code + uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - uses: pnpm/action-setup@v3 + with: + version: 8 + + - name: Setup Node.js environment + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "pnpm" + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm --filter="./packages/*" --filter=or69 build + + - name: Test + run: pnpm --filter=or69 test diff --git a/src/app/(max-w)/calendar/page.tsx b/src/app/(max-w)/calendar/page.tsx index 63f10b2..f1321bd 100644 --- a/src/app/(max-w)/calendar/page.tsx +++ b/src/app/(max-w)/calendar/page.tsx @@ -107,7 +107,7 @@ export default function Page(): JSX.Element { ✨
👉

📣 กำหนดการการลงทะเบียนนิสิตใหม่ ภาคการศึกษาต้น - ปีการศึกษา 2568 ⚙️📚 [รหัส 68] + ปีการศึกษา 2569 ⚙️📚 [รหัส 69]

diff --git a/src/app/(max-w)/handbook/page.tsx b/src/app/(max-w)/handbook/page.tsx index da8374c..4a50119 100644 --- a/src/app/(max-w)/handbook/page.tsx +++ b/src/app/(max-w)/handbook/page.tsx @@ -10,12 +10,12 @@ import Handbook5 from '@/assets/images/handbook/handbook5.png'; function Header({ children }: { children: string }): JSX.Element { return (
-
-

+
+

{children}

-
+
); } @@ -23,7 +23,7 @@ function Header({ children }: { children: string }): JSX.Element { function Link({ href }: { href: string }): JSX.Element { return ( - +
@@ -49,7 +49,7 @@ export default function Handbook(): JSX.Element {
การตรวจสอบตารางเรียน
  1. - เข้าเว็บไซต์ {' '} + เข้าเว็บไซต์ {' '} เพื่อตรวจสอบตารางเรียน
  2. @@ -118,11 +118,11 @@ export default function Handbook(): JSX.Element {
    1. สำหรับกลุ่มรายวิชา ให้นิสิตเปลี่ยนคำว่า{' '} - + เท่านั้น {' '} เป็น{' '} - + G {' '} และใส่รหัสกลุ่มรายวิชาบริเวณสีแดง
      @@ -130,7 +130,7 @@ export default function Handbook(): JSX.Element {
    2. สำหรับรายวิชา EXP ENG I (5500111) ให้นิสิตกรอกตอนเรียนของตนเองหน้าช่อง{' '} - + เท่านั้น {' '} บริเวณสีน้ำเงินและเขียว ตามลำดับ
      diff --git a/src/app/(max-w)/layout.tsx b/src/app/(max-w)/layout.tsx index b1c8507..c059b50 100644 --- a/src/app/(max-w)/layout.tsx +++ b/src/app/(max-w)/layout.tsx @@ -2,7 +2,7 @@ import type { Metadata } from 'next'; import '@/styles/globals.css'; export const metadata: Metadata = { - title: 'OR68', + title: 'OR69', }; export default function RootLayout({ diff --git a/src/app/_page-active.tsx b/src/app/_page-active.tsx new file mode 100644 index 0000000..b892414 --- /dev/null +++ b/src/app/_page-active.tsx @@ -0,0 +1,81 @@ +'use client'; +import { useState } from 'react'; +import Image from 'next/image'; +import { ESCLogoWithText } from '@/components/esc'; +import { Button } from '@/components/ui/button'; +import { Input } from '@/components/ui/input'; +import { Label } from '@/components/ui/label'; +import { useToast } from '@/components/ui/use-toast'; +import { cn } from '@/lib/utils'; +import { useUser } from '@/contexts/user-context'; +import backgroundImage from '@/assets/backgrounds/imageBG.png'; +import LandingPageBG from '@/assets/backgrounds/landing-page-bg'; + +export default function LandingPage(): JSX.Element { + const { setUser, error } = useUser(); + const { toast } = useToast(); + const [studentId, setStudentId] = useState(''); + + const submitHandler = (e: React.FormEvent): void => { + e.preventDefault(); + + setUser(studentId); + if (error) { + toast({ + variant: 'destructive', + title: 'Uh oh! Something went wrong.', + description: error.message, + }); + } + }; + + return ( +
      +
      + +

      + ตรวจสอบตารางเรียน + และอาจารย์ที่ปรึกษา +  สำหรับนิสิตชั้นปีที่ 1 +

      +
      +
      + { + setStudentId(e.target.value); + }} + type='text' + value={studentId} + /> + +
      + +
      +
      +
      +
      + + +
      +
      +
      + ); +} diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 8d697af..98c48c0 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -8,7 +8,7 @@ import { UserProvider } from '@/contexts/user-context'; import '@/styles/globals.css'; export const metadata: Metadata = { - title: 'OR68', + title: 'OR69', }; export default function RootLayout({ diff --git a/src/app/page.tsx b/src/app/page.tsx index b892414..574e4a6 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,44 +1,51 @@ -'use client'; -import { useState } from 'react'; +// 'use client'; +// import { useState } from 'react'; import Image from 'next/image'; import { ESCLogoWithText } from '@/components/esc'; -import { Button } from '@/components/ui/button'; -import { Input } from '@/components/ui/input'; -import { Label } from '@/components/ui/label'; -import { useToast } from '@/components/ui/use-toast'; -import { cn } from '@/lib/utils'; -import { useUser } from '@/contexts/user-context'; +// import { Button } from '@/components/ui/button'; +// import { Input } from '@/components/ui/input'; +// import { Label } from '@/components/ui/label'; +// import { useToast } from '@/components/ui/use-toast'; +// import { cn } from '@/lib/utils'; +// import { useUser } from '@/contexts/user-context'; import backgroundImage from '@/assets/backgrounds/imageBG.png'; import LandingPageBG from '@/assets/backgrounds/landing-page-bg'; export default function LandingPage(): JSX.Element { - const { setUser, error } = useUser(); - const { toast } = useToast(); - const [studentId, setStudentId] = useState(''); + // const { setUser, error } = useUser(); + // const { toast } = useToast(); + // const [studentId, setStudentId] = useState(''); - const submitHandler = (e: React.FormEvent): void => { - e.preventDefault(); - - setUser(studentId); - if (error) { - toast({ - variant: 'destructive', - title: 'Uh oh! Something went wrong.', - description: error.message, - }); - } - }; + // const submitHandler = (e: React.FormEvent): void => { + // e.preventDefault(); + // + // setUser(studentId); + // if (error) { + // toast({ + // variant: 'destructive', + // title: 'Uh oh! Something went wrong.', + // description: error.message, + // }); + // } + // }; return (
      -
      +

      ตรวจสอบตารางเรียน และอาจารย์ที่ปรึกษา  สำหรับนิสิตชั้นปีที่ 1

      -
      + ขออภัยระบบยังไม่เปิดให้ใช้งาน
      + ระบบนี้จะเปิดให้ใช้งานในวันพบอาจารย์และลงทะเบียนเรียน (8 + กรกฎาคม 2569) เป็นต้นไป
      + หากระบบเปิดให้ใช้งานแล้วจะมีการแจ้งให้ทราบผ่านช่องทางต่าง ๆ + ของกวศ.อีกครั้ง +

      + {/* @@ -64,7 +71,7 @@ export default function LandingPage(): JSX.Element { -
      + */}
      diff --git a/src/utils/validator.ts b/src/utils/validator.ts index 2300907..490ddb2 100644 --- a/src/utils/validator.ts +++ b/src/utils/validator.ts @@ -1,6 +1,6 @@ export const validateStudentId = (studentId: string): boolean => { - // starts with "683", then digit exactly 5 times, ends with "21" - const pattern = /^683\d{5}21$/; + // starts with "693", then digit exactly 5 times, ends with "21" + const pattern = /^693\d{5}21$/; return pattern.test(studentId); }; diff --git a/wrangler.toml b/wrangler.toml index 6f5578b..39f1fc9 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -1,2 +1,2 @@ -compatibility_date = "2025-07-06" +compatibility_date = "2026-06-19" compatibility_flags = ["nodejs_compat"] \ No newline at end of file