-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from gdsc-ssu/dev
merge to main
- Loading branch information
Showing
138 changed files
with
6,825 additions
and
285 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"theme_color": "#1d9bf0", | ||
"background_color": "#1d9bf0", | ||
"display": "fullscreen", | ||
"scope": "/", | ||
"start_url": "/", | ||
"name": "\uc288\ub3c4\ube44", | ||
"short_name": "\uc288\ub3c4\ube44", | ||
"description": "\uc22d\uc2e4\ub300\ud559\uad50 \ub3c4\uc11c\uad00 \ube44\ub300\uba74 \uc608\uc57d \uc2dc\uc2a4\ud15c", | ||
"icons": [ | ||
{ | ||
"src": "icons/icon-192x192.png", | ||
"sizes": "192x192", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "icons/icon-384x384.png", | ||
"sizes": "384x384", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "icons/icon-512x512.png", | ||
"sizes": "512x512", | ||
"type": "image/png" | ||
} | ||
] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
declare module 'Mate' { | ||
export type StudentIdResponse = { | ||
id: number; | ||
name: string; | ||
memberNo: string; | ||
alternativeId: string; | ||
}; | ||
|
||
export type MateItemType = { | ||
name?: string; | ||
memberNo?: string; | ||
info: { | ||
name: string; | ||
sId: string; | ||
alternativeId: string; | ||
}; | ||
id: number; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { MateItemType } from 'Mate'; | ||
|
||
export type UsageType = '학습' | '회의' | '기타' | '수업'; | ||
|
||
export type Seminartype = '개방형 세미나실' | '세미나실'; | ||
|
||
export interface MyTemplate { | ||
uuid: string; | ||
title: string; | ||
day: string; | ||
time: number; | ||
usePerson: number; | ||
startTime: string; | ||
finishTime: string; | ||
people: Array<MateItemType>; | ||
seminarType: Seminartype; | ||
semina: number[]; | ||
type: UsageType; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
interface Room { | ||
id: number; | ||
name: string; | ||
useBeacon: boolean; | ||
checkKiosk: boolean; | ||
useDoorLock: boolean; | ||
checkAccessGate: boolean; | ||
checkAccessGPS: boolean; | ||
roomGeoLocationInfo: string | null; | ||
branchGroup: { | ||
id: number; | ||
name: string; | ||
}; | ||
floor: number; | ||
} | ||
|
||
interface RoomType { | ||
id: number; | ||
code: string; | ||
name: string; | ||
order: number; | ||
} | ||
|
||
interface Patron { | ||
name: string; | ||
} | ||
|
||
interface RoomReservationState { | ||
id: number; | ||
code: string; | ||
name: string; | ||
} | ||
|
||
export interface PatronInfo { | ||
name?: string; | ||
memberNo?: string; | ||
sId?: string; | ||
info?: { | ||
name: string; | ||
sId: string; | ||
}; | ||
} | ||
|
||
interface RoomUseSection { | ||
id: number; | ||
code: string; | ||
name: string; | ||
} | ||
|
||
export interface ReservationData { | ||
success: boolean; | ||
code: string; | ||
message: string; | ||
data: { | ||
totalCount: number; | ||
list: ReservationInfo[]; | ||
}; | ||
} | ||
|
||
interface ReservationInfo { | ||
id: number; | ||
room: Room; | ||
roomType: RoomType; | ||
patron: Patron; | ||
isMyReservation: boolean; | ||
beginTime: string; | ||
endTime: string; | ||
patronCount: number; | ||
patrons: PatronInfo[]; | ||
roomReservationState: RoomReservationState; | ||
equipments: Array<string>; // 데이터가 없어서 빈 배열로 설정 | ||
dateCreated: string; | ||
isEditable: boolean; | ||
renewableRemainingTime: number; | ||
renewalLimitCount: number; | ||
renewalTime: number; | ||
availableRenewal: boolean; | ||
isCheckInTime: boolean; | ||
checkInDateTime: string; | ||
roomUseSection: RoomUseSection; | ||
isAllDayOpen: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
declare module 'Template' { | ||
export type WeekdayShort = | ||
| 'Sun' | ||
| 'Mon' | ||
| 'Tue' | ||
| 'Wed' | ||
| 'Thu' | ||
| 'Fri' | ||
| 'Sat'; | ||
export type Patron = { | ||
name: string; | ||
sId: string; | ||
id?: string; | ||
memberNo?: string; | ||
info?: { | ||
name: string; | ||
sId: string; | ||
}; | ||
}; | ||
export type TemplateInfo = { | ||
// template 제목 | ||
title: string; | ||
day: WeekdayShort; | ||
// template 시작 시간, 끝나는 시간 | ||
beginTime: string; | ||
endTime: string; | ||
// template 장소 | ||
place: number; | ||
// template 메모 | ||
memo: string; | ||
// template 동반이용자 | ||
friends: Array<Patron>; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { ReservationData } from '@/@types/ReservationList'; | ||
import axios from 'axios'; | ||
|
||
export const getReservationData = async (AccessToken?: string) => { | ||
const apiUrl = `${process.env.NEXT_PUBLIC_RESERVATION_CHECK}`; | ||
const headers = { | ||
Accept: 'application/json, text/plain, */*', | ||
'pyxis-auth-token': `${AccessToken}`, //로그인 후 발급받은 토큰 | ||
}; | ||
|
||
const res = await axios.get<ReservationData>(apiUrl, { headers }); | ||
|
||
return res.data; | ||
}; | ||
|
||
export const postReservationCancel = async ( | ||
reserveId?: number, | ||
AccessToken?: string, | ||
) => { | ||
try { | ||
const apiUrl = `${process.env.NEXT_PUBLIC_RESERVATION_CHECK}/${reserveId}/cancel?_method=delete`; | ||
const headers = { | ||
Accept: 'application/json;charset=UTF-8', | ||
'pyxis-auth-token': `${AccessToken}`, //로그인 후 발급받은 토큰 | ||
}; | ||
|
||
// API 호출 | ||
await axios | ||
.post(apiUrl, null, { headers }) | ||
.then((res) => { | ||
console.log('res', res.data); | ||
}) | ||
.catch((error) => { | ||
console.error('Error fetching data:', error); | ||
}); | ||
} catch (error) { | ||
console.error('로그인 오류: ', error); | ||
} finally { | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Patron } from 'Template'; | ||
import { get } from './AxiosCreate'; | ||
import { StudentIdResponse } from 'Mate'; | ||
|
||
class StudentApi { | ||
getStudentId = async (info: Patron): Promise<StudentIdResponse> => { | ||
const res = await get<StudentIdResponse>( | ||
`/patrons/${info.name}/${info.sId}`, | ||
); | ||
return res; | ||
}; | ||
} | ||
|
||
export default StudentApi; |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.