Skip to content

Commit

Permalink
Merge pull request #352 from donga-it-club/develop
Browse files Browse the repository at this point in the history
[FE][Release] 240729 배포 전 빌드
  • Loading branch information
yeneua authored Jul 28, 2024
2 parents 6f88d4f + 62589ce commit 4d4f485
Show file tree
Hide file tree
Showing 14 changed files with 123 additions and 11 deletions.
6 changes: 5 additions & 1 deletion src/components/RetroList/ContentsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,11 @@ const ContentList: React.FC<ContentListProps> = ({ data, viewMode, searchData, s
{isLoading ? (
<Spinner size="md" />
) : (
<S.Thumbnail src={item.thumbnail ? image[item.id] : Thumbnail} onLoad={handleImageLoad} />
<S.Thumbnail
src={item.thumbnail ? image[item.id] : Thumbnail}
onLoad={handleImageLoad}
onClick={() => navigate(`/sections?retrospectiveId=${item.id}&teamId=${item.teamId}`)}
/>
)}
</S.ImgBox>
<hr />
Expand Down
6 changes: 5 additions & 1 deletion src/components/projectRetro/GroupBoardList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ const GroupBoardList: React.FC<GroupBoardListProps> = ({ data }) => {
{isLoading ? (
<Spinner size="md" />
) : (
<T.Thumbnail src={item.thumbnail ? image[item.id] : Thumbnail} onLoad={handleImageLoad} />
<T.Thumbnail
src={item.thumbnail ? image[item.id] : Thumbnail}
onLoad={handleImageLoad}
onClick={() => navigate(`/sections?retrospectiveId=${item.id}&teamId=${item.teamId}`)}
/>
)}
</T.ImgBox>
<hr />
Expand Down
22 changes: 16 additions & 6 deletions src/components/projectRetro/ManageModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ const ManageModal: React.FC<ManageModalProps> = ({ groupId, data, isClose }) =>
} else {
try {
await putBoard({ retrospectiveGroupId: groupId, retrospectiveIds: requestData });
toast.info('그룹 회고가 정상적으로 추가되었습니다.');
toast.info('그룹 회고가 정상적으로 추가/제거되었습니다.');
isClose();
window.location.reload();
} catch (e) {
toast.error('그룹 회고 추가에 실패했습니다.');
toast.error('그룹 회고 추가/제거에 실패했습니다.');
}
}
};
Expand All @@ -103,6 +103,13 @@ const ManageModal: React.FC<ManageModalProps> = ({ groupId, data, isClose }) =>
}
}, [data]);

useEffect(() => {
if (checkedRetroId) {
const tempId = checkedRetroId.concat(requestData); // 이미 추가된 회고 id들 requestData에 넣기(api 수정됨에 따라)
setRequestData(tempId);
}
}, [checkedRetroId]);

return (
<>
<T.Background>
Expand All @@ -125,20 +132,23 @@ const ManageModal: React.FC<ManageModalProps> = ({ groupId, data, isClose }) =>
retro.nodes.map(item => (
<S.ListItem key={item.id}>
<S.RetroBox>
{checkedRetroId.indexOf(item.id) < 0 ? ( // 이미 추가된 회고인지 판단
{requestData.indexOf(item.id) < 0 ? ( // 이미 추가된 회고라면 checked
<S.CheckBox type="checkbox" onChange={handleInputCheck(item.id)}></S.CheckBox>
) : (
<S.CheckBox type="checkbox" onChange={handleInputCheck(item.id)} checked></S.CheckBox>
)}
{/* <S.CheckBox type="checkbox" onChange={handleInputCheck(item.id)}></S.CheckBox> */}
</S.RetroBox>
<S.RetroBox>{item.teamId ? <IoMdPerson size={20} /> : <MdPeople size={20} />}</S.RetroBox>
<S.RetroBox>{item.teamId ? <MdPeople size={20} /> : <IoMdPerson size={20} />}</S.RetroBox>
<S.RetroTitle>{item.title}</S.RetroTitle>
<S.RetroUserBox>
<S.RetroUser>{item.username}</S.RetroUser>
{user?.userId === item.userId && <S.RetroLeader>본인</S.RetroLeader>}
</S.RetroUserBox>
<S.RetroBox>{convertToLocalTime(item.updatedDate)}</S.RetroBox>
<S.RetroBox>
{convertToLocalTime(item.createdDate) === convertToLocalTime(item.updatedDate)
? convertToLocalTime(item.createdDate)
: `${convertToLocalTime(item.updatedDate)} (수정)`}
</S.RetroBox>
<S.RetroBox>
{item.isBookmarked ? <FaStar size={20} style={{ color: '#fcea12' }} /> : <CiStar size={20} />}
</S.RetroBox>
Expand Down
1 change: 1 addition & 0 deletions src/pages/GroupBoardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const GroupBoard = () => {
<RiFolder6Fill size={40} style={{ color: '#FFE500', marginRight: '10px' }} />
{groupData?.title}
</S.TitleText>
<S.DescriptionText> {groupData?.description}</S.DescriptionText>
</S.TitleContainter>
<S.Wrapper>
<S.Button onClick={() => setIsOpen(true)}>회고 관리하기</S.Button>
Expand Down
4 changes: 3 additions & 1 deletion src/pages/ProjectRetroPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ const ProjectRetro = () => {
/>
<S.DescriptionText>사용법</S.DescriptionText>
</S.DescriptionBox>
<StatusFilter onSelectedFilter={handleStatusFilter} />
<S.FilterContainer>
<StatusFilter onSelectedFilter={handleStatusFilter} />
</S.FilterContainer>
<GroupList groups={data} />
{isDescriptionOpen ? <DescriptionModal isClose={() => setIsDescriptionOpen(false)} /> : null}
</>
Expand Down
1 change: 1 addition & 0 deletions src/styles/RetroList/ContentsList.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export const Thumbnail = styled.img`
height: 100%;
object-fit: cover;
aspect-ratio: 1/1;
cursor: pointer;
`;

export const TeamIcon = styled.img`
Expand Down
4 changes: 4 additions & 0 deletions src/styles/projectRetro/DeleteModal.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export const Modal = styled.div`
border-radius: 5px;
width: 600px;
height: auto;
@media screen and (max-width: 768px) {
width: 350px;
}
`;

export const Top = styled.div`
Expand Down
9 changes: 9 additions & 0 deletions src/styles/projectRetro/DescriptionModal.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ export const Modal = styled.div`
border-radius: 5px;
width: 800px;
height: 300px;
@media screen and (max-width: 768px) {
width: 300px;
height: 450px;
padding: 10px 20px 10px 20px;
}
`;

export const Title = styled.div`
Expand All @@ -37,4 +42,8 @@ export const Title = styled.div`
width: 250px;
padding-top: 5px;
padding-bottom: 5px;
@media screen and (max-width: 768px) {
width: 200px;
height: 35px;
}
`;
17 changes: 16 additions & 1 deletion src/styles/projectRetro/GroupBoard.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const TitleContainter = styled.div`
border-bottom: 1px solid rgba(17, 27, 71, 0.3);
display: flex;
margin-top: 15px;
align-items: center;
`;

export const TitleText = styled.span`
Expand All @@ -17,7 +18,14 @@ export const TitleText = styled.span`
border-bottom: 3px solid #111b47;
display: flex;
align-items: center;
padding: 0px 10px;
padding: 0px 20px;
`;

export const DescriptionText = styled.span`
color: #a9a9a9;
font-size: large;
font-weight: bold;
margin-left: 20px;
`;

export const Button = styled.button`
Expand All @@ -26,9 +34,16 @@ export const Button = styled.button`
padding: 5px 50px;
border-radius: 3px;
margin: 20px 0px 20px auto;
@media screen and (max-width: 768px) {
margin: 20px auto;
}
`;

export const Wrapper = styled.div`
display: flex;
flex-direction: column;
@media screen and (max-width: 768px) {
justify-content: center;
align-items: center;
}
`;
9 changes: 9 additions & 0 deletions src/styles/projectRetro/GroupBoardList.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ export const Container = styled.div`
display: flex;
justify-content: flex-start;
flex-wrap: wrap;
@media screen and (max-width: 768px) {
display: inline-block;
padding: 0;
width: auto;
}
`;

export const Box = styled.div`
Expand All @@ -16,6 +21,10 @@ export const Box = styled.div`
margin-top: 30px;
margin-left: 40px;
margin-right: 40px;
@media screen and (max-width: 768px) {
width: 260px;
height: auto;
}
`;

export const InfoBox = styled.div`
Expand Down
13 changes: 13 additions & 0 deletions src/styles/projectRetro/GroupList.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ export const Container = styled.div`
display: flex;
justify-content: flex-start;
flex-wrap: wrap;
@media screen and (max-width: 768px) {
display: inline-block;
padding: 0;
width: auto;
}
`;

export const CreateBox = styled.div`
Expand All @@ -18,6 +23,10 @@ export const CreateBox = styled.div`
width: 250px;
height: 200px;
margin: 50px;
@media screen and (max-width: 768px) {
width: 250px;
height: 190px;
}
`;

export const Box = styled.div`
Expand All @@ -27,6 +36,10 @@ export const Box = styled.div`
height: 200px;
margin: 50px;
padding: 10px;
@media screen and (max-width: 768px) {
width: 260px;
height: 200px;
}
`;

export const InfoBox = styled.div`
Expand Down
30 changes: 29 additions & 1 deletion src/styles/projectRetro/ManageModal.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ export const Modal = styled.div`
width: 1000px;
height: 600px;
padding: 15px 25px;
@media screen and (max-width: 768px) {
width: 300px;
height: 550px;
padding: 10px 20px 10px 20px;
}
`;

export const Title = styled.span`
Expand All @@ -21,6 +26,11 @@ export const Title = styled.span`
align-items: center;
padding: 5px 35px;
width: 300px;
@media screen and (max-width: 768px) {
width: 220px;
height: 35px;
padding: 5px 20px;
}
`;

export const Box = styled.div`
Expand All @@ -30,13 +40,22 @@ export const Box = styled.div`
overflow-y: scroll;
width: 90%;
height: 90%;
@media screen and (max-width: 768px) {
overflow-x: scroll;
overflow: auto;
white-space: nowrap;
padding: 5px 10px;
}
`;

export const ListItem = styled.div`
margin: 25px;
display: grid;
grid-template-columns: 0.5fr 1fr 1.5fr 1fr 1.8fr 1fr 1fr;
grid-template-columns: 0.5fr 1fr 1.5fr 1fr 2.3fr 1fr 1fr;
align-items: center;
@media screen and (max-width: 768px) {
margin: 30px;
}
`;

export const CheckBox = styled.input`
Expand All @@ -52,12 +71,18 @@ export const RetroTitle = styled.span`
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@media screen and (max-width: 768px) {
margin-right: 5px;
}
`;

export const RetroUserBox = styled.div`
padding-left: 5px;
display: flex;
align-items: center;
@media screen and (max-width: 768px) {
margin-right: 5px;
}
`;
export const RetroUser = styled.span`
white-space: nowrap;
Expand All @@ -77,6 +102,9 @@ export const RetroLeader = styled.span`
export const RetroBox = styled.div`
align-self: center;
padding-left: 5px;
@media screen and (max-width: 768px) {
margin-right: 5px;
}
`;

export const Button = styled.button`
Expand Down
5 changes: 5 additions & 0 deletions src/styles/projectRetro/Modal.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ export const Modal = styled.div`
width: 500px;
height: auto;
padding: 15px 25px;
@media screen and (max-width: 768px) {
width: 300px;
height: auto;
padding: 10px 20px 10px 20px;
}
`;

export const TitleBox = styled.div`
Expand Down
7 changes: 7 additions & 0 deletions src/styles/projectRetro/ProjectRetroPage.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,10 @@ export const DescriptionText = styled.span`
color: #a9a9a9;
font-size: small;
`;

export const FilterContainer = styled.div`
@media screen and (max-width: 768px) {
display: flex;
justify-content: center;
}
`;

0 comments on commit 4d4f485

Please sign in to comment.