Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#47] style : 전체 대시보드 가게 메뉴바 추가 #48

Merged
merged 12 commits into from
Nov 22, 2023
1 change: 1 addition & 0 deletions components/hooks/usePopupData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { getPopups } from "@/pages/api/popup";
import { useEffect, useState } from "react";



interface Popup {
title: string;
content: string;
Expand Down
4 changes: 3 additions & 1 deletion pages/dashboard/[store].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ const StorePage = () => {
<FirstLayerChart title="신규 방문 인원" content="5" />
</styles.SecondBox>
<styles.ThirdBox>
<FirstLayerChart title="1인 평균 제휴 횟수" content="1.3회" />

<FirstLayerChart title="평균 혜택 이용 수" content="1.3회" />

</styles.ThirdBox>
<styles.FourthBox>
<ComposedChart title="총 판매 금액 & 제휴 제공 금액" />
Expand Down
11 changes: 8 additions & 3 deletions pages/dashboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import StackCharts from "./StackCharts";
import ListChart from "./ListChart";
import { useDashBoardData } from "@/components/hooks/useDashBoardData";
import BarChart from "./BarChart";
import Filter from "@/components/organisms/Filter";

interface DashBoardProps {}
interface DateState {
Expand All @@ -25,6 +26,10 @@ const DashBoardPage: React.FC = () => {
const { dateRange, calculateDateRange } = useDateRange();
const barChartData = useDashBoardData({ selection: 1 }).data;
const barChartData2 = useDashBoardData({ selection: 2 }).data;
const [contentFilter, setContentFilter] = useState<
"NONE" | "FOOD" | "CAFE" | "BEAUTY" | "CULTURE" | "ETC"
>("FOOD");

const [dateFilter, setDateFilter] = useState<DateState>({
dates: dates.aWeek,
});
Expand Down Expand Up @@ -55,15 +60,15 @@ const DashBoardPage: React.FC = () => {
</styles.TitleContainer>

<styles.OptionContainer>
<styles.ButtonWrapper>
{/* <styles.ButtonWrapper>
<styles.IndexButton>전체</styles.IndexButton>
<styles.IndexButton>음식점</styles.IndexButton>
<styles.IndexButton>카페</styles.IndexButton>
<styles.IndexButton>미용</styles.IndexButton>
<styles.IndexButton>문화</styles.IndexButton>
<styles.IndexButton>기타</styles.IndexButton>
</styles.ButtonWrapper>

</styles.ButtonWrapper> */}
<Filter setContentFilter={setContentFilter} />
<styles.ButtonWrapper>
<styles.IndexButton>최근 7일</styles.IndexButton>
<styles.IndexButton>최근 14일</styles.IndexButton>
Expand Down
2 changes: 1 addition & 1 deletion pages/student/popup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import EmptyComponent from "@/components/atoms/EmptyComponent";
import { usePopupData } from "@/components/hooks/usePopupData";
import { Checkbox } from "@mui/material";


const PopupAdminPage: React.FC = () => {
const router = useRouter();

Expand Down Expand Up @@ -85,6 +86,5 @@ const PopupAdminPage: React.FC = () => {
);
};


export default PopupAdminPage;

1 change: 0 additions & 1 deletion pages/user/form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { useRouter } from "next/router";
import { css } from "@emotion/css";
import styled from "@emotion/styled";


interface FormPageProps {}

enum Unions {
Expand Down
15 changes: 14 additions & 1 deletion pages/user/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { Checkbox } from "@mui/material";
import Head from "next/head";
import { useRouter } from "next/router";
import { useEffect, useState } from "react";

import CheckCircleIcon from "@mui/icons-material/CheckCircle";
import CircleIcon from "@mui/icons-material/Circle";
interface UserProps {
name?: string;
isLogin?: boolean;
Expand Down Expand Up @@ -82,6 +83,10 @@ const UserPage: React.FC<UserProps> = () => {
<styles.AgreementInnerBox>
<styles.Checks style={{ borderBottom: "1px solid #D0D0D0" }}>
<Checkbox

icon={<CircleIcon />}
checkedIcon={<CheckCircleIcon />}

onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
const { checked } = e.target;
checked
Expand All @@ -105,6 +110,8 @@ const UserPage: React.FC<UserProps> = () => {
</styles.Checks>
<styles.Checks>
<Checkbox
icon={<CircleIcon />}
checkedIcon={<CheckCircleIcon />}
checked={checked.second}
name="second"
onChange={checkBoxHandler}
Expand All @@ -113,6 +120,8 @@ const UserPage: React.FC<UserProps> = () => {
</styles.Checks>
<styles.Checks>
<Checkbox
icon={<CircleIcon />}
checkedIcon={<CheckCircleIcon />}
name="third"
checked={checked.third}
onChange={checkBoxHandler}
Expand All @@ -121,6 +130,8 @@ const UserPage: React.FC<UserProps> = () => {
</styles.Checks>
<styles.Checks>
<Checkbox
icon={<CircleIcon />}
checkedIcon={<CheckCircleIcon />}
name="fourth"
checked={checked.fourth}
onChange={checkBoxHandler}
Expand All @@ -129,6 +140,8 @@ const UserPage: React.FC<UserProps> = () => {
</styles.Checks>
<styles.Checks>
<Checkbox
icon={<CircleIcon />}
checkedIcon={<CheckCircleIcon />}
name="fifth"
checked={checked.fifth}
onChange={checkBoxHandler}
Expand Down