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

[회비 생성] - 회비 생성 기능 리팩토링 #198

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
aac55ea
fix: routeParam을 추가하여 잘못된 페이지 이동 에러 수정
dooohun Sep 20, 2024
5e7fff6
feat: 엑셀 파일 읽기 추가
dooohun Sep 20, 2024
6819022
feat: members 타입에 isFeeExempt 추가
dooohun Oct 1, 2024
08a8277
feat: 멤버의 회비 정로를 가져오는 함수 추가
dooohun Oct 1, 2024
52c5609
feat: 회비를 업데이트 하는 함수 추가
dooohun Oct 1, 2024
3c339ce
feat: 엑셀 워크시트에 미납 정보를 업데이트
dooohun Oct 1, 2024
918e9e8
feat: 전체 리팩토링 및 필요없는 기능 삭제
dooohun Oct 1, 2024
4bf42d2
Merge branch 'main' into feature/make_dues
dooohun Oct 1, 2024
75a6cfa
feat: 에러 시 스낵바를 출력하도록 변경
dooohun Oct 1, 2024
6fd7244
fix: YearPagination에서 빼먹은 routeParam 추가
dooohun Oct 1, 2024
92889a7
feat: 직책생성시 동명이인방지, 이메일기반 검색
MinGu-Jeong Oct 8, 2024
25b4c47
chore: yarn
MinGu-Jeong Oct 8, 2024
3264be0
refactor: 불필요 타입 제거
MinGu-Jeong Oct 8, 2024
3485d88
fix: 페이지네이션 navigate 시 pageName에 속한 페이지로 이동하도록 변경
dooohun Jan 6, 2025
bfa10da
fix: 각 페이지네이션에 속한 페이지명 문자열 추가
dooohun Jan 6, 2025
16a14d2
feat: 회비 내역 동기화 api 및 커스텀 훅 추가
dooohun Jan 7, 2025
ad784ff
feat: 경고 모달에 sheet-sync 기능 추가
dooohun Jan 7, 2025
736c2b5
feat: 회비 내역 동기화 기능 추가
dooohun Jan 7, 2025
992274d
style: 모달 width 450px에서 550px로 수정
dooohun Jan 7, 2025
355293b
Merge branch 'main' into feature/make_dues
dooohun Jan 27, 2025
8842c42
chore: 불필요한 훅 삭제
dooohun Jan 30, 2025
1ad7953
feat: 엑셀 데이터 중 필요한 데이터를 정제하는 parseExcelData 훅 추가
dooohun Jan 30, 2025
f3a2aec
feat: 회비 적용, 회비 면제자 적용, 회비 미납자 적용하는 훅 추가
dooohun Jan 30, 2025
2a1e902
feat: 엑셀 파일 읽기, 엑셀 파일 정제하기, 엑셀 파일을 DB에 적용하기 순서대로 작동하는 워크 플로우 훅 추가
dooohun Jan 30, 2025
ac7c1d8
refactor: useWorkflowPipeline 훅 적용, 이전에 사용한 훅 삭제
dooohun Jan 30, 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
17 changes: 10 additions & 7 deletions src/component/YearPagination/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { ArrowBackIosNewOutlined, ArrowForwardIosOutlined } from '@mui/icons-material';
import { Button } from '@mui/material';
import { useNavigate } from 'react-router-dom';
import { LAST_DUES_YEAR } from 'util/constants/status';
import { useQueryParam } from 'util/hooks/useQueryParam';
import * as S from './style';
import {
ArrowBackIosNewOutlined,
ArrowForwardIosOutlined,
} from "@mui/icons-material";

Check failure on line 4 in src/component/YearPagination/index.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Strings must use singlequote
import { Button } from "@mui/material";

Check failure on line 5 in src/component/YearPagination/index.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Strings must use singlequote
import { useNavigate } from "react-router-dom";

Check failure on line 6 in src/component/YearPagination/index.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Strings must use singlequote
import { LAST_DUES_YEAR } from "util/constants/status";

Check failure on line 7 in src/component/YearPagination/index.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Strings must use singlequote
import { useQueryParam } from "util/hooks/useQueryParam";

Check failure on line 8 in src/component/YearPagination/index.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Strings must use singlequote
import * as S from "./style";

Check failure on line 9 in src/component/YearPagination/index.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Strings must use singlequote

interface YearPaginationProps {
pageName: string;
Expand All @@ -14,7 +17,7 @@
export default function YearPagination({ pageName, duesYear, setDuesYear }: YearPaginationProps) {
const navigate = useNavigate();
const currentYear = new Date().getFullYear();
const param = useQueryParam('page');
const param = useQueryParam("page");

Check failure on line 20 in src/component/YearPagination/index.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Strings must use singlequote
const page = Number(param);

const goToPrevYear = () => {

Choose a reason for hiding this comment

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

주요 사항:

  1. 코드에서 큰 오류는 없으나, 코드 스타일 일관성을 개선할 수 있는 부분이 있습니다.
  2. 문자열을 정의할 때 일관성 있게 작은 따옴표나 큰 따옴표 중 하나를 사용하면 코드 가독성이 좋아집니다.

개선 제안 사항:

  • 문자열 사용 시 큰 따옴표로 통일하였고, 추가적으로 코드 스타일에 대한 개선을 제안합니다.
   const param = useQueryParam('page');
+  const param = useQueryParam("page");

이 외에도, 코드 라인의 일관성을 위해 모든 문자열을 큰 따옴표로 통일하는 것을 추천합니다. 또는 팀의 코드 스타일 가이드에 따라 따옴표 사용을 통일하는 것이 좋습니다.

Expand Down
1 change: 1 addition & 0 deletions src/model/member.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export interface Member {
updatedAt: string;
isAuthed: boolean;
isDeleted: boolean;
isFeeExempt: boolean;
deleteReason: string;
birthday: string;
}

Choose a reason for hiding this comment

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

주어진 코드에서 Member 인터페이스에 isFeeExempt 필드가 추가되었습니다. 이 필드는 어떤 기능적 요구사항을 기반으로 추가된 것인지 명확하지 않은데, 이는 독자의 이해를 돕기 위해 주석으로 설명하는 것이 좋습니다.

아래는 개선이 필요한 부분을 diff 형식으로 제안합니다.

@@ -42,6 +42,8 @@ export interface Member {
   isDeleted: boolean;
+  /** 사용자가 수수료 면제 상태인지 여부 */
   isFeeExempt: boolean;
   deleteReason: string;
   birthday: string;
 }

주요 사항 및 개선 제안:

  1. isFeeExempt 필드에 대해 어떤 역할을 하는지 주석을 추가하여 코드의 가독성을 높였습니다. 이렇게 함으로써 다른 개발자가 이 필드의 목적을 쉽게 이해할 수 있도록 하였습니다.

Expand Down
Loading