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

[Feat] make notification page #640

Merged
merged 18 commits into from
Feb 10, 2023
Merged

Conversation

mike2ox
Copy link
Contributor

@mike2ox mike2ox commented Feb 7, 2023

๐Ÿ“Œ ๊ฐœ์š”

  • notification page ๋‚ด๋ถ€ contents ์ œ์ž‘

๐Ÿ’ป ์ž‘์—…์‚ฌํ•ญ

  • notification page์—์„œ ์‚ฌ์šฉํ•  search bar, table, pagination, create button์„ ์—…๋กœ๋“œ ํ•ฉ๋‹ˆ๋‹ค

์‚ฌ์ „ ์ž‘์—…

  1. env.development๊ฐ€ ์ผ๋ถ€ ์ˆ˜์ •๋์Šต๋‹ˆ๋‹ค.
    NEXT_PUBLIC_ADMIN_MOCK_ENDPOINT ์ถ”๊ฐ€
  2. ํŒจํ‚ค์ง€ ์ถ”๊ฐ€ ๋ฐ ์—…๋ฐ์ดํŠธ ๋ฐ˜์˜, ์‹คํ–‰
npm i & npm run dev
  1. ์ฃผ์†Œ ์ž…๋ ฅ
    http://localhost:3000/admin/notification (์ฐธ๊ณ )

๊ด€๋ จ์ด์Šˆ

์งˆ์˜

  • ํ˜„์žฌ SearchBar์— initSearch๋ผ๋Š” ํ•จ์ˆ˜๋ฅผ ์ „๋‹ฌํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ ๊ธฐ์กด SearchBar์„ ๊ทธ๋Œ€๋กœ ์“ฐ๊ณ  ์žˆ๋Š”๋ฐ ์ฝ”๋“œ๋ฅผ copy&pasteํ•ด์„œ admin์šฉ์œผ๋กœ ์ƒˆ๋กœ ๋ถ„๋ฆฌ๋ฅผ ํ•˜๋Š”๊ฒŒ ๋งž์„์ง€ ์˜๋ฌธ์ž…๋‹ˆ๋‹ค.
  • ์‹ค์ œ ๋ฐ˜์‘๊ณผ ์œ ์‚ฌํ•˜๊ฒŒ mock api์— 405(์‚ฌ์šฉ๋ถˆ๊ฐ€ http method)์™€ 401(๊ถŒํ•œ X)์„ ๊ณ„์† ๋ถ™์ผ๊นŒ ๊ณ ๋ฏผ ์ค‘์ž…๋‹ˆ๋‹ค

@mike2ox mike2ox added help wanted Extra attention is needed question Further information is requested admin ๊ด€๋ฆฌ์ž ํŽ˜์ด์ง€์—์„œ ๋ฐœ์ƒํ•œ issue labels Feb 7, 2023
@mike2ox mike2ox requested a review from a team February 7, 2023 02:20
@mike2ox mike2ox self-assigned this Feb 7, 2023
@mike2ox mike2ox requested review from raehy19, salty0306, 42sungwook and imJusttheresd and removed request for a team February 7, 2023 02:20
@42sungwook
Copy link
Contributor

42sungwook commented Feb 7, 2023

์ „์ฒด ์กฐํšŒ์— ๋ฉ”์‹œ์ง€๋Š” ์•ˆ๋ณด์ด๋Š”๋ฐ ์˜๋„๋œ๊ฑด์ง€ ๊ถ๊ธˆํ•ด์š”!
hyunkle๋‹˜ํ•œํ…Œ ๋ฌผ์–ด๋ณด๋‹ˆ ์ถ”๊ฐ€ํ•ด์•ผ๋  ๊ฒƒ ๊ฐ™๋‹ค๊ณ  ํ•˜์‹œ๋„ค์š”

@mike2ox
Copy link
Contributor Author

mike2ox commented Feb 7, 2023

์ฝ”๋“œ์— ์ถ”๊ฐ€๋ณด๋‹จ type -> message๋กœ ๋ฐ”๊ฟ”์ค˜์•ผํ•  ๊ฑฐ ๊ฐ™์€๋ฐ hyunkle๋‹˜ํ•˜๊ณ  ์–˜๊ธฐ ๋‚˜๋ˆŒ๊ฒŒ ํ•˜๋‚˜ ์žˆ์–ด์„œ ๊ทธ๋•Œ ์ˆ˜์ •ํ• ๊ฒŒ์š”

@mike2ox mike2ox closed this Feb 7, 2023
@mike2ox mike2ox reopened this Feb 8, 2023
@mike2ox
Copy link
Contributor Author

mike2ox commented Feb 8, 2023

๋ณ€๊ฒฝ ์‚ฌํ•ญ

  • ๊ธฐ์กด inline๋˜์–ด์žˆ๋˜ style์„ scssํŒŒ์ผ๋กœ ๋ถ„๋ฆฌํ–ˆ์Šต๋‹ˆ๋‹ค(pagination, table, button)
  • message column์ด ๋น ์ ธ์žˆ์–ด์„œ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • mock data ์—…๋ฐ์ดํŠธ (random ์‚ฌ์šฉ)

๊ณ ๋ฏผ

  • pagination์ด๋‚˜ ๊ฒ€์ƒ‰์„ ์‚ฌ์šฉํ•˜๋ฉด table width๊ฐ€ flexํ•˜๊ฒŒ ๋ฐ”๋€Œ๋Š”๊ฑฐ๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. page๋‚ด contents๋“ค์˜ ์‚ฌ์ด์ฆˆ๊ฐ€ ๊ณ ๋ฏผ์ž…๋‹ˆ๋‹ค.
  • ๋งˆ์ง€๋ง‰์œผ๋กœ ํ™•์ •ํ•œ๊ฑด notification page์—์„œ announce ํƒ€์ž…๋งŒ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋„๋ก ํ™•์ •ํ•ด๋†”์„œ ์ƒ์„ฑ๋œ notification๋“ค์„ ๋ถˆ๋Ÿฌ์˜ฌ๋•Œ๋„ announce ํƒ€์ž…๋งŒ ์˜ค๋Š”๊ฑด์ง€ ํ™•์ธ ํ•„์š”(BE ๋‹ด๋‹น์ž์™€ talk)

Copy link
Contributor

@raehy19 raehy19 left a comment

Choose a reason for hiding this comment

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

์ •๋ง ์ •๋ง ์ˆ˜๊ณ  ๋งŽ์œผ์…จ์Šต๋‹ˆ๋‹ค !!! ์—ฌ๋Ÿฌ ์ปดํฌ๋„ŒํŠธ์— ์ ์šฉํ•  ์ˆ˜ ์žˆ๊ฒŒ ๊ณ ๋ฏผํ•˜์‹œ๋ฉด์„œ ์ด๋ ‡๊ฒŒ ์ž˜ ๋งŒ๋“ค์–ด์ฃผ์…”์„œ ๊ด€๋ฆฌ์ž ํŽ˜์ด์ง€ ๋‚จ์€ ๊ฒƒ๋“ค์€ ๊ธˆ๋ฐฉ ๋๋‚  ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™๋„ค์š” ์‚ฌ์†Œํ•œ ์ฝ”๋ฉ˜ํŠธ ํ•œ๋ฒˆ ํ™•์ธํ•ด์ฃผ์‹œ๋ฉด ๋ ๊ฒƒ๊ฐ™์Šต๋‹ˆ๋‹ค ~~ :)

components/admin/notification/NotificationTable.tsx Outdated Show resolved Hide resolved
styles/admin/common/AdminSearchBar.module.scss Outdated Show resolved Hide resolved
components/admin/notification/NotificationTable.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@raehy19 raehy19 left a comment

Choose a reason for hiding this comment

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

์ˆ˜์ •ํ•˜์‹ ๊ฑฐ ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค ๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹ค !!

@42sungwook
Copy link
Contributor

42sungwook commented Feb 9, 2023

ํ˜„์žฌ SearchBar์— initSearch๋ผ๋Š” ํ•จ์ˆ˜๋ฅผ ์ „๋‹ฌํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ ๊ธฐ์กด SearchBar์„ ๊ทธ๋Œ€๋กœ ์“ฐ๊ณ  ์žˆ๋Š”๋ฐ ์ฝ”๋“œ๋ฅผ copy&pasteํ•ด์„œ admin์šฉ์œผ๋กœ ์ƒˆ๋กœ ๋ถ„๋ฆฌ๋ฅผ ํ•˜๋Š”๊ฒŒ ๋งž์„์ง€ ์˜๋ฌธ์ž…๋‹ˆ๋‹ค. -> ์ด ๋ถ€๋ถ„์€ ๊ธฐํš ๋‹จ๊ณ„์—์„œ ์–˜๊ธฐํ–ˆ์„ ๋•Œ backend์— ์ •ํ™•ํ•œ intraId๊ฐ’์„ ์ฃผ์ง€ ์•Š๊ณ  ์ผ๋ถ€๋งŒ ๋ณด๋‚ด์ค˜๋„ ํ•ด๋‹น ๊ฐ’์ด ํฌํ•จ๋œ intraId๋ฅผ ์ „๋ถ€ ๋ณด๋‚ด์ค€๋‹ค๊ณ  ํ•ด์„œ ์ง€๊ธˆ์˜ ๊ฒ€์ƒ‰๋ฐฉ์‹์ด ๋งž์ง€๋Š” ์•Š์€ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค ํ•˜์ง€๋งŒ ์ง€๊ธˆ ์“ฐ๋Š”๋ฐ๋Š” ๋ฌธ์ œ๊ฐ€ ์—†์–ด ์ด์Šˆ๋ฅผ ๋‚จ๊ฒจ๋†“๊ณ  ๋‚˜์ค‘์— ๋ฐ”๊ฟ”๋„ ๋  ๊ฒƒ ๊ฐ™์•„์š”
ex) mo๋งŒ ๊ฒ€์ƒ‰ํ•ด๋„ mosong mosong1 mosong2 ์œ ์ €๋“ค์„ api๋กœ ๋ถˆ๋Ÿฌ์˜ค๋Š”๊ฒŒ ๊ฐ€๋Šฅ

@mike2ox
Copy link
Contributor Author

mike2ox commented Feb 9, 2023

ํ˜„์žฌ SearchBar์— initSearch๋ผ๋Š” ํ•จ์ˆ˜๋ฅผ ์ „๋‹ฌํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ ๊ธฐ์กด SearchBar์„ ๊ทธ๋Œ€๋กœ ์“ฐ๊ณ  ์žˆ๋Š”๋ฐ ์ฝ”๋“œ๋ฅผ copy&pasteํ•ด์„œ admin์šฉ์œผ๋กœ ์ƒˆ๋กœ ๋ถ„๋ฆฌ๋ฅผ ํ•˜๋Š”๊ฒŒ ๋งž์„์ง€ ์˜๋ฌธ์ž…๋‹ˆ๋‹ค. -> ์ด ๋ถ€๋ถ„์€ ๊ธฐํš ๋‹จ๊ณ„์—์„œ ์–˜๊ธฐํ–ˆ์„ ๋•Œ backend์— ์ •ํ™•ํ•œ intraId๊ฐ’์„ ์ฃผ์ง€ ์•Š๊ณ  ์ผ๋ถ€๋งŒ ๋ณด๋‚ด์ค˜๋„ ํ•ด๋‹น ๊ฐ’์ด ํฌํ•จ๋œ intraId๋ฅผ ์ „๋ถ€ ๋ณด๋‚ด์ค€๋‹ค๊ณ  ํ•ด์„œ ์ง€๊ธˆ์˜ ๊ฒ€์ƒ‰๋ฐฉ์‹์ด ๋งž์ง€๋Š” ์•Š์€ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค ํ•˜์ง€๋งŒ ์ง€๊ธˆ ์“ฐ๋Š”๋ฐ๋Š” ๋ฌธ์ œ๊ฐ€ ์—†์–ด ์ด์Šˆ๋ฅผ ๋‚จ๊ฒจ๋†“๊ณ  ๋‚˜์ค‘์— ๋ฐ”๊ฟ”๋„ ๋  ๊ฒƒ ๊ฐ™์•„์š” ex) mo๋งŒ ๊ฒ€์ƒ‰ํ•ด๋„ mosong mosong1 mosong2 ์œ ์ €๋“ค์„ api๋กœ ๋ถˆ๋Ÿฌ์˜ค๋Š”๊ฒŒ ๊ฐ€๋Šฅ

์—ฌ๊ธฐ์„œ mo๋งŒ ๊ฒ€์ƒ‰ํ–ˆ์„๋•Œ mosong1, mosong2๊ฐ€ ์•ˆ๋œจ๋Š”๊ฑด ๋‹น์—ฐํ•ฉ๋‹ˆ๋‹ค. ์ €๊ฑด admin์šฉ API๊ฐ€ ์•„๋‹ˆ๋ผ ๋งค์นญ ์„œ๋น„์Šค์šฉ API๋ฅผ ๊ทธ๋Œ€๋กœ ๊ฐ–๋‹ค์“ด ์œ ์ € ๊ฒ€์ƒ‰ ๊ฒฐ๊ณผ๋ผ์„œ ๊ทธ๋ ‡์Šต๋‹ˆ๋‹ค. ๋ง์”€ํ•˜์‹  ๋ถ€๋ถ„์€ ๋…ธ์…˜์—์„œ /admin/users/searches?q=${keyword} ์ด ๋ถ€๋ถ„์ธ๋ฐ ๋‹ด๋‹นํ•˜์‹  ๋ถ„์ด ์•„์ง ๋ฐฐํฌ๋ฅผ ๋ชปํ•˜์‹ ๊ฑธ๋กœ ์ถ”์ธกํ•ด ๋งค์นญ ์„œ๋น„์Šค์šฉ API๋ฅผ ๋ถ™์—ฌ๋†“์€ ์ƒํƒœ์—์š”

@42sungwook
Copy link
Contributor

42sungwook commented Feb 9, 2023

์•„ ๊ทธ ๋ถ€๋ถ„์ด ๋ฌธ์ œ๊ฐ€ ์•„๋‹ˆ์—ˆ๊ตฐ์š”. ์ฝ”๋“œ๋ฅผ ๊ทธ๋Œ€๋กœ ๋ณต๋ถ™ํ•˜๋Š”๊ฒŒ ๋ณ„๋กœ์—ฌ์„œ ๋ฌผ์–ด๋ณด์‹ ๊ฑฐ๋ผ๋ฉด ์„œ์น˜๋ฐ”๋ฅผ ์ธํ„ฐํŽ˜์ด์Šค๋กœ ๋งŒ๋“ค์–ด์„œ admin์šฉ์„ ๋ถ„๋ฆฌํ•ด์„œ ์“ฐ๋Š”๊ฑด ์–ด๋–ค๊ฐ€์š”..?
์ œ๊ฐ€ ๋…ธ์…˜์— ์ •๋ฆฌํ•œ ๊ฐ์ฒด์ง€ํ–ฅ ๋ถ€๋ถ„์— ๋น„์Šทํ•œ ์˜ˆ์‹œ๊ฐ€ ์žˆ์—ˆ๋˜๊ฒƒ ๊ฐ™์€๋ฐ ์ง€๊ธˆ ๊ฐ€๋…์„ฑ์ด ๋–จ์–ด์ ธ์„œ ๋นจ๋ฆฌ ์ˆ˜์ •ํ•ด๋†“๊ฒ ์Šต๋‹ˆ๋‹ค // ๊ฐ์ฒด์ง€ํ–ฅ ๋ถ€๋ถ„์€ ์ˆ˜์ •ํ•ด๋†จ์Šต๋‹ˆ๋‹ค

@mike2ox
Copy link
Contributor Author

mike2ox commented Feb 9, 2023

@42sungwook OOP์˜ interface ๊ฐœ๋…์„ ์ ์šฉํ•˜๋ฉด ์ข‹๊ธดํ•˜์ง€๋งŒ ํ•ด๋‹น ์‚ฌ๋ก€๋Š” HOC๋ฅผ ์ ์šฉํ•ด ๋ณด๋Š”๊ฒŒ ์ข‹์ง€์•Š์„๊นŒ ์‹ถ๋„ค์š”
ํ˜„์žฌ ๊ณต์šฉ์œผ๋กœ ์‚ฌ์šฉํ•  ํ…Œ์ด๋ธ” ์ปดํฌ๋„ŒํŠธ๋„ ์™„์„ฑํ˜•์€ HOC ์ ์šฉํ•œ ํ˜•ํƒœ์ž…๋‹ˆ๋‹ค.

์ •์ •) HOC๊ฐ€ ์•ˆ์“ฐ์ด๋Š”๊ฑด ์•„๋‹ˆ์ง€๋งŒ ํ•จ์ˆ˜ ์ปดํฌ๋„ŒํŠธ์—์„œ ๋Œ€์ฑ„ํ•˜๋Š” ๊ธฐ์ˆ ์ด custom hook์ด๋ผ๊ณ  ํ•˜๋„ค์š”. custom hook์œผ๋กœ ์ฒ˜๋ฆฌํ•˜๋„๋ก ๋ฐฉํ–ฅ์„ ๋ฐ”๊ฟ”๋ด์•ผ๊ฒ ๋„ค์š”

HOC ์ฐธ๊ณ  : https://satisfactoryplace.tistory.com/163

@mike2ox mike2ox merged commit 6752221 into main Feb 10, 2023
@mike2ox mike2ox deleted the feat/make-notification-page-#627 branch February 10, 2023 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin ๊ด€๋ฆฌ์ž ํŽ˜์ด์ง€์—์„œ ๋ฐœ์ƒํ•œ issue help wanted Extra attention is needed question Further information is requested
Projects
No open projects
Status: โœ… Done
Development

Successfully merging this pull request may close these issues.

3 participants