Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into 1383-connect-purpose-activity-api-to-funding
  • Loading branch information
jooyeongmee committed Jan 26, 2025
2 parents b024c73 + c10f79d commit a9ee3aa
Show file tree
Hide file tree
Showing 9 changed files with 105 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ export default class ActivityRepository {
.update(Activity)
.set({
activityStatusEnumId: param.activityStatusEnumId,
commentedAt: new Date(),
commentedAt: getKSTDate(),
})
.where(
and(eq(Activity.id, param.activityId), isNull(Activity.deletedAt)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ export default class ActivityActivityTermService {
const semesters = await this.clubPublicService.getClubsExistedSemesters({
clubId: query.clubId,
});
console.log("asdfAsdf", semesters);
const activityTerms: ApiAct009ResponseOk["terms"] = [];
await Promise.all(
semesters.map(async semester => {
Expand Down
4 changes: 2 additions & 2 deletions packages/api/src/feature/activity/service/activity.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1453,10 +1453,10 @@ export default class ActivityService {
club: clubMap.get(activity.club.id),
chargedExecutive: activity.chargedExecutive?.id
? executiveMap.get(activity.chargedExecutive.id)
: undefined,
: null,
commentedExecutive: activity.commentedExecutive?.id
? executiveMap.get(activity.commentedExecutive.id)
: undefined,
: null,
}));

return {
Expand Down
9 changes: 7 additions & 2 deletions packages/interface/src/api/activity/endpoint/apiAct028.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { z } from "zod";

import { zExecutiveSummary } from "@sparcs-clubs/interface/api/user/type/user.type";

import { zActivitySummaryExecutiveResponse } from "../type/activity.type";
import { zActivitySummaryResponse } from "../type/activity.type";

const url = (executiveId: number) =>
`/executive/activities/executives/executive/${executiveId}/brief`;
Expand All @@ -22,7 +22,12 @@ const requestBody = z.object({});
const responseBodyMap = {
[HttpStatusCode.Ok]: z.object({
chargedExecutive: zExecutiveSummary,
activities: zActivitySummaryExecutiveResponse.array(),
activities: zActivitySummaryResponse
.extend({
chargedExecutive: zExecutiveSummary.nullable(),
commentedExecutive: zExecutiveSummary.nullable(),
})
.array(),
}),
};

Expand Down
11 changes: 2 additions & 9 deletions packages/interface/src/api/activity/type/activity.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ export const zActivitySummary = z.object({
activityTypeEnum: z.nativeEnum(ActivityTypeEnum),
club: zClubSummary.pick({ id: true }),
name: z.string().max(255),
chargedExecutive: zExecutiveSummary.pick({ id: true }).optional(),
commentedExecutive: zExecutiveSummary.pick({ id: true }).optional(),
commentedAt: z.coerce.date().nullable(),
editedAt: z.coerce.date(),
updatedAt: z.coerce.date(),
Expand All @@ -29,12 +31,6 @@ export const zActivitySummaryResponse = zActivitySummary.extend({
club: zClubSummary,
});

export const zActivitySummaryExecutiveResponse =
zActivitySummaryResponse.extend({
chargedExecutive: zExecutiveSummary.optional(),
commentedExecutive: zExecutiveSummary.optional(),
});

// TODO: 수정 필요
export const zActivityD = z.object({
id: z.coerce.number().int().min(1),
Expand All @@ -44,7 +40,4 @@ export const zActivityD = z.object({

export type IActivitySummary = z.infer<typeof zActivitySummary>;
export type IActivityResponseSummary = z.infer<typeof zActivitySummaryResponse>;
export type IActivitySummaryExecutiveResponse = z.infer<
typeof zActivitySummaryExecutiveResponse
>;
export type IActivityD = z.infer<typeof zActivityD>;
4 changes: 4 additions & 0 deletions packages/web/src/app/clubs/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
import { useParams } from "next/navigation";

import AsyncBoundary from "@sparcs-clubs/web/common/components/AsyncBoundary";
import useEasterEgg from "@sparcs-clubs/web/common/hooks/useEasteregg";
import { useAuth } from "@sparcs-clubs/web/common/providers/AuthContext";
import ClubDetailPublicFrame from "@sparcs-clubs/web/features/clubs/frames/ClubDetailPublicFrame";
import ClubDetailStudentFrame from "@sparcs-clubs/web/features/clubs/frames/ClubDetailStudentFrame";
import { useGetClubDetail } from "@sparcs-clubs/web/features/clubs/services/getClubDetail";
import isStudent from "@sparcs-clubs/web/utils/isStudent";

const ClubDetail = () => {
// 이스터에그_리크루팅
useEasterEgg();

const { id } = useParams();
const { data, isLoading, isError } = useGetClubDetail(id as string);
const { isLoggedIn, profile } = useAuth();
Expand Down
52 changes: 52 additions & 0 deletions packages/web/src/common/hooks/useEasteregg.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import { useEffect } from "react";

const useEasterEgg = () => {
useEffect(() => {
const easterEgg = `%c
-
-=.
-===
=====.
: -=====-
+- -=======
++= =========-
+++=. -==========
+++++: ============-
++++++- ==============
+++++++= ===============:
++++++++=. .================:
+++++++++= .===============-
++++++++=. ===============.
+++++++=..==============:
++++++=..==============
+++++= .=============.
++++=..============:
+++=..===========-
++= .===========-.
+=.:==========+++++++===--:::.
= :=======+++++++++++++++===:
:====+++++++++++++++=====:
.---====++++++++=======-.
:=======-.
:======-.
:=====:
-====:
-===:
-=-.
=-
.:.
%c찾으셨군요!
SPARCS의 여정에 함께하지 않으시겠어요?
https://sparcs.org/
https://apply.sparcs.org/ (리크루팅 기간에 접속 가능)
`;
console.log(
easterEgg,
"color:#eba12a; font-weight: bold; margin: auto", // 로고 스타일
"", // 텍스트 스타일
);
console.log();
}, []);
};

export default useEasterEgg;
4 changes: 4 additions & 0 deletions packages/web/src/features/clubs/frames/ClubsListFrame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { hangulIncludes } from "es-hangul";
import AsyncBoundary from "@sparcs-clubs/web/common/components/AsyncBoundary";
import FlexWrapper from "@sparcs-clubs/web/common/components/FlexWrapper";
import SearchInput from "@sparcs-clubs/web/common/components/SearchInput";
import useEasterEgg from "@sparcs-clubs/web/common/hooks/useEasteregg";
import ClubsSectionFrame from "@sparcs-clubs/web/features/clubs/frames/ClubsSectionFrame";
import { useGetClubsList } from "@sparcs-clubs/web/features/clubs/services/useGetClubsList";

Expand All @@ -15,6 +16,9 @@ interface ClubsListProps {
}

const ClubsListFrame: React.FC<ClubsListProps> = ({ isRegistrationPeriod }) => {
// 이스터에그_리크루팅
useEasterEgg();

const { data, isLoading, isError } = useGetClubsList();

const [searchText, setSearchText] = useState<string>("");
Expand Down
62 changes: 33 additions & 29 deletions packages/web/src/features/landing/frames/MainPageMainFrame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import styled from "styled-components";

import FlexWrapper from "@sparcs-clubs/web/common/components/FlexWrapper";
import Typography from "@sparcs-clubs/web/common/components/Typography";
import useEasterEgg from "@sparcs-clubs/web/common/hooks/useEasteregg";
import colors from "@sparcs-clubs/web/styles/themes/colors";

import Banner from "../components/Banner";
Expand Down Expand Up @@ -58,34 +59,37 @@ const ResponsiveWrapper = styled(FlexWrapper)`
gap: 40px;
}
`;

const MainPageMainFrame: React.FC = () => (
<ResponsiveWrapper direction="column" gap={60}>
<Banner icon="star">
현재 Clubs는 동아리 등록 신청을 위한 베타 서비스로 운영되고 있습니다.
<br />
문의나 피드백은 하단 채널톡 버튼을 통해 제보 부탁드립니다!
</Banner>
<PageTitleWrapper>
<ResponsiveSloganTypography
fw="SEMIBOLD"
style={{ width: "fit-content" }}
>
<StyledSpan>동아리</StyledSpan>의 모든 것을 한번에
</ResponsiveSloganTypography>
<ResponsiveSloganTypography
fw="SEMIBOLD"
style={{ width: "fit-content" }}
>
동아리연합회 통합 플랫폼, <BreakBeforeStyledSpan />
<StyledSpan>Clubs</StyledSpan>입니다
</ResponsiveSloganTypography>
</PageTitleWrapper>
<NoticeAndServiceWrapper>
<NoticeSectionFrame />
{/* <ServiceSectionFrame /> */}
</NoticeAndServiceWrapper>
</ResponsiveWrapper>
);
const MainPageMainFrame: React.FC = () => {
// 이스터에그_리크루팅
useEasterEgg();
return (
<ResponsiveWrapper direction="column" gap={60}>
<Banner icon="star">
현재 Clubs는 동아리 등록 신청을 위한 베타 서비스로 운영되고 있습니다.
<br />
문의나 피드백은 하단 채널톡 버튼을 통해 제보 부탁드립니다!
</Banner>
<PageTitleWrapper>
<ResponsiveSloganTypography
fw="SEMIBOLD"
style={{ width: "fit-content" }}
>
<StyledSpan>동아리</StyledSpan>의 모든 것을 한번에
</ResponsiveSloganTypography>
<ResponsiveSloganTypography
fw="SEMIBOLD"
style={{ width: "fit-content" }}
>
동아리연합회 통합 플랫폼, <BreakBeforeStyledSpan />
<StyledSpan>Clubs</StyledSpan>입니다
</ResponsiveSloganTypography>
</PageTitleWrapper>
<NoticeAndServiceWrapper>
<NoticeSectionFrame />
{/* <ServiceSectionFrame /> */}
</NoticeAndServiceWrapper>
</ResponsiveWrapper>
);
};

export default MainPageMainFrame;

0 comments on commit a9ee3aa

Please sign in to comment.