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

[fix] - 2차 QA 반영 #256

Merged
merged 5 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion src/app/(route)/admin/(with-layout)/members/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ const AdminMembersListPage = () => {
) : (
data.memberInfos.map((item, index) => (
<TableBodyModule key={item.accountId}>
<TableBodyAtom isFirst>{index + 1}</TableBodyAtom>
<TableBodyAtom isFirst>
{(currentPage - 1) * 10 + index + 1}
Ginieee marked this conversation as resolved.
Show resolved Hide resolved
</TableBodyAtom>
<TableBodyAtom>{item.name}</TableBodyAtom>
<TableBodyAtom>{item.accountId}</TableBodyAtom>
<TableBodyAtom>{item.department}</TableBodyAtom>
Expand Down
4 changes: 3 additions & 1 deletion src/app/(route)/admin/(with-layout)/notices/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ const NoticesListPage = () => {
) : (
data.announcementInfos.map((item, index) => (
<TableBodyModule key={item.id}>
<TableBodyAtom isFirst>{index + 1}</TableBodyAtom>
<TableBodyAtom isFirst>
{(currentPage - 1) * 10 + index + 1}
</TableBodyAtom>
<TableBodyAtom>
{noticeTypeConverter[item.announcementType]}
</TableBodyAtom>
Expand Down
4 changes: 3 additions & 1 deletion src/app/(route)/admin/(with-layout)/points/policy/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ const AdminPointsPolicyPage = () => {
) : (
data.pointPolicyList.map((item, idx) => (
<TableBodyModule key={item.id}>
<TableBodyAtom isFirst>{idx + 1}</TableBodyAtom>
<TableBodyAtom isFirst>
{(page - 1) * 10 + idx + 1}
</TableBodyAtom>
<TableBodyAtom>
<div className="line-clamp-2 w-full text-start">
{item.policyTitle}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { usePostPointSupplyMutation } from '@/_hooks/admin/usePostPointSupplyMut
import { MemberType } from '@/_types/adminType';
import Image from 'next/image';
import { useRouter } from 'next/navigation';
import { useRef, useState } from 'react';
import { useState } from 'react';
import AdminLoading from '@/_components/admin/adminLoading';
import { departmentList } from '@/_types/commonType';

Expand Down Expand Up @@ -191,7 +191,12 @@ const AdminPointsRewardNewPage = () => {
<TableBodyModule key={member.accountId}>
<TableBodyAtom
isFirst
isBoolean={selectedRequest.includes(member)}
isBoolean={
!!selectedRequest.find(
(request) =>
request.accountId === member.accountId,
)
}
onClickBoolean={() => [
setSelectedRequest((prev) =>
prev.includes(member)
Expand Down
4 changes: 3 additions & 1 deletion src/app/(route)/admin/(with-layout)/points/reward/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ const AdminPointsRewardPage = () => {
) : (
data.pointSupplyList.map((item, index) => (
<TableBodyModule key={item.id}>
<TableBodyAtom isFirst>{index + 1}</TableBodyAtom>
<TableBodyAtom isFirst>
{(currentPage - 1) * 10 + index + 1}
</TableBodyAtom>
<TableBodyAtom
color={
item.pointSupplyType === 'GROUP'
Expand Down
4 changes: 3 additions & 1 deletion src/app/(route)/admin/(with-layout)/workation/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ const WorkationList = () => {
) : (
data.wktInfos.map((item, index) => (
<TableBodyModule key={item.wktId}>
<TableBodyAtom isFirst>{index + 1}</TableBodyAtom>
<TableBodyAtom isFirst>
{(currentPage - 1) * 10 + index + 1}
</TableBodyAtom>
<TableBodyAtom>{item.title}</TableBodyAtom>
<TableBodyAtom>
{dayjs(item.createdAt).format('YYYY.MM.DD')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ const AdminWorkationReviewsPage = () => {
) : (
data.reviewList.map((item, order) => (
<TableBodyModule key={item.id}>
<TableBodyAtom isFirst>{order + 1}</TableBodyAtom>
<TableBodyAtom isFirst>
{(currentPage - 1) * 10 + order + 1}
</TableBodyAtom>
<TableBodyAtom>
<div className="flex justify-center">
{[...Array(item.rating)].map((_, index) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,8 @@ const PointPolicyInfoModule = () => {
적용됩니다.
</li>
<li>
새로운 정책에 대해 모든 회원에게 메일을 통해 안내 되며, 회원은 이러한
정책에 알맞은 포인트 신청을 진행할 수 있습니다.
</li>
<li>
기존 정책 수정 시에도 회원들에게 메일을 통해 안내됩니다. 잦은 수정은
지양해주시길 바랍니다.
회원은 이러한 정책에 알맞은 포인트 신청을 진행할 수 있습니다. 잦은
수정은 지양해주시길 바랍니다.
</li>
<li>{`단발성 이벤트로 인한 포인트 지급은 정책 등록이 아닌 공지 > 이벤트 등록과 단체 포인트 지급하기 기능을 이용해주세요.`}</li>
</ul>
Expand Down
9 changes: 8 additions & 1 deletion src/app/_hooks/admin/useGetMemberListInfiniteQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@ export const useGetMemberListInifiniteQuery = ({
queryFn: async ({ pageParam = pageable }) => {
const { page, size, sort } = pageParam; // Destructure page, size, and sort from pageParam
const res = await api.get('/api/member', {
params: { name: searchText, department, page, size, sort }, // Ensure the sort parameter is passed here
params: {
name: searchText,
department,
isPenalty: true,
page,
size,
sort,
}, // Ensure the sort parameter is passed here
});
return memberListSchema.parse(res.data.data);
},
Expand Down
Loading