From d21d2b0c2e6160c764378f10960620c6ea150f94 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Fri, 14 Jun 2024 14:55:24 +0900 Subject: [PATCH 001/132] =?UTF-8?q?[FE]=20ETC:=20=EC=97=B0=EC=9E=A5?= =?UTF-8?q?=EA=B6=8C=20=EC=82=AC=EC=9A=A9=EB=AA=A8=EB=8B=AC=EC=97=90?= =?UTF-8?q?=EC=84=9C=EC=9D=98=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=BD=98?= =?UTF-8?q?=EC=86=94=EB=A1=9C=EA=B7=B8=20=EC=A7=80=EC=9B=80#1642?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Cabinet/components/Modals/ExtendModal/ExtendModal.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/frontend/src/Cabinet/components/Modals/ExtendModal/ExtendModal.tsx b/frontend/src/Cabinet/components/Modals/ExtendModal/ExtendModal.tsx index 79e58934e..1cbd95a6d 100644 --- a/frontend/src/Cabinet/components/Modals/ExtendModal/ExtendModal.tsx +++ b/frontend/src/Cabinet/components/Modals/ExtendModal/ExtendModal.tsx @@ -91,7 +91,6 @@ const ExtendModal: React.FC<{ const findMyExtension = (period: string) => { return !myItems?.extensionItems.some((item) => { - console.log("item : ", item); return item.itemDetails === period; }); }; @@ -157,7 +156,6 @@ const ExtendModal: React.FC<{ setExtensionDate(extensionPeriod[option].day); }; - console.log("!!! : ", extensionPeriod[2].period); const extensionDropdownProps = { options: [ { From a6bc1acdd90c42f096fda3aed61f75d9e5502dbb Mon Sep 17 00:00:00 2001 From: Space Date: Mon, 17 Jun 2024 12:30:23 +0900 Subject: [PATCH 002/132] =?UTF-8?q?[BE]=20HOTFIX=20:=20=EC=97=B0=EC=9E=A5?= =?UTF-8?q?=EA=B6=8C=2030=EC=9D=BC=20->=2031=EC=9D=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/org/ftclub/cabinet/item/domain/ItemType.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/item/domain/ItemType.java b/backend/src/main/java/org/ftclub/cabinet/item/domain/ItemType.java index 9848e75ba..da5d04cc5 100644 --- a/backend/src/main/java/org/ftclub/cabinet/item/domain/ItemType.java +++ b/backend/src/main/java/org/ftclub/cabinet/item/domain/ItemType.java @@ -6,7 +6,7 @@ public enum ItemType { EXTENSION("연장권", - "현재 대여 중인 사물함의 반납 기한을 3일, 15일 또는 30일 연장할 수 있습니다."), + "현재 대여 중인 사물함의 반납 기한을 3일, 15일 또는 31일 연장할 수 있습니다."), PENALTY("페널티 감면권", "사물함 이용 중 발생한 페널티 일수를 감소시켜 사물함 사용 제한 기간을 줄일 수 있습니다."), SWAP("이사권" From 03b8a1a79cb2b8d92c3c4cefa203a119ef9d865b Mon Sep 17 00:00:00 2001 From: jiwon Date: Mon, 17 Jun 2024 12:33:12 +0900 Subject: [PATCH 003/132] =?UTF-8?q?[BE]=20HOTFIX=20:=20=EC=97=B0=EC=9E=A5?= =?UTF-8?q?=EA=B6=8C=2030=EC=9D=BC=20->=2031=EC=9D=BC=20=EC=98=A4=ED=83=80?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/org/ftclub/cabinet/item/domain/ItemType.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/item/domain/ItemType.java b/backend/src/main/java/org/ftclub/cabinet/item/domain/ItemType.java index 9848e75ba..da5d04cc5 100644 --- a/backend/src/main/java/org/ftclub/cabinet/item/domain/ItemType.java +++ b/backend/src/main/java/org/ftclub/cabinet/item/domain/ItemType.java @@ -6,7 +6,7 @@ public enum ItemType { EXTENSION("연장권", - "현재 대여 중인 사물함의 반납 기한을 3일, 15일 또는 30일 연장할 수 있습니다."), + "현재 대여 중인 사물함의 반납 기한을 3일, 15일 또는 31일 연장할 수 있습니다."), PENALTY("페널티 감면권", "사물함 이용 중 발생한 페널티 일수를 감소시켜 사물함 사용 제한 기간을 줄일 수 있습니다."), SWAP("이사권" From 86e89ca961e90a231738c3759ef7eb5610cb3f8b Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Tue, 18 Jun 2024 12:11:37 +0900 Subject: [PATCH 004/132] =?UTF-8?q?[FE]=20FEAT:=20left=20nav=20=EB=AC=B8?= =?UTF-8?q?=EC=9D=98=ED=95=98=EA=B8=B0,=20=EB=8F=99=EC=95=84=EB=A6=AC=20?= =?UTF-8?q?=EC=8B=A0=EC=B2=AD=EC=84=9C=20=ED=98=B8=EB=B2=84=EC=8B=9C=20svg?= =?UTF-8?q?=20=ED=8C=8C=EC=9D=BC=20=EC=83=89=20main=20color=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=ED=95=98=EA=B2=8C=20=EC=88=98=EC=A0=95#1629?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/LeftNav/LeftProfileNav/LeftProfileNav.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/Cabinet/components/LeftNav/LeftProfileNav/LeftProfileNav.tsx b/frontend/src/Cabinet/components/LeftNav/LeftProfileNav/LeftProfileNav.tsx index cc18f9c29..c1184208b 100644 --- a/frontend/src/Cabinet/components/LeftNav/LeftProfileNav/LeftProfileNav.tsx +++ b/frontend/src/Cabinet/components/LeftNav/LeftProfileNav/LeftProfileNav.tsx @@ -107,10 +107,10 @@ const SectionLinkStyled = styled.div` @media (hover: hover) and (pointer: fine) { &:hover { color: var(--sys-main-color); - } - &:hover img { - filter: invert(33%) sepia(55%) saturate(3554%) hue-rotate(230deg) - brightness(99%) contrast(107%); + + #linknImg > path { + stroke: var(--sys-main-color); + } } } `; From 8e5a1b392c750b7ccbcb27064b5b4590f6f6f4a7 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Tue, 18 Jun 2024 13:04:02 +0900 Subject: [PATCH 005/132] =?UTF-8?q?[FE]=20REFACT:=20import=20=EA=B2=BD?= =?UTF-8?q?=EB=A1=9C=20=EC=BB=A8=EB=B2=A4=EC=85=98=EC=97=90=20=EB=A7=9E?= =?UTF-8?q?=EA=B2=8C&=EC=95=88=EC=93=B0=EB=8A=94=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C#1629?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Cabinet/components/Modals/PenaltyModal/PenaltyModal.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/frontend/src/Cabinet/components/Modals/PenaltyModal/PenaltyModal.tsx b/frontend/src/Cabinet/components/Modals/PenaltyModal/PenaltyModal.tsx index 65d503de0..952ac7baf 100644 --- a/frontend/src/Cabinet/components/Modals/PenaltyModal/PenaltyModal.tsx +++ b/frontend/src/Cabinet/components/Modals/PenaltyModal/PenaltyModal.tsx @@ -12,13 +12,13 @@ import { FailResponseModal, SuccessResponseModal, } from "@/Cabinet/components/Modals/ResponseModal/ResponseModal"; +import { IInventoryInfo } from "@/Cabinet/components/Store/Inventory/Inventory"; import { IItemDetail, IItemTimeRemaining, IStoreItem, } from "@/Cabinet/types/dto/store.dto"; import { UserDto } from "@/Cabinet/types/dto/user.dto"; -import { StorePenaltyType } from "@/Cabinet/types/enum/store.enum"; import { axiosItems, axiosMyInfo, @@ -26,7 +26,6 @@ import { axiosUseItem, } from "@/Cabinet/api/axios/axios.custom"; import { formatDate, formatDateTime } from "@/Cabinet/utils/dateUtils"; -import { IInventoryInfo } from "../../Store/Inventory/Inventory"; interface PenaltyModalProps { onClose: () => void; @@ -187,8 +186,6 @@ const PenaltyModal: React.FC = ({ } }; - - const modalContents: IModalContents = { type: "hasProceedBtn", iconType: "CHECK", From dbf5b7a604b837addb0ea4bbab44abdfb196d912 Mon Sep 17 00:00:00 2001 From: jiminChoi Date: Tue, 18 Jun 2024 14:59:39 +0900 Subject: [PATCH 006/132] =?UTF-8?q?[FE]=20FIX:=20extendModal=20=EB=A6=AC?= =?UTF-8?q?=ED=8C=A9=ED=86=A0=EB=A7=81=20#1629?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modals/ExtendModal/ExtendModal.tsx | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/frontend/src/Cabinet/components/Modals/ExtendModal/ExtendModal.tsx b/frontend/src/Cabinet/components/Modals/ExtendModal/ExtendModal.tsx index 7ac32e373..485c77bbb 100644 --- a/frontend/src/Cabinet/components/Modals/ExtendModal/ExtendModal.tsx +++ b/frontend/src/Cabinet/components/Modals/ExtendModal/ExtendModal.tsx @@ -45,7 +45,6 @@ const ExtendModal: React.FC<{ const [items, setItems] = useState([]); const [myItems, setMyItems] = useState(null); const [selectedOption, setSelectedOption] = useState(""); - // const [extensionItems, setExtensionItems] = useState([]); const [myExtensionItems, setMyExtensionItems] = useState([]); const [itemDropdownOptions, setItemDropdownOptions] = useState< IDropdownOptions[] @@ -74,7 +73,7 @@ const ExtendModal: React.FC<{ 연장권 사용은 취소할 수 없습니다.`; const extendInfoDetail = `사물함을 대여하시면 연장권 사용이 가능합니다. 연장권은 ${extensionExpiredDate} 23:59 이후 만료됩니다.`; - const noExtension = `현재 연장권을 보유하고 있지 않습니다. + const noExtensionMsg = `현재 연장권을 보유하고 있지 않습니다. 연장권은 까비 상점에서 구매하실 수 있습니다.`; useEffect(() => { @@ -85,7 +84,7 @@ const ExtendModal: React.FC<{ if (myItems?.extensionItems.length === 0) { setShowResponseModal(true); setHasErrorOnResponse(true); - setModalContents(noExtension); + setModalContents(noExtensionMsg); } else { setShowResponseModal(false); setHasErrorOnResponse(false); @@ -99,18 +98,15 @@ const ExtendModal: React.FC<{ const sortedItems = sortItems(items); const dropdownOptions: IDropdownOptions[] = getItemDropDownOption(sortedItems[0]); -// 새로운 항목 생성 -const newOption = { +const extensionPrevOption = { name: "출석 연장권 보상", value: "EXTENSION_PREV", isDisabled: findMyItem("EXTENSION_PREV"), }; -// 새로운 항목을 dropdownOptions 배열의 마지막에 추가 -dropdownOptions.push(newOption); +dropdownOptions.push(extensionPrevOption); - // setExtensionItems(sortedItems[0].items); - setItemDropdownOptions(dropdownOptions); +setItemDropdownOptions(dropdownOptions); } }, [myItems]); @@ -143,7 +139,6 @@ dropdownOptions.push(newOption); return []; }; - // Modal related functions const getModalTitle = (cabinetId: number | null) => { return cabinetId === null ? modalPropsMap[additionalModalType.MODAL_OWN_EXTENSION].title @@ -219,7 +214,7 @@ dropdownOptions.push(newOption); setHasErrorOnResponse(true); if (error.response.status === 400) { setModalTitle("연장권 사용실패"); - setModalContents(noExtension); + setModalContents(noExtensionMsg); } else { setModalTitle(error.response?.data.message || error.data.message); } From 11bb4f4c7d530d9c13b468912098eed0e05e06ec Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Tue, 18 Jun 2024 15:01:37 +0900 Subject: [PATCH 007/132] =?UTF-8?q?[FE]=20FIX:=20=EB=8F=99=EC=A0=84=20?= =?UTF-8?q?=EC=A4=8D=EA=B8=B0=20=EC=84=A4=EB=AA=85=20=ED=9A=8D=EB=93=9D?= =?UTF-8?q?=ED=95=A0=20=EC=88=98->=EC=A3=BC=EC=9A=B8=20=EC=88=98=20?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD#1629?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modals/ExtendModal/ExtendModal.tsx | 25 ++++++++++--------- .../components/Store/StoreCoinPick.tsx | 2 +- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/frontend/src/Cabinet/components/Modals/ExtendModal/ExtendModal.tsx b/frontend/src/Cabinet/components/Modals/ExtendModal/ExtendModal.tsx index 485c77bbb..d09149bbb 100644 --- a/frontend/src/Cabinet/components/Modals/ExtendModal/ExtendModal.tsx +++ b/frontend/src/Cabinet/components/Modals/ExtendModal/ExtendModal.tsx @@ -96,19 +96,21 @@ const ExtendModal: React.FC<{ } if (items.length) { const sortedItems = sortItems(items); - const dropdownOptions: IDropdownOptions[] = getItemDropDownOption(sortedItems[0]); + const dropdownOptions: IDropdownOptions[] = getItemDropDownOption( + sortedItems[0] + ); -const extensionPrevOption = { - name: "출석 연장권 보상", - value: "EXTENSION_PREV", - isDisabled: findMyItem("EXTENSION_PREV"), -}; + const extensionPrevOption = { + name: "출석 연장권 보상", + value: "EXTENSION_PREV", + isDisabled: findMyItem("EXTENSION_PREV"), + }; -dropdownOptions.push(extensionPrevOption); + dropdownOptions.push(extensionPrevOption); -setItemDropdownOptions(dropdownOptions); -} -}, [myItems]); + setItemDropdownOptions(dropdownOptions); + } + }, [myItems]); const fetchData = async () => { try { @@ -124,10 +126,9 @@ setItemDropdownOptions(dropdownOptions); }; const findMyItem = (period: string) => { - return !myItems?.extensionItems.some((item) => item.itemSku === period); + return !myItems?.extensionItems.some((item) => item.itemSku === period); }; - const getItemDropDownOption = (curItem: IItemDetail): IDropdownOptions[] => { if (curItem) { return curItem.items.map((item) => ({ diff --git a/frontend/src/Cabinet/components/Store/StoreCoinPick.tsx b/frontend/src/Cabinet/components/Store/StoreCoinPick.tsx index 52c130ea8..68945585c 100644 --- a/frontend/src/Cabinet/components/Store/StoreCoinPick.tsx +++ b/frontend/src/Cabinet/components/Store/StoreCoinPick.tsx @@ -17,7 +17,7 @@ const StoreCoinPick = () => {

누군가가 매일 흘리는 동전을 주워보세요💰

-

동전은 하루에 한 번씩 획득할 수 있습니다

+

동전은 하루에 한 번씩 주울 수 있습니다

toggleStore()}> 동전 주우러가기 From 0e263198504587b96e7faa6a351f9abd4b9b5fca Mon Sep 17 00:00:00 2001 From: chyo1 Date: Tue, 18 Jun 2024 15:33:00 +0900 Subject: [PATCH 008/132] =?UTF-8?q?[BE]=20FIX:=20=EC=95=84=EC=9D=B4?= =?UTF-8?q?=ED=85=9C=20=EC=82=AC=EC=9A=A9=20=EA=B8=B0=EB=A1=9D=EC=97=90=20?= =?UTF-8?q?=EC=B6=9C=EC=84=9D=20=EC=97=B0=EC=9E=A5=EA=B6=8C=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=20=EB=82=B4=EC=97=AD=20=EB=B3=B4=EC=9D=B4=EA=B2=8C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ftclub/cabinet/item/repository/ItemHistoryRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/item/repository/ItemHistoryRepository.java b/backend/src/main/java/org/ftclub/cabinet/item/repository/ItemHistoryRepository.java index 8eded2a0f..217f40eb9 100644 --- a/backend/src/main/java/org/ftclub/cabinet/item/repository/ItemHistoryRepository.java +++ b/backend/src/main/java/org/ftclub/cabinet/item/repository/ItemHistoryRepository.java @@ -34,7 +34,7 @@ Page findAllByUserIdAndItemIdIn(@Param("userId") Long userId, + "JOIN ih.item i " + "WHERE ih.userId = :userId " + "AND ih.usedAt IS NOT NULL " - + "AND i.price < 0") + + "AND i.price <= 0") Page findAllByUserIdOnMinusPriceItemsWithSubQuery( @Param("userId") Long userId, Pageable pageable); From a8f515151358bf6d0bbda447c7b17e1e6af19b2b Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Tue, 18 Jun 2024 15:36:09 +0900 Subject: [PATCH 009/132] =?UTF-8?q?[FE]=20FIX:=20mapItemNameToType?= =?UTF-8?q?=EC=97=90=EC=84=9C=20default=20PENALTY->EXTENSION=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD#1629?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/pages/ItemUsageLogPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/Cabinet/pages/ItemUsageLogPage.tsx b/frontend/src/Cabinet/pages/ItemUsageLogPage.tsx index 32a1c2553..f34eb2c90 100644 --- a/frontend/src/Cabinet/pages/ItemUsageLogPage.tsx +++ b/frontend/src/Cabinet/pages/ItemUsageLogPage.tsx @@ -19,7 +19,7 @@ const mapItemNameToType = (itemName: string): StoreItemType => { case "페널티 감면권": return StoreItemType.PENALTY; default: - return StoreItemType.PENALTY; + return StoreItemType.EXTENSION; } }; From 538a5f4160aab4deadb0b593128ddc625c1e596e Mon Sep 17 00:00:00 2001 From: chyo1 Date: Tue, 18 Jun 2024 15:36:58 +0900 Subject: [PATCH 010/132] =?UTF-8?q?[BE]=20FIX:=20=EC=95=84=EC=9D=B4?= =?UTF-8?q?=ED=85=9C=20=EC=82=AC=EC=9A=A9=20=EA=B8=B0=EB=A1=9D=EC=97=90=20?= =?UTF-8?q?=EC=B6=9C=EC=84=9D=20=EC=97=B0=EC=9E=A5=EA=B6=8C=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=20=EB=82=B4=EC=97=AD=20=EB=B3=B4=EC=9D=B4=EA=B2=8C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ftclub/cabinet/item/repository/ItemHistoryRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/item/repository/ItemHistoryRepository.java b/backend/src/main/java/org/ftclub/cabinet/item/repository/ItemHistoryRepository.java index 217f40eb9..edcbafb10 100644 --- a/backend/src/main/java/org/ftclub/cabinet/item/repository/ItemHistoryRepository.java +++ b/backend/src/main/java/org/ftclub/cabinet/item/repository/ItemHistoryRepository.java @@ -27,7 +27,7 @@ Page findAllByUserIdAndItemIdIn(@Param("userId") Long userId, + "JOIN FETCH ih.item i " + "WHERE ih.userId = :userId " + "AND ih.usedAt IS NOT NULL " - + "AND i.price < 0 " + + "AND i.price <= 0 " + "ORDER BY ih.usedAt DESC", countQuery = "SELECT COUNT(ih) " + "FROM ItemHistory ih " From 31ec23d465be61693e2701e423c79847d555d32e Mon Sep 17 00:00:00 2001 From: Woo Joo Chae Date: Tue, 25 Jun 2024 16:24:20 +0900 Subject: [PATCH 011/132] [BE] FIX: User coin column added --- backend/src/main/java/org/ftclub/cabinet/user/domain/User.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java b/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java index f0870a694..1f61a06ca 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java @@ -61,6 +61,9 @@ public class User { @Column(name = "PUSH_ALARM", columnDefinition = "boolean default false") private boolean pushAlarm; + @NotNull + @Column(name = "COIN", columnDefinition = "bigint default 0") + private Long coin; protected User(String name, String email, LocalDateTime blackholedAt) { this.name = name; From b9288c794b37b78c084b02c3c6f2965aad519ee3 Mon Sep 17 00:00:00 2001 From: Woo Joo Chae Date: Tue, 25 Jun 2024 16:33:55 +0900 Subject: [PATCH 012/132] [BE] FIX: remove System.out.println --- .../cabinet/admin/lent/service/AdminLentFacadeService.java | 1 - 1 file changed, 1 deletion(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/admin/lent/service/AdminLentFacadeService.java b/backend/src/main/java/org/ftclub/cabinet/admin/lent/service/AdminLentFacadeService.java index dbaf15cc5..1b743c5ee 100644 --- a/backend/src/main/java/org/ftclub/cabinet/admin/lent/service/AdminLentFacadeService.java +++ b/backend/src/main/java/org/ftclub/cabinet/admin/lent/service/AdminLentFacadeService.java @@ -74,7 +74,6 @@ public void endUserLent(List userIds) { LocalDateTime now = LocalDateTime.now(); List lentHistories = lentQueryService.findUserActiveLentHistoriesInCabinetForUpdate(userIds.get(0)); - System.out.println("lentHistories = " + lentHistories); if (lentHistories.isEmpty()) { Long cabinetId = lentRedisService.findCabinetJoinedUser(userIds.get(0)); if (cabinetId != null) { From b0af680900463a450f66077f1885ada4d13f8866 Mon Sep 17 00:00:00 2001 From: saewoo1 Date: Tue, 25 Jun 2024 16:45:57 +0900 Subject: [PATCH 013/132] =?UTF-8?q?FEAT:=20=EC=9C=A0=EC=A0=80=20=EC=BB=AC?= =?UTF-8?q?=EB=9F=BC=20=EB=82=B4=EC=97=90=EC=84=9C=20=EC=BD=94=EC=9D=B8?= =?UTF-8?q?=EB=9F=89=20=EC=A6=9D=EA=B0=80=20=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/org/ftclub/cabinet/user/domain/User.java | 4 ++++ .../org/ftclub/cabinet/user/service/UserCommandService.java | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java b/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java index 1f61a06ca..caae699c5 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java @@ -146,4 +146,8 @@ public void changeAlarmStatus(UpdateAlarmRequestDto updateAlarmRequestDto) { public boolean isBlackholed() { return blackholedAt != null && blackholedAt.isBefore(LocalDateTime.now()); } + + public void addCoin(int reward) { + this.coin += reward; + } } diff --git a/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java b/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java index 5da70b657..50a75ba06 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java @@ -109,4 +109,10 @@ public void updateUserBlackholedAtById(Long userId, LocalDateTime blackholedAt) user.changeBlackholedAt(blackholedAt); userRepository.save(user); } + + public void addCoinAmount(Long userId, int reward) { + User user = userRepository.findById(userId) + .orElseThrow(ExceptionStatus.NOT_FOUND_USER::asServiceException); + user.addCoin(reward); + } } From 131a173a7f466e5395faa7d0fd90945eef259b82 Mon Sep 17 00:00:00 2001 From: saewoo1 Date: Tue, 25 Jun 2024 16:48:26 +0900 Subject: [PATCH 014/132] =?UTF-8?q?FEAT:=20=EC=BD=94=EC=9D=B8=EC=A4=8D?= =?UTF-8?q?=EA=B8=B0=20=EC=8B=A4=ED=96=89=20=EC=8B=9C=20user=20=EC=97=94?= =?UTF-8?q?=ED=8B=B0=ED=8B=B0=EC=9D=98=20coin=EB=9F=89=20=EC=A6=9D?= =?UTF-8?q?=EA=B0=80=20=EA=B8=B0=EB=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/ftclub/cabinet/item/service/ItemFacadeService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java b/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java index b95987f0c..ab0d0de00 100644 --- a/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java +++ b/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java @@ -43,6 +43,7 @@ import org.ftclub.cabinet.log.Logging; import org.ftclub.cabinet.mapper.ItemMapper; import org.ftclub.cabinet.user.domain.User; +import org.ftclub.cabinet.user.service.UserCommandService; import org.ftclub.cabinet.user.service.UserQueryService; import org.ftclub.cabinet.utils.lock.LockUtil; import org.springframework.context.ApplicationEventPublisher; @@ -67,6 +68,7 @@ public class ItemFacadeService { private final ItemMapper itemMapper; private final ItemPolicyService itemPolicyService; private final ApplicationEventPublisher eventPublisher; + private final UserCommandService userCommandService; /** @@ -207,6 +209,7 @@ public CoinCollectionRewardResponseDto collectCoinAndIssueReward(Long userId) { // Redis에 코인 변화량 저장 saveCoinChangeOnRedis(userId, reward); + userCommandService.addCoinAmount(userId, reward); return new CoinCollectionRewardResponseDto(reward); } From 0a5189ea2e865b2c153eb12ab5750ba8649e01b1 Mon Sep 17 00:00:00 2001 From: saewoo1 Date: Tue, 25 Jun 2024 17:03:54 +0900 Subject: [PATCH 015/132] =?UTF-8?q?FEAT:=20=EC=96=B4=EB=93=9C=EB=AF=BC?= =?UTF-8?q?=EC=97=90=EC=84=9C=20=EC=BD=94=EC=9D=B8=20=EC=A7=80=EA=B8=89=20?= =?UTF-8?q?=EC=8B=9C=20coin=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=20?= =?UTF-8?q?=EA=B8=B0=EB=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/item/service/AdminItemFacadeService.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/admin/item/service/AdminItemFacadeService.java b/backend/src/main/java/org/ftclub/cabinet/admin/item/service/AdminItemFacadeService.java index be9967d4d..bfdfe4263 100644 --- a/backend/src/main/java/org/ftclub/cabinet/admin/item/service/AdminItemFacadeService.java +++ b/backend/src/main/java/org/ftclub/cabinet/admin/item/service/AdminItemFacadeService.java @@ -18,7 +18,7 @@ import org.ftclub.cabinet.item.service.ItemQueryService; import org.ftclub.cabinet.item.service.ItemRedisService; import org.ftclub.cabinet.mapper.ItemMapper; -import org.ftclub.cabinet.utils.lock.LockUtil; +import org.ftclub.cabinet.user.service.UserCommandService; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; @@ -35,6 +35,7 @@ public class AdminItemFacadeService { private final ItemMapper itemMapper; private final ItemRedisService itemRedisService; + private final UserCommandService userCommandService; @Transactional public void createItem(Integer Price, Sku sku, ItemType type) { @@ -44,16 +45,18 @@ public void createItem(Integer Price, Sku sku, ItemType type) { @Transactional public void assignItem(List userIds, Sku sku) { Item item = itemQueryService.getBySku(sku); + Long price = item.getPrice(); LocalDateTime now = null; - if (item.getPrice() > 0) { + if (price > 0) { now = LocalDateTime.now(); - userIds.forEach(userId -> LockUtil.lockRedisCoin(userId, () -> { + userIds.forEach(userId -> { long coinAmount = itemRedisService.getCoinAmount(userId); itemRedisService.saveCoinCount(userId, coinAmount + item.getPrice()); long totalCoinSupply = itemRedisService.getTotalCoinSupply(); itemRedisService.saveTotalCoinSupply(totalCoinSupply + item.getPrice()); - })); + userCommandService.updateCoinAmount(userId, price); + }); } itemHistoryCommandService.createItemHistories(userIds, item.getId(), now); } From 5293453fd21c06791083afb1905d784587a45b9e Mon Sep 17 00:00:00 2001 From: saewoo1 Date: Tue, 25 Jun 2024 17:04:04 +0900 Subject: [PATCH 016/132] =?UTF-8?q?FEAT:=20=EC=95=84=EC=9D=B4=ED=85=9C=20?= =?UTF-8?q?=EA=B5=AC=EB=A7=A4=20=EC=8B=9C=20coin=20=EC=97=85=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=8A=B8=20=EA=B8=B0=EB=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/ftclub/cabinet/item/service/ItemFacadeService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java b/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java index ab0d0de00..f31b7b15d 100644 --- a/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java +++ b/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java @@ -209,7 +209,7 @@ public CoinCollectionRewardResponseDto collectCoinAndIssueReward(Long userId) { // Redis에 코인 변화량 저장 saveCoinChangeOnRedis(userId, reward); - userCommandService.addCoinAmount(userId, reward); + userCommandService.updateCoinAmount(userId, (long) reward); return new CoinCollectionRewardResponseDto(reward); } @@ -314,6 +314,7 @@ public void purchaseItem(Long userId, Sku sku) { long totalCoinUsage = itemRedisService.getTotalCoinUsage(); itemRedisService.saveTotalCoinUsage(totalCoinUsage + price); }); + userCommandService.updateCoinAmount(userId, price); } @Transactional From dc1aa1e9b48c05094fb55b6bd8bfb76d8991fbf2 Mon Sep 17 00:00:00 2001 From: saewoo1 Date: Tue, 25 Jun 2024 17:04:13 +0900 Subject: [PATCH 017/132] =?UTF-8?q?FEAT:=20=EC=BD=94=EC=9D=B8=20=EC=A6=9D?= =?UTF-8?q?=EA=B0=80=20=EA=B8=B0=EB=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/java/org/ftclub/cabinet/user/domain/User.java | 2 +- .../org/ftclub/cabinet/user/service/UserCommandService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java b/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java index caae699c5..5b26aac2c 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java @@ -147,7 +147,7 @@ public boolean isBlackholed() { return blackholedAt != null && blackholedAt.isBefore(LocalDateTime.now()); } - public void addCoin(int reward) { + public void addCoin(Long reward) { this.coin += reward; } } diff --git a/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java b/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java index 50a75ba06..83bf64d6e 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java @@ -110,7 +110,7 @@ public void updateUserBlackholedAtById(Long userId, LocalDateTime blackholedAt) userRepository.save(user); } - public void addCoinAmount(Long userId, int reward) { + public void updateCoinAmount(Long userId, Long reward) { User user = userRepository.findById(userId) .orElseThrow(ExceptionStatus.NOT_FOUND_USER::asServiceException); user.addCoin(reward); From 7b8eb660dd0901ad7ff1a1290ac482a2ce5c7742 Mon Sep 17 00:00:00 2001 From: Woo Joo Chae Date: Tue, 25 Jun 2024 17:24:02 +0900 Subject: [PATCH 018/132] [BE] FEAT: Coin Added in USER --- backend/src/main/java/org/ftclub/cabinet/user/domain/User.java | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java b/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java index 1f61a06ca..9c2113d82 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java @@ -69,6 +69,7 @@ protected User(String name, String email, LocalDateTime blackholedAt) { this.name = name; this.email = email; this.blackholedAt = blackholedAt; + this.coin = 0L; // this.role = userRole; setDefaultAlarmStatus(); } From 578215c6a38812bfd924402eaaf096cc18ca3868 Mon Sep 17 00:00:00 2001 From: chyo1 Date: Tue, 25 Jun 2024 17:29:46 +0900 Subject: [PATCH 019/132] =?UTF-8?q?[BE]=20FIX=20:=20Redis=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EA=B0=80=EC=A0=B8=EC=98=A4=EB=8D=98=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=EC=9E=90=20=EC=9E=AC=ED=99=94=EB=9F=89=20User=20?= =?UTF-8?q?=ED=85=8C=EC=9D=B4=EB=B8=94=EB=A1=9C=20=EC=9D=B4=EB=8F=99=20(?= =?UTF-8?q?=ED=94=84=EB=A1=9C=ED=95=84=20=ED=8E=98=EC=9D=B4=EC=A7=80,=20?= =?UTF-8?q?=EC=95=84=EC=9D=B4=ED=85=9C=20=EA=B5=AC=EB=A7=A4=20=EC=8B=9C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/item/service/AdminItemFacadeService.java | 4 +++- .../cabinet/item/service/ItemFacadeService.java | 10 +++++++--- .../cabinet/item/service/ItemRedisService.java | 13 ------------- .../cabinet/user/service/LentExtensionManager.java | 4 ++-- .../cabinet/user/service/UserFacadeService.java | 2 +- 5 files changed, 13 insertions(+), 20 deletions(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/admin/item/service/AdminItemFacadeService.java b/backend/src/main/java/org/ftclub/cabinet/admin/item/service/AdminItemFacadeService.java index be9967d4d..66c611e11 100644 --- a/backend/src/main/java/org/ftclub/cabinet/admin/item/service/AdminItemFacadeService.java +++ b/backend/src/main/java/org/ftclub/cabinet/admin/item/service/AdminItemFacadeService.java @@ -18,6 +18,7 @@ import org.ftclub.cabinet.item.service.ItemQueryService; import org.ftclub.cabinet.item.service.ItemRedisService; import org.ftclub.cabinet.mapper.ItemMapper; +import org.ftclub.cabinet.user.service.UserQueryService; import org.ftclub.cabinet.utils.lock.LockUtil; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; @@ -35,6 +36,7 @@ public class AdminItemFacadeService { private final ItemMapper itemMapper; private final ItemRedisService itemRedisService; + private final UserQueryService userQueryService; @Transactional public void createItem(Integer Price, Sku sku, ItemType type) { @@ -48,7 +50,7 @@ public void assignItem(List userIds, Sku sku) { if (item.getPrice() > 0) { now = LocalDateTime.now(); userIds.forEach(userId -> LockUtil.lockRedisCoin(userId, () -> { - long coinAmount = itemRedisService.getCoinAmount(userId); + long coinAmount = userQueryService.getUser(userId).getCoin(); itemRedisService.saveCoinCount(userId, coinAmount + item.getPrice()); long totalCoinSupply = itemRedisService.getTotalCoinSupply(); diff --git a/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java b/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java index b95987f0c..7f79eff29 100644 --- a/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java +++ b/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java @@ -214,8 +214,8 @@ public CoinCollectionRewardResponseDto collectCoinAndIssueReward(Long userId) { private void saveCoinChangeOnRedis(Long userId, final int reward) { LockUtil.lockRedisCoin(userId, () -> { // Redis에 유저 리워드 저장 - long coins = itemRedisService.getCoinAmount(userId); - itemRedisService.saveCoinCount(userId, coins + reward); +// long coins = itemRedisService.getCoinAmount(userId); +// itemRedisService.saveCoinCount(userId, coins + reward); // Redis에 전체 코인 발행량 저장 long totalCoinSupply = itemRedisService.getTotalCoinSupply(); @@ -294,7 +294,11 @@ public void purchaseItem(Long userId, Sku sku) { Item item = itemQueryService.getBySku(sku); long price = item.getPrice(); - long userCoin = itemRedisService.getCoinAmount(userId); + + // 유저의 보유 재화량 +// long userCoin = itemRedisService.getCoinAmount(userId); + long userCoin = user.getCoin(); + // 아이템 Policy 검증 itemPolicyService.verifyOnSale(price); diff --git a/backend/src/main/java/org/ftclub/cabinet/item/service/ItemRedisService.java b/backend/src/main/java/org/ftclub/cabinet/item/service/ItemRedisService.java index 9f1713dcd..1990fdd9e 100644 --- a/backend/src/main/java/org/ftclub/cabinet/item/service/ItemRedisService.java +++ b/backend/src/main/java/org/ftclub/cabinet/item/service/ItemRedisService.java @@ -15,19 +15,6 @@ public class ItemRedisService { private final ItemRedis itemRedis; private final ItemHistoryRepository itemHistoryRepository; - public long getCoinAmount(Long userId) { - String userIdString = userId.toString(); - String coinAmount = itemRedis.getCoinAmount(userIdString); - if (coinAmount == null) { - long coin = itemHistoryRepository.findAllByUserId(userId).stream() - .mapToLong(ih -> ih.getItem().getPrice()) - .reduce(Long::sum).orElse(0L); - itemRedis.saveCoinAmount(userIdString, Long.toString(coin)); - return coin; - } - return Integer.parseInt(coinAmount); - } - public void saveCoinCount(Long userId, long coinCount) { itemRedis.saveCoinAmount(userId.toString(), String.valueOf(coinCount)); } diff --git a/backend/src/main/java/org/ftclub/cabinet/user/service/LentExtensionManager.java b/backend/src/main/java/org/ftclub/cabinet/user/service/LentExtensionManager.java index a8d7b6e73..154f60a06 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/service/LentExtensionManager.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/service/LentExtensionManager.java @@ -59,8 +59,8 @@ public void issueLentExtension() { */ private void saveCoinChangeOnRedis(Long userId, long price) { // 유저 재화 변동량 Redis에 저장 - long userCoinCount = itemRedisService.getCoinAmount(userId); - itemRedisService.saveCoinCount(userId, userCoinCount + price); +// long userCoinCount = itemRedisService.getCoinAmount(userId); +// itemRedisService.saveCoinCount(userId, userCoinCount + price); // 전체 재화 변동량 Redis에 저장 long totalCoinSupply = itemRedisService.getTotalCoinSupply(); diff --git a/backend/src/main/java/org/ftclub/cabinet/user/service/UserFacadeService.java b/backend/src/main/java/org/ftclub/cabinet/user/service/UserFacadeService.java index f7d04f82f..66a4054c7 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/service/UserFacadeService.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/service/UserFacadeService.java @@ -70,7 +70,7 @@ public MyProfileResponseDto getProfile(UserSessionDto user) { AlarmTypeResponseDto userAlarmTypes = currentUser.getAlarmTypes(); boolean isDeviceTokenExpired = userAlarmTypes.isPush() && fcmTokenRedisService.findByUserName(user.getName()).isEmpty(); - Long coins = itemRedisService.getCoinAmount(userId); + Long coins = currentUser.getCoin(); return userMapper.toMyProfileResponseDto(user, cabinet, banHistory, lentExtensionResponseDto, userAlarmTypes, isDeviceTokenExpired, coins); } From d6c1db3137db9904047d62e5b67abd14102a68a5 Mon Sep 17 00:00:00 2001 From: Woo Joo Chae Date: Tue, 25 Jun 2024 18:56:33 +0900 Subject: [PATCH 020/132] [BE] FEAT: LentExtension Coin assign Redis to RDB --- .../cabinet/admin/item/service/AdminItemFacadeService.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/admin/item/service/AdminItemFacadeService.java b/backend/src/main/java/org/ftclub/cabinet/admin/item/service/AdminItemFacadeService.java index 055c43fb6..d8c456f03 100644 --- a/backend/src/main/java/org/ftclub/cabinet/admin/item/service/AdminItemFacadeService.java +++ b/backend/src/main/java/org/ftclub/cabinet/admin/item/service/AdminItemFacadeService.java @@ -20,7 +20,6 @@ import org.ftclub.cabinet.mapper.ItemMapper; import org.ftclub.cabinet.user.service.UserCommandService; import org.ftclub.cabinet.user.service.UserQueryService; -import org.ftclub.cabinet.utils.lock.LockUtil; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; @@ -53,8 +52,6 @@ public void assignItem(List userIds, Sku sku) { if (price > 0) { now = LocalDateTime.now(); userIds.forEach(userId -> { - long coinAmount = itemRedisService.getCoinAmount(userId); - userIds.forEach(userId -> LockUtil.lockRedisCoin(userId, () -> { long coinAmount = userQueryService.getUser(userId).getCoin(); itemRedisService.saveCoinCount(userId, coinAmount + item.getPrice()); From 2da3d45a08a08fe365d3750532949a9a268d6986 Mon Sep 17 00:00:00 2001 From: Woo Joo Chae Date: Tue, 25 Jun 2024 18:56:44 +0900 Subject: [PATCH 021/132] [BE] FEAT: LentExtension Coin assign Redis to RDB --- .../ftclub/cabinet/user/service/LentExtensionManager.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/user/service/LentExtensionManager.java b/backend/src/main/java/org/ftclub/cabinet/user/service/LentExtensionManager.java index 154f60a06..5e5fd27e1 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/service/LentExtensionManager.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/service/LentExtensionManager.java @@ -14,7 +14,6 @@ import org.ftclub.cabinet.log.Logging; import org.ftclub.cabinet.occupiedtime.OccupiedTimeManager; import org.ftclub.cabinet.user.domain.User; -import org.ftclub.cabinet.utils.lock.LockUtil; import org.springframework.stereotype.Service; @Service @@ -43,10 +42,10 @@ public void issueLentExtension() { List users = userQueryService.findAllUsersByNames(userNames); Item coinRewardItem = itemQueryService.getBySku(Sku.COIN_FULL_TIME); + users.forEach(user -> { Long userId = user.getId(); - LockUtil.lockRedisCoin(userId, () -> - saveCoinChangeOnRedis(userId, coinRewardItem.getPrice())); + user.addCoin(coinRewardItem.getPrice()); itemHistoryCommandService.createItemHistory(userId, coinRewardItem.getId()); }); } From 303700e39cc046de5beb7625c86fe4c2d064b9e3 Mon Sep 17 00:00:00 2001 From: chyo1 Date: Tue, 2 Jul 2024 00:46:21 +0900 Subject: [PATCH 022/132] =?UTF-8?q?[BE]=20HOTFIX=20:=20=EB=8F=99=EC=A0=84?= =?UTF-8?q?=20=EC=A4=8D=EA=B8=B0=20=EC=95=84=EC=9D=B4=ED=85=9C=20used=5Fat?= =?UTF-8?q?=EC=9D=84=20=EA=B5=AC=EB=A7=A4=EC=8B=9C=EA=B0=81=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=A7=80=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/ftclub/cabinet/item/service/ItemFacadeService.java | 4 ++-- .../cabinet/item/service/ItemHistoryCommandService.java | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java b/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java index 6f8c22fa1..5e6f21437 100644 --- a/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java +++ b/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java @@ -192,7 +192,7 @@ public CoinCollectionRewardResponseDto collectCoinAndIssueReward(Long userId) { // DB에 코인 저장 Item coinCollect = itemQueryService.getBySku(Sku.COIN_COLLECT); int reward = (int) (coinCollect.getPrice().longValue()); - itemHistoryCommandService.createItemHistory(userId, coinCollect.getId()); + itemHistoryCommandService.createCoinCollectItemHistory(userId, coinCollect.getId()); // 출석 일자에 따른 랜덤 리워드 지급 Long coinCollectionCountInMonth = @@ -203,7 +203,7 @@ public CoinCollectionRewardResponseDto collectCoinAndIssueReward(Long userId) { Sku coinSku = itemPolicyService.getRewardSku(randomPercentage); Item coinReward = itemQueryService.getBySku(coinSku); - itemHistoryCommandService.createItemHistory(userId, coinReward.getId()); + itemHistoryCommandService.createCoinCollectItemHistory(userId, coinReward.getId()); reward += coinReward.getPrice(); } diff --git a/backend/src/main/java/org/ftclub/cabinet/item/service/ItemHistoryCommandService.java b/backend/src/main/java/org/ftclub/cabinet/item/service/ItemHistoryCommandService.java index e375a8518..700c3fa7f 100644 --- a/backend/src/main/java/org/ftclub/cabinet/item/service/ItemHistoryCommandService.java +++ b/backend/src/main/java/org/ftclub/cabinet/item/service/ItemHistoryCommandService.java @@ -28,4 +28,9 @@ public void createItemHistories(List userIds, Long itemId, LocalDateTime u .collect(Collectors.toList()); itemHistoryRepository.saveAll(itemHistories); } + + public void createCoinCollectItemHistory(Long userId, Long itemId) { + ItemHistory coinCollectItemHistory = ItemHistory.of(userId, itemId, LocalDateTime.now()); + itemHistoryRepository.save(coinCollectItemHistory); + } } From 99e60d91fa1d877b93aa4bcb41724ef6c449aa58 Mon Sep 17 00:00:00 2001 From: Woo Joo Chae Date: Tue, 2 Jul 2024 16:20:33 +0900 Subject: [PATCH 023/132] =?UTF-8?q?[BE]=20FEAT:=20Redis=20to=20DB=20coin?= =?UTF-8?q?=20=ED=98=84=ED=99=A9=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../item/service/ItemRedisService.java | 17 +++++++++++ .../ftclub/cabinet/ping/PingController.java | 28 +++++++++++++++++++ .../org/ftclub/cabinet/user/domain/User.java | 7 +++++ .../user/repository/UserRepository.java | 3 ++ .../user/service/UserCommandService.java | 10 +++++++ .../user/service/UserQueryService.java | 5 ++++ 6 files changed, 70 insertions(+) diff --git a/backend/src/main/java/org/ftclub/cabinet/item/service/ItemRedisService.java b/backend/src/main/java/org/ftclub/cabinet/item/service/ItemRedisService.java index 1990fdd9e..794166fed 100644 --- a/backend/src/main/java/org/ftclub/cabinet/item/service/ItemRedisService.java +++ b/backend/src/main/java/org/ftclub/cabinet/item/service/ItemRedisService.java @@ -104,4 +104,21 @@ public Long getCoinCollectionCountInMonth(Long userId) { } return Long.parseLong(coinCollectionCount); } + + /** + * Redis에 저장되어있는 현재 User가 가진 Coin 양 반환 + */ + @Deprecated + public long getCoinAmount(Long userId) { + String userIdString = userId.toString(); + String coinAmount = itemRedis.getCoinAmount(userIdString); + if (coinAmount == null) { + long coin = itemHistoryRepository.findAllByUserId(userId).stream() + .mapToLong(ih -> ih.getItem().getPrice()) + .reduce(Long::sum).orElse(0L); + itemRedis.saveCoinAmount(userIdString, Long.toString(coin)); + return coin; + } + return Integer.parseInt(coinAmount); + } } diff --git a/backend/src/main/java/org/ftclub/cabinet/ping/PingController.java b/backend/src/main/java/org/ftclub/cabinet/ping/PingController.java index ba8f5ebf0..61e130a55 100644 --- a/backend/src/main/java/org/ftclub/cabinet/ping/PingController.java +++ b/backend/src/main/java/org/ftclub/cabinet/ping/PingController.java @@ -1,11 +1,17 @@ package org.ftclub.cabinet.ping; +import java.util.List; import lombok.RequiredArgsConstructor; import lombok.extern.log4j.Log4j2; import org.ftclub.cabinet.auth.domain.AuthGuard; import org.ftclub.cabinet.auth.domain.AuthLevel; +import org.ftclub.cabinet.item.service.ItemCommandService; +import org.ftclub.cabinet.item.service.ItemRedisService; import org.ftclub.cabinet.lent.service.LentFacadeService; +import org.ftclub.cabinet.user.domain.User; import org.ftclub.cabinet.user.service.LentExtensionManager; +import org.ftclub.cabinet.user.service.UserCommandService; +import org.ftclub.cabinet.user.service.UserQueryService; import org.ftclub.cabinet.utils.overdue.manager.OverdueManager; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -21,6 +27,11 @@ public class PingController { private final OverdueManager overdueManager; private final LentExtensionManager lentExtensionManager; + private final ItemRedisService itemRedisService; + private final ItemCommandService itemCommandService; + private final UserQueryService userQueryService; + private final UserCommandService userCommandService; + @RequestMapping public String ping() { return "pong"; @@ -44,4 +55,21 @@ public String ok() { lentExtensionManager.issueLentExtension(); return "ok"; } + + /** + * 임시 메소드 (Redis to DB coin update) + * + * @return + */ + @GetMapping("/item") + @AuthGuard(level = AuthLevel.ADMIN_ONLY) + public String ok2() { + List allUsers = userQueryService.findAllUsers(); + allUsers.stream().map(User::getId).forEach(userId -> { + long coinAmount = itemRedisService.getCoinAmount(userId); + userCommandService.overwriteCoinAmount(userId, coinAmount); + }); + return "ok"; + } + } diff --git a/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java b/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java index 1346eb2c3..d2c7e55b9 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java @@ -151,4 +151,11 @@ public boolean isBlackholed() { public void addCoin(Long reward) { this.coin += reward; } + + /** + * 임시 메소드 + */ + public void setCoin(Long coin) { + this.coin = coin; + } } diff --git a/backend/src/main/java/org/ftclub/cabinet/user/repository/UserRepository.java b/backend/src/main/java/org/ftclub/cabinet/user/repository/UserRepository.java index 11e7da9bf..ab2a8280f 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/repository/UserRepository.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/repository/UserRepository.java @@ -134,4 +134,7 @@ public interface UserRepository extends JpaRepository { */ @Query("SELECT u FROM User u WHERE u.id IN :userIds AND u.deletedAt IS NULL") Page findPaginationByIds(@Param("userIds") List userIds, Pageable pageable); + + @Query("SELECT u FROM User u WHERE u.deletedAt IS NULL") + List findAllDeletedAtIsNull(); } diff --git a/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java b/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java index 83bf64d6e..421496d98 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java @@ -115,4 +115,14 @@ public void updateCoinAmount(Long userId, Long reward) { .orElseThrow(ExceptionStatus.NOT_FOUND_USER::asServiceException); user.addCoin(reward); } + + /** + * 임시 메소드 + */ + public void overwriteCoinAmount(Long userId, Long coin) { + User user = userRepository.findById(userId) + .orElseThrow(ExceptionStatus.NOT_FOUND_USER::asServiceException); + user.setCoin(coin); + } + } diff --git a/backend/src/main/java/org/ftclub/cabinet/user/service/UserQueryService.java b/backend/src/main/java/org/ftclub/cabinet/user/service/UserQueryService.java index 0d4fdec40..8863ac4f2 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/service/UserQueryService.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/service/UserQueryService.java @@ -155,6 +155,11 @@ public List findUsersAtNoRiskOfBlackhole() { */ public List findAllUsersByNames(List userNames) { return userRepository.findAllUsersInNames(userNames); + } + + public List findAllUsers() { + return userRepository.findAllDeletedAtIsNull(); } + } From 663a1e5a70713570efbc6d080f573b453f739547 Mon Sep 17 00:00:00 2001 From: Woo Joo Chae Date: Tue, 2 Jul 2024 16:38:13 +0900 Subject: [PATCH 024/132] =?UTF-8?q?[BE]=20FIX:=20Redis=20to=20DB=20coin=20?= =?UTF-8?q?=EC=9E=84=EC=8B=9C=20=EB=A9=94=EC=84=9C=EB=93=9C=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ftclub/cabinet/ping/PingController.java | 19 ------------------- .../org/ftclub/cabinet/user/domain/User.java | 6 ------ .../user/service/UserCommandService.java | 10 ---------- .../user/service/UserQueryService.java | 4 ---- 4 files changed, 39 deletions(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/ping/PingController.java b/backend/src/main/java/org/ftclub/cabinet/ping/PingController.java index 61e130a55..6805cde2a 100644 --- a/backend/src/main/java/org/ftclub/cabinet/ping/PingController.java +++ b/backend/src/main/java/org/ftclub/cabinet/ping/PingController.java @@ -1,6 +1,5 @@ package org.ftclub.cabinet.ping; -import java.util.List; import lombok.RequiredArgsConstructor; import lombok.extern.log4j.Log4j2; import org.ftclub.cabinet.auth.domain.AuthGuard; @@ -8,7 +7,6 @@ import org.ftclub.cabinet.item.service.ItemCommandService; import org.ftclub.cabinet.item.service.ItemRedisService; import org.ftclub.cabinet.lent.service.LentFacadeService; -import org.ftclub.cabinet.user.domain.User; import org.ftclub.cabinet.user.service.LentExtensionManager; import org.ftclub.cabinet.user.service.UserCommandService; import org.ftclub.cabinet.user.service.UserQueryService; @@ -55,21 +53,4 @@ public String ok() { lentExtensionManager.issueLentExtension(); return "ok"; } - - /** - * 임시 메소드 (Redis to DB coin update) - * - * @return - */ - @GetMapping("/item") - @AuthGuard(level = AuthLevel.ADMIN_ONLY) - public String ok2() { - List allUsers = userQueryService.findAllUsers(); - allUsers.stream().map(User::getId).forEach(userId -> { - long coinAmount = itemRedisService.getCoinAmount(userId); - userCommandService.overwriteCoinAmount(userId, coinAmount); - }); - return "ok"; - } - } diff --git a/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java b/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java index d2c7e55b9..c571557f7 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java @@ -152,10 +152,4 @@ public void addCoin(Long reward) { this.coin += reward; } - /** - * 임시 메소드 - */ - public void setCoin(Long coin) { - this.coin = coin; - } } diff --git a/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java b/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java index 421496d98..83bf64d6e 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java @@ -115,14 +115,4 @@ public void updateCoinAmount(Long userId, Long reward) { .orElseThrow(ExceptionStatus.NOT_FOUND_USER::asServiceException); user.addCoin(reward); } - - /** - * 임시 메소드 - */ - public void overwriteCoinAmount(Long userId, Long coin) { - User user = userRepository.findById(userId) - .orElseThrow(ExceptionStatus.NOT_FOUND_USER::asServiceException); - user.setCoin(coin); - } - } diff --git a/backend/src/main/java/org/ftclub/cabinet/user/service/UserQueryService.java b/backend/src/main/java/org/ftclub/cabinet/user/service/UserQueryService.java index 8863ac4f2..d9e3b55d7 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/service/UserQueryService.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/service/UserQueryService.java @@ -158,8 +158,4 @@ public List findAllUsersByNames(List userNames) { } - public List findAllUsers() { - return userRepository.findAllDeletedAtIsNull(); - } - } From a024b4f275e8fa5262206bab10c7e4d0d5023af1 Mon Sep 17 00:00:00 2001 From: chyo1 Date: Mon, 8 Jul 2024 14:25:52 +0900 Subject: [PATCH 025/132] =?UTF-8?q?[BE]=20HOTFIX=20:=20=EC=97=B0=EC=9E=A5?= =?UTF-8?q?=EA=B6=8C=20=EB=B0=9C=EA=B8=89=20=EC=8B=9C=20used=5Fat=EC=9D=84?= =?UTF-8?q?=20=EA=B5=AC=EB=A7=A4=EC=8B=9C=EA=B0=81=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EC=A7=80=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/ftclub/cabinet/item/service/ItemFacadeService.java | 4 ++-- .../cabinet/item/service/ItemHistoryCommandService.java | 2 +- .../org/ftclub/cabinet/user/service/LentExtensionManager.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java b/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java index 5e6f21437..d5ab4c859 100644 --- a/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java +++ b/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java @@ -192,7 +192,7 @@ public CoinCollectionRewardResponseDto collectCoinAndIssueReward(Long userId) { // DB에 코인 저장 Item coinCollect = itemQueryService.getBySku(Sku.COIN_COLLECT); int reward = (int) (coinCollect.getPrice().longValue()); - itemHistoryCommandService.createCoinCollectItemHistory(userId, coinCollect.getId()); + itemHistoryCommandService.createCoinItemHistory(userId, coinCollect.getId()); // 출석 일자에 따른 랜덤 리워드 지급 Long coinCollectionCountInMonth = @@ -203,7 +203,7 @@ public CoinCollectionRewardResponseDto collectCoinAndIssueReward(Long userId) { Sku coinSku = itemPolicyService.getRewardSku(randomPercentage); Item coinReward = itemQueryService.getBySku(coinSku); - itemHistoryCommandService.createCoinCollectItemHistory(userId, coinReward.getId()); + itemHistoryCommandService.createCoinItemHistory(userId, coinReward.getId()); reward += coinReward.getPrice(); } diff --git a/backend/src/main/java/org/ftclub/cabinet/item/service/ItemHistoryCommandService.java b/backend/src/main/java/org/ftclub/cabinet/item/service/ItemHistoryCommandService.java index 700c3fa7f..2863043c4 100644 --- a/backend/src/main/java/org/ftclub/cabinet/item/service/ItemHistoryCommandService.java +++ b/backend/src/main/java/org/ftclub/cabinet/item/service/ItemHistoryCommandService.java @@ -29,7 +29,7 @@ public void createItemHistories(List userIds, Long itemId, LocalDateTime u itemHistoryRepository.saveAll(itemHistories); } - public void createCoinCollectItemHistory(Long userId, Long itemId) { + public void createCoinItemHistory(Long userId, Long itemId) { ItemHistory coinCollectItemHistory = ItemHistory.of(userId, itemId, LocalDateTime.now()); itemHistoryRepository.save(coinCollectItemHistory); } diff --git a/backend/src/main/java/org/ftclub/cabinet/user/service/LentExtensionManager.java b/backend/src/main/java/org/ftclub/cabinet/user/service/LentExtensionManager.java index 5e5fd27e1..cb569e574 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/service/LentExtensionManager.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/service/LentExtensionManager.java @@ -46,7 +46,7 @@ public void issueLentExtension() { users.forEach(user -> { Long userId = user.getId(); user.addCoin(coinRewardItem.getPrice()); - itemHistoryCommandService.createItemHistory(userId, coinRewardItem.getId()); + itemHistoryCommandService.createCoinItemHistory(userId, coinRewardItem.getId()); }); } From 00f5145c302d84f6d51a31617b8e31d357883053 Mon Sep 17 00:00:00 2001 From: saewoo1 Date: Tue, 9 Jul 2024 14:38:52 +0900 Subject: [PATCH 026/132] =?UTF-8?q?FIX:=20=EC=9C=A0=EC=A0=80Entity=20?= =?UTF-8?q?=EB=82=B4=EC=9D=98=20=EC=BD=94=EC=9D=B8=20=EC=BB=AC=EB=9F=BC=20?= =?UTF-8?q?=EB=AA=85=EC=84=B8=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hibernate 에서 정의 충돌로 인해 명세 제거 --- backend/src/main/java/org/ftclub/cabinet/user/domain/User.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java b/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java index c571557f7..01edc1e72 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java @@ -62,7 +62,7 @@ public class User { private boolean pushAlarm; @NotNull - @Column(name = "COIN", columnDefinition = "bigint default 0") + @Column(name = "COIN") private Long coin; protected User(String name, String email, LocalDateTime blackholedAt) { From 4116707c1da1058da6b10b8f01150004afb4decf Mon Sep 17 00:00:00 2001 From: Woo Joo Chae Date: Tue, 9 Jul 2024 14:46:19 +0900 Subject: [PATCH 027/132] [BE] FIX: local config refresh --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 17a625f08..4ba0fb6f5 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit 17a625f087c040b00938e9369e12c0732fc4bb7b +Subproject commit 4ba0fb6f55e1d3fee4a8f9a6e07da0d9c38aa25c From 00f6dc502ef57d32d98239076782d130c09e0d00 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Tue, 9 Jul 2024 15:54:38 +0900 Subject: [PATCH 028/132] =?UTF-8?q?[FE]=20DOCS:=20SlackAlarm.ts=EC=97=90?= =?UTF-8?q?=20=EC=9E=88=EB=8A=94=20=ED=85=9C=ED=94=8C=EB=A6=BF=20=EB=A9=94?= =?UTF-8?q?=EC=8B=9C=EC=A7=80=20white=20space=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Cabinet/assets/data/SlackAlarm.ts | 208 +++++++++++------- 1 file changed, 126 insertions(+), 82 deletions(-) diff --git a/frontend/src/Cabinet/assets/data/SlackAlarm.ts b/frontend/src/Cabinet/assets/data/SlackAlarm.ts index c89bb73cf..4c43a825a 100644 --- a/frontend/src/Cabinet/assets/data/SlackAlarm.ts +++ b/frontend/src/Cabinet/assets/data/SlackAlarm.ts @@ -23,112 +23,156 @@ export const SlackAlarmTemplates: ISlackAlarmTemplate[] = [ { title: "점검 시작", content: `:alert::alert::alert::alert::alert::alert: - :happy_ccabi: 안녕하세요. Cabi 팀입니다! :happy_ccabi: - :sad_ccabi: 서비스 개선을 위해, 서버를 점검하게 되었습니다. :sad_ccabi: - :file_cabinet: 서비스 개선과 관련한 사항은 Cabi 채널 에서, :file_cabinet: - :hammer_and_wrench: 보관물 관련 사항은 *데스크에 직접 문의*해주세요! :hammer_and_wrench: - 점검 일자 : 2024년 04월 02일 (화요일) - 점검 시간 : 15시 10분 ~ 완료 공지 시점까지 +:happy_ccabi: 안녕하세요. Cabi 팀입니다! :happy_ccabi: +:sad_ccabi: 서비스 개선을 위해, 서버를 점검하게 되었습니다. :sad_ccabi: +:file_cabinet: 서비스 개선과 관련한 사항은 Cabi 채널 에서, :file_cabinet: +:hammer_and_wrench: 보관물 관련 사항은 *데스크에 직접 문의*해주세요! :hammer_and_wrench: - :party-dinosaur::party-dinosaur::party-dinosaur::party-dinosaur:잠시만 기다려주세요! :party-dinosaur::party-dinosaur::party-dinosaur::party-dinosaur:`, +점검 일자 : 2024년 04월 02일 (화요일) +점검 시간 : 15시 10분 ~ 완료 공지 시점까지 + +:party-dinosaur::party-dinosaur::party-dinosaur::party-dinosaur:잠시만 기다려주세요! :party-dinosaur::party-dinosaur::party-dinosaur::party-dinosaur:`, }, { title: "점검 완료", content: `:dancing_kirby::dancing_kirby::dancing_kirby::dancing_kirby::dancing_kirby::dancing_kirby: - 안녕하세요. Cabi 팀입니다! :happy_ccabi: - 현시간부로 서비스 이용이 정상화되었습니다. - :portal_blue_parrot: 서비스는 cabi.42seoul.io 를 이용해주시면 됩니다. :portal_orange_parrot: - :file_cabinet: 서비스 개선과 관련한 사항은 Cabi 채널 문의주세요! :file_cabinet: - :party-dinosaur::party-dinosaur::party-dinosaur::party-dinosaur:기다려주셔서 감사합니다! :party-dinosaur::party-dinosaur::party-dinosaur::party-dinosaur:`, + +안녕하세요. Cabi 팀입니다! :happy_ccabi: +현시간부로 서비스 이용이 정상화되었습니다. +:portal_blue_parrot: 서비스는 cabi.42seoul.io 를 이용해주시면 됩니다. :portal_orange_parrot: +:file_cabinet: 서비스 개선과 관련한 사항은 Cabi 채널 문의주세요! :file_cabinet: + +:party-dinosaur::party-dinosaur::party-dinosaur::party-dinosaur:기다려주셔서 감사합니다! :party-dinosaur::party-dinosaur::party-dinosaur::party-dinosaur:`, }, { title: "업데이트", content: `:dancing_kirby::dancing_kirby::dancing_kirby::dancing_kirby::dancing_kirby::dancing_kirby: - :happy_ccabi:동아리 장분들의 동아리 기능 사용 방법:happy_ccabi: - =============================================== - 내용 - =============================================== - :point_right: 서비스는 cabi.42seoul.io 를 이용해주시면 됩니다. :point_left:`, + +:happy_ccabi:동아리 장분들의 동아리 기능 사용 방법:happy_ccabi: +=============================================== +내용 +=============================================== + +:point_right: 서비스는 cabi.42seoul.io 를 이용해주시면 됩니다. :point_left:`, }, { title: "이용 안내서", content: `:file_cabinet: Cabi 이용 안내서 :file_cabinet: - :embarrassed_cabi: 42seoul의 사물함 대여 서비스를 운영중인 Cabi 팀입니다.:embarrassed_cabi: - 자세한 이용 방법은 Cabi 가입 후 홈페이지의 이용 안내서를 참고해 주세요! - :point_right: https://cabi.42seoul.io/home - :alert: Cabi FAQ :alert: - :pushpin: 사물함의 물리적인 문제가 있습니다 (고장 났거나 잠겨있는 경우) - :happy_ccabi: 사물함의 물리적인 문제는 데스크에 문의 부탁드립니다! - :pushpin: 사물함 비밀번호를 모릅니다 (잊어버렸습니다). - :happy_ccabi: 저희 서비스에서 대여한 화면과 슬랙 화면을 준비해서 데스크에 문의해주시기 바랍니다! - :pushpin: 사물함을 닫으려는데 빨간 열쇠 표시가 뜨면서 경고음이 나고 잠기지 않습니다. - :happy_ccabi: 사물함 안이 꽉 차거나 제대로 닫히지 않은 경우에 발생하는데, 문을 누른 상태로 비밀번호를 입력해 보시고, 그래도 되지 않는다면 데스크에 문의 부탁드립니다! - :pushpin: 사물함 대여 후 사용하려고 했더니 안에 짐이 가득 차 있습니다. - :happy_ccabi: 이전 사용자의 짐과 관련한 문의는 데스크에 문의 부탁드립니다! - :pushpin: 공유 사물함을 대여했는데 비밀번호는 어디서 알 수 있을까요? - :happy_ccabi: 같이 사용하는 사람이 있다면 대여 내역에서 공유 메모에 적혀 있을 수 있습니다. 또는 함께 사용하는 분에게 여쭤보세요! - :pushpin: 사물함을 연체 했는데 페널티는 무엇인가요? - :happy_ccabi: 연체일만큼 누적 연체일이 증가하고, 누적일 만큼 대여가 불가능합니다:face_holding_back_tears:`, + +:embarrassed_cabi: 42seoul의 사물함 대여 서비스를 운영중인 Cabi 팀입니다.:embarrassed_cabi: +자세한 이용 방법은 Cabi 가입 후 홈페이지의 이용 안내서를 참고해 주세요! +:point_right: https://cabi.42seoul.io/home + +:alert: Cabi FAQ :alert: +:pushpin: 사물함의 물리적인 문제가 있습니다 (고장 났거나 잠겨있는 경우) +:happy_ccabi: 사물함의 물리적인 문제는 데스크에 문의 부탁드립니다! +:pushpin: 사물함 비밀번호를 모릅니다 (잊어버렸습니다). +:happy_ccabi: 저희 서비스에서 대여한 화면과 슬랙 화면을 준비해서 데스크에 문의해주시기 바랍니다! +:pushpin: 사물함을 닫으려는데 빨간 열쇠 표시가 뜨면서 경고음이 나고 잠기지 않습니다. +:happy_ccabi: 사물함 안이 꽉 차거나 제대로 닫히지 않은 경우에 발생하는데, 문을 누른 상태로 비밀번호를 입력해 보시고, 그래도 되지 않는다면 데스크에 문의 부탁드립니다! +:pushpin: 사물함 대여 후 사용하려고 했더니 안에 짐이 가득 차 있습니다. +:happy_ccabi: 이전 사용자의 짐과 관련한 문의는 데스크에 문의 부탁드립니다! +:pushpin: 공유 사물함을 대여했는데 비밀번호는 어디서 알 수 있을까요? +:happy_ccabi: 같이 사용하는 사람이 있다면 대여 내역에서 공유 메모에 적혀 있을 수 있습니다. 또는 함께 사용하는 분에게 여쭤보세요! +:pushpin: 사물함을 연체 했는데 페널티는 무엇인가요? +:happy_ccabi: 연체일만큼 누적 연체일이 증가하고, 누적일 만큼 대여가 불가능합니다:face_holding_back_tears:`, }, { title: "모집 공고", - content: `:embarrassed_cabi::embarrassed_cabi::embarrassed_cabi: :embarrassed_cabi::embarrassed_cabi::embarrassed_cabi: - 안녕하세요 Cabi 팀입니다! - 새로운 팀원 모집 공고를 올립니다:yesyes: - 많은 관심 부탁드립니다! - ---------------------------------------------------- - :dancing_kirby:모집개요:dancing_kirby: - 오늘 {날짜} 부터, {날짜} 23:59까지! - 까비 팀의 프론트엔드 / 백엔드 6기 신청을 받습니다! - 폼 작성 - 간단한 미팅 - 최종 발표 예정입니다! - ... - ...까비에 할애할 수 있으신 분! - - 열정 넘치시는 분! - :four_leaf_clover::four_leaf_clover::four_leaf_clover::four_leaf_clover::four_leaf_clover::four_leaf_clover::four_leaf_clover::four_leaf_clover::four_leaf_clover: - :four_leaf_clover::arrow_right:지금 바로 지원하기:arrow_left::four_leaf_clover: - :four_leaf_clover::four_leaf_clover::four_leaf_clover::four_leaf_clover::four_leaf_clover::four_leaf_clover::four_leaf_clover::four_leaf_clover::four_leaf_clover: - :man-bowing: 상세한 정보는 구글 폼을 참고해주시고, 이외에 모집과 관련한 문의는 - @jpark2 에게 DM 부탁드립니다! :man-bowing:`, + content: `:white_check_mark: 까비 소개 링크, 구글폼 링크 추가 :white_check_mark: + +:embarrassed_cabi::embarrassed_cabi::embarrassed_cabi: :embarrassed_cabi::embarrassed_cabi::embarrassed_cabi: + +안녕하세요 Cabi 팀입니다! +새로운 팀원 모집 공고를 올립니다:yesyes: +많은 관심 부탁드립니다! +---------------------------------------------------- +:dancing_kirby:모집개요:dancing_kirby: +오늘 {날짜} 부터, {날짜} 23:59까지! +까비 팀의 프론트엔드 / 백엔드 n기 신청을 받습니다! +폼 작성 - 간단한 미팅 - 최종 발표 예정입니다! + + +:file_cabinet: 저희 서비스는요…:file_cabinet: +사물함 대여 서비스: 42서울의 사물함 400여 개를 편리하게 대여 및 반납할 수 있는 서비스입니다. +효율적이고 원활한 서비스: 제한된 자원으로 많은 사용자가 원활… (더보기) + + +:hammer_and_wrench: 사용중인 기술 스택 :hammer_and_wrench: +프론트: :typescript: / :reactjs: / Recoil +백: :java: / Spring / Spring Boot / JPA / QueryDSL / MariaDB / Redis +인프라: :aws: EC2, RDS, S3, CloudFront, CodeDeploy / Docker / Github Actions / Pinpoint APM / Grafana / Prometheus +:star::star::star::star:위에 있는 기술들을 모르셔도 상관 없습니다!!:star::star::star::star: + + +:thumbsup_ccabi: 까비 팀에 합류하시면... :thumbsup_ccabi: +월 약 1300명의 유저가 사용하는 서비스를 직접 기획 / 운영 / 개발하기! +메인, 어드민 서비스 유지 및 보수! +친절하고 유쾌한 까비 팀원들과 친해지기! +체계적인 협업 컨벤션과 코드 리뷰! +트러블 슈팅과 기술 아카이브로 포트폴리오 해결! +42Seoul Cabinet System Developer 칭호까지! + + +:cat_thumbs: 다음과 같은 아이템을 염두하고 있어요! :cat_thumbs: +재화 시스템 - 기존 상점 페이지에 새로운 아이템 추가 및 고도화 +수요지식회 - Cabi 페이지에 합쳐진 수요지식회 페이지 분리 및 후기 기능 추가 +성능 최적화 - Lighthouse 지표 개선 + + +:pushpin: 이런 분을 우대합니다! +- 블랙홀이 넉넉하신 분! +- 많은 시간을 까비에 할애할 수 있으신 분! +- 열정 넘치시는 분! + + +:four_leaf_clover::four_leaf_clover::four_leaf_clover::four_leaf_clover::four_leaf_clover::four_leaf_clover::four_leaf_clover::four_leaf_clover::four_leaf_clover: +:four_leaf_clover::arrow_right:지금 바로 지원하기:arrow_left::four_leaf_clover: +:four_leaf_clover::four_leaf_clover::four_leaf_clover::four_leaf_clover::four_leaf_clover::four_leaf_clover::four_leaf_clover::four_leaf_clover::four_leaf_clover: + +:man-bowing: 상세한 정보는 구글 폼을 참고해주시고, 이외에 모집과 관련한 문의는 +@담당자 에게 DM 부탁드립니다! :man-bowing:`, }, { title: "동아리 사물함", content: `:happy_ccabi: 안녕하세요 사물함 서비스를 운영중인 Cabi 팀입니다 :happy_ccabi: - 이번 동아리 사물함 모집을 공지드립니다! - 기존 {날짜} 에 신청하셨던 분들도 재신청해주시기를 바랍니다. - 신청 링크 : {링크} - 내용은 아래와 같습니다. - ----------------------------------------------------- - < :hourglass_flowing_sand: 모집 기간 > - 2024년 동아리 사물함 신청은 일주일 동안 진행됩니다. - 3월 15일(금) 부터 - ~ 3월 22일(금) 23:59 까지 입니다. - *이 시간대 외의 신청은 유효하지 않은 신청으로 간주됩니다:disappointed_relieved: - ----------------------------------------------------- - < :pushpin: 선발 기준 > - [스프레드 시트에 등록된] 42 Seoul 동아리 리스트에 포함된 동아리 - 신청자 수가 사물함보다 많을경우 추첨으로 진행됩니다. - ----------------------------------------------------- - < :mantelpiece_clock: 발표일 > - 10월 20일 오후 중 발표 예정입니다! - 해당 발표 결과는 슬랙의 ‘42seoul_club_cabinet’, ‘42seoul_global_random’ 채널에 공지 드릴 예정입니다. - 사물함 배정이 완료된 후 동아리 사물함 대표분들에게, 슬랙 DM으로 메시지가 전송될 예정입니다. - ----------------------------------------------------- - < :man-tipping-hand: 유의사항 > - 1. 기존에 동아리 사물함을 사용중이셨다면, 새로이 사용하는 동아리들의 원활한 이용을 위해서 - 3월 22일(금)까지 사물함을 비워주시기 바랍니다! - 2. 위 모든 내용은 상황에 따라 변경될 수 있으며 차후에도 변경될 수 있습니다. - 이 때에는 재공지될 예정입니다! - ----------------------------------------------------- - < :telephone_receiver: 문의사항 > - 슬랙의 ‘42seoul_club_cabinet’ 채널에 문의해주시면 됩니다! :sunglasses:`, + +이번 동아리 사물함 모집을 공지드립니다! +기존 {날짜} 에 신청하셨던 분들도 재신청해주시기를 바랍니다. +신청 링크 : {링크} +내용은 아래와 같습니다. +----------------------------------------------------- +< :hourglass_flowing_sand: 모집 기간 > +2024년 동아리 사물함 신청은 일주일 동안 진행됩니다. +3월 15일(금) 부터 +~ 3월 22일(금) 23:59 까지 입니다. +*이 시간대 외의 신청은 유효하지 않은 신청으로 간주됩니다:disappointed_relieved: +----------------------------------------------------- +< :pushpin: 선발 기준 > +[스프레드 시트에 등록된] 42 Seoul 동아리 리스트에 포함된 동아리 +신청자 수가 사물함보다 많을경우 추첨으로 진행됩니다. +----------------------------------------------------- +< :mantelpiece_clock: 발표일 > +10월 20일 오후 중 발표 예정입니다! +해당 발표 결과는 슬랙의 ‘42seoul_club_cabinet’, ‘42seoul_global_random’ 채널에 공지 드릴 예정입니다. +사물함 배정이 완료된 후 동아리 사물함 대표분들에게, 슬랙 DM으로 메시지가 전송될 예정입니다. +----------------------------------------------------- +< :man-tipping-hand: 유의사항 > +1. 기존에 동아리 사물함을 사용중이셨다면, 새로이 사용하는 동아리들의 원활한 이용을 위해서 +3월 22일(금)까지 사물함을 비워주시기 바랍니다! +2. 위 모든 내용은 상황에 따라 변경될 수 있으며 차후에도 변경될 수 있습니다. +이 때에는 재공지될 예정입니다! +----------------------------------------------------- +< :telephone_receiver: 문의사항 > +슬랙의 ‘42seoul_club_cabinet’ 채널에 문의해주시면 됩니다! :sunglasses:`, }, { title: "연체", content: `[CABI] 안녕하세요! :embarrassed_cabi: - 현재 이용 중이신 사물함이 연체인 것으로 확인되어 연락드립니다. - 장기간 연체시 서비스 이용에 대한 페널티, 혹은 :tig:가 부여될 수 있음을 인지해주세요! - 사물함의 대여 기간을 확인하신 후 반납 부탁드립니다. - 항상 저희 서비스를 이용해 주셔서 감사합니다:)`, +현재 이용 중이신 사물함이 연체인 것으로 확인되어 연락드립니다. +장기간 연체시 서비스 이용에 대한 페널티, 혹은 :tig:가 부여될 수 있음을 인지해주세요! +사물함의 대여 기간을 확인하신 후 반납 부탁드립니다. +항상 저희 서비스를 이용해 주셔서 감사합니다:)`, }, ]; From cee4a2a8f8b9d9a1687165322d5ee748bc8c32f4 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Tue, 9 Jul 2024 16:13:09 +0900 Subject: [PATCH 029/132] =?UTF-8?q?[FE]=20FEAT:=20=EC=9E=90=EC=A3=BC?= =?UTF-8?q?=EC=93=B0=EB=8A=94=20=EB=B2=84=ED=8A=BC=EB=93=A4=20=ED=98=B8?= =?UTF-8?q?=EB=B2=84=EB=BF=90=EB=A7=8C=EC=95=84=EB=8B=88=EB=9D=BC=20?= =?UTF-8?q?=ED=81=B4=EB=A6=AD=EC=8B=9C=EC=97=90=EB=8F=84=20css=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9#1652?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/admin/AdminSlackNotiPage.tsx | 31 ++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/frontend/src/Cabinet/pages/admin/AdminSlackNotiPage.tsx b/frontend/src/Cabinet/pages/admin/AdminSlackNotiPage.tsx index 4fc40132b..819fae594 100644 --- a/frontend/src/Cabinet/pages/admin/AdminSlackNotiPage.tsx +++ b/frontend/src/Cabinet/pages/admin/AdminSlackNotiPage.tsx @@ -1,5 +1,5 @@ import { useRef, useState } from "react"; -import styled from "styled-components"; +import styled, { css } from "styled-components"; import { FailResponseModal, SuccessResponseModal, @@ -24,6 +24,8 @@ const AdminSlackNotiPage = () => { const [modalContent, setModalContent] = useState(""); const [modalTitle, setModalTitle] = useState(""); const [isLoading, setIsLoading] = useState(false); + const [channelBtnIdx, setChannelBtnIdx] = useState(-1); + const [templateBtnIdx, setTemplateBtnIdx] = useState(-1); const renderReceiverInput = (title: string) => { if (receiverInputRef.current) receiverInputRef.current.value = title; @@ -40,6 +42,8 @@ const AdminSlackNotiPage = () => { const initializeInputandTextArea = () => { if (receiverInputRef.current) receiverInputRef.current.value = ""; if (msgTextAreaRef.current) msgTextAreaRef.current.value = ""; + if (channelBtnIdx > -1) setChannelBtnIdx(-1); + if (templateBtnIdx > -1) setTemplateBtnIdx(-1); }; const handleSubmitButton = async () => { @@ -88,7 +92,11 @@ const AdminSlackNotiPage = () => { return ( renderReceiverInput(channel.title)} + onClick={() => { + renderReceiverInput(channel.title); + if (channelBtnIdx !== idx) setChannelBtnIdx(idx); + }} + channelBtnIsClicked={channelBtnIdx === idx} > {channel.title} @@ -104,7 +112,11 @@ const AdminSlackNotiPage = () => { return ( renderTemplateTextArea(template.title)} + onClick={() => { + renderTemplateTextArea(template.title); + if (channelBtnIdx !== idx) setTemplateBtnIdx(idx); + }} + templateBtnIsClicked={templateBtnIdx === idx} > {template.title} @@ -209,7 +221,10 @@ const CapsuleWrappingStyled = styled.div` flex-wrap: wrap; `; -const CapsuleButtonStyled = styled.span` +const CapsuleButtonStyled = styled.span<{ + channelBtnIsClicked?: boolean; + templateBtnIsClicked?: boolean; +}>` display: flex; justify-content: center; align-items: center; @@ -224,6 +239,14 @@ const CapsuleButtonStyled = styled.span` color: var(--sys-main-color); border: 1px solid var(--sys-main-color); } + + ${({ channelBtnIsClicked, templateBtnIsClicked }) => + (channelBtnIsClicked || templateBtnIsClicked) && + css` + background: var(--capsule-btn-hover-bg-color); + color: var(--sys-main-color); + border: 1px solid var(--sys-main-color); + `} `; const FormWappingStyled = styled.div` From 6307ad9b123843565f8c2ef430275a9d4cf3f348 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Tue, 9 Jul 2024 16:21:33 +0900 Subject: [PATCH 030/132] =?UTF-8?q?[FE]=20DOCS:=20SlackAlarm.ts=20?= =?UTF-8?q?=ED=85=9C=ED=94=8C=EB=A6=BF=20=EB=A9=94=EC=8B=9C=EC=A7=80=20whi?= =?UTF-8?q?te=20space=20=EC=B6=94=EA=B0=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/assets/data/SlackAlarm.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/frontend/src/Cabinet/assets/data/SlackAlarm.ts b/frontend/src/Cabinet/assets/data/SlackAlarm.ts index 4c43a825a..514b7e654 100644 --- a/frontend/src/Cabinet/assets/data/SlackAlarm.ts +++ b/frontend/src/Cabinet/assets/data/SlackAlarm.ts @@ -40,6 +40,7 @@ export const SlackAlarmTemplates: ISlackAlarmTemplate[] = [ 안녕하세요. Cabi 팀입니다! :happy_ccabi: 현시간부로 서비스 이용이 정상화되었습니다. + :portal_blue_parrot: 서비스는 cabi.42seoul.io 를 이용해주시면 됩니다. :portal_orange_parrot: :file_cabinet: 서비스 개선과 관련한 사항은 Cabi 채널 문의주세요! :file_cabinet: @@ -60,21 +61,29 @@ export const SlackAlarmTemplates: ISlackAlarmTemplate[] = [ title: "이용 안내서", content: `:file_cabinet: Cabi 이용 안내서 :file_cabinet: + :embarrassed_cabi: 42seoul의 사물함 대여 서비스를 운영중인 Cabi 팀입니다.:embarrassed_cabi: 자세한 이용 방법은 Cabi 가입 후 홈페이지의 이용 안내서를 참고해 주세요! :point_right: https://cabi.42seoul.io/home + :alert: Cabi FAQ :alert: + :pushpin: 사물함의 물리적인 문제가 있습니다 (고장 났거나 잠겨있는 경우) :happy_ccabi: 사물함의 물리적인 문제는 데스크에 문의 부탁드립니다! + :pushpin: 사물함 비밀번호를 모릅니다 (잊어버렸습니다). :happy_ccabi: 저희 서비스에서 대여한 화면과 슬랙 화면을 준비해서 데스크에 문의해주시기 바랍니다! + :pushpin: 사물함을 닫으려는데 빨간 열쇠 표시가 뜨면서 경고음이 나고 잠기지 않습니다. :happy_ccabi: 사물함 안이 꽉 차거나 제대로 닫히지 않은 경우에 발생하는데, 문을 누른 상태로 비밀번호를 입력해 보시고, 그래도 되지 않는다면 데스크에 문의 부탁드립니다! + :pushpin: 사물함 대여 후 사용하려고 했더니 안에 짐이 가득 차 있습니다. :happy_ccabi: 이전 사용자의 짐과 관련한 문의는 데스크에 문의 부탁드립니다! + :pushpin: 공유 사물함을 대여했는데 비밀번호는 어디서 알 수 있을까요? :happy_ccabi: 같이 사용하는 사람이 있다면 대여 내역에서 공유 메모에 적혀 있을 수 있습니다. 또는 함께 사용하는 분에게 여쭤보세요! + :pushpin: 사물함을 연체 했는데 페널티는 무엇인가요? :happy_ccabi: 연체일만큼 누적 연체일이 증가하고, 누적일 만큼 대여가 불가능합니다:face_holding_back_tears:`, }, From b2c7e56cf5c2847703f746a6cd1eb1d8fce3e5d3 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Tue, 9 Jul 2024 16:59:54 +0900 Subject: [PATCH 031/132] =?UTF-8?q?[FE]=20REFACT:=20store=20=EA=B4=80?= =?UTF-8?q?=EB=A0=A8=20=EB=AA=A8=EB=8B=AC=20StoreModal=EB=A1=9C=20?= =?UTF-8?q?=EC=9D=B4=EB=8F=99#1652?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Cabinet/components/CabinetInfoArea/CabinetInfoArea.tsx | 4 ++-- .../src/Cabinet/components/Card/LentInfoCard/LentInfoCard.tsx | 2 +- .../Modals/{ExtendModal => StoreModal}/ExtendModal.tsx | 0 .../Modals/{PenaltyModal => StoreModal}/PenaltyModal.tsx | 0 .../{SectionAlertModal => StoreModal}/SectionAlertModal.tsx | 0 .../components/Modals/{SwapModal => StoreModal}/SwapModal.tsx | 0 frontend/src/Cabinet/pages/MainPage.tsx | 2 +- 7 files changed, 4 insertions(+), 4 deletions(-) rename frontend/src/Cabinet/components/Modals/{ExtendModal => StoreModal}/ExtendModal.tsx (100%) rename frontend/src/Cabinet/components/Modals/{PenaltyModal => StoreModal}/PenaltyModal.tsx (100%) rename frontend/src/Cabinet/components/Modals/{SectionAlertModal => StoreModal}/SectionAlertModal.tsx (100%) rename frontend/src/Cabinet/components/Modals/{SwapModal => StoreModal}/SwapModal.tsx (100%) diff --git a/frontend/src/Cabinet/components/CabinetInfoArea/CabinetInfoArea.tsx b/frontend/src/Cabinet/components/CabinetInfoArea/CabinetInfoArea.tsx index 8ec38283a..9159f504c 100644 --- a/frontend/src/Cabinet/components/CabinetInfoArea/CabinetInfoArea.tsx +++ b/frontend/src/Cabinet/components/CabinetInfoArea/CabinetInfoArea.tsx @@ -9,13 +9,13 @@ import CountTimeContainer from "@/Cabinet/components/CabinetInfoArea/CountTime/C import ButtonContainer from "@/Cabinet/components/Common/Button"; import SelectInduction from "@/Cabinet/components/Common/SelectInduction"; import CancelModal from "@/Cabinet/components/Modals/CancelModal/CancelModal"; -import ExtendModal from "@/Cabinet/components/Modals/ExtendModal/ExtendModal"; import InvitationCodeModalContainer from "@/Cabinet/components/Modals/InvitationCodeModal/InvitationCodeModal.container"; import LentModal from "@/Cabinet/components/Modals/LentModal/LentModal"; import MemoModalContainer from "@/Cabinet/components/Modals/MemoModal/MemoModal.container"; import PasswordCheckModalContainer from "@/Cabinet/components/Modals/PasswordCheckModal/PasswordCheckModal.container"; import ReturnModal from "@/Cabinet/components/Modals/ReturnModal/ReturnModal"; -import SwapModal from "@/Cabinet/components/Modals/SwapModal/SwapModal"; +import ExtendModal from "@/Cabinet/components/Modals/StoreModal/ExtendModal"; +import SwapModal from "@/Cabinet/components/Modals/StoreModal/SwapModal"; import UnavailableModal from "@/Cabinet/components/Modals/UnavailableModal/UnavailableModal"; import { additionalModalType, diff --git a/frontend/src/Cabinet/components/Card/LentInfoCard/LentInfoCard.tsx b/frontend/src/Cabinet/components/Card/LentInfoCard/LentInfoCard.tsx index dbadf6aeb..b3cc0195b 100644 --- a/frontend/src/Cabinet/components/Card/LentInfoCard/LentInfoCard.tsx +++ b/frontend/src/Cabinet/components/Card/LentInfoCard/LentInfoCard.tsx @@ -7,7 +7,7 @@ import { ContentInfoStyled, } from "@/Cabinet/components/Card/CardStyles"; import { MyCabinetInfo } from "@/Cabinet/components/Card/LentInfoCard/LentInfoCard.container"; -import PenaltyModal from "@/Cabinet/components/Modals//PenaltyModal/PenaltyModal"; +import PenaltyModal from "@/Cabinet/components/Modals/StoreModal/PenaltyModal"; import { cabinetIconComponentMap } from "@/Cabinet/assets/data/maps"; import { IItemTimeRemaining } from "@/Cabinet/types/dto/store.dto"; import CabinetStatus from "@/Cabinet/types/enum/cabinet.status.enum"; diff --git a/frontend/src/Cabinet/components/Modals/ExtendModal/ExtendModal.tsx b/frontend/src/Cabinet/components/Modals/StoreModal/ExtendModal.tsx similarity index 100% rename from frontend/src/Cabinet/components/Modals/ExtendModal/ExtendModal.tsx rename to frontend/src/Cabinet/components/Modals/StoreModal/ExtendModal.tsx diff --git a/frontend/src/Cabinet/components/Modals/PenaltyModal/PenaltyModal.tsx b/frontend/src/Cabinet/components/Modals/StoreModal/PenaltyModal.tsx similarity index 100% rename from frontend/src/Cabinet/components/Modals/PenaltyModal/PenaltyModal.tsx rename to frontend/src/Cabinet/components/Modals/StoreModal/PenaltyModal.tsx diff --git a/frontend/src/Cabinet/components/Modals/SectionAlertModal/SectionAlertModal.tsx b/frontend/src/Cabinet/components/Modals/StoreModal/SectionAlertModal.tsx similarity index 100% rename from frontend/src/Cabinet/components/Modals/SectionAlertModal/SectionAlertModal.tsx rename to frontend/src/Cabinet/components/Modals/StoreModal/SectionAlertModal.tsx diff --git a/frontend/src/Cabinet/components/Modals/SwapModal/SwapModal.tsx b/frontend/src/Cabinet/components/Modals/StoreModal/SwapModal.tsx similarity index 100% rename from frontend/src/Cabinet/components/Modals/SwapModal/SwapModal.tsx rename to frontend/src/Cabinet/components/Modals/StoreModal/SwapModal.tsx diff --git a/frontend/src/Cabinet/pages/MainPage.tsx b/frontend/src/Cabinet/pages/MainPage.tsx index 070e57387..66c212103 100644 --- a/frontend/src/Cabinet/pages/MainPage.tsx +++ b/frontend/src/Cabinet/pages/MainPage.tsx @@ -13,7 +13,7 @@ import { import { currentFloorSectionState } from "@/Cabinet/recoil/selectors"; import CabinetListContainer from "@/Cabinet/components/CabinetList/CabinetList.container"; import LoadingAnimation from "@/Cabinet/components/Common/LoadingAnimation"; -import SectionAlertModal from "@/Cabinet/components/Modals/SectionAlertModal/SectionAlertModal"; +import SectionAlertModal from "@/Cabinet/components/Modals/StoreModal/SectionAlertModal"; import SectionPaginationContainer from "@/Cabinet/components/SectionPagination/SectionPagination.container"; import { clubSectionsData } from "@/Cabinet/assets/data/mapPositionData"; import { ReactComponent as FilledHeartIcon } from "@/Cabinet/assets/images/filledHeart.svg"; From 61049666017004e96258c276c0c6637590b16c58 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Tue, 9 Jul 2024 17:05:52 +0900 Subject: [PATCH 032/132] =?UTF-8?q?[FE]=20FIX:=20=ED=85=9C=ED=94=8C?= =?UTF-8?q?=EB=A6=BF=20=EB=B2=84=ED=8A=BC=20=EB=88=84=EB=A5=BC=EB=95=8C=20?= =?UTF-8?q?channelBtnIdx=EA=B0=80=20=EC=95=84=EB=8B=8C=20templateBtnIdx?= =?UTF-8?q?=EB=A1=9C=20=EB=B9=84=EA=B5=90=ED=95=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EA=B5=90=EC=B2=B4#1652?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/pages/admin/AdminSlackNotiPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/Cabinet/pages/admin/AdminSlackNotiPage.tsx b/frontend/src/Cabinet/pages/admin/AdminSlackNotiPage.tsx index 819fae594..137e184d4 100644 --- a/frontend/src/Cabinet/pages/admin/AdminSlackNotiPage.tsx +++ b/frontend/src/Cabinet/pages/admin/AdminSlackNotiPage.tsx @@ -114,7 +114,7 @@ const AdminSlackNotiPage = () => { key={idx} onClick={() => { renderTemplateTextArea(template.title); - if (channelBtnIdx !== idx) setTemplateBtnIdx(idx); + if (templateBtnIdx !== idx) setTemplateBtnIdx(idx); }} templateBtnIsClicked={templateBtnIdx === idx} > From 64ca01ba252a7cb3fb64351b52cadf87948dbd39 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Tue, 9 Jul 2024 17:10:13 +0900 Subject: [PATCH 033/132] =?UTF-8?q?[FE]=20REFACT:=20=ED=85=9C=ED=94=8C?= =?UTF-8?q?=EB=A6=BF=20=EB=B2=84=ED=8A=BC=20=EB=88=84=EB=A5=B4=EA=B1=B0?= =?UTF-8?q?=EB=82=98=20hover=20=EC=9D=BC=EB=95=8C=EC=9D=98=20=EC=8A=A4?= =?UTF-8?q?=ED=83=80=EC=9D=BC=EC=9D=84=20=EB=8B=B4=EB=8A=94=20hoverAndClic?= =?UTF-8?q?kedBtnStyles=20=EB=B3=80=EC=88=98=20=EC=A0=95=EC=9D=98=ED=95=B4?= =?UTF-8?q?=20=EC=A0=81=EC=9A=A9=20#1652?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Cabinet/pages/admin/AdminSlackNotiPage.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/frontend/src/Cabinet/pages/admin/AdminSlackNotiPage.tsx b/frontend/src/Cabinet/pages/admin/AdminSlackNotiPage.tsx index 137e184d4..cecc32a9b 100644 --- a/frontend/src/Cabinet/pages/admin/AdminSlackNotiPage.tsx +++ b/frontend/src/Cabinet/pages/admin/AdminSlackNotiPage.tsx @@ -16,6 +16,12 @@ import { axiosSendSlackNotificationToUser, } from "@/Cabinet/api/axios/axios.custom"; +const hoverAndClickedBtnStyles = css` + background: var(--capsule-btn-hover-bg-color); + color: var(--sys-main-color); + border: 1px solid var(--sys-main-color); +`; + const AdminSlackNotiPage = () => { const receiverInputRef = useRef(null); const msgTextAreaRef = useRef(null); @@ -235,17 +241,13 @@ const CapsuleButtonStyled = styled.span<{ cursor: pointer; :hover { - background: var(--capsule-btn-hover-bg-color); - color: var(--sys-main-color); - border: 1px solid var(--sys-main-color); + ${hoverAndClickedBtnStyles} } ${({ channelBtnIsClicked, templateBtnIsClicked }) => (channelBtnIsClicked || templateBtnIsClicked) && css` - background: var(--capsule-btn-hover-bg-color); - color: var(--sys-main-color); - border: 1px solid var(--sys-main-color); + ${hoverAndClickedBtnStyles} `} `; From 0b187e50f4d4ac20a8a7fc2ebb207fa89c02b321 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Tue, 16 Jul 2024 13:48:09 +0900 Subject: [PATCH 034/132] =?UTF-8?q?[FE]=20DOCS:=20github=20issue=20UI=20?= =?UTF-8?q?=EA=B0=9C=EC=84=A0=EC=B0=BD=EA=B5=AC=20=ED=85=9C=ED=94=8C?= =?UTF-8?q?=EB=A6=BF=20=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/ui_improvement.yml | 46 +++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/ui_improvement.yml diff --git a/.github/ISSUE_TEMPLATE/ui_improvement.yml b/.github/ISSUE_TEMPLATE/ui_improvement.yml new file mode 100644 index 000000000..0a01bccf0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/ui_improvement.yml @@ -0,0 +1,46 @@ +name: "UI 개선 창구" +description: UI 개선점 작성 기본 양식입니다. +labels: ["ui"] +body: + - type: markdown + attributes: + value: | + 작성 예시 : "[FE] 지도-E/V 버튼 눌렀을때 나타나는 로고 색 다크모드 적용" + - type: textarea + id: ui-description + attributes: + label: UI 문제점 설명 + description: 문제가 언제/어떻게 발생했는지 명확하게 적어주세요. + placeholder: 설명을 적어주세요. + validations: + required: true + - type: textarea + id: reproduction + attributes: + label: 재현 방법 + description: 문제가 재현되는 상황을 설명해주세요. + placeholder: 설명을 적어주세요. + validations: + required: true + - type: textarea + id: improvement + attributes: + label: 기대하는 UI + description: 기대하는 UI에 대해서 설명해주세요. + placeholder: 설명을 적어주세요. + validations: + required: true + - type: textarea + id: system-info + attributes: + label: 시스템 환경 (선택 사항) + description: 현재 버그가 발생한 시스템 환경을 적어주세요. + render: shell + placeholder: OS, 브라우저 등을 적어주세요. + validations: + required: false + - type: textarea + id: additional-context + attributes: + label: 추가 건의사항 + description: Cabi에 바라시는 점이나, 하시고 싶은 말씀을 적어주세요. From d45d03b82153da88b723eadc4f0cfa1e49ca6029 Mon Sep 17 00:00:00 2001 From: Woo Joo Chae Date: Tue, 16 Jul 2024 14:38:09 +0900 Subject: [PATCH 035/132] [BE] FIX: config - swap limit 7days -> 1days --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 4ba0fb6f5..dbe683d73 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit 4ba0fb6f55e1d3fee4a8f9a6e07da0d9c38aa25c +Subproject commit dbe683d7377027eed09fb0efe098a16def6331be From 6221ad6c81ddb6f65e50ecfabb13bd5a491e0b07 Mon Sep 17 00:00:00 2001 From: Woo Joo Chae Date: Tue, 16 Jul 2024 14:54:20 +0900 Subject: [PATCH 036/132] [BE] HOTFIX: Share ban limit message fixed ( unbanned_at deleted) --- .../org/ftclub/cabinet/lent/service/LentPolicyService.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/lent/service/LentPolicyService.java b/backend/src/main/java/org/ftclub/cabinet/lent/service/LentPolicyService.java index 7fe2abbbb..9ac733204 100644 --- a/backend/src/main/java/org/ftclub/cabinet/lent/service/LentPolicyService.java +++ b/backend/src/main/java/org/ftclub/cabinet/lent/service/LentPolicyService.java @@ -59,10 +59,7 @@ private void handlePolicyStatus(LentPolicyStatus status, LocalDateTime policyDat throw new CustomExceptionStatus(ExceptionStatus.ALL_BANNED_USER, unbannedAtString).asCustomServiceException(); case SHARE_BANNED_USER: - unbannedAtString = policyDate.format( - DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm")); - throw new CustomExceptionStatus(ExceptionStatus.SHARE_CODE_TRIAL_EXCEEDED, - unbannedAtString).asCustomServiceException(); + throw ExceptionStatus.SHARE_CODE_TRIAL_EXCEEDED.asServiceException(); case BLACKHOLED_USER: throw ExceptionStatus.BLACKHOLED_USER.asServiceException(); case PENDING_CABINET: From 18d72f4e1b7f3f102337b3e95bafbfff46165e5b Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Tue, 16 Jul 2024 15:23:52 +0900 Subject: [PATCH 037/132] =?UTF-8?q?[FE]=20DOCS:=20ui=20=EA=B0=9C=EC=84=A0?= =?UTF-8?q?=20=ED=85=9C=ED=94=8C=EB=A6=BF=20=EB=AC=B8=EA=B5=AC=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/ui_improvement.yml | 4 ++-- config | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/ui_improvement.yml b/.github/ISSUE_TEMPLATE/ui_improvement.yml index 0a01bccf0..f34b2ba71 100644 --- a/.github/ISSUE_TEMPLATE/ui_improvement.yml +++ b/.github/ISSUE_TEMPLATE/ui_improvement.yml @@ -1,5 +1,5 @@ -name: "UI 개선 창구" -description: UI 개선점 작성 기본 양식입니다. +name: "UI 개선 건의" +description: UI 개선 건의 작성 기본 양식입니다. labels: ["ui"] body: - type: markdown diff --git a/config b/config index dbe683d73..4ba0fb6f5 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit dbe683d7377027eed09fb0efe098a16def6331be +Subproject commit 4ba0fb6f55e1d3fee4a8f9a6e07da0d9c38aa25c From 6acb7272c678a4cd615fdaf55417c05dda291cfe Mon Sep 17 00:00:00 2001 From: Jihyun Kim Date: Tue, 16 Jul 2024 15:30:23 +0900 Subject: [PATCH 038/132] =?UTF-8?q?[COMMON]=20DOCS:=20readme=EC=97=90=20sa?= =?UTF-8?q?ymyname=20=EA=B3=BC=EC=A0=9C=20=EC=88=98=ED=96=89=20=EB=B0=8F?= =?UTF-8?q?=20=EC=9D=B4=EB=A6=84=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 6075e13fb..1618e7c8d 100644 --- a/README.md +++ b/README.md @@ -175,6 +175,9 @@ | [ 🐶 surlee](https://github.com/Elineely) | [ 🐣 hyowchoi](https://github.com/chyo1/) | [ 👽 sohyupar](https://github.com/saewoo1) | [🦝 jimchoi](https://github.com/jimchoi9) | [ 🛼 jeekim](https://github.com/jnkeniaem) | [🍾 miyu](https://github.com/Minkyu01) | [🧸 gykoh](https://github.com/gykoh42) | | ----------------------------------------- | ----------------------------------------- | ------------------------------------------ | ----------------------------------------- | ------------------------------------------ | -------------------------------------- | -------------------------------------- | +| [ 🐶 jihykim2](https://github.com/jihyunk03) | +| -------------------------------------------- | + | | | --------------------------------------------------------------------------------------------------------------------------------------------------------- | From 33cb2de7eb870c37d828863c76102c4fad11781e Mon Sep 17 00:00:00 2001 From: seonmin Date: Tue, 16 Jul 2024 15:31:36 +0900 Subject: [PATCH 039/132] =?UTF-8?q?[COMMON]=20DOCS:=20README=20=EC=9D=B4?= =?UTF-8?q?=EB=A6=84=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 +++ frontend/package-lock.json | 1 + 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index 6075e13fb..18c445e5e 100644 --- a/README.md +++ b/README.md @@ -175,6 +175,9 @@ | [ 🐶 surlee](https://github.com/Elineely) | [ 🐣 hyowchoi](https://github.com/chyo1/) | [ 👽 sohyupar](https://github.com/saewoo1) | [🦝 jimchoi](https://github.com/jimchoi9) | [ 🛼 jeekim](https://github.com/jnkeniaem) | [🍾 miyu](https://github.com/Minkyu01) | [🧸 gykoh](https://github.com/gykoh42) | | ----------------------------------------- | ----------------------------------------- | ------------------------------------------ | ----------------------------------------- | ------------------------------------------ | -------------------------------------- | -------------------------------------- | +| [⛄️ seonmiki](https://github.com/seonmiki) | +| ------------------------------------------ | + | | | --------------------------------------------------------------------------------------------------------------------------------------------------------- | diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 1e2b3b809..6cab8e9e4 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -6648,6 +6648,7 @@ "version": "2.3.2", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, "hasInstallScript": true, "optional": true, "os": [ From 67040c8a2708fa39927e4eb3b3b9e9e04c74ddb0 Mon Sep 17 00:00:00 2001 From: JunSeong Date: Tue, 16 Jul 2024 15:35:33 +0900 Subject: [PATCH 040/132] =?UTF-8?q?[COMMON]=20DOCS:=20README=EC=97=90=20ju?= =?UTF-8?q?nsbae=20=EC=B6=94=EA=B0=80=09#1656?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6075e13fb..f498b0816 100644 --- a/README.md +++ b/README.md @@ -75,8 +75,8 @@
## 🕸️ 인프라 구조도 -![Untitled](https://github.com/innovationacademy-kr/Cabi/assets/83565255/165c1529-6164-4988-9495-6bc2ba3ef0ab) +![Untitled](https://github.com/innovationacademy-kr/Cabi/assets/83565255/165c1529-6164-4988-9495-6bc2ba3ef0ab) ## 🛠 기술 스택 @@ -175,6 +175,9 @@ | [ 🐶 surlee](https://github.com/Elineely) | [ 🐣 hyowchoi](https://github.com/chyo1/) | [ 👽 sohyupar](https://github.com/saewoo1) | [🦝 jimchoi](https://github.com/jimchoi9) | [ 🛼 jeekim](https://github.com/jnkeniaem) | [🍾 miyu](https://github.com/Minkyu01) | [🧸 gykoh](https://github.com/gykoh42) | | ----------------------------------------- | ----------------------------------------- | ------------------------------------------ | ----------------------------------------- | ------------------------------------------ | -------------------------------------- | -------------------------------------- | +| [ 🎱 junsbae ](https://github.com/wet6123) | +| ------------------------------------------ | + | | | --------------------------------------------------------------------------------------------------------------------------------------------------------- | From 523e8b00b4402b352395e87521bf4b7f6190fba0 Mon Sep 17 00:00:00 2001 From: Jihyun Kim Date: Tue, 16 Jul 2024 15:40:33 +0900 Subject: [PATCH 041/132] =?UTF-8?q?[COMMON]=20DOCS:=20readme=EC=97=90=20sa?= =?UTF-8?q?ymyname=20=EA=B3=84=EC=A0=95=EC=A0=95=EB=B3=B4=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1618e7c8d..87fd9f29c 100644 --- a/README.md +++ b/README.md @@ -175,7 +175,7 @@ | [ 🐶 surlee](https://github.com/Elineely) | [ 🐣 hyowchoi](https://github.com/chyo1/) | [ 👽 sohyupar](https://github.com/saewoo1) | [🦝 jimchoi](https://github.com/jimchoi9) | [ 🛼 jeekim](https://github.com/jnkeniaem) | [🍾 miyu](https://github.com/Minkyu01) | [🧸 gykoh](https://github.com/gykoh42) | | ----------------------------------------- | ----------------------------------------- | ------------------------------------------ | ----------------------------------------- | ------------------------------------------ | -------------------------------------- | -------------------------------------- | -| [ 🐶 jihykim2](https://github.com/jihyunk03) | +| [ 🐰 jihykim2](https://github.com/jihyunk03) | | -------------------------------------------- | | | From 90b9ff70290d1a284f05f5e8be7d768e7ece4f28 Mon Sep 17 00:00:00 2001 From: seonmin Date: Tue, 16 Jul 2024 15:49:55 +0900 Subject: [PATCH 042/132] =?UTF-8?q?[COMMON]=20ETC:=20json=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EB=B3=B5=EC=9B=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/package-lock.json | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 6cab8e9e4..1e2b3b809 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -6648,7 +6648,6 @@ "version": "2.3.2", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, "hasInstallScript": true, "optional": true, "os": [ From 471e8845647919b03c9f3d99b021765b200ca147 Mon Sep 17 00:00:00 2001 From: Woo Joo Chae Date: Tue, 16 Jul 2024 15:55:11 +0900 Subject: [PATCH 043/132] [BE] HOTFIX: Share Ban bug fix (session reset issue) --- .../java/org/ftclub/cabinet/lent/service/LentFacadeService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/main/java/org/ftclub/cabinet/lent/service/LentFacadeService.java b/backend/src/main/java/org/ftclub/cabinet/lent/service/LentFacadeService.java index 62a615afd..2d293beac 100644 --- a/backend/src/main/java/org/ftclub/cabinet/lent/service/LentFacadeService.java +++ b/backend/src/main/java/org/ftclub/cabinet/lent/service/LentFacadeService.java @@ -338,6 +338,7 @@ public void cancelShareCabinetLent(Long userId, Long cabinetId) { Cabinet cabinet = cabinetQueryService.getCabinetForUpdate(cabinetId); cabinetCommandService.changeStatus(cabinet, CabinetStatus.AVAILABLE); } + lentRedisService.clearCabinetSession(cabinetId); } /** From ebcedb3a45bfcb65b2c0760f46481ba94f90e96b Mon Sep 17 00:00:00 2001 From: chyo1 Date: Tue, 16 Jul 2024 16:19:03 +0900 Subject: [PATCH 044/132] =?UTF-8?q?[BE]=20HOTFIX=20:=20=EA=B3=B5=EC=9C=A0?= =?UTF-8?q?=20=EC=82=AC=EB=AC=BC=ED=95=A8=20=EB=8C=80=EC=97=AC=20=EC=8B=9C?= =?UTF-8?q?=20=EA=B3=B5=EC=9C=A0=20=EC=BD=94=EB=93=9C=203=EB=B2=88=20?= =?UTF-8?q?=ED=8B=80=EB=A6=B0=20=EA=B2=BD=EC=9A=B0,=20redis=20userSession?= =?UTF-8?q?=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/ftclub/cabinet/lent/service/LentFacadeService.java | 1 - .../java/org/ftclub/cabinet/lent/service/LentRedisService.java | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/lent/service/LentFacadeService.java b/backend/src/main/java/org/ftclub/cabinet/lent/service/LentFacadeService.java index 2d293beac..62a615afd 100644 --- a/backend/src/main/java/org/ftclub/cabinet/lent/service/LentFacadeService.java +++ b/backend/src/main/java/org/ftclub/cabinet/lent/service/LentFacadeService.java @@ -338,7 +338,6 @@ public void cancelShareCabinetLent(Long userId, Long cabinetId) { Cabinet cabinet = cabinetQueryService.getCabinetForUpdate(cabinetId); cabinetCommandService.changeStatus(cabinet, CabinetStatus.AVAILABLE); } - lentRedisService.clearCabinetSession(cabinetId); } /** diff --git a/backend/src/main/java/org/ftclub/cabinet/lent/service/LentRedisService.java b/backend/src/main/java/org/ftclub/cabinet/lent/service/LentRedisService.java index b65a4c2c0..6d2b57f0c 100644 --- a/backend/src/main/java/org/ftclub/cabinet/lent/service/LentRedisService.java +++ b/backend/src/main/java/org/ftclub/cabinet/lent/service/LentRedisService.java @@ -160,6 +160,8 @@ public void deleteUserInCabinet(Long cabinetId, Long userId) { lentRedis.deleteUserInCabinet(cabinetIdString, userIdString); if (lentRedis.countUserInCabinet(cabinetIdString) == 0) { lentRedis.deleteShadowKey(cabinetIdString); + clearCabinetSession(cabinetId); + } } From c5ea607688c2e619189910431f6d3e8aad1e8d1a Mon Sep 17 00:00:00 2001 From: Woo Joo Chae Date: Wed, 17 Jul 2024 14:21:20 +0900 Subject: [PATCH 045/132] =?UTF-8?q?[BE]=20HOTFIX:=20=EC=97=B0=EC=B2=B4?= =?UTF-8?q?=EC=8B=9C=20=EC=97=B0=EC=9E=A5=EA=B6=8C=20=EC=82=AC=EC=9A=A9=20?= =?UTF-8?q?=EB=B6=88=EA=B0=80=20=EB=A1=9C=EC=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ftclub/cabinet/exception/ExceptionStatus.java | 2 +- .../cabinet/lent/domain/LentPolicyStatus.java | 4 ++-- .../cabinet/lent/service/LentFacadeService.java | 3 +++ .../cabinet/lent/service/LentPolicyService.java | 15 +++++++++++++++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/exception/ExceptionStatus.java b/backend/src/main/java/org/ftclub/cabinet/exception/ExceptionStatus.java index 55ac3ae7a..bf1bce5f1 100644 --- a/backend/src/main/java/org/ftclub/cabinet/exception/ExceptionStatus.java +++ b/backend/src/main/java/org/ftclub/cabinet/exception/ExceptionStatus.java @@ -55,8 +55,8 @@ public enum ExceptionStatus { CLUB_HAS_LENT_CABINET(HttpStatus.NOT_ACCEPTABLE, "대여 중인 사물함을 반납 후 삭제할 수 있습니다."), HANEAPI_ERROR(HttpStatus.BAD_GATEWAY, "24HANE API 통신에 에러가 있습니다."), EXTENSION_NOT_FOUND(HttpStatus.BAD_REQUEST, "연장권이 존재하지 않습니다."), + EXTENSION_LENT_DELAYED(HttpStatus.FORBIDDEN, "연장권은 연체된 사물함에 사용할 수 없습니다."), EXTENSION_SOLO_IN_SHARE_NOT_ALLOWED(HttpStatus.UNAUTHORIZED, "연장권은 1명일 때 사용할 수 없습니다."), - EXTENSION_LENT_DELAYED(HttpStatus.UNAUTHORIZED, "연장권은 연체된 사물함에 사용할 수 없습니다."), MAIL_BAD_GATEWAY(HttpStatus.BAD_GATEWAY, "메일 전송 중 에러가 발생했습니다"), SLACK_REQUEST_BAD_GATEWAY(HttpStatus.BAD_GATEWAY, "슬랙 인증 중 에러가 발생했습니다."), SLACK_MESSAGE_SEND_BAD_GATEWAY(HttpStatus.BAD_GATEWAY, "슬랙 메세지 전송 중 에러가 발생했습니다."), diff --git a/backend/src/main/java/org/ftclub/cabinet/lent/domain/LentPolicyStatus.java b/backend/src/main/java/org/ftclub/cabinet/lent/domain/LentPolicyStatus.java index 947fd636b..196edfeea 100644 --- a/backend/src/main/java/org/ftclub/cabinet/lent/domain/LentPolicyStatus.java +++ b/backend/src/main/java/org/ftclub/cabinet/lent/domain/LentPolicyStatus.java @@ -56,7 +56,7 @@ public enum LentPolicyStatus { INVALID_LENT_TYPE, INVALID_ARGUMENT, INVALID_EXPIREDAT, SWAP_SAME_CABINET, LENT_NOT_CLUB, - - SWAP_LIMIT_EXCEEDED + SWAP_LIMIT_EXCEEDED, + OVERDUE_CABINET_EXTEND } \ No newline at end of file diff --git a/backend/src/main/java/org/ftclub/cabinet/lent/service/LentFacadeService.java b/backend/src/main/java/org/ftclub/cabinet/lent/service/LentFacadeService.java index 62a615afd..9d53e29a9 100644 --- a/backend/src/main/java/org/ftclub/cabinet/lent/service/LentFacadeService.java +++ b/backend/src/main/java/org/ftclub/cabinet/lent/service/LentFacadeService.java @@ -441,6 +441,9 @@ public void plusExtensionDays(Long userId, Integer days) { userId, LentExtensionType.ALL, days); List lentHistories = lentQueryService.findCabinetActiveLentHistories( cabinet.getId()); + lentHistories.forEach( + lentHistory -> lentPolicyService.verifyExtendable(lentHistory.getExpiredAt()) + ); lentExtensionCommandService.useLentExtension(lentExtensionByItem, lentHistories); } } diff --git a/backend/src/main/java/org/ftclub/cabinet/lent/service/LentPolicyService.java b/backend/src/main/java/org/ftclub/cabinet/lent/service/LentPolicyService.java index 9ac733204..c26140638 100644 --- a/backend/src/main/java/org/ftclub/cabinet/lent/service/LentPolicyService.java +++ b/backend/src/main/java/org/ftclub/cabinet/lent/service/LentPolicyService.java @@ -43,6 +43,8 @@ private void handlePolicyStatus(LentPolicyStatus status, LocalDateTime policyDat throw ExceptionStatus.LENT_FULL.asServiceException(); case OVERDUE_CABINET: throw ExceptionStatus.LENT_EXPIRED.asServiceException(); + case OVERDUE_CABINET_EXTEND: + throw ExceptionStatus.EXTENSION_LENT_DELAYED.asServiceException(); case LENT_CLUB: throw ExceptionStatus.LENT_CLUB.asServiceException(); case LENT_NOT_CLUB: @@ -307,4 +309,17 @@ public void verifySwappable(boolean existSwapRecord, LocalDateTime swapExpiredAt handlePolicyStatus(LentPolicyStatus.SWAP_LIMIT_EXCEEDED, swapExpiredAt); } } + + /** + * 연장권 사용 시, 연체된 사물함에 사용하는지 확인합니다 + * + * @param expiredAt 대여만료 날짜 + */ + public void verifyExtendable(LocalDateTime expiredAt) { + LentPolicyStatus status = LentPolicyStatus.FINE; + if (expiredAt.isBefore(LocalDateTime.now())) { + status = LentPolicyStatus.OVERDUE_CABINET_EXTEND; + } + handlePolicyStatus(status, null); + } } From 47ff577c336b34271165b96f8796b1fb36615941 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Wed, 17 Jul 2024 14:29:16 +0900 Subject: [PATCH 046/132] =?UTF-8?q?[FE]=20FEAT:=20=EC=97=B0=EC=B2=B4?= =?UTF-8?q?=EC=A4=91=EC=9D=BC=EB=95=8C=20=EC=97=B0=EC=9E=A5=EA=B6=8C=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=EC=8B=9C=20api=20=ED=98=B8=EC=B6=9C=20?= =?UTF-8?q?=EC=95=88=ED=95=98=EA=B3=A0=20=EB=B0=94=EB=A1=9C=20response=20m?= =?UTF-8?q?odal=20=EB=9D=84=EC=9B=80#1661?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Modals/StoreModal/ExtendModal.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/frontend/src/Cabinet/components/Modals/StoreModal/ExtendModal.tsx b/frontend/src/Cabinet/components/Modals/StoreModal/ExtendModal.tsx index d09149bbb..b94060a0f 100644 --- a/frontend/src/Cabinet/components/Modals/StoreModal/ExtendModal.tsx +++ b/frontend/src/Cabinet/components/Modals/StoreModal/ExtendModal.tsx @@ -22,6 +22,7 @@ import { IInventoryInfo } from "@/Cabinet/components/Store/Inventory/Inventory"; import { additionalModalType, modalPropsMap } from "@/Cabinet/assets/data/maps"; import { MyCabinetInfoResponseDto } from "@/Cabinet/types/dto/cabinet.dto"; import { IItemDetail, IItemStore } from "@/Cabinet/types/dto/store.dto"; +import CabinetStatus from "@/Cabinet/types/enum/cabinet.status.enum"; import IconType from "@/Cabinet/types/enum/icon.type.enum"; import { axiosCabinetById, @@ -49,6 +50,7 @@ const ExtendModal: React.FC<{ const [itemDropdownOptions, setItemDropdownOptions] = useState< IDropdownOptions[] >([]); + const [url, setUrl] = useState(null); const [currentCabinetId] = useRecoilState(currentCabinetIdState); const [myInfo, setMyInfo] = useRecoilState(userState); const [myLentInfo, setMyLentInfo] = @@ -187,7 +189,15 @@ const ExtendModal: React.FC<{ const extensionItemUse = async (item: string) => { if (currentCabinetId === 0 || myInfo.cabinetId === null) { setHasErrorOnResponse(true); - setModalTitle("현재 대여중인 사물함이 없습니다."); + setModalTitle("연장권 사용실패"); + setModalContents("현재 대여중인 사물함이 없습니다."); + setShowResponseModal(true); + return; + } + if (myLentInfo.status === CabinetStatus.OVERDUE) { + setHasErrorOnResponse(true); + setModalTitle("연장권 사용실패"); + setModalContents(`연체 중에는 연장권을 사용하실 수 없습니다.`); setShowResponseModal(true); return; } @@ -216,6 +226,7 @@ const ExtendModal: React.FC<{ if (error.response.status === 400) { setModalTitle("연장권 사용실패"); setModalContents(noExtensionMsg); + setUrl("/store"); } else { setModalTitle(error.response?.data.message || error.data.message); } @@ -259,7 +270,7 @@ const ExtendModal: React.FC<{ modalTitle={modalTitle} modalContents={modalContents} closeModal={props.onClose} - url={"/store"} + url={url} urlTitle={"까비상점으로 이동"} /> ) : ( From bd69a179100c43e544c49578abf091cc7ba200de Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Wed, 17 Jul 2024 14:51:00 +0900 Subject: [PATCH 047/132] =?UTF-8?q?[FE]=20REFACT:=20=EB=B3=80=EC=88=98?= =?UTF-8?q?=EB=AA=85=20=EB=B3=80=EA=B2=BD=20=EB=B0=8F=20=EB=B3=80=EC=88=98?= =?UTF-8?q?=20=EC=83=9D=EC=84=B1=EC=9C=BC=EB=A1=9C=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=9E=AC=EC=82=AC=EC=9A=A9#1661?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modals/StoreModal/ExtendModal.tsx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/frontend/src/Cabinet/components/Modals/StoreModal/ExtendModal.tsx b/frontend/src/Cabinet/components/Modals/StoreModal/ExtendModal.tsx index b94060a0f..74a2241c7 100644 --- a/frontend/src/Cabinet/components/Modals/StoreModal/ExtendModal.tsx +++ b/frontend/src/Cabinet/components/Modals/StoreModal/ExtendModal.tsx @@ -75,8 +75,10 @@ const ExtendModal: React.FC<{ 연장권 사용은 취소할 수 없습니다.`; const extendInfoDetail = `사물함을 대여하시면 연장권 사용이 가능합니다. 연장권은 ${extensionExpiredDate} 23:59 이후 만료됩니다.`; - const noExtensionMsg = `현재 연장권을 보유하고 있지 않습니다. + const noItemMsg = `현재 연장권을 보유하고 있지 않습니다. 연장권은 까비 상점에서 구매하실 수 있습니다.`; + const overdueMsg = "연체 중에는 연장권을 사용하실 수 없습니다."; + const defaultFailureModalTitle = "연장권 사용실패"; useEffect(() => { fetchData(); @@ -86,7 +88,7 @@ const ExtendModal: React.FC<{ if (myItems?.extensionItems.length === 0) { setShowResponseModal(true); setHasErrorOnResponse(true); - setModalContents(noExtensionMsg); + setModalContents(noItemMsg); } else { setShowResponseModal(false); setHasErrorOnResponse(false); @@ -189,15 +191,15 @@ const ExtendModal: React.FC<{ const extensionItemUse = async (item: string) => { if (currentCabinetId === 0 || myInfo.cabinetId === null) { setHasErrorOnResponse(true); - setModalTitle("연장권 사용실패"); + setModalTitle(defaultFailureModalTitle); setModalContents("현재 대여중인 사물함이 없습니다."); setShowResponseModal(true); return; } if (myLentInfo.status === CabinetStatus.OVERDUE) { setHasErrorOnResponse(true); - setModalTitle("연장권 사용실패"); - setModalContents(`연체 중에는 연장권을 사용하실 수 없습니다.`); + setModalTitle(defaultFailureModalTitle); + setModalContents(overdueMsg); setShowResponseModal(true); return; } @@ -224,9 +226,12 @@ const ExtendModal: React.FC<{ } catch (error: any) { setHasErrorOnResponse(true); if (error.response.status === 400) { - setModalTitle("연장권 사용실패"); - setModalContents(noExtensionMsg); + setModalTitle(defaultFailureModalTitle); + setModalContents(noItemMsg); setUrl("/store"); + } else if (error.response.status === 403) { + setModalTitle(defaultFailureModalTitle); + setModalContents(overdueMsg); } else { setModalTitle(error.response?.data.message || error.data.message); } From e98ada45ba32ab6245b2af7d7d975dd44caaad6b Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Fri, 19 Jul 2024 10:42:48 +0900 Subject: [PATCH 048/132] =?UTF-8?q?[FE]=20FEAT:=20Sentry=20package=20?= =?UTF-8?q?=EC=84=A4=EC=B9=98=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/package-lock.json | 122 +++++++++++++++++++++++++++++++++++++ frontend/package.json | 1 + 2 files changed, 123 insertions(+) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 1e2b3b809..8f0c0e4b0 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -12,6 +12,7 @@ "@nivo/core": "^0.80.0", "@nivo/line": "^0.80.0", "@nivo/pie": "^0.80.0", + "@sentry/react": "^8.18.0", "@types/react-color": "^3.0.7", "axios": "^1.2.1", "firebase": "^10.4.0", @@ -3252,6 +3253,126 @@ } } }, + "node_modules/@sentry-internal/browser-utils": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-8.18.0.tgz", + "integrity": "sha512-1R7QXp7Gu6ovJGWvGjbgHcDcvDstsQba3miHtUCyDSH9kXtnAVLCAItDkseetFh+JLsjBXf3QFi2H3HPY4hRCw==", + "dependencies": { + "@sentry/core": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry-internal/feedback": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-8.18.0.tgz", + "integrity": "sha512-on6+4ZRkfdnsNgXecGQ6ME8aO26VTzkuM6y/kNN+bG2hSdxsmuU957B4x1Z5wEXiOWswuf3rhqGepg8JIdPkMQ==", + "dependencies": { + "@sentry/core": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry-internal/replay": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay/-/replay-8.18.0.tgz", + "integrity": "sha512-cCLib/HjD8UR0fB2F5hV6KsFBD6yTOEsi67RBllm5gT5vJt87VYoPliF6O7mmMNw8TWkQ0uc5laKld3q9ph+ug==", + "dependencies": { + "@sentry-internal/browser-utils": "8.18.0", + "@sentry/core": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry-internal/replay-canvas": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-8.18.0.tgz", + "integrity": "sha512-fcuLJBrhw3Ql8sU8veUgDCRYo6toQldFU807cpYphQ0uEw2oVZwNNPDQSu1651Ykvp0P/x+9hk/jjJxMohrO9g==", + "dependencies": { + "@sentry-internal/replay": "8.18.0", + "@sentry/core": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry/browser": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-8.18.0.tgz", + "integrity": "sha512-E2w9u76JcjxcmgvroJrB7bcbG5oBCYI/pME1CtprBgZSS9mMYDsyBe6JKqGHdw2wvT3xNxNtkm7hf1O6+3NWUQ==", + "dependencies": { + "@sentry-internal/browser-utils": "8.18.0", + "@sentry-internal/feedback": "8.18.0", + "@sentry-internal/replay": "8.18.0", + "@sentry-internal/replay-canvas": "8.18.0", + "@sentry/core": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry/core": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.18.0.tgz", + "integrity": "sha512-8moEMC3gp4W6mH9w5amb/zrYk6bNW8WGgcLRMCs5rguxny8YP5i8ISOJ0T0LP9x/RxSK/6xix5D2bzI/5ECzlw==", + "dependencies": { + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry/react": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@sentry/react/-/react-8.18.0.tgz", + "integrity": "sha512-ckCKdxmeFdfR6moE/Aiq+cJyQuCUKoUqU/++xZwqVbgecuImsk4s7CzzpX9T6JoYK7jqru2SvuRSiwcdtLN6AQ==", + "dependencies": { + "@sentry/browser": "8.18.0", + "@sentry/core": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0", + "hoist-non-react-statics": "^3.3.2" + }, + "engines": { + "node": ">=14.18" + }, + "peerDependencies": { + "react": "^16.14.0 || 17.x || 18.x || 19.x" + } + }, + "node_modules/@sentry/types": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.18.0.tgz", + "integrity": "sha512-5J+uOqptnmAnW3Rk31AHIqW36Wzvlo3UOM+p2wjSYGrC/PgcE47Klzr+w4UcOhN6AZqefalGd3vaUXz9NaFdRg==", + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry/utils": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.18.0.tgz", + "integrity": "sha512-7wq7cgaeSIGJncl9/2VMu81ZN5ep4lp4H1/+O8+xUxOmnPb/05ZZcbn9/VxVQvIoqZSZdwCLPeBz6PEVukvokA==", + "dependencies": { + "@sentry/types": "8.18.0" + }, + "engines": { + "node": ">=14.18" + } + }, "node_modules/@sinclair/typebox": { "version": "0.25.21", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.25.21.tgz", @@ -6648,6 +6769,7 @@ "version": "2.3.2", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, "hasInstallScript": true, "optional": true, "os": [ diff --git a/frontend/package.json b/frontend/package.json index 273f5be30..4bff65353 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -18,6 +18,7 @@ "@nivo/core": "^0.80.0", "@nivo/line": "^0.80.0", "@nivo/pie": "^0.80.0", + "@sentry/react": "^8.18.0", "@types/react-color": "^3.0.7", "axios": "^1.2.1", "firebase": "^10.4.0", From 32c8e0007f876ad36d01a027a943d4f27a1d95ee Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Fri, 19 Jul 2024 13:03:07 +0900 Subject: [PATCH 049/132] =?UTF-8?q?[FE]=20FEAT:=20Sentry=20=ED=99=98?= =?UTF-8?q?=EA=B2=BD=EC=84=A4=EC=A0=95=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config | 2 +- frontend/src/main.tsx | 59 +++++++++++++++++++++++++++++++++++-------- 2 files changed, 50 insertions(+), 11 deletions(-) diff --git a/config b/config index 4ba0fb6f5..dbe683d73 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit 4ba0fb6f55e1d3fee4a8f9a6e07da0d9c38aa25c +Subproject commit dbe683d7377027eed09fb0efe098a16def6331be diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index 47dddd284..827ee8421 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -1,17 +1,56 @@ +import App from "@/App"; +import "@/index.css"; +import * as Sentry from "@sentry/react"; +import { useEffect } from "react"; import React from "react"; import ReactDOM from "react-dom/client"; +import { + createRoutesFromChildren, + matchRoutes, + useLocation, + useNavigationType, +} from "react-router-dom"; import { RecoilRoot } from "recoil"; +import "@/Cabinet/assets/css/media.css"; +import "@/Cabinet/assets/css/reset.css"; import { GlobalStyle } from "@/Cabinet/assets/data/ColorTheme"; -import App from "./App"; -import "./Cabinet/assets/css/media.css"; -import "./Cabinet/assets/css/reset.css"; -import "./index.css"; + +Sentry.init({ + dsn: "https://5e0e8ad22001254b0aabd23f79be09a4@o4507625901981696.ingest.us.sentry.io/4507625903489024", + environment: "development", + release: "^8.18.0", + integrations: [ + // See docs for support of different versions of variation of react router + // https://docs.sentry.io/platforms/javascript/guides/react/configuration/integrations/react-router/ + Sentry.reactRouterV6BrowserTracingIntegration({ + useEffect, + useLocation, + useNavigationType, + createRoutesFromChildren, + matchRoutes, + }), + Sentry.replayIntegration(), + ], + + // Set tracesSampleRate to 1.0 to capture 100% + // of transactions for tracing. + tracesSampleRate: 1.0, + + // Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled + // tracePropagationTargets: [/^\//, /^https:\/\/yourserver\.io\/api/], + tracePropagationTargets: ["localhost", /^https:\/\/api\.cabi\.42seoul\.io/], + + // Capture Replay for 100% of all sessions, + // plus for 100% of sessions with an error + replaysSessionSampleRate: 1.0, + replaysOnErrorSampleRate: 1.0, +}); ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render( - // - - - - - // + + + + + + ); From 56355f453416686c665de3302460fdb605abfcc5 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Fri, 19 Jul 2024 13:26:23 +0900 Subject: [PATCH 050/132] =?UTF-8?q?[FE]=20FEAT:=20Sentry=20react=20router?= =?UTF-8?q?=20=EC=A0=81=EC=9A=A9=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config | 2 +- frontend/src/App.tsx | 98 ++++++++++++++++++++++++-------------------- 2 files changed, 54 insertions(+), 46 deletions(-) diff --git a/config b/config index dbe683d73..00a28d5d6 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit dbe683d7377027eed09fb0efe098a16def6331be +Subproject commit 00a28d5d6e6e160d245bcbaa0b27b7058a674c1d diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 57c2f4d43..3d3ca1a30 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,4 +1,5 @@ import PageTracker from "@/api/analytics/PageTracker"; +import * as Sentry from "@sentry/react"; import React, { Suspense, lazy } from "react"; import { BrowserRouter, Route, Routes } from "react-router-dom"; import AvailablePage from "@/Cabinet/pages/AvailablePage"; @@ -38,57 +39,64 @@ const AdminLoginFailurePage = lazy( ); const AdminHomePage = lazy(() => import("@/Cabinet/pages/admin/AdminHomePage")); +const SentryRoutes = Sentry.withSentryReactRouterV6Routing(Routes); + function App(): React.ReactElement { return ( {/* GA4 Page Tracking Component */} }> - - } /> - }> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - - }> - } /> - } /> - } /> - } /> - - {/* admin용 라우터 */} - }> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - - } - > - } /> - - } /> - } - /> - } /> - + + + } /> + }> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + + }> + } /> + } /> + } /> + } /> + + {/* admin용 라우터 */} + }> + } /> + } /> + } /> + } /> + } /> + } + /> + } /> + } /> + + } + > + } /> + + } /> + } + /> + } /> + + ); From 1605abbd6a6b33acf977e2371d14b8d3d4802ec6 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Tue, 23 Jul 2024 14:51:13 +0900 Subject: [PATCH 051/132] =?UTF-8?q?[FE]=20FIX:=20SentryRoutes(Routes)=20?= =?UTF-8?q?=ED=95=98=EC=9C=84=EC=97=90=20=EC=9E=88=EB=8A=94=20Routes=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/App.tsx | 91 +++++++++++++++++++++----------------------- 1 file changed, 43 insertions(+), 48 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 3d3ca1a30..fb89a5a30 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -48,54 +48,49 @@ function App(): React.ReactElement { }> - - } /> - }> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - - }> - } /> - } /> - } /> - } /> - - {/* admin용 라우터 */} - }> - } /> - } /> - } /> - } /> - } /> - } - /> - } /> - } /> - - } - > - } /> - - } /> - } - /> - } /> - + } /> + }> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + + }> + } /> + } /> + } /> + } /> + + {/* admin용 라우터 */} + }> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + + } + > + } /> + + } /> + } + /> + } /> From b3f31380a207a91aff19aa015ff5797a96f6c1ff Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Wed, 24 Jul 2024 11:23:54 +0900 Subject: [PATCH 052/132] =?UTF-8?q?[FE]=20FEAT:=20=EB=8C=80=EC=97=AC=20?= =?UTF-8?q?=EB=B0=8F=20=EB=B0=98=EB=82=A9=20=EB=A1=9C=EC=A7=81=20API=20?= =?UTF-8?q?=EC=97=90=EB=9F=AC=20Sentry=20captureException=20=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=B2=98=EB=A6=AC=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Cabinet/api/axios/axios.custom.ts | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/frontend/src/Cabinet/api/axios/axios.custom.ts b/frontend/src/Cabinet/api/axios/axios.custom.ts index abd63565a..bb3119974 100644 --- a/frontend/src/Cabinet/api/axios/axios.custom.ts +++ b/frontend/src/Cabinet/api/axios/axios.custom.ts @@ -1,3 +1,4 @@ +import { captureException } from "@sentry/react"; import { AlarmInfo } from "@/Cabinet/types/dto/alarm.dto"; import { ClubUserDto } from "@/Cabinet/types/dto/lent.dto"; import CabinetStatus from "@/Cabinet/types/enum/cabinet.status.enum"; @@ -241,6 +242,10 @@ export const axiosLentId = async (cabinetId: number | null): Promise => { const response = await instance.post(`${axiosLentIdURL}${cabinetId}`); return response; } catch (error) { + captureException(error, { + level: "error", + extra: { type: "대여 에러" }, + }); throw error; } }; @@ -251,6 +256,10 @@ export const axiosMyLentInfo = async (): Promise => { const response = await instance.get(axiosMyLentInfoURL); return response; } catch (error) { + captureException(error, { + level: "error", + extra: { type: "대여 에러" }, + }); throw error; } }; @@ -262,6 +271,10 @@ export const axiosSwapId = async (cabinetId: number | null): Promise => { const response = await instance.post(`${axiosSwapIdURL}${cabinetId}`); return response; } catch (error) { + captureException(error, { + level: "error", + extra: { type: "대여 에러" }, + }); throw error; } }; @@ -278,6 +291,10 @@ export const axiosUpdateMyCabinetInfo = async ( }); return response; } catch (error) { + captureException(error, { + level: "error", + extra: { type: "대여 에러" }, + }); throw error; } }; @@ -288,6 +305,10 @@ export const axiosReturn = async (): Promise => { const response = await instance.patch(axiosReturnURL); return response; } catch (error) { + captureException(error, { + level: "error", + extra: { type: "반납 에러" }, + }); throw error; } }; @@ -299,6 +320,10 @@ export const axiosSendCabinetPassword = async (password: string) => { cabinetMemo: password, }); } catch (error) { + captureException(error, { + level: "error", + extra: { type: "반납 에러" }, + }); throw error; } }; @@ -311,6 +336,10 @@ export const axiosMyLentLog = async (page: number): Promise => { }); return response; } catch (error) { + captureException(error, { + level: "error", + extra: { type: "대여 에러" }, + }); throw error; } }; @@ -321,6 +350,10 @@ export const axiosExtendLentPeriod = async (): Promise => { const response = await instance.patch(axiosExtendLentPeriodURL); return response; } catch (error) { + captureException(error, { + level: "error", + extra: { type: "대여 에러" }, + }); throw error; } }; @@ -838,6 +871,10 @@ export const axiosLentShareId = async ( }); return response; } catch (error) { + captureException(error, { + level: "error", + extra: { type: "대여 에러" }, + }); throw error; } }; @@ -851,6 +888,10 @@ export const axiosCancel = async (cabinetId: number | null): Promise => { const response = await instance.patch(`${axiosCancelURL}${cabinetId}`); return response; } catch (error) { + captureException(error, { + level: "error", + extra: { type: "대여 에러" }, + }); throw error; } }; From 8388d1ac08a0107f1ddb15be9ef4f7dacb8b8961 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Wed, 24 Jul 2024 11:26:46 +0900 Subject: [PATCH 053/132] =?UTF-8?q?[FE]=20FEAT:=20=EC=9E=AC=ED=99=94=20?= =?UTF-8?q?=EA=B4=80=EB=A0=A8=20=EB=A1=9C=EC=A7=81=20API=20=EC=97=90?= =?UTF-8?q?=EB=9F=AC=20Sentry=20captureException=20=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Cabinet/api/axios/axios.custom.ts | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/frontend/src/Cabinet/api/axios/axios.custom.ts b/frontend/src/Cabinet/api/axios/axios.custom.ts index bb3119974..859db009d 100644 --- a/frontend/src/Cabinet/api/axios/axios.custom.ts +++ b/frontend/src/Cabinet/api/axios/axios.custom.ts @@ -364,6 +364,12 @@ export const axiosCoinCheckGet = async (): Promise => { const response = await instance.get(axiosCoinCheck); return response; } catch (error) { + captureException(error, { + level: "error", + extra: { + type: "재화 에러", + }, + }); throw error; } }; @@ -373,6 +379,12 @@ export const axiosCoinCheckPost = async (): Promise => { const response = await instance.post(axiosCoinCheck); return response; } catch (error) { + captureException(error, { + level: "error", + extra: { + type: "재화 에러", + }, + }); throw error; } }; @@ -389,6 +401,12 @@ export const axiosCoinLog = async ( }); return response; } catch (error) { + captureException(error, { + level: "error", + extra: { + type: "재화 에러", + }, + }); throw error; } }; @@ -399,6 +417,12 @@ export const axiosMyItems = async (): Promise => { const response = await instance.get(axiosMyItemsURL); return response; } catch (error) { + captureException(error, { + level: "error", + extra: { + type: "재화 에러", + }, + }); throw error; } }; @@ -415,6 +439,12 @@ export const axiosGetItemUsageHistory = async ( }); return response.data; } catch (error) { + captureException(error, { + level: "error", + extra: { + type: "재화 에러", + }, + }); throw error; } }; @@ -425,6 +455,12 @@ export const axiosItems = async (): Promise => { const response = await instance.get(axiosItemsURL); return response; } catch (error) { + captureException(error, { + level: "error", + extra: { + type: "재화 에러", + }, + }); throw error; } }; @@ -435,6 +471,12 @@ export const axiosBuyItem = async (sku: String): Promise => { const response = await instance.post(axiosBuyItemURL + sku + "/purchase"); return response; } catch (error) { + captureException(error, { + level: "error", + extra: { + type: "재화 에러", + }, + }); throw error; } }; @@ -455,6 +497,12 @@ export const axiosUseItem = async ( }); return response; } catch (error) { + captureException(error, { + level: "error", + extra: { + type: "재화 에러", + }, + }); throw error; } }; @@ -806,6 +854,12 @@ export const axiosStatisticsCoin = async () => { const response = await instance.get(axiosStatisticsCoinURL); return response; } catch (error) { + captureException(error, { + level: "error", + extra: { + type: "재화 에러", + }, + }); throw error; } }; @@ -821,6 +875,12 @@ export const axiosCoinUseStatistics = async ( }); return response; } catch (error) { + captureException(error, { + level: "error", + extra: { + type: "재화 에러", + }, + }); throw error; } }; @@ -831,6 +891,12 @@ export const axiosStatisticsItem = async () => { const response = await instance.get(axiosStatisticsItemURL); return response; } catch (error) { + captureException(error, { + level: "error", + extra: { + type: "재화 에러", + }, + }); throw error; } }; @@ -840,6 +906,12 @@ export const axiosStatisticsTotalItemUse = async () => { const response = await instance.get(axiosStatisticsTotalItemUseURL); return response; } catch (error) { + captureException(error, { + level: "error", + extra: { + type: "재화 에러", + }, + }); throw error; } }; @@ -855,6 +927,12 @@ export const axiosCoinCollectStatistics = async ( }); return response; } catch (error) { + captureException(error, { + level: "error", + extra: { + type: "재화 에러", + }, + }); throw error; } }; From ecc588786cf571f61f62ee011cbf37f8a7355f51 Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Wed, 24 Jul 2024 11:41:40 +0900 Subject: [PATCH 054/132] =?UTF-8?q?[FE]=20FIX:=20axios=20instance=20?= =?UTF-8?q?=EC=97=90=EC=84=9C=20500=20=EC=97=90=EB=9F=AC=EB=A5=BC=20captur?= =?UTF-8?q?e=20=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/api/axios/axios.instance.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/frontend/src/Cabinet/api/axios/axios.instance.ts b/frontend/src/Cabinet/api/axios/axios.instance.ts index a5a583f3e..88739fc61 100644 --- a/frontend/src/Cabinet/api/axios/axios.instance.ts +++ b/frontend/src/Cabinet/api/axios/axios.instance.ts @@ -1,4 +1,5 @@ -import axios from "axios"; +import { captureException } from "@sentry/react"; +import axios, { HttpStatusCode } from "axios"; import { getCookie, removeCookie } from "@/Cabinet/api/react_cookie/cookies"; import { STATUS_401_UNAUTHORIZED } from "@/Cabinet/constants/StatusCode"; @@ -23,7 +24,7 @@ instance.interceptors.response.use( }, (error) => { // access_token unauthorized - if (error.response?.status === STATUS_401_UNAUTHORIZED) { + if (error.response?.status === HttpStatusCode.Unauthorized) { if (import.meta.env.VITE_IS_LOCAL === "true") { removeCookie("admin_access_token", { path: "/", @@ -39,9 +40,14 @@ instance.interceptors.response.use( } window.location.href = "login"; alert(error.response.data.message); + } else if (error.response?.status === HttpStatusCode.InternalServerError) { + captureException(error, { + level: "error", + extra: { type: "서버 에러" }, + }); } - return Promise.reject(error); + return Promise.reject(new Error(error)); } ); -export default instance; \ No newline at end of file +export default instance; From afd5b2a6a68f529a4d976553a66c5822c7802f07 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Wed, 24 Jul 2024 12:42:58 +0900 Subject: [PATCH 055/132] =?UTF-8?q?[FE]=20REFACT:=20STATUS=5F400=5FBAD=5FR?= =?UTF-8?q?EQUEST=20=EB=8C=80=EC=8B=A0=20HttpStatusCode.BadRequest=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/package-lock.json | 16 ++++++++-------- frontend/package.json | 2 +- frontend/src/Cabinet/api/axios/axios.instance.ts | 1 - .../components/Club/AdminClubLog.container.tsx | 4 ++-- .../src/Cabinet/components/Club/ClubInfo.tsx | 6 +++--- .../src/Cabinet/components/Club/ClubLogTable.tsx | 4 ++-- .../ItemLog/AdminItemProvideLog.container.tsx | 1 - .../ItemLog/ItemLogTable/AdminItemLogTable.tsx | 6 +++--- .../ItemLogTable/AdminItemProvideTable.tsx | 6 +++--- .../LentLog/AdminCabinetLentLog.container.tsx | 4 ++-- .../LentLog/AdminUserLentLog.container.tsx | 4 ++-- .../components/LentLog/LentLog.container.tsx | 4 ++-- .../LentLog/LogTable/AdminCabinetLogTable.tsx | 6 +++--- .../components/LentLog/LogTable/LogTable.tsx | 6 +++--- frontend/src/Cabinet/constants/StatusCode.ts | 1 - frontend/src/Cabinet/hooks/useClubInfo.ts | 4 ++-- frontend/src/Cabinet/pages/LogPage.tsx | 4 ++-- frontend/src/Cabinet/types/dto/admin.dto.ts | 4 ++-- frontend/src/Cabinet/types/dto/club.dto.ts | 6 +++--- frontend/src/Cabinet/types/dto/lent.dto.ts | 6 +++--- .../components/PresentationLog/LogTable.tsx | 6 +++--- frontend/src/Presentation/pages/LogPage.tsx | 4 ++-- .../Presentation/types/dto/presentation.dto.ts | 4 ++-- 23 files changed, 53 insertions(+), 56 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 8f0c0e4b0..345ca5275 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -14,7 +14,7 @@ "@nivo/pie": "^0.80.0", "@sentry/react": "^8.18.0", "@types/react-color": "^3.0.7", - "axios": "^1.2.1", + "axios": "^1.7.2", "firebase": "^10.4.0", "react": "^18.2.0", "react-color": "^2.19.3", @@ -4817,11 +4817,11 @@ } }, "node_modules/axios": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.2.1.tgz", - "integrity": "sha512-I88cFiGu9ryt/tfVEi4kX2SITsvDddTajXTOFmt2uK1ZVA8LytjtdeyefdQWEf5PU8w+4SSJDoYnggflB5tW4A==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz", + "integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==", "dependencies": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -6719,9 +6719,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", diff --git a/frontend/package.json b/frontend/package.json index 4bff65353..a9987a558 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -20,7 +20,7 @@ "@nivo/pie": "^0.80.0", "@sentry/react": "^8.18.0", "@types/react-color": "^3.0.7", - "axios": "^1.2.1", + "axios": "^1.7.2", "firebase": "^10.4.0", "react": "^18.2.0", "react-color": "^2.19.3", diff --git a/frontend/src/Cabinet/api/axios/axios.instance.ts b/frontend/src/Cabinet/api/axios/axios.instance.ts index 88739fc61..ef2ff8073 100644 --- a/frontend/src/Cabinet/api/axios/axios.instance.ts +++ b/frontend/src/Cabinet/api/axios/axios.instance.ts @@ -1,7 +1,6 @@ import { captureException } from "@sentry/react"; import axios, { HttpStatusCode } from "axios"; import { getCookie, removeCookie } from "@/Cabinet/api/react_cookie/cookies"; -import { STATUS_401_UNAUTHORIZED } from "@/Cabinet/constants/StatusCode"; axios.defaults.withCredentials = true; diff --git a/frontend/src/Cabinet/components/Club/AdminClubLog.container.tsx b/frontend/src/Cabinet/components/Club/AdminClubLog.container.tsx index 95b7235f9..67ddd1873 100644 --- a/frontend/src/Cabinet/components/Club/AdminClubLog.container.tsx +++ b/frontend/src/Cabinet/components/Club/AdminClubLog.container.tsx @@ -2,7 +2,7 @@ import { useEffect, useState } from "react"; import AdminClubLog from "@/Cabinet/components/Club/AdminClubLog"; import { ClubLogResponseType, ClubUserDto } from "@/Cabinet/types/dto/lent.dto"; import { axiosGetClubUserLog } from "@/Cabinet/api/axios/axios.custom"; -import { STATUS_400_BAD_REQUEST } from "@/Cabinet/constants/StatusCode"; +import { HttpStatusCode } from "axios"; const AdminClubLogContainer = (props: any) => { const [logs, setLogs] = useState(undefined); @@ -20,7 +20,7 @@ const AdminClubLogContainer = (props: any) => { } else setTotalPage(Math.ceil(result.data.totalLength / size)); setLogs(result.data.result); } catch { - setLogs(STATUS_400_BAD_REQUEST); + setLogs(HttpStatusCode.BadRequest); setTotalPage(1); } }; diff --git a/frontend/src/Cabinet/components/Club/ClubInfo.tsx b/frontend/src/Cabinet/components/Club/ClubInfo.tsx index d26f04cbc..141635837 100644 --- a/frontend/src/Cabinet/components/Club/ClubInfo.tsx +++ b/frontend/src/Cabinet/components/Club/ClubInfo.tsx @@ -1,3 +1,4 @@ +import { HttpStatusCode } from "axios"; import { useEffect, useState } from "react"; import { useRecoilState } from "recoil"; import styled from "styled-components"; @@ -10,7 +11,6 @@ import UnavailableDataInfo from "@/Cabinet/components/Common/UnavailableDataInfo import { ClubInfoResponseDto } from "@/Cabinet/types/dto/club.dto"; import useClubInfo from "@/Cabinet/hooks/useClubInfo"; import useMenu from "@/Cabinet/hooks/useMenu"; -import { STATUS_400_BAD_REQUEST } from "@/Cabinet/constants/StatusCode"; const ClubInfo = () => { const [myInfo] = useRecoilState(userState); @@ -20,7 +20,7 @@ const ClubInfo = () => { useEffect(() => { closeAll(); - if (clubInfo && clubInfo !== STATUS_400_BAD_REQUEST) { + if (clubInfo && clubInfo !== HttpStatusCode.BadRequest) { let clubInfoTest = clubInfo as ClubInfoResponseDto; if (clubInfoTest.clubMaster.userName === myInfo.name) setIsMaster(true); } @@ -30,7 +30,7 @@ const ClubInfo = () => { <> {clubInfo === undefined ? ( - ) : clubInfo === STATUS_400_BAD_REQUEST ? ( + ) : clubInfo === HttpStatusCode.BadRequest ? ( <> diff --git a/frontend/src/Cabinet/components/Club/ClubLogTable.tsx b/frontend/src/Cabinet/components/Club/ClubLogTable.tsx index b99d219f3..59f3f610b 100644 --- a/frontend/src/Cabinet/components/Club/ClubLogTable.tsx +++ b/frontend/src/Cabinet/components/Club/ClubLogTable.tsx @@ -1,9 +1,9 @@ +import { HttpStatusCode } from "axios"; import { useRecoilState } from "recoil"; import styled from "styled-components"; import { selectedClubInfoState } from "@/Cabinet/recoil/atoms"; import LoadingAnimation from "@/Cabinet/components/Common/LoadingAnimation"; import { ClubLogResponseType, ClubUserDto } from "@/Cabinet/types/dto/lent.dto"; -import { STATUS_400_BAD_REQUEST } from "@/Cabinet/constants/StatusCode"; const ClubLogTable = ({ ClubList }: { ClubList: ClubLogResponseType }) => { const [selectedClubInfo, setSelectedClubInfo] = useRecoilState( @@ -20,7 +20,7 @@ const ClubLogTable = ({ ClubList }: { ClubList: ClubLogResponseType }) => { return ( <> - {ClubList !== STATUS_400_BAD_REQUEST && ClubList.length !== 0 ? ( + {ClubList !== HttpStatusCode.BadRequest && ClubList.length !== 0 ? ( diff --git a/frontend/src/Cabinet/components/ItemLog/AdminItemProvideLog.container.tsx b/frontend/src/Cabinet/components/ItemLog/AdminItemProvideLog.container.tsx index 1cca6cf96..388d18a46 100644 --- a/frontend/src/Cabinet/components/ItemLog/AdminItemProvideLog.container.tsx +++ b/frontend/src/Cabinet/components/ItemLog/AdminItemProvideLog.container.tsx @@ -2,7 +2,6 @@ import { useEffect, useState } from "react"; import AdminItemProvideLog from "@/Cabinet/components/ItemLog/AdminItemProvideLog"; import { ItemLogResponseType } from "@/Cabinet/types/dto/admin.dto"; import useMenu from "@/Cabinet/hooks/useMenu"; -import { STATUS_400_BAD_REQUEST } from "@/Cabinet/constants/StatusCode"; const AdminItemProvideLogContainer = () => { const { closeStore } = useMenu(); diff --git a/frontend/src/Cabinet/components/ItemLog/ItemLogTable/AdminItemLogTable.tsx b/frontend/src/Cabinet/components/ItemLog/ItemLogTable/AdminItemLogTable.tsx index f406f572c..f50767083 100644 --- a/frontend/src/Cabinet/components/ItemLog/ItemLogTable/AdminItemLogTable.tsx +++ b/frontend/src/Cabinet/components/ItemLog/ItemLogTable/AdminItemLogTable.tsx @@ -1,8 +1,8 @@ +import { HttpStatusCode } from "axios"; import styled from "styled-components"; import LoadingAnimation from "@/Cabinet/components/Common/LoadingAnimation"; import { ItemLogResponseType } from "@/Cabinet/types/dto/admin.dto"; import { formatDate } from "@/Cabinet/utils/dateUtils"; -import { STATUS_400_BAD_REQUEST } from "@/Cabinet/constants/StatusCode"; const AdminItemLogTable = ({ itemLog }: { itemLog: ItemLogResponseType }) => { if (!itemLog) return ; @@ -16,7 +16,7 @@ const AdminItemLogTable = ({ itemLog }: { itemLog: ItemLogResponseType }) => { 사용일 - {itemLog !== STATUS_400_BAD_REQUEST && + {itemLog !== HttpStatusCode.BadRequest && Array.isArray(itemLog.itemHistories) && ( {itemLog.itemHistories.map( @@ -47,7 +47,7 @@ const AdminItemLogTable = ({ itemLog }: { itemLog: ItemLogResponseType }) => { )} - {(itemLog === STATUS_400_BAD_REQUEST || + {(itemLog === HttpStatusCode.BadRequest || itemLog.totalLength === undefined || itemLog.totalLength === 0) && ( 아이템 내역이 없습니다. diff --git a/frontend/src/Cabinet/components/ItemLog/ItemLogTable/AdminItemProvideTable.tsx b/frontend/src/Cabinet/components/ItemLog/ItemLogTable/AdminItemProvideTable.tsx index cdb30a9fe..098417faa 100644 --- a/frontend/src/Cabinet/components/ItemLog/ItemLogTable/AdminItemProvideTable.tsx +++ b/frontend/src/Cabinet/components/ItemLog/ItemLogTable/AdminItemProvideTable.tsx @@ -1,8 +1,8 @@ +import { HttpStatusCode } from "axios"; import styled from "styled-components"; import LoadingAnimation from "@/Cabinet/components/Common/LoadingAnimation"; import { ItemLogResponseType } from "@/Cabinet/types/dto/admin.dto"; import { formatDate } from "@/Cabinet/utils/dateUtils"; -import { STATUS_400_BAD_REQUEST } from "@/Cabinet/constants/StatusCode"; const AdminItemProvideTable = ({ itemLog, @@ -20,7 +20,7 @@ const AdminItemProvideTable = ({ 아이템 - {itemLog !== STATUS_400_BAD_REQUEST && ( + {itemLog !== HttpStatusCode.BadRequest && ( {itemLog.itemHistories.map( ({ issuedDate, itemName, itemDetails, usedAt }, idx) => ( @@ -47,7 +47,7 @@ const AdminItemProvideTable = ({ )} - {itemLog === STATUS_400_BAD_REQUEST && ( + {itemLog === HttpStatusCode.BadRequest && ( 아이템 사용기록이 없습니다. )} diff --git a/frontend/src/Cabinet/components/LentLog/AdminCabinetLentLog.container.tsx b/frontend/src/Cabinet/components/LentLog/AdminCabinetLentLog.container.tsx index d001b3cae..486c08a5c 100644 --- a/frontend/src/Cabinet/components/LentLog/AdminCabinetLentLog.container.tsx +++ b/frontend/src/Cabinet/components/LentLog/AdminCabinetLentLog.container.tsx @@ -1,3 +1,4 @@ +import { HttpStatusCode } from "axios"; import { useEffect, useState } from "react"; import { useRecoilValue } from "recoil"; import { currentCabinetIdState } from "@/Cabinet/recoil/atoms"; @@ -5,7 +6,6 @@ import AdminCabinetLentLog from "@/Cabinet/components/LentLog/AdminCabinetLentLo import { LentLogResponseType } from "@/Cabinet/types/dto/lent.dto"; import { axiosGetCabinetLentLog } from "@/Cabinet/api/axios/axios.custom"; import useMenu from "@/Cabinet/hooks/useMenu"; -import { STATUS_400_BAD_REQUEST } from "@/Cabinet/constants/StatusCode"; const AdminCabinetLentLogContainer = () => { const { closeLent } = useMenu(); @@ -20,7 +20,7 @@ const AdminCabinetLentLogContainer = () => { setTotalPage(Math.ceil(result.data.totalLength / 10)); setLogs(result.data.result); } catch { - setLogs(STATUS_400_BAD_REQUEST); + setLogs(HttpStatusCode.BadRequest); setTotalPage(1); } } diff --git a/frontend/src/Cabinet/components/LentLog/AdminUserLentLog.container.tsx b/frontend/src/Cabinet/components/LentLog/AdminUserLentLog.container.tsx index 637e1cc8a..07ae9a158 100644 --- a/frontend/src/Cabinet/components/LentLog/AdminUserLentLog.container.tsx +++ b/frontend/src/Cabinet/components/LentLog/AdminUserLentLog.container.tsx @@ -1,3 +1,4 @@ +import { HttpStatusCode } from "axios"; import { useEffect, useState } from "react"; import { useRecoilValue } from "recoil"; import { targetUserInfoState } from "@/Cabinet/recoil/atoms"; @@ -5,7 +6,6 @@ import AdminUserLentLog from "@/Cabinet/components/LentLog/AdminUserLentLog"; import { LentLogResponseType } from "@/Cabinet/types/dto/lent.dto"; import { axiosGetUserLentLog } from "@/Cabinet/api/axios/axios.custom"; import useMenu from "@/Cabinet/hooks/useMenu"; -import { STATUS_400_BAD_REQUEST } from "@/Cabinet/constants/StatusCode"; const AdminUserLentLogContainer = () => { const { closeLent } = useMenu(); @@ -20,7 +20,7 @@ const AdminUserLentLogContainer = () => { setTotalPage(Math.ceil(result.data.totalLength / 10)); setLogs(result.data.result); } catch { - setLogs(STATUS_400_BAD_REQUEST); + setLogs(HttpStatusCode.BadRequest); setTotalPage(1); } } diff --git a/frontend/src/Cabinet/components/LentLog/LentLog.container.tsx b/frontend/src/Cabinet/components/LentLog/LentLog.container.tsx index 7ebed068b..45f66a218 100644 --- a/frontend/src/Cabinet/components/LentLog/LentLog.container.tsx +++ b/frontend/src/Cabinet/components/LentLog/LentLog.container.tsx @@ -1,10 +1,10 @@ +import { HttpStatusCode } from "axios"; import { useEffect, useState } from "react"; import LentLog from "@/Cabinet/components/LentLog/LentLog"; import { LentLogResponseType } from "@/Cabinet/types/dto/lent.dto"; import { axiosMyLentLog } from "@/Cabinet/api/axios/axios.custom"; import useMenu from "@/Cabinet/hooks/useMenu"; import { getTotalPage } from "@/Cabinet/utils/paginationUtils"; -import { STATUS_400_BAD_REQUEST } from "@/Cabinet/constants/StatusCode"; const LentLogContainer = () => { const { closeLent } = useMenu(); @@ -17,7 +17,7 @@ const LentLogContainer = () => { setTotalPage(getTotalPage(result.data.totalLength, 10)); setLogs(result.data.result); } catch { - setLogs(STATUS_400_BAD_REQUEST); + setLogs(HttpStatusCode.BadRequest); } } useEffect(() => { diff --git a/frontend/src/Cabinet/components/LentLog/LogTable/AdminCabinetLogTable.tsx b/frontend/src/Cabinet/components/LentLog/LogTable/AdminCabinetLogTable.tsx index 2208bc57c..f4c09b9c5 100644 --- a/frontend/src/Cabinet/components/LentLog/LogTable/AdminCabinetLogTable.tsx +++ b/frontend/src/Cabinet/components/LentLog/LogTable/AdminCabinetLogTable.tsx @@ -1,8 +1,8 @@ +import { HttpStatusCode } from "axios"; import styled from "styled-components"; import LoadingAnimation from "@/Cabinet/components/Common/LoadingAnimation"; import { LentLogResponseType } from "@/Cabinet/types/dto/lent.dto"; import { formatDate } from "@/Cabinet/utils/dateUtils"; -import { STATUS_400_BAD_REQUEST } from "@/Cabinet/constants/StatusCode"; const AdminCabinetLogTable = ({ lentLog, @@ -21,7 +21,7 @@ const AdminCabinetLogTable = ({ 반납일 - {lentLog !== STATUS_400_BAD_REQUEST && ( + {lentLog !== HttpStatusCode.BadRequest && ( {lentLog.map( ({ floor, section, name, startedAt, endedAt }, idx) => ( @@ -45,7 +45,7 @@ const AdminCabinetLogTable = ({ )} - {(lentLog === STATUS_400_BAD_REQUEST || lentLog.length === 0) && ( + {(lentLog === HttpStatusCode.BadRequest || lentLog.length === 0) && ( 대여기록이 없습니다. )} diff --git a/frontend/src/Cabinet/components/LentLog/LogTable/LogTable.tsx b/frontend/src/Cabinet/components/LentLog/LogTable/LogTable.tsx index 9aa25e3f8..47b0d1b9b 100644 --- a/frontend/src/Cabinet/components/LentLog/LogTable/LogTable.tsx +++ b/frontend/src/Cabinet/components/LentLog/LogTable/LogTable.tsx @@ -1,8 +1,8 @@ +import { HttpStatusCode } from "axios"; import styled from "styled-components"; import LoadingAnimation from "@/Cabinet/components/Common/LoadingAnimation"; import { LentLogResponseType } from "@/Cabinet/types/dto/lent.dto"; import { formatDate } from "@/Cabinet/utils/dateUtils"; -import { STATUS_400_BAD_REQUEST } from "@/Cabinet/constants/StatusCode"; const LogTable = ({ lentHistory }: { lentHistory: LentLogResponseType }) => { if (lentHistory === undefined) return ; @@ -17,7 +17,7 @@ const LogTable = ({ lentHistory }: { lentHistory: LentLogResponseType }) => { 반납일 - {lentHistory !== STATUS_400_BAD_REQUEST && ( + {lentHistory !== HttpStatusCode.BadRequest && ( {lentHistory.map( ({ floor, section, visibleNum, startedAt, endedAt }, idx) => ( @@ -43,7 +43,7 @@ const LogTable = ({ lentHistory }: { lentHistory: LentLogResponseType }) => { )} - {lentHistory === STATUS_400_BAD_REQUEST || + {lentHistory === HttpStatusCode.BadRequest || (lentHistory.length === 0 && ( 대여기록이 없습니다. ))} diff --git a/frontend/src/Cabinet/constants/StatusCode.ts b/frontend/src/Cabinet/constants/StatusCode.ts index 6452cf27b..604a7499e 100644 --- a/frontend/src/Cabinet/constants/StatusCode.ts +++ b/frontend/src/Cabinet/constants/StatusCode.ts @@ -1,2 +1 @@ -export const STATUS_400_BAD_REQUEST = 400; export const STATUS_401_UNAUTHORIZED = 401; diff --git a/frontend/src/Cabinet/hooks/useClubInfo.ts b/frontend/src/Cabinet/hooks/useClubInfo.ts index 152676f21..35e47e52e 100644 --- a/frontend/src/Cabinet/hooks/useClubInfo.ts +++ b/frontend/src/Cabinet/hooks/useClubInfo.ts @@ -1,3 +1,4 @@ +import { HttpStatusCode } from "axios"; import { useEffect, useRef, useState } from "react"; import { useRecoilState, useSetRecoilState } from "recoil"; import { @@ -11,7 +12,6 @@ import { } from "@/Cabinet/types/dto/club.dto"; import { axiosGetClubInfo } from "@/Cabinet/api/axios/axios.custom"; import useMenu from "@/Cabinet/hooks/useMenu"; -import { STATUS_400_BAD_REQUEST } from "@/Cabinet/constants/StatusCode"; const useClubInfo = () => { const [clubState, setClubState] = useState({ clubId: 0, page: 0 }); @@ -54,7 +54,7 @@ const useClubInfo = () => { }, 500); } catch { setTimeout(() => { - setClubInfo(STATUS_400_BAD_REQUEST); + setClubInfo(HttpStatusCode.BadRequest); }, 500); } }; diff --git a/frontend/src/Cabinet/pages/LogPage.tsx b/frontend/src/Cabinet/pages/LogPage.tsx index d89840775..9d157d0ad 100644 --- a/frontend/src/Cabinet/pages/LogPage.tsx +++ b/frontend/src/Cabinet/pages/LogPage.tsx @@ -1,10 +1,10 @@ +import { HttpStatusCode } from "axios"; import { useEffect, useState } from "react"; import styled from "styled-components"; import LogTable from "@/Cabinet/components/LentLog/LogTable/LogTable"; import { LentHistoryDto } from "@/Cabinet/types/dto/lent.dto"; import { LentLogResponseType } from "@/Cabinet/types/dto/lent.dto"; import { axiosMyLentLog } from "@/Cabinet/api/axios/axios.custom"; -import { STATUS_400_BAD_REQUEST } from "@/Cabinet/constants/StatusCode"; const LogPage = () => { const [lentLog, setLentLog] = useState(undefined); @@ -18,7 +18,7 @@ const LogPage = () => { }, 500); } catch { setTimeout(() => { - setLentLog(STATUS_400_BAD_REQUEST); + setLentLog(HttpStatusCode.BadRequest); }, 500); } }; diff --git a/frontend/src/Cabinet/types/dto/admin.dto.ts b/frontend/src/Cabinet/types/dto/admin.dto.ts index d3b97ee9b..6fa19f058 100644 --- a/frontend/src/Cabinet/types/dto/admin.dto.ts +++ b/frontend/src/Cabinet/types/dto/admin.dto.ts @@ -1,4 +1,4 @@ -import { STATUS_400_BAD_REQUEST } from "@/Cabinet/constants/StatusCode"; +import { HttpStatusCode } from "axios"; export interface BannedUserDto { userId: number; @@ -78,7 +78,7 @@ export interface ItemLogResponse { export type ItemLogResponseType = | ItemLogResponse - | typeof STATUS_400_BAD_REQUEST + | HttpStatusCode.BadRequest | undefined; export interface IItemUseCountDto { diff --git a/frontend/src/Cabinet/types/dto/club.dto.ts b/frontend/src/Cabinet/types/dto/club.dto.ts index 379462796..eba012415 100644 --- a/frontend/src/Cabinet/types/dto/club.dto.ts +++ b/frontend/src/Cabinet/types/dto/club.dto.ts @@ -1,8 +1,8 @@ -import { STATUS_400_BAD_REQUEST } from "@/Cabinet/constants/StatusCode"; +import { HttpStatusCode } from "axios"; export type ClubListReponseType = | ClubPaginationResponseDto - | typeof STATUS_400_BAD_REQUEST + | HttpStatusCode.BadRequest | undefined; export interface ClubPaginationResponseDto { @@ -18,7 +18,7 @@ export interface ClubResponseDto { export type ClubInfoResponseType = | ClubInfoResponseDto - | typeof STATUS_400_BAD_REQUEST + | HttpStatusCode.BadRequest | undefined; export interface ClubCabinetInfo { diff --git a/frontend/src/Cabinet/types/dto/lent.dto.ts b/frontend/src/Cabinet/types/dto/lent.dto.ts index 05f483c44..23ebf6814 100644 --- a/frontend/src/Cabinet/types/dto/lent.dto.ts +++ b/frontend/src/Cabinet/types/dto/lent.dto.ts @@ -1,4 +1,4 @@ -import { STATUS_400_BAD_REQUEST } from "@/Cabinet/constants/StatusCode"; +import { HttpStatusCode } from "axios"; /** * @interface @@ -31,7 +31,7 @@ export interface LentHistoryDto { export type LentLogResponseType = | LentHistoryDto[] - | typeof STATUS_400_BAD_REQUEST + | HttpStatusCode.BadRequest | undefined; export interface ILentLog { @@ -51,7 +51,7 @@ export interface ClubUserDto { export type ClubLogResponseType = | ClubUserDto[] - | typeof STATUS_400_BAD_REQUEST + | HttpStatusCode.BadRequest | undefined; export interface IClubLog { diff --git a/frontend/src/Presentation/components/PresentationLog/LogTable.tsx b/frontend/src/Presentation/components/PresentationLog/LogTable.tsx index 923beb42e..ba86a64f7 100644 --- a/frontend/src/Presentation/components/PresentationLog/LogTable.tsx +++ b/frontend/src/Presentation/components/PresentationLog/LogTable.tsx @@ -1,7 +1,7 @@ +import { HttpStatusCode } from "axios"; import styled from "styled-components"; import LoadingAnimation from "@/Cabinet/components/Common/LoadingAnimation"; import { formatDate } from "@/Cabinet/utils/dateUtils"; -import { STATUS_400_BAD_REQUEST } from "@/Cabinet/constants/StatusCode"; import { PresentationLocationLabelMap, PresentationStatusTypeLabelMap, @@ -26,7 +26,7 @@ const LogTable = ({ 상태 - {presentationHistory !== STATUS_400_BAD_REQUEST && ( + {presentationHistory !== HttpStatusCode.BadRequest && ( {presentationHistory.map( ( @@ -50,7 +50,7 @@ const LogTable = ({ )} - {presentationHistory === STATUS_400_BAD_REQUEST || + {presentationHistory === HttpStatusCode.BadRequest || (presentationHistory.length === 0 && ( 발표기록이 없습니다. ))} diff --git a/frontend/src/Presentation/pages/LogPage.tsx b/frontend/src/Presentation/pages/LogPage.tsx index 5bbff678c..86b226140 100644 --- a/frontend/src/Presentation/pages/LogPage.tsx +++ b/frontend/src/Presentation/pages/LogPage.tsx @@ -1,6 +1,6 @@ +import { HttpStatusCode } from "axios"; import { useEffect, useState } from "react"; import styled from "styled-components"; -import { STATUS_400_BAD_REQUEST } from "@/Cabinet/constants/StatusCode"; import LogTable from "@/Presentation/components/PresentationLog/LogTable"; import { PresentationHistoryDto, @@ -21,7 +21,7 @@ const PresentationLogPage = () => { }, 500); } catch { setTimeout(() => { - setPresentationLog(STATUS_400_BAD_REQUEST); + setPresentationLog(HttpStatusCode.BadRequest); }, 500); } }; diff --git a/frontend/src/Presentation/types/dto/presentation.dto.ts b/frontend/src/Presentation/types/dto/presentation.dto.ts index 2d995f5c3..390d287a9 100644 --- a/frontend/src/Presentation/types/dto/presentation.dto.ts +++ b/frontend/src/Presentation/types/dto/presentation.dto.ts @@ -1,4 +1,4 @@ -import { STATUS_400_BAD_REQUEST } from "@/Cabinet/constants/StatusCode"; +import { HttpStatusCode } from "axios"; import { PresentationCategoryType, PresentationLocation, @@ -18,7 +18,7 @@ export interface PresentationHistoryDto { export type PresentationHistoryResponseType = | PresentationHistoryDto[] - | typeof STATUS_400_BAD_REQUEST + | HttpStatusCode.BadRequest | undefined; export interface IPresentationInfo { From 8bc29cdabe81e92138bc02fdf4c5630da2d0edb2 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Wed, 24 Jul 2024 12:44:43 +0900 Subject: [PATCH 056/132] =?UTF-8?q?[FE]=20FIX:=20error.response.ststus->er?= =?UTF-8?q?ror.response.status=20=EC=98=A4=ED=83=80=20=EC=88=98=EC=A0=95#1?= =?UTF-8?q?665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/components/Modals/StoreModal/SwapModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/Cabinet/components/Modals/StoreModal/SwapModal.tsx b/frontend/src/Cabinet/components/Modals/StoreModal/SwapModal.tsx index 7eaaee11e..171e249b8 100644 --- a/frontend/src/Cabinet/components/Modals/StoreModal/SwapModal.tsx +++ b/frontend/src/Cabinet/components/Modals/StoreModal/SwapModal.tsx @@ -74,7 +74,7 @@ const SwapModal: React.FC<{ } } catch (error: any) { setModalTitle("이사권 사용실패"); - if (error.response.ststus === 400) { + if (error.response.status === 400) { setModalContent( "현재 이사권을 보유하고 있지 않습니다.\n이사권은 까비상점에서 구매하실 수 있습니다." ); From 03f51ed4669915804e67eae914bc0692cf3c472b Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Wed, 24 Jul 2024 13:07:08 +0900 Subject: [PATCH 057/132] =?UTF-8?q?[FE]=20FIX:=20axios=20=ED=8C=A8?= =?UTF-8?q?=ED=82=A4=EC=A7=80=20update=20=ED=9B=84=20=EB=AC=B8=EB=B2=95?= =?UTF-8?q?=EC=97=90=EB=9F=AC=20=ED=95=B4=EA=B2=B0=20(config.headers)#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/api/axios/axios.instance.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/src/Cabinet/api/axios/axios.instance.ts b/frontend/src/Cabinet/api/axios/axios.instance.ts index ef2ff8073..cd4f80fbb 100644 --- a/frontend/src/Cabinet/api/axios/axios.instance.ts +++ b/frontend/src/Cabinet/api/axios/axios.instance.ts @@ -11,9 +11,7 @@ const instance = axios.create({ instance.interceptors.request.use(async (config) => { const token = getCookie("admin_access_token") ?? getCookie("access_token"); - config.headers = { - Authorization: `Bearer ${token}`, - }; + config.headers.set("Authorization", `Bearer ${token}`); return config; }); From b7e9b378f5bd2e21c3227628b8e036fa830c2097 Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Wed, 24 Jul 2024 13:26:12 +0900 Subject: [PATCH 058/132] =?UTF-8?q?[FE]=20FIX:=20axios=20instance=20?= =?UTF-8?q?=EC=97=90=EC=84=9C=20new=20Error=20=EB=A5=BC=20throw=20?= =?UTF-8?q?=ED=95=B4=20=EC=A0=95=EB=B3=B4=EA=B0=80=20=EC=82=AC=EB=9D=BC?= =?UTF-8?q?=EC=A7=80=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/api/axios/axios.instance.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/Cabinet/api/axios/axios.instance.ts b/frontend/src/Cabinet/api/axios/axios.instance.ts index cd4f80fbb..1d367d46e 100644 --- a/frontend/src/Cabinet/api/axios/axios.instance.ts +++ b/frontend/src/Cabinet/api/axios/axios.instance.ts @@ -43,7 +43,7 @@ instance.interceptors.response.use( extra: { type: "서버 에러" }, }); } - return Promise.reject(new Error(error)); + return Promise.reject(error); } ); From d69978cad304099d72a2b31ee27c20c243d7b787 Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Wed, 24 Jul 2024 13:40:44 +0900 Subject: [PATCH 059/132] =?UTF-8?q?[FE]=20FIX:=20SentryRoutes=20=EA=B0=80?= =?UTF-8?q?=20=ED=95=9C=EB=B2=88=EB=A7=8C=20=EB=B6=88=EB=A0=A4=20=EB=A0=8C?= =?UTF-8?q?=EB=8D=94=EB=A7=81=20=EC=88=9C=EC=84=9C=20(Rules=20of=20Hooks)?= =?UTF-8?q?=20=EB=A5=BC=20=EC=9C=84=EB=B0=98=ED=95=98=EB=8D=98=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=20=EC=88=98=EC=A0=95=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/App.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index fb89a5a30..4dc792545 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -39,9 +39,8 @@ const AdminLoginFailurePage = lazy( ); const AdminHomePage = lazy(() => import("@/Cabinet/pages/admin/AdminHomePage")); -const SentryRoutes = Sentry.withSentryReactRouterV6Routing(Routes); - function App(): React.ReactElement { + const SentryRoutes = Sentry.withSentryReactRouterV6Routing(Routes); return ( {/* GA4 Page Tracking Component */} From 62f3bb83a6df4a2b8550b21bf6cf23eef47e06ac Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Wed, 24 Jul 2024 14:39:04 +0900 Subject: [PATCH 060/132] =?UTF-8?q?[FE]=20FIX:=20useMenu=20=EB=82=B4=20=3D?= =?UTF-8?q?=3D=20=EB=A5=BC=20=3D=3D=3D=20=EB=A1=9C=20=EB=B3=80=EA=B2=BD=20?= =?UTF-8?q?#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/hooks/useMenu.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/Cabinet/hooks/useMenu.ts b/frontend/src/Cabinet/hooks/useMenu.ts index 1a47e474a..7e0a31949 100644 --- a/frontend/src/Cabinet/hooks/useMenu.ts +++ b/frontend/src/Cabinet/hooks/useMenu.ts @@ -200,7 +200,9 @@ const useMenu = () => { }; const closeUserStore = () => { - if (document.getElementById("itemInfo")?.classList.contains("on") == true) { + if ( + document.getElementById("itemInfo")?.classList.contains("on") === true + ) { document.getElementById("itemInfo")?.classList.remove("on"); } }; From ba4b92e3748bdcfddd2013adf9a2e3d82f5da9f6 Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Wed, 24 Jul 2024 14:50:13 +0900 Subject: [PATCH 061/132] =?UTF-8?q?[FE]=20FIX:=20.prettierrc=20=EC=97=90?= =?UTF-8?q?=20App=20=EA=B3=BC=20css=20=EB=A5=BC=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?=ED=95=B4=20THIRD=5FPARTY=5FMODULES=20=EA=B0=80=20=EA=B0=80?= =?UTF-8?q?=EC=9E=A5=20=EC=9C=84=EB=A1=9C=20=EC=98=A4=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/.prettierrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/.prettierrc b/frontend/.prettierrc index d55a2894b..5f131ea44 100644 --- a/frontend/.prettierrc +++ b/frontend/.prettierrc @@ -8,6 +8,8 @@ "arrowParens": "always", "importOrder": [ "", + "^@/.*\\.css$", + "^@/App", "^@/Cabinet/recoil/(.*)$", "^@/Cabinet/pages/(.*)$", "^@/Cabinet/components/(.*)$", From dbe8efc933f69d9e48a0b161c672d36a99ed02bd Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Wed, 24 Jul 2024 14:52:23 +0900 Subject: [PATCH 062/132] =?UTF-8?q?[FE]=20FIX:=20main.tsx=20=EC=9D=98=20im?= =?UTF-8?q?portOrder=20=EC=88=98=EC=A0=95=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/main.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index 827ee8421..2c72c2e89 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -1,8 +1,5 @@ -import App from "@/App"; -import "@/index.css"; import * as Sentry from "@sentry/react"; -import { useEffect } from "react"; -import React from "react"; +import React, { useEffect } from "react"; import ReactDOM from "react-dom/client"; import { createRoutesFromChildren, @@ -13,6 +10,8 @@ import { import { RecoilRoot } from "recoil"; import "@/Cabinet/assets/css/media.css"; import "@/Cabinet/assets/css/reset.css"; +import "@/index.css"; +import App from "@/App"; import { GlobalStyle } from "@/Cabinet/assets/data/ColorTheme"; Sentry.init({ From 05c60b44dd5c252be27098fc9e2ce8827aa936c1 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Thu, 25 Jul 2024 12:00:27 +0900 Subject: [PATCH 063/132] =?UTF-8?q?[FE]=20FEAT:=20axios=20error=20?= =?UTF-8?q?=EB=82=B4=EC=9A=A9=20=EC=A0=95=EB=A6=AC=20=EA=B8=B0=EB=A1=9D?= =?UTF-8?q?=ED=95=98=EB=8A=94=20logAxiosError=20=EC=A0=95=EC=9D=98=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/api/axios/axios.log.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 frontend/src/Cabinet/api/axios/axios.log.ts diff --git a/frontend/src/Cabinet/api/axios/axios.log.ts b/frontend/src/Cabinet/api/axios/axios.log.ts new file mode 100644 index 000000000..c33db17a5 --- /dev/null +++ b/frontend/src/Cabinet/api/axios/axios.log.ts @@ -0,0 +1,16 @@ +import { captureException } from "@sentry/react"; +import { AxiosError } from "axios"; + +export function logAxiosError(error: AxiosError, type: string, errorMsg : string) { + error.message = "[Axios] " + errorMsg; + captureException(error, { + tags: { + // user: + api: error.response?.config.url, + httpMethod: error.config?.method?.toUpperCase(), + httpStatusCode: (error.response?.status || "").toString(), + }, + level: "error", + extra: { type: type }, + }); + } \ No newline at end of file From 65bc722628453c63cd0612f21750571a6a7c79bb Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Thu, 25 Jul 2024 12:03:40 +0900 Subject: [PATCH 064/132] =?UTF-8?q?[FE]=20REFACT:=20logAxiosError=20?= =?UTF-8?q?=ED=95=A8=EC=88=98=20=EC=BB=A8=EB=B2=A4=EC=85=98=EB=8C=80?= =?UTF-8?q?=EB=A1=9C=20=ED=99=94=EC=82=B4=ED=91=9C=20=ED=95=A8=EC=88=98?= =?UTF-8?q?=EB=A1=9C=20=EC=A0=95=EC=9D=98=20=EB=B0=A9=EB=B2=95=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/api/axios/axios.log.ts | 30 ++++++++++++--------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/frontend/src/Cabinet/api/axios/axios.log.ts b/frontend/src/Cabinet/api/axios/axios.log.ts index c33db17a5..50f5f7ebd 100644 --- a/frontend/src/Cabinet/api/axios/axios.log.ts +++ b/frontend/src/Cabinet/api/axios/axios.log.ts @@ -1,16 +1,20 @@ import { captureException } from "@sentry/react"; import { AxiosError } from "axios"; -export function logAxiosError(error: AxiosError, type: string, errorMsg : string) { - error.message = "[Axios] " + errorMsg; - captureException(error, { - tags: { - // user: - api: error.response?.config.url, - httpMethod: error.config?.method?.toUpperCase(), - httpStatusCode: (error.response?.status || "").toString(), - }, - level: "error", - extra: { type: type }, - }); - } \ No newline at end of file +export const logAxiosError = ( + error: AxiosError, + type: string, + errorMsg: string +) => { + error.message = "[Axios] " + errorMsg; + captureException(error, { + tags: { + // user: + api: error.response?.config.url, + httpMethod: error.config?.method?.toUpperCase(), + httpStatusCode: (error.response?.status || "").toString(), + }, + level: "error", + extra: { type: type }, + }); +}; From 3f2e7f8fd6f506d0744b452f9f4003a33b9d79f4 Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Thu, 25 Jul 2024 12:09:05 +0900 Subject: [PATCH 065/132] =?UTF-8?q?[FE]=20FEAT:=20axios=20error=20type=20?= =?UTF-8?q?=EA=B5=AC=EB=B6=84=EC=9D=84=20=EC=9C=84=ED=95=9C=20ErrorType=20?= =?UTF-8?q?Enum=20=EC=B6=94=EA=B0=80=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/types/enum/error.type.enum.ts | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 frontend/src/Cabinet/types/enum/error.type.enum.ts diff --git a/frontend/src/Cabinet/types/enum/error.type.enum.ts b/frontend/src/Cabinet/types/enum/error.type.enum.ts new file mode 100644 index 000000000..bd65b00f4 --- /dev/null +++ b/frontend/src/Cabinet/types/enum/error.type.enum.ts @@ -0,0 +1,7 @@ +enum ErrorType { + LENT = "LENT", + RETURN = "RETURN", + STORE = "STORE", +} + +export default ErrorType; From 23e8268a9f5febb2700e20859d28f4b5b9828a7e Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Thu, 25 Jul 2024 12:09:46 +0900 Subject: [PATCH 066/132] =?UTF-8?q?[FE]=20FIX:=20user=20=EC=8B=9D=EB=B3=84?= =?UTF-8?q?=EC=9D=84=20=EC=9C=84=ED=95=B4=20axios.log=20=EC=97=90=EC=84=9C?= =?UTF-8?q?=20user=20=EC=9D=84=20=EA=B0=80=EC=A0=B8=EC=98=A4=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=B6=94=EA=B0=80=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/api/axios/axios.log.ts | 36 +++++++++++++-------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/frontend/src/Cabinet/api/axios/axios.log.ts b/frontend/src/Cabinet/api/axios/axios.log.ts index c33db17a5..29137603f 100644 --- a/frontend/src/Cabinet/api/axios/axios.log.ts +++ b/frontend/src/Cabinet/api/axios/axios.log.ts @@ -1,16 +1,26 @@ import { captureException } from "@sentry/react"; import { AxiosError } from "axios"; +import ErrorType from "@/Cabinet/types/enum/error.type.enum"; +import { getCookie } from "@/Cabinet/api/react_cookie/cookies"; -export function logAxiosError(error: AxiosError, type: string, errorMsg : string) { - error.message = "[Axios] " + errorMsg; - captureException(error, { - tags: { - // user: - api: error.response?.config.url, - httpMethod: error.config?.method?.toUpperCase(), - httpStatusCode: (error.response?.status || "").toString(), - }, - level: "error", - extra: { type: type }, - }); - } \ No newline at end of file +const token = getCookie("admin_access_token") ?? getCookie("access_token"); +const decodedPayload = JSON.parse(atob(token.split(".")[1])); +const user = decodedPayload.name; + +export function logAxiosError( + error: AxiosError, + type: ErrorType, + errorMsg: string +) { + error.message = "[Axios] " + errorMsg; + captureException(error, { + tags: { + user, + api: error.response?.config.url, + httpMethod: error.config?.method?.toUpperCase(), + httpStatusCode: (error.response?.status ?? "").toString(), + }, + level: "error", + extra: { type: type }, + }); +} From 2e22394c57647b4a44b5a3d464474b29f3cda00f Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Thu, 25 Jul 2024 12:14:40 +0900 Subject: [PATCH 067/132] =?UTF-8?q?[FE]=20FIX:=20node=20atob=EB=8A=94=20de?= =?UTF-8?q?precate=EB=90=90=EA=B8=B0=EB=95=8C=EB=AC=B8=EC=97=90=20window.a?= =?UTF-8?q?tob=EB=A1=9C=20=EC=88=98=EC=A0=95=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/api/axios/axios.log.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/Cabinet/api/axios/axios.log.ts b/frontend/src/Cabinet/api/axios/axios.log.ts index 29137603f..daf416a6a 100644 --- a/frontend/src/Cabinet/api/axios/axios.log.ts +++ b/frontend/src/Cabinet/api/axios/axios.log.ts @@ -4,14 +4,14 @@ import ErrorType from "@/Cabinet/types/enum/error.type.enum"; import { getCookie } from "@/Cabinet/api/react_cookie/cookies"; const token = getCookie("admin_access_token") ?? getCookie("access_token"); -const decodedPayload = JSON.parse(atob(token.split(".")[1])); +const decodedPayload = JSON.parse(window.atob(token.split(".")[1])); const user = decodedPayload.name; -export function logAxiosError( +export const logAxiosError = ( error: AxiosError, type: ErrorType, errorMsg: string -) { +) => { error.message = "[Axios] " + errorMsg; captureException(error, { tags: { @@ -23,4 +23,4 @@ export function logAxiosError( level: "error", extra: { type: type }, }); -} +}; From d361026adf653b2a4c9b01d898c0d208d125f734 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Thu, 25 Jul 2024 12:37:02 +0900 Subject: [PATCH 068/132] =?UTF-8?q?[FE]=20FIX:=20tag=EC=97=90=20user=20?= =?UTF-8?q?=EB=8C=80=EC=8B=A0=20userId=EB=A1=9C=20=EB=B3=80=EA=B2=BD#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/api/axios/axios.log.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/Cabinet/api/axios/axios.log.ts b/frontend/src/Cabinet/api/axios/axios.log.ts index daf416a6a..e9ba4edc4 100644 --- a/frontend/src/Cabinet/api/axios/axios.log.ts +++ b/frontend/src/Cabinet/api/axios/axios.log.ts @@ -5,7 +5,7 @@ import { getCookie } from "@/Cabinet/api/react_cookie/cookies"; const token = getCookie("admin_access_token") ?? getCookie("access_token"); const decodedPayload = JSON.parse(window.atob(token.split(".")[1])); -const user = decodedPayload.name; +const userId = decodedPayload.name; export const logAxiosError = ( error: AxiosError, @@ -15,7 +15,7 @@ export const logAxiosError = ( error.message = "[Axios] " + errorMsg; captureException(error, { tags: { - user, + userId: userId, api: error.response?.config.url, httpMethod: error.config?.method?.toUpperCase(), httpStatusCode: (error.response?.status ?? "").toString(), From 78ea2b1279d1d925e26a437ca0f3f08567cc36e7 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Thu, 25 Jul 2024 12:39:49 +0900 Subject: [PATCH 069/132] =?UTF-8?q?[FE]=20FIX:=20error.msg=EC=97=90?= =?UTF-8?q?=EC=84=9C=20[Axios]=20=EC=A0=9C=EA=B1=B0#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/api/axios/axios.log.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/Cabinet/api/axios/axios.log.ts b/frontend/src/Cabinet/api/axios/axios.log.ts index e9ba4edc4..8c7347682 100644 --- a/frontend/src/Cabinet/api/axios/axios.log.ts +++ b/frontend/src/Cabinet/api/axios/axios.log.ts @@ -12,7 +12,7 @@ export const logAxiosError = ( type: ErrorType, errorMsg: string ) => { - error.message = "[Axios] " + errorMsg; + error.message = errorMsg; captureException(error, { tags: { userId: userId, From 5fb12d20b617cdb1a68bfe44cd889891127279d7 Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Thu, 25 Jul 2024 13:19:37 +0900 Subject: [PATCH 070/132] =?UTF-8?q?[FE]=20FIX:=20captureError=20=EB=8C=80?= =?UTF-8?q?=EC=8B=A0=20logAxiosError=20=ED=95=A8=EC=88=98=EB=A1=9C=20?= =?UTF-8?q?=EC=97=90=EB=9F=AC=EB=A5=BC=20=EC=B2=98=EB=A6=AC=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Cabinet/api/axios/axios.custom.ts | 50 +++++++------------ 1 file changed, 18 insertions(+), 32 deletions(-) diff --git a/frontend/src/Cabinet/api/axios/axios.custom.ts b/frontend/src/Cabinet/api/axios/axios.custom.ts index 859db009d..06d8ee715 100644 --- a/frontend/src/Cabinet/api/axios/axios.custom.ts +++ b/frontend/src/Cabinet/api/axios/axios.custom.ts @@ -3,8 +3,10 @@ import { AlarmInfo } from "@/Cabinet/types/dto/alarm.dto"; import { ClubUserDto } from "@/Cabinet/types/dto/lent.dto"; import CabinetStatus from "@/Cabinet/types/enum/cabinet.status.enum"; import CabinetType from "@/Cabinet/types/enum/cabinet.type.enum"; +import ErrorType from "@/Cabinet/types/enum/error.type.enum"; import { CoinLogToggleType } from "@/Cabinet/types/enum/store.enum"; import instance from "@/Cabinet/api/axios/axios.instance"; +import { logAxiosError } from "@/Cabinet/api/axios/axios.log"; const axiosLogoutUrl = "/v4/auth/logout"; export const axiosLogout = async (): Promise => { @@ -242,10 +244,7 @@ export const axiosLentId = async (cabinetId: number | null): Promise => { const response = await instance.post(`${axiosLentIdURL}${cabinetId}`); return response; } catch (error) { - captureException(error, { - level: "error", - extra: { type: "대여 에러" }, - }); + logAxiosError(error, ErrorType.LENT, "개인사물함 대여 중 오류 발생"); throw error; } }; @@ -256,10 +255,7 @@ export const axiosMyLentInfo = async (): Promise => { const response = await instance.get(axiosMyLentInfoURL); return response; } catch (error) { - captureException(error, { - level: "error", - extra: { type: "대여 에러" }, - }); + logAxiosError(error, ErrorType.LENT, "내 대여 정보 불러오는 중 오류 발생"); throw error; } }; @@ -271,10 +267,7 @@ export const axiosSwapId = async (cabinetId: number | null): Promise => { const response = await instance.post(`${axiosSwapIdURL}${cabinetId}`); return response; } catch (error) { - captureException(error, { - level: "error", - extra: { type: "대여 에러" }, - }); + logAxiosError(error, ErrorType.LENT, "이사하기 중 오류 발생"); throw error; } }; @@ -291,10 +284,11 @@ export const axiosUpdateMyCabinetInfo = async ( }); return response; } catch (error) { - captureException(error, { - level: "error", - extra: { type: "대여 에러" }, - }); + logAxiosError( + error, + ErrorType.LENT, + "내 사물함 정보 업데이트 중 오류 발생" + ); throw error; } }; @@ -305,10 +299,7 @@ export const axiosReturn = async (): Promise => { const response = await instance.patch(axiosReturnURL); return response; } catch (error) { - captureException(error, { - level: "error", - extra: { type: "반납 에러" }, - }); + logAxiosError(error, ErrorType.RETURN, "사물함 반납 중 오류 발생"); throw error; } }; @@ -320,10 +311,11 @@ export const axiosSendCabinetPassword = async (password: string) => { cabinetMemo: password, }); } catch (error) { - captureException(error, { - level: "error", - extra: { type: "반납 에러" }, - }); + logAxiosError( + error, + ErrorType.RETURN, + "3층 사물함 비밀번호 재설정 & 반납 중 오류 발생" + ); throw error; } }; @@ -336,10 +328,7 @@ export const axiosMyLentLog = async (page: number): Promise => { }); return response; } catch (error) { - captureException(error, { - level: "error", - extra: { type: "대여 에러" }, - }); + logAxiosError(error, ErrorType.LENT, "내 대여 기록 불러오는 중 오류 발생"); throw error; } }; @@ -350,10 +339,7 @@ export const axiosExtendLentPeriod = async (): Promise => { const response = await instance.patch(axiosExtendLentPeriodURL); return response; } catch (error) { - captureException(error, { - level: "error", - extra: { type: "대여 에러" }, - }); + logAxiosError(error, ErrorType.LENT, "연장권 사용 중 오류 발생"); throw error; } }; From fd73be70f5ec7e296d79cf9a9234bbacaa945866 Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Thu, 25 Jul 2024 13:20:25 +0900 Subject: [PATCH 071/132] =?UTF-8?q?[FE]=20FIX:=20error=20=ED=83=80?= =?UTF-8?q?=EC=9E=85=EC=9D=84=20AxiosError=20=EC=97=90=EC=84=9C=20any=20?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/api/axios/axios.log.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/Cabinet/api/axios/axios.log.ts b/frontend/src/Cabinet/api/axios/axios.log.ts index 8c7347682..a0a48ce8f 100644 --- a/frontend/src/Cabinet/api/axios/axios.log.ts +++ b/frontend/src/Cabinet/api/axios/axios.log.ts @@ -8,7 +8,7 @@ const decodedPayload = JSON.parse(window.atob(token.split(".")[1])); const userId = decodedPayload.name; export const logAxiosError = ( - error: AxiosError, + error: any, type: ErrorType, errorMsg: string ) => { From 771311f703c35eb46fcf92afd09a0dbe0e47339d Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Thu, 25 Jul 2024 13:23:58 +0900 Subject: [PATCH 072/132] =?UTF-8?q?[FE]=20FIX:=20=EC=9E=AC=ED=99=94=20?= =?UTF-8?q?=EB=B6=80=EB=B6=84=20captureError=20=EB=8C=80=EC=8B=A0=20logAxi?= =?UTF-8?q?osError=20=ED=95=A8=EC=88=98=EB=A1=9C=20=EC=97=90=EB=9F=AC?= =?UTF-8?q?=EB=A5=BC=20=EC=B2=98=EB=A6=AC=ED=95=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Cabinet/api/axios/axios.custom.ts | 149 ++++++------------ .../Modals/StoreModal/SwapModal.tsx | 2 +- 2 files changed, 47 insertions(+), 104 deletions(-) diff --git a/frontend/src/Cabinet/api/axios/axios.custom.ts b/frontend/src/Cabinet/api/axios/axios.custom.ts index 06d8ee715..bedd1c89b 100644 --- a/frontend/src/Cabinet/api/axios/axios.custom.ts +++ b/frontend/src/Cabinet/api/axios/axios.custom.ts @@ -350,12 +350,11 @@ export const axiosCoinCheckGet = async (): Promise => { const response = await instance.get(axiosCoinCheck); return response; } catch (error) { - captureException(error, { - level: "error", - extra: { - type: "재화 에러", - }, - }); + logAxiosError( + error, + ErrorType.STORE, + "동전 줍기 정보 불러오는 중 오류 발생" + ); throw error; } }; @@ -365,12 +364,7 @@ export const axiosCoinCheckPost = async (): Promise => { const response = await instance.post(axiosCoinCheck); return response; } catch (error) { - captureException(error, { - level: "error", - extra: { - type: "재화 에러", - }, - }); + logAxiosError(error, ErrorType.STORE, "동전 줍기 중 오류 발생"); throw error; } }; @@ -387,12 +381,7 @@ export const axiosCoinLog = async ( }); return response; } catch (error) { - captureException(error, { - level: "error", - extra: { - type: "재화 에러", - }, - }); + logAxiosError(error, ErrorType.STORE, "코인내역 불러오는중 오류 발생"); throw error; } }; @@ -403,12 +392,7 @@ export const axiosMyItems = async (): Promise => { const response = await instance.get(axiosMyItemsURL); return response; } catch (error) { - captureException(error, { - level: "error", - extra: { - type: "재화 에러", - }, - }); + logAxiosError(error, ErrorType.STORE, "보유아이템 불러오는중 오류 발생"); throw error; } }; @@ -425,12 +409,11 @@ export const axiosGetItemUsageHistory = async ( }); return response.data; } catch (error) { - captureException(error, { - level: "error", - extra: { - type: "재화 에러", - }, - }); + logAxiosError( + error, + ErrorType.STORE, + "아이템 사용내역 불러오는중 오류 발생" + ); throw error; } }; @@ -441,12 +424,11 @@ export const axiosItems = async (): Promise => { const response = await instance.get(axiosItemsURL); return response; } catch (error) { - captureException(error, { - level: "error", - extra: { - type: "재화 에러", - }, - }); + logAxiosError( + error, + ErrorType.STORE, + "상점 아이템 목록 불러오는중 오류 발생" + ); throw error; } }; @@ -457,12 +439,7 @@ export const axiosBuyItem = async (sku: String): Promise => { const response = await instance.post(axiosBuyItemURL + sku + "/purchase"); return response; } catch (error) { - captureException(error, { - level: "error", - extra: { - type: "재화 에러", - }, - }); + logAxiosError(error, ErrorType.STORE, "아이템 구매중 오류 발생"); throw error; } }; @@ -483,12 +460,7 @@ export const axiosUseItem = async ( }); return response; } catch (error) { - captureException(error, { - level: "error", - extra: { - type: "재화 에러", - }, - }); + logAxiosError(error, ErrorType.STORE, "아이템 사용중 오류 발생"); throw error; } }; @@ -840,12 +812,11 @@ export const axiosStatisticsCoin = async () => { const response = await instance.get(axiosStatisticsCoinURL); return response; } catch (error) { - captureException(error, { - level: "error", - extra: { - type: "재화 에러", - }, - }); + logAxiosError( + error, + ErrorType.STORE, + "전체 재화 현황 데이터 불러오는중 오류 발생" + ); throw error; } }; @@ -861,43 +832,26 @@ export const axiosCoinUseStatistics = async ( }); return response; } catch (error) { - captureException(error, { - level: "error", - extra: { - type: "재화 에러", - }, - }); + logAxiosError( + error, + ErrorType.STORE, + "재화 사용 통계 데이터 불러오는중 오류 발생" + ); throw error; } }; -const axiosStatisticsItemURL = "/v5/admin/statistics/coins"; -export const axiosStatisticsItem = async () => { - try { - const response = await instance.get(axiosStatisticsItemURL); - return response; - } catch (error) { - captureException(error, { - level: "error", - extra: { - type: "재화 에러", - }, - }); - throw error; - } -}; const axiosStatisticsTotalItemUseURL = "/v5/admin/statistics/items"; export const axiosStatisticsTotalItemUse = async () => { try { const response = await instance.get(axiosStatisticsTotalItemUseURL); return response; } catch (error) { - captureException(error, { - level: "error", - extra: { - type: "재화 에러", - }, - }); + logAxiosError( + error, + ErrorType.STORE, + "아이템 사용 통계 데이터 불러오는중 오류 발생" + ); throw error; } }; @@ -913,12 +867,11 @@ export const axiosCoinCollectStatistics = async ( }); return response; } catch (error) { - captureException(error, { - level: "error", - extra: { - type: "재화 에러", - }, - }); + logAxiosError( + error, + ErrorType.STORE, + "동전 줍기 통계 데이터 불러오는중 오류 발생" + ); throw error; } }; @@ -1013,22 +966,7 @@ export const axiosItemAssign = async ( }); return response; } catch (error) { - throw error; - } -}; - -const axiosItemAssignListURL = "/v5/admin/items/assign"; -export const axiosItemAssignList = async ( - page: number, - size: number -): Promise => { - if (page === null || size === null) return; - try { - const response = await instance.get(axiosItemAssignListURL, { - params: { page: page, size: size }, - }); - return response.data; - } catch (error) { + logAxiosError(error, ErrorType.STORE, "아이템 지급 중 오류 발생"); throw error; } }; @@ -1045,6 +983,11 @@ export const axiosGetUserItems = async ( }); return response; } catch (error) { + logAxiosError( + error, + ErrorType.STORE, + "어드민에서 유저 아이템 내역 불러오는중 오류 발생" + ); throw error; } }; diff --git a/frontend/src/Cabinet/components/Modals/StoreModal/SwapModal.tsx b/frontend/src/Cabinet/components/Modals/StoreModal/SwapModal.tsx index 171e249b8..3d6afba32 100644 --- a/frontend/src/Cabinet/components/Modals/StoreModal/SwapModal.tsx +++ b/frontend/src/Cabinet/components/Modals/StoreModal/SwapModal.tsx @@ -16,10 +16,10 @@ import { import { modalPropsMap } from "@/Cabinet/assets/data/maps"; import { MyCabinetInfoResponseDto } from "@/Cabinet/types/dto/cabinet.dto"; import IconType from "@/Cabinet/types/enum/icon.type.enum"; -import { axiosUseItem } from "@/Cabinet/api/axios/axios.custom"; import { axiosCabinetById, axiosMyLentInfo, + axiosUseItem, } from "@/Cabinet/api/axios/axios.custom"; const SwapModal: React.FC<{ From 49b8b554001e822f8c8d18ce6c1845b5e8dfac99 Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Thu, 25 Jul 2024 13:31:11 +0900 Subject: [PATCH 073/132] =?UTF-8?q?[FE]=20FIX:=20logAxiosError=20=EC=97=90?= =?UTF-8?q?=EC=84=9C=20Admin=20=EC=97=AC=EB=B6=80=EB=A5=BC=20Message=20?= =?UTF-8?q?=EC=97=90=20=ED=91=9C=EC=8B=9C=ED=95=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/api/axios/axios.log.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/Cabinet/api/axios/axios.log.ts b/frontend/src/Cabinet/api/axios/axios.log.ts index a0a48ce8f..e57d3362c 100644 --- a/frontend/src/Cabinet/api/axios/axios.log.ts +++ b/frontend/src/Cabinet/api/axios/axios.log.ts @@ -10,9 +10,10 @@ const userId = decodedPayload.name; export const logAxiosError = ( error: any, type: ErrorType, - errorMsg: string + errorMsg: string, + isAdmin = false ) => { - error.message = errorMsg; + error.message = (isAdmin ? "[Admin] " : "") + errorMsg; captureException(error, { tags: { userId: userId, From 6ab170b053f642d04d4cc25ddade52c1e1332317 Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Thu, 25 Jul 2024 13:31:56 +0900 Subject: [PATCH 074/132] =?UTF-8?q?[FE]=20FIX:=20Admin=20=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EC=93=B0=EC=9D=B4=EB=8A=94=20API=20=EC=9D=98=20?= =?UTF-8?q?=EA=B2=BD=EC=9A=B0=20logAxiosError=20=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EC=8B=9D=EB=B3=84=EC=9D=B4=20=EA=B0=80=EB=8A=A5=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=9D=B8=EC=9E=90=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Cabinet/api/axios/axios.custom.ts | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/frontend/src/Cabinet/api/axios/axios.custom.ts b/frontend/src/Cabinet/api/axios/axios.custom.ts index bedd1c89b..4ee7aa88e 100644 --- a/frontend/src/Cabinet/api/axios/axios.custom.ts +++ b/frontend/src/Cabinet/api/axios/axios.custom.ts @@ -114,7 +114,7 @@ export const axiosGetClubInfo = async ( const axiosAddClubMemberURL = "/v4/clubs"; export const axiosAddClubMember = async ( clubId: number, - name: String + name: string ): Promise => { // TODO : 예외처리? try { @@ -434,7 +434,7 @@ export const axiosItems = async (): Promise => { }; const axiosBuyItemURL = "/v5/items/"; -export const axiosBuyItem = async (sku: String): Promise => { +export const axiosBuyItem = async (sku: string): Promise => { try { const response = await instance.post(axiosBuyItemURL + sku + "/purchase"); return response; @@ -445,7 +445,7 @@ export const axiosBuyItem = async (sku: String): Promise => { }; export const axiosUseItem = async ( - sku: String, + sku: string, newCabinetId: number | null, building: string | null, floor: number | null, @@ -815,7 +815,8 @@ export const axiosStatisticsCoin = async () => { logAxiosError( error, ErrorType.STORE, - "전체 재화 현황 데이터 불러오는중 오류 발생" + "전체 재화 현황 데이터 불러오는중 오류 발생", + true ); throw error; } @@ -835,7 +836,8 @@ export const axiosCoinUseStatistics = async ( logAxiosError( error, ErrorType.STORE, - "재화 사용 통계 데이터 불러오는중 오류 발생" + "재화 사용 통계 데이터 불러오는중 오류 발생", + true ); throw error; } @@ -850,7 +852,8 @@ export const axiosStatisticsTotalItemUse = async () => { logAxiosError( error, ErrorType.STORE, - "아이템 사용 통계 데이터 불러오는중 오류 발생" + "아이템 사용 통계 데이터 불러오는중 오류 발생", + true ); throw error; } @@ -870,7 +873,8 @@ export const axiosCoinCollectStatistics = async ( logAxiosError( error, ErrorType.STORE, - "동전 줍기 통계 데이터 불러오는중 오류 발생" + "동전 줍기 통계 데이터 불러오는중 오류 발생", + true ); throw error; } @@ -966,7 +970,7 @@ export const axiosItemAssign = async ( }); return response; } catch (error) { - logAxiosError(error, ErrorType.STORE, "아이템 지급 중 오류 발생"); + logAxiosError(error, ErrorType.STORE, "아이템 지급 중 오류 발생", true); throw error; } }; @@ -986,7 +990,8 @@ export const axiosGetUserItems = async ( logAxiosError( error, ErrorType.STORE, - "어드민에서 유저 아이템 내역 불러오는중 오류 발생" + "유저 아이템 내역 불러오는중 오류 발생", + true ); throw error; } From ad7c700bb758f79c425146c24d091d34ba02827e Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Thu, 25 Jul 2024 13:33:34 +0900 Subject: [PATCH 075/132] =?UTF-8?q?[FE]=20FIX:=20=EC=93=B0=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EC=95=8A=EB=8A=94=20import=20=EC=A0=9C=EA=B1=B0=20?= =?UTF-8?q?#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/api/axios/axios.log.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/src/Cabinet/api/axios/axios.log.ts b/frontend/src/Cabinet/api/axios/axios.log.ts index e57d3362c..5cd2c4c92 100644 --- a/frontend/src/Cabinet/api/axios/axios.log.ts +++ b/frontend/src/Cabinet/api/axios/axios.log.ts @@ -1,5 +1,4 @@ import { captureException } from "@sentry/react"; -import { AxiosError } from "axios"; import ErrorType from "@/Cabinet/types/enum/error.type.enum"; import { getCookie } from "@/Cabinet/api/react_cookie/cookies"; From 4efb370127327dc858b36a32d783dcf6e392b2e1 Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Thu, 25 Jul 2024 13:36:40 +0900 Subject: [PATCH 076/132] =?UTF-8?q?[FE]=20FEAT:=20ErrorType=20=EC=97=90=20?= =?UTF-8?q?HTTP=20500=20-=20Internal=20Server=20Error=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/types/enum/error.type.enum.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/Cabinet/types/enum/error.type.enum.ts b/frontend/src/Cabinet/types/enum/error.type.enum.ts index bd65b00f4..f77f8438b 100644 --- a/frontend/src/Cabinet/types/enum/error.type.enum.ts +++ b/frontend/src/Cabinet/types/enum/error.type.enum.ts @@ -2,6 +2,7 @@ enum ErrorType { LENT = "LENT", RETURN = "RETURN", STORE = "STORE", + INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR", } export default ErrorType; From 24da0d8cc9d22fd472270e94d5f3815c5affbdb0 Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Thu, 25 Jul 2024 13:37:26 +0900 Subject: [PATCH 077/132] =?UTF-8?q?[FE]=20FIX:=20HTTP=20500=20=EC=97=90?= =?UTF-8?q?=EB=9F=AC=EB=A5=BC=20axios=20instance=20=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/api/axios/axios.instance.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/frontend/src/Cabinet/api/axios/axios.instance.ts b/frontend/src/Cabinet/api/axios/axios.instance.ts index 1d367d46e..2642905f4 100644 --- a/frontend/src/Cabinet/api/axios/axios.instance.ts +++ b/frontend/src/Cabinet/api/axios/axios.instance.ts @@ -1,5 +1,6 @@ -import { captureException } from "@sentry/react"; import axios, { HttpStatusCode } from "axios"; +import ErrorType from "@/Cabinet/types/enum/error.type.enum"; +import { logAxiosError } from "@/Cabinet/api/axios/axios.log"; import { getCookie, removeCookie } from "@/Cabinet/api/react_cookie/cookies"; axios.defaults.withCredentials = true; @@ -38,10 +39,7 @@ instance.interceptors.response.use( window.location.href = "login"; alert(error.response.data.message); } else if (error.response?.status === HttpStatusCode.InternalServerError) { - captureException(error, { - level: "error", - extra: { type: "서버 에러" }, - }); + logAxiosError(error, ErrorType.INTERNAL_SERVER_ERROR, "서버 에러"); } return Promise.reject(error); } From bd929c759addde8ea7236f883a9758b989b73fa7 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Thu, 25 Jul 2024 14:18:25 +0900 Subject: [PATCH 078/132] =?UTF-8?q?[FE]=20ETC:=20=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=EB=90=98=EC=A7=80=20=EC=95=8A=EB=8A=94=20=EC=97=B0=EC=9E=A5?= =?UTF-8?q?=EA=B6=8C=20=EB=B0=8F=20=EC=9D=B4=EC=82=AC=EA=B6=8C=20api=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Cabinet/api/axios/axios.custom.ts | 53 ------------------- 1 file changed, 53 deletions(-) diff --git a/frontend/src/Cabinet/api/axios/axios.custom.ts b/frontend/src/Cabinet/api/axios/axios.custom.ts index 4ee7aa88e..514135b75 100644 --- a/frontend/src/Cabinet/api/axios/axios.custom.ts +++ b/frontend/src/Cabinet/api/axios/axios.custom.ts @@ -28,36 +28,6 @@ export const axiosMyInfo = async (): Promise => { } }; -const axiosMyExtensionsInfoURL = "/v4/users/me/lent-extensions"; -export const axiosMyExtensionsInfo = async (): Promise => { - try { - const response = await instance.get(axiosMyExtensionsInfoURL); - return response; - } catch (error) { - throw error; - } -}; - -const axiosActiveExtensionInfoURL = "/v4/users/me/lent-extensions/active"; -export const axiosActiveExtensionInfo = async (): Promise => { - try { - const response = await instance.get(axiosActiveExtensionInfoURL); - return response; - } catch (error) { - throw error; - } -}; - -const axiosUseExtensionURL = "/v4/users/me/lent-extensions"; -export const axiosUseExtension = async (): Promise => { - try { - const response = await instance.post(axiosUseExtensionURL); - return response; - } catch (error) { - throw error; - } -}; - const axiosUpdateAlarmURL = "/v4/users/me/alarms"; export const axiosUpdateAlarm = async (alarm: AlarmInfo): Promise => { try { @@ -260,18 +230,6 @@ export const axiosMyLentInfo = async (): Promise => { } }; -const axiosSwapIdURL = "/v4/lent/swap/"; -export const axiosSwapId = async (cabinetId: number | null): Promise => { - if (cabinetId === null) return; - try { - const response = await instance.post(`${axiosSwapIdURL}${cabinetId}`); - return response; - } catch (error) { - logAxiosError(error, ErrorType.LENT, "이사하기 중 오류 발생"); - throw error; - } -}; - const axiosUpdateMyCabinetInfoURL = "/v4/lent/me/cabinet"; export const axiosUpdateMyCabinetInfo = async ( title: string | null, @@ -333,17 +291,6 @@ export const axiosMyLentLog = async (page: number): Promise => { } }; -const axiosExtendLentPeriodURL = "/v4/lent/cabinets/extend"; -export const axiosExtendLentPeriod = async (): Promise => { - try { - const response = await instance.patch(axiosExtendLentPeriodURL); - return response; - } catch (error) { - logAxiosError(error, ErrorType.LENT, "연장권 사용 중 오류 발생"); - throw error; - } -}; - const axiosCoinCheck = "/v5/items/coin"; export const axiosCoinCheckGet = async (): Promise => { try { From 125bfc9b6757c64250278549d395c89dc0cfb6c5 Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Wed, 31 Jul 2024 13:47:21 +0900 Subject: [PATCH 079/132] =?UTF-8?q?[FE]=20FEAT:=20DOM=20=EB=94=94=EB=B2=84?= =?UTF-8?q?=EA=B9=85=EC=9D=84=20=EB=8F=95=EA=B8=B0=20=EC=9C=84=ED=95=B4=20?= =?UTF-8?q?styled-components=20=EC=9D=B4=EB=A6=84=EC=9D=84=20=ED=91=9C?= =?UTF-8?q?=EC=8B=9C=ED=95=B4=EC=A3=BC=EB=8A=94=20babel-plugin-styled-comp?= =?UTF-8?q?onents=20=EC=84=A4=EC=B9=98=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/package.json b/frontend/package.json index a9987a558..6940a7a7b 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -45,6 +45,7 @@ "@typescript-eslint/eslint-plugin": "^5.46.1", "@typescript-eslint/parser": "^5.46.1", "@vitejs/plugin-react": "^3.0.0", + "babel-plugin-styled-components": "^2.1.4", "date-fns": "^3.6.0", "eslint": "^8.30.0", "eslint-config-airbnb": "^19.0.4", From 740ca45b039f5823ad281d2581973b09206dd83f Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Wed, 31 Jul 2024 13:47:41 +0900 Subject: [PATCH 080/132] =?UTF-8?q?[FE]=20FEAT:=20babel-plugin-styled-comp?= =?UTF-8?q?onents=20=EC=84=A4=EC=A0=95=20=EC=B6=94=EA=B0=80=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/vite.config.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index d1621437f..7a1007709 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -8,7 +8,19 @@ import { defineConfig } from "vite"; // https://vitejs.dev/config/ export default defineConfig({ plugins: [ - react(), + react({ + babel: { + plugins: [ + [ + "babel-plugin-styled-components", + { + displayName: true, + fileName: false, + }, + ], + ], + }, + }), visualizer({ open: true, gzipSize: true, template: "treemap" }), svgr(), ], From 52fe93bad8df8d46cc80cea2e2fd14cabe21d485 Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Wed, 31 Jul 2024 13:48:12 +0900 Subject: [PATCH 081/132] =?UTF-8?q?[FE]=20FEAT:=20babel-plugin-styled-comp?= =?UTF-8?q?onents=20=EC=84=A4=EC=A0=95=20=EC=B6=94=EA=B0=80=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/package-lock.json | 55 ++++++++++---------------------------- 1 file changed, 14 insertions(+), 41 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 345ca5275..f8f391019 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -39,6 +39,7 @@ "@typescript-eslint/eslint-plugin": "^5.46.1", "@typescript-eslint/parser": "^5.46.1", "@vitejs/plugin-react": "^3.0.0", + "babel-plugin-styled-components": "^2.1.4", "date-fns": "^3.6.0", "eslint": "^8.30.0", "eslint-config-airbnb": "^19.0.4", @@ -66,7 +67,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", - "dev": true, "dependencies": { "@jridgewell/gen-mapping": "^0.1.0", "@jridgewell/trace-mapping": "^0.3.9" @@ -91,7 +91,6 @@ "version": "7.23.2", "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.2.tgz", "integrity": "sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ==", - "dev": true, "engines": { "node": ">=6.9.0" } @@ -100,7 +99,6 @@ "version": "7.23.2", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.2.tgz", "integrity": "sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ==", - "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.22.13", @@ -180,7 +178,6 @@ "version": "7.22.15", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", - "dev": true, "dependencies": { "@babel/compat-data": "^7.22.9", "@babel/helper-validator-option": "^7.22.15", @@ -196,7 +193,6 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, "dependencies": { "yallist": "^3.0.2" } @@ -204,8 +200,7 @@ "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" }, "node_modules/@babel/helper-create-class-features-plugin": { "version": "7.22.15", @@ -321,7 +316,6 @@ "version": "7.23.0", "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.0.tgz", "integrity": "sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw==", - "dev": true, "dependencies": { "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-module-imports": "^7.22.15", @@ -352,7 +346,6 @@ "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", - "dev": true, "engines": { "node": ">=6.9.0" } @@ -395,7 +388,6 @@ "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", - "dev": true, "dependencies": { "@babel/types": "^7.22.5" }, @@ -446,7 +438,6 @@ "version": "7.22.15", "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz", "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==", - "dev": true, "engines": { "node": ">=6.9.0" } @@ -469,7 +460,6 @@ "version": "7.23.2", "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.2.tgz", "integrity": "sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==", - "dev": true, "dependencies": { "@babel/template": "^7.22.15", "@babel/traverse": "^7.23.2", @@ -668,7 +658,6 @@ "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz", "integrity": "sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==", - "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5" }, @@ -2827,7 +2816,6 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", - "dev": true, "dependencies": { "@jridgewell/set-array": "^1.0.0", "@jridgewell/sourcemap-codec": "^1.4.10" @@ -4872,25 +4860,20 @@ } }, "node_modules/babel-plugin-styled-components": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-2.0.7.tgz", - "integrity": "sha512-i7YhvPgVqRKfoQ66toiZ06jPNA3p6ierpfUuEWxNF+fV27Uv5gxBkf8KZLHUCc1nFA9j6+80pYoIpqCeyW3/bA==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-2.1.4.tgz", + "integrity": "sha512-Xgp9g+A/cG47sUyRwwYxGM4bR/jDRg5N6it/8+HxCnbT5XNKSKDT9xm4oag/osgqjC2It/vH0yXsomOG6k558g==", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.16.0", - "@babel/helper-module-imports": "^7.16.0", - "babel-plugin-syntax-jsx": "^6.18.0", - "lodash": "^4.17.11", - "picomatch": "^2.3.0" + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-module-imports": "^7.22.5", + "@babel/plugin-syntax-jsx": "^7.22.5", + "lodash": "^4.17.21", + "picomatch": "^2.3.1" }, "peerDependencies": { "styled-components": ">= 2" } }, - "node_modules/babel-plugin-syntax-jsx": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz", - "integrity": "sha512-qrPaCSo9c8RHNRHIotaufGbuOBN8rtdC4QrrFFc43vyWCCz7Kl7GL1PGaXtMGQZUXrkCjNEgxDfmAuAabr/rlw==" - }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -4929,7 +4912,6 @@ "version": "4.22.1", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz", "integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==", - "dev": true, "funding": [ { "type": "opencollective", @@ -5018,7 +5000,6 @@ "version": "1.0.30001551", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001551.tgz", "integrity": "sha512-vtBAez47BoGMMzlbYhfXrMV1kvRF2WP/lqiMuDu1Sb4EE4LKEgjopFDSRtZfdVnslNRpOqV/woE+Xgrwj6VQlg==", - "dev": true, "funding": [ { "type": "opencollective", @@ -5192,8 +5173,7 @@ "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==" }, "node_modules/cookie": { "version": "0.4.2", @@ -5736,8 +5716,7 @@ "node_modules/electron-to-chromium": { "version": "1.4.559", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.559.tgz", - "integrity": "sha512-iS7KhLYCSJbdo3rUSkhDTVuFNCV34RKs2UaB9Ecr7VlqzjjWW//0nfsFF5dtDmyXlZQaDYYtID5fjtC/6lpRug==", - "dev": true + "integrity": "sha512-iS7KhLYCSJbdo3rUSkhDTVuFNCV34RKs2UaB9Ecr7VlqzjjWW//0nfsFF5dtDmyXlZQaDYYtID5fjtC/6lpRug==" }, "node_modules/emoji-regex": { "version": "9.2.2", @@ -6816,7 +6795,6 @@ "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, "engines": { "node": ">=6.9.0" } @@ -8075,7 +8053,6 @@ "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, "bin": { "json5": "lib/cli.js" }, @@ -8443,8 +8420,7 @@ "node_modules/node-releases": { "version": "2.0.13", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", - "dev": true + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==" }, "node_modules/nth-check": { "version": "2.1.1", @@ -8759,8 +8735,7 @@ "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -9421,7 +9396,6 @@ "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, "bin": { "semver": "bin/semver.js" } @@ -10090,7 +10064,6 @@ "version": "1.0.13", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", - "dev": true, "funding": [ { "type": "opencollective", From 1dfed958a7887a4a38fa96a2c7298afc7cc9fbf4 Mon Sep 17 00:00:00 2001 From: Minkyu01 Date: Wed, 31 Jul 2024 14:03:48 +0900 Subject: [PATCH 082/132] =?UTF-8?q?[FE]=20FIX:=20coin=20animaion=20?= =?UTF-8?q?=EC=83=88=EB=A1=9C=EA=B3=A0=EC=B9=A8=EC=8B=9C=20UI=EA=B9=A8?= =?UTF-8?q?=EC=A7=90=20=ED=98=84=EC=83=81=20=EA=B3=A0=EC=B9=A8=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/components/Store/StoreCoinPick.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/src/Cabinet/components/Store/StoreCoinPick.tsx b/frontend/src/Cabinet/components/Store/StoreCoinPick.tsx index 68945585c..4bbaddf56 100644 --- a/frontend/src/Cabinet/components/Store/StoreCoinPick.tsx +++ b/frontend/src/Cabinet/components/Store/StoreCoinPick.tsx @@ -14,7 +14,9 @@ const StoreCoinPick = () => { height={"320px"} > <> - + + +

누군가가 매일 흘리는 동전을 주워보세요💰

동전은 하루에 한 번씩 주울 수 있습니다

@@ -27,6 +29,11 @@ const StoreCoinPick = () => { ); }; +const CoinAnimationStyled = styled.div` + min-width: 140px; + min-height: 140px; +`; + const CoinSummary = styled.div` background-color: var(--card-content-bg-color); font-size: var(--size-base); From 6fcd6beb20f5b89d8e32eb5575cd2d50bff1b6bb Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Wed, 7 Aug 2024 14:50:58 +0900 Subject: [PATCH 083/132] =?UTF-8?q?[FE]=20ETC:=20sentry=20dsn=20=ED=99=98?= =?UTF-8?q?=EA=B2=BD=EB=B3=80=EC=88=98=ED=99=94=20=ED=9B=84=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/main.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index 2c72c2e89..f57977a88 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -15,7 +15,7 @@ import App from "@/App"; import { GlobalStyle } from "@/Cabinet/assets/data/ColorTheme"; Sentry.init({ - dsn: "https://5e0e8ad22001254b0aabd23f79be09a4@o4507625901981696.ingest.us.sentry.io/4507625903489024", + dsn: import.meta.env.VITE_SENTRY_DSN, environment: "development", release: "^8.18.0", integrations: [ From b523c119124f0ba6deed4d7a8f4aabe707f84bce Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Wed, 7 Aug 2024 15:10:55 +0900 Subject: [PATCH 084/132] =?UTF-8?q?[FE]=20FEAT:=20Sentry=20=EC=97=90?= =?UTF-8?q?=EC=84=9C=20local=20=EA=B3=BC=20production=20=EC=9D=84=20?= =?UTF-8?q?=EA=B5=AC=EB=B6=84=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/api/axios/axios.log.ts | 2 ++ frontend/src/main.tsx | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/Cabinet/api/axios/axios.log.ts b/frontend/src/Cabinet/api/axios/axios.log.ts index 5cd2c4c92..05de6b862 100644 --- a/frontend/src/Cabinet/api/axios/axios.log.ts +++ b/frontend/src/Cabinet/api/axios/axios.log.ts @@ -19,6 +19,8 @@ export const logAxiosError = ( api: error.response?.config.url, httpMethod: error.config?.method?.toUpperCase(), httpStatusCode: (error.response?.status ?? "").toString(), + environment: + import.meta.env.VITE_IS_LOCAL === "true" ? "local" : "production", }, level: "error", extra: { type: type }, diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index f57977a88..c7c2940c6 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -16,7 +16,8 @@ import { GlobalStyle } from "@/Cabinet/assets/data/ColorTheme"; Sentry.init({ dsn: import.meta.env.VITE_SENTRY_DSN, - environment: "development", + environment: + import.meta.env.VITE_IS_LOCAL === "true" ? "local" : "production", release: "^8.18.0", integrations: [ // See docs for support of different versions of variation of react router From 86d33cdd2ea4025384970f293388cab9a7534acf Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Wed, 7 Aug 2024 15:56:49 +0900 Subject: [PATCH 085/132] =?UTF-8?q?[FE]=20REMOVE:=20HTTP=20Status=20Code?= =?UTF-8?q?=20=EC=82=AC=EC=9A=A9=EC=9C=BC=EB=A1=9C=20=ED=95=84=EC=9A=94=20?= =?UTF-8?q?=EC=97=86=EC=96=B4=EC=A7=84=20constants=20=ED=8F=B4=EB=8D=94=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/constants/StatusCode.ts | 1 - 1 file changed, 1 deletion(-) delete mode 100644 frontend/src/Cabinet/constants/StatusCode.ts diff --git a/frontend/src/Cabinet/constants/StatusCode.ts b/frontend/src/Cabinet/constants/StatusCode.ts deleted file mode 100644 index 604a7499e..000000000 --- a/frontend/src/Cabinet/constants/StatusCode.ts +++ /dev/null @@ -1 +0,0 @@ -export const STATUS_401_UNAUTHORIZED = 401; From 4fdb5b6b1f57ba27afc13c431a066c35cdaeca87 Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Wed, 7 Aug 2024 15:59:25 +0900 Subject: [PATCH 086/132] =?UTF-8?q?[FE]=20FIX:=20Sentry=20propagationTarge?= =?UTF-8?q?t=20=EC=97=90=20dev=20=EC=84=9C=EB=B2=84=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/main.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index c7c2940c6..e61d34b08 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -38,7 +38,11 @@ Sentry.init({ // Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled // tracePropagationTargets: [/^\//, /^https:\/\/yourserver\.io\/api/], - tracePropagationTargets: ["localhost", /^https:\/\/api\.cabi\.42seoul\.io/], + tracePropagationTargets: [ + "localhost", + /^https:\/\/api\.cabi\.42seoul\.io/, + /^https:\/\/api-dev\.cabi\.42seoul\.io/, + ], // Capture Replay for 100% of all sessions, // plus for 100% of sessions with an error From 18aa8aa106f14f09a134c77901ffd5feb87c25d6 Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Wed, 7 Aug 2024 16:23:36 +0900 Subject: [PATCH 087/132] =?UTF-8?q?[FE]=20HOTFIX:=20axios.log.ts=20?= =?UTF-8?q?=EC=97=90=EC=84=9C=20token=20=EC=9D=B4=20=EC=97=86=EC=9D=84=20?= =?UTF-8?q?=EC=8B=9C=20=EC=98=88=EC=99=B8=EC=B2=98=EB=A6=AC=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20#1670?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/api/axios/axios.log.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/Cabinet/api/axios/axios.log.ts b/frontend/src/Cabinet/api/axios/axios.log.ts index 05de6b862..242faa96e 100644 --- a/frontend/src/Cabinet/api/axios/axios.log.ts +++ b/frontend/src/Cabinet/api/axios/axios.log.ts @@ -3,8 +3,8 @@ import ErrorType from "@/Cabinet/types/enum/error.type.enum"; import { getCookie } from "@/Cabinet/api/react_cookie/cookies"; const token = getCookie("admin_access_token") ?? getCookie("access_token"); -const decodedPayload = JSON.parse(window.atob(token.split(".")[1])); -const userId = decodedPayload.name; +const payload = token?.split(".")[1]; +const userId = payload ? JSON.parse(window.atob(payload)).name : "Unknown"; export const logAxiosError = ( error: any, From 0abdcfdc21a9a27feb690f241bca4f7ec67efa29 Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Fri, 9 Aug 2024 11:58:44 +0900 Subject: [PATCH 088/132] =?UTF-8?q?[FE]=20HOTFIX:=20Sentry=20=EC=9D=B4?= =?UTF-8?q?=EC=8A=88=20=EC=B6=94=EC=A0=81=20URL=20=EC=97=90=20Dev=20?= =?UTF-8?q?=EC=84=9C=EB=B2=84=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/main.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index e61d34b08..df23ff2e9 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -40,6 +40,7 @@ Sentry.init({ // tracePropagationTargets: [/^\//, /^https:\/\/yourserver\.io\/api/], tracePropagationTargets: [ "localhost", + /^https:\/\/dev\.cabi\.42seoul\.io/, /^https:\/\/api\.cabi\.42seoul\.io/, /^https:\/\/api-dev\.cabi\.42seoul\.io/, ], From bed8b539df1fec6c01dfd4cb46ff16c6a7f86a7d Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Fri, 9 Aug 2024 12:19:15 +0900 Subject: [PATCH 089/132] =?UTF-8?q?[FE]=20HOTFIX:=20Sentry=20=EC=9D=B4?= =?UTF-8?q?=EC=8A=88=20=EC=B6=94=EC=A0=81=20URL=20=EC=97=90=20Prod=20?= =?UTF-8?q?=EC=84=9C=EB=B2=84=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/main.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index df23ff2e9..1f4fddbe7 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -40,6 +40,7 @@ Sentry.init({ // tracePropagationTargets: [/^\//, /^https:\/\/yourserver\.io\/api/], tracePropagationTargets: [ "localhost", + /^https:\/\/cabi\.42seoul\.io/, /^https:\/\/dev\.cabi\.42seoul\.io/, /^https:\/\/api\.cabi\.42seoul\.io/, /^https:\/\/api-dev\.cabi\.42seoul\.io/, From 65f4b2a67ca0256a66d26bfce73248474428cca7 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Fri, 9 Aug 2024 12:49:01 +0900 Subject: [PATCH 090/132] =?UTF-8?q?[FE]=20HOTFIX:=20=EC=A4=91=EB=B3=B5=20?= =?UTF-8?q?=EB=82=B4=EC=9A=A9=EC=9D=98=20=EC=BD=94=EB=93=9C(environment)?= =?UTF-8?q?=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config | 2 +- frontend/src/Cabinet/api/axios/axios.log.ts | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/config b/config index 00a28d5d6..7ea3631d0 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit 00a28d5d6e6e160d245bcbaa0b27b7058a674c1d +Subproject commit 7ea3631d0b9d418a809e5063bfeef56f4a454ee2 diff --git a/frontend/src/Cabinet/api/axios/axios.log.ts b/frontend/src/Cabinet/api/axios/axios.log.ts index 242faa96e..19d81ed13 100644 --- a/frontend/src/Cabinet/api/axios/axios.log.ts +++ b/frontend/src/Cabinet/api/axios/axios.log.ts @@ -19,8 +19,6 @@ export const logAxiosError = ( api: error.response?.config.url, httpMethod: error.config?.method?.toUpperCase(), httpStatusCode: (error.response?.status ?? "").toString(), - environment: - import.meta.env.VITE_IS_LOCAL === "true" ? "local" : "production", }, level: "error", extra: { type: type }, From e6d9b76abbc087ca1253c5fac7894e49b5299e8a Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Fri, 9 Aug 2024 14:42:16 +0900 Subject: [PATCH 091/132] =?UTF-8?q?[FE]=20HOTFIX:=20Sentry=20=EC=9D=B4?= =?UTF-8?q?=EC=8A=88=20=EC=B6=94=EC=A0=81=20url=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EC=95=88=ED=95=98=EA=B3=A0=20=EB=AA=A8=EB=93=A0=20=EC=9A=94?= =?UTF-8?q?=EC=B2=AD=EC=97=90=20sentry-trace=20=ED=97=A4=EB=8D=94=20?= =?UTF-8?q?=EB=B6=80=EC=B0=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/main.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index 1f4fddbe7..77872c317 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -38,13 +38,13 @@ Sentry.init({ // Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled // tracePropagationTargets: [/^\//, /^https:\/\/yourserver\.io\/api/], - tracePropagationTargets: [ - "localhost", - /^https:\/\/cabi\.42seoul\.io/, - /^https:\/\/dev\.cabi\.42seoul\.io/, - /^https:\/\/api\.cabi\.42seoul\.io/, - /^https:\/\/api-dev\.cabi\.42seoul\.io/, - ], + // tracePropagationTargets: [ + // "localhost", + // /^https:\/\/cabi\.42seoul\.io/, + // /^https:\/\/dev\.cabi\.42seoul\.io/, + // /^https:\/\/api\.cabi\.42seoul\.io/, + // /^https:\/\/api-dev\.cabi\.42seoul\.io/, + // ], // Capture Replay for 100% of all sessions, // plus for 100% of sessions with an error From a19e99907432d7c5247f0daa065f2c0adbea817c Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Fri, 9 Aug 2024 14:59:32 +0900 Subject: [PATCH 092/132] =?UTF-8?q?[FE]=20HOTFIX:=20Sentry=20=EC=9D=B4?= =?UTF-8?q?=EC=8A=88=20=EC=B6=94=EC=A0=81=20url=20=EC=84=A4=EC=A0=95?= =?UTF-8?q?=ED=95=B4=EC=84=9C=20=ED=8A=B9=EC=A0=95=20downstream=20service?= =?UTF-8?q?=EA=B0=80=20sentry-trace=20=ED=97=A4=EB=8D=94=20=EC=88=98?= =?UTF-8?q?=EC=8B=A0=ED=95=98=EA=B2=8C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/main.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index 77872c317..1f4fddbe7 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -38,13 +38,13 @@ Sentry.init({ // Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled // tracePropagationTargets: [/^\//, /^https:\/\/yourserver\.io\/api/], - // tracePropagationTargets: [ - // "localhost", - // /^https:\/\/cabi\.42seoul\.io/, - // /^https:\/\/dev\.cabi\.42seoul\.io/, - // /^https:\/\/api\.cabi\.42seoul\.io/, - // /^https:\/\/api-dev\.cabi\.42seoul\.io/, - // ], + tracePropagationTargets: [ + "localhost", + /^https:\/\/cabi\.42seoul\.io/, + /^https:\/\/dev\.cabi\.42seoul\.io/, + /^https:\/\/api\.cabi\.42seoul\.io/, + /^https:\/\/api-dev\.cabi\.42seoul\.io/, + ], // Capture Replay for 100% of all sessions, // plus for 100% of sessions with an error From 0593339c015592fa23741ef469795c28a42a68d7 Mon Sep 17 00:00:00 2001 From: Woo Joo Chae Date: Sat, 10 Aug 2024 18:39:45 +0900 Subject: [PATCH 093/132] =?UTF-8?q?[BE]=20FIX:=20User=20BlackholedAt=20?= =?UTF-8?q?=EA=B0=B1=EC=8B=A0=20=EB=A1=9C=EC=A7=81=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?&=2042API=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EC=9D=B4=ED=9B=84=20?= =?UTF-8?q?=EB=B8=94=EB=9E=99=ED=99=80=EC=9D=B4=20DB=EC=99=80=20=EB=B6=88?= =?UTF-8?q?=EC=9D=BC=EC=B9=98=ED=95=A0=20=EA=B2=BD=EC=9A=B0=20=EC=97=85?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=8A=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/ftclub/cabinet/auth/service/AuthFacadeService.java | 4 ++++ .../src/main/java/org/ftclub/cabinet/user/domain/User.java | 4 ++++ .../org/ftclub/cabinet/user/repository/UserRepository.java | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/auth/service/AuthFacadeService.java b/backend/src/main/java/org/ftclub/cabinet/auth/service/AuthFacadeService.java index bd4dce194..eb899d28f 100644 --- a/backend/src/main/java/org/ftclub/cabinet/auth/service/AuthFacadeService.java +++ b/backend/src/main/java/org/ftclub/cabinet/auth/service/AuthFacadeService.java @@ -81,6 +81,10 @@ public void handleUserLogin(HttpServletRequest req, HttpServletResponse res, Str FtProfile profile = userOauthService.getProfileByCode(code); User user = userQueryService.findUser(profile.getIntraName()) .orElseGet(() -> userCommandService.createUserByFtProfile(profile)); + // 블랙홀이 API에서 가져온 날짜와 다르다면 갱신 + if (!user.isSameBlackholedAt(profile.getBlackHoledAt())) { + userCommandService.updateUserBlackholedAtById(user.getId(), profile.getBlackHoledAt()); + } String token = tokenProvider.createUserToken(user, LocalDateTime.now()); Cookie cookie = cookieManager.cookieOf(TokenProvider.USER_TOKEN_NAME, token); cookieManager.setCookieToClient(res, cookie, "/", req.getServerName()); diff --git a/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java b/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java index 01edc1e72..139b8eb71 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java @@ -148,6 +148,10 @@ public boolean isBlackholed() { return blackholedAt != null && blackholedAt.isBefore(LocalDateTime.now()); } + public boolean isSameBlackholedAt(LocalDateTime blackholedAt) { + return this.blackholedAt.isEqual(blackholedAt); + } + public void addCoin(Long reward) { this.coin += reward; } diff --git a/backend/src/main/java/org/ftclub/cabinet/user/repository/UserRepository.java b/backend/src/main/java/org/ftclub/cabinet/user/repository/UserRepository.java index ab2a8280f..4d9f9d575 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/repository/UserRepository.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/repository/UserRepository.java @@ -46,7 +46,7 @@ public interface UserRepository extends JpaRepository { * @param name 유저 이름 * @return {@link User} */ - @Query("SELECT u FROM User u WHERE u.name = :name AND u.deletedAt IS NULL") + @Query("SELECT u FROM User u WHERE u.name = :name") Optional findByName(@Param("name") String name); /** From 6541292f11edf81a3a8c19e7153ff43a8b23dc11 Mon Sep 17 00:00:00 2001 From: Woo Joo Chae Date: Sat, 10 Aug 2024 18:51:23 +0900 Subject: [PATCH 094/132] =?UTF-8?q?[BE]=20FIX:=20user=20blackhole=20same?= =?UTF-8?q?=20=EB=A1=9C=EC=A7=81=20null=20=EA=B2=BD=EC=9A=B0=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/ftclub/cabinet/user/domain/User.java | 11 ++++++++ .../ftclub/cabinet/user/domain/UserTest.java | 25 +++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java b/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java index 139b8eb71..c4aa3a738 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/domain/User.java @@ -148,10 +148,21 @@ public boolean isBlackholed() { return blackholedAt != null && blackholedAt.isBefore(LocalDateTime.now()); } + /** + * this.blackholedAt과 전달인자 blackholedAt 중 어느 하나가 null인 경우 false를 반환 + * + * @param blackholedAt + * @return + */ public boolean isSameBlackholedAt(LocalDateTime blackholedAt) { + if (this.blackholedAt == null || blackholedAt == null) { + return this.blackholedAt == null && blackholedAt == null; + } + return this.blackholedAt.isEqual(blackholedAt); } + public void addCoin(Long reward) { this.coin += reward; } diff --git a/backend/src/test/java/org/ftclub/cabinet/user/domain/UserTest.java b/backend/src/test/java/org/ftclub/cabinet/user/domain/UserTest.java index bc2fed3da..08000d32f 100644 --- a/backend/src/test/java/org/ftclub/cabinet/user/domain/UserTest.java +++ b/backend/src/test/java/org/ftclub/cabinet/user/domain/UserTest.java @@ -1,10 +1,35 @@ package org.ftclub.cabinet.user.domain; +import java.time.LocalDateTime; import lombok.RequiredArgsConstructor; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; @RequiredArgsConstructor public class UserTest { + @Test + void isSameBlackholedAt_test_both_null() { + User test = User.of("test", "aewf@naver.com", null); + boolean sameBlackholedAt = test.isSameBlackholedAt(null); + Assertions.assertTrue(sameBlackholedAt); + } + + @Test + void isSameBlackholedAt_test_one_null() { + User test = User.of("test", "aewf@naver.com", null); + boolean sameBlackholedAt = test.isSameBlackholedAt(LocalDateTime.now()); + Assertions.assertFalse(sameBlackholedAt); + } + + @Test + void isSameBlackholedAt_test_same() { + LocalDateTime now = LocalDateTime.now(); + User test = User.of("test", "aewf@naver.com", now); + boolean sameBlackholedAt = test.isSameBlackholedAt(now); + Assertions.assertTrue(sameBlackholedAt); + } + // @Test // @DisplayName("유저 생성 성공 - 일반적인 이메일 형식") // void of_성공_일반적인_이메일_형식() { From 007afd1ae52d030b74611f61e9940f16a2cd6d5b Mon Sep 17 00:00:00 2001 From: Woo Joo Chae Date: Tue, 13 Aug 2024 14:38:35 +0900 Subject: [PATCH 095/132] =?UTF-8?q?[BE]=20HOTFIX:=20=EC=95=8C=EB=9E=8C=20?= =?UTF-8?q?=EB=93=B1=EB=A1=9D=EA=B6=8C=20=EC=A4=91=EB=B3=B5=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=20=EA=B2=80=EC=82=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cabinet/exception/ExceptionStatus.java | 3 ++- .../repository/SectionAlarmRepository.java | 5 +++++ .../item/service/ItemFacadeService.java | 20 +++++++++++++------ .../service/SectionAlarmQueryService.java | 10 +++++++++- 4 files changed, 30 insertions(+), 8 deletions(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/exception/ExceptionStatus.java b/backend/src/main/java/org/ftclub/cabinet/exception/ExceptionStatus.java index bf1bce5f1..39c570da2 100644 --- a/backend/src/main/java/org/ftclub/cabinet/exception/ExceptionStatus.java +++ b/backend/src/main/java/org/ftclub/cabinet/exception/ExceptionStatus.java @@ -83,7 +83,8 @@ public enum ExceptionStatus { NOT_ENOUGH_COIN(HttpStatus.BAD_REQUEST, "보유한 코인이 아이템 가격보다 적습니다."), INVALID_JWT_TOKEN(HttpStatus.BAD_REQUEST, "토큰이 없거나, 유효하지 않은 JWT 토큰입니다."), NOT_FOUND_SECTION(HttpStatus.BAD_REQUEST, "사물함 구역 정보를 찾을 수 없습니다."), - ITEM_NOT_OWNED(HttpStatus.BAD_REQUEST, "해당 아이템을 보유하고 있지 않습니다"); + ITEM_NOT_OWNED(HttpStatus.BAD_REQUEST, "해당 아이템을 보유하고 있지 않습니다"), + ITEM_USE_DUPLICATED(HttpStatus.FORBIDDEN, "아이템이 중복 사용되었습니다."); final private int statusCode; final private String message; diff --git a/backend/src/main/java/org/ftclub/cabinet/item/repository/SectionAlarmRepository.java b/backend/src/main/java/org/ftclub/cabinet/item/repository/SectionAlarmRepository.java index 1077be50f..ce3d99225 100644 --- a/backend/src/main/java/org/ftclub/cabinet/item/repository/SectionAlarmRepository.java +++ b/backend/src/main/java/org/ftclub/cabinet/item/repository/SectionAlarmRepository.java @@ -36,4 +36,9 @@ List findAllByUserIdAndCabinetPlaceAndAlarmedAtIsNull( @Param("userId") Long userId, @Param("building") String building, @Param("floor") Integer floor); + + List findAllByUserIdAndCabinetPlaceIdOrderByIdDesc( + @Param("userId") Long userId, + @Param("cabinetPlaceId") Long cabinetPlaceId); + } diff --git a/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java b/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java index d5ab4c859..5d274df64 100644 --- a/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java +++ b/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java @@ -58,18 +58,19 @@ @Logging(level = LogLevel.DEBUG) public class ItemFacadeService { + private final ItemMapper itemMapper; private final ItemQueryService itemQueryService; private final ItemHistoryQueryService itemHistoryQueryService; private final ItemHistoryCommandService itemHistoryCommandService; private final ItemRedisService itemRedisService; - private final UserQueryService userQueryService; - private final SectionAlarmCommandService sectionAlarmCommandService; - private final CabinetQueryService cabinetQueryService; - private final ItemMapper itemMapper; private final ItemPolicyService itemPolicyService; - private final ApplicationEventPublisher eventPublisher; + private final UserQueryService userQueryService; private final UserCommandService userCommandService; + private final CabinetQueryService cabinetQueryService; + private final SectionAlarmCommandService sectionAlarmCommandService; + private final SectionAlarmQueryService sectionAlarmQueryService; + private final ApplicationEventPublisher eventPublisher; /** * 모든 아이템 리스트 반환 @@ -302,7 +303,6 @@ public void purchaseItem(Long userId, Sku sku) { // long userCoin = itemRedisService.getCoinAmount(userId); long userCoin = user.getCoin(); - // 아이템 Policy 검증 itemPolicyService.verifyOnSale(price); itemPolicyService.verifyIsAffordable(userCoin, price); @@ -323,6 +323,14 @@ public void purchaseItem(Long userId, Sku sku) { @Transactional public void addSectionAlarm(Long userId, Long cabinetPlaceId) { + verifyDuplicateSection(userId, cabinetPlaceId); sectionAlarmCommandService.addSectionAlarm(userId, cabinetPlaceId); } + + private void verifyDuplicateSection(Long userId, Long cabinetPlaceId) { + if (sectionAlarmQueryService.findUnsentAlarmDesc(userId, + cabinetPlaceId).isPresent()) { + throw ExceptionStatus.ITEM_USE_DUPLICATED.asServiceException(); + } + } } diff --git a/backend/src/main/java/org/ftclub/cabinet/item/service/SectionAlarmQueryService.java b/backend/src/main/java/org/ftclub/cabinet/item/service/SectionAlarmQueryService.java index 131370b8c..2f56ea3c9 100644 --- a/backend/src/main/java/org/ftclub/cabinet/item/service/SectionAlarmQueryService.java +++ b/backend/src/main/java/org/ftclub/cabinet/item/service/SectionAlarmQueryService.java @@ -1,6 +1,7 @@ package org.ftclub.cabinet.item.service; import java.util.List; +import java.util.Optional; import lombok.RequiredArgsConstructor; import org.ftclub.cabinet.item.domain.SectionAlarm; import org.ftclub.cabinet.item.repository.SectionAlarmRepository; @@ -20,8 +21,15 @@ public List getUnsentAlarms() { return sectionAlarmRepository.findAllByAlarmedAtIsNull(); } - public List getUnsentAlarm(Long userId, String building, Integer floor) { + public List findUnsentAlarm(Long userId, String building, Integer floor) { return sectionAlarmRepository.findAllByUserIdAndCabinetPlaceAndAlarmedAtIsNull( userId, building, floor); } + + public Optional findUnsentAlarmDesc(Long userId, Long cabinetPlaceId) { + return sectionAlarmRepository.findAllByUserIdAndCabinetPlaceIdOrderByIdDesc( + userId, cabinetPlaceId).stream() + .filter(sectionAlarm -> sectionAlarm.getAlarmedAt() == null).findFirst(); + + } } From fd343afebba707585d50a589b1b847ca58211f43 Mon Sep 17 00:00:00 2001 From: Woo Joo Chae Date: Tue, 13 Aug 2024 14:38:51 +0900 Subject: [PATCH 096/132] =?UTF-8?q?[BE]=20HOTFIX:=20=EB=A9=94=EC=86=8C?= =?UTF-8?q?=EB=93=9C=EB=AA=85=20get->find=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ftclub/cabinet/cabinet/service/CabinetFacadeService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/cabinet/service/CabinetFacadeService.java b/backend/src/main/java/org/ftclub/cabinet/cabinet/service/CabinetFacadeService.java index f4c38f8b8..61152c7ad 100644 --- a/backend/src/main/java/org/ftclub/cabinet/cabinet/service/CabinetFacadeService.java +++ b/backend/src/main/java/org/ftclub/cabinet/cabinet/service/CabinetFacadeService.java @@ -144,7 +144,7 @@ public List getCabinetsPerSection(String building // 층, 건물에 따른 유저가 알람 등록한 section 조회 Set unsetAlarmSection = - sectionAlarmQueryService.getUnsentAlarm(userId, building, floor).stream() + sectionAlarmQueryService.findUnsentAlarm(userId, building, floor).stream() .map(alarm -> alarm.getCabinetPlace().getLocation().getSection()) .collect(Collectors.toSet()); From cc48328f2174e22840e9891042919dcce9c45d4e Mon Sep 17 00:00:00 2001 From: Woo Joo Chae Date: Tue, 13 Aug 2024 14:39:15 +0900 Subject: [PATCH 097/132] =?UTF-8?q?[BE]=20HOTFIX:=20Redis=20=EC=A0=80?= =?UTF-8?q?=EC=9E=A5=EC=86=8C=20=EB=B0=98=ED=99=98=EA=B0=92=20null=20?= =?UTF-8?q?=EC=B2=B4=ED=81=AC=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ftclub/cabinet/alarm/fcm/repository/FCMTokenRedis.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/alarm/fcm/repository/FCMTokenRedis.java b/backend/src/main/java/org/ftclub/cabinet/alarm/fcm/repository/FCMTokenRedis.java index 4516580e2..3b52513ee 100644 --- a/backend/src/main/java/org/ftclub/cabinet/alarm/fcm/repository/FCMTokenRedis.java +++ b/backend/src/main/java/org/ftclub/cabinet/alarm/fcm/repository/FCMTokenRedis.java @@ -2,6 +2,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import java.time.Duration; +import java.util.Objects; import java.util.Optional; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -26,7 +27,8 @@ public class FCMTokenRedis { */ public Optional findByKey(String key, Class type) { String serializedValue = redisTemplate.opsForValue().get(key + KEY_PREFIX); - if (serializedValue == null) { + final String NULL = "null"; + if (Objects.isNull(serializedValue) || serializedValue.equals(NULL)) { return Optional.empty(); } try { From aee4b068305cdce7b59e4261dff721b608c616cd Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Tue, 13 Aug 2024 14:40:09 +0900 Subject: [PATCH 098/132] =?UTF-8?q?[FE]=20FIX:=20E/V=EB=82=98=20=EA=B3=84?= =?UTF-8?q?=EB=8B=A8=20=EC=84=B9=EC=85=98=EC=97=90=EC=84=9C=20=EC=95=8C?= =?UTF-8?q?=EB=A6=BC=20=EB=93=B1=EB=A1=9D=EA=B6=8C=20=EC=82=AC=EC=9A=A9=20?= =?UTF-8?q?=EB=AA=A8=EB=8B=AC=20=EB=9D=84=EC=9A=B0=EB=8A=94=20=EB=B2=84?= =?UTF-8?q?=ED=8A=BC(LineHeartIcon)=20=EB=B3=B4=EC=9D=B4=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EA=B2=8C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LeftMainNav/LeftMainNav.container.tsx | 5 +++ .../components/MapInfo/MapGrid/MapGrid.tsx | 1 + frontend/src/Cabinet/pages/MainPage.tsx | 35 +++++++++++-------- frontend/src/Cabinet/recoil/atoms.ts | 5 +++ 4 files changed, 32 insertions(+), 14 deletions(-) diff --git a/frontend/src/Cabinet/components/LeftNav/LeftMainNav/LeftMainNav.container.tsx b/frontend/src/Cabinet/components/LeftNav/LeftMainNav/LeftMainNav.container.tsx index f5ed614ab..0f99c12f3 100644 --- a/frontend/src/Cabinet/components/LeftNav/LeftMainNav/LeftMainNav.container.tsx +++ b/frontend/src/Cabinet/components/LeftNav/LeftMainNav/LeftMainNav.container.tsx @@ -10,6 +10,7 @@ import { currentBuildingNameState, currentFloorCabinetState, currentFloorNumberState, + currentFloorSectionNamesState, currentMapFloorState, currentSectionNameState, isCurrentSectionRenderState, @@ -52,6 +53,8 @@ const LeftMainNavContainer = ({ isAdmin }: { isAdmin?: boolean }) => { const setSelectedTypeOnSearch = useSetRecoilState( selectedTypeOnSearchState ); + const [currentFloorSectionNames, setCurrentFloorSectionNames] = + useRecoilState(currentFloorSectionNamesState); useEffect(() => { if (currentFloor === undefined) { @@ -64,6 +67,7 @@ const LeftMainNavContainer = ({ isAdmin }: { isAdmin?: boolean }) => { const sections = response.data.map( (data: CabinetInfoByBuildingFloorDto) => data.section ); + setCurrentFloorSectionNames(sections); let currentSectionFromPersist = undefined; const recoilPersist = localStorage.getItem("recoil-persist"); if (recoilPersist) { @@ -72,6 +76,7 @@ const LeftMainNavContainer = ({ isAdmin }: { isAdmin?: boolean }) => { currentSectionFromPersist = recoilPersistObj.CurrentSection; } } + currentSectionFromPersist && sections.includes(currentSectionFromPersist) ? setCurrentSection(currentSectionFromPersist) diff --git a/frontend/src/Cabinet/components/MapInfo/MapGrid/MapGrid.tsx b/frontend/src/Cabinet/components/MapInfo/MapGrid/MapGrid.tsx index 1f7c894d7..889128910 100644 --- a/frontend/src/Cabinet/components/MapInfo/MapGrid/MapGrid.tsx +++ b/frontend/src/Cabinet/components/MapInfo/MapGrid/MapGrid.tsx @@ -16,6 +16,7 @@ const MapGrid = ({ floor }: { floor: number }) => { setIsCurrentSectionRender(true); setSection(section); }; + return ( {floor && diff --git a/frontend/src/Cabinet/pages/MainPage.tsx b/frontend/src/Cabinet/pages/MainPage.tsx index 66c212103..dc73bc107 100644 --- a/frontend/src/Cabinet/pages/MainPage.tsx +++ b/frontend/src/Cabinet/pages/MainPage.tsx @@ -6,6 +6,7 @@ import { currentBuildingNameState, currentCabinetIdState, currentFloorNumberState, + currentFloorSectionNamesState, currentSectionNameState, isCurrentSectionRenderState, targetCabinetInfoState, @@ -52,6 +53,9 @@ const MainPage = () => { const [isCurrentSectionRender, setIsCurrentSectionRender] = useRecoilState( isCurrentSectionRenderState ); + const [currentFloorSectionNames] = useRecoilState( + currentFloorSectionNamesState + ); useEffect(() => { if (!currentFloor) { @@ -136,20 +140,23 @@ const MainPage = () => { }} > - {!isClubSection && ( - - {sectionList[currentSectionIndex]?.alarmRegistered === true ? ( - - ) : ( - - )} - - )} + {currentFloorSectionNames.includes(currentSectionName) && + !isClubSection && ( + + {sectionList[currentSectionIndex]?.alarmRegistered === true ? ( + + ) : ( + + )} + + )} diff --git a/frontend/src/Cabinet/recoil/atoms.ts b/frontend/src/Cabinet/recoil/atoms.ts index dfee2ebb3..cfc0711a8 100644 --- a/frontend/src/Cabinet/recoil/atoms.ts +++ b/frontend/src/Cabinet/recoil/atoms.ts @@ -208,3 +208,8 @@ export const targetClubUserInfoState = atom({ userName: "", }, }); + +export const currentFloorSectionNamesState = atom({ + key: "currentFloorSectionNames", + default: [], +}); From 9beeaf666141574ce638f01f7f33e09bdb5127fc Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Tue, 13 Aug 2024 14:41:47 +0900 Subject: [PATCH 099/132] =?UTF-8?q?[FE]=20FIX:=20E/V=EB=82=98=20=EA=B3=84?= =?UTF-8?q?=EB=8B=A8=20=EC=84=B9=EC=85=98=EC=97=90=EC=84=9C=EB=8A=94=20?= =?UTF-8?q?=EC=8B=A4=EC=84=B8=20=EC=82=AC=EB=AC=BC=ED=95=A8=20=EC=9C=84?= =?UTF-8?q?=EC=B9=98=EC=99=80=20=EB=8B=A4=EB=A5=BC=20=EC=88=98=20=EC=9E=88?= =?UTF-8?q?=EB=8B=A4=EB=8A=94=20=EB=A9=94=EC=8B=9C=EC=A7=80(RealViewNotifi?= =?UTF-8?q?cation)=20=EC=95=88=EB=9D=84=EC=9A=B0=EA=B2=8C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=20#1673?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/CabinetList/CabinetList.container.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/frontend/src/Cabinet/components/CabinetList/CabinetList.container.tsx b/frontend/src/Cabinet/components/CabinetList/CabinetList.container.tsx index 64515e003..1e9dd4fc2 100644 --- a/frontend/src/Cabinet/components/CabinetList/CabinetList.container.tsx +++ b/frontend/src/Cabinet/components/CabinetList/CabinetList.container.tsx @@ -1,6 +1,7 @@ import React from "react"; -import { useRecoilValue } from "recoil"; +import { useRecoilState, useRecoilValue } from "recoil"; import { + currentFloorSectionNamesState, currentSectionNameState, isMultiSelectState, } from "@/Cabinet/recoil/atoms"; @@ -30,6 +31,10 @@ const CabinetListContainer = ({ const currentSectionName = useRecoilValue(currentSectionNameState); const isMultiSelect = useRecoilValue(isMultiSelectState); const { handleSelectAll, containsAllCabinets } = useMultiSelect(); + const [currentFloorSectionNames] = useRecoilState( + currentFloorSectionNamesState + ); + return ( {isMultiSelect && ( @@ -45,7 +50,9 @@ const CabinetListContainer = ({ /> )} - + {currentFloorSectionNames.includes(currentSectionName) && ( + + )} Date: Tue, 13 Aug 2024 15:36:50 +0900 Subject: [PATCH 100/132] [BE] FIX: AGU user deletedAt set to null --- .../org/ftclub/cabinet/auth/service/AuthFacadeService.java | 2 +- .../org/ftclub/cabinet/user/service/UserCommandService.java | 3 ++- config | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/auth/service/AuthFacadeService.java b/backend/src/main/java/org/ftclub/cabinet/auth/service/AuthFacadeService.java index eb899d28f..76668a0d6 100644 --- a/backend/src/main/java/org/ftclub/cabinet/auth/service/AuthFacadeService.java +++ b/backend/src/main/java/org/ftclub/cabinet/auth/service/AuthFacadeService.java @@ -83,7 +83,7 @@ public void handleUserLogin(HttpServletRequest req, HttpServletResponse res, Str .orElseGet(() -> userCommandService.createUserByFtProfile(profile)); // 블랙홀이 API에서 가져온 날짜와 다르다면 갱신 if (!user.isSameBlackholedAt(profile.getBlackHoledAt())) { - userCommandService.updateUserBlackholedAtById(user.getId(), profile.getBlackHoledAt()); + userCommandService.updateUserBlackholeStatus(user.getId(), profile.getBlackHoledAt()); } String token = tokenProvider.createUserToken(user, LocalDateTime.now()); Cookie cookie = cookieManager.cookieOf(TokenProvider.USER_TOKEN_NAME, token); diff --git a/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java b/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java index 83bf64d6e..5d7fcd1c1 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java @@ -103,10 +103,11 @@ public void updateAlarmStatus(User user, UpdateAlarmRequestDto updateAlarmReques * @param userId 유저의 ID * @param blackholedAt 변경할 blackholedAt */ - public void updateUserBlackholedAtById(Long userId, LocalDateTime blackholedAt) { + public void updateUserBlackholeStatus(Long userId, LocalDateTime blackholedAt) { User user = userRepository.findById(userId) .orElseThrow(ExceptionStatus.NOT_FOUND_USER::asServiceException); user.changeBlackholedAt(blackholedAt); + user.setDeletedAt(null); userRepository.save(user); } diff --git a/config b/config index 7ea3631d0..d72c8b1fb 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit 7ea3631d0b9d418a809e5063bfeef56f4a454ee2 +Subproject commit d72c8b1fb948031bd8084f72dc42c713f16d2152 From 67896b22a2ccd1a85a66a83954d9e97b7da1fc73 Mon Sep 17 00:00:00 2001 From: Woo Joo Chae Date: Tue, 13 Aug 2024 15:50:32 +0900 Subject: [PATCH 101/132] [BE] FIX: AGU user deletedAt set to null --- .../cabinet/utils/blackhole/manager/BlackholeManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/utils/blackhole/manager/BlackholeManager.java b/backend/src/main/java/org/ftclub/cabinet/utils/blackhole/manager/BlackholeManager.java index b1a0a4d27..23ead8047 100644 --- a/backend/src/main/java/org/ftclub/cabinet/utils/blackhole/manager/BlackholeManager.java +++ b/backend/src/main/java/org/ftclub/cabinet/utils/blackhole/manager/BlackholeManager.java @@ -70,7 +70,7 @@ public void handleBlackHole(UserBlackHoleEvent dto) { if (!userRecentIntraProfile.getRole().isInCursus()) { terminateInvalidUser(dto, now); } - userCommandService.updateUserBlackholedAtById(dto.getUserId(), + userCommandService.updateUserBlackholeStatus(dto.getUserId(), userRecentIntraProfile.getBlackHoledAt()); } catch (HttpClientErrorException e) { HttpStatus status = e.getStatusCode(); From 0509e7f39e398c15bebf907d40f1f701a934f42c Mon Sep 17 00:00:00 2001 From: Woo Joo Chae Date: Tue, 13 Aug 2024 15:53:27 +0900 Subject: [PATCH 102/132] [BE] FIX: Blackhole checking fixed --- .../item/service/ItemFacadeService.java | 8 ++++--- .../blackhole/manager/BlackholeManager.java | 22 ++++++++++--------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java b/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java index 5d274df64..b6f0e5546 100644 --- a/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java +++ b/backend/src/main/java/org/ftclub/cabinet/item/service/ItemFacadeService.java @@ -45,6 +45,7 @@ import org.ftclub.cabinet.user.domain.User; import org.ftclub.cabinet.user.service.UserCommandService; import org.ftclub.cabinet.user.service.UserQueryService; +import org.ftclub.cabinet.utils.blackhole.manager.BlackholeManager; import org.ftclub.cabinet.utils.lock.LockUtil; import org.springframework.context.ApplicationEventPublisher; import org.springframework.data.domain.Page; @@ -69,6 +70,7 @@ public class ItemFacadeService { private final CabinetQueryService cabinetQueryService; private final SectionAlarmCommandService sectionAlarmCommandService; private final SectionAlarmQueryService sectionAlarmQueryService; + private final BlackholeManager blackholeManager; private final ApplicationEventPublisher eventPublisher; @@ -239,11 +241,11 @@ private void saveCoinChangeOnRedis(Long userId, final int reward) { public void useItem(Long userId, Sku sku, ItemUseRequestDto data) { itemPolicyService.verifyDataFieldBySku(sku, data); User user = userQueryService.getUser(userId); + if (user.isBlackholed()) { - // 이벤트를 발생시켰는데 동기로직이다..? - // TODO: 근데 그 이벤트가 뭘 하는지 이 코드 흐름에서는 알 수 없다..? - eventPublisher.publishEvent(UserBlackHoleEvent.of(user)); + throw ExceptionStatus.BLACKHOLED_USER.asServiceException(); } + Item item = itemQueryService.getBySku(sku); List itemInInventory = itemHistoryQueryService.findUnusedItemsInUserInventory(user.getId(), item.getId()); diff --git a/backend/src/main/java/org/ftclub/cabinet/utils/blackhole/manager/BlackholeManager.java b/backend/src/main/java/org/ftclub/cabinet/utils/blackhole/manager/BlackholeManager.java index 23ead8047..5414778b1 100644 --- a/backend/src/main/java/org/ftclub/cabinet/utils/blackhole/manager/BlackholeManager.java +++ b/backend/src/main/java/org/ftclub/cabinet/utils/blackhole/manager/BlackholeManager.java @@ -94,19 +94,21 @@ public void handleBlackHole(UserBlackHoleEvent dto) { } } - private boolean isBlackholed(LocalDateTime blackholedAt) { - if (blackholedAt == null) { - return false; - } - return blackholedAt.isBefore(LocalDateTime.now()); - } public void blackholeUpdate(User user) { - if (isBlackholed(user.getBlackholedAt())) { - return; - } FtProfile userRecentIntraProfile = getUserRecentIntraProfile(user.getName()); - userCommandService.updateUserBlackholedAtById(user.getId(), + userCommandService.updateUserBlackholeStatus(user.getId(), userRecentIntraProfile.getBlackHoledAt()); } + + private boolean isBlackholeRemains(LocalDateTime blackholedAt) { + return blackholedAt == null || blackholedAt.isAfter(LocalDateTime.now()); + } + + public boolean isBlackholedUser(User user) { + FtProfile userRecentIntraProfile = getUserRecentIntraProfile(user.getName()); + return isBlackholeRemains(userRecentIntraProfile.getBlackHoledAt()); + } + + } From c051c45e9f96db7ad5a8537aa7a911841a22c46b Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Tue, 13 Aug 2024 16:09:06 +0900 Subject: [PATCH 103/132] =?UTF-8?q?[FE]=20FIX:=20debounce=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9=ED=95=B4=20=EC=BD=94=EC=9D=B8=20=EB=82=B4=EC=97=AD=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=ED=95=84=ED=84=B0=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=EC=8B=9C=20=EB=B6=88=ED=95=84=EC=9A=94=ED=95=9C=20api?= =?UTF-8?q?=20=EC=9A=94=EC=B2=AD=20=EB=B3=B4=EB=82=B4=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EA=B2=8C=20=EC=88=98=EC=A0=95=20#1677?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Cabinet/components/Store/CoinLog/CoinLog.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/Cabinet/components/Store/CoinLog/CoinLog.tsx b/frontend/src/Cabinet/components/Store/CoinLog/CoinLog.tsx index b6d867c8c..425692936 100644 --- a/frontend/src/Cabinet/components/Store/CoinLog/CoinLog.tsx +++ b/frontend/src/Cabinet/components/Store/CoinLog/CoinLog.tsx @@ -11,6 +11,7 @@ import { ReactComponent as CoinIcon } from "@/Cabinet/assets/images/coinIcon.svg import { ReactComponent as Select } from "@/Cabinet/assets/images/selectMaincolor.svg"; import { CoinLogToggleType } from "@/Cabinet/types/enum/store.enum"; import { axiosCoinLog } from "@/Cabinet/api/axios/axios.custom"; +import useDebounce from "@/Cabinet/hooks/useDebounce"; import { formatDate } from "@/Cabinet/utils/dateUtils"; const toggleList: toggleItem[] = [ @@ -44,10 +45,11 @@ const CoinLog = () => { const [userInfo] = useRecoilState(userState); const size = 5; // NOTE : size 만큼 데이터 불러옴 + const { debounce } = useDebounce(); - const getCoinLog = async (type: CoinLogToggleType) => { + const getCoinLog = async () => { try { - const response = await axiosCoinLog(type, page, size); + const response = await axiosCoinLog(toggleType, page, size); if (page === 0) { setCoinLogs(response.data.result); } else { @@ -71,9 +73,7 @@ const CoinLog = () => { }; useEffect(() => { - setTimeout(() => { - getCoinLog(toggleType); - }, 333); + debounce("coinLog", getCoinLog, 100); }, [page, toggleType]); useEffect(() => { From 990fcfc0cc52454f44fc15ce23ace43a32ad30bd Mon Sep 17 00:00:00 2001 From: Woo Joo Chae Date: Tue, 13 Aug 2024 16:09:11 +0900 Subject: [PATCH 104/132] [BE] FIX: AGU User DeletedAt update fixed --- .../org/ftclub/cabinet/user/repository/UserRepository.java | 3 +++ .../org/ftclub/cabinet/user/service/UserCommandService.java | 2 +- .../java/org/ftclub/cabinet/user/service/UserQueryService.java | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/user/repository/UserRepository.java b/backend/src/main/java/org/ftclub/cabinet/user/repository/UserRepository.java index 4d9f9d575..0a384bb73 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/repository/UserRepository.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/repository/UserRepository.java @@ -15,6 +15,9 @@ @Repository public interface UserRepository extends JpaRepository { + @Query("SELECT u FROM User u WHERE u.id = :userId") + User getById(@Param("userId") Long userId); + /** * 유저 고유 아이디로 유저를 가져옵니다. * diff --git a/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java b/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java index 5d7fcd1c1..15b9cd4ac 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java @@ -104,7 +104,7 @@ public void updateAlarmStatus(User user, UpdateAlarmRequestDto updateAlarmReques * @param blackholedAt 변경할 blackholedAt */ public void updateUserBlackholeStatus(Long userId, LocalDateTime blackholedAt) { - User user = userRepository.findById(userId) + User user = userRepository.getById(userId) .orElseThrow(ExceptionStatus.NOT_FOUND_USER::asServiceException); user.changeBlackholedAt(blackholedAt); user.setDeletedAt(null); diff --git a/backend/src/main/java/org/ftclub/cabinet/user/service/UserQueryService.java b/backend/src/main/java/org/ftclub/cabinet/user/service/UserQueryService.java index d9e3b55d7..9415da5ae 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/service/UserQueryService.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/service/UserQueryService.java @@ -20,8 +20,9 @@ public class UserQueryService { private final UserRepository userRepository; + /** - * 유저를 가져옵니다. + * deletedAt 이 없는 활성화된 유저를 가져옵니다. * * @param userId 유저의 ID * @return 유저 객체를 반환합니다. From c59dd660624b85af681777be4fc0e7b5ad774035 Mon Sep 17 00:00:00 2001 From: Woo Joo Chae Date: Tue, 13 Aug 2024 16:09:57 +0900 Subject: [PATCH 105/132] [BE] FIX: AGU User DeletedAt update fixed --- .../org/ftclub/cabinet/user/service/UserCommandService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java b/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java index 15b9cd4ac..994e9f7b8 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/service/UserCommandService.java @@ -104,8 +104,7 @@ public void updateAlarmStatus(User user, UpdateAlarmRequestDto updateAlarmReques * @param blackholedAt 변경할 blackholedAt */ public void updateUserBlackholeStatus(Long userId, LocalDateTime blackholedAt) { - User user = userRepository.getById(userId) - .orElseThrow(ExceptionStatus.NOT_FOUND_USER::asServiceException); + User user = userRepository.getById(userId); user.changeBlackholedAt(blackholedAt); user.setDeletedAt(null); userRepository.save(user); From ac7b11eec89df03c409bc7c2873cb2a06ad60b28 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Tue, 13 Aug 2024 18:31:23 +0900 Subject: [PATCH 106/132] =?UTF-8?q?[FE]=20FIX:=20=EA=B3=B5=EC=9C=A0?= =?UTF-8?q?=EC=82=AC=EB=AC=BC=ED=95=A8=20=EC=BD=94=EB=93=9C=20=EB=B3=B5?= =?UTF-8?q?=EC=82=AC,=20=ED=81=B4=EB=9F=BD=20=EB=A9=A4=EB=B2=84=EB=A6=AC?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=EC=99=80=20=EC=95=84=EC=9D=B4=ED=85=9C=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=20=EB=82=B4=EC=97=AD=20=EB=B6=88=EB=9F=AC?= =?UTF-8?q?=EC=98=A4=EA=B8=B0=EC=97=90=EC=84=9C=20debouncing=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9#1677?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CabinetInfoArea/CountTime/CodeAndTime.tsx | 12 +++++++++--- .../ClubMemberList/ClubMemberList.container.tsx | 16 +++++++++++----- frontend/src/Cabinet/pages/ItemUsageLogPage.tsx | 15 +++++++++++---- frontend/src/Cabinet/pages/PostLogin.tsx | 1 + 4 files changed, 32 insertions(+), 12 deletions(-) diff --git a/frontend/src/Cabinet/components/CabinetInfoArea/CountTime/CodeAndTime.tsx b/frontend/src/Cabinet/components/CabinetInfoArea/CountTime/CodeAndTime.tsx index c3c013be9..1984630d3 100644 --- a/frontend/src/Cabinet/components/CabinetInfoArea/CountTime/CodeAndTime.tsx +++ b/frontend/src/Cabinet/components/CabinetInfoArea/CountTime/CodeAndTime.tsx @@ -5,6 +5,7 @@ import { myCabinetInfoState } from "@/Cabinet/recoil/atoms"; import alertImg from "@/Cabinet/assets/images/cautionSign.svg"; import { ReactComponent as ClockImg } from "@/Cabinet/assets/images/clock.svg"; import { MyCabinetInfoResponseDto } from "@/Cabinet/types/dto/cabinet.dto"; +import useDebounce from "@/Cabinet/hooks/useDebounce"; interface CountTimeProps { minutes: string; @@ -17,13 +18,18 @@ const CodeAndTime = ({ minutes, seconds, isTimeOver }: CountTimeProps) => { useRecoilValue(myCabinetInfoState); const code = myCabinetInfo.shareCode + ""; const [copySuccess, setCopySuccess] = useState(false); + const { debounce } = useDebounce(); const handleCopyClick = () => { navigator.clipboard.writeText(code).then(() => { setCopySuccess(true); - setTimeout(() => { - setCopySuccess(false); - }, 2000); + debounce( + "codeAndTimeCopyClick", + () => { + setCopySuccess(false); + }, + 2000 + ); }); }; diff --git a/frontend/src/Cabinet/components/Club/ClubMemberList/ClubMemberList.container.tsx b/frontend/src/Cabinet/components/Club/ClubMemberList/ClubMemberList.container.tsx index 0df8e737c..aa08a10c2 100644 --- a/frontend/src/Cabinet/components/Club/ClubMemberList/ClubMemberList.container.tsx +++ b/frontend/src/Cabinet/components/Club/ClubMemberList/ClubMemberList.container.tsx @@ -1,11 +1,12 @@ import { useEffect, useState } from "react"; -import { useRecoilState, useRecoilValue } from "recoil"; -import { targetClubUserInfoState, userState } from "@/Cabinet/recoil/atoms"; +import { useRecoilState } from "recoil"; +import { targetClubUserInfoState } from "@/Cabinet/recoil/atoms"; import ClubMemberList from "@/Cabinet/components/Club/ClubMemberList/ClubMemberList"; import { ClubInfoResponseDto, ClubUserResponseDto, } from "@/Cabinet/types/dto/club.dto"; +import useDebounce from "@/Cabinet/hooks/useDebounce"; import useMenu from "@/Cabinet/hooks/useMenu"; export type TClubMemberModalState = "addModal"; @@ -36,12 +37,17 @@ const ClubMemberListContainer = ({ const [targetClubUser, setTargetClubUser] = useRecoilState( targetClubUserInfoState ); + const { debounce } = useDebounce(); const clickMoreButton = () => { setIsLoading(true); - setTimeout(() => { - setPage(page + 1); - }, 100); + debounce( + "clubMemberList", + () => { + setPage(page + 1); + }, + 100 + ); }; const selectClubMemberOnClick = (member: ClubUserResponseDto) => { diff --git a/frontend/src/Cabinet/pages/ItemUsageLogPage.tsx b/frontend/src/Cabinet/pages/ItemUsageLogPage.tsx index f34eb2c90..455e6d119 100644 --- a/frontend/src/Cabinet/pages/ItemUsageLogPage.tsx +++ b/frontend/src/Cabinet/pages/ItemUsageLogPage.tsx @@ -7,6 +7,7 @@ import { ItemIconMap } from "@/Cabinet/assets/data/maps"; import { ReactComponent as DropdownChevron } from "@/Cabinet/assets/images/dropdownChevron.svg"; import { StoreItemType } from "@/Cabinet/types/enum/store.enum"; import { axiosGetItemUsageHistory } from "@/Cabinet/api/axios/axios.custom"; +import useDebounce from "@/Cabinet/hooks/useDebounce"; const mapItemNameToType = (itemName: string): StoreItemType => { switch (itemName) { @@ -55,8 +56,9 @@ const ItemUsageLogPage = () => { const [isMoreBtnLoading, setIsMoreBtnLoading] = useState(true); const [isLoading, setIsLoading] = useState(true); const size = 5; + const { debounce } = useDebounce(); - const getItemUsageLog = async (page: number, size: number) => { + const getItemUsageLog = async () => { try { const data = await axiosGetItemUsageHistory(page, size); const newLogs = createLogEntries(data); @@ -72,13 +74,19 @@ const ItemUsageLogPage = () => { useEffect(() => { setTimeout(() => { - getItemUsageLog(page, size); + getItemUsageLog(); }, 333); }, [page]); const handleMoreClick = () => { - setPage((prev) => prev + 1); setIsMoreBtnLoading(true); + debounce( + "itemUsageLog", + () => { + setPage((prev) => prev + 1); + }, + 333 + ); }; return ( @@ -111,7 +119,6 @@ const ItemUsageLogPage = () => { {isMoreBtnLoading ? ( diff --git a/frontend/src/Cabinet/pages/PostLogin.tsx b/frontend/src/Cabinet/pages/PostLogin.tsx index c840badad..ef31dbbd8 100644 --- a/frontend/src/Cabinet/pages/PostLogin.tsx +++ b/frontend/src/Cabinet/pages/PostLogin.tsx @@ -46,6 +46,7 @@ const PostLogin = (): JSX.Element => { let time = setTimeout(() => { navigate("/home"); }, 600); + return () => { clearTimeout(time); }; From e9da7497a3e8e9a3b02d9e5d97f9466827e94738 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Tue, 13 Aug 2024 21:30:06 +0900 Subject: [PATCH 107/132] =?UTF-8?q?[FE]=20FIX:=20AvailablePage=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=ED=95=84=EC=9A=94=EC=97=86=EB=8A=94=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=82=AD=EC=A0=9C#1677?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Cabinet/components/Search/SearchCabinetDetails.tsx | 6 +----- .../Cabinet/components/Search/SearchNoCabinetDetails.tsx | 1 - frontend/src/Cabinet/pages/AvailablePage.tsx | 6 +----- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/frontend/src/Cabinet/components/Search/SearchCabinetDetails.tsx b/frontend/src/Cabinet/components/Search/SearchCabinetDetails.tsx index 8861c7450..b092bb807 100644 --- a/frontend/src/Cabinet/components/Search/SearchCabinetDetails.tsx +++ b/frontend/src/Cabinet/components/Search/SearchCabinetDetails.tsx @@ -49,9 +49,7 @@ const SearchCabinetDetails = (props: ISearchDetail) => { ); const { openCabinet, closeCabinet } = useMenu(); const CabinetIcon = - cabinetIconComponentMap[ - cabinetInfo?.lentType || CabinetType.PRIVATE - ]; + cabinetIconComponentMap[cabinetInfo?.lentType || CabinetType.PRIVATE]; const clickSearchItem = () => { if ( @@ -150,7 +148,6 @@ const SearchCabinetDetails = (props: ISearchDetail) => { ); }; - const WrapperStyled = styled.div` width: 350px; height: 110px; @@ -252,4 +249,3 @@ const ButtonWrapper = styled.div` `; export default SearchCabinetDetails; - diff --git a/frontend/src/Cabinet/components/Search/SearchNoCabinetDetails.tsx b/frontend/src/Cabinet/components/Search/SearchNoCabinetDetails.tsx index 455a58aed..6456dfc49 100644 --- a/frontend/src/Cabinet/components/Search/SearchNoCabinetDetails.tsx +++ b/frontend/src/Cabinet/components/Search/SearchNoCabinetDetails.tsx @@ -145,7 +145,6 @@ const SearchNoCabinetDetails = (props: ISearchDetail) => { ); }; - const WrapperStyled = styled.div` width: 350px; height: 110px; diff --git a/frontend/src/Cabinet/pages/AvailablePage.tsx b/frontend/src/Cabinet/pages/AvailablePage.tsx index 9cd4291a4..82ebd53ff 100644 --- a/frontend/src/Cabinet/pages/AvailablePage.tsx +++ b/frontend/src/Cabinet/pages/AvailablePage.tsx @@ -98,10 +98,6 @@ const AvailablePage = () => { useEffect(() => { deleteRecoilPersistFloorSection(); - setTimeout(() => { - // 새로고침 광클 방지를 위한 초기 로딩 딜레이 - setIsLoaded(true); - }, 500); }, []); useEffect(() => { @@ -156,7 +152,7 @@ const AvailablePage = () => { /> - {isLoaded && cabinets ? ( + {Object.keys(cabinets).length ? ( Object.entries(cabinets).map(([key, value]) => ( Date: Tue, 20 Aug 2024 14:03:57 +0900 Subject: [PATCH 108/132] [BE] local 42auth key refresh --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index d72c8b1fb..a417381bd 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit d72c8b1fb948031bd8084f72dc42c713f16d2152 +Subproject commit a417381bdc111983aaab13ad25fcce20bee8b646 From 37b3c9b98f4e0adca1fbc4a9a2d4a6e0db2ccdf6 Mon Sep 17 00:00:00 2001 From: chyo1 Date: Tue, 20 Aug 2024 14:08:24 +0900 Subject: [PATCH 109/132] [BE] FIX: local config fix --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index a417381bd..f185aa6c7 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit a417381bdc111983aaab13ad25fcce20bee8b646 +Subproject commit f185aa6c734e4c7f8dd672610802e25c5c4f8d3e From 47a35ef199347451527d49d70c0118b3f8566ea1 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Tue, 20 Aug 2024 15:22:51 +0900 Subject: [PATCH 110/132] =?UTF-8?q?[FE]=20FIX:=20UserCabinetInfoArea.tsx?= =?UTF-8?q?=EC=97=90=EC=84=9C=20font=20color=20=EA=B0=92=20=EB=AC=B8?= =?UTF-8?q?=EB=B2=95=EC=A0=81=20=EC=97=90=EB=9F=AC=20=ED=95=B4=EA=B2=B0=20?= =?UTF-8?q?#1677?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config | 2 +- .../components/UserCabinetInfoArea/UserCabinetInfoArea.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index d72c8b1fb..f185aa6c7 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit d72c8b1fb948031bd8084f72dc42c713f16d2152 +Subproject commit f185aa6c734e4c7f8dd672610802e25c5c4f8d3e diff --git a/frontend/src/Cabinet/components/UserCabinetInfoArea/UserCabinetInfoArea.tsx b/frontend/src/Cabinet/components/UserCabinetInfoArea/UserCabinetInfoArea.tsx index 67840970f..10071a05d 100644 --- a/frontend/src/Cabinet/components/UserCabinetInfoArea/UserCabinetInfoArea.tsx +++ b/frontend/src/Cabinet/components/UserCabinetInfoArea/UserCabinetInfoArea.tsx @@ -59,7 +59,7 @@ const UserCabinetInfoArea: React.FC<{ - + {selectedUserInfo.name} From fb876b19eae8d01ab2fe13de03f2bb82c7174b9e Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Tue, 20 Aug 2024 15:41:57 +0900 Subject: [PATCH 111/132] =?UTF-8?q?[FE]=20FIX:=20z-index=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C=ED=95=B4=EC=84=9C=20=ED=8F=AC=EC=9D=B8=ED=8A=B8=20?= =?UTF-8?q?=EC=BB=AC=EB=9F=AC=20=EC=B9=B4=EB=93=9C=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EC=83=89=20=EC=84=A0=ED=83=9D=ED=96=88=EC=9D=84=EB=95=8C=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=20=EC=8A=A4=ED=83=80=EC=9D=BC=20=EC=B9=B4?= =?UTF-8?q?=EB=93=9C=EB=8F=84=20=EA=B7=B8=EB=A6=BC=EC=9E=90=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9#1682?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Card/DisplayStyleCard/DisplayStyleCard.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/src/Cabinet/components/Card/DisplayStyleCard/DisplayStyleCard.tsx b/frontend/src/Cabinet/components/Card/DisplayStyleCard/DisplayStyleCard.tsx index f24601027..59685d886 100644 --- a/frontend/src/Cabinet/components/Card/DisplayStyleCard/DisplayStyleCard.tsx +++ b/frontend/src/Cabinet/components/Card/DisplayStyleCard/DisplayStyleCard.tsx @@ -75,7 +75,6 @@ const DisplayStyleCard = ({ }; const DisplayStyleCardWrapper = styled.div` - z-index: 1; align-self: start; `; From 4b6ddf458861cdb2bbaf2c0440015adbecd30633 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Tue, 20 Aug 2024 15:49:24 +0900 Subject: [PATCH 112/132] =?UTF-8?q?[FE]=20REMOVE:=20=ED=94=84=EB=A1=9C?= =?UTF-8?q?=ED=95=84=20=EC=97=B0=EC=9E=A5=EA=B6=8C=20=EC=B9=B4=EB=93=9C=20?= =?UTF-8?q?=EA=B4=80=EB=A0=A8=20=ED=8C=8C=EC=9D=BC=20=EC=82=AD=EC=A0=9C#16?= =?UTF-8?q?82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ExtensionCard/ExtensionCard.container.tsx | 76 ------------------- .../Card/ExtensionCard/ExtensionCard.tsx | 63 --------------- 2 files changed, 139 deletions(-) delete mode 100644 frontend/src/Cabinet/components/Card/ExtensionCard/ExtensionCard.container.tsx delete mode 100644 frontend/src/Cabinet/components/Card/ExtensionCard/ExtensionCard.tsx diff --git a/frontend/src/Cabinet/components/Card/ExtensionCard/ExtensionCard.container.tsx b/frontend/src/Cabinet/components/Card/ExtensionCard/ExtensionCard.container.tsx deleted file mode 100644 index 18958f830..000000000 --- a/frontend/src/Cabinet/components/Card/ExtensionCard/ExtensionCard.container.tsx +++ /dev/null @@ -1,76 +0,0 @@ -import { useRecoilState, useSetRecoilState } from "recoil"; -import { - currentCabinetIdState, - myCabinetInfoState, - targetCabinetInfoState, - userState, -} from "@/Cabinet/recoil/atoms"; -import ExtensionCard from "@/Cabinet/components/Card/ExtensionCard/ExtensionCard"; -import { CabinetInfo } from "@/Cabinet/types/dto/cabinet.dto"; -import { LentDto, LentExtensionDto } from "@/Cabinet/types/dto/lent.dto"; -import { axiosCabinetById } from "@/Cabinet/api/axios/axios.custom"; -import useMenu from "@/Cabinet/hooks/useMenu"; - -const ExtensionCardContainer = ({ - extensionInfo, -}: { - extensionInfo: LentExtensionDto | null; -}) => { - const { toggleCabinet, openCabinet, closeAll } = useMenu(); - const [myInfo, setMyInfo] = useRecoilState(userState); - const [currentCabinetId, setCurrentCabinetId] = useRecoilState( - currentCabinetIdState - ); - const [myCabinetInfo, setMyCabinetInfo] = useRecoilState(myCabinetInfoState); - const setTargetCabinetInfo = useSetRecoilState( - targetCabinetInfoState - ); - async function setTargetCabinetInfoToMyCabinet() { - setCurrentCabinetId(myInfo.cabinetId); - setMyInfo((prev) => ({ ...prev, cabinetId: null })); - try { - if (!myCabinetInfo?.cabinetId) return; - const { data } = await axiosCabinetById(myCabinetInfo.cabinetId); - if (data.lents.length === 0 && myInfo.cabinetId !== null) { - setMyInfo((prev) => ({ ...prev, cabinetId: null })); - } else { - const doesNameExist = data.lents.some( - (lent: LentDto) => lent.name === myInfo.name - ); - if (doesNameExist) { - setTargetCabinetInfo(data); - setCurrentCabinetId(data.cabinetId); - setMyInfo((prev) => ({ ...prev, cabinetId: data.cabinetId })); - } - } - } catch (error) { - console.log(error); - } - } - const clickMyCabinet = () => { - if (!!extensionInfo && !!myInfo.cabinetId) { - if (myInfo.cabinetId === null && !myCabinetInfo?.cabinetId) { - setTargetCabinetInfoToMyCabinet(); - toggleCabinet(); - } else if (currentCabinetId !== myInfo.cabinetId) { - setTargetCabinetInfoToMyCabinet(); - openCabinet(); - } else { - toggleCabinet(); - } - } - }; - return ( - clickMyCabinet(), - isClickable: !!extensionInfo && !!myInfo.cabinetId, - isExtensible: !!extensionInfo, - }} - /> - ); -}; - -export default ExtensionCardContainer; diff --git a/frontend/src/Cabinet/components/Card/ExtensionCard/ExtensionCard.tsx b/frontend/src/Cabinet/components/Card/ExtensionCard/ExtensionCard.tsx deleted file mode 100644 index e35446a69..000000000 --- a/frontend/src/Cabinet/components/Card/ExtensionCard/ExtensionCard.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import { useState } from "react"; -import Card, { IButtonProps } from "@/Cabinet/components/Card/Card"; -import { - CardContentStyled, - CardContentWrapper, - ContentDetailStyled, - ContentInfoStyled, -} from "@/Cabinet/components/Card/CardStyles"; -import { NotificationModal } from "@/Cabinet/components/Modals/NotificationModal/NotificationModal"; -import { LentExtensionDto } from "@/Cabinet/types/dto/lent.dto"; -import { formatDate } from "@/Cabinet/utils/dateUtils"; - -interface ExtensionProps { - extensionInfo: LentExtensionDto | null; - button: IButtonProps; -} - -const NotificationModalDetail = `연장권은 매월 2일 제공되며,
이전에 받은 연장권은 사용이 불가능 합니다.
24HANE 기준 160시간을 출석한 경우,
연장권이 부여됩니다.`; - -const ExtensionCard = ({ extensionInfo, button }: ExtensionProps) => { - const [showNotificationModal, setShowNotificationModal] = - useState(false); - return ( - <> - { - setShowNotificationModal(true); - }} - gridArea={"extension"} - width={"350px"} - height={"183px"} - buttons={[button]} - > - - - 사용 기한 - - {!!extensionInfo - ? formatDate(new Date(extensionInfo.expiredAt), ".", 4, 2, 2) - : "-"} - - - - 연장 기간 - - {!!extensionInfo ? extensionInfo.extensionPeriod + "일" : "-"} - - - - - {showNotificationModal && ( - setShowNotificationModal(false)} - /> - )} - - ); -}; - -export default ExtensionCard; From 92a5c3110d85f168a02b3a6995107d13885b581e Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Tue, 20 Aug 2024 16:04:18 +0900 Subject: [PATCH 113/132] =?UTF-8?q?[FE]=20FIX:=20=EA=B3=B5=EC=9C=A0?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=ED=81=B4=EB=A6=AD=ED=96=88=EC=9D=84?= =?UTF-8?q?=EB=95=8C=20debounce=20=ED=95=A8=EC=88=98=20=ED=98=B8=EC=B6=9C?= =?UTF-8?q?=EC=8B=9C=20key=20=EC=9D=B4=EB=A6=84=EC=97=90=EC=84=9C=20time?= =?UTF-8?q?=20=EB=82=B4=EC=9A=A9=20=EC=82=AD=EC=A0=9C#1677?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/CabinetInfoArea/CountTime/CodeAndTime.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/Cabinet/components/CabinetInfoArea/CountTime/CodeAndTime.tsx b/frontend/src/Cabinet/components/CabinetInfoArea/CountTime/CodeAndTime.tsx index 1984630d3..5535b3852 100644 --- a/frontend/src/Cabinet/components/CabinetInfoArea/CountTime/CodeAndTime.tsx +++ b/frontend/src/Cabinet/components/CabinetInfoArea/CountTime/CodeAndTime.tsx @@ -24,7 +24,7 @@ const CodeAndTime = ({ minutes, seconds, isTimeOver }: CountTimeProps) => { navigator.clipboard.writeText(code).then(() => { setCopySuccess(true); debounce( - "codeAndTimeCopyClick", + "codeCopyClick", () => { setCopySuccess(false); }, From 048e6c9454963b9e3d97fc9fa24c0e8b9b989349 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Wed, 4 Sep 2024 15:00:05 +0900 Subject: [PATCH 114/132] =?UTF-8?q?[FE]=20REFACT:=20getClubInfo=EC=99=80?= =?UTF-8?q?=20clickMoreButton=EC=9D=98=20=EC=A4=91=EB=B3=B5=EB=90=9C=20set?= =?UTF-8?q?Timeout=20clickMoreButton=EC=97=90=EC=84=9C=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0#1677?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config | 2 +- .../Club/ClubMemberList/ClubMemberList.container.tsx | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/config b/config index f185aa6c7..dd72d80cc 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit f185aa6c734e4c7f8dd672610802e25c5c4f8d3e +Subproject commit dd72d80cce8800e34f3938f3da0dfeb4ef9eb8eb diff --git a/frontend/src/Cabinet/components/Club/ClubMemberList/ClubMemberList.container.tsx b/frontend/src/Cabinet/components/Club/ClubMemberList/ClubMemberList.container.tsx index aa08a10c2..1e5e24317 100644 --- a/frontend/src/Cabinet/components/Club/ClubMemberList/ClubMemberList.container.tsx +++ b/frontend/src/Cabinet/components/Club/ClubMemberList/ClubMemberList.container.tsx @@ -6,7 +6,6 @@ import { ClubInfoResponseDto, ClubUserResponseDto, } from "@/Cabinet/types/dto/club.dto"; -import useDebounce from "@/Cabinet/hooks/useDebounce"; import useMenu from "@/Cabinet/hooks/useMenu"; export type TClubMemberModalState = "addModal"; @@ -37,17 +36,10 @@ const ClubMemberListContainer = ({ const [targetClubUser, setTargetClubUser] = useRecoilState( targetClubUserInfoState ); - const { debounce } = useDebounce(); const clickMoreButton = () => { setIsLoading(true); - debounce( - "clubMemberList", - () => { - setPage(page + 1); - }, - 100 - ); + setPage(page + 1); }; const selectClubMemberOnClick = (member: ClubUserResponseDto) => { From 9027033d841617c68de8ed50589923e48926edef Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Fri, 6 Sep 2024 09:26:53 +0900 Subject: [PATCH 115/132] =?UTF-8?q?[FE]=20FIX:=20=EB=A9=A4=EB=B2=84=20?= =?UTF-8?q?=EB=8D=94=EB=B3=B4=EA=B8=B0=20=EB=B2=84=ED=8A=BC=20=ED=81=B4?= =?UTF-8?q?=EB=A6=AD=EC=8B=9C=20page=20=EB=B3=80=EA=B2=BD=ED=95=98?= =?UTF-8?q?=EB=8A=94=20=EB=B6=80=EB=B6=84=EC=97=90=20debounce=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9#1677?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Club/ClubMemberList/ClubMemberList.container.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/frontend/src/Cabinet/components/Club/ClubMemberList/ClubMemberList.container.tsx b/frontend/src/Cabinet/components/Club/ClubMemberList/ClubMemberList.container.tsx index 1e5e24317..44c6344cd 100644 --- a/frontend/src/Cabinet/components/Club/ClubMemberList/ClubMemberList.container.tsx +++ b/frontend/src/Cabinet/components/Club/ClubMemberList/ClubMemberList.container.tsx @@ -6,6 +6,7 @@ import { ClubInfoResponseDto, ClubUserResponseDto, } from "@/Cabinet/types/dto/club.dto"; +import useDebounce from "@/Cabinet/hooks/useDebounce"; import useMenu from "@/Cabinet/hooks/useMenu"; export type TClubMemberModalState = "addModal"; @@ -27,7 +28,6 @@ const ClubMemberListContainer = ({ }: ClubMemberListContainerProps) => { const [moreButton, setMoreButton] = useState(true); const [members, setMembers] = useState([]); - // const [sortMembers, setSortMembers] = useState([]); const [clubModal, setClubModal] = useState({ addModal: false, }); @@ -36,10 +36,16 @@ const ClubMemberListContainer = ({ const [targetClubUser, setTargetClubUser] = useRecoilState( targetClubUserInfoState ); - + const { debounce } = useDebounce(); const clickMoreButton = () => { setIsLoading(true); - setPage(page + 1); + debounce( + "clubMemberList", + () => { + setPage(page + 1); + }, + 300 + ); }; const selectClubMemberOnClick = (member: ClubUserResponseDto) => { From 43debf7ed2cc53f7ad426041d2e2c49e67aae8ef Mon Sep 17 00:00:00 2001 From: chyo1 Date: Fri, 13 Sep 2024 15:04:43 +0900 Subject: [PATCH 116/132] =?UTF-8?q?[BE]=20fcm=20=ED=85=8C=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=EB=A5=BC=20=EC=9C=84=ED=95=9C=20dev=20=ED=99=98?= =?UTF-8?q?=EA=B2=BD=20=EC=84=A4=EC=A0=95=20=EC=9E=84=EC=8B=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/ftclub/cabinet/alarm/config/AlarmProperties.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/alarm/config/AlarmProperties.java b/backend/src/main/java/org/ftclub/cabinet/alarm/config/AlarmProperties.java index 556f30571..60bbc6692 100644 --- a/backend/src/main/java/org/ftclub/cabinet/alarm/config/AlarmProperties.java +++ b/backend/src/main/java/org/ftclub/cabinet/alarm/config/AlarmProperties.java @@ -8,8 +8,8 @@ @Getter public class AlarmProperties { - @Value("${cabinet.production}") - private Boolean isProduction; +// @Value("${cabinet.production}") + private Boolean isProduction = true; /*===================== lentSuccess =========================*/ @Value("${cabinet.alarm.mail.lentSuccess.subject}") From 5c6848138a664c7bbb92f2ad6d72c4c8f2e26b4e Mon Sep 17 00:00:00 2001 From: chyo1 Date: Fri, 13 Sep 2024 16:00:07 +0900 Subject: [PATCH 117/132] =?UTF-8?q?[BE]=20fcm=20=ED=85=8C=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=EB=A5=BC=20=EC=9C=84=ED=95=9C=20dev=20=ED=99=98?= =?UTF-8?q?=EA=B2=BD=20=EC=84=A4=EC=A0=95=20=EB=B3=80=EA=B2=BD=20=ED=9B=84?= =?UTF-8?q?=20=EC=9B=90=EC=83=81=EB=B3=B5=EA=B5=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/ftclub/cabinet/alarm/config/AlarmProperties.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/alarm/config/AlarmProperties.java b/backend/src/main/java/org/ftclub/cabinet/alarm/config/AlarmProperties.java index 60bbc6692..556f30571 100644 --- a/backend/src/main/java/org/ftclub/cabinet/alarm/config/AlarmProperties.java +++ b/backend/src/main/java/org/ftclub/cabinet/alarm/config/AlarmProperties.java @@ -8,8 +8,8 @@ @Getter public class AlarmProperties { -// @Value("${cabinet.production}") - private Boolean isProduction = true; + @Value("${cabinet.production}") + private Boolean isProduction; /*===================== lentSuccess =========================*/ @Value("${cabinet.alarm.mail.lentSuccess.subject}") From 5276f4fa080309212ddff958737c46ab668d2989 Mon Sep 17 00:00:00 2001 From: JunSeong Date: Tue, 24 Sep 2024 16:57:27 +0900 Subject: [PATCH 118/132] =?UTF-8?q?[FE]=20BUG:=20=EB=AA=A8=EB=8B=AC?= =?UTF-8?q?=EC=97=90=EC=84=9C=20=EB=A7=81=ED=81=AC=EB=A1=9C=20=EC=9D=B4?= =?UTF-8?q?=EB=8F=99=20=EC=8B=9C=20=EB=AA=A8=EB=93=A0=20=EC=B0=BD=EC=9D=84?= =?UTF-8?q?=20=EB=8B=AB=EB=8F=84=EB=A1=9D=20closeAll=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?=20#1668?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/components/Modals/Modal.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/Cabinet/components/Modals/Modal.tsx b/frontend/src/Cabinet/components/Modals/Modal.tsx index a854f03a8..545b606bb 100644 --- a/frontend/src/Cabinet/components/Modals/Modal.tsx +++ b/frontend/src/Cabinet/components/Modals/Modal.tsx @@ -6,6 +6,7 @@ import Button from "@/Cabinet/components/Common/Button"; import { ReactComponent as CheckIcon } from "@/Cabinet/assets/images/checkIcon.svg"; import { ReactComponent as ErrorIcon } from "@/Cabinet/assets/images/errorIcon.svg"; import { ReactComponent as NotificationIcon } from "@/Cabinet/assets/images/notificationSign.svg"; +import useMenu from "@/Cabinet/hooks/useMenu"; import useMultiSelect from "@/Cabinet/hooks/useMultiSelect"; /** @@ -63,6 +64,7 @@ const Modal: React.FC<{ modalContents: IModalContents }> = (props) => { } = props.modalContents; const { isMultiSelect, closeMultiSelectMode } = useMultiSelect(); const navigator = useNavigate(); + const { closeAll } = useMenu(); return ( <> @@ -127,6 +129,7 @@ const Modal: React.FC<{ modalContents: IModalContents }> = (props) => { {url && urlTitle && ( { + closeAll(); navigator(url); }} > From 9720bc6f2ac4fb8b9b80feb6d271b5848e9497fd Mon Sep 17 00:00:00 2001 From: jimchoi9 <146968639+jimchoi9@users.noreply.github.com> Date: Tue, 8 Oct 2024 14:52:24 +0900 Subject: [PATCH 119/132] =?UTF-8?q?[FE]=20FEAT:=20MAIN=ED=99=94=EB=A9=B4?= =?UTF-8?q?=20=EC=9E=AC=ED=99=94=20=EC=86=8C=EA=B0=9C=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?#1681=20(#1686)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [FE] FEAT: main layout 설정 #1681 * [FE] FEAT: coinDolar.svg 아이콘 추가 #1681 * Co-authored-by: Gyeong A Koh * FE] FEAT: ManualModal 동전 사용법 모달 수정 #1681 * [FE] FEAT: main ui 티켓 디자인 v1 #1681 * FE] FEAT: ManualModal 아이템 내용추가 #1681 * [FE] FEAT: CSS clip-path 를 사용해 STORE MandualContentBox 생성 #1681 * [FE] FIX: ManualContentBox 의 CSS 모듈화 #1681 * [FE] FIX: ManualContentBox 의 CSS Map 생성 #1681 * [FE] FIX: CSS Map 을 사용해 ManualContentBoxStyled 간소화 #1681 * [FE] FEAT: 티켓 이미지 그림자 적용 #1681 * [FE] FEAT: ManualModal 아이콘 호버 효과 적용 #1681 * [FE] FEAT: 티켓 이미지 반응형 적용 #1681 * [FE] FEAT: coin manual color 적용 #1681 * [FE] FEAT: ItemContentsStyled width 수정 #1681 * [FE] FEAT: new! #1681 * [FE] FEAT: 아이콘 resizing #1681 * [FE] DOCS: 바뀐 정책에 따라 슬랙 알림 연체 문구 수정#1681 * [FE] DOCS: 슬랙 알림 문구 볼드체 적용되게 띄어쓰기 #1681 * [FE] FEAT: 사물함 대여 모달에 연체주의사항 문구 추가 #1681 * [FE] FEAT: 사물함 대여 모달에 연체주의사항 문구 띄어쓰기 수정 #1681 * [FE] FEAT: 불필요한 파일 및 코드 삭제, storeItems 배열을 manualItemsData 객체로 수정 및 적용 #1681 * [FE] FIX: ManualModal 아이템 아이콘 그림자 잘림 해결, 오타 수정 #1681 * [FE] FEAT: 사용 안하는 css 제거 #1681 --------- Co-authored-by: Minkyu01 Co-authored-by: gykoh42 Co-authored-by: jiminChoi Co-authored-by: jusohn Eddie Sohn Co-authored-by: jnkeniaem --- config | 2 +- .../src/Cabinet/assets/data/ManualContent.ts | 113 +++++++++++++++++ .../src/Cabinet/assets/data/SlackAlarm.ts | 10 +- frontend/src/Cabinet/assets/data/maps.ts | 24 +++- .../src/Cabinet/assets/images/coinDolar.svg | 5 + .../src/Cabinet/assets/images/storeAlarm.svg | 6 +- .../Cabinet/assets/images/storeExtension.svg | 10 +- .../src/Cabinet/assets/images/storeMove.svg | 12 +- .../Cabinet/assets/images/storePenalty.svg | 8 +- .../Card/StoreItemCard/StoreItemCard.tsx | 2 - .../components/Home/ManualContentBox.tsx | 91 ++++++-------- .../components/Home/ManualContentBoxStyles.ts | 97 ++++++++++++++ .../Cabinet/components/Home/ServiceManual.tsx | 68 +++++----- .../components/Modals/LentModal/LentModal.tsx | 8 +- .../Modals/ManualModal/ManualModal.tsx | 118 +++++++++++++++--- .../Store/Inventory/InventoryItem.tsx | 3 +- .../Store/ItemUsageLog/ItemLogBlock.tsx | 9 +- .../Cabinet/types/enum/content.status.enum.ts | 2 + 18 files changed, 449 insertions(+), 139 deletions(-) create mode 100644 frontend/src/Cabinet/assets/images/coinDolar.svg create mode 100644 frontend/src/Cabinet/components/Home/ManualContentBoxStyles.ts diff --git a/config b/config index dd72d80cc..93674bce3 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit dd72d80cce8800e34f3938f3da0dfeb4ef9eb8eb +Subproject commit 93674bce354efe9ad8fb3a7a934bdbf5acd1d162 diff --git a/frontend/src/Cabinet/assets/data/ManualContent.ts b/frontend/src/Cabinet/assets/data/ManualContent.ts index 7e92e6370..8b39bebca 100644 --- a/frontend/src/Cabinet/assets/data/ManualContent.ts +++ b/frontend/src/Cabinet/assets/data/ManualContent.ts @@ -1,9 +1,13 @@ +import { ItemIconMap } from "@/Cabinet/assets/data/maps"; import { ReactComponent as ClockImg } from "@/Cabinet/assets/images/clock.svg"; import { ReactComponent as ClubIcon } from "@/Cabinet/assets/images/clubIcon.svg"; +import { ReactComponent as DollarImg } from "@/Cabinet/assets/images/coinDolar.svg"; import { ReactComponent as ExtensionIcon } from "@/Cabinet/assets/images/extension.svg"; import { ReactComponent as PrivateIcon } from "@/Cabinet/assets/images/privateIcon.svg"; import { ReactComponent as ShareIcon } from "@/Cabinet/assets/images/shareIcon.svg"; +import { ReactComponent as StoreImg } from "@/Cabinet/assets/images/storeIconGray.svg"; import ContentStatus from "@/Cabinet/types/enum/content.status.enum"; +import { StoreItemType } from "@/Cabinet/types/enum/store.enum"; interface ContentStatusData { contentTitle: string; @@ -15,6 +19,12 @@ interface ContentStatusData { pointColor: string; } +interface ItemStatusData { + icon: React.FunctionComponent>; + title: string; + content: string; +} + export const manualContentData: Record = { [ContentStatus.PRIVATE]: { contentTitle: "개인 사물함", @@ -153,4 +163,107 @@ export const manualContentData: Record = { `, pointColor: "var(--normal-text-color)", }, + [ContentStatus.COIN]: { + contentTitle: `코인 사용법`, + iconComponent: DollarImg, + background: "var(--card-bg-color)", + contentText: `◦ 160시간 출석하기
+
+ 42 출석 160시간을 채운다면 다음달 2일에 2000까비가 지급됩니다.
+
+
+ ◦ 동전줍기
+
+ Cabi 홈페이지에 접속해, 하루에 한 번 동전을 주울 수 있습니다.
+ 한 달 동안 20개의 코인을 모두 줍는다면 랜덤 보상이 주어집니다.
+
+
+ ◦ 수요지식회 발표하기
+
+ 수요지식회 발표자 분께 1000까비를 지급해 드립니다.
+ 수요지식회 신청은 왼쪽 상단의수요지식회 홈페이지에서 신청할 수 있습니다.
+
+ + `, + pointColor: "var(--sys-default-main-color)", + }, + [ContentStatus.STORE]: { + contentTitle: "까비 상점 OPEN!", + iconComponent: StoreImg, + background: + "linear-gradient(to bottom, var(--ref-purple-400), var(--ref-purple-600))", + contentText: ` + `, + pointColor: "var(--white-text-with-bg-color)", + }, +}; + +export const manualItemsData: Record = { + [StoreItemType.EXTENSION]: { + icon: ItemIconMap.EXTENSION, + title: "연장권", + content: ` + store 탭을 눌러 연장권 구매하기 버튼을 클릭 후 3일, 15일, 31일 단위로 구매할 수 있습니다.
+ 구매한 아이템은 인벤토리 탭에서 확인할 수 있습니다.
+
+ ◦ 사용방법
+
+ 사물함을 대여한 상태로, 상단 오른쪽의 상자 아이콘을 누르면 현재 자신의 사물함의 정보를 볼 수 있습니다.
+ 연장권 사용하기 버튼을 눌러 보유한 연장권 중 원하는 타입을 선택 후 사용합니다.
+ 이미 사용한 연장권은 취소할 수 없습니다.
+ 공유사물함의 모든 인원이 연장권을 사용할 수 있지만, 남은 인원이 한 명인 경우 연장권을 사용할 수 없습니다. +
+ `, + }, + [StoreItemType.SWAP]: { + icon: ItemIconMap.SWAP, + title: "이사권", + content: ` + + 기존 일주일에 한 번 가능했던 이사하기 기능을 제한 없이 자유롭게 사용할 수 있습니다.
+ 현재 이용중인 사물함의 대여 기간을 유지한 채 다른 사물함으로 이사할 수 있습니다.
+ store 탭에서 구매할 수 있으며, 인벤토리 탭에서 구매한 아이템을 확인할 수 있습니다. +
+ ◦ 사용방법
+
+ 개인 사물함을 이용중인 사용자만 이사권을 사용할 수 있습니다.
+ 아이템을 보유한 상태로 비어있는 개인 사물함을 눌렀을 때 이사하기 버튼이 활성화됩니다.
+ 이미 사용한 이사권은 취소할 수 없습니다.
+ +
+ `, + }, + [StoreItemType.ALARM]: { + icon: ItemIconMap.ALARM, + title: "알림 등록권", + content: ` + 내가 원하는 섹션에 빈 자리가 나온다면 알림을 받을 수 있습니다.
+ 개인사물함에 대해서만 알림을 받을 수 있습니다.
+ store 탭에서 구매할 수 있으며, 인벤토리 탭에서 구매한 아이템을 확인할 수 있습니다.
+
+ ◦ 사용방법
+
+ 아이템 구매 후 원하는 섹션으로 이동해 우측 상단의 하트 아이콘을 클릭합니다.
+ 사용한 알림 등록권은 섹션을 변경하거나 취소할 수 없습니다.
+ 알림등록권은 1회 알림 후 소멸됩니다. +
+ + `, + }, + [StoreItemType.PENALTY]: { + icon: ItemIconMap.PENALTY, + title: "페널티 감면권", + content: ` + 페널티 감면권은 7일, 15일, 31일 단위로 구매할 수 있습니다.
+ 구매한 아이템은 인벤토리 탭에서 확인할 수 있습니다.
+
+ ◦ 사용방법
+
+ 사물함 대여 불가 페널티가 부과된 유저라면 Profile 탭을 눌러 대여정보 상자 상단의
+ 페널티 감면권 사용하기 버튼이 활성화됩니다.
+ 버튼을 눌러 내가 보유한 페널티 감면권을 선택하면, 남은 페널티 기간을 확인하실 수 있습니다.
+ 연체된 사물함을 아직 반납하지 않았다면, 우선 반납하기 버튼을 눌러야 사용 버튼이 활성화됩니다. +
+ `, + }, }; diff --git a/frontend/src/Cabinet/assets/data/SlackAlarm.ts b/frontend/src/Cabinet/assets/data/SlackAlarm.ts index 514b7e654..3def9e28e 100644 --- a/frontend/src/Cabinet/assets/data/SlackAlarm.ts +++ b/frontend/src/Cabinet/assets/data/SlackAlarm.ts @@ -27,7 +27,7 @@ export const SlackAlarmTemplates: ISlackAlarmTemplate[] = [ :happy_ccabi: 안녕하세요. Cabi 팀입니다! :happy_ccabi: :sad_ccabi: 서비스 개선을 위해, 서버를 점검하게 되었습니다. :sad_ccabi: :file_cabinet: 서비스 개선과 관련한 사항은 Cabi 채널 에서, :file_cabinet: -:hammer_and_wrench: 보관물 관련 사항은 *데스크에 직접 문의*해주세요! :hammer_and_wrench: +:hammer_and_wrench: 보관물 관련 사항은 *데스크에 직접 문의* 해주세요! :hammer_and_wrench: 점검 일자 : 2024년 04월 02일 (화요일) 점검 시간 : 15시 10분 ~ 완료 공지 시점까지 @@ -179,9 +179,9 @@ export const SlackAlarmTemplates: ISlackAlarmTemplate[] = [ { title: "연체", content: `[CABI] 안녕하세요! :embarrassed_cabi: -현재 이용 중이신 사물함이 연체인 것으로 확인되어 연락드립니다. -장기간 연체시 서비스 이용에 대한 페널티, 혹은 :tig:가 부여될 수 있음을 인지해주세요! -사물함의 대여 기간을 확인하신 후 반납 부탁드립니다. -항상 저희 서비스를 이용해 주셔서 감사합니다:)`, + 현재 이용 중이신 사물함이 *연체* 된 것으로 확인되어 연락드립니다. + *3주(21일) 이상 연체 시 미회수된 개인 물품은 폐기될 수 있음을 인지해 주세요!* + 사물함의 대여 기간을 확인하신 후 반납 부탁드립니다. + 항상 저희 서비스를 이용해 주셔서 감사합니다:)`, }, ]; diff --git a/frontend/src/Cabinet/assets/data/maps.ts b/frontend/src/Cabinet/assets/data/maps.ts index 8706697ba..a1bfdfc83 100644 --- a/frontend/src/Cabinet/assets/data/maps.ts +++ b/frontend/src/Cabinet/assets/data/maps.ts @@ -1,5 +1,13 @@ +import { css } from "styled-components"; +import { + coinBoxStyles, + extensionBoxStyles, + inSessionBoxStyles, + pendingBoxStyles, + storeBoxStyles, +} from "@/Cabinet/components/Home/ManualContentBoxStyles"; import { ReactComponent as ClubIcon } from "@/Cabinet/assets/images/clubIcon.svg"; -import { ReactComponent as ExtensionImg } from "@/Cabinet/assets/images/extension.svg"; +import { ReactComponent as ExtensionImg } from "@/Cabinet/assets/images/storeExtension.svg"; import { ReactComponent as PrivateIcon } from "@/Cabinet/assets/images/privateIcon.svg"; import { ReactComponent as ShareIcon } from "@/Cabinet/assets/images/shareIcon.svg"; import { ReactComponent as AlarmImg } from "@/Cabinet/assets/images/storeAlarm.svg"; @@ -7,6 +15,7 @@ import { ReactComponent as SwapImg } from "@/Cabinet/assets/images/storeMove.svg import { ReactComponent as PenaltyImg } from "@/Cabinet/assets/images/storePenalty.svg"; import CabinetStatus from "@/Cabinet/types/enum/cabinet.status.enum"; import CabinetType from "@/Cabinet/types/enum/cabinet.type.enum"; +import ContentStatus from "@/Cabinet/types/enum/content.status.enum"; import { StoreExtensionType, StoreItemType, @@ -267,3 +276,16 @@ export const ItemTypeExtensionMap = { [StoreExtensionType.EXTENSION_15]: "15일", [StoreExtensionType.EXTENSION_31]: "31일", }; + +export const ContentStatusStylesMap: { + [key in ContentStatus]: any; +} = { + [ContentStatus.EXTENSION]: extensionBoxStyles, + [ContentStatus.STORE]: storeBoxStyles, + [ContentStatus.COIN]: coinBoxStyles, + [ContentStatus.PENDING]: pendingBoxStyles, + [ContentStatus.IN_SESSION]: inSessionBoxStyles, + [ContentStatus.PRIVATE]: css``, + [ContentStatus.SHARE]: css``, + [ContentStatus.CLUB]: css``, +}; diff --git a/frontend/src/Cabinet/assets/images/coinDolar.svg b/frontend/src/Cabinet/assets/images/coinDolar.svg new file mode 100644 index 000000000..72f985b8f --- /dev/null +++ b/frontend/src/Cabinet/assets/images/coinDolar.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/frontend/src/Cabinet/assets/images/storeAlarm.svg b/frontend/src/Cabinet/assets/images/storeAlarm.svg index fdec88cdb..deb44a952 100644 --- a/frontend/src/Cabinet/assets/images/storeAlarm.svg +++ b/frontend/src/Cabinet/assets/images/storeAlarm.svg @@ -1,4 +1,4 @@ - - - + + + diff --git a/frontend/src/Cabinet/assets/images/storeExtension.svg b/frontend/src/Cabinet/assets/images/storeExtension.svg index 91c16096c..d97f6f116 100644 --- a/frontend/src/Cabinet/assets/images/storeExtension.svg +++ b/frontend/src/Cabinet/assets/images/storeExtension.svg @@ -1,6 +1,6 @@ - - - - - + + + + + diff --git a/frontend/src/Cabinet/assets/images/storeMove.svg b/frontend/src/Cabinet/assets/images/storeMove.svg index 4500e4867..f87ec2c31 100644 --- a/frontend/src/Cabinet/assets/images/storeMove.svg +++ b/frontend/src/Cabinet/assets/images/storeMove.svg @@ -1,7 +1,7 @@ - - - - - - + + + + + + diff --git a/frontend/src/Cabinet/assets/images/storePenalty.svg b/frontend/src/Cabinet/assets/images/storePenalty.svg index 158760b33..9838cbd18 100644 --- a/frontend/src/Cabinet/assets/images/storePenalty.svg +++ b/frontend/src/Cabinet/assets/images/storePenalty.svg @@ -1,5 +1,5 @@ - - - - + + + + diff --git a/frontend/src/Cabinet/components/Card/StoreItemCard/StoreItemCard.tsx b/frontend/src/Cabinet/components/Card/StoreItemCard/StoreItemCard.tsx index 717e0c2df..17b021574 100644 --- a/frontend/src/Cabinet/components/Card/StoreItemCard/StoreItemCard.tsx +++ b/frontend/src/Cabinet/components/Card/StoreItemCard/StoreItemCard.tsx @@ -137,8 +137,6 @@ const ItemIconStyled = styled.div<{ itemType: StoreItemType }>` & > svg > path { stroke: var(--white-text-with-bg-color); - stroke-width: ${(props) => - props.itemType === StoreItemType.EXTENSION ? "2.8px" : "1.5px"}; } `; diff --git a/frontend/src/Cabinet/components/Home/ManualContentBox.tsx b/frontend/src/Cabinet/components/Home/ManualContentBox.tsx index 5f4885e30..2f973569d 100644 --- a/frontend/src/Cabinet/components/Home/ManualContentBox.tsx +++ b/frontend/src/Cabinet/components/Home/ManualContentBox.tsx @@ -1,18 +1,19 @@ import styled, { css, keyframes } from "styled-components"; import { manualContentData } from "@/Cabinet/assets/data/ManualContent"; +import { ContentStatusStylesMap } from "@/Cabinet/assets/data/maps"; import { ReactComponent as ManualPeopleImg } from "@/Cabinet/assets/images/manualPeople.svg"; import { ReactComponent as MoveBtnImg } from "@/Cabinet/assets/images/moveButton.svg"; import ContentStatus from "@/Cabinet/types/enum/content.status.enum"; -interface MaunalContentBoxProps { +interface ManualContentBoxProps { contentStatus: ContentStatus; } -const MaunalContentBox = ({ contentStatus }: MaunalContentBoxProps) => { +const ManualContentBox = ({ contentStatus }: ManualContentBoxProps) => { const contentData = manualContentData[contentStatus]; return ( - @@ -23,15 +24,13 @@ const MaunalContentBox = ({ contentStatus }: MaunalContentBoxProps) => { contentData.iconComponent && ( )} + - {contentStatus === ContentStatus.IN_SESSION && - contentData.iconComponent && ( - - )}

{contentData.contentTitle}

+ - + ); }; @@ -41,7 +40,7 @@ const Rotation = keyframes` } `; -const MaunalContentBoxStyled = styled.div<{ +const ManualContentBoxStyled = styled.div<{ background: string; contentStatus: ContentStatus; }>` @@ -59,12 +58,14 @@ const MaunalContentBoxStyled = styled.div<{ font-weight: bold; cursor: pointer; + ${(props) => ContentStatusStylesMap[props.contentStatus]} + .clockImg { width: 35px; margin-right: 10px; margin-top: 160px; animation: ${Rotation} 1s linear infinite; - stroke: var(--sys-main-color); + stroke: var(--sys-default-main-color); } .contentImg { @@ -73,8 +74,8 @@ const MaunalContentBoxStyled = styled.div<{ & > path { stroke: ${(props) => - props.contentStatus === ContentStatus.EXTENSION - ? "var(--normal-text-color)" + props.contentStatus === ContentStatus.COIN + ? "var(--sys-default-main-color)" : "var(--white-text-with-bg-color)"}; } } @@ -86,44 +87,17 @@ const MaunalContentBoxStyled = styled.div<{ position: absolute; right: 100px; bottom: 30px; - fill: var(--sys-main-color); + fill: var(--sys-def-main-color); } - ${({ contentStatus }) => - contentStatus === ContentStatus.PENDING && - css` - border: 5px double var(--sys-main-color); - box-shadow: inset 0px 0px 0px 5px var(--bg-color); - `} - - ${({ contentStatus }) => - contentStatus === ContentStatus.IN_SESSION && - css` - border: 5px solid var(--sys-main-color); - color: var(--sys-main-color); - `} - - ${({ contentStatus }) => - contentStatus === ContentStatus.EXTENSION && - css` - width: 900px; - color: var(--normal-text-color); - @media screen and (max-width: 1000px) { - width: 280px; - .peopleImg { - display: none; - } - font-size: 21px; - } - `} - - p { + p { margin-top: 90px; ${({ contentStatus }) => (contentStatus === ContentStatus.PENDING || + contentStatus === ContentStatus.COIN || contentStatus === ContentStatus.IN_SESSION) && css` - margin-top: 160px; + color: var(--sys-default-main-color); `} } @@ -134,34 +108,42 @@ const MaunalContentBoxStyled = styled.div<{ right: 35px; bottom: 35px; stroke: ${(props) => - props.contentStatus === ContentStatus.IN_SESSION - ? "var(--sys-main-color)" + props.contentStatus === ContentStatus.COIN + ? "var(--sys-default-main-color)" : props.contentStatus === ContentStatus.EXTENSION ? "var(--normal-text-color)" : "var(--white-text-with-bg-color)"}; cursor: pointer; } - :hover { + &:hover { transition: all 0.3s ease-in-out; ${({ contentStatus }) => contentStatus === ContentStatus.PENDING ? css` - border: 5px double var(--sys-main-color); - box-shadow: inset 0px 0px 0px 5px var(--bg-color), - 10px 10px 25px 0 var(--left-nav-border-shadow-color); + border: 5px double var(--sys-default-main-color); + box-shadow: inset 0px 0px 0px 5px var(--bg-color); + filter: drop-shadow( + 10px 10px 10px var(--left-nav-border-shadow-color) + ); ` + : contentStatus === ContentStatus.STORE + ? css`` // No box-shadow or filter for STORE status : css` - box-shadow: 10px 10px 25px 0 var(--left-nav-border-shadow-color); + filter: drop-shadow( + 10px 10px 10px var(--left-nav-border-shadow-color) + ); `} + p { transition: all 0.3s ease-in-out; transform: translateY(-5px); ${({ contentStatus }) => (contentStatus === ContentStatus.PENDING || + contentStatus === ContentStatus.COIN || contentStatus === ContentStatus.IN_SESSION) && css` - margin-top: 155px; + color: var(--sys-default-main-color); `} } .clockImg { @@ -174,6 +156,11 @@ const MaunalContentBoxStyled = styled.div<{ const ContentTextStyled = styled.div` display: flex; align-items: center; + + & > span { + font-weight: 400; + font-size: 1rem; + } `; -export default MaunalContentBox; +export default ManualContentBox; diff --git a/frontend/src/Cabinet/components/Home/ManualContentBoxStyles.ts b/frontend/src/Cabinet/components/Home/ManualContentBoxStyles.ts new file mode 100644 index 000000000..99c3489d6 --- /dev/null +++ b/frontend/src/Cabinet/components/Home/ManualContentBoxStyles.ts @@ -0,0 +1,97 @@ +import { css } from "styled-components"; + +export const extensionBoxStyles = css` + width: 900px; + color: var(--normal-text-color); + @media screen and (max-width: 1000px) { + width: 280px; + font-size: 21px; + } +`; + +export const storeBoxStyles = css` + width: 620px; + height: 280px; + position: relative; + background: linear-gradient( + to bottom, + var(--ref-purple-400), + var(--ref-purple-600) + ); + border-radius: 40px; + clip-path: path( + "M 0 163.33 + A 23.33 23.33 1 0 0 0 116.67 + L 0 0 + L 396.56 0 + L 413.354 15.67 + L 430.148 0 + L 620 0 + L 620 280 + L 430.148 280 + L 413.354 264.33 + L 396.56 280 + L 0 280 + Z" + ); + /* Explanation of path: + - M 0 175: Move to (0, 175) + - A 25 25 1 0 0 0 125: Draw an arc with radius 25, starting from (0, 175) to (0, 125) // radius-x, radius-y, x-axis-rotation, large-arc-flag, sweep-flag, x, y + - L 0 0: Draw a line from (0, 125) to (0, 0) + - L 396.56 0: Draw a line from (0, 0) to (396.56, 0) + - L 413.354 16.794: Draw a line from (396.56, 0) to (413.354, 16.794) + - L 430.148 0: Draw a line from (413.354, 16.794) to (430.148, 0) + - L 620 0: Draw a line from (430.148, 0) to (620, 0) + - L 620 300: Draw a line from (620, 0) to (620, 300) + - L 430.148 300: Draw a line from (620, 300) to (430.148, 300) + - L 413.354 283.206: Draw a line from (430.148, 300) to (413.354, 283.206) + - L 396.56 300: Draw a line from (413.354, 283.206) to (396.56, 300) + - L 0 300: Draw a line from (396.56, 300) to (0, 300) + - Z: Close the path + */ + &:after { + content: ""; + position: absolute; + top: 25px; + right: 32.99%; /* 2/3 point */ + height: 100%; + width: 4px; + background-image: linear-gradient( + to bottom, + white 33%, + rgba(255, 255, 255, 0) 0% + ); + background-position: right; + background-size: 10px 30px; + background-repeat: repeat-y; + } + @media screen and (max-width: 1100px) { + width: 280px; + font-size: 21px; + clip-path: none; + + &:after { + display: none; + } + } +`; + +export const coinBoxStyles = css` + border: 5px solid var(--sys-default-main-color); + color: var(--sys-main-color); +`; + +export const pendingBoxStyles = css` + border: 6px double var(--sys-main-color); + box-shadow: inset 0px 0px 0px 5px var(--bg-color); +`; + +export const inSessionBoxStyles = css` + border: 5px solid var(--sys-main-color); + color: var(--sys-main-color); +`; + +export const privateBoxStyles = css` + /* border: 5px solid var(--sys-main-color); + color: var(--sys-main-color); */ +`; diff --git a/frontend/src/Cabinet/components/Home/ServiceManual.tsx b/frontend/src/Cabinet/components/Home/ServiceManual.tsx index 94f766f70..ccf8c876c 100644 --- a/frontend/src/Cabinet/components/Home/ServiceManual.tsx +++ b/frontend/src/Cabinet/components/Home/ServiceManual.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; import styled from "styled-components"; -import MaunalContentBox from "@/Cabinet/components/Home/ManualContentBox"; +import ManualContentBox from "@/Cabinet/components/Home/ManualContentBox"; import ManualModal from "@/Cabinet/components/Modals/ManualModal/ManualModal"; import ContentStatus from "@/Cabinet/types/enum/content.status.enum"; @@ -36,62 +36,53 @@ const ServiceManual = ({

- 가능성의 확장 + 당신의 사물함
- 개인, 공유, 동아리 사물함. + 당신의 방식으로,

+
openModal(ContentStatus.PRIVATE)} - > - -
-
openModal(ContentStatus.SHARE)} - > - -
-
openModal(ContentStatus.CLUB)} + onClick={() => openModal(ContentStatus.COIN)} > - + +

new

+ +
openModal(ContentStatus.STORE)} + > + +

new

+
+
+

- 공정한 대여를 위한 + 가능성의 확장
- 새로운 사물함 서비스. + 개인, 공유, 동아리 사물함.

openModal(ContentStatus.PENDING)} + onClick={() => openModal(ContentStatus.PRIVATE)} > - -

new

+
openModal(ContentStatus.IN_SESSION)} + onClick={() => openModal(ContentStatus.SHARE)} > - -

new

+
-
-

- 사물함을 더 오래 -
- 사용할 수 있는 방법. -

-
openModal(ContentStatus.EXTENSION)} + onClick={() => openModal(ContentStatus.CLUB)} > - +
@@ -107,6 +98,15 @@ const ServiceManual = ({ ); }; +const TicketWrapperStyled = styled.div` + width: 620px; + &:hover { + transition: all 0.3s ease-in-out; + transform: translateY(-5px); + filter: drop-shadow(10px 10px 10px var(--left-nav-border-shadow-color)); + } +`; + const WrapperStyled = styled.div` display: flex; flex-direction: column; diff --git a/frontend/src/Cabinet/components/Modals/LentModal/LentModal.tsx b/frontend/src/Cabinet/components/Modals/LentModal/LentModal.tsx index 614cfaafa..556af4a8e 100644 --- a/frontend/src/Cabinet/components/Modals/LentModal/LentModal.tsx +++ b/frontend/src/Cabinet/components/Modals/LentModal/LentModal.tsx @@ -46,7 +46,9 @@ const LentModal: React.FC<{ const formattedExpireDate = getExpireDateString(props.lentType); const privateLentDetail = `대여기간은 ${formattedExpireDate} 23:59까지 입니다. - 귀중품 분실 및 메모 내용의 유출에 책임지지 않습니다.`; + 귀중품 분실 및 메모 내용의 유출에 책임지지 않습니다. + 3주(21일) 이상 연체 시 사물함은 강제 반납되며 + 미회수된 개인 물품은 폐기될 수 있습니다.`; const shareLentDetail = `대여 후 ${ 10 // import.meta.env.VITE_SHARE_LENT_COUNTDOWN // TODO: .env 에 등록하기 @@ -54,7 +56,9 @@ const LentModal: React.FC<{ 공유 인원 (2인~4인) 이 충족되지 않으면, 공유 사물함의 대여가 취소됩니다. “메모 내용”은 공유 인원끼리 공유됩니다. - 귀중품 분실 및 메모 내용의 유출에 책임지지 않습니다.`; + 귀중품 분실 및 메모 내용의 유출에 책임지지 않습니다. + 3주(21일) 이상 연체 시 사물함은 강제 반납되며 + 미회수된 개인 물품은 폐기될 수 있습니다.`; const tryLentRequest = async (e: React.MouseEvent) => { setIsLoading(true); try { diff --git a/frontend/src/Cabinet/components/Modals/ManualModal/ManualModal.tsx b/frontend/src/Cabinet/components/Modals/ManualModal/ManualModal.tsx index 494d11383..a238f8fb1 100644 --- a/frontend/src/Cabinet/components/Modals/ManualModal/ManualModal.tsx +++ b/frontend/src/Cabinet/components/Modals/ManualModal/ManualModal.tsx @@ -1,9 +1,13 @@ import React from "react"; import { useState } from "react"; import styled, { keyframes } from "styled-components"; -import { manualContentData } from "@/Cabinet/assets/data/ManualContent"; +import { + manualContentData, + manualItemsData, +} from "@/Cabinet/assets/data/ManualContent"; import { ReactComponent as MoveBtnImg } from "@/Cabinet/assets/images/moveButton.svg"; import ContentStatus from "@/Cabinet/types/enum/content.status.enum"; +import { StoreItemType } from "@/Cabinet/types/enum/store.enum"; interface ModalProps { contentStatus: ContentStatus; @@ -15,6 +19,9 @@ const ManualModal: React.FC = ({ setIsModalOpen, }) => { const [modalIsOpen, setModalIsOpen] = useState(true); + const [selectedItem, setSelectedItem] = useState( + StoreItemType.EXTENSION + ); const contentData = manualContentData[contentStatus]; const isCabinetType = @@ -28,6 +35,10 @@ const ManualModal: React.FC = ({ contentStatus === ContentStatus.SHARE || contentStatus === ContentStatus.CLUB; + const handleIconClick = (index: StoreItemType) => { + setSelectedItem(index); + }; + const closeModal = () => { if (modalIsOpen) { setModalIsOpen(false); @@ -76,12 +87,40 @@ const ManualModal: React.FC = ({ )} )} - {contentData.contentTitle} - -
-
+ {contentStatus === ContentStatus.STORE && ( + <> + + {Object.entries(manualItemsData).map(([key, item]) => ( + handleIconClick(key as StoreItemType)} + className={selectedItem === key ? "selected" : ""} + color={contentData.pointColor} + > + + + ))} + + {manualItemsData[selectedItem].title} + +
+
+ + )} + {contentStatus !== ContentStatus.STORE && ( + <> + {contentData.contentTitle} + +
+
+ + )} @@ -144,9 +183,10 @@ const ModalWrapper = styled.div<{ border-radius: 40px 40px 0 0; border: ${(props) => props.contentStatus === ContentStatus.PENDING - ? "5px double var(--sys-main-color)" - : props.contentStatus === ContentStatus.IN_SESSION - ? "5px solid var(--sys-main-color)" + ? "5px double var(--sys-default-main-color)" + : props.contentStatus === ContentStatus.IN_SESSION || + props.contentStatus === ContentStatus.COIN + ? "5px solid var(--sys-default-main-color)" : "none"}; box-shadow: ${(props) => props.contentStatus === ContentStatus.PENDING && @@ -166,8 +206,9 @@ const ModalContent = styled.div<{ display: flex; flex-direction: column; color: ${(props) => - props.contentStatus === ContentStatus.IN_SESSION - ? "var(--sys-main-color)" + props.contentStatus === ContentStatus.IN_SESSION || + props.contentStatus === ContentStatus.COIN + ? "var(--sys-default-main-color)" : props.contentStatus === ContentStatus.EXTENSION ? "var(--normal-text-color)" : "var(--white-text-with-bg-color)"}; @@ -188,8 +229,9 @@ const ModalContent = styled.div<{ } .moveButton { stroke: ${(props) => - props.contentStatus === ContentStatus.IN_SESSION - ? "var(--sys-main-color)" + props.contentStatus === ContentStatus.IN_SESSION || + props.contentStatus === ContentStatus.COIN + ? "var(--sys-default-main-color)" : props.contentStatus === ContentStatus.EXTENSION ? "var(--normal-text-color)" : "var(--white-text-with-bg-color)"}; @@ -210,8 +252,9 @@ const CloseButton = styled.div<{ svg { transform: scaleX(-1); stroke: ${(props) => - props.contentStatus === ContentStatus.IN_SESSION - ? "var(--sys-main-color)" + props.contentStatus === ContentStatus.IN_SESSION || + props.contentStatus === ContentStatus.COIN + ? "var(--sys-default-main-color)" : props.contentStatus === ContentStatus.EXTENSION ? "var(--normal-text-color)" : "var(--bg-color)"}; @@ -269,7 +312,7 @@ const BoxInfo2 = styled.div` } `; -const ManualContentStyeld = styled.div<{ +const ManualContentStyled = styled.div<{ color: string; }>` margin: 40px 0 0 20px; @@ -330,4 +373,45 @@ const ContentImgStyled = styled.div<{ } `; +const ItemContentsStyled = styled.div` + width: 45%; + height: 90px; + display: flex; + margin-bottom: 30px; +`; + +const ItemIconStyled = styled.div<{ + color: string; +}>` + width: 80px; + height: 80px; + margin-right: 10px; + display: flex; + justify-content: center; + align-items: center; + + & > svg { + padding: 4px; + width: 80px; + height: 80px; + cursor: pointer; + stroke-width: 50px; + & > path { + transform: scale(2); + stroke: var(--ref-purple-690); + } + } + + &:hover:not(.selected), + &.selected > svg { + width: 80px; + height: 80px; + filter: drop-shadow(0px 5px 3px var(--hover-box-shadow-color)); + transition: all 0.2s ease; + & > path { + stroke: ${(props) => props.color}; + } + } +`; + export default ManualModal; diff --git a/frontend/src/Cabinet/components/Store/Inventory/InventoryItem.tsx b/frontend/src/Cabinet/components/Store/Inventory/InventoryItem.tsx index e15a09d89..340134de8 100644 --- a/frontend/src/Cabinet/components/Store/Inventory/InventoryItem.tsx +++ b/frontend/src/Cabinet/components/Store/Inventory/InventoryItem.tsx @@ -170,8 +170,7 @@ const ItemIconStyled = styled.div<{ itemType: StoreItemType }>` & > svg > path { stroke: var(--sys-main-color); - stroke-width: ${(props) => - props.itemType === StoreItemType.EXTENSION ? "2.8px" : "1.5px"}; + stroke-width: "1.5px"; } `; diff --git a/frontend/src/Cabinet/components/Store/ItemUsageLog/ItemLogBlock.tsx b/frontend/src/Cabinet/components/Store/ItemUsageLog/ItemLogBlock.tsx index b82eacb00..b6a2fae71 100644 --- a/frontend/src/Cabinet/components/Store/ItemUsageLog/ItemLogBlock.tsx +++ b/frontend/src/Cabinet/components/Store/ItemUsageLog/ItemLogBlock.tsx @@ -50,14 +50,13 @@ const IconBlockStyled = styled.div<{ itemName: string }>` svg { width: 40px; height: 40px; + transform-origin: center; } - & > svg > path { + & > svg > * { + transform: scale(1.25); stroke: var(--white-text-with-bg-color); - stroke-width: ${(props) => - props.itemName === ItemTypeLabelMap[StoreItemType.EXTENSION] - ? "3px" - : "1.5px"}; + stroke-width: "1.5px"; } `; diff --git a/frontend/src/Cabinet/types/enum/content.status.enum.ts b/frontend/src/Cabinet/types/enum/content.status.enum.ts index cb348bd85..535867bca 100644 --- a/frontend/src/Cabinet/types/enum/content.status.enum.ts +++ b/frontend/src/Cabinet/types/enum/content.status.enum.ts @@ -5,6 +5,8 @@ export enum ContentStatus { PENDING = "PENDING", IN_SESSION = "IN_SESSION", EXTENSION = "EXTENSION", + COIN = "COIN", + STORE = "STORE", } export default ContentStatus; From 919b305041b5b36c4c88f25c37320ab85ba841a5 Mon Sep 17 00:00:00 2001 From: chyo1 Date: Tue, 8 Oct 2024 15:02:49 +0900 Subject: [PATCH 120/132] =?UTF-8?q?[BE]=20=EC=9D=B4=EC=9A=A9=20=EC=A0=95?= =?UTF-8?q?=EC=A7=80=20=EC=B5=9C=EB=8C=80=20=EA=B8=B0=ED=95=9C=20180?= =?UTF-8?q?=EC=9D=BC=EB=A1=9C=20=EC=A1=B0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/ftclub/cabinet/user/service/BanPolicyService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/org/ftclub/cabinet/user/service/BanPolicyService.java b/backend/src/main/java/org/ftclub/cabinet/user/service/BanPolicyService.java index f856b75c1..3df7b51f7 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/service/BanPolicyService.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/service/BanPolicyService.java @@ -20,7 +20,7 @@ public BanType verifyBan(LocalDateTime endedAt, LocalDateTime expiredAt) { public LocalDateTime getUnBannedAt(LocalDateTime endedAt, LocalDateTime expiredAt) { long recentBanDays = DateUtil.calculateTwoDateDiffCeil(expiredAt, endedAt); - double squaredBanDays = Math.pow(recentBanDays, 2); + double squaredBanDays = Math.min(Math.pow(recentBanDays, 2), 180); return endedAt.plusDays((long) squaredBanDays); } } From fa05f5cc9e4a6a9ac2f2a40493af4fb3c1fd22c8 Mon Sep 17 00:00:00 2001 From: JunSeong Date: Tue, 8 Oct 2024 16:22:09 +0900 Subject: [PATCH 121/132] =?UTF-8?q?[FE]=20BUG:=20navigate=20=EA=B2=BD?= =?UTF-8?q?=EB=A1=9C=20=EC=88=98=EC=A0=95=20#1688?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/LeftNav/LeftMainNav/LeftMainNav.container.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/Presentation/components/LeftNav/LeftMainNav/LeftMainNav.container.tsx b/frontend/src/Presentation/components/LeftNav/LeftMainNav/LeftMainNav.container.tsx index 367f83995..6bebb4647 100644 --- a/frontend/src/Presentation/components/LeftNav/LeftMainNav/LeftMainNav.container.tsx +++ b/frontend/src/Presentation/components/LeftNav/LeftMainNav/LeftMainNav.container.tsx @@ -30,9 +30,9 @@ const LeftMainNavContainer = ({ isAdmin }: { isAdmin?: boolean }) => { const onClickPresentationDetailButton = () => { if (isAdmin) { - navigator("/presentation/detail"); + navigator("/admin/presentation/detail"); } else { - navigator("detail"); + navigator("/presentation/detail"); } closeAll(); }; From bcf8c5428a7ee2122c3f74d2a33c98282904bb15 Mon Sep 17 00:00:00 2001 From: Jihyun Kim Date: Tue, 8 Oct 2024 21:02:25 +0900 Subject: [PATCH 122/132] =?UTF-8?q?[FE]=20FIX:=20=EB=A1=9C=EB=94=A9=20?= =?UTF-8?q?=EC=95=A0=EB=8B=88=EB=A9=94=EC=9D=B4=EC=85=98=20=EC=9E=91?= =?UTF-8?q?=EB=8F=99=20=EC=8B=9C,=20=EC=8A=A4=ED=81=AC=EB=A1=A4=EB=B0=94?= =?UTF-8?q?=20=EC=A0=9C=EA=B1=B0=ED=95=98=EA=B8=B0=20=EC=9C=84=ED=95=9C=20?= =?UTF-8?q?css=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/components/Common/LoadingAnimation.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/Cabinet/components/Common/LoadingAnimation.tsx b/frontend/src/Cabinet/components/Common/LoadingAnimation.tsx index f0b636b88..c458265fc 100644 --- a/frontend/src/Cabinet/components/Common/LoadingAnimation.tsx +++ b/frontend/src/Cabinet/components/Common/LoadingAnimation.tsx @@ -13,6 +13,7 @@ const LoadingAnimationWrapperStyled = styled.div` width: 100%; height: 100%; display: flex; + overflow-y: hidden; justify-content: center; align-items: center; `; From 1b0744818a5a045c7f6fd76433dee6129d90f004 Mon Sep 17 00:00:00 2001 From: Jihyun Kim Date: Tue, 8 Oct 2024 21:27:40 +0900 Subject: [PATCH 123/132] =?UTF-8?q?[FE]=20FIX:=20=EC=83=88=EB=A1=9C?= =?UTF-8?q?=EA=B3=A0=EC=B9=A8=20=EC=8B=9C=20=EB=82=98=ED=83=80=EB=82=98?= =?UTF-8?q?=EB=8A=94=20=EC=8A=A4=ED=81=AC=EB=A1=A4=EB=B0=94=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0=ED=95=98=EA=B8=B0=20=EC=9C=84=ED=95=9C=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/pages/MainPage.tsx | 119 +++++++++--------- .../src/Cabinet/pages/admin/AdminMainPage.tsx | 73 ++++++----- 2 files changed, 95 insertions(+), 97 deletions(-) diff --git a/frontend/src/Cabinet/pages/MainPage.tsx b/frontend/src/Cabinet/pages/MainPage.tsx index dc73bc107..506e99c1f 100644 --- a/frontend/src/Cabinet/pages/MainPage.tsx +++ b/frontend/src/Cabinet/pages/MainPage.tsx @@ -123,66 +123,65 @@ const MainPage = () => { setIsCurrentSectionRender(false); }; - return ( - <> - {isLoading && } - { - touchStartPosX.current = e.changedTouches[0].screenX; - touchStartPosY.current = e.changedTouches[0].screenY; - }} - onTouchEnd={(e: React.TouchEvent) => { - swipeSection( - e.changedTouches[0].screenX, - e.changedTouches[0].screenY - ); - }} - > - - {currentFloorSectionNames.includes(currentSectionName) && - !isClubSection && ( - - {sectionList[currentSectionIndex]?.alarmRegistered === true ? ( - - ) : ( - - )} - - )} - - - - - {currentSectionName !== SectionType.elevator && - currentSectionName !== SectionType.stairs && ( - - 새로고침 - - )} - - {showSectionAlertModal && ( - - )} - - + return isLoading ? ( + + ) : ( + { + touchStartPosX.current = e.changedTouches[0].screenX; + touchStartPosY.current = e.changedTouches[0].screenY; + }} + onTouchEnd={(e: React.TouchEvent) => { + swipeSection( + e.changedTouches[0].screenX, + e.changedTouches[0].screenY + ); + }} + > + + {currentFloorSectionNames.includes(currentSectionName) && + !isClubSection && ( + + {sectionList[currentSectionIndex]?.alarmRegistered === true ? ( + + ) : ( + + )} + + )} + + + + + {currentSectionName !== SectionType.elevator && + currentSectionName !== SectionType.stairs && ( + + 새로고침 + + )} + + {showSectionAlertModal && ( + + )} + ); }; diff --git a/frontend/src/Cabinet/pages/admin/AdminMainPage.tsx b/frontend/src/Cabinet/pages/admin/AdminMainPage.tsx index de410c157..adc495cb1 100644 --- a/frontend/src/Cabinet/pages/admin/AdminMainPage.tsx +++ b/frontend/src/Cabinet/pages/admin/AdminMainPage.tsx @@ -93,44 +93,43 @@ const AdminMainPage = () => { else moveToRightSection(); }; - return ( - <> - {isLoading && } - { - touchStartPosX.current = e.changedTouches[0].screenX; - touchStartPosY.current = e.changedTouches[0].screenY; - }} - onTouchEnd={(e: React.TouchEvent) => { - swipeSection( - e.changedTouches[0].screenX, - e.changedTouches[0].screenY - ); - }} - > - - - - - - + return isLoading ? ( + + ) : ( + { + touchStartPosX.current = e.changedTouches[0].screenX; + touchStartPosY.current = e.changedTouches[0].screenY; + }} + onTouchEnd={(e: React.TouchEvent) => { + swipeSection( + e.changedTouches[0].screenX, + e.changedTouches[0].screenY + ); + }} + > + + + + + + - - 새로고침 - - - - + + 새로고침 + + + ); }; From 08660f1b765a2e62e1424b3855527d1f5aafbd36 Mon Sep 17 00:00:00 2001 From: Jihyun Kim Date: Thu, 10 Oct 2024 14:44:52 +0900 Subject: [PATCH 124/132] =?UTF-8?q?[FE]=20REFACTOR:=20=ED=95=84=EC=9A=94?= =?UTF-8?q?=EC=97=86=EB=8A=94=20css=20=EC=86=8D=EC=84=B1=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/components/Common/LoadingAnimation.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/src/Cabinet/components/Common/LoadingAnimation.tsx b/frontend/src/Cabinet/components/Common/LoadingAnimation.tsx index c458265fc..f0b636b88 100644 --- a/frontend/src/Cabinet/components/Common/LoadingAnimation.tsx +++ b/frontend/src/Cabinet/components/Common/LoadingAnimation.tsx @@ -13,7 +13,6 @@ const LoadingAnimationWrapperStyled = styled.div` width: 100%; height: 100%; display: flex; - overflow-y: hidden; justify-content: center; align-items: center; `; From cf02deaa54943d707a7f799ae5d47fd6e9562f1c Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Tue, 22 Oct 2024 15:25:08 +0900 Subject: [PATCH 125/132] =?UTF-8?q?[FE]=20HOTFIX:=20AvailablePage=20?= =?UTF-8?q?=EC=97=90=EC=84=9C=204=EC=B8=B5=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/pages/AvailablePage.tsx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/frontend/src/Cabinet/pages/AvailablePage.tsx b/frontend/src/Cabinet/pages/AvailablePage.tsx index 82ebd53ff..9ec0be173 100644 --- a/frontend/src/Cabinet/pages/AvailablePage.tsx +++ b/frontend/src/Cabinet/pages/AvailablePage.tsx @@ -29,6 +29,9 @@ const toggleList: toggleItem[] = [ { name: "공유", key: AvailableCabinetsType.SHARE }, ]; +/* TODO: DISABLED_FLOOR 을 환경변수로 넣기 */ +export const DISABLED_FLOOR = ["4"]; + const AvailablePage = () => { const [toggleType, setToggleType] = useState( AvailableCabinetsType.ALL @@ -153,13 +156,15 @@ const AvailablePage = () => { {Object.keys(cabinets).length ? ( - Object.entries(cabinets).map(([key, value]) => ( - - )) + Object.entries(cabinets) + .filter(([key, _]) => !DISABLED_FLOOR.includes(key)) + .map(([key, value]) => ( + + )) ) : ( )} From 66db19c10311e427f079767b028e6462f036d407 Mon Sep 17 00:00:00 2001 From: jusohn Eddie Sohn Date: Tue, 22 Oct 2024 15:25:33 +0900 Subject: [PATCH 126/132] =?UTF-8?q?[FE]=20HOTFIX:=204=EC=B8=B5=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EC=95=8C=EB=A6=BC=EA=B6=8C=EC=9D=84=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=ED=95=98=EC=A7=80=20=EB=AA=BB=ED=95=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/pages/MainPage.tsx | 26 +++++++++++-------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/frontend/src/Cabinet/pages/MainPage.tsx b/frontend/src/Cabinet/pages/MainPage.tsx index 506e99c1f..c98123f84 100644 --- a/frontend/src/Cabinet/pages/MainPage.tsx +++ b/frontend/src/Cabinet/pages/MainPage.tsx @@ -12,6 +12,7 @@ import { targetCabinetInfoState, } from "@/Cabinet/recoil/atoms"; import { currentFloorSectionState } from "@/Cabinet/recoil/selectors"; +import { DISABLED_FLOOR } from "@/Cabinet/pages/AvailablePage"; import CabinetListContainer from "@/Cabinet/components/CabinetList/CabinetList.container"; import LoadingAnimation from "@/Cabinet/components/Common/LoadingAnimation"; import SectionAlertModal from "@/Cabinet/components/Modals/StoreModal/SectionAlertModal"; @@ -74,11 +75,9 @@ const MainPage = () => { }, []); useEffect(() => { - const clubSection = clubSectionsData.find((section) => { + const clubSection = !!clubSectionsData.find((section) => { return section === currentSectionName; - }) - ? true - : false; + }); setIsClubSection(clubSection); }, [currentSectionName]); @@ -133,22 +132,15 @@ const MainPage = () => { touchStartPosY.current = e.changedTouches[0].screenY; }} onTouchEnd={(e: React.TouchEvent) => { - swipeSection( - e.changedTouches[0].screenX, - e.changedTouches[0].screenY - ); + swipeSection(e.changedTouches[0].screenX, e.changedTouches[0].screenY); }} > - + {currentFloorSectionNames.includes(currentSectionName) && !isClubSection && ( {sectionList[currentSectionIndex]?.alarmRegistered === true ? ( @@ -228,7 +220,11 @@ const IconWrapperStyled = styled.div<{ disabled: boolean }>` } `; -const AlertStyled = styled.div` +const AlertStyled = styled.div<{ currentFloor: number }>` + visibility: ${(props) => + DISABLED_FLOOR.includes(props.currentFloor.toString()) + ? "hidden" + : "visible"}; height: 30px; display: flex; justify-content: end; From e91ca8bb411adeebc8dceeebd984da12983740f8 Mon Sep 17 00:00:00 2001 From: junyoung2015 Date: Tue, 22 Oct 2024 15:35:23 +0900 Subject: [PATCH 127/132] DEV TO MAIN (#1694) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [FE] FIX: debounce 적용해 코인 내역 페이지 필터 변경시 불필요한 api 요청 보내지 않게 수정 #1677 * [FE] FIX: 공유사물함 코드 복사, 클럽 멤버리스트와 아이템 사용 내역 불러오기에서 debouncing 적용#1677 * [FE] FIX: AvailablePage에서 필요없는 코드 삭제#1677 * [BE] local 42auth key refresh * [BE] FIX: local config fix * [FE] FIX: UserCabinetInfoArea.tsx에서 font color 값 문법적 에러 해결 #1677 * [FE] FIX: z-index 삭제해서 포인트 컬러 카드에서 색 선택했을때 화면 스타일 카드도 그림자 적용#1682 * [FE] REMOVE: 프로필 연장권 카드 관련 파일 삭제#1682 * [FE] FIX: 공유코드 클릭했을때 debounce 함수 호출시 key 이름에서 time 내용 삭제#1677 * [FE] REFACT: getClubInfo와 clickMoreButton의 중복된 setTimeout clickMoreButton에서 제거#1677 * [FE] FIX: 멤버 더보기 버튼 클릭시 page 변경하는 부분에 debounce 적용#1677 * [BE] fcm 테스트를 위한 dev 환경 설정 임시 변경 * [BE] fcm 테스트를 위한 dev 환경 설정 변경 후 원상복구 * [FE] BUG: 모달에서 링크로 이동 시 모든 창을 닫도록 closeAll 추가 #1668 * [FE] FEAT: MAIN화면 재화 소개 추가#1681 (#1686) * [FE] FEAT: main layout 설정 #1681 * [FE] FEAT: coinDolar.svg 아이콘 추가 #1681 * Co-authored-by: Gyeong A Koh * FE] FEAT: ManualModal 동전 사용법 모달 수정 #1681 * [FE] FEAT: main ui 티켓 디자인 v1 #1681 * FE] FEAT: ManualModal 아이템 내용추가 #1681 * [FE] FEAT: CSS clip-path 를 사용해 STORE MandualContentBox 생성 #1681 * [FE] FIX: ManualContentBox 의 CSS 모듈화 #1681 * [FE] FIX: ManualContentBox 의 CSS Map 생성 #1681 * [FE] FIX: CSS Map 을 사용해 ManualContentBoxStyled 간소화 #1681 * [FE] FEAT: 티켓 이미지 그림자 적용 #1681 * [FE] FEAT: ManualModal 아이콘 호버 효과 적용 #1681 * [FE] FEAT: 티켓 이미지 반응형 적용 #1681 * [FE] FEAT: coin manual color 적용 #1681 * [FE] FEAT: ItemContentsStyled width 수정 #1681 * [FE] FEAT: new! #1681 * [FE] FEAT: 아이콘 resizing #1681 * [FE] DOCS: 바뀐 정책에 따라 슬랙 알림 연체 문구 수정#1681 * [FE] DOCS: 슬랙 알림 문구 볼드체 적용되게 띄어쓰기 #1681 * [FE] FEAT: 사물함 대여 모달에 연체주의사항 문구 추가 #1681 * [FE] FEAT: 사물함 대여 모달에 연체주의사항 문구 띄어쓰기 수정 #1681 * [FE] FEAT: 불필요한 파일 및 코드 삭제, storeItems 배열을 manualItemsData 객체로 수정 및 적용 #1681 * [FE] FIX: ManualModal 아이템 아이콘 그림자 잘림 해결, 오타 수정 #1681 * [FE] FEAT: 사용 안하는 css 제거 #1681 --------- Co-authored-by: Minkyu01 Co-authored-by: gykoh42 Co-authored-by: jiminChoi Co-authored-by: jusohn Eddie Sohn Co-authored-by: jnkeniaem * [BE] 이용 정지 최대 기한 180일로 조정 * [FE] FIX: 로딩 애니메이션 작동 시, 스크롤바 제거하기 위한 css 추가 * [FE] FIX: 새로고침 시 나타나는 스크롤바 제거하기 위한 로직 수정 * [FE] REFACTOR: 필요없는 css 속성 삭제 * [FE] HOTFIX: AvailablePage 에서 4층 제거 * [FE] HOTFIX: 4층에서 알림권을 사용하지 못하도록 설정 --------- Co-authored-by: jnkeniaem Co-authored-by: chyo1 Co-authored-by: jeekim <80810728+jnkeniaem@users.noreply.github.com> Co-authored-by: JunSeong Co-authored-by: jimchoi9 <146968639+jimchoi9@users.noreply.github.com> Co-authored-by: Minkyu01 Co-authored-by: gykoh42 Co-authored-by: jiminChoi Co-authored-by: Jihyun Kim Co-authored-by: Jihyun Kim <117818958+jihyunk03@users.noreply.github.com> --- .../user/service/BanPolicyService.java | 2 +- config | 2 +- .../src/Cabinet/assets/data/ManualContent.ts | 113 ++++++++++++++++ .../src/Cabinet/assets/data/SlackAlarm.ts | 10 +- frontend/src/Cabinet/assets/data/maps.ts | 24 +++- .../src/Cabinet/assets/images/coinDolar.svg | 5 + .../src/Cabinet/assets/images/storeAlarm.svg | 6 +- .../Cabinet/assets/images/storeExtension.svg | 10 +- .../src/Cabinet/assets/images/storeMove.svg | 12 +- .../Cabinet/assets/images/storePenalty.svg | 8 +- .../CabinetInfoArea/CountTime/CodeAndTime.tsx | 12 +- .../DisplayStyleCard/DisplayStyleCard.tsx | 1 - .../ExtensionCard/ExtensionCard.container.tsx | 76 ----------- .../Card/ExtensionCard/ExtensionCard.tsx | 63 --------- .../Card/StoreItemCard/StoreItemCard.tsx | 2 - .../ClubMemberList.container.tsx | 18 ++- .../components/Home/ManualContentBox.tsx | 91 ++++++------- .../components/Home/ManualContentBoxStyles.ts | 97 ++++++++++++++ .../Cabinet/components/Home/ServiceManual.tsx | 68 +++++----- .../components/Modals/LentModal/LentModal.tsx | 8 +- .../Modals/ManualModal/ManualModal.tsx | 118 ++++++++++++++--- .../src/Cabinet/components/Modals/Modal.tsx | 3 + .../Search/SearchCabinetDetails.tsx | 6 +- .../Search/SearchNoCabinetDetails.tsx | 1 - .../components/Store/CoinLog/CoinLog.tsx | 10 +- .../Store/Inventory/InventoryItem.tsx | 3 +- .../Store/ItemUsageLog/ItemLogBlock.tsx | 9 +- .../UserCabinetInfoArea.tsx | 2 +- frontend/src/Cabinet/pages/AvailablePage.tsx | 25 ++-- .../src/Cabinet/pages/ItemUsageLogPage.tsx | 15 ++- frontend/src/Cabinet/pages/MainPage.tsx | 125 +++++++++--------- frontend/src/Cabinet/pages/PostLogin.tsx | 1 + .../src/Cabinet/pages/admin/AdminMainPage.tsx | 73 +++++----- .../Cabinet/types/enum/content.status.enum.ts | 2 + 34 files changed, 601 insertions(+), 420 deletions(-) create mode 100644 frontend/src/Cabinet/assets/images/coinDolar.svg delete mode 100644 frontend/src/Cabinet/components/Card/ExtensionCard/ExtensionCard.container.tsx delete mode 100644 frontend/src/Cabinet/components/Card/ExtensionCard/ExtensionCard.tsx create mode 100644 frontend/src/Cabinet/components/Home/ManualContentBoxStyles.ts diff --git a/backend/src/main/java/org/ftclub/cabinet/user/service/BanPolicyService.java b/backend/src/main/java/org/ftclub/cabinet/user/service/BanPolicyService.java index f856b75c1..3df7b51f7 100644 --- a/backend/src/main/java/org/ftclub/cabinet/user/service/BanPolicyService.java +++ b/backend/src/main/java/org/ftclub/cabinet/user/service/BanPolicyService.java @@ -20,7 +20,7 @@ public BanType verifyBan(LocalDateTime endedAt, LocalDateTime expiredAt) { public LocalDateTime getUnBannedAt(LocalDateTime endedAt, LocalDateTime expiredAt) { long recentBanDays = DateUtil.calculateTwoDateDiffCeil(expiredAt, endedAt); - double squaredBanDays = Math.pow(recentBanDays, 2); + double squaredBanDays = Math.min(Math.pow(recentBanDays, 2), 180); return endedAt.plusDays((long) squaredBanDays); } } diff --git a/config b/config index d72c8b1fb..93674bce3 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit d72c8b1fb948031bd8084f72dc42c713f16d2152 +Subproject commit 93674bce354efe9ad8fb3a7a934bdbf5acd1d162 diff --git a/frontend/src/Cabinet/assets/data/ManualContent.ts b/frontend/src/Cabinet/assets/data/ManualContent.ts index 7e92e6370..8b39bebca 100644 --- a/frontend/src/Cabinet/assets/data/ManualContent.ts +++ b/frontend/src/Cabinet/assets/data/ManualContent.ts @@ -1,9 +1,13 @@ +import { ItemIconMap } from "@/Cabinet/assets/data/maps"; import { ReactComponent as ClockImg } from "@/Cabinet/assets/images/clock.svg"; import { ReactComponent as ClubIcon } from "@/Cabinet/assets/images/clubIcon.svg"; +import { ReactComponent as DollarImg } from "@/Cabinet/assets/images/coinDolar.svg"; import { ReactComponent as ExtensionIcon } from "@/Cabinet/assets/images/extension.svg"; import { ReactComponent as PrivateIcon } from "@/Cabinet/assets/images/privateIcon.svg"; import { ReactComponent as ShareIcon } from "@/Cabinet/assets/images/shareIcon.svg"; +import { ReactComponent as StoreImg } from "@/Cabinet/assets/images/storeIconGray.svg"; import ContentStatus from "@/Cabinet/types/enum/content.status.enum"; +import { StoreItemType } from "@/Cabinet/types/enum/store.enum"; interface ContentStatusData { contentTitle: string; @@ -15,6 +19,12 @@ interface ContentStatusData { pointColor: string; } +interface ItemStatusData { + icon: React.FunctionComponent>; + title: string; + content: string; +} + export const manualContentData: Record = { [ContentStatus.PRIVATE]: { contentTitle: "개인 사물함", @@ -153,4 +163,107 @@ export const manualContentData: Record = { `, pointColor: "var(--normal-text-color)", }, + [ContentStatus.COIN]: { + contentTitle: `코인 사용법`, + iconComponent: DollarImg, + background: "var(--card-bg-color)", + contentText: `◦ 160시간 출석하기
+
+ 42 출석 160시간을 채운다면 다음달 2일에 2000까비가 지급됩니다.
+
+
+ ◦ 동전줍기
+
+ Cabi 홈페이지에 접속해, 하루에 한 번 동전을 주울 수 있습니다.
+ 한 달 동안 20개의 코인을 모두 줍는다면 랜덤 보상이 주어집니다.
+
+
+ ◦ 수요지식회 발표하기
+
+ 수요지식회 발표자 분께 1000까비를 지급해 드립니다.
+ 수요지식회 신청은 왼쪽 상단의수요지식회 홈페이지에서 신청할 수 있습니다.
+
+ + `, + pointColor: "var(--sys-default-main-color)", + }, + [ContentStatus.STORE]: { + contentTitle: "까비 상점 OPEN!", + iconComponent: StoreImg, + background: + "linear-gradient(to bottom, var(--ref-purple-400), var(--ref-purple-600))", + contentText: ` + `, + pointColor: "var(--white-text-with-bg-color)", + }, +}; + +export const manualItemsData: Record = { + [StoreItemType.EXTENSION]: { + icon: ItemIconMap.EXTENSION, + title: "연장권", + content: ` + store 탭을 눌러 연장권 구매하기 버튼을 클릭 후 3일, 15일, 31일 단위로 구매할 수 있습니다.
+ 구매한 아이템은 인벤토리 탭에서 확인할 수 있습니다.
+
+ ◦ 사용방법
+
+ 사물함을 대여한 상태로, 상단 오른쪽의 상자 아이콘을 누르면 현재 자신의 사물함의 정보를 볼 수 있습니다.
+ 연장권 사용하기 버튼을 눌러 보유한 연장권 중 원하는 타입을 선택 후 사용합니다.
+ 이미 사용한 연장권은 취소할 수 없습니다.
+ 공유사물함의 모든 인원이 연장권을 사용할 수 있지만, 남은 인원이 한 명인 경우 연장권을 사용할 수 없습니다. +
+ `, + }, + [StoreItemType.SWAP]: { + icon: ItemIconMap.SWAP, + title: "이사권", + content: ` + + 기존 일주일에 한 번 가능했던 이사하기 기능을 제한 없이 자유롭게 사용할 수 있습니다.
+ 현재 이용중인 사물함의 대여 기간을 유지한 채 다른 사물함으로 이사할 수 있습니다.
+ store 탭에서 구매할 수 있으며, 인벤토리 탭에서 구매한 아이템을 확인할 수 있습니다. +
+ ◦ 사용방법
+
+ 개인 사물함을 이용중인 사용자만 이사권을 사용할 수 있습니다.
+ 아이템을 보유한 상태로 비어있는 개인 사물함을 눌렀을 때 이사하기 버튼이 활성화됩니다.
+ 이미 사용한 이사권은 취소할 수 없습니다.
+ +
+ `, + }, + [StoreItemType.ALARM]: { + icon: ItemIconMap.ALARM, + title: "알림 등록권", + content: ` + 내가 원하는 섹션에 빈 자리가 나온다면 알림을 받을 수 있습니다.
+ 개인사물함에 대해서만 알림을 받을 수 있습니다.
+ store 탭에서 구매할 수 있으며, 인벤토리 탭에서 구매한 아이템을 확인할 수 있습니다.
+
+ ◦ 사용방법
+
+ 아이템 구매 후 원하는 섹션으로 이동해 우측 상단의 하트 아이콘을 클릭합니다.
+ 사용한 알림 등록권은 섹션을 변경하거나 취소할 수 없습니다.
+ 알림등록권은 1회 알림 후 소멸됩니다. +
+ + `, + }, + [StoreItemType.PENALTY]: { + icon: ItemIconMap.PENALTY, + title: "페널티 감면권", + content: ` + 페널티 감면권은 7일, 15일, 31일 단위로 구매할 수 있습니다.
+ 구매한 아이템은 인벤토리 탭에서 확인할 수 있습니다.
+
+ ◦ 사용방법
+
+ 사물함 대여 불가 페널티가 부과된 유저라면 Profile 탭을 눌러 대여정보 상자 상단의
+ 페널티 감면권 사용하기 버튼이 활성화됩니다.
+ 버튼을 눌러 내가 보유한 페널티 감면권을 선택하면, 남은 페널티 기간을 확인하실 수 있습니다.
+ 연체된 사물함을 아직 반납하지 않았다면, 우선 반납하기 버튼을 눌러야 사용 버튼이 활성화됩니다. +
+ `, + }, }; diff --git a/frontend/src/Cabinet/assets/data/SlackAlarm.ts b/frontend/src/Cabinet/assets/data/SlackAlarm.ts index 514b7e654..3def9e28e 100644 --- a/frontend/src/Cabinet/assets/data/SlackAlarm.ts +++ b/frontend/src/Cabinet/assets/data/SlackAlarm.ts @@ -27,7 +27,7 @@ export const SlackAlarmTemplates: ISlackAlarmTemplate[] = [ :happy_ccabi: 안녕하세요. Cabi 팀입니다! :happy_ccabi: :sad_ccabi: 서비스 개선을 위해, 서버를 점검하게 되었습니다. :sad_ccabi: :file_cabinet: 서비스 개선과 관련한 사항은 Cabi 채널 에서, :file_cabinet: -:hammer_and_wrench: 보관물 관련 사항은 *데스크에 직접 문의*해주세요! :hammer_and_wrench: +:hammer_and_wrench: 보관물 관련 사항은 *데스크에 직접 문의* 해주세요! :hammer_and_wrench: 점검 일자 : 2024년 04월 02일 (화요일) 점검 시간 : 15시 10분 ~ 완료 공지 시점까지 @@ -179,9 +179,9 @@ export const SlackAlarmTemplates: ISlackAlarmTemplate[] = [ { title: "연체", content: `[CABI] 안녕하세요! :embarrassed_cabi: -현재 이용 중이신 사물함이 연체인 것으로 확인되어 연락드립니다. -장기간 연체시 서비스 이용에 대한 페널티, 혹은 :tig:가 부여될 수 있음을 인지해주세요! -사물함의 대여 기간을 확인하신 후 반납 부탁드립니다. -항상 저희 서비스를 이용해 주셔서 감사합니다:)`, + 현재 이용 중이신 사물함이 *연체* 된 것으로 확인되어 연락드립니다. + *3주(21일) 이상 연체 시 미회수된 개인 물품은 폐기될 수 있음을 인지해 주세요!* + 사물함의 대여 기간을 확인하신 후 반납 부탁드립니다. + 항상 저희 서비스를 이용해 주셔서 감사합니다:)`, }, ]; diff --git a/frontend/src/Cabinet/assets/data/maps.ts b/frontend/src/Cabinet/assets/data/maps.ts index 8706697ba..a1bfdfc83 100644 --- a/frontend/src/Cabinet/assets/data/maps.ts +++ b/frontend/src/Cabinet/assets/data/maps.ts @@ -1,5 +1,13 @@ +import { css } from "styled-components"; +import { + coinBoxStyles, + extensionBoxStyles, + inSessionBoxStyles, + pendingBoxStyles, + storeBoxStyles, +} from "@/Cabinet/components/Home/ManualContentBoxStyles"; import { ReactComponent as ClubIcon } from "@/Cabinet/assets/images/clubIcon.svg"; -import { ReactComponent as ExtensionImg } from "@/Cabinet/assets/images/extension.svg"; +import { ReactComponent as ExtensionImg } from "@/Cabinet/assets/images/storeExtension.svg"; import { ReactComponent as PrivateIcon } from "@/Cabinet/assets/images/privateIcon.svg"; import { ReactComponent as ShareIcon } from "@/Cabinet/assets/images/shareIcon.svg"; import { ReactComponent as AlarmImg } from "@/Cabinet/assets/images/storeAlarm.svg"; @@ -7,6 +15,7 @@ import { ReactComponent as SwapImg } from "@/Cabinet/assets/images/storeMove.svg import { ReactComponent as PenaltyImg } from "@/Cabinet/assets/images/storePenalty.svg"; import CabinetStatus from "@/Cabinet/types/enum/cabinet.status.enum"; import CabinetType from "@/Cabinet/types/enum/cabinet.type.enum"; +import ContentStatus from "@/Cabinet/types/enum/content.status.enum"; import { StoreExtensionType, StoreItemType, @@ -267,3 +276,16 @@ export const ItemTypeExtensionMap = { [StoreExtensionType.EXTENSION_15]: "15일", [StoreExtensionType.EXTENSION_31]: "31일", }; + +export const ContentStatusStylesMap: { + [key in ContentStatus]: any; +} = { + [ContentStatus.EXTENSION]: extensionBoxStyles, + [ContentStatus.STORE]: storeBoxStyles, + [ContentStatus.COIN]: coinBoxStyles, + [ContentStatus.PENDING]: pendingBoxStyles, + [ContentStatus.IN_SESSION]: inSessionBoxStyles, + [ContentStatus.PRIVATE]: css``, + [ContentStatus.SHARE]: css``, + [ContentStatus.CLUB]: css``, +}; diff --git a/frontend/src/Cabinet/assets/images/coinDolar.svg b/frontend/src/Cabinet/assets/images/coinDolar.svg new file mode 100644 index 000000000..72f985b8f --- /dev/null +++ b/frontend/src/Cabinet/assets/images/coinDolar.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/frontend/src/Cabinet/assets/images/storeAlarm.svg b/frontend/src/Cabinet/assets/images/storeAlarm.svg index fdec88cdb..deb44a952 100644 --- a/frontend/src/Cabinet/assets/images/storeAlarm.svg +++ b/frontend/src/Cabinet/assets/images/storeAlarm.svg @@ -1,4 +1,4 @@ - - - + + + diff --git a/frontend/src/Cabinet/assets/images/storeExtension.svg b/frontend/src/Cabinet/assets/images/storeExtension.svg index 91c16096c..d97f6f116 100644 --- a/frontend/src/Cabinet/assets/images/storeExtension.svg +++ b/frontend/src/Cabinet/assets/images/storeExtension.svg @@ -1,6 +1,6 @@ - - - - - + + + + + diff --git a/frontend/src/Cabinet/assets/images/storeMove.svg b/frontend/src/Cabinet/assets/images/storeMove.svg index 4500e4867..f87ec2c31 100644 --- a/frontend/src/Cabinet/assets/images/storeMove.svg +++ b/frontend/src/Cabinet/assets/images/storeMove.svg @@ -1,7 +1,7 @@ - - - - - - + + + + + + diff --git a/frontend/src/Cabinet/assets/images/storePenalty.svg b/frontend/src/Cabinet/assets/images/storePenalty.svg index 158760b33..9838cbd18 100644 --- a/frontend/src/Cabinet/assets/images/storePenalty.svg +++ b/frontend/src/Cabinet/assets/images/storePenalty.svg @@ -1,5 +1,5 @@ - - - - + + + + diff --git a/frontend/src/Cabinet/components/CabinetInfoArea/CountTime/CodeAndTime.tsx b/frontend/src/Cabinet/components/CabinetInfoArea/CountTime/CodeAndTime.tsx index c3c013be9..5535b3852 100644 --- a/frontend/src/Cabinet/components/CabinetInfoArea/CountTime/CodeAndTime.tsx +++ b/frontend/src/Cabinet/components/CabinetInfoArea/CountTime/CodeAndTime.tsx @@ -5,6 +5,7 @@ import { myCabinetInfoState } from "@/Cabinet/recoil/atoms"; import alertImg from "@/Cabinet/assets/images/cautionSign.svg"; import { ReactComponent as ClockImg } from "@/Cabinet/assets/images/clock.svg"; import { MyCabinetInfoResponseDto } from "@/Cabinet/types/dto/cabinet.dto"; +import useDebounce from "@/Cabinet/hooks/useDebounce"; interface CountTimeProps { minutes: string; @@ -17,13 +18,18 @@ const CodeAndTime = ({ minutes, seconds, isTimeOver }: CountTimeProps) => { useRecoilValue(myCabinetInfoState); const code = myCabinetInfo.shareCode + ""; const [copySuccess, setCopySuccess] = useState(false); + const { debounce } = useDebounce(); const handleCopyClick = () => { navigator.clipboard.writeText(code).then(() => { setCopySuccess(true); - setTimeout(() => { - setCopySuccess(false); - }, 2000); + debounce( + "codeCopyClick", + () => { + setCopySuccess(false); + }, + 2000 + ); }); }; diff --git a/frontend/src/Cabinet/components/Card/DisplayStyleCard/DisplayStyleCard.tsx b/frontend/src/Cabinet/components/Card/DisplayStyleCard/DisplayStyleCard.tsx index f24601027..59685d886 100644 --- a/frontend/src/Cabinet/components/Card/DisplayStyleCard/DisplayStyleCard.tsx +++ b/frontend/src/Cabinet/components/Card/DisplayStyleCard/DisplayStyleCard.tsx @@ -75,7 +75,6 @@ const DisplayStyleCard = ({ }; const DisplayStyleCardWrapper = styled.div` - z-index: 1; align-self: start; `; diff --git a/frontend/src/Cabinet/components/Card/ExtensionCard/ExtensionCard.container.tsx b/frontend/src/Cabinet/components/Card/ExtensionCard/ExtensionCard.container.tsx deleted file mode 100644 index 18958f830..000000000 --- a/frontend/src/Cabinet/components/Card/ExtensionCard/ExtensionCard.container.tsx +++ /dev/null @@ -1,76 +0,0 @@ -import { useRecoilState, useSetRecoilState } from "recoil"; -import { - currentCabinetIdState, - myCabinetInfoState, - targetCabinetInfoState, - userState, -} from "@/Cabinet/recoil/atoms"; -import ExtensionCard from "@/Cabinet/components/Card/ExtensionCard/ExtensionCard"; -import { CabinetInfo } from "@/Cabinet/types/dto/cabinet.dto"; -import { LentDto, LentExtensionDto } from "@/Cabinet/types/dto/lent.dto"; -import { axiosCabinetById } from "@/Cabinet/api/axios/axios.custom"; -import useMenu from "@/Cabinet/hooks/useMenu"; - -const ExtensionCardContainer = ({ - extensionInfo, -}: { - extensionInfo: LentExtensionDto | null; -}) => { - const { toggleCabinet, openCabinet, closeAll } = useMenu(); - const [myInfo, setMyInfo] = useRecoilState(userState); - const [currentCabinetId, setCurrentCabinetId] = useRecoilState( - currentCabinetIdState - ); - const [myCabinetInfo, setMyCabinetInfo] = useRecoilState(myCabinetInfoState); - const setTargetCabinetInfo = useSetRecoilState( - targetCabinetInfoState - ); - async function setTargetCabinetInfoToMyCabinet() { - setCurrentCabinetId(myInfo.cabinetId); - setMyInfo((prev) => ({ ...prev, cabinetId: null })); - try { - if (!myCabinetInfo?.cabinetId) return; - const { data } = await axiosCabinetById(myCabinetInfo.cabinetId); - if (data.lents.length === 0 && myInfo.cabinetId !== null) { - setMyInfo((prev) => ({ ...prev, cabinetId: null })); - } else { - const doesNameExist = data.lents.some( - (lent: LentDto) => lent.name === myInfo.name - ); - if (doesNameExist) { - setTargetCabinetInfo(data); - setCurrentCabinetId(data.cabinetId); - setMyInfo((prev) => ({ ...prev, cabinetId: data.cabinetId })); - } - } - } catch (error) { - console.log(error); - } - } - const clickMyCabinet = () => { - if (!!extensionInfo && !!myInfo.cabinetId) { - if (myInfo.cabinetId === null && !myCabinetInfo?.cabinetId) { - setTargetCabinetInfoToMyCabinet(); - toggleCabinet(); - } else if (currentCabinetId !== myInfo.cabinetId) { - setTargetCabinetInfoToMyCabinet(); - openCabinet(); - } else { - toggleCabinet(); - } - } - }; - return ( - clickMyCabinet(), - isClickable: !!extensionInfo && !!myInfo.cabinetId, - isExtensible: !!extensionInfo, - }} - /> - ); -}; - -export default ExtensionCardContainer; diff --git a/frontend/src/Cabinet/components/Card/ExtensionCard/ExtensionCard.tsx b/frontend/src/Cabinet/components/Card/ExtensionCard/ExtensionCard.tsx deleted file mode 100644 index e35446a69..000000000 --- a/frontend/src/Cabinet/components/Card/ExtensionCard/ExtensionCard.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import { useState } from "react"; -import Card, { IButtonProps } from "@/Cabinet/components/Card/Card"; -import { - CardContentStyled, - CardContentWrapper, - ContentDetailStyled, - ContentInfoStyled, -} from "@/Cabinet/components/Card/CardStyles"; -import { NotificationModal } from "@/Cabinet/components/Modals/NotificationModal/NotificationModal"; -import { LentExtensionDto } from "@/Cabinet/types/dto/lent.dto"; -import { formatDate } from "@/Cabinet/utils/dateUtils"; - -interface ExtensionProps { - extensionInfo: LentExtensionDto | null; - button: IButtonProps; -} - -const NotificationModalDetail = `연장권은 매월 2일 제공되며,
이전에 받은 연장권은 사용이 불가능 합니다.
24HANE 기준 160시간을 출석한 경우,
연장권이 부여됩니다.`; - -const ExtensionCard = ({ extensionInfo, button }: ExtensionProps) => { - const [showNotificationModal, setShowNotificationModal] = - useState(false); - return ( - <> - { - setShowNotificationModal(true); - }} - gridArea={"extension"} - width={"350px"} - height={"183px"} - buttons={[button]} - > - - - 사용 기한 - - {!!extensionInfo - ? formatDate(new Date(extensionInfo.expiredAt), ".", 4, 2, 2) - : "-"} - - - - 연장 기간 - - {!!extensionInfo ? extensionInfo.extensionPeriod + "일" : "-"} - - - - - {showNotificationModal && ( - setShowNotificationModal(false)} - /> - )} - - ); -}; - -export default ExtensionCard; diff --git a/frontend/src/Cabinet/components/Card/StoreItemCard/StoreItemCard.tsx b/frontend/src/Cabinet/components/Card/StoreItemCard/StoreItemCard.tsx index 717e0c2df..17b021574 100644 --- a/frontend/src/Cabinet/components/Card/StoreItemCard/StoreItemCard.tsx +++ b/frontend/src/Cabinet/components/Card/StoreItemCard/StoreItemCard.tsx @@ -137,8 +137,6 @@ const ItemIconStyled = styled.div<{ itemType: StoreItemType }>` & > svg > path { stroke: var(--white-text-with-bg-color); - stroke-width: ${(props) => - props.itemType === StoreItemType.EXTENSION ? "2.8px" : "1.5px"}; } `; diff --git a/frontend/src/Cabinet/components/Club/ClubMemberList/ClubMemberList.container.tsx b/frontend/src/Cabinet/components/Club/ClubMemberList/ClubMemberList.container.tsx index 0df8e737c..44c6344cd 100644 --- a/frontend/src/Cabinet/components/Club/ClubMemberList/ClubMemberList.container.tsx +++ b/frontend/src/Cabinet/components/Club/ClubMemberList/ClubMemberList.container.tsx @@ -1,11 +1,12 @@ import { useEffect, useState } from "react"; -import { useRecoilState, useRecoilValue } from "recoil"; -import { targetClubUserInfoState, userState } from "@/Cabinet/recoil/atoms"; +import { useRecoilState } from "recoil"; +import { targetClubUserInfoState } from "@/Cabinet/recoil/atoms"; import ClubMemberList from "@/Cabinet/components/Club/ClubMemberList/ClubMemberList"; import { ClubInfoResponseDto, ClubUserResponseDto, } from "@/Cabinet/types/dto/club.dto"; +import useDebounce from "@/Cabinet/hooks/useDebounce"; import useMenu from "@/Cabinet/hooks/useMenu"; export type TClubMemberModalState = "addModal"; @@ -27,7 +28,6 @@ const ClubMemberListContainer = ({ }: ClubMemberListContainerProps) => { const [moreButton, setMoreButton] = useState(true); const [members, setMembers] = useState([]); - // const [sortMembers, setSortMembers] = useState([]); const [clubModal, setClubModal] = useState({ addModal: false, }); @@ -36,12 +36,16 @@ const ClubMemberListContainer = ({ const [targetClubUser, setTargetClubUser] = useRecoilState( targetClubUserInfoState ); - + const { debounce } = useDebounce(); const clickMoreButton = () => { setIsLoading(true); - setTimeout(() => { - setPage(page + 1); - }, 100); + debounce( + "clubMemberList", + () => { + setPage(page + 1); + }, + 300 + ); }; const selectClubMemberOnClick = (member: ClubUserResponseDto) => { diff --git a/frontend/src/Cabinet/components/Home/ManualContentBox.tsx b/frontend/src/Cabinet/components/Home/ManualContentBox.tsx index 5f4885e30..2f973569d 100644 --- a/frontend/src/Cabinet/components/Home/ManualContentBox.tsx +++ b/frontend/src/Cabinet/components/Home/ManualContentBox.tsx @@ -1,18 +1,19 @@ import styled, { css, keyframes } from "styled-components"; import { manualContentData } from "@/Cabinet/assets/data/ManualContent"; +import { ContentStatusStylesMap } from "@/Cabinet/assets/data/maps"; import { ReactComponent as ManualPeopleImg } from "@/Cabinet/assets/images/manualPeople.svg"; import { ReactComponent as MoveBtnImg } from "@/Cabinet/assets/images/moveButton.svg"; import ContentStatus from "@/Cabinet/types/enum/content.status.enum"; -interface MaunalContentBoxProps { +interface ManualContentBoxProps { contentStatus: ContentStatus; } -const MaunalContentBox = ({ contentStatus }: MaunalContentBoxProps) => { +const ManualContentBox = ({ contentStatus }: ManualContentBoxProps) => { const contentData = manualContentData[contentStatus]; return ( - @@ -23,15 +24,13 @@ const MaunalContentBox = ({ contentStatus }: MaunalContentBoxProps) => { contentData.iconComponent && ( )} + - {contentStatus === ContentStatus.IN_SESSION && - contentData.iconComponent && ( - - )}

{contentData.contentTitle}

+ -
+ ); }; @@ -41,7 +40,7 @@ const Rotation = keyframes` } `; -const MaunalContentBoxStyled = styled.div<{ +const ManualContentBoxStyled = styled.div<{ background: string; contentStatus: ContentStatus; }>` @@ -59,12 +58,14 @@ const MaunalContentBoxStyled = styled.div<{ font-weight: bold; cursor: pointer; + ${(props) => ContentStatusStylesMap[props.contentStatus]} + .clockImg { width: 35px; margin-right: 10px; margin-top: 160px; animation: ${Rotation} 1s linear infinite; - stroke: var(--sys-main-color); + stroke: var(--sys-default-main-color); } .contentImg { @@ -73,8 +74,8 @@ const MaunalContentBoxStyled = styled.div<{ & > path { stroke: ${(props) => - props.contentStatus === ContentStatus.EXTENSION - ? "var(--normal-text-color)" + props.contentStatus === ContentStatus.COIN + ? "var(--sys-default-main-color)" : "var(--white-text-with-bg-color)"}; } } @@ -86,44 +87,17 @@ const MaunalContentBoxStyled = styled.div<{ position: absolute; right: 100px; bottom: 30px; - fill: var(--sys-main-color); + fill: var(--sys-def-main-color); } - ${({ contentStatus }) => - contentStatus === ContentStatus.PENDING && - css` - border: 5px double var(--sys-main-color); - box-shadow: inset 0px 0px 0px 5px var(--bg-color); - `} - - ${({ contentStatus }) => - contentStatus === ContentStatus.IN_SESSION && - css` - border: 5px solid var(--sys-main-color); - color: var(--sys-main-color); - `} - - ${({ contentStatus }) => - contentStatus === ContentStatus.EXTENSION && - css` - width: 900px; - color: var(--normal-text-color); - @media screen and (max-width: 1000px) { - width: 280px; - .peopleImg { - display: none; - } - font-size: 21px; - } - `} - - p { + p { margin-top: 90px; ${({ contentStatus }) => (contentStatus === ContentStatus.PENDING || + contentStatus === ContentStatus.COIN || contentStatus === ContentStatus.IN_SESSION) && css` - margin-top: 160px; + color: var(--sys-default-main-color); `} } @@ -134,34 +108,42 @@ const MaunalContentBoxStyled = styled.div<{ right: 35px; bottom: 35px; stroke: ${(props) => - props.contentStatus === ContentStatus.IN_SESSION - ? "var(--sys-main-color)" + props.contentStatus === ContentStatus.COIN + ? "var(--sys-default-main-color)" : props.contentStatus === ContentStatus.EXTENSION ? "var(--normal-text-color)" : "var(--white-text-with-bg-color)"}; cursor: pointer; } - :hover { + &:hover { transition: all 0.3s ease-in-out; ${({ contentStatus }) => contentStatus === ContentStatus.PENDING ? css` - border: 5px double var(--sys-main-color); - box-shadow: inset 0px 0px 0px 5px var(--bg-color), - 10px 10px 25px 0 var(--left-nav-border-shadow-color); + border: 5px double var(--sys-default-main-color); + box-shadow: inset 0px 0px 0px 5px var(--bg-color); + filter: drop-shadow( + 10px 10px 10px var(--left-nav-border-shadow-color) + ); ` + : contentStatus === ContentStatus.STORE + ? css`` // No box-shadow or filter for STORE status : css` - box-shadow: 10px 10px 25px 0 var(--left-nav-border-shadow-color); + filter: drop-shadow( + 10px 10px 10px var(--left-nav-border-shadow-color) + ); `} + p { transition: all 0.3s ease-in-out; transform: translateY(-5px); ${({ contentStatus }) => (contentStatus === ContentStatus.PENDING || + contentStatus === ContentStatus.COIN || contentStatus === ContentStatus.IN_SESSION) && css` - margin-top: 155px; + color: var(--sys-default-main-color); `} } .clockImg { @@ -174,6 +156,11 @@ const MaunalContentBoxStyled = styled.div<{ const ContentTextStyled = styled.div` display: flex; align-items: center; + + & > span { + font-weight: 400; + font-size: 1rem; + } `; -export default MaunalContentBox; +export default ManualContentBox; diff --git a/frontend/src/Cabinet/components/Home/ManualContentBoxStyles.ts b/frontend/src/Cabinet/components/Home/ManualContentBoxStyles.ts new file mode 100644 index 000000000..99c3489d6 --- /dev/null +++ b/frontend/src/Cabinet/components/Home/ManualContentBoxStyles.ts @@ -0,0 +1,97 @@ +import { css } from "styled-components"; + +export const extensionBoxStyles = css` + width: 900px; + color: var(--normal-text-color); + @media screen and (max-width: 1000px) { + width: 280px; + font-size: 21px; + } +`; + +export const storeBoxStyles = css` + width: 620px; + height: 280px; + position: relative; + background: linear-gradient( + to bottom, + var(--ref-purple-400), + var(--ref-purple-600) + ); + border-radius: 40px; + clip-path: path( + "M 0 163.33 + A 23.33 23.33 1 0 0 0 116.67 + L 0 0 + L 396.56 0 + L 413.354 15.67 + L 430.148 0 + L 620 0 + L 620 280 + L 430.148 280 + L 413.354 264.33 + L 396.56 280 + L 0 280 + Z" + ); + /* Explanation of path: + - M 0 175: Move to (0, 175) + - A 25 25 1 0 0 0 125: Draw an arc with radius 25, starting from (0, 175) to (0, 125) // radius-x, radius-y, x-axis-rotation, large-arc-flag, sweep-flag, x, y + - L 0 0: Draw a line from (0, 125) to (0, 0) + - L 396.56 0: Draw a line from (0, 0) to (396.56, 0) + - L 413.354 16.794: Draw a line from (396.56, 0) to (413.354, 16.794) + - L 430.148 0: Draw a line from (413.354, 16.794) to (430.148, 0) + - L 620 0: Draw a line from (430.148, 0) to (620, 0) + - L 620 300: Draw a line from (620, 0) to (620, 300) + - L 430.148 300: Draw a line from (620, 300) to (430.148, 300) + - L 413.354 283.206: Draw a line from (430.148, 300) to (413.354, 283.206) + - L 396.56 300: Draw a line from (413.354, 283.206) to (396.56, 300) + - L 0 300: Draw a line from (396.56, 300) to (0, 300) + - Z: Close the path + */ + &:after { + content: ""; + position: absolute; + top: 25px; + right: 32.99%; /* 2/3 point */ + height: 100%; + width: 4px; + background-image: linear-gradient( + to bottom, + white 33%, + rgba(255, 255, 255, 0) 0% + ); + background-position: right; + background-size: 10px 30px; + background-repeat: repeat-y; + } + @media screen and (max-width: 1100px) { + width: 280px; + font-size: 21px; + clip-path: none; + + &:after { + display: none; + } + } +`; + +export const coinBoxStyles = css` + border: 5px solid var(--sys-default-main-color); + color: var(--sys-main-color); +`; + +export const pendingBoxStyles = css` + border: 6px double var(--sys-main-color); + box-shadow: inset 0px 0px 0px 5px var(--bg-color); +`; + +export const inSessionBoxStyles = css` + border: 5px solid var(--sys-main-color); + color: var(--sys-main-color); +`; + +export const privateBoxStyles = css` + /* border: 5px solid var(--sys-main-color); + color: var(--sys-main-color); */ +`; diff --git a/frontend/src/Cabinet/components/Home/ServiceManual.tsx b/frontend/src/Cabinet/components/Home/ServiceManual.tsx index 94f766f70..ccf8c876c 100644 --- a/frontend/src/Cabinet/components/Home/ServiceManual.tsx +++ b/frontend/src/Cabinet/components/Home/ServiceManual.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; import styled from "styled-components"; -import MaunalContentBox from "@/Cabinet/components/Home/ManualContentBox"; +import ManualContentBox from "@/Cabinet/components/Home/ManualContentBox"; import ManualModal from "@/Cabinet/components/Modals/ManualModal/ManualModal"; import ContentStatus from "@/Cabinet/types/enum/content.status.enum"; @@ -36,62 +36,53 @@ const ServiceManual = ({

- 가능성의 확장 + 당신의 사물함
- 개인, 공유, 동아리 사물함. + 당신의 방식으로,

+
openModal(ContentStatus.PRIVATE)} - > - -
-
openModal(ContentStatus.SHARE)} - > - -
-
openModal(ContentStatus.CLUB)} + onClick={() => openModal(ContentStatus.COIN)} > - + +

new

+ +
openModal(ContentStatus.STORE)} + > + +

new

+
+
+

- 공정한 대여를 위한 + 가능성의 확장
- 새로운 사물함 서비스. + 개인, 공유, 동아리 사물함.

openModal(ContentStatus.PENDING)} + onClick={() => openModal(ContentStatus.PRIVATE)} > - -

new

+
openModal(ContentStatus.IN_SESSION)} + onClick={() => openModal(ContentStatus.SHARE)} > - -

new

+
-
-

- 사물함을 더 오래 -
- 사용할 수 있는 방법. -

-
openModal(ContentStatus.EXTENSION)} + onClick={() => openModal(ContentStatus.CLUB)} > - +
@@ -107,6 +98,15 @@ const ServiceManual = ({ ); }; +const TicketWrapperStyled = styled.div` + width: 620px; + &:hover { + transition: all 0.3s ease-in-out; + transform: translateY(-5px); + filter: drop-shadow(10px 10px 10px var(--left-nav-border-shadow-color)); + } +`; + const WrapperStyled = styled.div` display: flex; flex-direction: column; diff --git a/frontend/src/Cabinet/components/Modals/LentModal/LentModal.tsx b/frontend/src/Cabinet/components/Modals/LentModal/LentModal.tsx index 614cfaafa..556af4a8e 100644 --- a/frontend/src/Cabinet/components/Modals/LentModal/LentModal.tsx +++ b/frontend/src/Cabinet/components/Modals/LentModal/LentModal.tsx @@ -46,7 +46,9 @@ const LentModal: React.FC<{ const formattedExpireDate = getExpireDateString(props.lentType); const privateLentDetail = `대여기간은 ${formattedExpireDate} 23:59까지 입니다. - 귀중품 분실 및 메모 내용의 유출에 책임지지 않습니다.`; + 귀중품 분실 및 메모 내용의 유출에 책임지지 않습니다. + 3주(21일) 이상 연체 시 사물함은 강제 반납되며 + 미회수된 개인 물품은 폐기될 수 있습니다.`; const shareLentDetail = `대여 후 ${ 10 // import.meta.env.VITE_SHARE_LENT_COUNTDOWN // TODO: .env 에 등록하기 @@ -54,7 +56,9 @@ const LentModal: React.FC<{ 공유 인원 (2인~4인) 이 충족되지 않으면, 공유 사물함의 대여가 취소됩니다. “메모 내용”은 공유 인원끼리 공유됩니다. - 귀중품 분실 및 메모 내용의 유출에 책임지지 않습니다.`; + 귀중품 분실 및 메모 내용의 유출에 책임지지 않습니다. + 3주(21일) 이상 연체 시 사물함은 강제 반납되며 + 미회수된 개인 물품은 폐기될 수 있습니다.`; const tryLentRequest = async (e: React.MouseEvent) => { setIsLoading(true); try { diff --git a/frontend/src/Cabinet/components/Modals/ManualModal/ManualModal.tsx b/frontend/src/Cabinet/components/Modals/ManualModal/ManualModal.tsx index 494d11383..a238f8fb1 100644 --- a/frontend/src/Cabinet/components/Modals/ManualModal/ManualModal.tsx +++ b/frontend/src/Cabinet/components/Modals/ManualModal/ManualModal.tsx @@ -1,9 +1,13 @@ import React from "react"; import { useState } from "react"; import styled, { keyframes } from "styled-components"; -import { manualContentData } from "@/Cabinet/assets/data/ManualContent"; +import { + manualContentData, + manualItemsData, +} from "@/Cabinet/assets/data/ManualContent"; import { ReactComponent as MoveBtnImg } from "@/Cabinet/assets/images/moveButton.svg"; import ContentStatus from "@/Cabinet/types/enum/content.status.enum"; +import { StoreItemType } from "@/Cabinet/types/enum/store.enum"; interface ModalProps { contentStatus: ContentStatus; @@ -15,6 +19,9 @@ const ManualModal: React.FC = ({ setIsModalOpen, }) => { const [modalIsOpen, setModalIsOpen] = useState(true); + const [selectedItem, setSelectedItem] = useState( + StoreItemType.EXTENSION + ); const contentData = manualContentData[contentStatus]; const isCabinetType = @@ -28,6 +35,10 @@ const ManualModal: React.FC = ({ contentStatus === ContentStatus.SHARE || contentStatus === ContentStatus.CLUB; + const handleIconClick = (index: StoreItemType) => { + setSelectedItem(index); + }; + const closeModal = () => { if (modalIsOpen) { setModalIsOpen(false); @@ -76,12 +87,40 @@ const ManualModal: React.FC = ({ )} )} - {contentData.contentTitle} - -
-
+ {contentStatus === ContentStatus.STORE && ( + <> + + {Object.entries(manualItemsData).map(([key, item]) => ( + handleIconClick(key as StoreItemType)} + className={selectedItem === key ? "selected" : ""} + color={contentData.pointColor} + > + + + ))} + + {manualItemsData[selectedItem].title} + +
+
+ + )} + {contentStatus !== ContentStatus.STORE && ( + <> + {contentData.contentTitle} + +
+
+ + )} @@ -144,9 +183,10 @@ const ModalWrapper = styled.div<{ border-radius: 40px 40px 0 0; border: ${(props) => props.contentStatus === ContentStatus.PENDING - ? "5px double var(--sys-main-color)" - : props.contentStatus === ContentStatus.IN_SESSION - ? "5px solid var(--sys-main-color)" + ? "5px double var(--sys-default-main-color)" + : props.contentStatus === ContentStatus.IN_SESSION || + props.contentStatus === ContentStatus.COIN + ? "5px solid var(--sys-default-main-color)" : "none"}; box-shadow: ${(props) => props.contentStatus === ContentStatus.PENDING && @@ -166,8 +206,9 @@ const ModalContent = styled.div<{ display: flex; flex-direction: column; color: ${(props) => - props.contentStatus === ContentStatus.IN_SESSION - ? "var(--sys-main-color)" + props.contentStatus === ContentStatus.IN_SESSION || + props.contentStatus === ContentStatus.COIN + ? "var(--sys-default-main-color)" : props.contentStatus === ContentStatus.EXTENSION ? "var(--normal-text-color)" : "var(--white-text-with-bg-color)"}; @@ -188,8 +229,9 @@ const ModalContent = styled.div<{ } .moveButton { stroke: ${(props) => - props.contentStatus === ContentStatus.IN_SESSION - ? "var(--sys-main-color)" + props.contentStatus === ContentStatus.IN_SESSION || + props.contentStatus === ContentStatus.COIN + ? "var(--sys-default-main-color)" : props.contentStatus === ContentStatus.EXTENSION ? "var(--normal-text-color)" : "var(--white-text-with-bg-color)"}; @@ -210,8 +252,9 @@ const CloseButton = styled.div<{ svg { transform: scaleX(-1); stroke: ${(props) => - props.contentStatus === ContentStatus.IN_SESSION - ? "var(--sys-main-color)" + props.contentStatus === ContentStatus.IN_SESSION || + props.contentStatus === ContentStatus.COIN + ? "var(--sys-default-main-color)" : props.contentStatus === ContentStatus.EXTENSION ? "var(--normal-text-color)" : "var(--bg-color)"}; @@ -269,7 +312,7 @@ const BoxInfo2 = styled.div` } `; -const ManualContentStyeld = styled.div<{ +const ManualContentStyled = styled.div<{ color: string; }>` margin: 40px 0 0 20px; @@ -330,4 +373,45 @@ const ContentImgStyled = styled.div<{ } `; +const ItemContentsStyled = styled.div` + width: 45%; + height: 90px; + display: flex; + margin-bottom: 30px; +`; + +const ItemIconStyled = styled.div<{ + color: string; +}>` + width: 80px; + height: 80px; + margin-right: 10px; + display: flex; + justify-content: center; + align-items: center; + + & > svg { + padding: 4px; + width: 80px; + height: 80px; + cursor: pointer; + stroke-width: 50px; + & > path { + transform: scale(2); + stroke: var(--ref-purple-690); + } + } + + &:hover:not(.selected), + &.selected > svg { + width: 80px; + height: 80px; + filter: drop-shadow(0px 5px 3px var(--hover-box-shadow-color)); + transition: all 0.2s ease; + & > path { + stroke: ${(props) => props.color}; + } + } +`; + export default ManualModal; diff --git a/frontend/src/Cabinet/components/Modals/Modal.tsx b/frontend/src/Cabinet/components/Modals/Modal.tsx index a854f03a8..545b606bb 100644 --- a/frontend/src/Cabinet/components/Modals/Modal.tsx +++ b/frontend/src/Cabinet/components/Modals/Modal.tsx @@ -6,6 +6,7 @@ import Button from "@/Cabinet/components/Common/Button"; import { ReactComponent as CheckIcon } from "@/Cabinet/assets/images/checkIcon.svg"; import { ReactComponent as ErrorIcon } from "@/Cabinet/assets/images/errorIcon.svg"; import { ReactComponent as NotificationIcon } from "@/Cabinet/assets/images/notificationSign.svg"; +import useMenu from "@/Cabinet/hooks/useMenu"; import useMultiSelect from "@/Cabinet/hooks/useMultiSelect"; /** @@ -63,6 +64,7 @@ const Modal: React.FC<{ modalContents: IModalContents }> = (props) => { } = props.modalContents; const { isMultiSelect, closeMultiSelectMode } = useMultiSelect(); const navigator = useNavigate(); + const { closeAll } = useMenu(); return ( <> @@ -127,6 +129,7 @@ const Modal: React.FC<{ modalContents: IModalContents }> = (props) => { {url && urlTitle && ( { + closeAll(); navigator(url); }} > diff --git a/frontend/src/Cabinet/components/Search/SearchCabinetDetails.tsx b/frontend/src/Cabinet/components/Search/SearchCabinetDetails.tsx index 8861c7450..b092bb807 100644 --- a/frontend/src/Cabinet/components/Search/SearchCabinetDetails.tsx +++ b/frontend/src/Cabinet/components/Search/SearchCabinetDetails.tsx @@ -49,9 +49,7 @@ const SearchCabinetDetails = (props: ISearchDetail) => { ); const { openCabinet, closeCabinet } = useMenu(); const CabinetIcon = - cabinetIconComponentMap[ - cabinetInfo?.lentType || CabinetType.PRIVATE - ]; + cabinetIconComponentMap[cabinetInfo?.lentType || CabinetType.PRIVATE]; const clickSearchItem = () => { if ( @@ -150,7 +148,6 @@ const SearchCabinetDetails = (props: ISearchDetail) => { ); }; - const WrapperStyled = styled.div` width: 350px; height: 110px; @@ -252,4 +249,3 @@ const ButtonWrapper = styled.div` `; export default SearchCabinetDetails; - diff --git a/frontend/src/Cabinet/components/Search/SearchNoCabinetDetails.tsx b/frontend/src/Cabinet/components/Search/SearchNoCabinetDetails.tsx index 455a58aed..6456dfc49 100644 --- a/frontend/src/Cabinet/components/Search/SearchNoCabinetDetails.tsx +++ b/frontend/src/Cabinet/components/Search/SearchNoCabinetDetails.tsx @@ -145,7 +145,6 @@ const SearchNoCabinetDetails = (props: ISearchDetail) => { ); }; - const WrapperStyled = styled.div` width: 350px; height: 110px; diff --git a/frontend/src/Cabinet/components/Store/CoinLog/CoinLog.tsx b/frontend/src/Cabinet/components/Store/CoinLog/CoinLog.tsx index b6d867c8c..425692936 100644 --- a/frontend/src/Cabinet/components/Store/CoinLog/CoinLog.tsx +++ b/frontend/src/Cabinet/components/Store/CoinLog/CoinLog.tsx @@ -11,6 +11,7 @@ import { ReactComponent as CoinIcon } from "@/Cabinet/assets/images/coinIcon.svg import { ReactComponent as Select } from "@/Cabinet/assets/images/selectMaincolor.svg"; import { CoinLogToggleType } from "@/Cabinet/types/enum/store.enum"; import { axiosCoinLog } from "@/Cabinet/api/axios/axios.custom"; +import useDebounce from "@/Cabinet/hooks/useDebounce"; import { formatDate } from "@/Cabinet/utils/dateUtils"; const toggleList: toggleItem[] = [ @@ -44,10 +45,11 @@ const CoinLog = () => { const [userInfo] = useRecoilState(userState); const size = 5; // NOTE : size 만큼 데이터 불러옴 + const { debounce } = useDebounce(); - const getCoinLog = async (type: CoinLogToggleType) => { + const getCoinLog = async () => { try { - const response = await axiosCoinLog(type, page, size); + const response = await axiosCoinLog(toggleType, page, size); if (page === 0) { setCoinLogs(response.data.result); } else { @@ -71,9 +73,7 @@ const CoinLog = () => { }; useEffect(() => { - setTimeout(() => { - getCoinLog(toggleType); - }, 333); + debounce("coinLog", getCoinLog, 100); }, [page, toggleType]); useEffect(() => { diff --git a/frontend/src/Cabinet/components/Store/Inventory/InventoryItem.tsx b/frontend/src/Cabinet/components/Store/Inventory/InventoryItem.tsx index e15a09d89..340134de8 100644 --- a/frontend/src/Cabinet/components/Store/Inventory/InventoryItem.tsx +++ b/frontend/src/Cabinet/components/Store/Inventory/InventoryItem.tsx @@ -170,8 +170,7 @@ const ItemIconStyled = styled.div<{ itemType: StoreItemType }>` & > svg > path { stroke: var(--sys-main-color); - stroke-width: ${(props) => - props.itemType === StoreItemType.EXTENSION ? "2.8px" : "1.5px"}; + stroke-width: "1.5px"; } `; diff --git a/frontend/src/Cabinet/components/Store/ItemUsageLog/ItemLogBlock.tsx b/frontend/src/Cabinet/components/Store/ItemUsageLog/ItemLogBlock.tsx index b82eacb00..b6a2fae71 100644 --- a/frontend/src/Cabinet/components/Store/ItemUsageLog/ItemLogBlock.tsx +++ b/frontend/src/Cabinet/components/Store/ItemUsageLog/ItemLogBlock.tsx @@ -50,14 +50,13 @@ const IconBlockStyled = styled.div<{ itemName: string }>` svg { width: 40px; height: 40px; + transform-origin: center; } - & > svg > path { + & > svg > * { + transform: scale(1.25); stroke: var(--white-text-with-bg-color); - stroke-width: ${(props) => - props.itemName === ItemTypeLabelMap[StoreItemType.EXTENSION] - ? "3px" - : "1.5px"}; + stroke-width: "1.5px"; } `; diff --git a/frontend/src/Cabinet/components/UserCabinetInfoArea/UserCabinetInfoArea.tsx b/frontend/src/Cabinet/components/UserCabinetInfoArea/UserCabinetInfoArea.tsx index 67840970f..10071a05d 100644 --- a/frontend/src/Cabinet/components/UserCabinetInfoArea/UserCabinetInfoArea.tsx +++ b/frontend/src/Cabinet/components/UserCabinetInfoArea/UserCabinetInfoArea.tsx @@ -59,7 +59,7 @@ const UserCabinetInfoArea: React.FC<{ - + {selectedUserInfo.name} diff --git a/frontend/src/Cabinet/pages/AvailablePage.tsx b/frontend/src/Cabinet/pages/AvailablePage.tsx index 9cd4291a4..9ec0be173 100644 --- a/frontend/src/Cabinet/pages/AvailablePage.tsx +++ b/frontend/src/Cabinet/pages/AvailablePage.tsx @@ -29,6 +29,9 @@ const toggleList: toggleItem[] = [ { name: "공유", key: AvailableCabinetsType.SHARE }, ]; +/* TODO: DISABLED_FLOOR 을 환경변수로 넣기 */ +export const DISABLED_FLOOR = ["4"]; + const AvailablePage = () => { const [toggleType, setToggleType] = useState( AvailableCabinetsType.ALL @@ -98,10 +101,6 @@ const AvailablePage = () => { useEffect(() => { deleteRecoilPersistFloorSection(); - setTimeout(() => { - // 새로고침 광클 방지를 위한 초기 로딩 딜레이 - setIsLoaded(true); - }, 500); }, []); useEffect(() => { @@ -156,14 +155,16 @@ const AvailablePage = () => { /> - {isLoaded && cabinets ? ( - Object.entries(cabinets).map(([key, value]) => ( - - )) + {Object.keys(cabinets).length ? ( + Object.entries(cabinets) + .filter(([key, _]) => !DISABLED_FLOOR.includes(key)) + .map(([key, value]) => ( + + )) ) : ( )} diff --git a/frontend/src/Cabinet/pages/ItemUsageLogPage.tsx b/frontend/src/Cabinet/pages/ItemUsageLogPage.tsx index f34eb2c90..455e6d119 100644 --- a/frontend/src/Cabinet/pages/ItemUsageLogPage.tsx +++ b/frontend/src/Cabinet/pages/ItemUsageLogPage.tsx @@ -7,6 +7,7 @@ import { ItemIconMap } from "@/Cabinet/assets/data/maps"; import { ReactComponent as DropdownChevron } from "@/Cabinet/assets/images/dropdownChevron.svg"; import { StoreItemType } from "@/Cabinet/types/enum/store.enum"; import { axiosGetItemUsageHistory } from "@/Cabinet/api/axios/axios.custom"; +import useDebounce from "@/Cabinet/hooks/useDebounce"; const mapItemNameToType = (itemName: string): StoreItemType => { switch (itemName) { @@ -55,8 +56,9 @@ const ItemUsageLogPage = () => { const [isMoreBtnLoading, setIsMoreBtnLoading] = useState(true); const [isLoading, setIsLoading] = useState(true); const size = 5; + const { debounce } = useDebounce(); - const getItemUsageLog = async (page: number, size: number) => { + const getItemUsageLog = async () => { try { const data = await axiosGetItemUsageHistory(page, size); const newLogs = createLogEntries(data); @@ -72,13 +74,19 @@ const ItemUsageLogPage = () => { useEffect(() => { setTimeout(() => { - getItemUsageLog(page, size); + getItemUsageLog(); }, 333); }, [page]); const handleMoreClick = () => { - setPage((prev) => prev + 1); setIsMoreBtnLoading(true); + debounce( + "itemUsageLog", + () => { + setPage((prev) => prev + 1); + }, + 333 + ); }; return ( @@ -111,7 +119,6 @@ const ItemUsageLogPage = () => { {isMoreBtnLoading ? ( diff --git a/frontend/src/Cabinet/pages/MainPage.tsx b/frontend/src/Cabinet/pages/MainPage.tsx index dc73bc107..c98123f84 100644 --- a/frontend/src/Cabinet/pages/MainPage.tsx +++ b/frontend/src/Cabinet/pages/MainPage.tsx @@ -12,6 +12,7 @@ import { targetCabinetInfoState, } from "@/Cabinet/recoil/atoms"; import { currentFloorSectionState } from "@/Cabinet/recoil/selectors"; +import { DISABLED_FLOOR } from "@/Cabinet/pages/AvailablePage"; import CabinetListContainer from "@/Cabinet/components/CabinetList/CabinetList.container"; import LoadingAnimation from "@/Cabinet/components/Common/LoadingAnimation"; import SectionAlertModal from "@/Cabinet/components/Modals/StoreModal/SectionAlertModal"; @@ -74,11 +75,9 @@ const MainPage = () => { }, []); useEffect(() => { - const clubSection = clubSectionsData.find((section) => { + const clubSection = !!clubSectionsData.find((section) => { return section === currentSectionName; - }) - ? true - : false; + }); setIsClubSection(clubSection); }, [currentSectionName]); @@ -123,66 +122,58 @@ const MainPage = () => { setIsCurrentSectionRender(false); }; - return ( - <> - {isLoading && } - { - touchStartPosX.current = e.changedTouches[0].screenX; - touchStartPosY.current = e.changedTouches[0].screenY; - }} - onTouchEnd={(e: React.TouchEvent) => { - swipeSection( - e.changedTouches[0].screenX, - e.changedTouches[0].screenY - ); - }} - > - - {currentFloorSectionNames.includes(currentSectionName) && - !isClubSection && ( - - {sectionList[currentSectionIndex]?.alarmRegistered === true ? ( - - ) : ( - - )} - - )} - - - - - {currentSectionName !== SectionType.elevator && - currentSectionName !== SectionType.stairs && ( - - 새로고침 - - )} - - {showSectionAlertModal && ( - - )} - - + return isLoading ? ( + + ) : ( + { + touchStartPosX.current = e.changedTouches[0].screenX; + touchStartPosY.current = e.changedTouches[0].screenY; + }} + onTouchEnd={(e: React.TouchEvent) => { + swipeSection(e.changedTouches[0].screenX, e.changedTouches[0].screenY); + }} + > + + {currentFloorSectionNames.includes(currentSectionName) && + !isClubSection && ( + + {sectionList[currentSectionIndex]?.alarmRegistered === true ? ( + + ) : ( + + )} + + )} + + + + + {currentSectionName !== SectionType.elevator && + currentSectionName !== SectionType.stairs && ( + + 새로고침 + + )} + + {showSectionAlertModal && ( + + )} + ); }; @@ -229,7 +220,11 @@ const IconWrapperStyled = styled.div<{ disabled: boolean }>` } `; -const AlertStyled = styled.div` +const AlertStyled = styled.div<{ currentFloor: number }>` + visibility: ${(props) => + DISABLED_FLOOR.includes(props.currentFloor.toString()) + ? "hidden" + : "visible"}; height: 30px; display: flex; justify-content: end; diff --git a/frontend/src/Cabinet/pages/PostLogin.tsx b/frontend/src/Cabinet/pages/PostLogin.tsx index c840badad..ef31dbbd8 100644 --- a/frontend/src/Cabinet/pages/PostLogin.tsx +++ b/frontend/src/Cabinet/pages/PostLogin.tsx @@ -46,6 +46,7 @@ const PostLogin = (): JSX.Element => { let time = setTimeout(() => { navigate("/home"); }, 600); + return () => { clearTimeout(time); }; diff --git a/frontend/src/Cabinet/pages/admin/AdminMainPage.tsx b/frontend/src/Cabinet/pages/admin/AdminMainPage.tsx index de410c157..adc495cb1 100644 --- a/frontend/src/Cabinet/pages/admin/AdminMainPage.tsx +++ b/frontend/src/Cabinet/pages/admin/AdminMainPage.tsx @@ -93,44 +93,43 @@ const AdminMainPage = () => { else moveToRightSection(); }; - return ( - <> - {isLoading && } - { - touchStartPosX.current = e.changedTouches[0].screenX; - touchStartPosY.current = e.changedTouches[0].screenY; - }} - onTouchEnd={(e: React.TouchEvent) => { - swipeSection( - e.changedTouches[0].screenX, - e.changedTouches[0].screenY - ); - }} - > - - - - - - + return isLoading ? ( + + ) : ( + { + touchStartPosX.current = e.changedTouches[0].screenX; + touchStartPosY.current = e.changedTouches[0].screenY; + }} + onTouchEnd={(e: React.TouchEvent) => { + swipeSection( + e.changedTouches[0].screenX, + e.changedTouches[0].screenY + ); + }} + > + + + + + + - - 새로고침 - - - - + + 새로고침 + + + ); }; diff --git a/frontend/src/Cabinet/types/enum/content.status.enum.ts b/frontend/src/Cabinet/types/enum/content.status.enum.ts index cb348bd85..535867bca 100644 --- a/frontend/src/Cabinet/types/enum/content.status.enum.ts +++ b/frontend/src/Cabinet/types/enum/content.status.enum.ts @@ -5,6 +5,8 @@ export enum ContentStatus { PENDING = "PENDING", IN_SESSION = "IN_SESSION", EXTENSION = "EXTENSION", + COIN = "COIN", + STORE = "STORE", } export default ContentStatus; From 30a71308b6ce9552a2750917d2cf21d24fd47e32 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Wed, 23 Oct 2024 13:35:27 +0900 Subject: [PATCH 128/132] =?UTF-8?q?[FE]=20BUG:=20=ED=99=88=20=ED=99=94?= =?UTF-8?q?=EB=A9=B4=20=EC=83=81=EC=84=B8=EB=B3=B4=EA=B8=B0=20=EB=B2=84?= =?UTF-8?q?=ED=8A=BC=20=EB=88=8C=EB=A0=80=EC=9D=84=EB=95=8C=20=EC=B5=9C?= =?UTF-8?q?=EC=8B=A0=EA=B8=80=EB=A1=9C=20=EC=9D=B4=EB=8F=99=ED=95=98?= =?UTF-8?q?=EA=B2=8C=20url=20=EB=B3=80=EA=B2=BD=20#1697?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/components/Home/ServiceManual.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/Cabinet/components/Home/ServiceManual.tsx b/frontend/src/Cabinet/components/Home/ServiceManual.tsx index ccf8c876c..97ad30ebc 100644 --- a/frontend/src/Cabinet/components/Home/ServiceManual.tsx +++ b/frontend/src/Cabinet/components/Home/ServiceManual.tsx @@ -20,7 +20,7 @@ const ServiceManual = ({ }; const openNotionLink = () => { - window.open("https://cabi.oopy.io/0bbb08a2-241c-444b-8a96-6b33c3796451"); + window.open("https://cabi.oopy.io/115f29ec-ef8e-4748-a8a6-0d0341def33c"); }; return ( From eb89e84f6ec3a5bbba27ce506b8f7fae78e9e3fb Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Wed, 23 Oct 2024 14:30:42 +0900 Subject: [PATCH 129/132] =?UTF-8?q?[FE]=20FEAT:=20=ED=99=88=20=ED=99=94?= =?UTF-8?q?=EB=A9=B4=20=EC=83=81=EC=84=B8=EB=B3=B4=EA=B8=B0=20=EB=B2=84?= =?UTF-8?q?=ED=8A=BC=EC=97=90=20=EB=A6=AC=EB=94=94=EB=A0=89=EC=85=98=20?= =?UTF-8?q?=EC=95=8C=EB=A0=A4=EC=A3=BC=EB=8A=94=20=EC=95=84=EC=9D=B4?= =?UTF-8?q?=EC=BD=98=20=EC=B6=94=EA=B0=80=20#1697?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/assets/images/link.svg | 1 + .../Cabinet/components/Home/ServiceManual.tsx | 30 +++++++++++++++++-- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/frontend/src/Cabinet/assets/images/link.svg b/frontend/src/Cabinet/assets/images/link.svg index 12f737bb7..764944841 100644 --- a/frontend/src/Cabinet/assets/images/link.svg +++ b/frontend/src/Cabinet/assets/images/link.svg @@ -1,4 +1,5 @@ + diff --git a/frontend/src/Cabinet/components/Home/ServiceManual.tsx b/frontend/src/Cabinet/components/Home/ServiceManual.tsx index 97ad30ebc..2b21425d0 100644 --- a/frontend/src/Cabinet/components/Home/ServiceManual.tsx +++ b/frontend/src/Cabinet/components/Home/ServiceManual.tsx @@ -2,6 +2,7 @@ import { useState } from "react"; import styled from "styled-components"; import ManualContentBox from "@/Cabinet/components/Home/ManualContentBox"; import ManualModal from "@/Cabinet/components/Modals/ManualModal/ManualModal"; +import { ReactComponent as LinkImg } from "@/Cabinet/assets/images/link.svg"; import ContentStatus from "@/Cabinet/types/enum/content.status.enum"; const ServiceManual = ({ @@ -31,6 +32,8 @@ const ServiceManual = ({ 상세보기 + {/* 상세보기 */} + @@ -148,9 +151,30 @@ const NotionBtn = styled.button` color: var(--notion-btn-text-color); background: var(--bg-color); border: 1px solid var(--line-color); - :hover { - color: var(--normal-text-color); - font-weight: 400; + /* display: flex; + align-items: center; + justify-content: center; */ + @media (hover: hover) and (pointer: fine) { + &:hover { + color: var(--normal-text-color); + font-weight: 400; + + #linknImg > path { + stroke: var(--normal-text-color); + stroke-width: 1.2px; + } + } + } + + /* & > span { + line-height: 14px; + height: 16px; + } */ + + & > #linknImg { + width: 12px; + height: 12px; + margin-left: 4px; } `; From a9b48c5aa4c35fa536ab545b10fffba727920eb1 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Wed, 23 Oct 2024 14:33:47 +0900 Subject: [PATCH 130/132] =?UTF-8?q?[FE]=20FIX:=20=EC=83=81=EC=84=B8?= =?UTF-8?q?=EB=B3=B4=EA=B8=B0=20=EA=B8=80=EC=9E=90=20=EC=9C=84=EC=B9=98=20?= =?UTF-8?q?=EC=A1=B0=EC=A0=95=20#1697?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Cabinet/components/Home/ServiceManual.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/frontend/src/Cabinet/components/Home/ServiceManual.tsx b/frontend/src/Cabinet/components/Home/ServiceManual.tsx index 2b21425d0..8416dd658 100644 --- a/frontend/src/Cabinet/components/Home/ServiceManual.tsx +++ b/frontend/src/Cabinet/components/Home/ServiceManual.tsx @@ -31,8 +31,7 @@ const ServiceManual = ({ Cabi 이용 안내서 - 상세보기 - {/* 상세보기 */} + 상세보기 @@ -151,9 +150,9 @@ const NotionBtn = styled.button` color: var(--notion-btn-text-color); background: var(--bg-color); border: 1px solid var(--line-color); - /* display: flex; + display: flex; align-items: center; - justify-content: center; */ + justify-content: center; @media (hover: hover) and (pointer: fine) { &:hover { color: var(--normal-text-color); @@ -166,10 +165,10 @@ const NotionBtn = styled.button` } } - /* & > span { + & > span { line-height: 14px; height: 16px; - } */ + } & > #linknImg { width: 12px; From ce3b8895fe61aba6bb52c335c48c8136cbb2283a Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Wed, 23 Oct 2024 14:34:51 +0900 Subject: [PATCH 131/132] =?UTF-8?q?[FE]=20DOCS:=20link.svg=20=EC=9B=90?= =?UTF-8?q?=EB=9E=98=EB=8C=80=EB=A1=9C=20=EB=B3=B5=EA=B5=AC=20#1697?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/assets/images/link.svg | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/src/Cabinet/assets/images/link.svg b/frontend/src/Cabinet/assets/images/link.svg index 764944841..12f737bb7 100644 --- a/frontend/src/Cabinet/assets/images/link.svg +++ b/frontend/src/Cabinet/assets/images/link.svg @@ -1,5 +1,4 @@ - From 2744fb02baab284de656cb4c316fc2ea61e6a046 Mon Sep 17 00:00:00 2001 From: jnkeniaem Date: Fri, 25 Oct 2024 13:40:50 +0900 Subject: [PATCH 132/132] [COMMON] ETC: config changed --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 93674bce3..0d3244f5b 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit 93674bce354efe9ad8fb3a7a934bdbf5acd1d162 +Subproject commit 0d3244f5b700c2b735c13a73ed4e8868139b144f