Skip to content

Commit

Permalink
Merge pull request #190 from Anifriends/develop
Browse files Browse the repository at this point in the history
release: v0.1.1 배포
  • Loading branch information
sukvvon authored Nov 27, 2023
2 parents 6e5a018 + cf111b8 commit 4cc8595
Show file tree
Hide file tree
Showing 227 changed files with 9,424 additions and 636 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
root: true,
extends: ["custom"],
extends: ['custom'],
};
17 changes: 10 additions & 7 deletions .github/ISSUE_TEMPLATE/♻️-리팩토링-요청.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
---
name: '♻️ 리팩토링 요청'
name: "♻️ 리팩토링 요청"
about: 변경 혹은 개선해야 되는 문제를 작성해 주세요
title: 'refactor: '
labels: ''
assignees: ''

---

## 개선해야 되는 코드 혹은 기능에 대해서 적어주세요
## 개선해야 되는 코드 혹은 기능에 대해서 적어주세요
<!-- 개선해야 될 코드에 대한 명확하고 간단한 설명 -->


개선해야 될 코드에 대한 명확하고 간단한 설명

## 원하는 개선 방향
<!-- 개선해야 되는 간단한 이유 혹은 개선 후 장점에 대해 적어주세요 -->


개선해야 되는 간단한 이유 혹은 개선 후 장점에 대해 적어주세요

## 생각 중인 기능 추가 방안
<!-- 해결책으로 간단하게 생각한 개선 방법에 대해 적어주세요 -->

해결책으로 간단하게 생각한 개선 방법에 대해 적어주세요

## ETC

스크린샷이나 기능 등 추가 자료를 기술해 주세요
## ETC
<!-- 스크린샷이나 기능 등 추가 자료를 기술해 주세요 -->
19 changes: 10 additions & 9 deletions .github/ISSUE_TEMPLATE/✨-기능-추가-요청.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
---
name: '✨ 기능 추가 요청'
name: "✨ 기능 추가 요청"
about: 구현하려는 새로운 기능을 요청
title: 'feat: '
title: 'feat: '
labels: ''
assignees: ''

---

## 추가하려는 기능이 어떠한 문제 혹은 기능과 연관되어 있나요?
## 추가하려는 기능이 어떠한 문제 혹은 기능과 연관되어 있나요?
<!-- 문제가 무엇인지에 대한 명확하고 간결한 설명을 적어주세요 -->

문제가 무엇인지에 대한 명확하고 간결한 설명을 적어주세요

## 원하는 기능 추가

추가하려는 기능을 명확하고 간결하게 설명해주세요
## 원하는 기능 추가
<!-- 추가하려는 기능을 명확하고 간결하게 설명해주세요 -->

- [ ] todo
- [ ] todo

## 생각 중인 기능 추가 방안
<!-- 해결책으로 간단하게 생각한 기능의 방향 혹은 컴포넌트를 설명해주세요 -->

해결책으로 간단하게 생각한 기능의 방향 혹은 컴포넌트를 설명해주세요

## ETC

스크린샷이나 기능 등 추가 자료를 기술해 주세요
## ETC
<!-- 스크린샷이나 기능 등 추가 자료를 기술해 주세요 -->
9 changes: 6 additions & 3 deletions .github/ISSUE_TEMPLATE/🐛-버그-리포트.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@ about: 버그를 고쳐주세요
title: 'bug: '
labels: ''
assignees: ''

---

## 버그 설명
<!-- 발생되는 문제에 대해 간단하게 설명해 주세요 -->

발생되는 문제에 대해 간단하게 설명해 주세요

## 버그 발생 단계

## 버그 발생 단계
<!--
동작을 재현하는 단계:
1. ‘...‘로 이동합니다.
2. ‘....‘을 클릭합니다.
3. ‘....’까지 아래로 스크롤합니다.
4. 오류 보기
4. 오류 보기
-->
4 changes: 2 additions & 2 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Build Test

on:
push:
branches: [main]
branches: [main, develop]
pull_request:
branches: [main]
branches: [main, develop]
workflow_dispatch:

jobs:
Expand Down
7 changes: 7 additions & 0 deletions apps/shelter/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link
rel="preload"
href="https://cdn.jsdelivr.net/gh/projectnoonnu/[email protected]/IBMPlexSansKR-Regular.woff"
as="font"
type="font/woff"
crossorigin="anonymous"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>보호소 어플리케이션</title>
</head>
Expand Down
4 changes: 2 additions & 2 deletions apps/shelter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"build": "tsc && vite build",
"dev": "vite",
"lint": "eslint \"src/**/*.ts\"",
"lint": "eslint \"src/**/*.{ts,tsx}\"",
"preview": "vite preview"
},
"dependencies": {
Expand All @@ -24,7 +24,7 @@
"react-error-boundary": "^4.0.11",
"react-hook-form": "^7.47.0",
"react-router-dom": "^6.17.0",
"ui": "workspace:*",
"shared": "workspace:*",
"zod": "^3.22.4",
"zustand": "^4.4.4"
},
Expand Down
22 changes: 16 additions & 6 deletions apps/shelter/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
import { ChakraProvider } from '@chakra-ui/react';
import { CustomButton, Header } from 'ui';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
import { RouterProvider } from 'react-router-dom';
import Fonts from 'shared/fonts';
import theme from 'shared/theme';

import { router } from '@/routes';

const queryClient = new QueryClient();

export default function App() {
return (
<ChakraProvider>
<Header />
보호소 어플리케이션
<CustomButton />
</ChakraProvider>
<QueryClientProvider client={queryClient}>
<ChakraProvider theme={theme} resetCSS>
<Fonts />
<RouterProvider router={router} />
<ReactQueryDevtools initialIsOpen={false} />
</ChakraProvider>
</QueryClientProvider>
);
}
33 changes: 33 additions & 0 deletions apps/shelter/src/apis/auth.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import axiosInstance from 'shared/apis/axiosInstance';
import type {
ChangePasswordRequestData,
CheckDuplicatedEmailRequestData,
CheckDuplicatedEmailResponseData,
SigninRequestData,
SigninResponseData,
} from 'shared/types/apis/auth';

import { SignupRequestData } from '@/types/apis/auth';

export const signinShelter = (data: SigninRequestData) =>
axiosInstance.post<SigninResponseData, SigninRequestData>(
'/auth/shelters/login',
data,
);

export const signupShelter = (data: SignupRequestData) =>
axiosInstance.post<unknown, SignupRequestData>('/shelters', data);

export const checkDuplicatedShelterEmail = (
data: CheckDuplicatedEmailRequestData,
) =>
axiosInstance.post<
CheckDuplicatedEmailResponseData,
CheckDuplicatedEmailRequestData
>('/shelters/email', data);

export const changeShelterPassword = (data: ChangePasswordRequestData) =>
axiosInstance.patch<unknown, ChangePasswordRequestData>(
'/shelters/me/passwords',
data,
);
74 changes: 74 additions & 0 deletions apps/shelter/src/apis/recruitment.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import axiosInstance from 'shared/apis/axiosInstance';

import {
ApplicantsApprovalRequest,
ApprovedRecruitmentApplicantsResponse,
RecruitementsResponse,
RecruitmentApplicantsResponse,
RecruitmentApplicantUpdateRequest,
RecruitmentCreateRequest,
RecruitmentsRequest,
RecruitmentUpdateRequest,
} from '@/types/apis/recruitment';

export const getShelterRecruitments = async (
request: Partial<RecruitmentsRequest>,
) =>
axiosInstance.get<RecruitementsResponse, RecruitmentsRequest>(
'/shelters/recruitments',
{ params: request },
);

export const createShelterRecruitment = (request: RecruitmentCreateRequest) =>
axiosInstance.post<
{
recruitmentId: number;
},
RecruitmentCreateRequest
>(`/shelters/recruitments`, request);

export const updateShelterRecruitment = (
recruitmentId: number,
request: RecruitmentUpdateRequest,
) =>
axiosInstance.patch<unknown, RecruitmentUpdateRequest>(
`/shelters/recruitments/${recruitmentId}`,
request,
);

export const deleteShelterRecruitment = (recruitmentId: number) =>
axiosInstance.delete(`/shelters/recruitments/${recruitmentId}`);

export const closeShelterRecruitment = (recruitmentId: number) =>
axiosInstance.patch(`/shelters/recruitments/${recruitmentId}/close`);

export const getShelterRecruitmentApplicants = (recruitmentId: number) =>
axiosInstance.get<RecruitmentApplicantsResponse>(
`/shelters/recruitments/${recruitmentId}/applicants`,
);

export const updateShelterRecruitmentApplicant = (
recruitmentId: number,
applicantId: number,
request: RecruitmentApplicantUpdateRequest,
) =>
axiosInstance.patch<unknown, RecruitmentApplicantUpdateRequest>(
`/shelters/recruitments/${recruitmentId}/applicants/${applicantId}`,
request,
);

export const getShelterApprovedRecruitmentApplicants = (
recruitmentId: number,
) =>
axiosInstance.get<ApprovedRecruitmentApplicantsResponse>(
`/shelters/recruitments/${recruitmentId}/approval`,
);

export const updateAttendanceAPI = (
recruitmentId: number,
request: ApplicantsApprovalRequest,
) =>
axiosInstance.patch<unknown, ApplicantsApprovalRequest>(
`/shelters/recruitments/${recruitmentId}/approval`,
request,
);
53 changes: 53 additions & 0 deletions apps/shelter/src/apis/shelter.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import axiosInstance from 'shared/apis/axiosInstance';

import { ShelterInfo } from '@/types/apis/shetler';

type PasswordUpdateParams = {
newPassword: string;
oldPassword: string;
};

type PageParams = {
pageSize: number;
pageNumber: number;
};

export const getShelterInfoAPI = () =>
axiosInstance.get<ShelterInfo>('/shelters/me');

export const updateShelterInfo = (shelterInfo: ShelterInfo) =>
axiosInstance.patch<unknown, ShelterInfo>('/shelters/me', shelterInfo);

export const updatePassword = (passwordUpdateParams: PasswordUpdateParams) =>
axiosInstance.patch<unknown, PasswordUpdateParams>(
'/shelters/me/password',
passwordUpdateParams,
);

export const updateAddressStatusAPI = (isOpenedAddress: boolean) =>
axiosInstance.patch<
unknown,
{
isOpenedAddress: boolean;
}
>('/shelters/me/address/status', { isOpenedAddress });

export const getShelterReviewList = (pageParams: PageParams) =>
axiosInstance.get<{
pageInfo: {
totalElements: number;
hasNext: boolean;
};
reviews: {
reviewId: number;
reviewCreatedAt: string;
reviewContent: string;
reviewImageUrls: string[];
volunteerName: string;
volunteerTemperature: number;
volunteerReviewCount: number;
volunteerImageUrl: string;
}[];
}>(`/shelters/me/reviews`, {
params: pageParams,
});
19 changes: 19 additions & 0 deletions apps/shelter/src/assets/CkCheck.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { ComponentProps } from 'react';

export default function CkCheck({ ...props }: ComponentProps<'svg'>) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 16 16"
fill="none"
{...props}
>
<path
d="M6.66649 10.115L12.7945 3.98633L13.7378 4.92899L6.66649 12.0003L2.42383 7.75766L3.36649 6.81499L6.66649 10.115Z"
fill="white"
/>
</svg>
);
}
40 changes: 40 additions & 0 deletions apps/shelter/src/constants/path.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
const PATH = {
VOLUNTEERS: {
INDEX: 'volunteers',
DETAIL: ':id',
PROFILE: 'profile',
SEARCH: 'search',
WRITE: 'write',
UPDATE: 'write/:id',
},
ANIMALS: {
INDEX: 'animals',
DETAIL: ':id',
SEARCH: 'search',
WRITE: 'write',
UPDATE: 'write/:id',
},
CHATTINGS: {
INDEX: 'chattings',
ROOM: 'chattings/:id',
},
MYPAGE: {
INDEX: 'mypage',
REVIEWS: 'reviews',
},
SETTINGS: {
INDEX: 'settings',
ACCOUNT: 'account',
PASSWORD: 'password',
},
MANAGE: {
INDEX: 'manage',
ATTENDANCE: 'attendance/:id',
APPLY: 'apply/:id',
},
NOTIFICATIONS: 'notifications',
SIGNUP: 'signup',
SIGNIN: 'signin',
};

export default PATH;
Loading

1 comment on commit 4cc8595

@vercel
Copy link

@vercel vercel bot commented on 4cc8595 Nov 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

anifriends-frontend-volunteer – ./apps/volunteer

anifriends-frontend-volunteer-git-main-dongja.vercel.app
anifriends-frontend-volunteer-dongja.vercel.app
anifriends-frontend-volunteer.vercel.app

Please sign in to comment.