-
Notifications
You must be signed in to change notification settings - Fork 2
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 #132 from Onion-City/dev
Feat: 출석 정정 api 연결 & 멤버 출석 확인 페이지 & AuthBox을 InputBox에서 분리
- Loading branch information
Showing
19 changed files
with
426 additions
and
144 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import SetupMemberAttendamce from "@/features/member/list/SetupMemberAttendance"; | ||
|
||
export default function InfoAttendance () { | ||
return ( | ||
<SetupMemberAttendamce /> | ||
) | ||
} |
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 |
---|---|---|
@@ -1,8 +1,13 @@ | ||
import SignupComplete from "@/features/user/signup/components/SignupComplete"; | ||
import { Suspense } from "react"; | ||
|
||
const UserSignupComplete = () => { | ||
// 추가 회원가입 완료 페이지 | ||
return <SignupComplete />; | ||
return ( | ||
<Suspense fallback={<div>Loading...</div>}> | ||
<SignupComplete /> | ||
</Suspense> | ||
); | ||
} | ||
|
||
export default UserSignupComplete; |
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
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,49 @@ | ||
"use client"; | ||
import { HistoryHeader } from "@/components/organisms/Header"; | ||
import { Nav } from "@/components/organisms/Nav"; | ||
import { AttendanceHeader } from "@/features/info/attendance/components/AttendanceHeader"; | ||
import { AttendanceList } from "@/features/info/attendance/components/AttendanceList"; | ||
import useMemberAttendance from "@/hook/attendance/member/useMemberAttendance"; | ||
import { FormatClubId } from "@/utils/extractPathElements"; | ||
import { usePathname } from "next/navigation"; | ||
|
||
// 멤버 아이디로 조회할 수 있도록 수정하기 | ||
export default function SetupMemberAttendamce() { | ||
const pathName = usePathname(); | ||
const { refetchPeriodSchedule, attendances } = useMemberAttendance({ | ||
clubId: FormatClubId(), | ||
startDate: "2000-01-01", | ||
endDate: "2030-01-01", | ||
attendanceType: "TOTAL", | ||
memberId: parseInt(pathName.split("/")[3], 10), | ||
}); | ||
|
||
console.log(attendances); | ||
|
||
const filteredData = (attendanceType: string): number => { | ||
return ( | ||
attendances?.data?.attendanceList?.content?.filter( | ||
(el) => el.attendanceType === attendanceType | ||
).length || 0 | ||
); | ||
}; | ||
|
||
return ( | ||
<> | ||
<HistoryHeader title="출석 현황" /> | ||
<AttendanceHeader | ||
clubMemberName={attendances?.data?.memberName} | ||
attend={filteredData("출석")} | ||
absent={filteredData("공결")} | ||
miss={filteredData("결석")} | ||
refetchPeriodSchedule={refetchPeriodSchedule} | ||
/> | ||
{attendances && attendances.data && attendances.data.attendanceList ? ( | ||
<AttendanceList attendance={attendances.data.attendanceList.content} /> | ||
) : ( | ||
<div>Loading...</div> | ||
)} | ||
<Nav /> | ||
</> | ||
); | ||
} |
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
Oops, something went wrong.