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

[merge] v0.0.38 release #254

Merged
merged 102 commits into from
Aug 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
2070ac5
feat: λ§ˆμ΄νŽ˜μ΄μ§€, 고객지원 ν—€λ”μš© μ•„μ΄μ½˜ μΆ”κ°€
maylh Aug 15, 2024
9078deb
feat: λ§ˆμ΄νŽ˜μ΄μ§€ 헀더 이미지 및 μ•„μ΄μ½˜ 적용
maylh Aug 15, 2024
5f03655
feat: 고객지원 헀더 이미지 및 μ•„μ΄μ½˜ 적용
maylh Aug 15, 2024
8aa0526
fix: λ‚΄ μ›ŒμΌ€μ΄μ…˜ λͺ©λ‘ 필터링 및 μ •λ ¬ μˆ˜μ •
maylh Aug 16, 2024
febdca9
feat: 필터링 refreshHandler 적용
maylh Aug 16, 2024
104db57
design: empty 문ꡬ css μˆ˜μ •
maylh Aug 16, 2024
c8f2561
refactor: 주석 μ‚­μ œ
maylh Aug 16, 2024
c9e4020
chore: pr-CI.yml
MinhoJJang Aug 16, 2024
221c22d
Merge pull request #236 from TEAM-MONGDOL/MF-362-CI-for-PRs-to-develo…
MinhoJJang Aug 16, 2024
14ffdb5
fix: μ›ŒμΌ€μ΄μ…˜ μ‹ μ²­ 내역에 λ¬΄ν•œμŠ€ν¬λ‘€ 적용
maylh Aug 16, 2024
ad6e1e5
fix: λ¬΄ν•œμŠ€ν¬λ‘€ sort 적용 μ•ˆλ˜λŠ” 이슈 ν•΄κ²°
maylh Aug 16, 2024
689cff5
feat: λΈ”λΌμΈλ“œ 처리된 ν›„κΈ°μ˜ 경우 ν›„κΈ° 상세 νŽ˜μ΄μ§€ 상단에 κ΄€λ ¨ μ•ˆλ‚΄ 멘트 μΆ”κ°€
maylh Aug 16, 2024
d8a5233
fix: 쑰건문 μˆ˜μ •
maylh Aug 16, 2024
8af0fbc
refactor: λΆˆν•„μš”ν•œ μ½”λ“œ μ‚­μ‘”
eunji0714 Aug 14, 2024
a1dcc4b
fix: 곡지사항 제λͺ© κΈ€μž 수 μ œν•œ 30자둜 λ³€κ²½
maylh Aug 16, 2024
a6541cb
fix: 곡지사항 μˆ˜μ •>곡지사항 제λͺ© κΈ€μž 수 μ œν•œ 30자둜 λ³€κ²½
maylh Aug 16, 2024
f582dc4
fix: 곡지사항 μž‘μ„± νŽ˜μ΄μ§€μ—μ„œ ꡬ뢄 선택에 λ”°λ₯Έ placeholder 쑰건문 μ‚­μ œ
maylh Aug 16, 2024
30b32b8
fix: 파일 μ»¨ν…Œμ΄λ„ˆμ— μ΅œλŒ€ 갯수 및 μš©λŸ‰ μ œν•œ 쑰건 μΆ”κ°€
maylh Aug 16, 2024
7c81d4d
fix: 곡지사항 μž‘μ„± νŽ˜μ΄μ§€μ— 파일 첨뢀 μ΅œλŒ€ 갯수 및 μš©λŸ‰ 지정
maylh Aug 16, 2024
f1e8831
fix: 곡지사항 μˆ˜μ • νŽ˜μ΄μ§€μ— 파일 첨뢀 μ΅œλŒ€ 갯수 및 μš©λŸ‰ 지정
maylh Aug 16, 2024
0e19ec0
fix: 곡지사항 λͺ©λ‘ νŽ˜μ΄μ§€μ— μ„œμΉ˜ 인풋 μ‚­μ œ
maylh Aug 16, 2024
463ad0d
feat: ꡬ뢄과 제λͺ©μ΄ λͺ¨λ‘ μž…λ ₯된 κ²½μš°μ—λ§Œ κ²Œμ‹œκΈ€ 등둝 κ°€λŠ₯
maylh Aug 16, 2024
478f5d1
feat: ꡬ뢄과 제λͺ©μ΄ λͺ¨λ‘ μž…λ ₯된 κ²½μš°μ—λ§Œ κ²Œμ‹œκΈ€ μˆ˜μ • κ°€λŠ₯
maylh Aug 16, 2024
509afdb
feat: κ²Œμ‹œκΈ€ μˆ˜μ • successCallback에 κ΄€λ ¨ alert μΆ”κ°€
maylh Aug 16, 2024
912be0e
feat: 곡지사항 등둝 μ‹œ 등둝 μ—¬λΆ€λ₯Ό ν™•μΈν•˜λŠ” λͺ¨λ‹¬ μΆ”κ°€
maylh Aug 16, 2024
ce83106
fix: 곡지사항 등둝 μ—¬λΆ€ 확인 λͺ¨λ‹¬ ν…μŠ€νŠΈμ— κ²Œμ‹œκΈ€ ꡬ뢄 반영
maylh Aug 16, 2024
1ecde51
design: WorkationCard μ»΄ν¬λ„ŒνŠΈ margin μˆ˜μ •
maylh Aug 16, 2024
f2e8716
feat: SearchingBoxModule μ»΄ν¬λ„ŒνŠΈ 검색 κΈ°λŠ₯ κ΅¬ν˜„ 및 폼 제좜 방식 적용
maylh Aug 16, 2024
35ae9fa
fix: useGetMemberListQuery searchParam 반영
maylh Aug 16, 2024
1348152
fix: useGetMemberListQuery searchParam 적용
maylh Aug 16, 2024
87ec410
refactor: 당첨 ν™•μ •μž ꡬ뢄 쑰건 λ³€κ²½
eunji0714 Aug 16, 2024
bc88ada
fix: μ–΄λ“œλ―Ό μ›ŒμΌ€μ΄μ…˜ μ‹ μ²­ λͺ©λ‘ order μ •λ ¬ μˆ˜μ •
maylh Aug 16, 2024
451c2c7
fix: μ–΄λ“œλ―Ό μ›ŒμΌ€μ΄μ…˜ μ‹ μ²­ λͺ©λ‘ 진행 μƒνƒœ 필터링 μˆ˜μ •
maylh Aug 16, 2024
885c894
fix: μ›ŒμΌ€μ΄μ…˜ μ‹ μ²­ λͺ©λ‘ 내역에 λ² νŒ…ν¬μΈνŠΈ, ν™•λ₯  κΈ€μžμƒ‰ μˆ˜μ •
maylh Aug 16, 2024
ec0f0a1
fix: μ›ŒμΌ€μ΄μ…˜ μ‹ μ²­ λͺ©λ‘ 내역에 진행 μƒνƒœ ν…μŠ€νŠΈ 색 μˆ˜μ •
maylh Aug 16, 2024
df52ba0
fix: μ›ŒμΌ€μ΄μ…˜ μ‹ μ²­ λͺ©λ‘ λ‚΄μ—­ μ •λ ¬ μˆ˜μ •
maylh Aug 16, 2024
89b81d0
fix: 포인트 μ‚¬μš© λ‚΄μ—­ μ •λ ¬ μˆ˜μ •
maylh Aug 17, 2024
5f9c2c8
refactor: λ‹Ήμ²¨μœ„μΉ˜μ— 멈좀
eunji0714 Aug 17, 2024
518b56f
refactor: μŠ¬λΌμ΄λ” hover μœ„μΉ˜ λ³€κ²½
eunji0714 Aug 17, 2024
5ac03bf
fix: environment variables injection method
MinhoJJang Aug 17, 2024
078529e
refactor: λ‹Ήμ²¨μž λΆ€λΆ„ ν‘œμ‹œ
eunji0714 Aug 17, 2024
d31c8a1
Merge pull request #230 from TEAM-MONGDOL/MF-359-Design-Banner
maylh Aug 17, 2024
eada106
Merge pull request #240 from TEAM-MONGDOL/MF-366-WkSimulationRefactor
eunji0714 Aug 17, 2024
8f85e63
fix: set timezone KST
MinhoJJang Aug 17, 2024
df67d89
Merge pull request #233 from TEAM-MONGDOL/MF-332-Fix-WktHistoryFiltering
maylh Aug 17, 2024
5ff0690
Merge pull request #237 from TEAM-MONGDOL/MF-364-QA-BlindReviewMsg
maylh Aug 17, 2024
114dfe0
Merge pull request #238 from TEAM-MONGDOL/MF-365-QA-AdminNotice
maylh Aug 17, 2024
3f92090
Merge pull request #239 from TEAM-MONGDOL/MF-368-change-environment-v…
MinhoJJang Aug 17, 2024
ecd49e1
feat: 넀비바에 λ°°λ„ˆλͺ©λ‘ μΆ”κ°€
eunji0714 Aug 17, 2024
7e9fe9d
refactor: μ›ŒμΌ€μ΄μ…˜ λͺ©λ‘ 필터링 nullμΌλ•Œ μ—λŸ¬ μˆ˜μ •
eunji0714 Aug 17, 2024
e639d58
refactor: μž₯μ†Œ 제λͺ© κΈ€μžμˆ˜ μˆ˜μ •, 파일 개수 및 μš©λŸ‰ μ œν•œ
eunji0714 Aug 17, 2024
f95627c
refactor: μ›ŒμΌ€μ΄μ…˜ ν›„κΈ° 필터링 μž₯μ†Œ μˆ˜μ •
eunji0714 Aug 17, 2024
9ccf27c
refactor: μ›ŒμΌ€μ΄μ…˜ ν›„κΈ° 필터링 μž₯μ†Œ nullμΌμ‹œ μ—λŸ¬ μˆ˜μ •
eunji0714 Aug 17, 2024
95a5b75
refactor: μ›ŒμΌ€μ΄μ…˜ ν›„κΈ° λΈ”λΌμΈλ“œ refetchμΆ”κ°€
eunji0714 Aug 17, 2024
1f71c58
refactor: μ›ŒμΌ€μ΄μ…˜ 결과쑰회 κ°€λ‚˜λ‹€μˆœ μˆœμ„œ 뒀집기
eunji0714 Aug 17, 2024
6eb10f3
fix: λ² νŒ… 포인트 μ •λ ¬ μˆ˜μ •
maylh Aug 17, 2024
2cf9bb0
fix: λΆ€μ„œ 별 필터링 λͺ¨λ‘ 선택 μ•ˆν–ˆμ„ λ•Œ emptyContainer λ Œλ”λ§
maylh Aug 17, 2024
d760c2c
fix: μ–΄λ“œλ―Ό νšŒμ› λͺ©λ‘ 쑰회 칼럼 λ„ˆλΉ„ μ‘°μ •
maylh Aug 17, 2024
5e495b1
refactor: ν•„ν„°λ§μ—μ„œ ν•­λͺ©μ„ μ²΄ν¬ν• λ•Œλ§ˆλ‹€ μƒˆλ‘œκ³ μΉ¨λ˜κ³  μ§„ν–‰μƒνƒœ 토글이 μžλ™μœΌλ‘œ λ‹«νžˆλŠ” μ—λŸ¬ μˆ˜μ •
eunji0714 Aug 17, 2024
7a274cb
fix: usePostBannerMutation 쿼리 ν‚€ μˆ˜μ •
maylh Aug 17, 2024
60d74e8
refactor: μ›ŒμΌ€μ΄μ…˜ ν›„κΈ° λΈ”λΌμΈλ“œ λ°”λ‘œ λ°”λ€Œκ²Œ μˆ˜μ •
eunji0714 Aug 17, 2024
3779038
fix: λΉ„λ°€λ²ˆν˜Έ μ°ΎκΈ° 인증번호 5λΆ„ νƒ€μž„μ•„μ›ƒ μ„€μ •
Ginieee Aug 17, 2024
6bc2663
refactor: μ›ŒμΌ€μ΄μ…˜ λͺ©λ‘ refresh 정상 μž‘λ™
eunji0714 Aug 17, 2024
39f9215
refactor: μ›ŒμΌ€μ΄μ…˜ μ’…λ£Œλ‚ μ§œ 필터링 λ™μž‘μ•ˆν•¨ ν•΄κ²°
eunji0714 Aug 17, 2024
cca6e1b
fix: 포인트 지급 λͺ©λ‘μ— 이름 검색 μ‚­μ œ
Ginieee Aug 17, 2024
4c95e70
fix: 포인트 지급 λ‚΄μ—­ 상세 νŽ˜μ΄μ§€λ„€μ΄μ…˜ μ—°κ²°
Ginieee Aug 17, 2024
26e084d
fix: 필터링바에 μ˜€λ²„ν”Œλ‘œμš° 슀크둀 적용
Ginieee Aug 17, 2024
999beb2
fix: useGetPointSupplyDetailQuery에 νŽ˜μ΄μ§€λ„€μ΄μ…˜ 적용
Ginieee Aug 17, 2024
240a1c7
refactor: λͺ¨μ§‘ μ˜ˆμ • μ›ŒμΌ€μ΄μ…˜ μ‹ μ²­ λΆˆκ°€ν•˜κ²Œ ν•˜κΈ°
eunji0714 Aug 17, 2024
098f3bb
refactor: λͺ¨μ§‘ 마감일이 였늘일 경우 μ—λŸ¬ μˆ˜μ •
eunji0714 Aug 17, 2024
f089452
fix: 포인트 μ‹ μ²­λ‚΄μ—­ μ²΄ν¬λ°•μŠ€ 이슈 μˆ˜μ •
Ginieee Aug 17, 2024
e79bfad
fix: 포인트 μ‹ μ²­λ‚΄μ—­ 상세 refetch 적용
Ginieee Aug 17, 2024
c4153d5
refactor: νŽ˜λ„ν‹° 기간에 μ‹ μ²­λΆˆκ°€
eunji0714 Aug 17, 2024
7ad18a2
refactor: ν›„κΈ° 없을 λ•Œ 필터링 λ²„νŠΌ μ‚­μ œ
eunji0714 Aug 17, 2024
b831cc4
fix: 단체 포인트 지급 λŒ€μƒ 쑰회 이름 검색 적용
Ginieee Aug 17, 2024
216d2de
fix: μœ μ € λ©”μΈνŽ˜μ΄μ§€ λͺ¨μ§‘쀑 μ›ŒμΌ€μ΄μ…˜ 적용
Ginieee Aug 17, 2024
672feb1
refactor: μ›ŒμΌ€μ΄μ…˜ λΈ”λΌμΈλ“œ μ‹œ μžλ™ λ²„νŠΌ λ°”λ€œ
eunji0714 Aug 17, 2024
a406c43
Merge pull request #241 from TEAM-MONGDOL/MF-369-QA-AdminWkDetail
eunji0714 Aug 17, 2024
2599a0d
refactor: μ΅œμ‹ μˆœ μˆ˜μ •
eunji0714 Aug 17, 2024
2d8f2eb
Merge pull request #242 from TEAM-MONGDOL/MF-370-QA-AdminWkReview
eunji0714 Aug 17, 2024
4293471
Merge pull request #243 from TEAM-MONGDOL/MF-371-QA-AdminWkResult
eunji0714 Aug 17, 2024
b1ffc75
Merge pull request #247 from TEAM-MONGDOL/MF-383-QA-UserWkList
eunji0714 Aug 17, 2024
1d038e7
Merge pull request #249 from TEAM-MONGDOL/MF-384-QA-UserWkDetailStatus
eunji0714 Aug 17, 2024
448e7be
Merge pull request #246 from TEAM-MONGDOL/MF-372-QA-Login-Timeout
Ginieee Aug 17, 2024
55dc843
Merge pull request #248 from TEAM-MONGDOL/MF-373-QA-Points-Reward-Search
Ginieee Aug 17, 2024
bedc0f3
Merge pull request #250 from TEAM-MONGDOL/MF-375-QA-Point-Apply
Ginieee Aug 17, 2024
47df5ed
Merge pull request #251 from TEAM-MONGDOL/MF-378-QA-Points-Reward-New
Ginieee Aug 17, 2024
a488daf
refactor: μ›ŒμΌ€μ΄μ…˜ κ²°κ³Ό 곡개 μ „ λͺ©λ‘ μ‚­μ œ
eunji0714 Aug 17, 2024
5bb6b16
refactor: μ›ŒμΌ€μ΄μ…˜ λͺ©λ‘ μ»€μ„œ 포인터 λ³€κ²½
eunji0714 Aug 17, 2024
7ca948a
Merge pull request #244 from TEAM-MONGDOL/MF-381-QA-PostBannerQueryKey
maylh Aug 17, 2024
d13d655
fix: refreshHandler μˆ˜μ •
maylh Aug 17, 2024
b66ba5a
fix: νšŒμ› λͺ©λ‘ 검색 쑰건 μ„€μ •
maylh Aug 17, 2024
9745e2b
design: λ“œλ‘­λ‹€μš΄ μ»΄ν¬λ„ŒνŠΈ 크기 λ³€κ²½
maylh Aug 17, 2024
df8e6c5
Merge pull request #245 from TEAM-MONGDOL/MF-367-QA-AdminMembersFilte…
maylh Aug 17, 2024
60b0f48
refactor: μ›ŒμΌ€μ΄μ…˜ ν›„κΈ° λͺ©λ‘ 칼럼 λ³€κ²½
eunji0714 Aug 17, 2024
6e15586
refactor: 응λͺ¨μ™„λ£Œ μ‹œ μž¬μ‹ μ²­ λΆˆκ°€
eunji0714 Aug 18, 2024
68f6873
fix: useGetMyWktHistoryQuery에 refetch μΆ”κ°€
maylh Aug 18, 2024
2075aa3
refactor: μ–΄λ“œλ―Ό λ„€λΉ„λ°” μˆ˜μ •
eunji0714 Aug 18, 2024
9c93549
fix: λ² νŒ… 포인트 μˆ˜μ • μ¦‰μ‹œ μ—…λ°μ΄νŠΈ λ˜λ„λ‘ μˆ˜μ •
maylh Aug 18, 2024
cb70a8e
Merge pull request #252 from TEAM-MONGDOL/MF-389-QA-UserWkApply
eunji0714 Aug 18, 2024
9fc7ad6
Merge pull request #253 from TEAM-MONGDOL/MF-387-QA-QueryKey
maylh Aug 18, 2024
75da454
Merge branch 'main' into develop
MinhoJJang Aug 18, 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
19 changes: 8 additions & 11 deletions .github/workflows/nextjs-prod-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ jobs:
node-version: '18'
cache: 'npm'

- name: Create .env.local file
run: |
echo "NEXT_PUBLIC_SERVER_URL=${{ secrets.NEXT_PUBLIC_SERVER_URL }}" >> .env.local
echo "NEXTAUTH_SECRET=${{ secrets.NEXTAUTH_SECRET }}" >> .env.local
echo "NEXTAUTH_URL=${{ secrets.NEXTAUTH_URL }}" >> .env.local
echo "NEXT_PUBLIC_KAKAO_API_KEY=${{ secrets.NEXT_PUBLIC_KAKAO_API_KEY }}" >> .env.local

- name: Install dependencies
run: |
npm ci
Expand All @@ -41,11 +48,6 @@ jobs:

- name: Build Next.js app
run: npm run build
env:
NEXT_PUBLIC_SERVER_URL: ${{ secrets.NEXT_PUBLIC_SERVER_URL }}
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }}
NEXTAUTH_URL: ${{ secrets.NEXTAUTH_URL }}
NEXT_PUBLIC_KAKAO_API_KEY: ${{ secrets.NEXT_PUBLIC_KAKAO_API_KEY }}

- name: Get latest tag and create new tag
id: create_tag
Expand Down Expand Up @@ -99,11 +101,6 @@ jobs:
${{ env.PROJECT_NAME }}.kr-central-2.kcr.dev/${{ env.REPOSITORY_NAME }}/${{ env.IMAGE_NAME }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
NEXT_PUBLIC_SERVER_URL=${{ secrets.NEXT_PUBLIC_SERVER_URL }}
NEXTAUTH_SECRET=${{ secrets.NEXTAUTH_SECRET }}
NEXTAUTH_URL=${{ secrets.NEXTAUTH_URL }}
NEXT_PUBLIC_KAKAO_API_KEY: ${{ secrets.NEXT_PUBLIC_KAKAO_API_KEY }}

- name: Create Release
uses: actions/create-release@v1
Expand All @@ -114,4 +111,4 @@ jobs:
release_name: Release ${{ steps.create_tag.outputs.NEW_TAG }}
draft: false
prerelease: false
token: ${{ secrets.PAT }}
token: ${{ secrets.PAT }}
51 changes: 51 additions & 0 deletions .github/workflows/pr-CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI for PRs to develop and main

on:
pull_request:
branches:
- develop
- main

permissions:
contents: write

env:
PROJECT_NAME: dkation
REPOSITORY_NAME: dkation-prod-front
IMAGE_NAME: dkation-prod-fe

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'

- name: Install dependencies
run: |
npm ci
npm install -g npm@latest
npm install sharp

- name: Lint
run: npm run lint

- name: Build Next.js app
run: npm run build
env:
NEXT_PUBLIC_SERVER_URL: ${{ secrets.NEXT_PUBLIC_SERVER_URL }}
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }}
NEXTAUTH_URL: ${{ secrets.NEXTAUTH_URL }}
NEXT_PUBLIC_KAKAO_API_KEY: ${{ secrets.NEXT_PUBLIC_KAKAO_API_KEY }}

- name: Test Build Output
run: test -d .next
21 changes: 11 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,17 @@ FROM node:18-alpine AS runner
# Set working directory
WORKDIR /app

ARG NEXT_PUBLIC_SERVER_URL
ARG NEXTAUTH_SECRET
ARG NEXTAUTH_URL
ARG NEXT_PUBLIC_KAKAO_API_KEY

ENV NEXT_PUBLIC_SERVER_URL=${NEXT_PUBLIC_SERVER_URL}
ENV NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
ENV NEXTAUTH_URL=${NEXTAUTH_URL}
ENV NEXT_PUBLIC_KAKAO_API_KEY=${NEXT_PUBLIC_KAKAO_API_KEY}

# Set node environment to production
ENV NODE_ENV=production

# Set timezone to KST
ENV TZ=Asia/Seoul

# Install tzdata package and set timezone
RUN apk add --no-cache tzdata && \
cp /usr/share/zoneinfo/$TZ /etc/localtime && \
echo $TZ > /etc/timezone

# Add a non-root user
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
Expand All @@ -51,6 +49,9 @@ COPY --from=builder /app/package.json ./package.json
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static

# Copy the .env.local file
COPY --from=builder /app/.env.local ./

# Set the correct permission for prerender cache
RUN mkdir -p .next
RUN chown nextjs:nodejs .next
Expand Down
20 changes: 15 additions & 5 deletions src/app/(route)/(user)/(with-layout)/mypage/review/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import UserModalAtom from '@/_components/user/common/atoms/UserModalAtom';
import ReviewWktInfo from '@/_components/user/mypage/ReviewWktInfo';
import UserLoading from '@/_components/user/userLoading';
import NetworkError from '@/_components/common/networkError';
import { ErrorIcon } from '@/_assets/icons';

interface UserReviewDetailPageProps {
params: {
Expand Down Expand Up @@ -55,11 +56,20 @@ const UserReviewDetailPage = ({ params }: UserReviewDetailPageProps) => {
) : null
) : (
<>
<div className="flex flex-col gap-y-7 py-8">
<p className="mb-4 text-h2 font-semibold">
이번 μ›ŒμΌ€μ΄μ…˜ μž₯μ†Œ μ–΄λ•Œμš”?
</p>
<RatingStar readonly rating={data.reviewDetailInfo.rating} />
<div>
{data.reviewDetailInfo.blindedType &&
data.reviewDetailInfo.blindedType === 'TRUE' && (
<div className="flex items-center gap-x-1.5 text-negative">
<Image src={ErrorIcon} alt="error" />
κ΄€λ¦¬μžμ— μ˜ν•΄ λΈ”λΌμΈλ“œ 처리된 ν›„κΈ°μž…λ‹ˆλ‹€.
</div>
)}
<div className="flex flex-col gap-y-7 pb-8 pt-4">
<p className="mb-4 text-h2 font-semibold">
이번 μ›ŒμΌ€μ΄μ…˜ μž₯μ†Œ μ–΄λ•Œμš”?
</p>
<RatingStar readonly rating={data.reviewDetailInfo.rating} />
</div>
</div>

<div className="flex flex-col">
Expand Down
153 changes: 106 additions & 47 deletions src/app/(route)/(user)/(with-layout)/mypage/wk-history/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'use client';

import React, { useState } from 'react';
import React, { useCallback, useEffect, useState } from 'react';
import { useRouter } from 'next/navigation';
import dayjs from 'dayjs';
import InfiniteScroll from 'react-infinite-scroller';
import { usePatchWktStatusMutation } from '@/_hooks/user/usePatchWktStatusMutation';
import UserFilteringSectionContainer from '@/_components/user/common/containers/UserFilteringSectionContainer';
import UserStateFilteringContainer from '@/_components/user/common/containers/UserStateFilteringContainer';
import UserPlaceFilteringContainer from '@/_components/user/common/containers/UserPlaceFilteringContainer';
import WorkationCard from '@/_components/user/mypage/UserWktCard';
import { useGetMyWktHistoryQuery } from '@/_hooks/user/useGetMyWktHistoryQuery';
import UserWktCancelModal from '@/_components/user/mypage/UserWktCancelModal';
Expand All @@ -15,12 +15,13 @@ import { useDeleteWktApplyMutation } from '@/_hooks/user/useDeleteWktApplyMutati
import { useSession } from 'next-auth/react';
import UserLoading from '@/_components/user/userLoading';
import NetworkError from '@/_components/common/networkError';
import UserDatePickerContainer from '@/_components/user/common/containers/UserDatePickerContainer';
import { DatePickerTagType } from '@/_types/commonType';

const UserWkHistoryPage = () => {
const router = useRouter();
const session = useSession();
const accountId = String(session.data?.accountId || '');
const [currentPage, setCurrentPage] = useState(1);
const [startDate, setStartDate] = useState<Date | null>(null);
const [endDate, setEndDate] = useState<Date | null>(null);
const [param, setParam] = useState<{
Expand All @@ -43,9 +44,9 @@ const UserWkHistoryPage = () => {
const [isFilteringSectionOpen, setIsFilteringSectionOpen] = useState<
'FILTER' | 'ORDER' | null
>(null);
const [selectedState, setSelectedState] = useState<string>('ALL');
const [selectedState, setSelectedState] = useState<string>('');
const [selectedOrder, setSelectedOrder] = useState<string>('createdAt,DESC');
const [selectedSpace, setSelectedSpace] = useState<string[]>(['μ–‘μ–‘ μ λΉ„μΉ˜']);
const [selectedTag, setSelectedTag] = useState<DatePickerTagType>('ALL');
const [selectedWorkationId, setSelectedWorkationId] = useState<number | null>(
null,
);
Expand All @@ -59,22 +60,27 @@ const UserWkHistoryPage = () => {
| null
>(null);

const { data, isLoading, isError } = useGetMyWktHistoryQuery({
// statuses: param.type.join(','),
startDate: startDate
? dayjs(startDate).format('YYYY-MM-DDTHH:mm:ss')
: undefined,
endDate: endDate ? dayjs(endDate).format('YYYY-MM-DDTHH:mm:ss') : undefined,
pageParam: {
page: currentPage,
size: 10,
sort: `createdAt,${param.order}`,
},
});
const { data, isLoading, isError, fetchNextPage, hasNextPage, refetch } =
useGetMyWktHistoryQuery({
statuses: param.type.join(','),
startDate: startDate
? dayjs(startDate).format('YYYY-MM-DDTHH:mm:ss')
: undefined,
endDate: endDate
? dayjs(endDate).format('YYYY-MM-DDTHH:mm:ss')
: undefined,
pageable: {
page: 1,
size: 10,
sort: selectedOrder,
},
});

const { mutate: patchWktStatus } = usePatchWktStatusMutation({
wktId: selectedWorkationId || 0,
successCallback: () => {},
successCallback: () => {
refetch();
},
errorCallback: (error) => {
alert(`μ—λŸ¬κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€ : ${error.message}`);
},
Expand All @@ -84,6 +90,7 @@ const UserWkHistoryPage = () => {
successCallback: () => {
alert('신청이 μ·¨μ†Œλ˜μ—ˆμŠ΅λ‹ˆλ‹€.');
setIsCancelModalOpen(false);
refetch();
},
errorCallback: (error) => {
alert(`μ—λŸ¬κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€ : ${error.message}`);
Expand Down Expand Up @@ -140,6 +147,40 @@ const UserWkHistoryPage = () => {
setConfirmModalType(null);
};

const updateParam = useCallback(() => {
setParam((prev) => ({
...prev,
type: selectedState ? [selectedState] : prev.type,
order: selectedOrder,
startDate: startDate
? dayjs(startDate).format('YYYY-MM-DDTHH:mm:ss')
: null,
endDate: endDate ? dayjs(endDate).format('YYYY-MM-DDTHH:mm:ss') : null,
}));
}, [selectedState, selectedOrder, startDate, endDate]);

const refreshHandler = () => {
setParam({
order: 'DESC',
type: [
'APPLIED',
'RAFFLE_WAIT',
'NO_WINNING',
'CONFIRM_WAIT',
'CANCEL',
'CONFIRM',
'WAIT',
'VISITED',
],
});
setStartDate(null);
setEndDate(null);
};

useEffect(() => {
updateParam();
}, [selectedState, selectedOrder, startDate, endDate, updateParam]);

return (
<section className="px-40 pt-18">
<div className="flex flex-col gap-y-14">
Expand All @@ -155,19 +196,22 @@ const UserWkHistoryPage = () => {
isFilterOpen: isFilteringSectionOpen === 'FILTER',
filterChildren: (
<>
<UserDatePickerContainer
selectedTag={selectedTag}
onClickTag={(tag) => setSelectedTag(tag)}
startDate={startDate}
setStartDate={setStartDate}
endDate={endDate}
setEndDate={setEndDate}
/>
<UserStateFilteringContainer
type="MYPAGE"
selectedOption={selectedState}
onClickOption={setSelectedState}
/>
<UserPlaceFilteringContainer
places={['μ–‘μ–‘ μ λΉ„μΉ˜', 'μ–‘μ–‘ μ λΉ„μΉ˜2', 'μ–‘μ–‘ μ λΉ„μΉ˜3']}
clickedPlace={selectedSpace}
onClickPlace={setSelectedSpace}
/>
</>
),
onRefresh: () => {},
onRefresh: refreshHandler,
}}
orderOption={{
onClickOrder: () => {
Expand All @@ -193,30 +237,45 @@ const UserWkHistoryPage = () => {
) : (
<NetworkError />
)
) : data.pageInfo.totalElements <= 0 ? (
<NetworkError />
) : data.pages.length === 0 ||
data.pages[0].applyInfoList.length <= 0 ? (
<p className="py-20 text-center text-sub-300">
내역이 μ‘΄μž¬ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€
</p>
) : (
data?.applyInfoList.map((wkt) => (
<WorkationCard
applyId={wkt.applyId}
accountId={accountId}
reviewId={wkt.reviewId}
key={wkt.wktId}
wktId={wkt.wktId}
thumbnailUrl={wkt.thumbnailUrl}
wktName={wkt.wktName}
place={wkt.place}
totalRecruit={wkt.totalRecruit}
applyStartDate={wkt.applyStartDate}
applyEndDate={wkt.applyEndDate}
startDate={wkt.startDate}
endDate={wkt.endDate}
bettingPoint={wkt.bettingPoint}
applyStatusType={wkt.applyStatusType}
waitingNumber={wkt.waitNumber} // μˆ˜μ • ν•„μš”
onClick={() => handleCardClick(wkt.applyStatusType, wkt.wktId)}
/>
))
<InfiniteScroll
loadMore={() => fetchNextPage()}
hasMore={hasNextPage}
loader={<UserLoading key={0} />}
useWindow
>
{data.pages.map((page) =>
page.applyInfoList.map((wkt) => (
<WorkationCard
refetch={refetch}
applyId={wkt.applyId}
accountId={accountId}
reviewId={wkt.reviewId}
key={wkt.wktId}
wktId={wkt.wktId}
thumbnailUrl={wkt.thumbnailUrl}
wktName={wkt.wktName}
place={wkt.place}
totalRecruit={wkt.totalRecruit}
applyStartDate={wkt.applyStartDate}
applyEndDate={wkt.applyEndDate}
startDate={wkt.startDate}
endDate={wkt.endDate}
bettingPoint={wkt.bettingPoint}
applyStatusType={wkt.applyStatusType}
waitingNumber={wkt.waitNumber}
onClick={() =>
handleCardClick(wkt.applyStatusType, wkt.wktId)
}
/>
)),
)}
</InfiniteScroll>
)}
</div>

Expand Down
Loading
Loading