-
Notifications
You must be signed in to change notification settings - Fork 0
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 #273 from gloddy-dev/feature/264-create-manage-app…
…ly-page Feature : 모임 지원서 관리 페이지 구현
- Loading branch information
Showing
14 changed files
with
230 additions
and
17 deletions.
There are no files selected for viewing
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
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
81 changes: 81 additions & 0 deletions
81
src/app/(main)/grouping/[groupId]/manage/components/ApplyCard.client.tsx
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,81 @@ | ||
'use client'; | ||
|
||
import ManageModal from './ManageModal'; | ||
import { Avatar } from '@/components/Avatar'; | ||
import { Button, ButtonGroup, IconButton } from '@/components/Button'; | ||
import { Spacing } from '@/components/common/Spacing'; | ||
import { Flex } from '@/components/Layout'; | ||
import { TextField } from '@/components/TextField'; | ||
import { useModal } from '@/hooks/useModal'; | ||
import Image from 'next/image'; | ||
|
||
const DUMMY_DATA = { | ||
userImageUrl: '/images/dummy_avatar.png', | ||
isCertifiedStudent: true, | ||
name: 'Glow', | ||
reliabilityLevel: 'GLODDY', | ||
introduce: '안녕하세요! 저는 글로우입니다. 잘 부탁드립니다.', | ||
reason: '저는 이 모임에 가입하고 싶습니다.', | ||
}; | ||
|
||
export default function ApplyCard() { | ||
const { userImageUrl, isCertifiedStudent, name, reliabilityLevel, introduce, reason } = | ||
DUMMY_DATA; | ||
|
||
const { open, close } = useModal(); | ||
|
||
const handleAcceptClick = () => {}; | ||
const handleRejectClick = () => {}; | ||
|
||
return ( | ||
<div className="w-[90%] shrink-0 rounded-8 bg-white p-16 shadow-card-ui"> | ||
<Flex justify="between" align="center" className="my-4 gap-12"> | ||
<Avatar | ||
imageUrl={userImageUrl} | ||
size="small" | ||
iconVariant={isCertifiedStudent ? 'education' : 'none'} | ||
/> | ||
<div className="grow"> | ||
<p className="text-paragraph-1">{name}</p> | ||
<Flex align="center" className="gap-2"> | ||
<Image | ||
src={`/icons/16/${reliabilityLevel.toLowerCase()}.svg`} | ||
alt="medal" | ||
width={16} | ||
height={16} | ||
/> | ||
<p className="text-caption text-sign-tertiary">{reliabilityLevel}</p> | ||
</Flex> | ||
</div> | ||
<IconButton> | ||
<Image src="/icons/24/navigate-next.svg" alt="navigate-next" width={24} height={24} /> | ||
</IconButton> | ||
</Flex> | ||
<Spacing size={16} /> | ||
<p className="px-4 text-sign-secondary">나는 이런 사람이에요!</p> | ||
<Spacing size={4} /> | ||
<TextField as="textarea" value={introduce} readOnly /> | ||
<Spacing size={16} /> | ||
<p className="px-4 text-sign-secondary">모임에 함께하고 싶은 이유</p> | ||
<TextField as="textarea" value={reason} readOnly /> | ||
<Spacing size={16} /> | ||
<ButtonGroup position="contents" hasDivider={false}> | ||
<Button | ||
variant="solid-warning" | ||
onClick={() => | ||
open(<ManageModal type="reject" onOkClick={handleRejectClick} onCancelClick={close} />) | ||
} | ||
> | ||
거절 | ||
</Button> | ||
<Button | ||
onClick={() => | ||
open(<ManageModal type="accept" onOkClick={handleAcceptClick} onCancelClick={close} />) | ||
} | ||
> | ||
승인 | ||
</Button> | ||
</ButtonGroup> | ||
</div> | ||
); | ||
} |
36 changes: 36 additions & 0 deletions
36
src/app/(main)/grouping/[groupId]/manage/components/ManageDetail.client.tsx
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,36 @@ | ||
'use client'; | ||
|
||
import ApplyCard from './ApplyCard.client'; | ||
import { Spacing } from '@/components/common/Spacing'; | ||
import { Flex } from '@/components/Layout'; | ||
import Image from 'next/image'; | ||
import { useState } from 'react'; | ||
|
||
export default function ManageDetail() { | ||
const [currentApplication, setCurrentApplication] = useState(1); | ||
|
||
return ( | ||
<div> | ||
<Spacing size={32} /> | ||
<Flex justify="between" align="end" className="px-20"> | ||
<p className="text-h4 text-sign-cto"> | ||
모임에 가입하고 싶은 멤버의 | ||
<br /> | ||
지원서를 확인해주세요 | ||
</p> | ||
<Flex align="center"> | ||
<Image src="/icons/16/application.svg" alt="application" width={16} height={16} /> | ||
<p className="text-caption text-sign-sub"> | ||
{currentApplication}/{4} | ||
</p> | ||
</Flex> | ||
</Flex> | ||
{/* TODO: Swiper로 변경 예정 */} | ||
<Flex className="gap-8 overflow-x-scroll p-20"> | ||
{Array.from({ length: 3 }).map((_, index) => ( | ||
<ApplyCard key={index} /> | ||
))} | ||
</Flex> | ||
</div> | ||
); | ||
} |
20 changes: 20 additions & 0 deletions
20
src/app/(main)/grouping/[groupId]/manage/components/ManageHeader.client.tsx
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,20 @@ | ||
'use client'; | ||
import { IconButton } from '@/components/Button'; | ||
import { Header } from '@/components/Header'; | ||
import Image from 'next/image'; | ||
import { useRouter } from 'next/navigation'; | ||
|
||
export default function ManageHeader() { | ||
const router = useRouter(); | ||
|
||
return ( | ||
<Header className="px-4"> | ||
<Header.Left> | ||
<IconButton size="large" onClick={() => router.back()}> | ||
<Image src="/icons/24/arrow_back.svg" alt="back" width={24} height={24} /> | ||
</IconButton> | ||
<p>모임 지원서 관리</p> | ||
</Header.Left> | ||
</Header> | ||
); | ||
} |
38 changes: 38 additions & 0 deletions
38
src/app/(main)/grouping/[groupId]/manage/components/ManageModal.tsx
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,38 @@ | ||
import { Spacing } from '@/components/common/Spacing'; | ||
import { Modal } from '@/components/Modal'; | ||
import Image from 'next/image'; | ||
|
||
const modalText = { | ||
accept: { | ||
description: '서로에 대한 존중으로\n건전한 모임 문화를 만들어요!', | ||
content: '지원서를 승인하시겠어요?', | ||
variant: 'success', | ||
}, | ||
reject: { | ||
description: '성급한 거절로\n적합한 지원자를 놓칠 수 있어요', | ||
content: '지원서를 거절하시겠어요?', | ||
variant: 'warning', | ||
}, | ||
} as const; | ||
|
||
interface ManageModalProps { | ||
type: 'accept' | 'reject'; | ||
onOkClick: () => void; | ||
onCancelClick: () => void; | ||
} | ||
|
||
export default function ManageModal({ type, onOkClick, onCancelClick }: ManageModalProps) { | ||
const { description, content, variant } = modalText[type]; | ||
|
||
return ( | ||
<Modal variant={variant} onOkClick={onOkClick} onCancelClick={onCancelClick}> | ||
<Spacing size={32} /> | ||
<Image src="/images/reject_character.png" alt="refuse_character" width={130} height={130} /> | ||
<Spacing size={22} /> | ||
<p className="text-paragraph-1 text-sign-tertiary">{description}</p> | ||
<Spacing size={12} /> | ||
<p>{content}</p> | ||
<Spacing size={16} /> | ||
</Modal> | ||
); | ||
} |
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 ManageDetail from './components/ManageDetail.client'; | ||
import ManageHeader from './components/ManageHeader.client'; | ||
import { Suspense } from 'react'; | ||
|
||
export default function GroupingManagePage() { | ||
return ( | ||
<> | ||
<ManageHeader /> | ||
<Suspense fallback={null}> | ||
<ManageDetail /> | ||
</Suspense> | ||
</> | ||
); | ||
} |
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