Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
7239a6c
โœจ feat: ์นด๋“œ ์ƒ์„ธ ๋ชจ๋‹ฌ ์ƒ๋‹จ UI ๋ฐ ๋ฐ˜์‘ํ˜• ๊ตฌํ˜„ ์™„๋ฃŒ
Jun 20, 2025
8b5e019
Merge branch 'feature/dashboard_id-ModifyCardModal' into feature/dashโ€ฆ
Jun 20, 2025
14d0c65
โœจ feat: ๋Œ“๊ธ€ ์ƒ์„ฑ,์ˆ˜์ • ์™„์„ฑ / useIsMobile๊ณตํ†ต ํ•จ์ˆ˜ ์ƒ์„ฑ
Jun 21, 2025
aa087ad
โœจ feat: ๋Œ“๊ธ€ ์‚ญ์ œ ๊ธฐ๋Šฅ ์™„์„ฑ, Avatar์— shrink-0ํด๋ž˜์Šค ์ถ”๊ฐ€
Jun 21, 2025
1363449
โœจ feat: ์นด๋“œ ์‚ญ์ œ ๊ธฐ๋Šฅ ์™„์„ฑ
Jun 21, 2025
3bd923b
โœจ feat: ๋ชจ๋‹ฌ ์žˆ์„๋•Œ ๋ฐฐ๊ฒฝ ์Šคํฌ๋กค ๋ง‰๋Š” useLockBodyScroll ํ›… ์ž‘์„ฑ
Jun 21, 2025
1e0becf
๐Ÿ›๐Ÿฐ: ์ฝ”๋“œ๋ž˜๋น— ๋ฆฌ๋ทฐ ๋ฐ˜์˜, ๋ฎคํ…Œ์ด์…˜ ํ•จ์ˆ˜์ชฝ์— ํ† ์ŠคํŠธ ์ถ”๊ฐ€
Jun 21, 2025
4797529
โœจ feat: ๋ฌดํ•œ์Šคํฌ๋กค-์นด๋“œ๋ฆฌ์ŠคํŠธ, ์นด๋“œ๋ชจ๋‹ฌ ๋‚ด ๋Œ“๊ธ€๋ฆฌ์ŠคํŠธ์— ์ ์šฉ
Jun 21, 2025
fe9355f
๐Ÿ› fix: ์ฃผ์„ ์ œ๊ฑฐ ๋ฐ ์ฟผ๋ฆฌํ‚ค ์ •์ •(-->์บ์‹œ ์—…๋ฐ์ดํŠธ ๋‹ค์‹œ ์ •์ƒ์ ์œผ๋กœ ์ž‘๋™)
Jun 21, 2025
1f2b585
Merge pull request #99 from CoPlay-FE/feature/dashboard_id-CardModal
dkslel1225 Jun 21, 2025
5101caa
๐ŸŽจ styel: ํผ ์Šคํƒ€์ผ ์ˆ˜์ •์ค‘
Jun 21, 2025
411d887
Merge pull request #101 from CoPlay-FE/feature/dashboard_id-CardModal
dkslel1225 Jun 21, 2025
aa2232d
๐ŸŽจ style: ๋ฐ˜์‘ํ˜• ์ž‘์—…์ค‘
Jun 22, 2025
1df1876
๐ŸŽจ
Jun 22, 2025
6028ed3
๐ŸŽจ
Jun 22, 2025
70a348f
Merge pull request #105 from CoPlay-FE/feature/dashboard_id-CardModal
dkslel1225 Jun 22, 2025
f64a01c
Merge branch 'feature/dashboard_id' of https://github.com/CoPlay-FE/cโ€ฆ
Jun 22, 2025
6779629
๐Ÿซง modify: ์Šคํƒ€์ผ ์ˆ˜์ • ๋ฐ ์ฝ”๋“œ ์ ๊ฒ€์ค‘..
Jun 22, 2025
6f4d5f5
๐Ÿ› fix: ๋ฌดํ•œ์Šคํฌ๋กค ์ ์šฉ์— ๋”ฐ๋ฅธ, ๋“œ๋ž˜๊ทธ์•ค๋“œ๋กญ ๋ฎคํ…Œ์ด์…˜ ํ•จ์ˆ˜ ์ˆ˜์ • ํ•„์š”ํ•จ
Jun 22, 2025
5ea58c8
๐Ÿ› fix: useInfiniteQuery (๋ฌดํ•œ์Šคํฌ๋กค)์ ์šฉ ํ›„ ์บ์‹œ ๊ตฌ์กฐ ๋ณ€๊ฒฝ (InfiniteData) ๋ฐ˜์˜ํ•˜์—ฌ ๋‚™๊ด€์  โ€ฆ
Jun 22, 2025
91d395a
Merge branch 'develop' into feature/dashboard_id
Jun 22, 2025
1c14577
๐Ÿซง modify: useCardMutation.originalํŒŒ์ผ ์‚ญ์ œ
Jun 22, 2025
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
3 changes: 3 additions & 0 deletions public/images/close-darkmode.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/images/drop-more-darkmode.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/images/modify-pen.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions src/app/dashboard/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,17 @@ export default function DashboardID() {
<>
<div className="select-none">
<div
className="mobile:flex-row tablet:flex-col flex min-h-[calc(100vh-100px)]"
className="flex min-h-[calc(100vh-100px)] mobile:flex-col tablet:flex-col"
onTouchStart={handleTouchStart}
onTouchMove={handleTouchMove}
onTouchEnd={handleTouchEnd}
>
{columns?.map((column) => (
<Column key={column.id} column={column} dashboardId={dashboardId} />
))}
<div className="BG-gray Border-column p-20">
))}{' '}
<div className="BG-gray Border-column p-20 mobile:w-308 mobile:border-t-2 tablet:w-584 tablet:border-t-2">
<button
className="BG-white Border-btn flex items-center gap-12 whitespace-nowrap rounded-8 px-85 pb-20 pt-24 text-18 font-bold"
className="BG-white Border-btn m flex justify-center gap-12 whitespace-nowrap rounded-8 px-85 pb-20 pt-24 text-18 font-bold mobile:flex mobile:w-full mobile:justify-center mobile:px-50 mobile:py-20 mobile:text-16 tablet:flex tablet:w-full tablet:items-center"
onClick={handleCreateColumn}
>
<span>์ƒˆ๋กœ์šด ์ปฌ๋Ÿผ ์ถ”๊ฐ€ํ•˜๊ธฐ</span>
Expand Down
107 changes: 64 additions & 43 deletions src/app/features/dashboard_Id/Card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { Avatar } from '@/app/shared/components/common/Avatar'
import { useDragStore } from '../store/useDragStore'
import type { Card as CardType } from '../type/Card.type'
import type { Column as ColumnType } from '../type/Column.type'
import CreateCardModal from './cardFormModals/CreateCardModal'
import ModifyCardForm from './cardFormModals/ModifyCardForm'
import CardContent from './cardModal/CardContent'
import CardModal from './cardModal/CardModal'
import Tags from './Tags'
Expand All @@ -20,6 +22,9 @@ export default function Card({
const { id, imageUrl, title, tags, dueDate, assignee } = card
const { setDraggingCard } = useDragStore()
const [openCard, setOpenCard] = useState(false) //card.tsx
const [openModifyCard, setOpenModifyCard] = useState(false)
const { title: columnTitle, id: columnId } = column
const currentColumn = { columnTitle, columnId }

return (
<div
Expand All @@ -31,64 +36,80 @@ export default function Card({
className="BG-white Border-section relative rounded-6 border-solid px-20 py-16"
onClick={() => setOpenCard(true)}
>
{imageUrl && (
<Image
src={imageUrl}
alt="์นด๋“œ ์ด๋ฏธ์ง€"
width={400}
height={600}
className="mb-15 h-auto w-full rounded-6 object-contain"
priority
draggable="false"
/>
)}

{/* ํ•  ์ผ ์ œ๋ชฉ */}
<h3 className="Text-black mb-10 text-16 font-medium leading-relaxed">
{title}
</h3>

{/* ํƒœ๊ทธ */}
{tags.length !== 0 && <Tags tags={tags} />}

{/* ๋งˆ๊ฐ์ผ & ๋‹ด๋‹น์ž */}
<div className="mt-8 flex content-around items-center">
{/* :๋งˆ๊ฐ์ผ */}
<div className="flex size-full items-center gap-6">
<div className="mobile:flex-col tablet:flex tablet:w-full tablet:items-center tablet:gap-20">
{imageUrl && (
<Image
src={'/images/calendar.svg'}
alt="๋งˆ๊ฐ์ผ"
width={18}
height={18}
src={imageUrl}
alt="์นด๋“œ ์ด๋ฏธ์ง€"
width={400}
height={600}
className="mb-15 h-auto w-full rounded-6 object-contain mobile:mb-4 mobile:h-auto mobile:w-260 tablet:m-0 tablet:h-68 tablet:max-w-fit"
priority
draggable="false"
/>
{dueDate && (
<div className="Text-gray mt-4 text-12 font-medium leading-none">
{dueDate.split(' ')[0]}
)}
<div className="tablet:w-full">
{/* ํ•  ์ผ ์ œ๋ชฉ */}
<h3 className="Text-black mb-10 text-16 font-medium leading-relaxed mobile:mb-6">
{title}
</h3>

<div className="tablet:flex tablet:flex-wrap tablet:items-center">
{/* ํƒœ๊ทธ */}
{tags.length !== 0 && <Tags tags={tags} />}

{/* ๋งˆ๊ฐ์ผ & ๋‹ด๋‹น์ž */}
<div className="mt-8 flex content-around items-center mobile:mt-6 tablet:m-0 tablet:w-full tablet:justify-between">
{/* :๋งˆ๊ฐ์ผ */}
<div className="flex size-full items-center gap-6 tablet:mr-10 tablet:w-90">
<Image
src={'/images/calendar.svg'}
alt="๋งˆ๊ฐ์ผ"
width={18}
height={18}
/>
{dueDate && (
<div className="Text-gray mt-4 text-12 font-medium leading-none">
{dueDate.split(' ')[0]}
</div>
)}
</div>
{/* :๋‹ด๋‹น์ž */}
{assignee && (
<div className="shrink-0">
<Avatar
size={24}
name={assignee.nickname}
imageUrl={assignee.profileImageUrl}
/>
</div>
)}
</div>
)}
</div>
{/* :๋‹ด๋‹น์ž */}
{assignee && (
<div className="shrink-0">
<Avatar
size={24}
name={assignee.nickname}
imageUrl={assignee.profileImageUrl}
/>
</div>
)}
</div>
</div>

{/* ์นด๋“œ ๋ชจ๋‹ฌ */}
{openCard && (
<CardModal>
<CardContent
onClose={() => setOpenCard(false)}
openModifyModal={() => setOpenModifyCard(true)}
card={card}
column={column}
/>
</CardModal>
)}

{/* ์นด๋“œ ์ˆ˜์ • ๋ชจ๋‹ฌ */}
{openModifyCard && (
<CreateCardModal>
<ModifyCardForm
onClose={() => setOpenModifyCard(false)}
currentColumn={currentColumn}
card={card}
/>
</CreateCardModal>
)}
</div>
)
}
2 changes: 1 addition & 1 deletion src/app/features/dashboard_Id/Card/ColumnTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export default function ColumnTitle({ title }: { title: string }) {
return (
<div className="BG-lightblue flex w-fit items-center gap-6 rounded-16 px-10 py-4">
<div className="size-6 rounded-25 bg-[#228DFF]"></div>
<div className="Text-deepblue pb-4 pt-6 text-14 font-medium leading-none">
<div className="Text-deepblue whitespace-nowrap pb-4 pt-6 text-14 font-medium leading-none">
{title}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ export default function AssigneeList({
const assignees = getDashboardMembers(members)

return (
<div className="BG-white Border-btn Text-gray absolute left-0 top-full z-10 mt-4 w-full rounded-6 text-14">
<div className="BG-white Text-gray absolute left-0 top-full z-10 mt-4 w-full rounded-6 border border-[#D9D9D9] text-14 dark:border-[#747474]">
{assignees.map((assignee: Assignee, index: number) => (
<div
className={cn(
'BG-Input-hovered w-full cursor-pointer px-16 py-11 pt-14 placeholder-gray-400 caret-transparent',
index !== 0 && 'border-t',
index !== 0 &&
'border-t border-[#D9D9D9] text-14 dark:border-[#747474]',
)}
key={assignee.id}
onClick={() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ControllerRenderProps } from 'react-hook-form'
import { ControllerRenderProps, UseFormSetValue } from 'react-hook-form'

import { cn } from '@/app/shared/lib/cn'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { usePostCard } from '../../api/usePostCard'
import { useUploadCardImage } from '../../api/useUploadCardImage'
import { Assignee } from '../../type/Card.type'
import type { CardFormData } from '../../type/CardFormData.type'
import MyAssignee from '../MyAssignee'
import TagsCanDelete from '../TagsCanDelete'
// import AssigneeList, { Assignee } from './AssigneeList'
import AssigneeList from './AssigneeList'
Expand Down Expand Up @@ -120,13 +121,18 @@ export default function CreateCardForm({
type="text"
placeholder="๋‹ด๋‹น์ž๋ฅผ ์„ ํƒํ•ด ์ฃผ์„ธ์š”"
/>
{selectedAssignee && (
<div className="absolute left-16 top-1/2 -translate-y-1/2 bg-[#FFFFFF] dark:bg-[#3B3B3B]">
<MyAssignee assignee={selectedAssignee} />
</div>
)}
<Image
src="/images/arrow-dropdown.svg"
alt="ํ™”์‚ดํ‘œ"
width={26}
height={24}
className={cn(
'pointer-events-none absolute right-0 top-1/2 -translate-y-1/2 transition-transform duration-300',
'pointer-events-none absolute right-0 top-1/2 -translate-y-1/2 transition-transform duration-300 mobile:right-8',
isOpen && 'rotate-180',
)}
/>
Expand Down Expand Up @@ -228,42 +234,46 @@ export default function CreateCardForm({
<div>
<h3 className="mb-8">์ด๋ฏธ์ง€</h3>
{/* ์ด๋ฏธ์ง€ ๋ฏธ๋ฆฌ๋ณด๊ธฐ or ์—…๋กœ๋“œ ๋ฒ„ํŠผ */}
<label
htmlFor="imageUrl"
className="flex size-76 items-center justify-center rounded-6 bg-[#F5F5F5]"
>
{preview ? (
<Image
src={preview}
alt="๋ฏธ๋ฆฌ๋ณด๊ธฐ"
width={76}
height={76}
className="size-full object-cover"
/>
) : (
<Image
src="/images/plus.svg"
width={28}
height={28}
alt="ํ”Œ๋Ÿฌ์Šค ์•„์ด์ฝ˜"
/>
)}
</label>

{/* โŒ ์ด๋ฏธ์ง€ ์ œ๊ฑฐ ๋ฒ„ํŠผ (์ด๋ฏธ์ง€๊ฐ€ ์žˆ์„ ๊ฒฝ์šฐ๋งŒ ํ‘œ์‹œ) */}
{preview && (
<button
type="button"
className="mt-2 size-20 rounded-20 bg-blue-300 text-15 font-bold"
onClick={() => {
setPreview(null)
setValue('imageUrl', '') // ๋˜๋Š” null
}}
<div className="relative">
<label
htmlFor="imageUrl"
className="flex size-76 items-center justify-center overflow-hidden rounded-6 border-[#747474] bg-[#F5F5F5] dark:border dark:bg-[#3B3B3B]"
>
X
</button>
)}
{preview ? (
<Image
src={preview}
alt="๋ฏธ๋ฆฌ๋ณด๊ธฐ"
width={76}
height={76}
className="size-full object-cover"
/>
) : isUploading ? (
''
) : (
<Image
src="/images/plus.svg"
width={28}
height={28}
className="size-28"
alt="ํ”Œ๋Ÿฌ์Šค ์•„์ด์ฝ˜"
/>
)}
</label>

{/* โŒ ์ด๋ฏธ์ง€ ์ œ๊ฑฐ ๋ฒ„ํŠผ (์ด๋ฏธ์ง€๊ฐ€ ์žˆ์„ ๊ฒฝ์šฐ๋งŒ ํ‘œ์‹œ) */}
{preview && !isUploading && (
<button
type="button"
className="Text-gray absolute bottom-0 left-83 text-12 font-medium"
onClick={() => {
setPreview(null)
setValue('imageUrl', '') // ๋˜๋Š” null
}}
>
์‚ญ์ œ
</button>
)}
</div>
{/* ํŒŒ์ผ ์ž…๋ ฅ ํ•„๋“œ (์‹ค์ œ input์€ ์ˆจ๊ฒจ์ ธ ์žˆ์Œ) */}
<input
id="imageUrl"
Expand All @@ -283,7 +293,7 @@ export default function CreateCardForm({
์ทจ์†Œ
</button>
<button
className="BG-blue w-full rounded-8 border-solid py-14 text-16 font-medium text-[#FFFFFF]"
className="BG-blue w-full rounded-8 border-solid py-14 text-16 font-medium text-[#FFFFFF] disabled:bg-gray-300 dark:disabled:bg-[#464646]"
type="submit"
disabled={!isValid || isPending || isSubmitting}
>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
import { createPortal } from 'react-dom'

import { useLockBodyScroll } from '@/app/shared/hooks/useLockBodyScroll'

interface ModalProps {
children: React.ReactNode
}
export default function CreateCardModal({ children }: ModalProps) {
const modalRoot = document.getElementById('modal-root')

useLockBodyScroll()

if (!modalRoot) return null

return createPortal(
<div className="fixed inset-0 flex items-center justify-center bg-black/40">
<div className="BG-white h-970 w-584 overflow-y-scroll rounded-16 p-32 shadow-lg [mask-image:radial-gradient(white_100%,transparent_100%)]">
<div className="BG-white h-970 w-584 overflow-y-scroll rounded-16 p-32 shadow-lg [mask-image:radial-gradient(white_100%,transparent_100%)] mobile:h-766 mobile:w-327 mobile:px-16 mobile:py-24">
{children}
</div>
</div>,
Expand Down
Loading
Loading