diff --git a/src/app/tanstack-query/assetManagement/RegularAsset/useRegularAssets.ts b/src/app/tanstack-query/assetManagement/RegularAsset/useRegularAssets.ts index b1d5b804..4b01c3b1 100644 --- a/src/app/tanstack-query/assetManagement/RegularAsset/useRegularAssets.ts +++ b/src/app/tanstack-query/assetManagement/RegularAsset/useRegularAssets.ts @@ -3,10 +3,7 @@ import { SESSION_STORAGE_KEY_TOKEN } from "@api/keys.ts"; import { DOMAIN } from "@api/url.ts"; import { RegularAssetsRequest } from "@app/types/asset.ts"; import { useQuery } from "@tanstack/react-query"; -import { - QUERY_KEY_REGULAR_ASSET, - QUERY_KEY_SCHEDULES, -} from "@constants/queryKeys.ts"; +import { QUERY_KEY_REGULAR_ASSET } from "@constants/queryKeys.ts"; import { Schedule } from "@app/types/schedule.ts"; const fetchRegularAssets = async (query: RegularAssetsRequest) => { diff --git a/src/components/ScheduleDrawer/ScheduleDrawer.styles.ts b/src/components/ScheduleDrawer/ScheduleDrawer.styles.ts new file mode 100644 index 00000000..a9771901 --- /dev/null +++ b/src/components/ScheduleDrawer/ScheduleDrawer.styles.ts @@ -0,0 +1,12 @@ +import { styled } from "@mui/material"; +import { grey } from "@mui/material/colors"; + +export const Puller = styled("div")(({ theme }) => ({ + width: 30, + height: 6, + backgroundColor: theme.palette.mode === "light" ? grey[300] : grey[900], + borderRadius: 3, + position: "absolute", + top: 8, + left: "calc(50% - 15px)", +})); diff --git a/src/pages/AssetManagement/pages/AssetBuCategory/components/CategoryList/CategoryListItem/components/ListItemHeader/ListItemHeader.tsx b/src/pages/AssetManagement/pages/AssetBuCategory/components/CategoryList/CategoryListItem/components/ListItemHeader/ListItemHeader.tsx index c9b0b73d..78de58df 100644 --- a/src/pages/AssetManagement/pages/AssetBuCategory/components/CategoryList/CategoryListItem/components/ListItemHeader/ListItemHeader.tsx +++ b/src/pages/AssetManagement/pages/AssetBuCategory/components/CategoryList/CategoryListItem/components/ListItemHeader/ListItemHeader.tsx @@ -1,4 +1,4 @@ -import { Avatar, Stack, Typography } from "@mui/material"; +import { Stack, Typography } from "@mui/material"; import { CATEGORY_ICONS } from "@components/ScheduleList/constants.ts"; import ArrowDropDownIcon from "@mui/icons-material/ArrowDropDown"; import ArrowDropUpIcon from "@mui/icons-material/ArrowDropUp"; diff --git a/src/pages/AssetManagement/pages/SavingGoal/components/GoalSetting/SettingDrawer/useSettingDrawer.tsx b/src/pages/AssetManagement/pages/SavingGoal/components/GoalSetting/SettingDrawer/useSettingDrawer.tsx index 9465f746..b17f5ed3 100644 --- a/src/pages/AssetManagement/pages/SavingGoal/components/GoalSetting/SettingDrawer/useSettingDrawer.tsx +++ b/src/pages/AssetManagement/pages/SavingGoal/components/GoalSetting/SettingDrawer/useSettingDrawer.tsx @@ -1,22 +1,12 @@ import { useOverlay } from "@hooks/use-overlay/useOverlay.tsx"; import { styled, SwipeableDrawer } from "@mui/material"; import CssBaseline from "@mui/material/CssBaseline"; -import { grey } from "@mui/material/colors"; import SettingDrawer from "@pages/AssetManagement/pages/SavingGoal/components/GoalSetting/SettingDrawer/SettingDrawer.tsx"; import { getAmount } from "@pages/AssetManagement/utils.ts"; import { useDialog } from "@hooks/dialog/useDialog.tsx"; import { MonthSavingGoal } from "@app/types/asset.ts"; import useSavingGoal from "@hooks/assetManagement/useSavingGoal.ts"; - -const Puller = styled("div")(({ theme }) => ({ - width: 30, - height: 6, - backgroundColor: theme.palette.mode === "light" ? grey[300] : grey[900], - borderRadius: 3, - position: "absolute", - top: 8, - left: "calc(50% - 15px)", -})); +import { Puller } from "@components/ScheduleDrawer/ScheduleDrawer.styles.ts"; export const useSettingGoalDrawer = () => { const { openOverlay, closeOverlay } = useOverlay(); diff --git a/src/pages/AssetManagement/pages/SpendingGoal/SpendingGoal.tsx b/src/pages/AssetManagement/pages/SpendingGoal/SpendingGoal.tsx index 263cbbe2..fe100fa1 100644 --- a/src/pages/AssetManagement/pages/SpendingGoal/SpendingGoal.tsx +++ b/src/pages/AssetManagement/pages/SpendingGoal/SpendingGoal.tsx @@ -1,13 +1,8 @@ import useSpendingGoal from "@hooks/assetManagement/useSpendingGoal.ts"; import { Box, Stack } from "@mui/material"; import MonthSpendingGoal from "@pages/AssetManagement/pages/SpendingGoal/components/MonthSpendingGoal"; -import RegularSpendingGoal from "@pages/AssetManagement/pages/SpendingGoal/components/RegularSpendingGoal"; import { useModal } from "@hooks/modal/useModal.tsx"; -import { Form } from "@pages/AssetManagement/pages/SpendingGoal/components/RegularSpendingGoal/ModifyRegularSpendingGoal.tsx"; -import ConfirmModal from "pages/AssetManagement/pages/SpendingGoal/components/RegularSpendingGoal/components/ConfirmModal"; -import { useState } from "react"; import ModifyModal from "pages/AssetManagement/pages/SpendingGoal/components/MonthSpendingGoal/components/ModifyModal"; -import { getDate } from "@pages/AssetManagement/pages/SpendingGoal/utils.ts"; import moment from "moment"; import { getAmount } from "@pages/AssetManagement/utils.ts"; import RoundedPaper from "@components/common/RoundedPaper.tsx"; @@ -17,7 +12,6 @@ import ReportLayout from "@pages/reports/Report/components/layout/ReportLayout"; function SpendingGoal() { const { offSpendAmount, - onSpendAmount, monthlyReport, userName, yearMonth, @@ -34,8 +28,6 @@ function SpendingGoal() { is_batch: false, }; - const [isModify, setIsModify] = useState(false); - const handleModify = () => { openModal({ modalElement: ( @@ -55,37 +47,6 @@ function SpendingGoal() { }); }; - const handleSubmit = (form: Form) => { - if (offSpendAmount.spend_goal_amount !== "?") { - openModal({ - modalElement: ( - { - changeRegularGoal(form, true); - }} - handleReject={() => { - changeRegularGoal(form, false); - }} - /> - ), - isBackdropClickable: false, - }); - } else { - changeRegularGoal(form, true); - } - }; - - const changeRegularGoal = (form: Form, isBatch: boolean) => { - handleSetSpendingGoal({ - ...form, - regular: "ON" as const, - is_batch: isBatch, - }); - setIsModify(false); - closeModal(); - }; - return ( @@ -116,15 +77,6 @@ function SpendingGoal() { } /> - {/* setIsModify(true)}*/} - {/* handleSubmit={handleSubmit}*/} - {/* closeModify={() => setIsModify(false)}*/} - {/* isModify={isModify}*/} - {/* goal={onSpendAmount.spend_goal_amount}*/} - {/* startDate={getDate(onSpendAmount.start_date) ?? yearMonth}*/} - {/* endDate={getDate(onSpendAmount.end_date) ?? yearMonth}*/} - {/*/>*/} ); } diff --git a/src/pages/AssetManagement/pages/SpendingGoal/components/MonthSpendingGoal/MonthSpendingGoal.tsx b/src/pages/AssetManagement/pages/SpendingGoal/components/MonthSpendingGoal/MonthSpendingGoal.tsx index 3381ee55..c63c965d 100644 --- a/src/pages/AssetManagement/pages/SpendingGoal/components/MonthSpendingGoal/MonthSpendingGoal.tsx +++ b/src/pages/AssetManagement/pages/SpendingGoal/components/MonthSpendingGoal/MonthSpendingGoal.tsx @@ -18,7 +18,6 @@ function MonthSpendingGoal({ changeYearAndMonth, handleModify, goal, - spent, }: MonthSpendingGoalProps) { return (