Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1facf23
update: kakao Login v2
iubns Jan 21, 2026
7145cf2
update: kakao login v1 to v2.7
iubns Jan 21, 2026
530d402
feat: 사용자 검색 기능 추가
gardener-soul Jan 24, 2026
d9e1431
fix: scroll and decleated pros
iubns Jan 24, 2026
ffe4308
feat: 사용자 검색 기능 추가
gardener-soul Jan 26, 2026
a0640ce
fix: 수련회 취소자 적용
iubns Jan 26, 2026
98fc4e2
Merge branch 'iubns'
iubns Jan 26, 2026
e369ad4
feat: kakao Login 개선 및 사용자 검색 기능 추가
gardener-soul Jan 26, 2026
023e2f0
fix: server url
iubns Jan 26, 2026
5296ac9
update: admin/graph
iubns Jan 26, 2026
5cf2b0e
Merge pull request #55 from nuon-dev/main
iubns Jan 26, 2026
f75390c
fix: port number
iubns Jan 26, 2026
6e28928
Merge pull request #56 from nuon-dev/main
iubns Jan 26, 2026
514d37c
fix: redirect url
iubns Jan 26, 2026
025229a
Merge pull request #57 from nuon-dev/main
iubns Jan 26, 2026
98e86f0
rm: DS_Store
iubns Jan 26, 2026
cfce461
feat: 새신자 테이블 TypeORM 작성
nrbns357 Jan 26, 2026
bbd3da4
feat: TypeORM 마이그레이션
nrbns357 Jan 29, 2026
964bcf6
feat: TypeORM 마이그레이션
nrbns357 Jan 29, 2026
e414a22
Merge pull request #58 from nuon-dev/feature/newcomer/ghh
nrbns357 Jan 29, 2026
fd36aee
feat: 새가족 담당자 추가
iubns Jan 31, 2026
da5e276
fix: 새신자 테이블 삭제날짜,섬김이 조인 테이블 변경
nrbns357 Jan 31, 2026
30a5f29
Merge pull request #60 from nuon-dev/feature/newcomer/ghh
iubns Jan 31, 2026
91974f3
feat: 새가족등록,조회,출석 기능 구현
nrbns357 Jan 31, 2026
0ceca60
feat: 담당자 등록 폼 구현
nrbns357 Jan 31, 2026
5509361
Merge pull request #61 from nuon-dev/feature/newcomer/ghh
nrbns357 Jan 31, 2026
2cf69d1
fix: 포트 주소 변경
iubns Feb 9, 2026
18a5da6
update: 수련회 이동 링크 숨기기
iubns Feb 9, 2026
a1969b1
feat: 불필요한 console.log 삭제
iubns Feb 9, 2026
ba209e7
Merge pull request #59 from nuon-dev/main
iubns Feb 9, 2026
705cc96
update: 새가족 수정 기능 추가
iubns Feb 9, 2026
2eb4664
Merge pull request #63 from nuon-dev/main
iubns Feb 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
137 changes: 79 additions & 58 deletions client/src/app/admin/darak/people/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { get, put } from "@/config/api"
import { type User } from "@server/entity/user"
import { Community } from "@server/entity/community"
import { MouseEvent, useEffect, useRef, useState } from "react"
import UserSearch from "@/components/UserSearch"

export default function People() {
const [communityList, setCommunityList] = useState<Community[]>([])
Expand Down Expand Up @@ -57,7 +58,7 @@ export default function People() {

async function fetchCommunityUserList(communityId: number) {
const communityUserListData = await get(
`/admin/community/user-list/${communityId}`
`/admin/community/user-list/${communityId}`,
)
setChildCommunityList(communityUserListData)
}
Expand All @@ -66,7 +67,7 @@ export default function People() {
const communityListData = await get("/admin/community")
setCommunityList(communityListData)
const noCommunityUserData = await get(
"/admin/community/no-community-user-list"
"/admin/community/no-community-user-list",
)
setNoCommunityUser(noCommunityUserData)

Expand Down Expand Up @@ -121,7 +122,7 @@ export default function People() {

async function saveCommunityLeader(
community: Community,
leaderId: number | null
leaderId: number | null,
) {
await put("/admin/community/save-leader", {
groupId: community.id,
Expand All @@ -132,7 +133,7 @@ export default function People() {

async function saveCommunityDeputyLeader(
community: Community,
deputyLeaderId: number | null
deputyLeaderId: number | null,
) {
await put("/admin/community/save-deputy-leader", {
groupId: community.id,
Expand Down Expand Up @@ -207,7 +208,7 @@ export default function People() {

function CommunityBox({ displayCommunity }: { displayCommunity: Community }) {
const myCommunity = childCommunityList.find(
(community) => community.id === displayCommunity.id
(community) => community.id === displayCommunity.id,
)

function onClickCommunity(e: MouseEvent) {
Expand Down Expand Up @@ -338,7 +339,7 @@ export default function People() {
onChange={(e) => {
saveCommunityDeputyLeader(
displayCommunity,
e.target.value as number
e.target.value as number,
)
}}
>
Expand Down Expand Up @@ -408,8 +409,28 @@ export default function People() {
return `${getParentCommunityName(community.parent)} > ${community.name}`
}

const handleSelectUser = (user: User) => {
if (!user.community) {
alert("미배정 사용자입니다.")
return
}

const parentId = user.community.parent ? user.community.parent.id : null

if (!parentId) {
setSelectedRootCommunity(null)
} else {
const parentCommunity = communityList.find((c) => c.id === parentId)
if (parentCommunity) {
setSelectedRootCommunity(parentCommunity)
} else {
console.warn("상위 그룹을 찾을 수 없습니다.")
}
}
}

return (
<Box sx={{ bgcolor: "grey.50", minHeight: "100vh" }}>
<Box sx={{ bgcolor: "grey.50" }}>
<Box p={1.5}>
<Stack
direction="row"
Expand All @@ -421,71 +442,72 @@ export default function People() {
커뮤니티 관리
</Typography>
<Stack direction="row" gap={1} alignItems="center">
<Chip
label={`미배정: ${noCommunityUser.length}명`}
size="small"
variant="outlined"
color={noCommunityUser.length > 0 ? "warning" : "success"}
/>
<Box mb={1.5}>
<UserSearch onSelectUser={handleSelectUser} />
</Box>
</Stack>
</Stack>

<Stack
direction="row"
gap={2}
onMouseUp={() => {
selectedUser.current = null
}}
>
{/* 미배정 사용자 영역 */}
<Paper
elevation={2}
sx={{
width: 320,
p: 2,
borderRadius: 2,
bgcolor: "background.paper",
border: "2px dashed",
borderColor: "warning.light",
maxHeight: "calc(100vh - 200px)",
overflow: "hidden",
}}
onMouseUp={removeCommunityToUser}
>
<Typography
variant="subtitle1"
fontWeight="bold"
mb={1}
color="warning.main"
>
미배정 사용자 ({noCommunityUser.length}명)
</Typography>
<Typography
variant="caption"
color="text.secondary"
mb={2}
display="block"
>
다락방에 속하지 않은 사용자들입니다.
</Typography>
<Box
<Stack gap={1.5}>
{/* 미배정 사용자 영역 */}
<Paper
elevation={2}
sx={{
display: "flex",
flexWrap: "wrap",
gap: 0.5,
maxHeight: "calc(100vh - 300px)",
overflowY: "auto",
pr: 1,
width: 320,
p: 2,
borderRadius: 2,
bgcolor: "background.paper",
border: "2px dashed",
borderColor: "warning.light",
maxHeight: "calc(100vh - 200px)",
overflow: "hidden",
}}
onMouseUp={removeCommunityToUser}
>
{noCommunityUser.map((user) => UserBox({ user }))}
</Box>
</Paper>
<Typography
variant="subtitle1"
fontWeight="bold"
mb={1}
color="warning.main"
>
미배정 사용자 ({noCommunityUser.length}명)
</Typography>
<Typography
variant="caption"
color="text.secondary"
mb={2}
display="block"
>
다락방에 속하지 않은 사용자들입니다.
</Typography>
<Box
sx={{
display: "flex",
flexWrap: "wrap",
gap: 0.5,
maxHeight: "calc(100vh - 300px)",
overflowY: "auto",
pr: 1,
}}
>
{noCommunityUser.map((user) => UserBox({ user }))}
</Box>
</Paper>
</Stack>

{/* 커뮤니티 영역 */}
<Box
flex="1"
sx={{ maxHeight: "calc(100vh - 150px)", overflowY: "auto" }}
sx={{
maxHeight: "calc(100vh - (64px + 64px + 24px))",
overflowY: "auto",
}}
>
{/* 네비게이션 */}
<Paper
Expand Down Expand Up @@ -535,7 +557,7 @@ export default function People() {
setSelectedRootCommunity(
selectedRootCommunity
? selectedRootCommunity.parent
: null
: null,
)
}
>
Expand Down Expand Up @@ -578,7 +600,6 @@ export default function People() {
)}
</Box>
</Stack>

{/* 드래그 중인 사용자 표시 */}
{selectedUser.current && selectedUser.current.id && (
<Box
Expand Down
Loading