Skip to content

Commit

Permalink
Merge pull request #415 from sharemindteam/hotfix/minder-profit
Browse files Browse the repository at this point in the history
마인더 정산신청 페이지 무한스크롤 오류 해결 및 DTO 업데이트
  • Loading branch information
rmdnps10 authored Nov 6, 2024
2 parents 072e76e + 3df9486 commit 803b2a0
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 119 deletions.
4 changes: 2 additions & 2 deletions src/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { BuyerMypage } from 'pages/Buyer/BuyerMypage';
import { BuyerSearch } from 'pages/Buyer/BuyerSearch';
import { BuyerSearchResult } from 'pages/Buyer/BuyerSearchResult';
import { BuyerSignup } from 'pages/Buyer/BuyerSignup';
import { SellerCaculateManagement } from 'pages/Seller/SellerCalculateManagement';
import { SellerConsult } from 'pages/Seller/SellerConsult';
import { SellerHome } from 'pages/Seller/SellerHome';
import { SellerLetter } from 'pages/Seller/SellerLetter';
Expand Down Expand Up @@ -56,6 +55,7 @@ import SellerProfitBankAccount from 'pages/Seller/SellerProfitBankAccount';
import ServerDown from 'pages/Common/ServerDown';
import SellerUpdateFail from 'pages/Seller/SellerUpdateFail';
import { BuyerManyLovedCounselor } from 'pages/Buyer/BuyerManyLovedCounselor';
import SellerCalculateManagement from 'pages/Seller/SellerCalculateManagement';

const Router = () => {
return (
Expand Down Expand Up @@ -164,7 +164,7 @@ const Router = () => {
{/* 판매자 : 수익 관리 */}
<Route
path="/minder/calculatemanagement"
element={<SellerCaculateManagement />}
element={<SellerCalculateManagement />}
/>
{/* 판매자 : 마인더 인증 */}
<Route path="/minder/education/*" element={<SellerVerifyMaterial />} />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Button } from 'components/Common/Button';
import { Space } from 'components/Common/Space';
import { ManageList } from 'pages/Seller/SellerCalculateManagement';
import React from 'react';
import styled from 'styled-components';
import { Grey4 } from 'styles/color';
Expand All @@ -14,17 +15,22 @@ interface CompleteApplyPopupProps {
date: string;
consultType: string;
setIsCompleteApplyManage: React.Dispatch<React.SetStateAction<boolean>>;
setManagementList: React.Dispatch<React.SetStateAction<ManageList>>;

id: number;
}

//
//
//

function CompleteApplyPopup({
name = '김고민',
date = '2001.12.15',
consultType = '무슨',
name,
date,
consultType,
setIsCompleteApplyManage,
setManagementList,
id,
}: CompleteApplyPopupProps) {
return (
<CompleteApplyPopupBox>
Expand All @@ -39,6 +45,9 @@ function CompleteApplyPopup({
width="calc(100% - 3.2rem)"
onClick={() => {
setIsCompleteApplyManage(false);
setManagementList((prev: ManageList) =>
prev.filter((item) => item.paymentId !== id),
);
}}
/>
</CompleteApplyPopupBox>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Grey3, Grey6, Green, White } from 'styles/color';
import { Body1, Body3 } from 'styles/font';
import CompleteApplyPopup from './CompleteApplyPopup';
import { BackDrop } from 'components/Common/BackDrop';
import { ManageList } from 'pages/Seller/SellerCalculateManagement';

interface SellerCalulateCardProps {
customerName: string;
Expand All @@ -13,11 +14,14 @@ interface SellerCalulateCardProps {
salePrice: number;
commission: number;
paymentDate: string;
consultDate: string;
paymentAccount: string;
id: number;
calculateActivate: boolean;
isShowPopup: boolean;
setIsShowPopup: any;
manageStatus: string;
setManagementList: React.Dispatch<React.SetStateAction<ManageList>>;
}

export const SellerCalulateCard = ({
Expand All @@ -28,10 +32,13 @@ export const SellerCalulateCard = ({
commission,
paymentAccount,
paymentDate,
consultDate,
calculateActivate,
id,
isShowPopup,
setIsShowPopup,
manageStatus,
setManagementList,
}: SellerCalulateCardProps) => {
const applyManagement = async (id: number) => {
const res: any = await patchApplyPayments(id);
Expand Down Expand Up @@ -59,6 +66,8 @@ export const SellerCalulateCard = ({
consultType={consultType}
date={paymentDate}
setIsCompleteApplyManage={setIsShowPopup}
setManagementList={setManagementList}
id={id}
/>
)}
<SellerCalulateCardWrapper>
Expand All @@ -81,7 +90,13 @@ export const SellerCalulateCard = ({
<Body3>{commission.toLocaleString()}</Body3>
</ConsultEarnInfoItem>
<ConsultEarnInfoItem>
<Body3 color={Grey3}>지급일자</Body3>
<Body3 color={Grey3}>상담일자</Body3>
<Body3>{consultDate}</Body3>
</ConsultEarnInfoItem>
<ConsultEarnInfoItem>
<Body3 color={Grey3}>
{manageStatus === '완료' ? '지급일자' : '지급예정'}
</Body3>
<Body3>{paymentDate}</Body3>
</ConsultEarnInfoItem>
<ConsultEarnInfoItem>
Expand Down
Loading

0 comments on commit 803b2a0

Please sign in to comment.