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: 슬랙 웹훅 URL 설정 기능 구현 #772

Merged
merged 6 commits into from
Jan 29, 2022
Merged

feat: 슬랙 웹훅 URL 설정 기능 구현 #772

merged 6 commits into from
Jan 29, 2022

Conversation

Puterism
Copy link
Collaborator

구현 기능

  • 슬랙 웹훅 URL 설정 기능
    zkslack
    • 이미 등록된 웹훅 URL이 있다면 Modal을 열었을 때 미리 입력되어 있을 것입니다.

공유하고 싶은 내용

  • 슬랙 알림 설정 버튼을 오른쪽 메뉴에 추가했습니다. 구현하다 보니 오른쪽 메뉴 영역에 배치하는 게 가장 적당해 보이더라고요. 오른쪽에 메뉴가 많아져서 좀 좁아보이긴 하지만... ㅠㅠ

기타

  • 간만에 기능 붙이면서 행복 코딩 했습니다.

Close #767

yujo11
yujo11 previously approved these changes Jan 26, 2022
Copy link
Collaborator

@yujo11 yujo11 left a comment

Choose a reason for hiding this comment

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

깔끔하게 잘 구현되었네요!

고생하셨어요 쳎! 👍 👍 👍

Comment on lines +1 to +6
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60" shape-rendering="geometricPrecision">
<path d="m21.902.148c-3.299 0-5.973 2.68-5.973 5.985a5.979 5.979 0 0 0 5.973 5.985h5.974v-5.985a5.98 5.98 0 0 0 -5.974-5.985m0 15.96h-15.929c-3.299 0-5.973 2.68-5.973 5.986 0 3.305 2.674 5.985 5.973 5.985h15.93c3.298 0 5.973-2.68 5.973-5.985 0-3.306-2.675-5.986-5.974-5.986" fill="#36C5F0"></path>
<path d="m59.734 22.094c0-3.306-2.675-5.986-5.974-5.986s-5.973 2.68-5.973 5.986v5.985h5.973a5.98 5.98 0 0 0 5.974-5.985m-15.929 0v-15.961a5.98 5.98 0 0 0 -5.974-5.985c-3.299 0-5.973 2.68-5.973 5.985v15.96c0 3.307 2.674 5.987 5.973 5.987a5.98 5.98 0 0 0 5.974-5.985" fill="#2EB67D"></path>
<path d="m37.831 60a5.98 5.98 0 0 0 5.974-5.985 5.98 5.98 0 0 0 -5.974-5.985h-5.973v5.985c0 3.305 2.674 5.985 5.973 5.985m0-15.96h15.93c3.298 0 5.973-2.68 5.973-5.986a5.98 5.98 0 0 0 -5.974-5.985h-15.929c-3.299 0-5.973 2.68-5.973 5.985a5.979 5.979 0 0 0 5.973 5.985" fill="#ECB22E"></path>
<path d="m0 38.054a5.979 5.979 0 0 0 5.973 5.985 5.98 5.98 0 0 0 5.974-5.985v-5.985h-5.974c-3.299 0-5.973 2.68-5.973 5.985m15.929 0v15.96c0 3.306 2.674 5.986 5.973 5.986a5.98 5.98 0 0 0 5.974-5.985v-15.961a5.979 5.979 0 0 0 -5.974-5.985c-3.299 0-5.973 2.68-5.973 5.985" fill="#E01E5A"></path>
</svg>
Copy link
Collaborator

Choose a reason for hiding this comment

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

svg 귀엽네용 👍 👍 👍

const handleSubmitSlackUrl = (event: React.FormEvent<HTMLFormElement>) => {
event.preventDefault();

if (!selectedMapId) return;
Copy link
Collaborator

Choose a reason for hiding this comment

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

예외처리 좋네용 👍 👍 👍

Copy link
Collaborator

Choose a reason for hiding this comment

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

number타입이니 0을 고려하여 더 안전하게 selectedMapId === null로 검사하는게 어떨까요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

확인해보니 ManagerMain!selectedMapId와 같이 작성되어 있었네요
여기 포함해서 다른 부분도 selectedMapId === null로 수정하겠습니다!

@@ -1,4 +1,4 @@
export const BASE_URL = {
DEV: 'https://dev.zzimkkong-proxy.o-r.kr/api',
DEV: 'https://k8s.zzimkkong.com:8081/api',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
DEV: 'https://k8s.zzimkkong.com:8081/api',
DEV: 'http://k8s.zzimkkong.com:8081/api',

http 입니디ㅏ!!!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

여기까지 찾아와주셔서 감사드림니다

Copy link
Collaborator

Choose a reason for hiding this comment

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

good~

Copy link
Collaborator

Choose a reason for hiding this comment

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

k8s 저거도 이름 고쳐야겠네 나중에 ㅋㅋ

Copy link
Collaborator

@SunYoungKwon SunYoungKwon left a comment

Choose a reason for hiding this comment

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

오랜만에 찜꽁보니 너무 좋네요😆

<Button variant="text" type="button" onClick={() => setSlackModalOpen(false)}>
취소
</Button>
<Button variant="text" type="submit">
Copy link
Collaborator

Choose a reason for hiding this comment

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

type="submit"은 기본값이라 생략해도 될 것 같아요!

Copy link
Collaborator

Choose a reason for hiding this comment

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

찾아보니 따로 작성한 곳도 있고 안한곳도 있는데, 이번에 통일해도 좋겠네요

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

확인해보니 작성하지 않은 부분이 더 많아서 여기서도 추가로 생략해두겠습니다
피드백 감사합니다!

const handleSubmitSlackUrl = (event: React.FormEvent<HTMLFormElement>) => {
event.preventDefault();

if (!selectedMapId) return;
Copy link
Collaborator

Choose a reason for hiding this comment

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

number타입이니 0을 고려하여 더 안전하게 selectedMapId === null로 검사하는게 어떨까요?

@@ -1,4 +1,4 @@
export const BASE_URL = {
DEV: 'https://dev.zzimkkong-proxy.o-r.kr/api',
DEV: 'http://k8s.zzimkkong.com:8081/api',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
DEV: 'http://k8s.zzimkkong.com:8081/api',
DEV: 'https://api.zzimkkong.com/api',

DEV 용 요청 url 이렇게 수정되었습니다! 반영부탁드려유
제가 확인하긴 했는데 혹싀 ~ 모르니까 한 번 테스트도 해주세욥!!

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator

@yujo11 yujo11 Jan 28, 2022

Choose a reason for hiding this comment

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

DEV용 요청 url만 변경된거죠? local에서 작업을 위해 url 변경했는데 요청 잘 가네요~~ 👍 👍 👍

그대로 반영해주시면 될거 같아용~

- `!selectedMapId` -> `selectedMapId === null`로 조건식 변경

- `<Button>`에서 `type="submit"` 생략
@@ -1,4 +1,4 @@
export const BASE_URL = {
DEV: 'https://dev.zzimkkong-proxy.o-r.kr/api',
DEV: 'https://api.zzimkkong.com/api',
Copy link
Collaborator

Choose a reason for hiding this comment

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

넵~~~ good~~~~

Copy link
Collaborator

@SunYoungKwon SunYoungKwon left a comment

Choose a reason for hiding this comment

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

수고했어요!!!👍

Copy link
Collaborator

@yujo11 yujo11 left a comment

Choose a reason for hiding this comment

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

고생했어용 쳎! 👍 👍 👍

@Puterism Puterism merged commit 00963cd into dev Jan 29, 2022
@Puterism Puterism deleted the feat/767-slack branch January 29, 2022 08:49
This was referenced Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FE] 공간관리자는 예약관련 알림을 받을 슬랙 채널을 등록할 수 있다.
5 participants