Skip to content

Commit

Permalink
[Ticket-v0.0.4]
Browse files Browse the repository at this point in the history
[Ticket-v0.0.4]
  • Loading branch information
9yujin authored Feb 24, 2023
2 parents a9880d2 + b13f83b commit 6346c1b
Show file tree
Hide file tree
Showing 232 changed files with 10,236 additions and 846 deletions.
7 changes: 6 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
"react/react-in-jsx-scope": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-empty-function": "off",
"react/no-unknown-property": ["error", { "ignore": ["css"] }]
"react/no-unknown-property": ["error", { "ignore": ["css"] }],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{ "ignoreRestSiblings": true }
]
}
}
8 changes: 6 additions & 2 deletions apps/admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,22 @@
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link
<!-- <link
rel="stylesheet"
as="style"
crossorigin
href="https://cdn.jsdelivr.net/gh/orioncactus/[email protected]/dist/web/static/pretendard-dynamic-subset.css"
/>
/> -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#F8F8FA" />
<title>두둥! - 어드민</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<script
type="text/javascript"
src="//dapi.kakao.com/v2/maps/sdk.js?appkey=9c08b495df2ecbc09bd453fb53701551&libraries=services,clusterer"
></script>
</body>
</html>
4 changes: 3 additions & 1 deletion apps/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@
"@dudoong/utils": "workspace:shared/utils",
"@emotion/react": "^11.10.5",
"@emotion/styled": "^11.10.5",
"@tanstack/react-query-devtools": "^4.20.4",
"@toast-ui/editor": "^3.2.1",
"@toast-ui/editor-plugin-chart": "^3.0.1",
"@toast-ui/editor-plugin-code-syntax-highlight": "^3.1.0",
"@toast-ui/editor-plugin-color-syntax": "^3.1.0",
"@toast-ui/editor-plugin-table-merged-cell": "^3.1.0",
"@toast-ui/editor-plugin-uml": "^3.0.1",
"@toast-ui/react-editor": "^3.2.2",
"antd": "^5.2.2",
"react": "^18.2.0",
"react-cookie": "^4.1.1",
"react-dom": "^18.2.0",
"react-error-boundary": "^3.1.4",
"react-router-dom": "^6.6.1",
"recoil": "^0.7.6",
"vite-plugin-svgr": "^2.4.0"
Expand Down
47 changes: 47 additions & 0 deletions apps/admin/src/assets/Pagination.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
export const Right = () => {
return (
<>
<svg
width="9"
height="16"
viewBox="0 0 9 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M0.664752 15.1477C0.445083 14.9281 0.445083 14.5719 0.664752 14.3523L7.01701 8L0.664753 1.64775C0.445083 1.42808 0.445083 1.07192 0.664753 0.852252C0.884423 0.632583 1.24058 0.632583 1.46025 0.852252L8.21025 7.60225C8.42992 7.82192 8.42992 8.17808 8.21025 8.39775L1.46025 15.1477C1.24058 15.3674 0.884422 15.3674 0.664752 15.1477Z"
fill="#7A7A80"
stroke="#7A7A80"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
</>
);
};

export const Left = () => {
return (
<>
<svg
width="9"
height="16"
viewBox="0 0 9 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M8.33525 0.852252C8.55492 1.07192 8.55492 1.42808 8.33525 1.64775L1.98299 8L8.33525 14.3523C8.55492 14.5719 8.55492 14.9281 8.33525 15.1477C8.11558 15.3674 7.75942 15.3674 7.53975 15.1477L0.789752 8.39775C0.570082 8.17808 0.570082 7.82192 0.789752 7.60225L7.53975 0.852252C7.75942 0.632582 8.11558 0.632582 8.33525 0.852252Z"
fill="#7A7A80"
stroke="#7A7A80"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
</>
);
};
3 changes: 3 additions & 0 deletions apps/admin/src/assets/moreVert.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions apps/admin/src/assets/recommendation.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
300 changes: 300 additions & 0 deletions apps/admin/src/assets/stickers.tsx

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions apps/admin/src/components/events/dashboard/CheckList.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ListHeader, Spacing } from '@dudoong/ui';
import BorderBox from '@dudoong/ui/src/layout/BorderBox';
import { ListHeader, Spacing, BorderBox } from '@dudoong/ui';

import ListContents from './ListContents';

const CheckList = ({ check }: { check: boolean[] | null }) => {
Expand Down
2 changes: 1 addition & 1 deletion apps/admin/src/components/events/dashboard/EventInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { TicketPerforatedFill } from '@dudoong/ui';
import MiniBox from './MiniBox';
import TotalBox from './TotalBox';
import TicketRatio from './TicketRatio';
import { DashBoardStatisticResponse } from '@lib/apis/event/eventType';
import type { DashBoardStatisticResponse } from '@lib/apis/event/eventType';
import { useQuery } from '@tanstack/react-query';
import EventApi from '@lib/apis/event/EventApi';
import { Dispatch, SetStateAction } from 'react';
Expand Down
3 changes: 1 addition & 2 deletions apps/admin/src/components/events/dashboard/MiniBox.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { ReactNode } from 'react';
import BorderBox from '@dudoong/ui/src/layout/BorderBox';
import { css } from '@emotion/react';
import { FlexBox, Spacing, Text } from '@dudoong/ui';
import { BorderBox, FlexBox, Spacing, Text } from '@dudoong/ui';

const MiniBox = ({
icon,
Expand Down
10 changes: 8 additions & 2 deletions apps/admin/src/components/events/dashboard/TicketRatio.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import BorderBox from '@dudoong/ui/src/layout/BorderBox';
import { css } from '@emotion/react';
import { FlexBox, Spacing, Text, PeopleFill, theme } from '@dudoong/ui';
import {
FlexBox,
Spacing,
Text,
PeopleFill,
theme,
BorderBox,
} from '@dudoong/ui';
import styled from '@emotion/styled';

const TicketRatio = ({
Expand Down
3 changes: 1 addition & 2 deletions apps/admin/src/components/events/dashboard/TotalBox.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { css } from '@emotion/react';
import { FlexBox, Text } from '@dudoong/ui';
import BorderBox from '@dudoong/ui/src/layout/BorderBox';
import { BorderBox, FlexBox, Text } from '@dudoong/ui';

const TotalBox = ({ total }: { total: string }) => {
return (
Expand Down
28 changes: 16 additions & 12 deletions apps/admin/src/components/events/detail/EventDetailInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ListHeader, Text } from '@dudoong/ui';
import styled from '@emotion/styled';
import { Dispatch, SetStateAction, useEffect, useRef } from 'react';
import {
import { Dispatch, SetStateAction, useEffect, useRef, useState } from 'react';
import type {
UpdateEventDetailRequest,
ImageUrlResponse,
} from '@lib/apis/event/eventType';
Expand All @@ -19,6 +19,7 @@ import colorSyntax from '@toast-ui/editor-plugin-color-syntax';
import tableMergedCell from '@toast-ui/editor-plugin-table-merged-cell';
import uml from '@toast-ui/editor-plugin-uml';
import { HookCallback } from '@toast-ui/editor/types/editor';
import '@toast-ui/editor/dist/i18n/ko-kr';

interface EventDetailInfoProps {
content: string;
Expand All @@ -31,6 +32,7 @@ const EventDetailInfo = ({
setForm,
eventId,
}: EventDetailInfoProps) => {
const [curContent, setCurContent] = useState<string>('');
const toolbarItems = [
['heading', 'bold', 'italic', 'strike'],
['hr', 'quote'],
Expand All @@ -41,6 +43,11 @@ const EventDetailInfo = ({
];
const editorRef = useRef<Editor>(null);

useEffect(() => {
setCurContent(content);
if (editorRef.current) editorRef.current!.getInstance().setHTML(content);
}, [content]);

// presigned 발급 api
const postEventImageMutation = useMutation(EventApi.POST_EVENT_IMAGE, {
onSuccess: async (data: ImageUrlResponse) => {
Expand Down Expand Up @@ -82,31 +89,28 @@ const EventDetailInfo = ({
console.log(editorRef.current!.getInstance().getHTML());
};

useEffect(() => {
if (editorRef.current && content) {
editorRef.current.getInstance().setHTML(content);
}
}, [content]);

return (
<div>
<ListHeader
title={'공연 상세 내용'}
size={'listHeader_18'}
padding={[32, 0, 12, 0]}
padding={[56, 0, 12, 0]}
description={<TitleDescription />}
/>
<EditorWrapper>
<Editor
ref={editorRef}
onChange={onChange}
placeholder="공연 상세 내용을 입력해주세요."
previewStyle="tab" // 미리보기 스타일 지정
// hideModeSwitch={true} // 모드 바꾸기 스위치 숨기기 여부
previewStyle="vertical" // 미리보기 스타일 지정
initialValue={curContent}
hideModeSwitch={true} // 모드 바꾸기 스위치 숨기기 여부
previewHighlight={true}
height="398px" // 에디터 창 높이
height="500px" // 에디터 창 높이
initialEditType="wysiwyg" // 초기 입력모드 설정
toolbarItems={toolbarItems}
useCommandShortcut={false}
language="ko-KR"
autofocus
hooks={{
addImageBlobHook: uploadImageHandler,
Expand Down
4 changes: 2 additions & 2 deletions apps/admin/src/components/events/detail/EventImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const EventImage = ({ imageKey, setImageInfo }: EventImageProps) => {
return (
<div>
<ListHeader
title={'공연 상세 내용'}
title={'공연 포스터'}
size={'listHeader_18'}
padding={[32, 0, 12, 0]}
description={<TitleDescription />}
Expand Down Expand Up @@ -106,7 +106,7 @@ const TitleDescription = () => {
// -----------------------------------------------

const Wrapper = styled(RoundBlock)`
width: 100%;
width: 398px;
height: 398px;
`;

Expand Down
Loading

0 comments on commit 6346c1b

Please sign in to comment.