Skip to content

Commit

Permalink
Merge pull request #58 from PoolC/feature
Browse files Browse the repository at this point in the history
room reservation calendar
  • Loading branch information
jinoov authored Dec 30, 2023
2 parents a3d0e74 + 2d14548 commit 7884f3e
Show file tree
Hide file tree
Showing 35 changed files with 866 additions and 43 deletions.
286 changes: 286 additions & 0 deletions .pnp.cjs

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions apps/web-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@
"axios": "0.21.2",
"classnames": "2.3.2",
"codemirror": "5.65.15",
"date-fns": "^3.0.6",
"dayjs": "1.11.9",
"dotenv": "8.2.0",
"form-data": "4.0.0",
"qs": "6.9.7",
"react": "17.0.2",
"react-activity-calendar": "2.0.2",
"react-big-calendar": "^1.8.5",
"react-dom": "17.0.2",
"react-icons": "4.10.1",
"react-redux": "7.2.2",
Expand All @@ -42,6 +44,7 @@
"@types/node": "18.15.3",
"@types/qs": "6.9.7",
"@types/react": "17.0.2",
"@types/react-big-calendar": "^1.8.7",
"@types/react-dom": "17.0.2",
"@types/react-redux": "7.1.25",
"@types/react-router-dom": "5.3.3",
Expand Down
2 changes: 2 additions & 0 deletions apps/web-client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import localeData from 'dayjs/plugin/localeData';
import weekday from 'dayjs/plugin/weekday';
import weekOfYear from 'dayjs/plugin/weekOfYear';
import weekYear from 'dayjs/plugin/weekYear';
import isBetween from 'dayjs/plugin/isBetween';

dayjs.extend(customParseFormat);
dayjs.extend(advancedFormat);
Expand All @@ -26,6 +27,7 @@ dayjs.extend(localeData);
dayjs.extend(weekOfYear);
dayjs.extend(weekYear);
dayjs.extend(objectSupport);
dayjs.extend(isBetween);

const useStyles = createStyles(({ css }) => ({
appContainer: css`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { queryClient } from '~/lib/utils/queryClient';
import { UploadChangeParam } from 'antd/es/upload';
import { createStyles } from 'antd-style';
import { useMessage } from '~/hooks/useMessage';
import getFileUrl from '~/lib/utils/getFileUrl';

/* ---------------------------
* BADGE MANAGEMENT TABLE
Expand Down Expand Up @@ -102,7 +103,7 @@ export default function AdminBadgeManagement() {
{
key: 'image',
title: '이미지',
render: (_, { imageUrl }) => <Avatar src={imageUrl} />,
render: (_, { imageUrl }) => <Avatar src={getFileUrl(imageUrl)} />,
},
{
key: 'category',
Expand Down Expand Up @@ -247,8 +248,8 @@ function BadgeGenerateModal({
? [
{
uid: 'SOME_UID',
url: form.values.imageUrl,
name: form.values.imageUrl,
url: getFileUrl(form.values.imageUrl),
name: decodeURI(form.values.imageUrl),
},
]
: [];
Expand Down Expand Up @@ -357,8 +358,8 @@ function BadgeEditModal({
? [
{
uid: 'SOME_UID',
url: form.values.imageUrl,
name: form.values.imageUrl,
url: getFileUrl(form.values.imageUrl),
name: decodeURI(form.values.imageUrl),
},
]
: [];
Expand Down
8 changes: 7 additions & 1 deletion apps/web-client/src/components/board/BoardList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ const useStyles = createStyles(({ css }) => ({
height: 35px;
border: 1px solid #47be9b;
`,
clamp: css`
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
`,
}));

export default function BoardList({
Expand Down Expand Up @@ -140,7 +146,7 @@ export default function BoardList({
<Space direction={'vertical'} size={0}>
<Typography.Title level={5}>{post.title}</Typography.Title>
{post?.body && (
<Typography.Text>
<Typography.Text className={styles.clamp}>
{getInnerTextFromHtml(post.body)}
</Typography.Text>
)}
Expand Down
3 changes: 3 additions & 0 deletions apps/web-client/src/lib/api-v2/queryKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@ export const queryKey = {
project: {
all: ['project.all'] as const,
},
room: {
range: (start: any, end: any) => ['room.range', start, end] as const,
},
};
41 changes: 21 additions & 20 deletions apps/web-client/src/pages/board/BoardDetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ const useStyles = createStyles(({ css }) => ({
comment: css`
border-bottom: 1px solid #eee;
width: 100%;
padding-bottom: 16px;
`,
divider: css`
margin: 0;
Expand Down Expand Up @@ -286,10 +287,11 @@ export default function BoardDetailPage() {
/>
)}
</Space>
<Typography.Text type={'secondary'}>
{dayjs(post.createdAt).format('YYYY. MM. DD')}
</Typography.Text>
</Space>
<Divider type="vertical" className={styles.divider} />
<Typography.Text type={'secondary'}>
{dayjs(post.createdAt).format('YYYY. MM. DD')}
</Typography.Text>
</Space>
<Space direction={'vertical'} size={0}>
{post.boardType === 'JOB' ? (
Expand Down Expand Up @@ -452,26 +454,25 @@ function CommentBox({
align={'start'}
key={comment.commentId}
className={styles.comment}
direction={'vertical'}
>
<Space direction={'vertical'}>
<Space direction={'vertical'} size={3}>
<Space>
<Typography.Text>{comment.writerName}</Typography.Text>
{comment.badge && (
<Avatar
src={getFileUrl(comment.badge.imageUrl)}
className={styles.badge}
/>
)}
</Space>
<Typography.Text type={'secondary'}>
{dayjs(comment.createdAt).format('YYYY. MM. DD')}
</Typography.Text>
<Space direction={'vertical'} size="large">
<Space>
<Typography.Text>{comment.writerName}</Typography.Text>
{comment.badge && (
<Avatar
src={getFileUrl(comment.badge.imageUrl)}
className={styles.badge}
/>
)}
</Space>
<Typography.Paragraph className={styles.commentBody}>
{comment.body}
</Typography.Paragraph>
</Space>
<Typography.Paragraph className={styles.commentBody}>
{comment.body}
</Typography.Paragraph>
<Typography.Text type={'secondary'}>
{dayjs(comment.createdAt).format('YYYY. MM. DD')}
</Typography.Text>
</Space>
))}
{isLogin ? (
Expand Down
16 changes: 14 additions & 2 deletions apps/web-client/src/pages/my-page/MyPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ const useStyles = createStyles(({ css }) => ({
border-color: #47be9b;
}
`,
badge: css`
border: 2px solid #47be9b;
`,
}));

export default function MyPage() {
Expand Down Expand Up @@ -195,7 +198,12 @@ export default function MyPage() {
{me?.name}
</Typography.Text>
{me?.badge && (
<Avatar src={getFileUrl(me?.badge.imageUrl)} alt={me?.name} />
<Avatar
src={getFileUrl(me?.badge.imageUrl)}
alt={me?.name}
size={40}
className={styles.badge}
/>
)}
</Space>
<Typography.Text>{me?.introduction}</Typography.Text>
Expand Down Expand Up @@ -265,7 +273,11 @@ export default function MyPage() {
active: me?.badge?.id === el.id,
})}
>
<Avatar src={getFileUrl(el.imageUrl)} alt={el.name} />
<Avatar
src={getFileUrl(el.imageUrl)}
alt={el.name}
size={40}
/>
</Button>
))}
</Space>
Expand Down
33 changes: 30 additions & 3 deletions apps/web-client/src/pages/my-page/MyPageBadgeListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ const useStyles = createStyles(({ css }) => ({
display: flex;
gap: 24px;
`,
owned: css`
border: 2px solid #47be9b;
`,
notOwned: css`
border: 2px solid #eee;
`,
}));

export default function MyPageBadgeListPage() {
Expand Down Expand Up @@ -167,7 +173,14 @@ export default function MyPageBadgeListPage() {
?.filter((badge) => badge.category === 'ATTENDANCE')
.map((badge) => (
<Tooltip key={badge.id} title={renderBadgeTooltipTitle(badge)}>
<Avatar src={getFileUrl(badge.imageUrl)} alt={badge.name} />
<Avatar
src={getFileUrl(badge.imageUrl)}
alt={badge.name}
size={40}
className={classNames(
badge.own ? styles.owned : styles.notOwned,
)}
/>
</Tooltip>
))}
</div>
Expand Down Expand Up @@ -196,7 +209,14 @@ export default function MyPageBadgeListPage() {
<div className={styles.badgeWrap}>
{baekjoonSuccessiveSolveBadges.map((badge) => (
<Tooltip key={badge.id} title={renderBadgeTooltipTitle(badge)}>
<Avatar src={getFileUrl(badge.imageUrl)} alt={badge.name} />
<Avatar
src={getFileUrl(badge.imageUrl)}
alt={badge.name}
size={40}
className={classNames(
badge.own ? styles.owned : styles.notOwned,
)}
/>
</Tooltip>
))}
</div>
Expand All @@ -214,7 +234,14 @@ export default function MyPageBadgeListPage() {
<div className={styles.badgeWrap}>
{baekjoonTierBadges.map((badge) => (
<Tooltip key={badge.id} title={renderBadgeTooltipTitle(badge)}>
<Avatar src={getFileUrl(badge.imageUrl)} alt={badge.name} />
<Avatar
src={getFileUrl(badge.imageUrl)}
alt={badge.name}
size={40}
className={classNames(
badge.own ? styles.owned : styles.notOwned,
)}
/>
</Tooltip>
))}
</div>
Expand Down
Loading

0 comments on commit 7884f3e

Please sign in to comment.