Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QA 중감점검] 공개상담 관련한 이슈 해결 #281

Merged
merged 30 commits into from
May 4, 2024
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
0a873cd
Update bug.md
kyuhho Mar 28, 2024
eabf36e
Update pull_request_Template.md
kyuhho Mar 28, 2024
6309556
Merge remote-tracking branch 'origin/dev'
kyuhho Apr 9, 2024
fc50fc1
Merge remote-tracking branch 'origin/dev'
kyuhho Apr 16, 2024
19ad309
Merge pull request #243 from sharemindteam/dev
rmdnps10 Apr 25, 2024
dcbdcf6
Merge pull request #245 from sharemindteam/hotfix/time-select
rmdnps10 Apr 26, 2024
8aaaf0e
Revert "[Hotfix] 시간 선택 모달 디바이스에 따라 스타일 깨짐 오류"
rmdnps10 Apr 26, 2024
3d7122b
Merge pull request #246 from sharemindteam/revert-245-hotfix/time-select
rmdnps10 Apr 26, 2024
f44ffb1
Merge pull request #248 from sharemindteam/dev
rmdnps10 Apr 26, 2024
d391d04
Revert "Revert "[Hotfix] 시간 선택 모달 디바이스에 따라 스타일 깨짐 오류""
rmdnps10 Apr 26, 2024
d8a206e
Merge pull request #249 from sharemindteam/revert-246-revert-245-hotf…
rmdnps10 Apr 26, 2024
146f25f
Merge pull request #265 from sharemindteam/dev
rmdnps10 Apr 28, 2024
f2f5105
Merge pull request #275 from sharemindteam/dev
rmdnps10 Apr 29, 2024
910b974
Merge branch 'dev' of https://github.com/sharemindteam/sharemind-clie…
rmdnps10 May 1, 2024
0ada715
Refactor: Maintaining the state of the letter writing page when no ca…
rmdnps10 May 2, 2024
ce3d668
Fix: Activate the send button immediately when loading a letter #254
rmdnps10 May 2, 2024
da106d0
Style: ongoingconsultbox style error fix
rmdnps10 May 2, 2024
7ae4ee9
Feat: 마인더 편지 답장에서 보낸 시간 표시에 api response값의 updated2 값 이용
rmdnps10 May 2, 2024
d39269e
Merge branch 'dev' of https://github.com/sharemindteam/sharemind-clie…
rmdnps10 May 2, 2024
0bda485
Chore: delete console.log
rmdnps10 May 2, 2024
b4293bf
Fix: consult category init value setting, add 연애갈등 category #280
rmdnps10 May 2, 2024
f180555
Fix: fix style error of open consult card, mapping scrap, like #280
rmdnps10 May 2, 2024
d3fdcba
Feat: 마인더 공개상담 답변 창에서 좋아요, 스크랩뷰 없애기 #280
rmdnps10 May 2, 2024
2ad925e
Fix: Change res to res2 so that the accept button is visible only to …
rmdnps10 May 2, 2024
5e10a05
Feat: 셰어 상담 탭 공개 상담 리스트 좋아요, 스크랩 여부에 따른 하트, 북마크 채우기 여부 표시 #280
rmdnps10 May 3, 2024
568dfdc
Fix: 공개상담 결제 완료시 blabla~ 삭제 #280
rmdnps10 May 3, 2024
25e9db0
Fix: 일대다상담 신청하기 상담 방식 선택 문구 수정 #280
rmdnps10 May 3, 2024
e4e747b
Feat: 셰어 공개 상담 댓글에서 마인더 프로필 클릭 시 마인더 프로필 페이지로 이동 #280
rmdnps10 May 3, 2024
2f94f7a
Chore: 나중에 사용할 수도 있는 코드 주석 추가 #280
rmdnps10 May 4, 2024
91049a4
Chore: 나중에 사용할 수도 있는 코드 주석 추가2 #280
rmdnps10 May 4, 2024
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
2 changes: 1 addition & 1 deletion src/assets/icons/icon-heart2.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 src/assets/icons/icon-heart4.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 src/assets/icons/icon-save4.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 src/assets/icons/icon-save5.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/assets/icons/icon_save2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/assets/icons/icon_save3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 11 additions & 3 deletions src/components/Buyer/BuyerConsult/BuyerOpenConsultSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import { LoadingSpinner } from 'utils/LoadingSpinner';
import { isBuyPopupOpenState } from 'utils/atom';
import { ReactComponent as LockIcon } from 'assets/icons/icon-lock.svg';
import { ReactComponent as HeartIcon } from 'assets/icons/icon-heart2.svg';
import { ReactComponent as SaveIcon } from 'assets/icons/icon-save2.svg';
import { ReactComponent as HeartEmptyIcon } from 'assets/icons/icon-heart4.svg';
import { ReactComponent as SaveIcon } from 'assets/icons/icon-save4.svg';
import { ReactComponent as SaveEmptyIcon } from 'assets/icons/icon-save5.svg';
import { ReactComponent as CommentIcon } from 'assets/icons/icon-comment.svg';
import { Space } from 'components/Common/Space';
import { BackDrop } from 'components/Common/BackDrop';
Expand Down Expand Up @@ -147,11 +149,17 @@ function BuyerOpenConsultSection({ isChecked }: BuyerOpenConsultSectionProps) {
<div className="row2">{item?.content}</div>
<div className="row3">
<IconItem>
<HeartResizeIcon />
{item?.isLiked ? (
<HeartResizeIcon />
) : (
<HeartEmptyIcon />
)}

<Caption1 color={Grey2}>{item?.totalLike}</Caption1>
</IconItem>
<IconItem>
<SaveIcon />
{item?.isScrapped ? <SaveIcon /> : <SaveEmptyIcon />}

<Caption1 color={Grey2}>{item?.totalScrap}</Caption1>
</IconItem>
<IconItem>
Expand Down
1 change: 1 addition & 0 deletions src/components/Buyer/BuyerLetterWrite/LetterPostModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const LetterPostModal = ({
if (categoryType === 0) {
alert('상담 카테고리를 정해주세요.');
setIsActive(false);
return;
} else {
//첫번째 질문 임시저장 X 메세지 임시저장 수정
try {
Expand Down
15 changes: 10 additions & 5 deletions src/components/Buyer/BuyerOpenConsult/OpenConsultList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import styled from 'styled-components';
import { Grey1, Grey2, Grey6 } from 'styles/color';
import { Body1, Caption1 } from 'styles/font';
import { ReactComponent as HeartIcon } from 'assets/icons/icon-heart2.svg';
import { ReactComponent as SaveIcon } from 'assets/icons/icon-save2.svg';
import { ReactComponent as HeartEmptyIcon } from 'assets/icons/icon-heart4.svg';
import { ReactComponent as SaveIcon } from 'assets/icons/icon-save4.svg';
import { ReactComponent as SaveEmptyIcon } from 'assets/icons/icon-save5.svg';
import { ReactComponent as CommentIcon } from 'assets/icons/icon-comment.svg';
import { Space } from 'components/Common/Space';
import { openConsultApiObject } from 'pages/Buyer/BuyerConsult';
Expand Down Expand Up @@ -96,15 +98,16 @@ function OpenConsultList() {
<div className="row1">
<Body1>{item.title}</Body1>
</div>
<Space height="1.2rem" />
<Space height="0.8rem" />
<div className="row2">{item.content}</div>
<div className="row3">
<IconItem>
<HeartResizeIcon />
{item.isLiked ? <HeartIcon /> : <HeartEmptyIcon />}
<Caption1 color={Grey2}>{item.totalLike}</Caption1>
</IconItem>

<IconItem>
<SaveIcon />
{item.isScrapped ? <SaveResizeIcon /> : <SaveEmptyIcon />}
<Caption1 color={Grey2}>{item.totalScrap}</Caption1>
</IconItem>
<IconItem>
Expand Down Expand Up @@ -169,6 +172,8 @@ const BuyerOpenConsultCard = styled.div`
line-height: 155%;
}
.row3 {
position: absolute;
bottom: 1.6rem;
display: flex;
gap: 1.2rem;
}
Expand All @@ -179,7 +184,7 @@ const IconItem = styled.div`
gap: 0.5rem;
`;

const HeartResizeIcon = styled(HeartIcon)`
const SaveResizeIcon = styled(SaveIcon)`
width: 2rem;
height: 2rem;
`;
Expand Down
27 changes: 21 additions & 6 deletions src/components/Buyer/BuyerOpenConsultDetail/CommentCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { deleteCommentLikes } from 'api/delete';
import { postLikeComment } from 'api/post';
import { consultStyleToCharNum } from 'utils/convertStringToCharNum';
import { formattedMessage } from 'utils/formattedMessage';
import { useNavigate } from 'react-router-dom';
interface CommentCardProps {
item: commentApiObject;
isMyPost: boolean;
Expand All @@ -31,6 +32,7 @@ function CommentCard({
// 보내기 중복 방지
const [isSending, setIsSending] = useState<boolean>(false);
const [isFirstRendering, setIsFirstRendering] = useState<boolean>(true);
const navigate = useNavigate();
const handleClickLikeButton = useCallback(async () => {
if (isSending) {
return;
Expand Down Expand Up @@ -64,12 +66,25 @@ function CommentCard({
return (
<CommentCardWrapper>
<div className="flex1">
<Characters
number={consultStyleToCharNum(item.consultStyle) ?? 1}
width="3.2rem"
height="3.3rem"
/>
<Body1>{item.nickName}</Body1>
<div
className="minder-profile"
onClick={() => {
navigate(`/profile/${item.counselorId}`);
}}
style={{
display: 'flex',
alignItems: 'center',
gap: '0.8rem',
cursor: 'pointer',
}}
>
<Characters
number={consultStyleToCharNum(item.consultStyle) ?? 1}
width="3.2rem"
height="3.3rem"
/>
<Body1>{item.nickName}</Body1>
</div>
<Circle />
<Caption2>{item.updatedAt}</Caption2>
<SettingButton />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function CommentListSection() {
}
}
const res2: any = await getCustomerIsWriter(id);
if (res2.status === 200) setIsMyPost(res.data);
if (res2.status === 200) setIsMyPost(res2.data);
else if (res2?.response.status === 404) {
alert('존재하지 않는 게시물입니다.');
navigate('/open-consult');
Expand Down
10 changes: 8 additions & 2 deletions src/components/Buyer/BuyerWriteOpenConsult/FianlWritePopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,14 @@ function FinalWritePopup({ title, content, category }: FianlWritePopupProps) {
alert('작성권한이 없습니다.');
navigate('/consult?type=open-consult');
} else if (res?.response.status === 404) {
alert('존재하지 않는 일대다상담입니다.');
navigate('/consult?type=open-consult');
if (res?.response.data.errorName === 'CONSULT_CATEGORY_NOT_FOUND') {
alert('상담 카테고리를 선택해주세요.');
setIsPostPopupOpen(false);
return;
} else if (res?.data.errorName === 'CONSULT_TYPE_NOT_FOUND') {
alert('존재하지 않는 일대다상담입니다.');
navigate('/consult?type=open-consult');
}
}
} catch (err) {
alert(err);
Expand Down
23 changes: 14 additions & 9 deletions src/components/Seller/Common/OngoingCounsultBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ import { useNavigate } from 'react-router-dom';
import { CartegoryState, ConsultState } from 'utils/type';
interface OngoingCounsultBoxProps {
categoryStatus?: string;
consultStatus: string;
consultStatus?: string;
counselorName: string | undefined;
beforeMinutes: string | null;
content: string | null;
beforeMinutes: string | undefined | null;
content: string | null | undefined;
newMessageCounts: number | null;
counselorprofileStatus: number | undefined;
onClick?: () => void;
Expand All @@ -43,7 +43,10 @@ function OngoingCounsultBox({
}: OngoingCounsultBoxProps) {
const navigate = useNavigate();
return (
<OngoingCounsultBoxWrapper onClick={onClick}>
<OngoingCounsultBoxWrapper
onClick={onClick}
$categoryStatus={categoryStatus}
>
<div className="flex-1">
{categoryStatus && (
<div className="button">
Expand Down Expand Up @@ -107,7 +110,9 @@ function OngoingCounsultBox({
</OngoingCounsultBoxWrapper>
);
}
const OngoingCounsultBoxWrapper = styled.div`
const OngoingCounsultBoxWrapper = styled.div<{
$categoryStatus: string | undefined;
}>`
width: calc(100% - 4rem);
box-sizing: border-box;
padding: 1.6rem;
Expand All @@ -122,9 +127,8 @@ const OngoingCounsultBoxWrapper = styled.div`
background-color: ${Grey6};
margin: 0 2rem;
.button {
display: flex;
width: 6rem;
justify-content: center;
width: fit-content;
min-width: 5.6rem;
}
.flex-1 {
display: flex;
Expand All @@ -138,7 +142,8 @@ const OngoingCounsultBoxWrapper = styled.div`
}
.flex-2 {
display: flex;
gap: 1.2rem;
gap: ${(props) =>
props.$categoryStatus === '썸/연애시작' ? '2.4rem' : '1.2rem'};
}
`;

Expand Down
6 changes: 6 additions & 0 deletions src/components/Seller/SellerLetterWrite/LetterIsSaveModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ interface SaveModalProps {
setReplyText: React.Dispatch<React.SetStateAction<string>>;
lastModifyDate: string | undefined;
saveText: string;
setIsActiveSaveButton: React.Dispatch<React.SetStateAction<boolean>>;
setIsActivePostButton: React.Dispatch<React.SetStateAction<boolean>>;
}
// 임시저장할지 여부 모달
export const LetterIsSaveModal = ({
setIsActive,
setReplyText,
lastModifyDate,
setIsActivePostButton,
setIsActiveSaveButton,
saveText,
}: SaveModalProps) => {
return (
Expand All @@ -31,6 +35,8 @@ export const LetterIsSaveModal = ({
onClick={() => {
setIsActive(false);
setReplyText(saveText);
setIsActiveSaveButton(true);
setIsActivePostButton(true);
}}
>
불러오기
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ interface LetterWriteSavePostModal {
isSave: boolean;
messageType: string;
saveId: string;

}
// 임시저장 할까요? 모달
export const LetterSavePostModal = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
} from 'api/get';
import { LoadingSpinner } from 'utils/LoadingSpinner';
import { Space } from 'components/Common/Space';
import { CartegoryState } from 'utils/type';
interface LetterConsultInform {
categoryStatus?: CartegoryState;
counselorName: string | undefined;
Expand Down Expand Up @@ -130,7 +131,7 @@ export const LetterWriteMainSection = ({
setConsultInform({
categoryStatus: customerInfoResponse?.data?.category,
counselorName: customerInfoResponse?.data?.nickname,
beforeMinutes: '5분 전', // 포매팅 필요
beforeMinutes: letterResponse?.data?.updatedAt2,
counselorprofileStatus: 1, // 포매팅 필요
newMessageCounts: 0,
content: letterResponse?.data?.content,
Expand Down Expand Up @@ -159,6 +160,8 @@ export const LetterWriteMainSection = ({
setReplyText={setReplyText}
setIsActive={setIsActiveSaveModal}
lastModifyDate={saveDate}
setIsActivePostButton={setIsActivePostButton}
setIsActiveSaveButton={setIsActiveSaveButton}
/>
)}
{isActiveSavePostModal && (
Expand Down Expand Up @@ -226,7 +229,7 @@ export const LetterWriteMainSection = ({
onClick={() => {
setIsActivePostModal(true);
}}
isActive={isActiveSaveButton}
isActive={isActivePostButton}
disabled={isActivePostButton ? false : true}
>
보내기
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export interface commentApiObject {
totalLike: number;
consultStyle: string;
updatedAt: string;
counselorId: number;
isChosen: boolean;
}

Expand Down
36 changes: 18 additions & 18 deletions src/components/Seller/SellerOpenConsult/MainQuestionSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function MainQuestionSection() {
</div>
<Space height="1rem" />
</MainQuestionText>
<ButtonList>
{/* <ButtonList>
<ButtonItem>
<HeartIcon />
<Caption1 color={Grey2}>{card?.totalLike}</Caption1>
Expand All @@ -55,7 +55,7 @@ function MainQuestionSection() {
<SaveResizeIcon />
<Caption1 color={Grey2}>{card?.totalScrap}</Caption1>
</ButtonItem>
</ButtonList>
</ButtonList> */}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

해당 주석이 추후에 사용되는 코드이면 주석으로 TODO: use later 이런식으로 표기해주고, 사용되지 않는다면 지워주시면 좋을거 같아요!

</MainQuestionWrapper>
);
}
Expand Down Expand Up @@ -103,22 +103,22 @@ const Circle = styled.div`
background-color: ${Grey3};
`;

const ButtonList = styled.div`
display: flex;
gap: 1.2rem;
`;
// const ButtonList = styled.div`
// display: flex;
// gap: 1.2rem;
// `;

const ButtonItem = styled.div`
border-radius: 0.8rem;
background: ${Grey6};
display: flex;
padding: 0.6rem 1.2rem 0.6rem 0.6rem;
align-items: center;
gap: 0.4rem;
`;
// const ButtonItem = styled.div`
// border-radius: 0.8rem;
// background: ${Grey6};
// display: flex;
// padding: 0.6rem 1.2rem 0.6rem 0.6rem;
// align-items: center;
// gap: 0.4rem;
// `;

const SaveResizeIcon = styled(SaveIcon)`
width: 2rem;
height: 2rem;
`;
// const SaveResizeIcon = styled(SaveIcon)`
// width: 2rem;
// height: 2rem;
// `;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

마찬가지로 사용되지 않는 주석이면 지워주세요!

export default React.memo(MainQuestionSection);
1 change: 0 additions & 1 deletion src/pages/Buyer/BuyerFinishPayment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ function BuyerFinishPayment() {
<Heading color={Green} margin="0 0 2.2rem 0">
상담 신청 완료
</Heading>
<Body2>blabla</Body2>
</div>
<div className="buttons">
<Button
Expand Down
Loading
Loading