diff --git a/backend/routes/Schemas/user_visual_new.js b/backend/routes/Schemas/user_visual_new.js
index f88bdf8f4..c928854de 100644
--- a/backend/routes/Schemas/user_visual_new.js
+++ b/backend/routes/Schemas/user_visual_new.js
@@ -6,6 +6,7 @@ const Profile_Schema = new Schema({
account: { type: String, required: true, lowercase: true },
username: { type: String, required: true },
nickname: String,
+ advisingProfessor: [{ label: String, value: String }],
profile: String,
major: String,
double_major: String,
@@ -44,6 +45,7 @@ Profile_Schema.statics.smartQuery = function (keywords) {
{ account: reg },
{ username: reg },
{ nickname: reg },
+ { advisingProfessor: reg },
{ profile: reg },
{ major: reg },
{ double_major: reg },
@@ -71,6 +73,7 @@ Profile_Schema.methods.getPublic = function () {
account,
username,
nickname,
+ advisingProfessor,
profile,
major,
double_major,
@@ -92,6 +95,7 @@ Profile_Schema.methods.getPublic = function () {
account,
username,
nickname,
+ advisingProfessor,
profile,
major,
double_major,
diff --git a/backend/routes/srcs/in/profile_new/searchProfile.js b/backend/routes/srcs/in/profile_new/searchProfile.js
index a746fc958..6ac0d6368 100644
--- a/backend/routes/srcs/in/profile_new/searchProfile.js
+++ b/backend/routes/srcs/in/profile_new/searchProfile.js
@@ -62,6 +62,7 @@ const srhProfile = async function (req, res, next) {
account,
username,
nickname,
+ advisingProfessor,
profile,
publicEmail,
cellphone,
@@ -80,6 +81,7 @@ const srhProfile = async function (req, res, next) {
account,
username,
nickname,
+ advisingProfessor,
profile,
publicEmail,
cellphone,
@@ -122,6 +124,7 @@ const rules = [
'account',
'username',
'nickname',
+ 'advisingProfessor',
'profile',
'publicEmail',
'cellphone',
diff --git a/backend/routes/srcs/in/profile_new/updateProfile.js b/backend/routes/srcs/in/profile_new/updateProfile.js
index 66ecfc5e5..09ff96eb4 100644
--- a/backend/routes/srcs/in/profile_new/updateProfile.js
+++ b/backend/routes/srcs/in/profile_new/updateProfile.js
@@ -47,6 +47,7 @@ const updateProfile = async (req, res, next) => {
const query = ({
username,
nickname,
+ advisingProfessor,
profile,
publicEmail,
cellphone,
@@ -62,6 +63,7 @@ const updateProfile = async (req, res, next) => {
doctor,
Occupation,
} = req.body)
+ query.advisingProfessor = JSON.parse(query.advisingProfessor)
query['userimage'] = parseFile(req.file)
const toSet = updateQuery(query)
console.log('toSet', toSet)
@@ -84,6 +86,7 @@ const rules = [
'account',
'username',
'nickname',
+ 'advisingProfessor',
'profile',
'publicEmail',
'cellphone',
diff --git a/client/package.json b/client/package.json
index ca41c9bf0..121f0b64c 100644
--- a/client/package.json
+++ b/client/package.json
@@ -59,6 +59,7 @@
"react-redux": "^7.2.4",
"react-router-dom": "^5.2.0",
"react-router-hash-link": "^2.4.3",
+ "react-select": "^5.7.4",
"react-tooltip": "^4.2.21",
"react-tsparticles": "^1.39.0",
"react-vertical-timeline-component": "^3.3.3",
diff --git a/client/src/layout/DefaultLayout.js b/client/src/layout/DefaultLayout.js
index 48737c320..d163b0f1a 100644
--- a/client/src/layout/DefaultLayout.js
+++ b/client/src/layout/DefaultLayout.js
@@ -1,46 +1,59 @@
import React, { useState, useEffect } from 'react'
-import { useLocation } from 'react-router-dom'
+import { Link, useLocation } from 'react-router-dom'
import { useSelector } from 'react-redux'
import { selectLogin } from '../slices/loginSlice'
import { AppContent, AppSidebar, AppFooter, AppHeader } from '../components/index'
import { CModal, CModalHeader, CModalTitle, CModalBody, CModalFooter, CButton } from '@coreui/react'
+import axios from 'axios'
const DefaultLayout = () => {
const pathname = useLocation().pathname.split('/')[1]
const { isLogin } = useSelector(selectLogin)
- const noModal = ['forget', 'register_entry', 'reset_password', 'change_password']
+ const noModal = [
+ 'edit_profile',
+ 'profile',
+ 'forget',
+ 'register_entry',
+ 'reset_password',
+ 'change_password',
+ ]
const [isModal, setIsModal] = useState(false)
useEffect(() => {
- setIsModal(!noModal.includes(pathname) && isLogin)
+ if (isLogin) {
+ axios
+ .get('api/profile')
+ .then((res) => {
+ if (res.data.advisingProfessor.length) {
+ setIsModal(false)
+ } else {
+ setIsModal(!noModal.includes(pathname))
+ }
+ })
+ .catch((err) => {
+ console.log(err)
+ })
+ } else {
+ setIsModal(false)
+ }
}, [isLogin])
return (
<>
- {/* setIsModal(false)} alignment="center">
+ setIsModal(false)} alignment="center">
setIsModal(false)}>
- 注意!
+ 請大家去新增專題教授
- 為了資安的考量,請您先至此網址更改密碼。
+ EE+推出新功能,讓大家可以在上面登錄自己跟過的專題教授啦~
+ 請點擊下方按鈕新增您跟過的專題教授吧!
- {
- setIsModal(false)
- }}
- >
- 我更改過密碼了!
-
- {
- setIsModal(false)
- }}
- >
- 我是新註冊的帳號!
+ setIsModal(false)}>
+
+ 立即填寫
+
- */}
+
diff --git a/client/src/views/in/material/Medium.js b/client/src/views/in/material/Medium.js
index d3781ea81..53eb7dc46 100644
--- a/client/src/views/in/material/Medium.js
+++ b/client/src/views/in/material/Medium.js
@@ -1,25 +1,6 @@
import React, { useState } from 'react'
import { CCollapse } from '@coreui/react'
import CIcon from '@coreui/icons-react'
-
-// B03
-// 許秉鈞 2019 Fall CS M.S. 經驗分享(上篇:經驗傳承), 2019 Fall CS M.S. 經驗分享(下篇:顛覆印象)
-// 許凱傑 EE Ph.D. Application https://medium.com/phd-in-america/introduction-b80879fe10e6
-// 卓伯鴻 M.S. ECE/CS Applications https://jaycho2007.medium.com/m-s-ece-cs-applications-776098fca74e, 2021 SWE New Grad 找工雜談 https://jaycho2007.medium.com/2021-swe-new-grad-%E6%89%BE%E5%B7%A5%E9%9B%9C%E8%AB%87-816ce8b93677
-// 楊其昇 北美硬體 VLSI 找實習/正職心得 https://chisheny.medium.com/%E5%8C%97%E7%BE%8E%E7%A1%AC%E9%AB%94-vlsi-%E6%89%BE%E5%AF%A6%E7%BF%92-%E6%AD%A3%E8%81%B7%E5%BF%83%E5%BE%97-1960e0d2ed7a, UM ECE MS 兩年修課心得 https://chisheny.medium.com/um-ece-ms-%E5%85%A9%E5%B9%B4%E4%BF%AE%E8%AA%B2%E5%BF%83%E5%BE%97-f3e6e61a9a42
-// 孫凡耕 申請美國EE/CS PhD經驗分享(1)-總結、感想 https://medium.com/@sunfankeng/%E7%94%B3%E8%AB%8B%E7%BE%8E%E5%9C%8Bee-cs-phd%E7%B6%93%E9%A9%97%E5%88%86%E4%BA%AB-%E7%B8%BD%E7%B5%90-%E6%84%9F%E6%83%B3-%E6%84%9F%E8%AC%9D-959b8eccc3f0
-// 張博智 走點彎路的碩士申請(一):背景、動機 https://primesnow.medium.com/%E8%B5%B0%E9%BB%9E%E5%BD%8E%E8%B7%AF%E7%9A%84%E7%A2%A9%E5%A3%AB%E7%94%B3%E8%AB%8B-%E4%B8%80-%E8%83%8C%E6%99%AF-%E5%8B%95%E6%A9%9F-2260c537b520
-
-// B04
-// 莫絲羽 CMU Robotics MS 申請美國機器人相關碩士經驗分享 https://medium.com/momo%E7%9A%84%E6%A9%9F%E5%99%A8%E4%BA%BA%E7%95%99%E5%AD%B8%E5%A4%A2/%E7%94%B3%E8%AB%8B%E7%BE%8E%E5%9C%8B%E6%A9%9F%E5%99%A8%E4%BA%BA%E7%9B%B8%E9%97%9C%E7%A2%A9%E5%A3%AB%E5%BF%83%E5%BE%97%E5%88%86%E4%BA%AB-d85a519b1974
-// 吳倉永 2020 Fall 申請美國硬體 MS/MEng https://tywu13.medium.com/2020-fall-%E7%94%B3%E8%AB%8B%E7%BE%8E%E5%9C%8B%E7%A1%AC%E9%AB%94-ms-meng-4fee92a73bec, 2020 COVID19 北美找工作心得分享 https://tywu13.medium.com/2020-covid19-%E5%8C%97%E7%BE%8E%E6%89%BE%E5%B7%A5%E4%BD%9C%E5%BF%83%E5%BE%97%E5%88%86%E4%BA%AB-685731a4cda, 美國硬體工程師必勝面經 https://tywu13.medium.com/%E7%BE%8E%E5%9C%8B%E7%A1%AC%E9%AB%94%E5%B7%A5%E7%A8%8B%E5%B8%AB%E5%BF%85%E5%8B%9D%E9%9D%A2%E7%B6%93-c1a7423a9498
-
-// B05
-// 許秉倫 Open Source 開源社群的第一門課 | 如何成為 Apache Committer https://byronhsu1230.medium.com/open-source-%E9%96%8B%E6%BA%90%E7%A4%BE%E7%BE%A4%E7%9A%84%E7%AC%AC%E4%B8%80%E9%96%80%E8%AA%B2-%E5%A6%82%E4%BD%95%E6%88%90%E7%82%BA-apache-committer-451d42e853d6
-
-// B06
-// MikeWang 2022 Fall US CS Master 申請心得 https://medium.com/@mike_tcwang/2022-fall-us-cs-master-%E7%94%B3%E8%AB%8B%E5%BF%83%E5%BE%97-b0f9ccb23196?mibextid=Zxz2cZ
-
const Medium = () => {
const mediums = {
B03: [
@@ -139,6 +120,15 @@ const Medium = () => {
},
],
},
+ {
+ name: '謝承延',
+ materials: [
+ {
+ title: '北美CS申請: A Complete Guide to Enter Top CS Schools 申請心得',
+ link: 'https://medium.com/@chengyenhsieh0806/%E5%8C%97%E7%BE%8Ecs%E7%94%B3%E8%AB%8B-a-complete-guide-to-enter-top-cs-schools-66ea80396a4b',
+ },
+ ],
+ },
],
}
const [visibles, setVisibles] = useState({
diff --git a/client/src/views/in/profile/Profile.js b/client/src/views/in/profile/Profile.js
index 50909d631..8efa30ebc 100644
--- a/client/src/views/in/profile/Profile.js
+++ b/client/src/views/in/profile/Profile.js
@@ -145,6 +145,21 @@ const Profile = () => {
+
+
+ Advising Professor
+
+
+ {data.advisingProfessor.map((item, index) => {
+ return index === data.advisingProfessor.length - 1 ? (
+ {item.value}
+ ) : (
+ {item.value},
+ )
+ })}
+
+
+
diff --git a/client/src/views/in/profile/edit/EditProfile.js b/client/src/views/in/profile/edit/EditProfile.js
index 52decc3ce..ac7c074f1 100644
--- a/client/src/views/in/profile/edit/EditProfile.js
+++ b/client/src/views/in/profile/edit/EditProfile.js
@@ -15,6 +15,7 @@ import {
CListGroupItem,
CAvatar,
} from '@coreui/react'
+import Select from 'react-select'
import CIcon from '@coreui/icons-react'
import { Link, useHistory } from 'react-router-dom'
import ProfileImageEditor from './ProfileImageEditor'
@@ -44,8 +45,10 @@ const ProfileEdit = () => {
})
}
const handleSave = () => {
+ const newData = data
+ newData.advisingProfessor = JSON.stringify(data.advisingProfessor)
axios
- .patch('api/profile', data)
+ .patch('api/profile', newData)
.then((res) => {
alert(`completed`)
history.push(`/profile/${studentID}`)
@@ -76,6 +79,212 @@ const ProfileEdit = () => {
useEffect(() => {
getProfile()
}, [])
+ const chineseNames = [
+ '張時中',
+ '張子璿',
+ '張耀文',
+ '陳政維',
+ '陳景然',
+ '陳中平',
+ '陳和麟',
+ '陳宏銘',
+ '陳信樹',
+ '陳志宏',
+ '陳銘憲',
+ '陳士元',
+ '陳耀銘',
+ '陳怡然',
+ '陳永耀',
+ '鄭皓中',
+ '陳奕君',
+ '鄭宇翔',
+ '簡韶逸',
+ '邱奕鵬',
+ '闕志達',
+ '蔡永傑',
+ '周俊廷',
+ '周錫增',
+ '莊曜宇',
+ '鐘嘉德',
+ '鍾孝文',
+ '丁建均',
+ '傅立成',
+ '謝宏昀',
+ '許源浴',
+ '胡璧合',
+ '黃鐘揚',
+ '黃定洧',
+ '黃建璋',
+ '黃俊郎',
+ '黃念祖',
+ '黃寶儀',
+ '黃升龍',
+ '黃天偉',
+ '胡振國',
+ '江蕙如',
+ '江介宏',
+ '金藝璘',
+ '郭柏齡',
+ '郭斯彥',
+ '李翔傑',
+ '李心予',
+ '李宏毅',
+ '李君浩',
+ '李致毅',
+ '李泰成',
+ '雷欽隆',
+ '李建模',
+ '李俊興',
+ '李峻霣',
+ '李百祺',
+ '連豊力',
+ '廖婉君',
+ '林澤',
+ '林建中',
+ '林致廷',
+ '林啟萬',
+ '林清富',
+ '林恭如',
+ '林浩雄',
+ '林晃巖',
+ '林坤佑',
+ '林茂昭',
+ '林士駿',
+ '林宗賢',
+ '林宗男',
+ '林怡成',
+ '劉致為',
+ '劉智弘',
+ '劉志文',
+ '劉俊麟',
+ '劉浩澧',
+ '劉深淵',
+ '劉宗德',
+ '劉子毓',
+ '盧信嘉',
+ '呂良鴻',
+ '盧奕璋',
+ '毛明華',
+ '毛紹綱',
+ '彭隆瀚',
+ '馮世邁',
+ '蘇柏青',
+ '蘇國棟',
+ '蘇炫榮',
+ '孫啟光',
+ '孫紹華',
+ '宋孔彬',
+ '蔡睿哲',
+ '蔡坤諭',
+ '蔡志宏',
+ '曾雪峰',
+ '王凡',
+ '王暉',
+ '王奕翔',
+ '王倫',
+ '王勝德',
+ '王鈺強',
+ '魏安祺',
+ '魏宏宇',
+ '吳安宇',
+ '吳肇欣',
+ '吳志毅',
+ '吳忠幟',
+ '吳沛遠',
+ '吳瑞北',
+ '吳宗霖',
+ '吳育任',
+ '楊家驤',
+ '楊志忠',
+ '楊東霖',
+ '楊奕軒',
+ '葉丙成',
+ '顏嗣鈞',
+ '于天立',
+ '林則彬',
+ '陳君朋',
+ '陳良基',
+ '陳少傑',
+ '江明理',
+ '莊哲明',
+ '賴怡吉',
+ '李紋霞',
+ '林志達',
+ '駱明凌',
+ '潘正聖',
+ '沈上翔',
+ '王和盛',
+ '王帛霞',
+ '楊柏因',
+ '楊進順',
+ '李舉賢',
+ '張煋',
+ '朱燿衣',
+ '許照',
+ '楊維楨',
+ '白光弘',
+ '馬雲龍',
+ '陳秋發',
+ '于惠中',
+ '許振發',
+ '白光弘',
+ '馬雲龍',
+ '陳秋發',
+ '于惠中',
+ '許振發',
+ '黃鐘洺',
+ '馬志欽',
+ '吳炎培',
+ '劉群章',
+ '楊武純',
+ '李茂煇',
+ '馮武雄',
+ '吳建平',
+ '龐台銘',
+ '郭德盛',
+ '詹國禎',
+ '陳俊雄',
+ '張璞曾',
+ '莊晴光',
+ '李學智',
+ '馮蟻剛',
+ '吳靜雄',
+ '汪重光',
+ '陳秋麟',
+ '王維新',
+ '馮哲川',
+ '張帆人',
+ '許博文',
+ '林巍聳',
+ '陳光禎',
+ '陳德玉',
+ '楊英杰',
+ '曹建和',
+ '郭正邦',
+ '陳少傑',
+ '瞿大雄',
+ '呂學士',
+ '貝蘇章',
+ '張宏鈞',
+ '李嗣涔',
+ '江衍偉',
+ '曹恆偉',
+ '羅仁權',
+ '陳良基',
+ '鄭士康',
+ '李枝宏',
+ '李琳山',
+ '江簡富',
+ '賴飛羆',
+ '林本堅',
+ '王榮騰',
+ '張致恩',
+ ]
+ const formattedNames = chineseNames.map((name) => ({
+ value: name,
+ label: name,
+ }))
+
return data ? (
<>
@@ -229,6 +438,21 @@ const ProfileEdit = () => {
+
+
+ Advising Professor
+
+
+